1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[17399,57477,67737],{68(e,t,o){o.d(t,{A:()=>n});class n{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,o);return this._sendRequest(n,null,t)}post(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("POST",e,n);return this._sendRequest(i,t,o)}delete(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(i,t,o)}patch(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(i,t,o)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,o){return this._registerOnLoaded(e,o),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,o){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),o&&this._request.setRequestHeader("Content-type",o),this._request}}},156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==o},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r(Array.isArray(e)?[]:{},e,t):e}function i(e,t,o){return e.concat(t).map(function(e){return n(e,o)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function r(e,o,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var d,c,h=Array.isArray(o);return h!==Array.isArray(e)?n(o,l):h?l.arrayMerge(e,o,l):(c={},(d=l).isMergeableObject(e)&&s(e).forEach(function(t){c[t]=n(e[t],d)}),s(o).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&d.isMergeableObject(o[t])?c[t]=(function(e,t){if(!t.customMerge)return r;var o=t.customMerge(e);return"function"==typeof o?o:r})(t,d)(e[t],o[t],d):c[t]=n(o[t],d))}),c)}r.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,o){return r(e,o,t)},{})},e.exports=r},399(e,t,o){o.r(t),o.d(t,{default:()=>p});var n=o(156),i=o.n(n),s=o(68),a=o(477);let r="loader",l={BEFORE:"before",INNER:"inner"};class d{constructor(e,t=l.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===l.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=d.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),d.getTemplate())}}remove(){if(this.position===l.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${r}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${r}`).length>0}_getPosition(){return this.position===l.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${r}" role="status"> 2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return r}}var c=o(592);let h=Object.freeze(new class extends d{constructor(){super(document.body)}create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(c.Ay.create(),document.querySelector(`.${c.Ay.SELECTOR_CLASS()}`).insertAdjacentHTML("beforeend",d.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&c.Ay.remove()}});class u{static create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];h.create(e)}static remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];h.remove(e)}}class p extends a.default{static #e=this.options=i()(a.default.options,{componentPosition:"",switchCountryIdParamName:"switch-country-id",switchDoneParamName:"switch-done"});init(){this._client=new s.A(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType?(document.addEventListener("updateShopSwitchHeader",()=>{"top-bar"===this.options.componentPosition&&(this.removeHeaderTopBar(),this.requestHeaderTopBar())},{once:!0}),"top-bar"===this.options.componentPosition&&this.requestHeaderTopBar()):(this.initHeader(),document.addEventListener("updateShopSwitchHeader",e=>{this.updateActiveCountry(e.detail.countryName,e.detail.countryIso.toLowerCase())},{once:!0}))}requestHeaderTopBar(){let e={};this.options.componentPosition&&(e.componentPosition="top-bar"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderTopBar.bind(this))}removeHeaderTopBar(){let e=document.getElementById("dirtysox-shop-switch-header-ajax-top-bar");e&&(e.innerHTML="")}insertHeaderTopBar(e){let t=document.getElementById("dirtysox-shop-switch-header-ajax-top-bar");if(t){let o=new DOMParser().parseFromString(e,"text/html");t.innerHTML=o.body.innerHTML,this.initHeader()}}requestHeaderOffcanvas(){let e={};this.options.componentPosition&&(e.componentPosition="offcanvas"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderOffcanvas.bind(this))}removeHeaderOffCanvas(){let e=document.getElementById("dirtysox-shop-switch-header-ajax-offcanvas");e&&(e.innerHTML="")}insertHeaderOffcanvas(e){let t=document.getElementById("dirtysox-shop-switch-header-ajax-offcanvas");if(t){let o=new DOMParser().parseFromString(e,"text/html");t.innerHTML=o.body.innerHTML,this.initHeader()}}initHeader(){"ajax"===this.options.integrationType?this.headerContainer=document.getElementById("dirtysox-shop-switch-header-ajax-top-bar"):this.headerContainer=document.getElementById("dirtysox-shop-switch-header-direct-top-bar"),this.activeHeaderSpan=document.getElementById("shop-switch-header-active-country-name-top-bar"),this.activeHeaderFlag=document.getElementById("shop-switch-header-active-country-flag-top-bar"),this.activeHeaderSpansOffcanvas=document.querySelectorAll(".offcanvas-nav-text"),this.headerContainer&&"top-bar"===this.options.componentPosition?(this.options.currentDomainUrl=this.headerContainer.dataset.currentdomainurl,this.options.modalCloseType=this.headerContainer.dataset.currentmodalclosetype,this.options.externalDomains=this.collectExternalDomains(this.headerContainer.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.externalDomains=""),this.headerContainer&&"top-bar"===this.options.componentPosition&&this.headerContainer.addEventListener("click",this._onChangeCountrySelectHeader.bind(this),!0)}_getDataAttr(e,t){if(e)for(let o of[t,t.toLowerCase(),t.replace(/([A-Z])/g,"-$1").toLowerCase(),t.replace(/([A-Z])/g,e=>
3e.toLowerCase())]){let t=o.split("-").map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join("");if(e.dataset&&Object.prototype.hasOwnProperty.call(e.dataset,t))return e.dataset[t];if(e.hasAttribute("data-"+o))return e.getAttribute("data-"+o)}}_onChangeCountrySelectHeader(e){let t=e.target,o=t.closest&&t.closest(".top-bar-list-item button.dropdown-item"),n="INPUT"===t.nodeName?t:null;if(o)this.selectedElement=o;else{if(!n)return;this.selectedElement=n}this.selectedElement.dataset;let i=this._getDataAttr(this.selectedElement,"domainCountryPosition"),s=this._getDataAttr(this.selectedElement,"domainurls");if(i===this.options.componentPosition&&s){let t;e.preventDefault(),e.stopPropagation();try{t=JSON.parse(s)}catch(e){t=[this.selectedElement.value||""]}let o=t[0]||"",n=this.getSelectedCountryId();this.updateShippingCountry(n,o)}}getSelectedCountryId(){if(this.selectedElement)return this._getDataAttr(this.selectedElement,"countryid")}updateShippingCountry(e,t){this.selectedElement&&(u.create(),this.setRedirectInHeader(t,this.options.currentDomainUrl,this.getSelectedCountryId()))}updateActiveCountry(e,t){if(this.activeHeaderSpan&&e&&(this.activeHeaderSpan.textContent=e),this.activeHeaderFlag&&t){let e=this.activeHeaderFlag.classList,o="";for(let t=0;t<e.length;t++)if(e[t].startsWith("country-")){o=e[t].split("-")[1];break}o&&o!==t?(e.replace("country-"+o,"country-"+t),e.replace("language-"+o,"language-"+t)):o||(e.contains("country-"+t)||e.add("country-"+t),e.contains("language-"+t)||e.add("language-"+t))}}setRedirectInHeader(e,t,o){e&&(e=this.addSetCountryId(e,o),window.location.replace(e))}collectExternalDomains(e){if(e)try{return JSON.parse(e)}catch(e){}return[]}}},477(e,t,o){o.r(t),o.d(t,{default:()=>c});var n=o(68),i=o(795);class s{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,o){if(null==e)throw Error("You must specify a key to set a cookie");let n=new Date;n.setTime(n.getTime()+864e5*o);let i="";"https:"===location.protocol&&(i="secure"),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/;sameSite=lax;${i}`}static getItem(e){if(!e)return!1;let t=e+"=",o=document.cookie.split(";");for(let e=0;e<o.length;e++){let n=o[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return!1}static removeItem(e){document.cookie=`${e}= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/`}static key(){return""}static clear(){}}var a=o(592);let r="js-pseudo-modal",l="js-pseudo-modal-template-root-element";class d{constructor(e,t=!0,o=".js-pseudo-modal-template",n=".js-pseudo-modal-template-content-element",i=".js-pseudo-modal-template-title-element"){this._content=e,this._useBackdrop=t,this._templateSelector=o,this._templateContentSelector=n,this._templateTitleSelector=i}open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.Kq;this._hideExistingModal(),this._create(),setTimeout(this._open.bind(this,e),t)}close(){let e=this.getModal();this._modalInstance=bootstrap.Modal.getInstance(e),this._modalInstance.hide()}getModal(){return this._modal||this._create(),this._modal}updatePosition(){this._modalInstance.handleUpdate()}updateContent(e,t){this._content=e,this._setModalContent(e),this.updatePosition(),"function"==typeof t&&t.bind(this)()}_hideExistingModal(){try{let e=document.querySelector(`.${r} .modal`);if(!e)return;let t=bootstrap.Modal.getInstance(e);if(!t)return;t.hide(),window.focusHandler._removeFocusTrapGuard()}catch(e){console.warn(`[PseudoModalUtil] Unable to hide existing pseudo modal before opening pseudo modal: ${e.message}`)}}_open(e){this.getModal(),this._modal.addEventListener("hidden.bs.modal",this._modalWrapper.remove),this._modal.addEventListener("shown.bs.modal",e),this._modal.addEventListener("hidden.bs.modal",()=>window.focusHandler._removeFocusTrapGuard()),this._modal.addEventListener("hide.bs.modal",()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}),this._modalInstance.show(),window.focusHandler._addFocusTrapGuard(this._modalWrapper)}_create(){this._modalMarkupEl=document.querySelector(this._templateSelector),this._createModalWrapper(),this._modalWrapper.innerHTML=this._content,this._modal=this._createModalMar
3kup(),this._modalInstance=new bootstrap.Modal(this._modal,{backdrop:this._useBackdrop}),document.body.insertAdjacentElement("beforeend",this._modalWrapper)}_createModalWrapper(){this._modalWrapper=document.querySelector(`.${r}`),this._modalWrapper||(this._modalWrapper=document.createElement("div"),this._modalWrapper.classList.add(r))}_createModalMarkup(){let e=this._modalWrapper.querySelector(".modal");if(e)return e;let t=this._modalWrapper.innerHTML;return this._modalWrapper.innerHTML=this._modalMarkupEl.innerHTML,this._setModalContent(t),this._modalWrapper.querySelector(".modal")}_setModalTitle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{this._modalWrapper.querySelector(this._templateTitleSelector).innerHTML=e}catch(e){}}_setModalContent(e){let t=this._modalWrapper.querySelector(this._templateContentSelector);t.innerHTML=e;let o=t.querySelector(`.${l}`);if(o){this._modalWrapper.querySelector(`.${l}`).replaceChildren(o);return}try{let e=t.querySelector(this._templateTitleSelector);e&&(this._setModalTitle(e.innerHTML),e.parentNode.removeChild(e))}catch(e){}}}class c extends window.PluginBaseClass{static #e=this.options={cookieName:"dirtysox_shop_switch_checked",url:"",modalClass:"dirtysox-shop-switch-modal",modalContentContainerSelector:".dirtysox-shop-switch-modal-content",submitButtonSelector:".dirtysox-shop-switch-submit-btn",countrySelectSelector:".dirtysox-shop-switch-country-select",languageSelectSelector:".dirtysox-shop-switch-language-select",modalCloseButtonSelector:".only-close",directRedirectLinkSelector:".dirtysox-shop-switch-direct-url",backdropSelector:".modal-backdrop",saveConfigurationUrl:"",modalCloseType:"only_close",currentDomainUrl:"",switchCountryIdParamName:"switch-country-id",switchDoneParamName:"switch-done",externalDomains:[],integrationType:"direct",currentDomainId:"",reloadPage:"",routeParams:[],route:"",loadImmediately:!0,modalId:"dirtysoxShopSwitchModal"};init(){(this._client=new n.A(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType)?!1===this.isCookieSet(this.options.currentDomainId,this.options.cookieName)&&this.checkShopSwitchByAjaxRequest():(this.modal=this.el,this.initModal(),!1!==this.options.loadImmediately&&this.openModal())}isCookieSet(e,t){let o=s.getItem(t);return o&&-1!==o.indexOf(e)}checkShopSwitchByAjaxRequest(){this._client.get(this.options.url+"?uri="+encodeURIComponent(window.location.pathname+window.location.search)+"&route="+encodeURI(this.options.route)+"&route-params="+encodeURI(this.options.routeParams),this._onAfterGetAjaxResponse.bind(this))}_onAfterGetAjaxResponse(e){let t=this.getValidJson(e);if(!1!==t){!0===t.success&&t.redirectTo?this.setRedirect(t.redirectTo,t.currentUrl,t.countryId):!0===t.success&&!1!==t.rememberStayOnPage&&this.saveConfiguration();return}this.removeModalLoadedWithoutAjax();let o=new DOMParser().parseFromString(e,"text/html");this.backdropSettings=this.setBackdropSettings(o);let n=new d(e,this.backdropSettings);n.open(()=>{window.PluginManager.initializePlugins().then(()=>{this.modal=i.A.querySelector(document,"."+this.options.modalClass,!1),this.initModal()})});let s=n.getModal();this.options.modalClass&&s.classList.add(this.options.modalClass),this.modal=s}saveConfiguration(){this.saveConfigurationByAjaxRequest(this.options.reloadPage)}saveConfigurationByAjaxRequest(e){let t={},o=this.getSelectedCountryId();o&&(t.selectedCountryId=o),this._client.post(this.options.saveConfigurationUrl,JSON.stringify(t),t=>{("1"===e||!0===e)&&location.reload()})}getBrowserLanguage(){return navigator.language||navigator.userLanguage}initModal(){this.modal&&(this._collectModalComponents(),this._registerModalEvents(),this.hideModalCloseButton(),this._registerBackdropCleanup())}_collectModalComponents(){this.modalContentContainer=i.A.querySelector(this.modal,this.options.modalContentContainerSelector,!1),this.modalButtonClose=i.A.querySelector(this.modal,this.options.modalCloseButtonSelector,!1),this.modalBackdrop=i.A.querySelector(document,this.options.backdropSelector,!1),this.modalContentContainer?(this.options.currentDomainUrl=this.modalContentContainer.dataset.currentdomainurl,this.options.modalCloseType=this.modalContentContainer.dataset.currentmodalclosetype,this.options.reloadPage=this.modalContentContainer.dataset.currentmodalreloadpage,this.options.externalDomains=this.collectExternalDomains(this.modalContentContainer.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.reloadPage="",this.options.externalDomains=""),this.submitButton=i.A.querySelector(this.modal,this.options.submitButtonSelector,!1),this.countrySelect=i.A.querySelector(this.modal,this.options.countrySelectSelector,!1),this.languageSelect=i.A.querySelector(this.modal,this.options.languageSelectSelector,!1),this.countrySelect&&this.languageSelect&&this.onChangeCountrySelect()}_registerModalEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.onSubmitSelection.bind(this)),this.countrySelect&&this.languageSelect&&this.countrySelect.addEventListener("change",this.onChangeCountrySelect.bind(this)),"close_and_switch"===this.options.modalCloseType?(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onSubmitSelection.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this))):"close_and_remember"===this.options.modalCloseType&&(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onStayCurrentDomain.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this)))}hideModalCloseButton(){if("disabled"===this.options.modalCloseType){let e=i.A.querySelector(this.modal,this.options.modalCloseButtonSelector,!1);e&&e.remove()}}openModal(){void 0!==this.modal&&("disabled"===this.options.modalCloseType?new bootstrap.Modal(this.modal,{backdrop:"static",keyboard:!1}).show():new bootstrap.Modal(this.modal).show(),setTimeout(()=>{let e=i.A.querySelector(document,".dirtysox-cookie-consent.is--modal",!1);e&&(this._backdropCountBeforeShopSwitch=document.querySelectorAll(this.options.backdropSelector).length,e.style.display="none")},500))}onChangeCountrySelect(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getCountryIsoOfElement(this.countrySelect),o=0,n=!1;for(var i=0;i<this.languageSelect.children.length;i+=1){let s=JSON.parse(this.languageSelect.children[i].dataset.domainurls),a=this.languageSelect.children[i];if(""===this.getMatchOfArrays(e,s)){if(a.disabled=!0,a.style.display="none",a.selected=!1,!0===this.isSafari()){let e=document.createElement("span");e.textContent=a.textContent,e.dataset.value=a.value,e.dataset.domainurls=a.dataset.domainurls,e.dataset.languageiso=a.dataset.languageiso,a.parentNode.replaceChild(e,a)}}else if(o||(o=i),a.disabled=!1,a.style.display="block",!1===n&&(!this.languageSelect.value||a.dataset.languageiso.includes(t))&&(n=!0,a.selected=!0),"SPAN"===a.nodeName){let e=document.createElement("option");e.textContent=a.textContent,e.dataset.value=a.value,e.dataset.domainurls=a.dataset.domainurls,e.dataset.languageiso=a.dataset.languageiso,a.parentNode.replaceChild(e,a)}}this.languageSelect.value||(this.languageSelect.children[o].selected=!0)}onSubmitSelection(){let e=this.getMatchingDomain();if(this.options.currentDomainUrl===e){this.closeModal(),this.saveConfiguration();return}
3this.setRedirect(e,this.options.currentDomainUrl,this.getSelectedCountryId())}onStayCurrentDomain(){this.closeModal(),this.saveConfiguration()}onClickOutsideModal(e){e.target.closest("div.modal-dialog")||("close_and_switch"===this.options.modalCloseType?this.onSubmitSelection():"close_and_remember"===this.options.modalCloseType&&this.onStayCurrentDomain())}getMatchingDomain(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getDomainUrlsOfElement(this.languageSelect);return e&&e.length>0&&t&&t.length>0?this.getMatchOfArrays(e,t):e&&e.length>0?e[0]:t&&t.length>0?t[0]:""}getDomainUrlsOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return JSON.parse(t.dataset.domainurls)}return[]}getCountryIsoOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return t.dataset.countryiso}return[]}getMatchOfArrays(e,t){for(var o=0;o<e.length;o+=1)for(var n=0;n<t.length;n+=1)if(e[o]===t[n])return e[o];return""}setRedirect(e,t,o){e&&(e!==t?(e=this.addSetCountryId(e,o),window.location.replace(e)):this.saveConfiguration())}addSetCountryId(e,t){return e&&!0!==this.urlInExternalDomains(e)&&(e=e.includes("?")?e+"&"+this.options.switchDoneParamName+"=1":e+"?"+this.options.switchDoneParamName+"=1",t&&(e=e+"&"+this.options.switchCountryIdParamName+"="+t)),e}urlInExternalDomains(e){let t=this.options.externalDomains,o=!1;return t&&t.forEach(function(t){e===t&&(o=!0)}),o}_registerBackdropCleanup(){this.modal.addEventListener("hidden.bs.modal",()=>{let e=i.A.querySelector(document,".dirtysox-cookie-consent.is--modal",!1),t=document.querySelectorAll(this.options.backdropSelector);e&&this._backdropCountBeforeShopSwitch>=1?e.style.display="":(e&&(e.style.display=""),t.forEach(e=>e.remove()),document.body.classList.remove("modal-open"),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right"))})}closeModal(){bootstrap.Modal.getInstance(this.modal).hide()}getSelectedCountryId(){if(this.countrySelect&&this.countrySelect.options[this.countrySelect.selectedIndex]&&this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid)return this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid}getValidJson(e){let t="";try{t=JSON.parse(e)}catch(e){return!1}return t}setBackdropSettings(e){let t=i.A.querySelector(e,this.options.modalContentContainerSelector,!1);if(!t)return;let o=t.dataset.currentmodalclosetype;return!o||"disabled"!==o||"static"}collectExternalDomains(e){if(e)try{return JSON.parse(e)}catch(e){}return[]}removeModalLoadedWithoutAjax(){let e=i.A.querySelector(document,"#"+this.options.modalId,!1);e&&e.remove(),window.PluginManager.getPluginInstances("DirtysoxShopSwitch").forEach(e=>{e.modal=void 0})}isSafari(){let e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&!e.includes("android")}}},592(e,t,o){o.d(t,{Kq:()=>r,Ay:()=>h});class n{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return n.isIPhoneDevice()||n.isIPadDevice()}static isNativeWindowsBrowser(){return n.isIEBrowser()||n.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":n.isTouchDevice(),"is-ios":n.isIOSDevice(),"is-native-windows":n.isNativeWindowsBrowser(),"is-iphone":n.isIPhoneDevice(),"is-ipad":n.isIPadDevice(),"is-ie":n.isIEBrowser(),"is-edge":n.isEdgeBrowser()}}}let i="modal-backdrop",s="modal-backdrop-open",a="no-scroll",r=350,l={ON_CLICK:"backdrop/onclick"};class d{constructor(){return d.instance||(d.instance=this),d.instance}create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(a),setTimeout(function(){t.classList.add(s),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;
3this._getBackdrops().forEach(e=>e.classList.remove(s)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(a)}_dispatchEvents(){let e=n.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(i)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(`.${i}`)}_removeExistingBackdrops(){!1!==this._exists()&&this._getBackdrops().forEach(e=>e.remove())}_exists(){return document.querySelectorAll(`.${i}`).length>0}_getTemplate(){return`<div class="${i}"></div>`}}let c=Object.freeze(new d);class h{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;c.remove(e)}static SELECTOR_CLASS(){return i}}},707(e,t,o){o.d(t,{A:()=>n});class n{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let o=n.toUpperCamelCase(e,t);return n.lcFirst(o)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>n.ucFirst(e.toLowerCase())).join(""):n.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},737(e,t,o){o.r(t),o.d(t,{default:()=>d});var n=o(156),i=o.n(n),s=o(68),a=o(795),r=o(477),l=o(399);class d extends l.default{static #e=this.options=i()(r.default.options,{componentPosition:""});init(){this._client=new s.A(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType?(document.addEventListener("updateShopSwitchHeader",e=>{"offcanvas"===this.options.componentPosition&&(this.removeHeaderOffCanvas(),this.requestHeaderOffcanvas())},{once:!0}),"offcanvas"===this.options.componentPosition&&this.requestHeaderOffcanvas()):(this.initHeader(),document.addEventListener("updateShopSwitchHeader",e=>{this.updateActiveCountry(e.detail.countryName,e.detail.countryIso.toLowerCase())},{once:!0}))}requestHeaderOffcanvas(){let e={};this.options.componentPosition&&(e.componentPosition="offcanvas"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderOffcanvas.bind(this))}removeHeaderOffCanvas(){document.getElementById("dirtysox-shop-switch-header-ajax-offcanvas").innerHTML=""}insertHeaderOffcanvas(e){document.getElementById("dirtysox-shop-switch-header-ajax-offcanvas").innerHTML=e,this.initHeader()}initHeader(){this.headerContainerOffcanvas=a.A.querySelector(document,".top-bar-country-offcanvas"),this.activeHeaderSpansOffcanvas=document.querySelectorAll(".offcanvas-nav-text"),this.headerContainerOffcanvas&&"offcanvas"===this.options.componentPosition?(this.options.currentDomainUrl=this.headerContainerOffcanvas.dataset.currentdomainurl,this.options.modalCloseType=this.headerContainerOffcanvas.dataset.currentmodalclosetype,this.options.externalDomains=this.collectExternalDomains(this.headerContainerOffcanvas.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.externalDomains=""),this.headerContainerOffcanvas&&"offcanvas"===this.options.componentPosition&&this.headerContainerOffcanvas.addEventListener("click",this._onChangeCountrySelectHeader.bind(this),!0)}updateActiveCountry(e,t){for(let t=0;t<this.activeHeaderSpansOffcanvas.length;t++)this.activeHeaderSpansOffcanvas[t].innerHTML=e}}},795(e,t,o){o.d(t,{A:()=>i});var n=o(707);class i{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!i.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!1===i.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(o)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),a=n.A.toLowerCamelCase(s,"-");if(!i.isNode(e)){if(o)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(o)throw Error("This node doesn't support the dataset attribute!");return}let r=e.dataset[a];if(void 0===r){if(o)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return r}return n.A.parsePrimitive(r)}static querySelector(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(o&&!1===n)throw Error(`The required element "${t}" does not exist in parent node!`);return n}static querySelectorAll(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),o&&!1===n)throw Error(`At least one item of "${t}" must exist in parent node!`);return n}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=` 4 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 5 select:not([tabindex^="-"]):not([disabled]), 6 textarea:not([tabindex^="-"]):not([disabled]), 7 button:not([tabindex^="-"]):not([disabled]), 8 a[href]:not([tabindex^="-"]):not([disabled]),
9 [tabindex]:not([tabindex^="-"]):not([disabled]) 10 `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.