!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(function(){return function(){"use strict";var t={7621:function(t,e,i){var s=i(8081),a=i.n(s),n=i(3645),o=i.n(n),r=i(1667),l=i.n(r),c=new URL(i(6468),i.b),u=o()(a()),d=l()(c);u.push([t.id,'#template-customizer{font-family:"Open Sans",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" !important;font-size:inherit !important;position:fixed;top:0;right:0;height:100%;z-index:99999999;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:400px;-webkit-box-shadow:0px .3125rem 1.375rem 0px rgba(34,48,62,.18);box-shadow:0px .3125rem 1.375rem 0px rgba(34,48,62,.18);-webkit-transition:all .2s ease-in;-o-transition:all .2s ease-in;transition:all .2s ease-in;-webkit-transform:translateX(420px);-ms-transform:translateX(420px);transform:translateX(420px)}.dark-style #template-customizer{-webkit-box-shadow:0px .3125rem 1.375rem 0px rgba(20,20,29,.26);box-shadow:0px .3125rem 1.375rem 0px rgba(20,20,29,.26)}#template-customizer h5{position:relative;font-size:11px}#template-customizer>h5{flex:0 0 auto}#template-customizer .disabled{color:#d1d2d3 !important}#template-customizer .form-label{font-size:.9375rem;font-weight:500}#template-customizer .form-check-label{font-size:.8125rem}#template-customizer.template-customizer-open{-webkit-transition-delay:.1s;-o-transition-delay:.1s;transition-delay:.1s;-webkit-transform:none !important;-ms-transform:none !important;transform:none !important}#template-customizer.template-customizer-open .custom-option.checked{color:var(--bs-primary);border-width:2px;margin:0}#template-customizer .template-customizer-header a:hover{color:inherit !important}#template-customizer .template-customizer-open-btn{position:absolute;top:180px;left:0;z-index:-1;display:block;width:38px;height:38px;border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;background:var(--bs-primary);box-shadow:0px .125rem .25rem 0px rgba(105,108,255,.4);color:#fff !important;text-align:center;font-size:18px !important;line-height:38px;opacity:1;-webkit-transition:all .1s linear .2s;-o-transition:all .1s linear .2s;transition:all .1s linear .2s;-webkit-transform:translateX(-58px);-ms-transform:translateX(-58px);transform:translateX(-58px)}@media(max-width: 991.98px){#template-customizer .template-customizer-open-btn{top:145px}}.dark-style #template-customizer .template-customizer-open-btn{background:var(--bs-primary)}#template-customizer .template-customizer-open-btn::before{content:"";width:22px;height:22px;display:block;background-size:100% 100%;position:absolute;background-image:url('+d+');top:50%;left:50%;transform:translate(-50%, -50%)}.customizer-hide #template-customizer .template-customizer-open-btn{display:none}[dir=rtl] #template-customizer .template-customizer-open-btn{border-radius:0;border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}[dir=rtl] #template-customizer .template-customizer-open-btn::before{margin-left:-2px}#template-customizer.template-customizer-open .template-customizer-open-btn{opacity:0;-webkit-transition-delay:0s;-o-transition-delay:0s;transition-delay:0s;-webkit-transform:none !important;-ms-transform:none !important;transform:none !important}#template-customizer .template-customizer-inner{position:relative;overflow:auto;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;opacity:1;-webkit-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}#template-customizer .template-customizer-inner>div:first-child>hr:first-of-type{display:none !important}#template-customizer .template-customizer-inner>div:first-child>h5:first-of-type{padding-top:0 !important}#template-customizer .template-customizer-themes-inner{position:relative;opacity:1;-webkit-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}#template-customizer .template-customizer-theme-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center;-ms-flex-align:center;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:10px;padding:0 24px;width:100%;cursor:pointer}#template-customizer .template-customizer-theme-item input{position:absolute;z-index:-1;opacity:0}#template-customizer .template-customizer-theme-item input~span{opacity:.25;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s}#template-customizer .template-customizer-theme-item .template-customizer-theme-checkmark{display:inline-block;width:6px;height:12px;border-right:1px solid;border-bottom:1px solid;opacity:0;-webkit-transition:all .2s;-o-transition:all .2s;transition:all .2s;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}[dir=rtl] #template-customizer .template-customizer-theme-item .template-customizer-theme-checkmark{border-right:none;border-left:1px solid;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#template-customizer .template-customizer-theme-item input:checked:not([disabled])~span,#template-customizer .template-customizer-theme-item:hover input:not([disabled])~span{opacity:1}#template-customizer .template-customizer-theme-item input:checked:not([disabled])~span .template-customizer-theme-checkmark{opacity:1}#template-customizer .template-customizer-theme-colors span{display:block;margin:0 1px;width:10px;height:10px;border-radius:50%;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1) inset;box-shadow:0 0 0 1px rgba(0,0,0,.1) inset}#template-customizer.template-customizer-loading .template-customizer-inner,#template-customizer.template-customizer-loading-theme .template-customizer-themes-inner{opacity:.2}#template-customizer.template-customizer-loading .template-customizer-inner::after,#template-customizer.template-customizer-loading-theme .template-customizer-themes-inner::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:block}@media(max-width: 1200px){#template-customizer{display:none;visibility:hidden !important}}@media(max-width: 575.98px){#template-customizer{width:300px;-webkit-transform:translateX(320px);-ms-transform:translateX(320px);transform:translateX(320px)}}.layout-menu-100vh #template-customizer{height:100vh}[dir=rtl] #template-customizer{right:auto;left:0;-webkit-transform:translateX(-420px);-ms-transform:translateX(-420px);transform:translateX(-420px)}[dir=rtl] #template-customizer .template-customizer-open-btn{right:0;left:auto;-webkit-transform:translateX(58px);-ms-transform:translateX(58px);transform:translateX(58px)}[dir=rtl] #template-customizer .template-customizer-close-btn{right:auto;left:0}#template-customizer .template-customizer-layouts-options[disabled]{opacity:.5;pointer-events:none}[dir=rtl] .template-customizer-t-style_switch_light{padding-right:0 !important}',""]),e.Z=u},3645:function(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",s=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),s&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),s&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,s,a,n){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(s)for(var r=0;r0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=n),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),a&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=a):u[4]="".concat(a)),e.push(u))}},e}},1667:function(t){t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},8081:function(t){t.exports=function(t){return t[1]}},3379:function(t){var e=[];function i(t){for(var i=-1,s=0;s0?" ".concat(i.layer):""," {")),s+=i.css,a&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var n=i.sourceMap;n&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleTagTransform(s,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:function(t){t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},6468:function(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABClJREFUaEPtmY1RFEEQhbsjUCIQIhAiUCNQIxAiECIQIxAiECIAIpAMhAiECIQI2vquZqnZvp6fhb3SK5mqq6Ju92b69bzXf6is+dI1t1+eAfztG5z1BsxsU0S+ici2iPB3vm5E5EpEDlSVv2dZswFIxv8UkZcNy+5EZGcuEHMCOBeR951uvVDVD53vVl+bE8DvDu8Pxtyo6ta/BsByg1R15Bwzqz5/LJgn34CZwfnPInI4BUB6/1hV0cSjVxcAM4PbcBZjL0XklIPN7Is3fLCkdQPpPYw/VNXj5IhPIvJWRIhSl6p60ULWBGBm30Vk123EwRxCuIzWkkjNrCZywith10ewE1Xdq4GoAjCz/RTXW44Ynt+LyBEfT43kYfbj86J3w5Q32DNcRQDpwF+dkQXDMey8xem0L3TEqB4g3PZWad8agBMRgZPeu96D1/C2Zbh3X0p80Op1xxloztN48bMQQNoc7+eLEuAoPSPiIDY4Ooo+E6ixeNXM+D3GERz2U3CIqMstLJUgJQDe+7eq6mub0NYEkLAKwEHkiBQDCZtddZCZ8d6r7JDwFkoARklHRPZUFVDVZWbwGuNrC4EfdOzFrRABh3Wnqhv+d70AEBLGFROPmeHlnM81G69UdSd6IUuM0GgUVn1uqWmg5EmMfBeEyB7Pe3txBkY+rGT8j0J+WXq/BgDkUCaqLgEAnwcRog0veMIqFAAwCy2wnw+bI2GaGboBgF9k5N0o0rUSGUb4eO0BeO9j/GYhkSHMHMTIqwGARX6p6a+nlPBl8kZuXMD9j6pKfF9aZuaFOdJCEL5D4eYb9wCYVCanrBmGyii/tIq+SLj/HQBCaM5bLzwfPqdQ6FpVHyra4IbuVbXaY7dETC2ESPNNWiIOi69CcdgSMXsh4tNSUiklMgwmC0aNd08Y5WAES6HHehM4gu97wyhBgWpgqXsrASglprDy7CwhehMZOSbK6JMSma+Fio1KltCmlBIj7gfZOGx8ppQSXrhzFnOhJ/31BDkjFHRvOd09x0mRBA9SFgxUgHpQg0q0t5ymPMlL+EnldFTfDA0NAmf+OTQ0X0sRouf7NNkYGhrOYNrxtIaGg83MNzVDSe3LXLhP7O/yrCsCz1zlWTpjWkuZAOBpX3yVnLqI1yLCOKU6qMrmP7SSrUEw54XF4WBIK5FxCMOr3lVsfGqNSmPzBXUnJTIX1jyVBq9wO6UObOpgC5GjO98vFKnTdQMZXxEsWZlDiCZMIxAbNxQOqlpVZtobejBaZNoBnRDzMFpkxvTQOD36BlrcySZuI6p1ACB6LU3wWuf5581+oHfD1vi89bz3nFUC8Nm7ZlP3nKkFbM4bWPt/MSFwklprYItwt6cmvpWJ2IVcQBCz6bLysSCv3SaANCiTsnaNRrNRqMXVVT1/BrAqz/buu/Y38Ad3KC5PARej0QAAAABJRU5ErkJggg=="}},e={};function i(s){var a=e[s];if(void 0!==a)return a.exports;var n=e[s]={id:s,exports:{}};return t[s](n,n.exports,i),n.exports}i.m=t,i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href,i.nc=void 0;var s={};return function(){i.r(s),i.d(s,{TemplateCustomizer:function(){return E}});var t=i(3379),e=i.n(t),a=i(7795),n=i.n(a),o=i(569),r=i.n(o),l=i(3565),c=i.n(l),u=i(9216),d=i.n(u),m=i(4589),h=i.n(m),p=i(7621),y={};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function v(t,e){for(var i=0;i1&&void 0!==arguments[1])||arguments[1];this._hasControls("contentLayout")&&(this.settings.contentLayout=t,e&&this._setSetting("contentLayout",t),window.Helpers.setContentLayout(t),e&&this.settings.onSettingsChange.call(this,this.settings))}},{key:"setStyle",value:function(t){this._setSetting("Style",t),window.location.reload()}},{key:"setTheme",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this._hasControls("themes")){var s=this._getThemeByName(t);if(s){this.settings.theme=s,e&&this._setSetting("Theme",t);var a,n,o,r=this.pathResolver(this.settings.themesPath+this.settings.cssFilenamePattern.replace("%name%",t+("light"!==this.settings.style?"-".concat(this.settings.style):"")));this._loadStylesheets((a={},n=r,o=document.querySelector(".template-customizer-theme-css"),(n=g(n))in a?Object.defineProperty(a,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[n]=o,a),i||function(){}),e&&this.settings.onSettingsChange.call(this,this.settings)}}}},{key:"setLayoutType",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._hasControls("headerType")&&("static"===t||"static-offcanvas"===t||"fixed"===t||"fixed-offcanvas"===t)){this.settings.headerType=t,e&&this._setSetting("LayoutType",t),window.Helpers.setPosition("fixed"===t||"fixed-offcanvas"===t,"static-offcanvas"===t||"fixed-offcanvas"===t),e&&this.settings.onSettingsChange.call(this,this.settings);var i=window.Helpers.menuPsScroll,s=window.PerfectScrollbar;"fixed"===this.settings.headerType||"fixed-offcanvas"===this.settings.headerType?s&&i&&(window.Helpers.menuPsScroll.destroy(),i=new s(document.querySelector(".menu-inner"),{suppressScrollX:!0,wheelPropagation:!1}),window.Helpers.menuPsScroll=i):i&&window.Helpers.menuPsScroll.destroy()}}},{key:"setDropdownOnHover",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._hasControls("showDropdownOnHover")){if(this.settings.showDropdownOnHover=t,e&&this._setSetting("ShowDropdownOnHover",t),window.Helpers.mainMenu){window.Helpers.mainMenu.destroy(),config.showDropdownOnHover=t;var i=window.Menu;window.Helpers.mainMenu=new i(document.getElementById("layout-menu"),{orientation:"horizontal",closeChildren:!0,showDropdownOnHover:config.showDropdownOnHover})}e&&this.settings.onSettingsChange.call(this,this.settings)}}},{key:"setLayoutNavbarOption",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._hasControls("layoutNavbarOptions")&&(this.settings.layoutNavbarOptions=t,e&&this._setSetting("FixedNavbarOption",t),window.Helpers.setNavbar(t),e&&this.settings.onSettingsChange.call(this,this.settings))}},{key:"setLayoutFooterFixed",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.settings.layoutFooterFixed=t,e&&this._setSetting("FixedFooter",t),window.Helpers.setFooterFixed(t),e&&this.settings.onSettingsChange.call(this,this.settings)}},{key:"setLang",value:function(e){var i=this,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e!==this.settings.lang||a){if(!t.LANGUAGES[e])throw new Error('Language "'.concat(e,'" not found!'));var n=t.LANGUAGES[e];["panel_header","panel_sub_header","theming_header","style_label","style_switch_light","style_switch_dark","layout_header","layout_label","layout_header_label","content_label","layout_static","layout_offcanvas","layout_fixed","layout_fixed_offcanvas","layout_dd_open_label","layout_navbar_label","layout_footer_label","misc_header","theme_label","direction_label"].forEach((function(t){var e=i.container.querySelector(".template-customizer-t-".concat(t));e&&(e.textContent=n[t])}));for(var o=n.themes||{},r=this.container.querySelectorAll(".template-customizer-theme-item")||[],l=0,c=r.length;l0&&void 0!==arguments[0]?arguments[0]:document,i=function(e,i,s,a,n){return n=n||e,t._getElementFromString('
\n
\n \n
\n \n
"))};this._cleanup(),this.container=this._getElementFromString(' ');var s=this.container;this.settings.displayCustomizer?s.setAttribute("style","visibility: visible"):s.setAttribute("style","visibility: hidden");var a=this.container.querySelector(".template-customizer-open-btn"),n=function(){t.container.classList.add("template-customizer-open"),t.update(),t._updateInterval&&clearInterval(t._updateInterval),t._updateInterval=setInterval((function(){t.update()}),500)};a.addEventListener("click",n),this._listeners.push([a,"click",n]);var o=this.container.querySelector(".template-customizer-reset-btn"),r=function(){t.clearLocalStorage(),window.location.reload()};o.addEventListener("click",r),this._listeners.push([o,"click",r]);var l=this.container.querySelector(".template-customizer-close-btn"),c=function(){t.container.classList.remove("template-customizer-open"),t._updateInterval&&(clearInterval(t._updateInterval),t._updateInterval=null)};l.addEventListener("click",c),this._listeners.push([l,"click",c]);var u=this.container.querySelector(".template-customizer-style"),d=u.querySelector(".template-customizer-styles-options");if(this._hasControls("style")){this.settings.availableStyles.forEach((function(t){var e=i(t.name,t.title,"customRadioIcon",w.contains("dark-style"));d.appendChild(e)})),d.querySelector('input[value="'.concat(this.settings.stylesOpt,'"]')).setAttribute("checked","checked");var m=function(e){t._loadingState(!0),t.setStyle(e.target.value,!0,(function(){t._loadingState(!1)}))};d.addEventListener("change",m),this._listeners.push([d,"change",m])}else u.parentNode.removeChild(u);var h=this.container.querySelector(".template-customizer-themes"),p=h.querySelector(".template-customizer-themes-options");if(this._hasControls("themes")){this.settings.availableThemes.forEach((function(t){var e;e="theme-semi-dark"===t.name?"semi-dark":"theme-bordered"===t.name?"border":"default";var s=i(t.name,t.title,"themeRadios",w.contains("dark-style"),e);p.appendChild(s)})),p.querySelector('input[value="'.concat(this.settings.theme.name,'"]')).setAttribute("checked","checked");var y=function(e){t._loading=!0,t._loadingState(!0,!0),t.setTheme(e.target.value,!0,(function(){t._loading=!1,t._loadingState(!1,!0)}))};p.addEventListener("change",y),this._listeners.push([p,"change",y])}else h.parentNode.removeChild(h);var f=this.container.querySelector(".template-customizer-theming");this._hasControls("style")||this._hasControls("themes")||f.parentNode.removeChild(f);var v=this.container.querySelector(".template-customizer-layout");if(this._hasControls("rtl headerType contentLayout layoutCollapsed layoutNavbarOptions",!0)){var g=this.container.querySelector(".template-customizer-directions");if(this._hasControls("rtl")&&rtlSupport){var b=g.querySelector(".template-customizer-directions-options");this.settings.availableDirections.forEach((function(t){var e=i(t.name,t.title,"directionRadioIcon",w.contains("dark-style"));b.appendChild(e)})),b.querySelector('input[value="'.concat(this.settings.rtl?"rtl":"ltr",'"]')).setAttribute("checked","checked");var _=function(e){t._loadingState(!0),t._setSetting("Lang",t.settings.lang),"ar"===t._getSetting("Lang")?t._setSetting("Lang","en"):t._setSetting("Lang","ar"),t.setRtl("rtl"===e.target.value,!0,(function(){t._loadingState(!1)}))};b.addEventListener("change",_),this._listeners.push([b,"change",_])}else g.parentNode.removeChild(g);var x=this.container.querySelector(".template-customizer-headerOptions"),S=document.documentElement.getAttribute("data-template").split("-");if(this._hasControls("headerType")){var z=x.querySelector(".template-customizer-header-options");setTimeout((function(){S.includes("vertical")&&x.parentNode.removeChild(x)}),100),this.settings.availableHeaderTypes.forEach((function(t){var e=i(t.name,t.title,"headerRadioIcon",w.contains("dark-style"),"horizontal-".concat(t.name));z.appendChild(e)})),z.querySelector('input[value="'.concat(this.settings.headerType,'"]')).setAttribute("checked","checked");var k=function(e){t.setLayoutType(e.target.value)};z.addEventListener("change",k),this._listeners.push([z,"change",k])}else x.parentNode.removeChild(x);var C=this.container.querySelector(".template-customizer-content");if(this._hasControls("contentLayout")){var T=C.querySelector(".template-customizer-content-options");this.settings.availableContentLayouts.forEach((function(t){var e=i(t.name,t.title,"contentRadioIcon",w.contains("dark-style"));T.appendChild(e)})),T.querySelector('input[value="'.concat(this.settings.contentLayout,'"]')).setAttribute("checked","checked");var L=function(e){t._loading=!0,t._loadingState(!0,!0),t.setContentLayout(e.target.value,!0,(function(){t._loading=!1,t._loadingState(!1,!0)}))};T.addEventListener("change",L),this._listeners.push([T,"change",L])}else C.parentNode.removeChild(C);var N=this.container.querySelector(".template-customizer-layouts");if(this._hasControls("layoutCollapsed")){setTimeout((function(){document.querySelector(".layout-menu-horizontal")&&N.parentNode.removeChild(N)}),100);var A=N.querySelector(".template-customizer-layouts-options");this.settings.availableLayouts.forEach((function(t){var e=i(t.name,t.title,"layoutsRadios",w.contains("dark-style"));A.appendChild(e)})),A.querySelector('input[value="'.concat(this.settings.layoutCollapsed?"collapsed":"expanded",'"]')).setAttribute("checked","checked");var O=function(e){window.Helpers.setCollapsed("collapsed"===e.target.value,!0),t._setSetting("LayoutCollapsed","collapsed"===e.target.value)};A.addEventListener("change",O),this._listeners.push([A,"change",O])}else N.parentNode.removeChild(N);var E=this.container.querySelector(".template-customizer-layoutNavbarOptions");if(this._hasControls("layoutNavbarOptions")){setTimeout((function(){S.includes("horizontal")&&E.parentNode.removeChild(E)}),100);var I=E.querySelector(".template-customizer-navbar-options");this.settings.availableNavbarOptions.forEach((function(t){var e=i(t.name,t.title,"navbarOptionRadios",w.contains("dark-style"));I.appendChild(e)})),I.querySelector('input[value="'.concat(this.settings.layoutNavbarOptions,'"]')).setAttribute("checked","checked");var F=function(e){t._loading=!0,t._loadingState(!0,!0),t.setLayoutNavbarOption(e.target.value,!0,(function(){t._loading=!1,t._loadingState(!1,!0)}))};I.addEventListener("change",F),this._listeners.push([I,"change",F])}else E.parentNode.removeChild(E)}else v.parentNode.removeChild(v);setTimeout((function(){var e=t.container.querySelector(".template-customizer-layout");document.querySelector(".menu-vertical")?t._hasControls("rtl contentLayout layoutCollapsed layoutNavbarOptions",!0)||e&&e.parentNode.removeChild(e):document.querySelector(".menu-horizontal")&&(t._hasControls("rtl contentLayout headerType",!0)||e&&e.parentNode.removeChild(e))}),100),this.setLang(this.settings.lang,!1,!0),e===document?e.body?e.body.appendChild(this.container):window.addEventListener("DOMContentLoaded",(function(){return e.body.appendChild(t.container)})):e.appendChild(this.container)}},{key:"_initDirection",value:function(){this._hasControls("rtl")&&document.documentElement.setAttribute("dir",this.settings.rtl?"rtl":"ltr")}},{key:"_initStyle",value:function(){if(this._hasControls("style")){var t=this.settings.style;this._insertStylesheet("template-customizer-core-css",this.pathResolver(this.settings.cssPath+this.settings.cssFilenamePattern.replace("%name%","core".concat("light"!==t?"-".concat(t):"")))),("light"===t?["dark-style"]:["light-style"]).forEach((function(t){document.documentElement.classList.remove(t)})),document.documentElement.classList.add("".concat(t,"-style"))}}},{key:"_initTheme",value:function(){if(this._hasControls("themes"))this._insertStylesheet("template-customizer-theme-css",this.pathResolver(this.settings.themesPath+this.settings.cssFilenamePattern.replace("%name%",this.settings.theme.name+("light"!==this.settings.style?"-".concat(this.settings.style):""))));else{var t=this._getSetting("Theme");this._insertStylesheet("template-customizer-theme-css",this.pathResolver(this.settings.themesPath+this.settings.cssFilenamePattern.replace("%name%",t||this.settings.defaultTheme.name+("light"!==this.settings.style?"-".concat(this.settings.style):""))))}}},{key:"_insertStylesheet",value:function(t,e){var i=document.querySelector(".".concat(t));if("number"==typeof document.documentMode&&document.documentMode<11){if(!i)return;if(e===i.getAttribute("href"))return;var s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.className=t,s.setAttribute("href",e),i.parentNode.insertBefore(s,i.nextSibling)}else document.write(''));i&&i.parentNode.removeChild(i)}},{key:"_loadStylesheets",value:function(t,e){var i=Object.keys(t),s=i.length,a=0;function n(t,e,i){var s=document.createElement("link");s.setAttribute("href",t),s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.className=e.className;var a,n="sheet"in s?"sheet":"styleSheet",o="sheet"in s?"cssRules":"rules",r=setTimeout((function(){clearInterval(a),clearTimeout(r),e.parentNode.removeChild(s),i(!1,t)}),15e3);a=setInterval((function(){try{s[n]&&s[n][o].length&&(clearInterval(a),clearTimeout(r),e.parentNode.removeChild(e),i(!0))}catch(t){}}),10),e.parentNode.insertBefore(s,e.nextSibling)}for(var o=0;o=s&&e()))}},{key:"_loadingState",value:function(t,e){this.container.classList[t?"add":"remove"]("template-customizer-loading".concat(e?"-theme":""))}},{key:"_getElementFromString",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}},{key:"_getSetting",value:function(t){var e=null,i=this._getLayoutName();try{e=localStorage.getItem("templateCustomizer-".concat(i,"--").concat(t))}catch(t){}return String(e||"")}},{key:"_showResetBtnNotification",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];setTimeout((function(){var i=t.container.querySelector(".template-customizer-reset-btn .badge");e?i.classList.remove("d-none"):i.classList.add("d-none")}),200)}},{key:"_setSetting",value:function(t,e){var i=this._getLayoutName();try{localStorage.setItem("templateCustomizer-".concat(i,"--").concat(t),String(e)),this._showResetBtnNotification()}catch(t){}}},{key:"_getLayoutName",value:function(){return document.getElementsByTagName("HTML")[0].getAttribute("data-template")}},{key:"_removeListeners",value:function(){for(var t=0,e=this._listeners.length;t1&&void 0!==arguments[1]&&arguments[1];return t.split(" ").reduce((function(t,s){return-1!==e.settings.controls.indexOf(s)?(i||!1!==t)&&(t=!0):i&&!0===t||(t=!1),t}),null)}},{key:"_getDefaultTheme",value:function(t){var e;if(!(e="string"==typeof t?this._getThemeByName(t,!1):this.settings.availableThemes[t]))throw new Error('Theme ID "'.concat(t,'" not found!'));return e}},{key:"_getThemeByName",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.settings.availableThemes,s=0,a=i.length;s