!function(){"use strict";var e={n:function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,{a:o}),o},d:function(t,o){for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,o=e.n(t),r=window.blocksyCustomizerSync;function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o *:not([id*="menu-item-"])');o.filter((function(e){var t=e.enabled,o=e.id;return!!t&&"menu"!==o})).map((function(e,o){if(l){var r=t[o];if(r){var a=r.querySelector("a");if("user_info"===e.id){var c=r.querySelector("small");if(c){var n=c.dataset,i=n.email,s=n.name,d=n.role;c.innerText=e.account_user_info_additional_fields.replace("{user_email}",i).replace("{user_name}",s).replace("{user_role}",d)}}"user_info"!==e.id&&a&&e.label&&(a.innerHTML=e.label)}}}))}}))}if("header_account_visibility"===t&&(0,r.updateAndSaveEl)(c,(function(e){return(0,r.responsiveClassesFor)(n(n({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||(0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){(0,r.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&((0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),(0,r.updateAndSaveEl)(c,(function(e){o.desktop||(o={desktop:o,mobile:o}),a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o.desktop}))}),{onlyView:"desktop"}),(0,r.updateAndSaveEl)(c,(function(e){o.desktop||(o={desktop:o,mobile:o}),a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o.mobile}))}),{onlyView:"mobile"})),"login_label"===t&&(0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||((0,r.updateAndSaveEl)(".ct-account-item",(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),(0,r.updateAndSaveEl)(".ct-account-item",(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"})),"account_close_button_type"===t){var i=document.querySelector("#account-modal .ct-toggle-close");setTimeout((function(){i.classList.add("ct-disable-transitions"),requestAnimationFrame((function(){i&&(i.dataset.type=o),setTimeout((function(){i.classList.remove("ct-disable-transitions")}))}))}),300)}if("dropdown_items_type"===t){var s=document.querySelector(c);if(s){var d=s.querySelector("ul[data-dropdown]");d&&(d.dataset.dropdown="boxed"===o?"type-1:boxed":"type-1")}}})),o().on("ct:header:sync:collect-variable-descriptors",(function(e){e.global=function(){return d(d(d({transparent_behaviour:{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)()),variable:"has-transparent-header",responsive:!0,extractValue:function(e){return{desktop:e.desktop?"var(--true)":"var(--false)",tablet:e.mobile?"var(--true)":"var(--false)",mobile:e.mobile?"var(--true)":"var(--false)"}},unit:""}},(0,r.handleBackgroundOptionFor)({id:"headerBackground",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)(),operation:"suffix",to_add:".ct-header"})),responsive:!0,forced_background_image:!0})),(0,r.handleBackgroundOptionFor)({id:"transparentHeaderBackground",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)(),operation:"suffix",to_add:"[data-transparent]"})),responsive:!0,forced_background_image:!0})),(0,r.handleBackgroundOptionFor)({id:"stickyHeaderBackground",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)(),operation:"suffix",to_add:'[data-sticky*="yes"]'})),responsive:!0,forced_background_image:!0}))}})),o().on("ct:header:sync:item:global",(function(e){var t=e.optionId,r=e.optionValue,a=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var c=a.has_sticky_header,l=a.sticky_rows,n=a.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===c&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(l[t]){var o=[];n.desktop&&o.push("desktop"),n.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),o().trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),r[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),o().trigger("blocksy:frontend:init")}))}}))}();