%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.119.158.74
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/field/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/field//font_field.min.js
(function(){"use strict";BX.namespace("BX.Landing.UI.Field");BX.Runtime.loadExtension("landing.ui.component.link");var t=BX.Landing.Utils.isFunction;var e=BX.Landing.Utils.isPlainObject;var n=BX.Landing.Utils.bind;var i=BX.Landing.Utils.proxy;var a=BX.Landing.Utils.escapeHtml;var s=BX.Landing.Utils.addClass;var l=BX.Landing.Utils.clone;var o=/g-font-(?!size-|weight-)[a-z0-9-]+/gi;var r=/[a-z0-9 ]*[a-z0-9]/i;var h=/['|"]/g;var d=/ /g;BX.Landing.UI.Field.Font=function(l){BX.Landing.UI.Field.BaseField.apply(this,arguments);s(this.layout,"landing-ui-field-font");this.value=l.value;this.headlessMode=l.headlessMode===true;this.frame=l.frame;this.items=[];this.defaultFontFamily=null;this.defaultFontLink=new BX.Landing.UI.Component.Link({text:BX.Landing.Loc.getMessage("LANDING_EDIT_BLOCK_DEFAULT_FONT")});s(this.defaultFontLink.getLayout(),"landing-ui-field-font-link");if(e(l.items)){var o=Object.keys(this.items);this.items=o.map(function(t){return{name:this.items[t],value:t}},this)}this.onChangeHandler=t(l.onChange)?l.onChange:function(){};this.onValueChangeHandler=t(l.onValueChange)?l.onValueChange:function(){};if(this.value){this.content=a(this.value.family);this.input.innerHTML=this.value.family}else{this.content=a(this.content);this.input.innerHTML=this.content}if(this.frame){this.element=this.frame.document.querySelectorAll(this.selector)[0];if(this.element){var r=BX.style(this.element,"font-family");if(r){r=r.replace(h,"");this.content=r.split(",")[0];this.input.innerHTML=this.content}this.createLinkContainer();this.setConditionLink()}}n(this.input,"click",i(this.onInputClick,this));this.defaultFontLink.subscribe("onClick",i(this.onLinkClick,this))};function u(t){return"g-font-"+t.toLowerCase().replace(d,"-")}BX.Landing.UI.Field.Font.prototype={constructor:BX.Landing.UI.Field.Font,__proto__:BX.Landing.UI.Field.BaseField.prototype,onInputClick:function(t){t.preventDefault();t.stopPropagation();BX.Landing.UI.Panel.GoogleFonts.getInstance().show().then(function(t){if(!this.response){this.response=l(BX.Landing.UI.Panel.GoogleFonts.getInstance().response);this.response.forEach(function(t){this.items.push({name:t.family,value:u(t.family)})},this)}this.setValue(t)}.bind(this))},onLinkClick:function(){if(this.defaultFontFamily){var t=this.element.classList.value.match(o);if(t!==null){var e=this.element;t.forEach(function(t){e.classList.remove(t)})}this.content=this.defaultFontFamily.replace(h,"").split(",")[0];var n={family:this.content};this.setValue(n)}},createLinkContainer:function(){this.linkContainer=document.createElement("div");this.linkContainer.classList.add("landing-ui-component-link-container");this.layout.append(this.linkContainer)},setConditionLink:function(){if(this.element){var t=["H1","H2","H3","H4","H5","H6","H7"];this.defaultFontFamily=getComputedStyle(document.body).fontFamily;this.isHeaderElement=t.includes(this.element.tagName);if(this.isHeaderElement){var e=document.createElement("H2");document.body.appendChild(e);this.defaultFontFamily=getComputedStyle(e).fontFamily;e.remove()}this.defaultFont=this.defaultFontFamily.match(r)[0];this.currentFont=getComputedStyle(this.element).fontFamily.match(r)[0];if(this.defaultFont!==this.currentFont){this.linkContainer.append(this.defaultFontLink.getLayout())}else{if(this.linkContainer.hasChildNodes()){this.linkContainer.removeChild(this.linkContainer.firstChild)}}}},setValue:function(t){if(e(t)){var n=u(t.family);var i=[100,200,300,400,500,600,700,800,900];var s=":wght@"+i.join(";");var l=t.family.replace(d,"+");var o=l+s;var r=BX.Landing.UI.Panel.GoogleFonts.getInstance().client.makeUrl({family:o});if(this.headlessMode){this.value={family:t.family,public:"https://fonts.google.com/specimen/"+l,uri:r};this.input.innerHTML=a(t.family);this.emit("onChange")}else{var h=BX.Landing.UI.Tool.FontManager.getInstance();h.addFont({className:n,family:t.family,href:r,category:t.category},window);this.input.innerHTML=a(t.family);this.onChangeHandler(n,this.items,this.postfix,this.property);this.onValueChangeHandler(this);h.removeUnusedFonts();var c="";h.getUsedLoadedFonts().forEach(function(t){if(t.element){t.element.setAttribute("rel","stylesheet");t.element.removeAttribute("media");c+="<noscript>"+t.element.outerHTML+"</noscript>\n";t.element.setAttribute("rel","preload");t.element.setAttribute("onload","this.removeAttribute('onload');this.rel='stylesheet'");t.element.setAttribute("as","style");c+=t.element.outerHTML+"\n"}if(t.CSSDeclaration){c+=t.CSSDeclaration.outerHTML}});c=c.replace("async@load","all").replace(/data-loadcss="true"/g,"");BX.Landing.Backend.getInstance().action("Landing::updateHead",{content:c})}}this.setConditionLink()},getValue:function(){return this.value}}})();
//# sourceMappingURL=font_field.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit