PageSourceSearch

https://store.particle.io/cdn/shop/t/200/assets/theme.min.js?v=98315594296556085361790171691

js particle.io collected 2026-09-24 08:25:45 UTC 194,951 bytes, 30 lines download raw bytes

1!function(e){"function"==typeof define&&define.amd?define("index",e):e()}(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function s(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(e,t):void 0}}(e))){var t=0,i=function(){};return{s:i,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s,a=!0,r=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){r=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(r)throw s}}}}var a={},r=function(){function e(){t(this,e)}return n(e,null,[{key:"slideUp",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"height";e.style[i]="".concat(e.scrollHeight,"px"),e.offsetHeight,e.style[i]=0,a[e.id]&&(e.removeEventListener("transitionend",a[e.id]),delete a[e.id]);e.addEventListener("transitionend",function i(n){"height"===n.propertyName&&(e.removeEventListener("transitionend",i),(t||function(){})())})}},{key:"slideDown",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"height";e.style[i]="".concat(e.scrollHeight,"px");var n=function n(o){if(o.propertyName===i){var s="auto";"max-height"===i&&(s="none"),e.style[i]=s,e.removeEventListener("transitionend",n),delete a[e.id],(t||function(){})()}};e.addEventListener("transitionend",n),a[e.id]=n}}]),e}(),l=function(){function e(){t(this,e)}return n(e,null,[{key:"getSiblings",value:function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[],o=e;o=o.previousElementSibling;)t&&!o.matches(t)||n.push(o);for(i&&n.push(e),o=e;o=o.nextElementSibling;)t&&!o.matches(t)||n.push(o);return n}}]),e}(),c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var d,u=h(function(e,t){function i(e){this.listenerMap=[{},{}],e&&this.root(e),this.handle=i.prototype.handle.bind(this),this._removedListeners=[]}function n(e,t){return e.toLowerCase()===t.tagName.toLowerCase()}function o(e,t){return this.rootElement===window?t===document||t===document.documentElement||t===window:this.rootElement===t}function s(e,t){return e===t.id}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i.prototype.root=function(e){var t,i=this.listenerMap;if(this.rootElement){for(t in i[1])i[1].hasOwnProperty(t)&&this.rootElement.removeEventListener(t,this.handle,!0);for(t in i[0])i[0].hasOwnProperty(t)&&this.rootElement.removeEventListener(t,this.handle,!1)}if(!e||!e.addEventListener)return this.rootElement&&delete this.rootElement,this;for(t in this.rootElement=e,i[1])i[1].hasOwnProperty(t)&&this.rootElement.addEventListener(t,this.handle,!0);for(t in i[0])i[0].hasOwnProperty(t)&&this.rootElement.addEventListener(t,this.handle,!1);return this},i.prototype.captureForType=function(e){return-1!==["blur","error","focus","load","resize","scroll"].indexOf(e)},i.prototype.on=function(e,t,i,a){var r,l,c,h;if(!e)throw new TypeError("Invalid event type: "+e);if("function"==typeof t&&(a=i,i=t,t=null),void 0===a&&(a=this.captureForType(e)),"function"!=typeof i)throw new TypeError("Handler must be a type of Function");return r=this.rootElement,(l=this.listenerMap[a?1:0])[e]||(r&&r.addEventListener(e,this.handle,a),l[e]=[]),t?/^[a-z]+$/i.test(t)?(h=t,c=n):/^#[a-z0-9\-_]+$/i.test(t)?(h=t.slice(1),c=s):(h=t,c=Element.prototype.matches):(h=null,c=o.bind(this)),l[e].push({selector:t,handler:i,matcher:c,matcherParam:h}),this},i.prototype.off=function(e,t,i,n){var o,s,a,r,l;if("function"==typeof t&&(n=i,i=t,t=null),void 0===n)return this.off(e,t,i,!0),this.off(e,t,i,!1),this;if(a=this.listenerMap[n?1:0],!e){for(l in a)a.hasOwnProperty(l)&&this.off(l,t,i);return this}if(!(r=a[e])||!r.length)return this;for(o=r.length-1;o>=0;o--)s=r[o],t&&t!==s.selector||i&&i!==s.handler||(this._removedListeners.push(s),r.splice(o,1));return r.length||(delete a[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,n)),this},i.prototype.handle=function(e){var t,i,n,o,s,a=e.type,r=[],l="ftLabsDelegateIgnore";if(!0!==e[l]){switch(3===(s=e.target).nodeType&&(s=s.parentNode),s.correspondingUseElement&&(s=s.correspondingUseElement),n=this.rootElement,e.eventPhase||(e.target!==e.currentTarget?3:2)){case 1:r=this.listenerMap[1][a];break;case 2:this.listenerMap[0]&&this.listenerMap[0][a]&&(r=r.concat(this.listenerMap[0][a])),this.listenerMap[1]&&this.listenerMap[1][a]&&(r=r.concat(this.listenerMap[1][a]));break;case 3:r=this.listenerMap[0][a]}var c,h=[];for(i=r.length;s&&i;){for(t=0;t<i&&(o=r[t]);t++)s.tagName&&["button","input","select","textarea"].indexOf(s.tagName.toLowerCase())>-1&&s.hasAttribute("disabled")?h=[]:o.matcher.call(s,o.matcherParam,s
1)&&h.push([e,s,o]);if(s===n)break;if(i=r.length,(s=s.parentElement||s.parentNode)instanceof HTMLDocument)break}for(t=0;t<h.length;t++)if(!(this._removedListeners.indexOf(h[t][2])>-1)&&!1===this.fire.apply(this,h[t])){h[t][0][l]=!0,h[t][0].preventDefault(),c=!1;break}return c}},i.prototype.fire=function(e,t,i){return i.handler.call(t,e,t)},i.prototype.destroy=function(){this.off(),this.root()};var a=i;t.default=a,e.exports=t.default}),p=(d=u)&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,m=function(){function e(){t(this,e),this.domDelegate=new p(document.body),this._attachListeners()}return n(e,[{key:"_attachListeners",value:function(){this.domDelegate.on("click",'[data-action="toggle-collapsible"]:not([disabled])',this._toggleCollapsible.bind(this)),document.addEventListener("collapsible:toggle",this._toggleCollapsible.bind(this))}},{key:"_toggleCollapsible",value:function(e,t){var i=this;!t&&e.detail&&(t=document.querySelector('[aria-controls="'.concat(e.detail.id,'"]')));var n="true"===t.getAttribute("aria-expanded"),o=t.parentNode;n?this._close(o):this._open(o),"false"!==t.getAttribute("data-close-siblings")&&l.getSiblings(o).forEach(function(e){return i._close(e)})}},{key:"_open",value:function(e){var t=e.querySelector("[aria-controls]");if(t&&"true"!==t.getAttribute("aria-expanded")){var i=e.querySelector("#".concat(t.getAttribute("aria-controls")));t.setAttribute("aria-expanded","true"),i.hasAttribute("aria-hidden")&&i.setAttribute("aria-hidden","false"),r.slideDown(i,function(){t.hasAttribute("data-collapsible-force-overflow")&&(i.style.overflow="visible");var e=i.querySelector("[autofocus]");e&&e.focus()})}}},{key:"_close",value:function(e){var t=e.querySelector("[aria-controls]");if(t&&"false"!==t.getAttribute("aria-expanded")){var i=e.querySelector("#".concat(t.getAttribute("aria-controls")));t.hasAttribute("data-collapsible-force-overflow")&&(i.style.overflow="hidden"),i.hasAttribute("aria-hidden")&&i.setAttribute("aria-hidden","true"),t.setAttribute("aria-expanded","false"),r.slideUp(i)}}}]),e}(),f=function(){function e(i,n){t(this,e),this.countrySelect=i,this.provinceSelect=n,this.countrySelect&&this.provinceSelect&&(this._attachListeners(),this._initSelectors())}return n(e,[{key:"destroy",value:function(){this.countrySelect&&this.countrySelect.removeEventListener("change",this._onCountryChangedListener)}},{key:"_initSelectors",value:function(){var e=this.countrySelect.getAttribute("data-default");if(e){for(var t=0;t!==this.countrySelect.options.length;++t)if(this.countrySelect.options[t].text===e){this.countrySelect.selectedIndex=t;break}}else this.countrySelect.selectedIndex=0;var i=new Event("change",{bubbles:!0});this.countrySelect.dispatchEvent(i);var n=this.provinceSelect.getAttribute("data-default");n&&(this.provinceSelect.value=n)}},{key:"_attachListeners",value:function(){this._onCountryChangedListener=this._onCountryChanged.bind(this),this.countrySelect.addEventListener("change",this._onCountryChangedListener)}},{key:"_onCountryChanged",value:function(){var e=this,t=this.countrySelect.options[this.countrySelect.selectedIndex];if(t){var i=JSON.parse(t.getAttribute("data-provinces")||"[]");this.provinceSelect.innerHTML="",0!==i.length?(i.forEach(function(t){e.provinceSelect.options.add(new Option(t[1],t[0]))}),this.provinceSelect.closest(".form__input-wrapper").style.display="block"):this.provinceSelect.closest(".form__input-wrapper").style.display="none"}}}]),e}(),v=function(){function e(){t(this,e)}return n(e,null,[{key:"matchesBreakpoint",value:function(e){switch(e){case"phone":return window.matchMedia("screen and (max-width: 640px)").matches;case"tablet":return window.matchMedia("screen and (min-width: 641px) and (max-width: 1023px)").matches;case"tablet-and-up":return window.matchMedia("screen and (min-width: 641px)").matches;case"pocket":return window.matchMedia("screen and (max-width: 1023px)").matches;case"lap":return window.matchMedia("screen and (min-width: 1024px) and (max-width: 1279px)").matches;case"lap-and-up":return window.matchMedia("screen and (min-width: 1024px)").matches;
1case"desk":return window.matchMedia("screen and (min-width: 1280px)").matches;case"widescreen":return window.matchMedia("screen and (min-width: 1440px)").matches;case"supports-hover":return window.matchMedia("(hover: hover) and (pointer: fine)").matches}}},{key:"getCurrentBreakpoint",value:function(){return window.matchMedia("screen and (max-width: 640px)").matches?"phone":window.matchMedia("screen and (min-width: 641px) and (max-width: 1023px)").matches?"tablet":window.matchMedia("screen and (min-width: 1024px) and (max-width: 1279px)").matches?"lap":window.matchMedia("screen and (min-width: 1280px)").matches?"desk":void 0}}]),e}(),g=function(){function e(i,n,o){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.delegateRoot=new p(document.documentElement),this.useInlineNavigation="inline"===n,this.isNavigationVisible=this.useInlineNavigation,this.openTrigger=o,v.matchesBreakpoint("supports-hover")||(this.openTrigger="click"),this.openItems=[],this.dropdownActivationTimeouts={},this.dropdownDeactivationTimeouts={},this.DROPDOWN_TIMEOUT=100,this._attachListeners(),this.useInlineNavigation&&this._setupInlineNavigation()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off(),this.delegateRoot.off()}},{key:"onBlockSelect",value:function(e){var t=this;this.useInlineNavigation||this._openNavigation(),l.getSiblings(e.target.parentNode,".is-dropdown-open").forEach(function(i){t._deactivateDropdown(e,i.querySelector('[data-type="menuitem"][aria-haspopup]'))}),this._activateDropdown(e,e.target.previousElementSibling)}},{key:"onBlockDeselect",value:function(e){this.useInlineNavigation||this._closeNavigation(),this._deactivateDropdown(e,e.target.parentNode)}},{key:"_attachListeners",value:function(){this.delegateElement.on("focusout",this._onFocusOut.bind(this)),this.delegateRoot.on("click",this._onClick.bind(this)),this.delegateElement.on("click",'[data-action="toggle-menu"]',this._toggleNavigation.bind(this)),"hover"===this.openTrigger?(this.delegateElement.on("focusin",'[data-type="menuitem"][aria-haspopup]',this._activateDropdown.bind(this)),this.delegateElement.on("mouseover",'[data-type="menuitem"][aria-haspopup]',this._activateDropdown.bind(this)),this.delegateElement.on("mouseover",'[data-type="menu"][aria-hidden="false"]',this._blockDropdownDeactivation.bind(this)),this.delegateElement.on("focusout",".is-dropdown-open",this._deactivateDropdown.bind(this)),this.delegateElement.on("mouseout",".is-dropdown-open",this._deactivateDropdown.bind(this))):this.delegateElement.on("click",'[data-type="menuitem"][aria-haspopup]',this._toggleDropdown.bind(this))}},{key:"_onFocusOut",value:function(e){null===e.relatedTarget||this.element.contains(e.relatedTarget)||this._closeNavigation()}},{key:"_onClick",value:function(e){this.element.contains(e.target)||this._closeNavigation()}},{key:"_openNavigation",value:function(){this.useInlineNavigation||(this.element.querySelector('[data-action="toggle-menu"]').setAttribute("aria-expanded","true"),this.element.querySelector('[data-type="menu"]').setAttribute("aria-hidden","false"),this.isNavigationVisible=!0)}},{key:"_closeNavigation",value:function(){var e=this;(this.useInlineNavigation||(this.element.querySelector('[data-action="toggle-menu"]').setAttribute("aria-expanded","false"),this.element.querySelector('[data-type="menu"]').setAttribute("aria-hidden","true")),this.isNavigationVisible=!1,"click"===this.openTrigger)&&this.openItems.slice(0).forEach(function(t){e._deactivateDropdown(event,t)})}},{key:"_toggleNavigation",value:function(e){this.isNavigationVisible?this._closeNavigation():this._openNavigation()}},{key:"_toggleDropdown",value:function(e,t){"false"===t.getAttribute("aria-expanded")&&e.preventDefault(),"true"===t.getAttribute("aria-expanded")?"#"===t.getAttribute("href")&&(e.preventDefault(),this._deactivateDropdown(e,t.closest(".is-dropdown-open"))):this._activateDropdown(e,t)}},{key:"_activateDropdown",value:function(e,t){var i=this;"click"===this.openTrigger&&this.openItems.slice(0).forEach(function(n){n.contains(t)||i._deactivateDropdown(e,n)});var n=l.getSiblings(t,"[aria-hidden]")[0],o=function(){if(t.setAttribute("aria-expanded","true"),t.parentNode.classList.add("is-dropdown-open"),n.setAttribute("aria-hidden","false"),"hover"===i.openTrigger&&i.dropdownDeactivationTimeouts[n.id]&&(clearTimeout(i.dropdownDeactivationTimeouts[n.id]),delete i.dropdownDeactivationTimeouts[n.id]),i.useInlineNavigation){var e=window.innerWidth,o=!1;n.querySelectorAll(".nav-dropdown").forEach(function(t){t.getBoundingClientRect().right>e&&(o=!0)}),o&&n.classList.add("nav-dropdown--inverse")}t.closest('[data-type="menu"]').classList.add("nav-dropdown--glued"),n.classList.contains("mega-menu")&&i._setupMegaMenu(n),"click"===i.openTrigger&&i.openItems.push(t.parentNode)};if("click"===this.openTrigger)o();else{for(var s in this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(s)&&(clearTimeout(this.dropdownActivationTimeouts[s]),delete this.dropdownActivationTimeouts[s]);o()}}},{key:"_deactivateDropdown",value:function(e,t){var i=this;if("hover"!==this.openTrigger||!t.contains(e.relatedTarget)){var n=t.querySelector("[aria-hidden]"),o=function(){if(t.classList.remove("is-dropdown-open"),t.querySelector('[data-type="menuitem"]').setAttribute("aria-expanded","fal
1se"),t.querySelector("[aria-hidden]").setAttribute("aria-hidden","true"),t.closest('[data-type="menu"]').classList.remove("nav-dropdown--glued"),"click"===i.openTrigger){t.querySelectorAll(".is-dropdown-open").forEach(function(t){i._deactivateDropdown(e,t);var n=i.openItems.indexOf(t);n>-1&&i.openItems.splice(n,1)});var n=i.openItems.indexOf(t);n>-1&&i.openItems.splice(n,1)}};"click"===this.openTrigger?o():this.dropdownDeactivationTimeouts[n.id]=setTimeout(function(){o(),delete i.dropdownDeactivationTimeouts[n.id]},this.DROPDOWN_TIMEOUT)}}},{key:"_blockDropdownDeactivation",value:function(e,t){if(void 0!==this.dropdownDeactivationTimeouts[t.id])for(var i in clearTimeout(this.dropdownDeactivationTimeouts[t.id]),delete this.dropdownDeactivationTimeouts[t.id],this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(i)&&(clearTimeout(this.dropdownActivationTimeouts[i]),delete this.dropdownActivationTimeouts[i])}},{key:"_setupMegaMenu",value:function(e){if(!this.useInlineNavigation){var t=e.closest(".nav-dropdown").clientWidth;e.style.maxWidth=Math.min(1400-t,parseInt(window.innerWidth-t-80))+"px"}}},{key:"_setupInlineNavigation",value:function(){var e=this;this.element.querySelectorAll(".mega-menu").forEach(function(e){e.closest(".
1nav-bar__item").classList.add("nav-bar__item--static")}),"MutationObserver"in window&&(this.dropdownMenuObserver=new MutationObserver(function(e){e.forEach(function(e){"false"===e.target.getAttribute("aria-hidden")&&e.target.style.setProperty("--distance-to-top","".concat(e.target.getBoundingClientRect().top,"px"))})}),this.element.querySelectorAll(".nav-dropdown .nav-dropdown").forEach(function(t){e.dropdownMenuObserver.observe(t,{attributes:!0,attributeFilter:["aria-hidden"]})}))}}]),e}(),y=h(function(t){!function(i){var n=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function o(){var e=this;e.reads=[],e.writes=[],e.raf=n.bind(i)}function s(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t,i=e.writes,n=e.reads;try{n.length,r(n),i.length,r(i)}catch(e){t=e}if(e.scheduled=!1,(n.length||i.length)&&s(e),t){if(t.message,!e.catch)throw t;e.catch(t)}}function r(e){for(var t;t=e.shift();)t()}function l(e,t){var i=e.indexOf(t);return!!~i&&!!e.splice(i,1)}o.prototype={constructor:o,measure:function(e,t){var i=t?e.bind(t):e;return this.reads.push(i),s(this),i},mutate:function(e,t){var i=t?e.bind(t):e;return this.writes.push(i),s(this),i},clear:function(e){return l(this.reads,e)||l(this.writes,e)},extend:function(t){if("object"!=e(t))throw new Error("expected object");var i=Object.create(this);return function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}(i,t),i.fastdom=this,i.initialize&&i.initialize(),i},catch:null};var c=i.fastdom=i.fastdom||new o;t.exports=c}("undefined"!=typeof window?window:c)}),b=function(){function e(i){t(this,e),this.element=document.getElementById("mobile-collection-filters"),this.delegateRoot=new p(document.documentElement),this.options=i,this.isOpen=!1,this.element&&this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateRoot.off()}},{key:"_attachListeners",value:function(){this.delegateRoot.on("click",'[aria-controls="mobile-collection-filters"][data-action="open-drawer"]',this.open.bind(this)),this.delegateRoot.on("click",'#mobile-collection-filters [data-action="close-drawer"]',this.close.bind(this)),document.addEventListener("collection-filter:close",this.close.bind(this)),document.addEventListener("click",this._detectOutsideClick.bind(this)),window.addEventListener("resize",this._computeDrawerHeight.bind(this))}},{key:"open",value:function(e){e&&e.stopPropagation(),this._computeDrawerHeight(),this.isOpen=!0,document.querySelector('[aria-controls="mobile-collection-filters"]').setAttribute("aria-expanded","true"),document.getElementById("mobile-collection-filters").setAttribute("aria-hidden","false"),document.body.classList.add("no-mobile-scroll")}},{key:"close",value:function(e){e&&e.stopPropagation(),this.isOpen=!1,document.querySelector('[aria-controls="mobile-collection-filters"]').setAttribute("aria-expanded","false"),document.getElementById("mobile-collection-filters").setAttribute("aria-hidden","true"),document.body.classList.remove("no-mobile-scroll")}},{key:"_computeDrawerHeight",value:function(){document.getElementById("mobile-collection-filters").querySelector(".collection-drawer").style.maxHeight="".concat(window.innerHeight,"px")}},{key:"_filtersHaveChanged",value:function(e){var t=this;this.element&&y.mutate(function(){var i=t.element.querySelector(".collection-drawer__filter-count");i.innerText="(".concat(e.length,")"),i.style.display=0===e.length?"none":"inline",t.element.querySelector('[data-action="clear-tags"]').style.display=0===e.length?"none":"block","group"===t.options.filterType&&t.element.querySelectorAll(".collection__filter-item-active").forEach(function(e){var t=e.closest(".collection__filter-group").querySelector(".is-selected[data-tag]");t?(e.style.display="block",e.innerText=t.getAttribute("data-tag-user")):e.style.display="none"})})}},{key:"_detectOutsideClick",value:function(e){this.isOpen&&!e.target.closest(".collection-drawer__inner")&&this.close()}}]),e}(),w=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(i.getAttribute("data-popup-settings")),this.hasOpenOnceInCurrentPage=!1;try{"#exit-popup"===window.location.hash&&this._openPopup()}catch(e){}this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off()}},{key:"_attachListeners",value:function(){var e=this;v.matchesBreakpoint("supports-hover")&&(this.delegateElement.on("click",'[data-action="close-popup"]',this._closePopup.bind(this)),document.body.addEventListener("mouseleave",function(){e.hasOpenOnceInCurrentPage||(!e.options.showOnlyOnce||e.options.showOnlyOnce&&null===localStorage.getItem("themeExitPopup"))&&e._openPopup()}),this._clickOutsideListener=this._checkClickOutside.bind(this))}},{key:"_openPopup",value:function(){window.theme.isNewsletterPopupOpen||(this.element.setAttribute("aria-hidden","false"),localStorage.setItem("themeExitPopup","true"),this.hasOpenOnceInCurrentPage=!0,window.theme.isExitPopupOpen=!0,this.delegateElement.on("click",this._clickOutsideListener))}},{key:"_closePopup",value:function(){this.element.setAttribute("aria-hidden","true"),window.theme.isExitPopupOpen=!1,this.delegateElement.off("click",this._clickOutsideListener)}},{key:"_checkClickOutside",value:function(e){this.element.contains(e.target)&&this.element!==e.target||this._closePopup()}}]),e}(),_=function(){function e(){t(this,e),this.element=document.querySelector(".loading-bar"),this.element&&(document.addEventListener("theme:loading:start",this._onLoadingStart.bind(this)),document.addEventListener("theme:loading:end",this._onLoadingEnd.bind(this)),this.element.addEventListener("transitionend",this._onTransitionEnd.bind(this)))}return n(e,[{key:"_onLoadingStart",value:function(){this.element.classList.add("is-visible"),this.element.style.width="40%"}},{key:"_onLoadingEnd",value:function(){this.element.style.width="100%",this.element.classList.add("is-finished")}},{key:"_onTransitionEnd",value:function(e){"width"===e.propertyName&&this.element.classList.contains("is-finished")&&(this.element.classList.remove("is-visible"),this.element.classList.remove("is-finished"),this.element.style.width="0")}}]),e}(),k=function(){function e(){t(this,e)}return n(e,null,[{key:"trapFocus",value:function(e,t){this.listeners=this.listeners||{};var i=e.querySelector("[autofocus]")||e;e.setAttribute("tabindex","-1"),i.focus(),this.listeners[t]=function(t){e===t.target||e.contains(t.target)||i.focus()},document.addEventListener("focusin",this.listeners[t])}},{key:"removeTrapFocus",value:function(e,t){e&&e.removeAttribute("tabindex"),document.removeEventListener("focusin",this.listeners[t])}},{key:"clearTrapFocus",value:function(){for(var e in this.listeners)this.listeners.hasOwnProperty(e)&&document.removeEventListener("focusin",this.listeners[e]);this.listeners={}}}]),e}(),E=function(){function e(i,n){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.delegateRoot=new p(document.documentElement),this.options=n,this.miniCartElement=this.element.querySelector(".mini-cart"),this.isMiniCartOpen=!1,"cart"!==window.theme.pageType&&this.miniCartElement&&(this.miniCartToggleElement=this.element.querySelector('[aria-controls="'.concat(this.miniCartElement.id,'"]')),this._checkMiniCartScrollability()),this.itemCount=window.theme.cartCount,this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off(),this.delegateRoot.off(),window.removeEventListener("resize",this._calculateMiniCartHeightListener)}},{key:"_attachListeners",value:function(){this._calculateMiniCartHeightListener=this._calculateMiniCartHeight.bind(this),"cart"!==window.theme.pageType&&"page"!==window.theme.cartType&&(this.delegateElement.on("click",'[data-action="toggle-mini-cart"]',this._toggleMiniCart.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this)),window.addEventListener("resize",this._calculateMiniCartHeightListener)),this.delegateRoot.on("click",'[data-action="decrease-quantity"]',this._updateQuantity.bind(this)),this.delegateRoot.on("click",'[data-action="increase-quantity"]',this._updateQuantity.bind(this)),this.delegateRoot.on("change",".quantity-selector__value",this._updateQuantity.bind(this)),this.delegateRoot.on("keyup",".quantity-selector__value",this._updateQuantitySize.bind(this)),this.delegateRoot.on("product:added",this._onProductAdded.bind(this)),this.delegateRoot.on("cart:refresh",this._onCartRefresh.bind(this))}},{key:"_toggleMiniCart",value:function(e){e&&e.preventDefault(),this.isMiniCartOpen?this._closeMiniCart():this._openMiniCart()}},{key:"_openMiniCart",value:function(){this.miniCartToggleElement.setAttribute("aria-expanded","true"),this.miniCartElement.setAttribute("aria-hidden","false"),this.isMiniCartOpen=!0,this._calculateMiniCartHeight(),k.trapFocus(this.miniCartElement,"mini-cart"),document.body.classList.add("no-mobile-scroll")}},{key:"_closeMiniCart",value:function(){this.miniCartToggleElement.setAttribute("aria-expanded","fal
1se"),"phone"===v.getCurrentBreakpoint()&&(this.miniCartElement.style.maxHeight=""),this.miniCartElement.setAttribute("aria-hidden","true"),this.isMiniCartOpen=!1,document.body.classList.remove("no-mobile-scroll")}},{key:"_calculateMiniCartHeight",value:function(){if("phone"===v.getCurrentBreakpoint())if(this.isMiniCartOpen){var e=window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom;this.miniCartElement.style.maxHeight="".concat(e,"px");var t=this.miniCartElement.querySelector(".mini-cart__content"),i=this.miniCartElement.querySelector(".mini-cart__recap");i&&(t.style.maxHeight="".concat(e-i.clientHeight,"px"))}else this.miniCartElement.style.maxHeight="",this.miniCartElement.querySelector(".mini-cart__content").style.maxHeight="";else this.miniCartElement.style.maxHeight="",this.miniCartElement.querySelector(".mini-cart__content").style.maxHeight=""}},{key:"_updateQuantity",value:function(e,t){var i=this,n=1,o="INPUT"===t.tagName?t:t.classList.contains("quantity-selector__button")?t.parentNode.querySelector(".quantity-selector__value"):null,s=parseInt(o?o.getAttribute("step"):t.getAttribute("data-quantity-multiplier"),10)||1,a=parseInt(o?o.getAttribute("min"):s,10)||s,r=parseInt(o?o.getAttribute("max"):"",10),l=parseInt(o?o.getAttribute("data-current-value"):"",10);if("INPUT"===t.tagName)n=parseInt(t.value,10);else if(n=parseInt(t.getAttribute("data-quantity"),10),o){var c=(l=parseInt(o.value,10))%s;"increase-quantity"===t.getAttribute("data-action")?n=0===c?l+s:l+s-c:(n=0===c?l-s:l-c,n=Math.max(n,0))}if(!(!isNaN(n)&&(0===n||n>=a&&n%s===0)&&(isNaN(r)||n<=r)))return o&&!isNaN(l)&&(o.value=l,o.setAttribute("size",Math.max(o.value.length,2))),void e.preventDefault();"page"===window.theme.cartType&&t.hasAttribute("data-href")?window.location.href="".concat(window.routes.cartChangeUrl,"?quantity=").concat(n,"&id=").concat(encodeURIComponent(t.getAttribute("data-line-id"))):(document.dispatchEvent(new CustomEvent("theme:loading:start")),fetch("".concat(window.routes.cartChangeUrl,".js"),{body:JSON.stringify({id:t.getAttribute("data-line-id"),quantity:n}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){e.json().then(function(e){i.itemCount=e.item_count,i._rerender(!1).then(function(){document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}),e.preventDefault())}},{key:"_updateQuantitySize",value:function(e,t){t.setAttribute("size",Math.max(t.value.length,2))}},{key:"_rerender",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i="";return i="cart"!==window.theme.pageType?"".concat(window.routes.cartUrl,"?view=mini-cart&timestamp=").concat(Date.now()):"".concat(window.routes.cartUrl,"?timestamp=").concat(Date.now()),fetch(i,{credentials:"same-origin",method:"GET"}).then(function(i){i.text().then(function(i){var n=document.createElement("div");if(n.innerHTML=i,n.firstElementChild&&n.firstElementChild.hasAttribute("data-item-count")&&(e.itemCount=parseInt(n.firstElementChild.getAttribute("data-item-count"))),e.itemCount<1?e.element.querySelector(".header__cart-count").classList.add("hidden"):e.element.querySelector(".header__cart-count").classList.remove("hidden"),e.element.querySelector(".header__cart-count").textContent=e.itemCount,"drawer"===window.theme.cartType)if("cart"!==window.theme.pageType){var o=document.createElement("div");o.innerHTML=i;var s=e.miniCartElement.querySelector(".mini-cart__line-item-list"),a=null;s&&(a=s.scrollTop),e.miniCartElement.innerHTML=o.querySelector(".mini-cart").innerHTML;var r=e.miniCartElement.querySelector(".mini-cart__line-item-list");r&&null!==a&&(r.scrollTop=a),e._checkMiniCartScrollability(),e._calculateMiniCartHeight(),e.element.dispatchEvent(new CustomEvent("cart:rerendered"))}else{var l=document.createElement("div");l.innerHTML=i,document.querySelector('[data-section-type="cart"]').innerHTML=l.querySelector('[data-section-type="cart"]').innerHTML,t&&window.scrollTo({top:0,behavior:"smooth"}),window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),e.element.dispatchEvent(new CustomEvent("cart:rerendered",{bubbles:!0}))}})})}},{key:"_checkMiniCartScrollability",value:function(){var e=this.miniCartElement.querySelector(".mini-cart__line-item-list");e&&e.scrollHeight>e.clientHeight&&e.classList.add("is-scrollable")}},{key:"_onProductAdded",value:function(e){var t=this;this.itemCount+=e.detail.quantity,this._onCartRefresh().then(function(){"cart"!==window.theme.pageType&&(t.options.useStickyHeader||window.scrollTo({top:0,behavior:"smooth"}),t._openMiniCart())})}},{key:"_onCartRefresh",value:function(e){var t=!0;return e&&e.detail&&(t=e.detail.scrollToTop),this._rerender(t).then(function(){document.dispatchEvent(new CustomEvent("theme:loading:end"))})}},{key:"_onWindowClick",value:function(e){this.miniCartElement&&this.isMiniCartOpen&&!this.element.contains(e.target)&&this._closeMiniCart()}}]),e}(),S=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.delegateRoot=new p(document.documentElement),this.mobileMenuElement=this.element.querySelector(".mobile-menu"),this.mobileMenuToggleElement=this.element.querySelector('[aria-controls="'.concat(this.mobileMenuElement.id,'"]')),this.isOpen=!1,this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off(),this.delegateRoot.off(),window.removeEventListener("resize",this._calculatMaxHeightListener)}},{key:"_attachListeners",value:function(){this._calculatMaxHeightListener=this._calculateMaxHeight.bind(this),this.delegateElement.on("click",'[data-action="toggle-menu"]',this._toggleMenu.bind(this)),this.delegateElement.on("click",'[data-action="open-panel"]',this._openPanel.bind(this)),this.delegateElement.on("click",'[data-action="close-panel"]',this._closePanel.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this)),window.addEventListener("resize",this._calculatMaxHeightListener)}},{key:"_toggleMenu",value:function(){this.isOpen=!this.isOpen,this.mobileMenuToggleElement.setAttribute("aria-expanded",this.isOpen?"true":"false"),this.mobileMenuElement.setAttribute("aria-hidden",this.isOpen?"false":"true"),this.isOpen?(this._calculateMaxHeight(),document.body.classList.add("no-mobile-scroll")):(this.mobileMenuElement.style.maxHeight="",this.element.querySelectorAll(".mobile-menu__panel.is-open").forEach(function(e){e.classList.remove("is-open")}),document.body.classList.remove("no-mobile-scroll"))}},{key:"_openPanel",value:function(e,t){t.setAttribute("aria-expanded","true"),this.element.querySelector("#".concat(t.getAttribute("aria-controls"))).classList.add("is-open")}},{key:"_closePanel",value:function(e,t){var i=t.closest(".mobile-menu__panel.is-open");i.classList.remove("is-open"),this.element.querySelector('[aria-controls="'.concat(i.id,'"]')).setAttribute("aria-expanded","fal
1se")}},{key:"_calculateMaxHeight",value:function(){this.isOpen&&(this.mobileMenuElement.style.maxHeight="".concat(window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom,"px"))}},{key:"_onWindowClick",value:function(e){this.isOpen&&!this.element.contains(e.target)&&this._toggleMenu()}}]),e}(),C=function(){function e(){t(this,e),this.domDelegate=new p(document.body),this.activeModal=document.querySelector('.modal[aria-hidden="false"]'),this._attachListeners()}return n(e,[{key:"_attachListeners",value:function(){this.domDelegate.on("click",'[data-action="open-modal"]',this._openModal.bind(this)),this.domDelegate.on("click",'[data-action="close-modal"]',this._closeModal.bind(this)),document.addEventListener("modal:close",this._closeModal.bind(this)),this._clickOutsideListener=this._checkClickOutside.bind(this),this.activeModal&&(document.documentElement.classList.add("is-locked"),this.domDelegate.on("click",this._clickOutsideListener))}},{key:"_openModal",value:function(e,t){var i=this,n=document.querySelector("#".concat(t.getAttribute("aria-controls")));if(n){return n.addEventListener("transitionend",function e(t){"visibility"===t.propertyName&&(n.removeEventListener("transitionend",e),k.trapFocus(n,"modal"),i.activeModal=n)}),n.setAttribute("aria-hidden","false"),document.documentElement.classList.add("is-locked"),this.domDelegate.on("click",this._clickOutsideListener),!1}}},{key:"_closeModal",value:function(){var e=this;if(this.activeModal){this.activeModal.addEventListener("transitionend",function t(i){"visibility"===i.propertyName&&(e.activeModal.removeEventListener("transitionend",t),k.removeTrapFocus(e.activeModal,"modal"),e.activeModal.dispatchEvent(new CustomEvent("modal:closed")),e.activeModal=null)}),this.activeModal.setAttribute("aria-hidden","true"),document.documentElement.classList.remove("is-locked"),this.domDelegate.off("click",this._clickOutsideListener)}}},{key:"_checkClickOutside",value:function(e){!this.activeModal||this.activeModal.contains(e.target)&&this.activeModal!==e.target||this._closeModal()}}]),e}(),L=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(i.getAttribute("data-popup-settings"));try{"#newsletter-popup"===window.location.hash?this._openPopup():(!this.options.showOnlyOnce||this.options.showOnlyOnce&&null===localStorage.getItem("themePopup"))&&setTimeout(this._openPopup.bind(this),1e3*this.options.apparitionDelay)}catch(e){}this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="close-popup"]',this._closePopup.bind(this)),this._clickOutsideListener=this._checkClickOutside.bind(this)}},{key:"_openPopup",value:function(){window.theme.isExitPopupOpen||(this.element.setAttribute("aria-hidden","false"),localStorage.setItem("themePopup","true"),window.theme.isNewsletterPopupOpen=!0,this.delegateElement.on("click",this._clickOutsideListener))}},{key:"_closePopup",value:function(){this.element.setAttribute("aria-hidden","true"),window.theme.isNewsletterPopupOpen=!1,this.delegateElement.off("click")}},{key:"_checkClickOutside",value:function(e){this.element.contains(e.target)&&this.element!==e.target||this._closePopup()}}]),e}(),x=function(){function e(i,n){t(this,e),i&&(this.element=i,this.options=n,this.lastKnownY=window.scrollY,this.currentTop=0,this.initialTopOffset=n.offsetTop||parseInt(window.getComputedStyle(this.element).top),this._attachListeners())}return n(e,[{key:"destroy",value:function(){window.removeEventListener("scroll",this._checkPositionListener)}},{key:"_attachListeners",value:function(){this._checkPositionListener=this._checkPosition.bind(this),window.addEventListener("scroll",this._checkPositionListener)}},{key:"_checkPosition",value:function(){var e=this;y.measure(function(){var t=e.element.getBoundingClientRect().top+window.scrollY-e.element.offsetTop+e.initialTopOffset,i=e.element.clientHeight-window.innerHeight+(e.options.offsetBottom||0);window.scrollY<e.lastKnownY?e.currentTop-=window.scrollY-e.lastKnownY:e.currentTop+=e.lastKnownY-window.scrollY,e.currentTop=Math.min(Math.max(e.currentTop,-i),t,e.initialTopOffset),e.lastKnownY=window.scrollY}),y.mutate(function(){e.element.style.top="".concat(e.currentTop,"px")})}}]),e}(),A=function(){function e(){t(this,e),this.delegateElement=new p(document.body),this.delegateRoot=new p(document.documentElement),this.activePopover=null,this._attachListeners()}return n(e,[{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="toggle-popover"]',this._togglePopover.bind(this)),this.delegateElement.on("click",'[data-action="show-popover-panel"]',this._showPanel.bind(this)),this.delegateRoot.on("click",this._onWindowClick.bind(this)),document.addEventListener("popover:close",this._closeActivePopover.bind(this)),window.addEventListener("resize",this._windowResized.bind(this))}},{key:"_togglePopover",value:function(e,t){var i=null!==this.activePopover,n=this.activePopover?this.activePopover.id:null;t.hasAttribute("data-follow-link")&&v.matchesBreakpoint(t.getAttribute("data-follow-link"))||(i&&this._closeActivePopover(),(!i||i&&t.getAttribute("aria-controls")!==n)&&this._openPopover(t),e.preventDefault())}},{key:"_closeActivePopover",value:function(){this.activePopover.setAttribute("aria-hidden","true"),document.querySelector('[aria-controls="'.concat(this.activePopover.id,'"]')).setAttribute("aria-expanded","fal
1se"),this.activePopover=null}},{key:"_openPopover",value:function(e){var t=document.getElementById(e.getAttribute("aria-controls"));if(e.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"),"phone"===v.getCurrentBreakpoint())t.style.height="".concat(window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom,"px");else{t.style.height="";var i=t.querySelector(".popover__panel-list");i&&(i.style.height="".concat(i.clientHeight,"px"))}this.activePopover=t}},{key:"_showPanel",value:function(e,t){this.activePopover&&this.activePopover.querySelectorAll(".popover__panel").forEach(function(e){e.id===t.getAttribute("aria-controls")?(e.classList.add("is-selected"),e.closest(".popover__panel-list").style.height="".concat(e.clientHeight,"px")):e.classList.remove("is-selected")})}},{key:"_onWindowClick",value:function(e){"toggle-popover"===e.target.getAttribute("data-action")||e.target.closest('[data-action="toggle-popover"]')||this.activePopover&&!this.activePopover.contains(e.target)&&this._closeActivePopover()}},{key:"_windowResized",value:function(){"phone"===v.getCurrentBreakpoint()&&this.activePopover&&(this.activePopover.style.height="".concat(window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom,"px"))}}]),e}(),T=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this._attachListeners(),this.recalculateSwatches()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off(),window.removeEventListener("resize",this._recalculateSwatchesListener)}},{key:"recalculateSwatches",value:function(){var e=this;y.measure(function(){e.element.querySelectorAll(".product-item__swatch-list").forEach(function(e){var t=e.clientWidth,i=parseInt(Math.min(t,200)),n=Math.floor(i/30);y.mutate(function(){var t=e.querySelectorAll(".color-swatch");t.forEach(function(e,i){e.classList.remove("color-swatch--view-more"),n===i+1&&n!==t.length&&e.classList.add("color-swatch--view-more")})})})})}},{key:"_attachListeners",value:function(){this._recalculateSwatchesListener=this.recalculateSwatches.bind(this),this.delegateElement.on("change",".product-item__swatch-list .color-swatch__radio",this._colorChanged.bind(this)),window.addEventListener("resize",this._recalculateSwatchesListener)}},{key:"_colorChanged",value:function(e,t){var i=t.closest(".product-item"),n=t.getAttribute("data-variant-url");i.querySelector(".product-item__image-wrapper").setAttribute("href",n),i.querySelector(".product-item__title").setAttribute("href",n);var o=i.querySelector(".product-item__primary-image");if(t.hasAttribute("data-image-url")&&t.getAttribute("data-media-id")!==o.getAttribute("data-media-id")){var s=document.createElement("img");s.className="product-item__primary-image",s.setAttribute("data-media-id",t.getAttribute("data-media-id")),s.setAttribute("data-src",t.getAttribute("data-image-url")),s.setAttribute("data-widths",t.getAttribute("data-image-widths")),s.setAttribute("data-sizes","auto"),o.parentNode.style.paddingBottom="".concat(100/s.getAttribute("data-image-aspect-ratio"),"%"),o.parentNode.replaceChild(s,o)}}}]),e}(),P=function(){function e(){t(this,e)}return n(e,null,[{key:"formatMoney",value:function(e,t){"string"==typeof e&&(e=e.replace(".",""));var i=/\{\{\s*(\w+)\s*\}\}/,n=t||"${{amount}}";function o(e,t){return null==e||e!=e?t:e}function s(e,t,i,n){if(t=o(t,2),i=o(i,","),n=o(n,"."),isNaN(e)||null==e)return 0;var s=(e=(e/100).toFixed(t)).split(".");return s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i)+(s[1]?n+s[1]:"")}var a="";switch(n.match(i)[1]){case"amount":a=s(e,2);break;case"amount_no_decimals":a=s(e,0);break;case"amount_with_space_separator":a=s(e,2," ",".");break;case"amount_no_decimals_with_comma_separator":a=s(e,0,",",".");break;case"amount_no_decimals_with_space_separator":a=s(e,0," ");break;case"amount_with_comma_separator":a=s(e,2,".",",")}return-1!==n.indexOf("with_comma_separator")?n.replace(i,a).replace(",00",""):n.replace(i,a).replace(".00","")}}]),e}(),M=function(){function e(){t(this,e)}return n(e,null,[{key:"serialize",value:function(t){function i(e,t){var n=e.lastIndexOf("[");if(-1===n){var o={};return o[e]=t,o}var s=e.substr(0,n),a={};return a[e.substring(n+1,e.length-1)]=t,i(s,a)}for(var n={},o=0,s=t.elements.length;o<s;o++){var a=t.elements[o];if(""!==a.name&&!a.disabled&&(a.name&&!a.disabled&&(a.checked||/select|textarea/i.test(a.nodeName)||/hidden|text|search|tel|url|email|password|datetime|date|month|week|time|datetime-local|number|range|c
1olor/i.test(a.type)))){var r=i(a.name,a.value);n=e.extend(n,r)}}return n}},{key:"extend",value:function(){for(var t={},i=0,n=function(i){for(var n in i)i.hasOwnProperty(n)&&("[object Object]"===Object.prototype.toString.call(i[n])?t[n]=e.extend(t[n],i[n]):t[n]=i[n])};i<arguments.length;i++)n(arguments[i]);return t}}]),e}(),I=function(){function e(i,n){var o=this;t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=n;var s=this.element.querySelector("[data-product-json]");if(s){var a=JSON.parse(s.innerHTML);this.productData=a.product,this.productOptionsWithValues=a.options_with_values,this.variantsInventories=a.inventories||{},this.showBackOrderBtn=a.show_back_order_btn,this.showPreOrderBtn=a.show_pre_order_btn,this.variantSelectors=this.element.querySelectorAll(".product-form__option[data-selector-type]"),this.masterSelector=this.element.querySelector("#product-select-".concat(this.productData.id)),this.productData.variants.forEach(function(e){e.id===a.selected_variant_id&&(o.currentVariant=e,o.option1=e.option1,o.option2=e.option2,o.option3=e.option3)})}this._updateSelectors(this.currentVariant),this._setupStockCountdown(),this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off("click")}},{key:"_attachListeners",value:function(){this.delegateElement.on("change",".product-form__single-selector",this._onOptionChanged.bind(this)),this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this))}},{key:"_onVariantChanged",value:function(e,t){this._updateProductPrices(t,e),this._updateInventory(t,e),this._updateSku(t,e),this._updateDiscountLabel(t,e),this._updateUnitPrice(t,e),this._updateSelectors(t,e),this._updateAddToCartButton(t,e),this.element.dispatchEvent(new CustomEvent("variant:changed",{bubbles:!0,detail:{variant:t,previousVariant:e}}))}},{key:"_updateProductPrices",value:function(e,t){var i=this.element.querySelector(".price-list");if(e){if(t&&t.price===e.price&&t.compare_at_price===e.compare_at_price)return;i.innerHTML="",e.compare_at_price>e.price?(i.innerHTML+='<span class="price price--highlight" data-money-convertible>'.concat(P.formatMoney(e.price,window.theme.moneyFormat),"</span>"),i.innerHTML+='<span class="price price--compare" data-money-convertible>'.concat(P.formatMoney(e.compare_at_price,window.theme.moneyFormat),"</span>")):i.innerHTML+='<span class="price" data-money-convertible>'.concat(P.formatMoney(e.price,window.theme.moneyFormat),"</span>"),i.style.display=""}else i.style.display="none"}},{key:"_updateInventory",value:function(e){if(e){var t=this.element.querySelector(".product-form__inventory"),i=this.variantsInventories[e.id].inventory_management,n=this.variantsInventories[e.id].inventory_policy,o=this.variantsInventories[e.id].inventory_quantity,s=this.variantsInventories[e.id].inventory_message,a=this.options.lowInventoryThreshold;t.classList.remove("inventory--high"),t.classList.remove("inventory--low"),t.classList.remove("inventory--none"),e.available&&(null!==i&&"continue"===n&&o<=0&&"In stock"!==s||null!==i&&"deny"===n&&a>0&&o<=a?t.classList.add("inventory--low"):t.classList.add("inventory--high"));var r=this.element.querySelector(".inventory-bar");if(r){var l=Math.min(Math.max(o/parseInt(r.getAttribute("data-stock-countdown-max"))*100,0),100);r.classList.toggle("inventory-bar--hidden",0===l),r.firstElementChild.style.width="".concat(l,"%")}t.innerHTML=s}}},{key:"_updateSku",value:function(e,t){var i=this.element.querySelector(".product-meta__sku-number");if(i)if(e){if(t&&t.sku===e.sku)return;i.innerHTML=e.sku,i.style.display=""}else i.style.display="none"}},{key:"_updateDiscountLabel",value:function(e,t){if(window.theme.showDiscount){var i=this.element.querySelector(".product-meta .product-label--on-sale");if(i)if(e&&e.price<e.compare_at_price){var n=null;n="percentage"===window.theme.discountMode?"".concat(Math.round(100*(e.compare_at_price-e.price)/e.compare_at_price),"%"):"<span data-money-convertible>".concat(P.formatMoney(e.compare_at_price-e.price,window.theme.moneyFormat),"</span>"),i.innerHTML="".concat(window.languages.collectionOnSaleLabel.replace("{{savings}}",n)),i.style.display="inline-block"}else i.style.display="none"}}},{key:"_updateUnitPrice",value:function(e,t){var i=this.element.querySelector(".unit-price-measurement");
1if(e&&e.unit_price_measurement){i.parentNode.style.display="block",i.querySelector(".unit-price-measurement__price").innerHTML=P.formatMoney(e.unit_price,window.theme.moneyFormat),i.querySelector(".unit-price-measurement__reference-unit").innerHTML=e.unit_price_measurement.reference_unit;var n=i.querySelector(".unit-price-measurement__reference-value");n&&(n.innerHTML=e.unit_price_measurement.reference_value)}else i.parentNode.style.display="none"}},{key:"_updateSelectors",value:function(e){var t=this;if(e){var i=e.option1,n=e.option2,o=e.option3,s=this.productData.variants.length;this.variantSelectors.forEach(function(e,a){var r=e.getAttribute("data-selector-type");if("select"!==r){var l=a+1;t.productOptionsWithValues[a].values.forEach(function(a,c){var h=!1;if(1===l)for(var d=0;d!==s;++d){var u=t.productData.variants[d];if(u.option1===a&&u.option2===n&&u.option3===o){h=u.available;break}}else if(2===l)for(var p=0;p!==s;++p){var m=t.productData.variants[p];if(m.option1===i&&m.option2===a&&m.option3===o){h=m.available;break}}else if(3===l)for(var f=0;f!==s;++f){var v=t.productData.variants[f];if(v.option1===i&&v.option2===n&&v.option3===a){h=v.available;break}}switch(r){case"color":e.querySelector(".color-swatch:nth-child(".concat(c+1,")")).classList.toggle("color-swatch--disabled",!h);break;case"variant":e.querySelector(".variant-swatch:nth-child(".concat(c+1,")")).classList.toggle("variant-swatch--disabled",!h);break;case"block":e.querySelector(".block-swatch:nth-child(".concat(c+1,")")).classList.toggle("block-swatch--disabled",!h)}})}})}}},{key:"_updateAddToCartButton",value:function(e){var t=this.element.querySelector(".product-form__add-button"),i=this.element.querySelector(".product-form__info-list"),n=this.showBackOrderBtn,o=this.showPreOrderBtn;if(t)if(e){if(i.style.display="block","Pre-order"==t.innerHTML)return;e.available?n&&e.inventory_quantity<=0?(t.setAttribute("data-action","add-to-cart"),t.innerHTML="Place Backorder"):o&&e.inventory_quantity<=0?(t.setAttribute("data-action","add-to-cart"),t.innerHTML="Pre-order"):(t.removeAttribute("disabled"),t.classList.remove("button--disabled"),t.classList.add("button--primary"),t.setAttribute("data-action","add-to-cart"),t.innerHTML=window.languages.productFormAddToCart):(t.setAttribute("disabled","disabled"),t.classList.add("button--disabled"),t.classList.remove("button--primary"),t.removeAttribute("data-action"),t.innerHTML=window.languages.productFormSoldOut)}else t.setAttribute("disabled","disabled"),t.classList.add("button--disabled"),t.classList.remove("button--primary"),t.removeAttribute("data-action"),t.innerHTML=window.languages.productFormUnavailable,i.style.display="none"}},{key:"_onOptionChanged",value:function(e,t){this["option"+t.getAttribute("data-option-position")]=t.value;var i=t.closest(".product-form__option").querySelector(".product-form__selected-value");i&&(i.innerHTML=t.value);var n=this.currentVariant;if(this.currentVariant=this._getCurrentVariantFromOptions(),this._onVariantChanged(n,this.currentVariant),this.currentVariant){if(this.options.enableHistoryState&&history.replaceState){var o="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname,"?variant=").concat(this.currentVariant.id);window.history.replaceState({path:o},"",o)}this.masterSelector.querySelector("[selected]").removeAttribute("selected"),this.masterSelector.querySelector('[value="'.concat(this.currentVariant.id,'"]')).setAttribute("selected","selected")}}},{key:"_getCurrentVariantFromOptions",value:function(){var e=this,t=!1;
1return this.productData.variants.forEach(function(i){i.option1===e.option1&&i.option2===e.option2&&i.option3===e.option3&&(t=i)}),t||null}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]')||this.element.querySelector('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){document.dispatchEvent(new CustomEvent("theme:loading:end")),e.ok?(t.removeAttribute("disabled"),i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:i.currentVariant,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})),i.options.isQuickView&&document.dispatchEvent(new CustomEvent("modal:close"))):e.json().then(function(e){var i=document.createElement("div");i.className="product-form__error",i.innerHTML='<p class="alert alert--error">'.concat(e.description,"</p>"),t.removeAttribute("disabled"),t.parentNode.insertAdjacentElement("afterend",i),r.slideDown(i),setTimeout(function(){r.slideUp(i,function(){i.remove()})},5500)})}),e.preventDefault()}}},{key:"_setupStockCountdown",value:function(){var e=this,t=this.element.querySelector(".inventory-bar");if(t){var i=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting){var o=e.variantsInventories[e.currentVariant.id].inventory_quantity,s=Math.min(Math.max(o/parseInt(t.getAttribute("data-stock-countdown-max"))*100,0),100);t.classList.toggle("inventory-bar--hidden",0===s),t.firstElementChild.style.width="".concat(s,"%"),i.disconnect()}})});i.observe(t)}}}]),e}(),D=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.delegateRoot=new p(document.documentElement),this._attachListeners();var n=document.createElement("link");n.rel="stylesheet",n.href="https://cdn.shopify.com/shopifycloud/model-viewer-ui/assets/v1.0/model-viewer-ui.css",document.head.appendChild(n),window.Shopify.loadFeatures([{name:"model-viewer-ui",version:"1.0",onLoad:this._setupModelViewerUI.bind(this)},{name:"shopify-xr",version:"1.0"}])}return n(e,[{key:"destroy",value:function(){}},{key:"_attachListeners",value:function(){var e=this;this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_play",function(){e.element.dispatchEvent(new CustomEvent("model:played",{bubbles:!0}))}),this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_pause",function(){e.element.dispatchEvent(new CustomEvent("model:paused",{bubbles:!0}))})}},{key:"hasBeenSelected",value:function(e){v.matchesBreakpoint("supports-hover")&&!e&&this.modelUi.play()}},{key:"hasBeenDeselected",value:function(){this.modelUi.pause()}},{key:"_setupModelViewerUI",value:function(){this.modelElement=this.element.querySelector("model-viewer"),this.modelUi=new window.Shopify.ModelViewerUI(this.modelElement)}}]),e}(),q=function(){function e(i,n){switch(t(this,e),this.element=i,this.delegateElement=new p(this.element),this.enableVideoLooping=n,this.player=null,this.element.getAttribute("data-media-type")){case"video":var o=document.createElement("link");o.rel="stylesheet",o.href="https://cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.css",document.head.appendChild(o),window.Shopify.loadFeatures([{name:"video-ui",version:"1.0",onLoad:this._setupHtml5Video.bind(this)}]);break;case"external_video":this._setupExternalVideo()}}return n(e,[{key:"destroy",value:function(){this.player&&this.player.destroy()}},{key:"hasBeenSelected",value:function(e){v.matchesBreakpoint("supports-hover")&&!e&&this.play()}},{key:"hasBeenDeselected",value:function(){this.pause()}},{key:"play",value:function(){switch(this.element.getAttribute("data-media-type")){case"video":this.player.play();break;case"external_video":this.player.playVideo(),this.element.focus()}}},{key:"pause",value:function(){switch(this.element.getAttribute("data-media-type")){case"video":this.player.pause();break;case"external_video":this.player.pauseVideo()}}},{key:"_setupHtml5Video",value:function(){var e=this;this.player=new Shopify.Plyr(this.element.querySelector("video"),{controls:["play","progress","mute","volume","play-large","fullscreen"],loop:{active:this.enableVideoLooping},hideControlsOnPause:!0,clickToPlay:!0,iconUrl:"//cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.svg",tooltips:{controls:!1,seek:!0}}),this.player.on("play",function(){e.element.dispatchEvent(new CustomEvent("video:played",{bubbles:!0}))}),this.player.on("pause",function(){e.element.dispatchEvent(new CustomEvent("video:paused",{bubbles:!0}))})}},{key:"_setupExternalVideo",value:function(){"youtube"===this.element.getAttribute("data-media-host")&&this._loadYouTubeScript().then(this._setupYouTubePlayer.bind(this))}},{key:"_setupYouTubePlayer",value:function(){var e=this,t=setInterval(function(){void 0!==window.YT&&void 0!==window.YT.Player&&(e.player=new YT.Player(e.element.querySelector("iframe"),{videoId:e.element.getAttribute("data-video-id"),events:{onStateChange:function(t){0===t.data&&e.enableVideoLooping&&t.target.seekTo(0)}}}),clearInterval(t))},50)}},{key:"_loadYouTubeScript",value:function(){return new Promise(function(e,t){var i=document.createElement("script");document.body.appendChild(i),i.onload=e,i.onerror=t,i.async=!0,i.src="//www.youtube.com/iframe_api"})}}]),e}(),O=h(function(e){!function(t,i){e.exports?e.exports=i():t.EvEmitter=i()}("undefined"!=typeof window?window:c,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{};return(i[e]=i[e]||{})[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(e,s),delete n[s]),s.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})}),B=h(function(t){
2/*!
3     * getSize v2.0.3
4     * measure size of elements
5     * MIT license
6     */
7!function(e,i){t.exports?t.exports=i():e.getSize=i()}(window,function(){function t(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var i="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=n.length;function s(e){var t=getComputedStyle(e);return t||i("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var a,r=!1;function l(i){if(function(){if(!r){r=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=s(e);a=200==Math.round(t(n.width)),l.isBoxSizeOuter=a,i.removeChild(e)}}(),"string"==typeof i&&(i=document.querySelector(i)),i&&"object"==e(i)&&i.nodeType){var c=s(i);if("none"==c.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<o;t++)e[n[t]]=0;return e}();var h={};h.width=i.offsetWidth,h.height=i.offsetHeight;for(var d=h.isBorderBox="border-box"==c.boxSizing,u=0;u<o;u++){var p=n[u],m=c[p],f=parseFloat(m);h[p]=isNaN(f)?0:f}var v=h.paddingLeft+h.paddingRight,g=h.paddingTop+h.paddingBottom,y=h.marginLeft+h.marginRight,b=h.marginTop+h.marginBottom,w=h.borderLeftWidth+h.borderRightWidth,_=h.borderTopWidth+h.borderBottomWidth,k=d&&a,E=t(c.width);!1!==E&&(h.width=E+(k?0:v+w));var S=t(c.height);return!1!==S&&(h.height=S+(k?0:g+_)),h.innerWidth=h.width-(v+w),h.innerHeight=h.height-(g+_),h.outerWidth=h.width+y,h.outerHeight=h.height+b,h}}return l})}),z=h(function(e){!function(t,i){e.exports?e.exports=i():t.matchesSelector=i()}(window,function(){var e=function(){var e=window.Element.prototype;if(e.matches)return"matches";if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0;i<t.length;i++){var n=t[i]+"MatchesSelector";if(e[n])return n}}();return function(t,i){return t[e](i)}})}),R=h(function(t){!function(e,i){t.exports?t.exports=i(e,z):e.fizzyUIUtils=i(e,e.matchesSelector)}(window,function(t,i){var n={extend:function(e,t){for(var i in t)e[i]=t[i];return e},modulo:function(e,t){return(e%t+t)%t}},o=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==e(t)&&"number"==typeof t.length?o.call(t):[t]},n.removeFrom=function(e,t){var i=e.indexOf(t);-1!=i&&e.splice(i,1)},n.getParent=function(e,t){for(;e.parentNode&&e!=document.body;)if(e=e.parentNode,i(e,t))return e},n.getQueryElement=function(e){return"string"==typeof e?document.querySelector(e):e},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.filterFindElements=function(e,t){e=n.makeArray(e);var o=[];return e.forEach(function(e){if(e instanceof HTMLElement)if(t){i(e,t)&&o.push(e);for(var n=e.querySelectorAll(t),s=0;s<n.length;s++)o.push(n[s])}else o.push(e)}),o},n.debounceMethod=function(e,t,i){i=i||100;var n=e.prototype[t],o=t+"Timeout";e.prototype[t]=function(){var e=this[o];clearTimeout(e);var t=arguments,s=this;this[o]=setTimeout(function(){n.apply(s,t),delete s[o]},i)}},n.docReady=function(e){var t=document.readyState;"complete"==t||"interactive"==t?setTimeout(e):document.addEventListener("DOMContentLoaded",e)},n.toDashed=function(e){return e.replace(/(.)([A-Z])/g,function(e,t,i){return t+"-"+i}).toLowerCase()};var s=t.console;return n.htmlInit=function(e,i){n.docReady(function(){var o=n.toDashed(i),a="data-"+o,r=document.querySelectorAll("["+a+"]"),l=d
7ocument.querySelectorAll(".js-"+o),c=n.makeArray(r).concat(n.makeArray(l)),h=a+"-options",d=t.jQuery;c.forEach(function(t){var n,o=t.getAttribute(a)||t.getAttribute(h);try{n=o&&JSON.parse(o)}catch(e){return void(s&&s.error("Error parsing "+a+" on "+t.className+": "+e))}var r=new e(t,n);d&&d.data(t,i,r)})})},n})}),H=h(function(e){!function(t,i){e.exports?e.exports=i(t,B):(t.Flickity=t.Flickity||{},t.Flickity.Cell=i(t,t.getSize))}(window,function(e,t){function i(e,t){this.element=e,this.parent=t,this.create()}var n=i.prototype;return n.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0},n.destroy=function(){this.unselect(),this.element.style.position="";var e=this.parent.originSide;this.element.style[e]=""},n.getSize=function(){this.size=t(this.element)},n.setPosition=function(e){this.x=e,this.updateTarget(),this.renderPosition(e)},n.updateTarget=n.setDefaultTarget=function(){var e="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[e]+this.size.width*this.parent.cellAlign},n.renderPosition=function(e){var t=this.parent.originSide;this.element.style[t]=this.parent.getPositionValue(e)},n.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},n.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},n.wrapShift=function(e){this.shift=e,this.renderPosition(this.x+this.parent.slideableWidth*e)},n.remove=function(){this.element.parentNode.removeChild(this.element)},i})}),N=h(function(e){!function(t,i){e.exports?e.exports=i():(t.Flickity=t.Flickity||{},t.Flickity.Slide=i())}(window,function(){function e(e){this.parent=e,this.isOriginLeft="left"==e.originSide,this.cells=[],this.outerWidth=0,this.height=0}var t=e.prototype;return t.addCell=function(e){if(this.cells.push(e),this.outerWidth+=e.size.outerWidth,this.height=Math.max(e.size.outerHeight,this.height),1==this.cells.length){this.x=e.x;var t=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=e.size[t]}},t.updateTarget=function(){var e=this.isOriginLeft?"marginRight":"marginLeft",t=this.getLastCell(),i=t?t.size[e]:0,n=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+n*this.parent.cellAlign},t.getLastCell=function(){return this.cells[this.cells.length-1]},t.select=function(){this.cells.forEach(function(e){e.select()})},t.unselect=function(){this.cells.forEach(function(e){e.unselect()})},t.getCellElements=function(){return this.cells.map(function(e){return e.element})},e})}),U=h(function(e){!function(t,i){e.exports?e.exports=i(t,R):(t.Flickity=t.Flickity||{},t.Flickity.animatePrototype=i(t,t.fizzyUIUtils))}(window,function(e,t){var i={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var e=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(e),this.isAnimating){var t=this;requestAnimationFrame(function(){t.animate()})}},positionSlider:function(){var e=this.x;this.options.wrapAround&&this.cells.length>1&&(e=t.modulo(e,this.slideableWidth),e-=this.slideableWidth,this.shiftWrapCells(e)),this.setTranslateX(e,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(e,t){e+=this.cursorPosition,e=this.options.rightToLeft?-e:e;var i=this.getPositionValue(e);this.slider.style.transform=t?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var e=this.slides[0];if(e){var t=-this.x-e.target,i=t/this.slidesWidth;this.dispatchEvent("scroll",null,[i,t])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(e){return this.options.percentPosition?.01*Math.round(e/this.size.innerWidth*1e4)+"%":Math.round(e)+"px"},settle:function(e){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*e)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(e){var t=this.cursorPosition+e;this._shiftCells(this.beforeShiftCells,t,-1);var i=this.size.innerWidth-(e+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(e,t,i){for(var n=0;n<e.length;n++){var o=e[n],s=t>0?i:0;o.wrapShift(s),t-=o.size.outerWidth}},_unshiftCells:function(e){if(e&&e.length)for(var t=0;t<e.length;t++)e[t].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity
7*=this.getFrictionFactor()},applyForce:function(e){this.velocity+=e},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(this.isDraggable&&this.isPointerDown){var e=this.dragX-this.x-this.velocity;this.applyForce(e)}},applySelectedAttraction:function(){if(!(this.isDraggable&&this.isPointerDown)&&!this.isFreeScrolling&&this.slides.length){var e=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(e)}}};return i})}),F=h(function(e){!function(t,i){if(e.exports)e.exports=i(t,O,B,R,H,N,U);else{var n=t.Flickity;t.Flickity=i(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,n.Cell,n.Slide,n.animatePrototype)}}(window,function(e,t,i,n,o,s,a){var r=e.jQuery,l=e.getComputedStyle;e.console;function c(e,t){for(e=n.makeArray(e);e.length;)t.appendChild(e.shift())}var h=0,d={};function u(e,t){var i=n.getQueryElement(e);if(i){if(this.element=i,this.element.flickityGUID){var o=d[this.element.flickityGUID];return o.option(t),o}r&&(this.$element=r(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(t),this._create()}}u.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,lazyLoad:1,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},u.createMethods=[];var p=u.prototype;n.extend(p,t.prototype),p._create=function(){var t=this.guid=++h;for(var i in this.element.flickityGUID=t,d[t]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&e.addEventListener("resize",this),this.options.on){var n=this.options.on[i];this.on(i,n)}u.createMethods.forEach(function(e){this[e]()},this),this.options.watchCSS?this.watchCSS():this.activate()},p.option=function(e){n.extend(this.options,e)},p.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),c(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},p._createSlider=function(){var e=document.createElement("div");e.className="flickity-slider",e.style[this.originSide]=0,this.slider=e},p._filterFindCellElements=function(e){return n.filterFindElements(e,this.options.cellSelector)},p.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},p._makeCells=function(e){return this._filterFindCellElements(e).map(function(e){return new o(e,this)},this)},p.getLastCell=function(){return this.cells[this.cells.length-1]},p.getLastSlide=function(){return this.slides[this.slides.length-1]},p.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},p._positionCells=function(e){e=e||0,this.maxCellHeight=e&&this.maxCellHeight||0;var t=0;if(e>0){var i=this.cells[e-1];t=i.x+i.size.outerWidth}for(var n=this.cells.length,o=e;o<n;o++){var s=this.cells[o];s.setPosition(t),t+=s.size.outerWidth,this.maxCellHeight=Math.max(s.size.outerHeight,this.maxCellHeight)}this.slideableWidth=t,this.updateSlides(),this._containSlides(),this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0},p._sizeCells=function(e){e.forEach(function(e){e.getSize()})},p.updateSlides=function(){if(this.slides=[],this.cells.length){var e=new s(this);this.slides.push(e);var t="left"==this.originSide?"marginRight":"marginLeft",i=this._getCanCellFit();this.cells.forEach(function(n,o){if(e.cells.length){var a=e.outerWidth-e.firstMargin+(n.size.outerWidth-n.size[t]);i.call(this,o,a)||(e.updateTarget(),e=new s(this),this.slides.push(e)),e.addCell(n)}else e.addCell(n)},this),e.updateTarget(),this.updateSelectedSlide()}},p._getCanCellFit=function(){var e=this.options.groupCells;if(!e)return function(){return!1};if("number"==typeof e){var t=parseInt(e,10);return function(e){return e%t!==0}}var i="string"==typeof e&&e.match(/^(\d+)%$/),n=i?parseInt(i[1],10)/100:1;return function(e,t){return t<=(this.size.innerWidth+1)*n}},p._init=p.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},p.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var m={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return p.setCellAlign=function(){var e=m[this.options.cellAlign];this.cellAlign=e?e[this.originSide]:this.options.cellAlign},p.setGallerySize=function(){if(this.options.setGallerySize){var e=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=e+"px"}},p._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var e=this.cursorPosition,t=this.cells.length-1;this.beforeShiftCells=this._getGapCells(e,t,-1),e=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(e,0,1)}},p._getGapCells=function(e,t,i){for(var n=[];e>0;){var o=this.cells[t];if(!o)break;n.push(o),t+=i,e-=o.size.outerWidth}return n},p._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var e=this.options.rightToLeft,t=e?"marginRight":"marginLeft",i=e?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[i],o=n<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[t],a=n-this.size.innerWidth*(1-this.cellAlign);
7this.slides.forEach(function(e){o?e.target=n*this.cellAlign:(e.target=Math.max(e.target,s),e.target=Math.min(e.target,a))},this)}},p.dispatchEvent=function(e,t,i){var n=t?[t].concat(i):i;if(this.emitEvent(e,n),r&&this.$element){var o=e+=this.options.namespaceJQueryEvents?".flickity":"";if(t){var s=r.Event(t);s.type=e,o=s}this.$element.trigger(o,i)}},p.select=function(e,t,i){if(this.isActive&&(e=parseInt(e,10),this._wrapSelect(e),(this.options.wrapAround||t)&&(e=n.modulo(e,this.slides.length)),this.slides[e])){var o=this.selectedIndex;this.selectedIndex=e,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[e]),e!=o&&this.dispatchEvent("change",null,[e]),this.dispatchEvent("cellSelect")}},p._wrapSelect=function(e){var t=this.slides.length;if(!(this.options.wrapAround&&t>1))return e;var i=n.modulo(e,t),o=Math.abs(i-this.selectedIndex),s=Math.abs(i+t-this.selectedIndex),a=Math.abs(i-t-this.selectedIndex);!this.isDragSelect&&s<o?e+=t:!this.isDragSelect&&a<o&&(e-=t),e<0?this.x-=this.slideableWidth:e>=t&&(this.x+=this.slideableWidth)},p.previous=function(e,t){this.select(this.selectedIndex-1,e,t)},p.next=function(e,t){this.select(this.selectedIndex+1,e,t)},p.updateSelectedSlide=function(){var e=this.slides[this.selectedIndex];e&&(this.unselectSelectedSlide(),this.selectedSlide=e,e.select(),this.selectedCells=e.cells,this.selectedElements=e.getCellElements(),this.selectedCell=e.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectInitialIndex=function(){var e=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(e&&"string"==typeof e)if(this.queryCell(e))return void this.selectCell(e,!1,!0);var t=0;e&&this.slides[e]&&(t=e),this.select(t,!1,!0)}},p.selectCell=function(e,t,i){var n=this.queryCell(e);if(n){var o=this.getCellSlideIndex(n);this.select(o,t,i)}},p.getCellSlideIndex=function(e){for(var t=0;t<this.slides.length;t++){if(-1!=this.slides[t].cells.indexOf(e))return t}},p.getCell=function(e){for(var t=0;t<this.cells.length;t++){var i=this.cells[t];if(i.element==e)return i}},p.getCells=function(e){e=n.makeArray(e);var t=[];return e.forEach(function(e){var i=this.getCell(e);i&&t.push(i)},this),t},p.getCellElements=function(){return this.cells.map(function(e){return e.element})},p.getParentCell=function(e){var t=this.getCell(e);return t||(e=n.getParent(e,".flickity-slider > *"),this.getCell(e))},p.getAdjacentCellElements=function(e,t){if(!e)return this.selectedSlide.getCellElements();t=void 0===t?this.selectedIndex:t;var i=this.slides.length;if(1+2*e>=i)return this.getCellElements();for(var o=[],s=t-e;s<=t+e;s++){var a=this.options.wrapAround?n.modulo(s,i):s,r=this.slides[a];r&&(o=o.concat(r.getCellElements()))}return o},p.queryCell=function(e){if("number"==typeof e)return this.cells[e];if("string"==typeof e){if(e.match(/^[#\.]?[\d\/]/))return;e=this.element.querySelector(e)}return this.getCell(e)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(e){"touchstart"!=e.type&&e.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},n.debounceMethod(u,"onresize",150),p.resize=function(){if(this.isActive){this.getSize(),this.options.wrapAround&&(this.x=n.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var e=this.selectedElements&&this.selectedElements[0];this.selectCell(e,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=l(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(e){var t=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!t){var i=u.keyboardHandlers[e.keyCode];i&&i.call(this)}},u.keyboardHandlers={37:function(){var e=this.options.rightToLeft?"next":"previous";this.uiChange(),this[e]()},39:function(){var e=this.options.rightToLeft?"previous":"next";this.uiChange(),this[e]()}},p.focus=function(){var t=e.pageYOffset;this.element.focus({preventScroll:!0}),e.pageYOffset!=t&&e.scrollTo(e.pageXOffset,t)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEac
7h(function(e){e.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),e.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),r&&this.$element&&r.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},n.extend(p,a),u.data=function(e){var t=(e=n.getQueryElement(e))&&e.flickityGUID;return t&&d[t]},n.htmlInit(u,"flickity"),r&&r.bridget&&r.bridget("flickity",u),u.setJQuery=function(e){r=e},u.Cell=o,u.Slide=s,u})}),V=h(function(e){
8/*!
9     * Unipointer v2.3.0
10     * base class for doing one thing with pointer event
11     * MIT license
12     */
13!function(t,i){e.exports?e.exports=i(t,O):t.Unipointer=i(t,t.EvEmitter)}(window,function(e,t){function i(){}var n=i.prototype=Object.create(t.prototype);n.bindStartEvent=function(e){this._bindStartEvent(e,!0)},n.unbindStartEvent=function(e){this._bindStartEvent(e,!1)},n._bindStartEvent=function(t,i){var n=(i=void 0===i||i)?"addEventListener":"removeEventListener",o="mousedown";e.PointerEvent?o="pointerdown":"ontouchstart"in e&&(o="touchstart"),t[n](o,this)},n.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.getTouch=function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.identifier==this.pointerIdentifier)return i}},n.onmousedown=function(e){var t=e.button;t&&0!==t&&1!==t||this._pointerDown(e,e)},n.ontouchstart=function(e){this._pointerDown(e,e.changedTouches[0])},n.onpointerdown=function(e){this._pointerDown(e,e)},n._pointerDown=function(e,t){e.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,this.pointerDown(e,t))},n.pointerDown=function(e,t){this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t])};var o={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return n._bindPostStartEvents=function(t){if(t){var i=o[t.type];i.forEach(function(t){e.addEventListener(t,this)},this),this._boundPointerEvents=i}},n._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(t){e.removeEventListener(t,this)},this),delete this._boundPointerEvents)},n.onmousemove=function(e){this._pointerMove(e,e)},n.onpointermove=function(e){e.pointerId==this.pointerIdentifier&&this._pointerMove(e,e)},n.ontouchmove=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerMove(e,t)},n._pointerMove=function(e,t){this.pointerMove(e,t)},n.pointerMove=function(e,t){this.emitEvent("pointerMove",[e,t])},n.onmouseup=function(e){this._pointerUp(e,e)},n.onpointerup=function(e){e.pointerId==this.pointerIdentifier&&this._pointerUp(e,e)},n.ontouchend=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerUp(e,t)},n._pointerUp=function(e,t){this._pointerDone(),this.pointerUp(e,t)},n.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t])},n._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},n._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},n.pointerDone=function(){},n.onpointercancel=function(e){e.pointerId==this.pointerIdentifier&&this._pointerCancel(e,e)},n.ontouchcancel=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerCancel(e,t)},n._pointerCancel=function(e,t){this._pointerDone(),this.pointerCancel(e,t)},n.pointerCancel=function(e,t){this.emitEvent("pointerCancel",[e,t])},i.getPointerPoint=function(e){return{x:e.pageX,y:e.pageY}},i})}),W=h(function(e){
14/*!
15     * Unidragger v2.3.1
16     * Draggable base class
17     * MIT license
18     */
19!function(t,i){e.exports?e.exports=i(t,V):t.Unidragger=i(t,t.Unipointer)}(window,function(e,t){function i(){}var n=i.prototype=Object.create(t.prototype);n.bindHandles=function(){this._bindHandles(!0)},n.unbindHandles=function(){this._bindHandles(!1)},n._bindHandles=function(t){for(var i=(t=void 0===t||t)?"addEventListener":"removeEventListener",n=t?this._touchActionValue:"",o=0;o<this.handles.length;o++){var s=this.handles[o];this._bindStartEvent(s,t),s[i]("click",this),e.PointerEvent&&(s.style.touchAction=n)}},n._touchActionValue="none",n.pointerDown=function(e,t){this.okayPointerDown(e)&&(this.pointerDownPointer={pageX:t.pageX,pageY:t.pageY},e.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t]))};var o={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},s={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return n.okayPointerDown=function(e){var t=o[e.target.nodeName],i=s[e.target.type],n=!t||i;
19return n||this._pointerReset(),n},n.pointerDownBlur=function(){var e=document.activeElement;e&&e.blur&&e!=document.body&&e.blur()},n.pointerMove=function(e,t){var i=this._dragPointerMove(e,t);this.emitEvent("pointerMove",[e,t,i]),this._dragMove(e,t,i)},n._dragPointerMove=function(e,t){var i={x:t.pageX-this.pointerDownPointer.pageX,y:t.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(i)&&this._dragStart(e,t),i},n.hasDragStarted=function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3},n.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t]),this._dragPointerUp(e,t)},n._dragPointerUp=function(e,t){this.isDragging?this._dragEnd(e,t):this._staticClick(e,t)},n._dragStart=function(e,t){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(e,t)},n.dragStart=function(e,t){this.emitEvent("dragStart",[e,t])},n._dragMove=function(e,t,i){this.isDragging&&this.dragMove(e,t,i)},n.dragMove=function(e,t,i){e.preventDefault(),this.emitEvent("dragMove",[e,t,i])},n._dragEnd=function(e,t){this.isDragging=!1,setTimeout(function(){delete this.isPreventing
19Clicks}.bind(this)),this.dragEnd(e,t)},n.dragEnd=function(e,t){this.emitEvent("dragEnd",[e,t])},n.onclick=function(e){this.isPreventingClicks&&e.preventDefault()},n._staticClick=function(e,t){this.isIgnoringMouseUp&&"mouseup"==e.type||(this.staticClick(e,t),"mouseup"!=e.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},n.staticClick=function(e,t){this.emitEvent("staticClick",[e,t])},i.getPointerPoint=t.getPointerPoint,i})}),j=(h(function(e){!function(t,i){e.exports?e.exports=i(t,F,W,R):t.Flickity=i(t,t.Flickity,t.Unidragger,t.fizzyUIUtils)}(window,function(e,t,i,n){n.extend(t.defaults,{draggable:">1",dragThreshold:3}),t.createMethods.push("_createDrag");var o=t.prototype;n.extend(o,i.prototype),o._touchActionValue="pan-y";var s="createTouch"in document,a=!1;o._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),s&&!a&&(e.addEventListener("touchmove",function(){}),a=!0)},o.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},o.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},o.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},o.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},o.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},o._uiChangeDrag=function(){delete this.isFreeScrolling},o.pointerDown=function(t,i){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=l(),e.addEventListener("scroll",this),this._pointerDownDefault(t,i)):this._pointerDownDefault(t,i)},o._pointerDownDefault=function(e,t){this.pointerDownPointer={pageX:t.pageX,pageY:t.pageY},this._bindPostStartEvents(e),this.dispatchEvent("pointerDown",e,[t])};var r={INPUT:!0,TEXTAREA:!0,SELECT:!0};function l(){return{x:e.pageXOffset,y:e.pageYOffset}}return o.pointerDownFocus=function(e){r[e.target.nodeName]||this.focus()},o._pointerDownPreventDefault=function(e){var t="touchstart"==e.type,i="touch"==e.pointerType,n=r[e.target.nodeName];t||i||n||e.preventDefault()},o.hasDragStarted=function(e){return Math.abs(e.x)>this.options.dragThreshold},o.pointerUp=function(e,t){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",e,[t]),this._dragPointerUp(e,t)},o.pointerDone=function(){e.removeEventListener("scroll",this),delete this.pointerDownScroll},o.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),e.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},o.pointerMove=function(e,t){var i=this._dragPointerMove(e,t);this.dispatchEvent("pointerMove",e,[t,i]),this._dragMove(e,t,i)},o.dragMove=function(e,t,i){if(this.isDraggable){e.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x=i.x%this.slideableWidth);var o=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var s=Math.max(-this.slides[0].target,this.dragStartPosition);o=o>s?.5*(o+s):o;var a=Math.min(-this.getLastSlide().target,this.dragStartPosition);o=o<a?.5*(o+a):o}this.dragX=o,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",e,[t,i])}},o.dragEnd=function(e,t){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",e,[t])}},o.dragEndRestingSelect=function(){var e=this.getRestingPosition(),t=Math.abs(this.getSlideDistance(-e,this.selectedIndex)),i=this._getClosestResting(e,t,1),n=this._getClosestResting(e,t,-1);return i.distance<n.distance?i.index:n.index},o._getClosestResting=function(e,t,i){for(var n=this.selectedIndex,o=1/0,s=this.options.contain&&!this.options.wrapAround?function(e,t){return e<=t}:function(e,t){return e<t};s(t,o)&&(n+=i,o=t,null!==(t=this.getSlideDistance(-e,n)));)t=Math.abs(t);return{distance:o,index:n-i}},o.getSlideDistance=function(e,t){var i=this.slides.length,o=this.options.wrapAround&&i>1,s=o?n.modulo(t,i):t,a=this.slides[s];if(!a)return null;var r=o?this.slideableWidth*Math.floor(t/i):0;return e-(a.target+r)},o.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var e=this.getSlideDistance(-this.dragX,this.selectedIndex),t=this.previousDragX-this.dragX;return e>0&&t>0?1:e<0&&t<0?-1:0},o.staticClick=function(e,t){var i=this.getParentCell(e.target),n=i&&i.element,o=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",e,[t,n,o])},o.onscroll=function(){var e=l(),t=this.pointerDownScroll.x-e.x,i=this.pointerDownScroll.y-e.y;(Math.abs(t)>3||Math.abs(i)>3)&&this._pointerDone()},t})}),h(function(e){!function(t,i){e.exports?e.exports=i(t,F,V,R):i(t,t.Flickity,t.Unipointer,t.fizzyUIUtils)}(window,function(e,t,i,n){var o="http://www.w3.org/2000/svg";function s(e,t){this.direction=e,this.parent=t,this._create()}s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var e=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==e;var t=this.element=document.createElement("button");t.className="flickity-button flickity-prev-next-button",t.className+=this.isPrevious?" previous":" next",t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();t.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var e=document.createElementNS(o,"svg");e.setAttribute("class","flickity-button-icon"),e.setAttribute("viewBox","0 0 100 100");var t=document.createElementNS(o,"path"),i=function(e){if("string"==typeof e)return e;return"M "+e.x0+",50 L "+e.x1+","+(e.y1+50)+" L "+e.x2+","+(e.y2+50)+" L "+e.x3+",50  L "+e.x2+","+(50-e.y2)+" L "+e.x1+","+(50-e.y1)+" Z"}(this.parent.options.arrowShape);return t.setAttribute("d",i),t.setAttribute("class","arrow"),this.isLeft||t.setAttribute("transform","translate(100, 100) rotate(180) "),e.appendChild(t),e},s.prototype.handleEvent=n.handleEvent,s.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var e=this.isPrevious?"previous":"next";this.parent[e]()}},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var e=this.parent.slides;if(this.parent.options.wrapAround&&e.length>1)this.enable();else{var t=e.length?e.length-1:0,i=this.isPrevious?0:t;this[this.parent.selectedIndex==i?"disable":"enable"]()}},s.prototype.destroy=function(){this.deactivate(),this.allOff()},n.extend(t.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),t.createMethods.push("_createPrevNextButtons");var a=t.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},t.PrevNextButton=s,t})}),h(function(e){!function(t,i){e.exports?e.exports=i(t,F,V,R):i(t,t.Flickity,t.Unipointer,t.fizzyUIUtils)}(window,function(e,t,i,n){function o(e){this.parent=e,this._create()}o.prototype=Object.create(i.prototype),o.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},o.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},o.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},o.prototype.setDots=function(){var e=this.parent.slides.length-this.dots.length;e>0?this.addDots(e):e<0&&this.removeDots(-e)},o.prototype.addDots=function(e){for(var t=document.createDocumentFragment(),i=[],n=this.dots.length,o=n+e,s=n;s<o;s++){var a=document.createElement("li");a.className="dot",a.setAttribute("aria-label","Page dot "+(s+1)),t.appendChild(a),i.push(a)}this.holder.appendChild(t),this.dots=this.dots.concat(i)},o.prototype.removeDots=function(e){this.dots.splice(this.dots.length-e,e).forEach(function(e){this.holder.removeChild(e)},this)},o.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},o.prototype.onTap=o.prototype.onClick=function(e){var t=e.target;if("LI"==t.nodeName){this.parent.uiChange();var i=this.dots.indexOf(t);this.parent.select(i)}},o.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=o,n.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");var s=t.prototype;return s._createPageDots=function(){this.options.pageDots&&(this.pageDots=new o(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},s.activatePageDots=function(){this.pageDots.activate()},s.updateSelectedPageDots=function(){this.pageDots.updateSelected()},s.updatePageDots=function(){this.pageDots.setDots()},s.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=o,t})}),h(function(e){!function(t,i){e.exports?e.exports=i(O,R,F):i(t.EvEmitter,t.fizzyUIUtils,t.Flickity)}(window,function(e,t,i){function n(e){this.parent=e,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}n.prototype=Object.create(e.prototype),n.prototype.play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},n.prototype.tick=function(){if("playing"==this.state){var e=this.parent.options.autoPlay;e="number"==typeof e?e:3e3;var t=this;this.clear(),this.timeout=setTimeout(function(){t.parent.next(!0),t.tick()},e)}},n.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},n.prototype.unpause=function(){"paused"==this.state&&this.play()},n.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},n.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},t.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");var o=i.prototype;return o._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},o.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},o.playPlayer=function(){this.player.play()},o.stopPlayer=function(){this.player.stop()},o.pausePlayer=function(){this.player.pause()},o.unpausePlayer=function(){this.player.unpause()},o.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},o.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},o.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=n,i})}),h(function(e){!function(t,i){e.exports?e.exports=i(t,F,R):i(t,t.Flickity,t.fizzyUIUtils)}(window,function(e,t,i){var n=t.prototype;return n.insert=function(e,t){var i=this._makeCells(e);if(i&&i.length){var n=this.cells.length;t=void 0===t?n:t;var o=function(e){var t=document.createDocumentFragment();return e.forEach(function(e){t.appendChild(e.element)}),t}(i),s=t==n;
19if(s)this.slider.appendChild(o);else{var a=this.cells[t].element;this.slider.insertBefore(o,a)}if(0===t)this.cells=i.concat(this.cells);else if(s)this.cells=this.cells.concat(i);else{var r=this.cells.splice(t,n-t);this.cells=this.cells.concat(i).concat(r)}this._sizeCells(i),this.cellChange(t,!0)}},n.append=function(e){this.insert(e,this.cells.length)},n.prepend=function(e){this.insert(e,0)},n.remove=function(e){var t=this.getCells(e);if(t&&t.length){var n=this.cells.length-1;t.forEach(function(e){e.remove();var t=this.cells.indexOf(e);n=Math.min(t,n),i.removeFrom(this.cells,e)},this),this.cellChange(n,!0)}},n.cellSizeChange=function(e){var t=this.getCell(e);if(t){t.getSize();var i=this.cells.indexOf(t);this.cellChange(i)}},n.cellChange=function(e,t){var i=this.selectedElement;this._positionCells(e),this._getWrapShiftCells(),this.setGallerySize();var n=this.getCell(i);n&&(this.selectedIndex=this.getCellSlideIndex(n)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[e]),this.select(this.selectedIndex),t&&this.positionSliderAtSelected()},t})}),h(function(e){!function(t,i){e.exports?e.exports=i(t,F,R):i(t,t.Flickity,t.fizzyUIUtils)}(window,function(e,t,i){t.createMethods.push("_createLazyload");var n=t.prototype;function o(e,t){this.img=e,this.flickity=t,this.load()}return n._createLazyload=function(){this.on("select",this.lazyLoad)},n.lazyLoad=function(){var e=this.options.lazyLoad;if(e){var t="number"==typeof e?e:0,n=this.getAdjacentCellElements(t),s=[];n.forEach(function(e){var t=function(e){if("IMG"==e.nodeName){var t=e.getAttribute("data-flickity-lazyload"),n=e.getAttribute("data-flickity-lazyload-src"),o=e.getAttribute("data-flickity-lazyload-srcset");if(t||n||o)return[e]}var s="img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]",a=e.querySelectorAll(s);return i.makeArray(a)}(e);s=s.concat(t)}),s.forEach(function(e){new o(e,this)},this)}},o.prototype.handleEvent=i.handleEvent,o.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var e=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),t=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=e,t&&this.img.setAttribute("srcset",t),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},o.prototype.onload=function(e){this.complete(e,"flickity-lazyloaded")},o.prototype.onerror=function(e){this.complete(e,"flickity-lazyerror")},o.prototype.complete=function(e,t){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),n=i&&i.element;this.flickity.cellSizeChange(n),this.img.classList.add(t),this.flickity.dispatchEvent("lazyLoad",e,n)},t.LazyLoader=o,t})}),h(function(e){
20/*!
21     * Flickity v2.2.1
22     * Touch, responsive, flickable carousels
23     *
24     * Licensed GPLv3 for open source use
25     * or Flickity Commercial License for commercial use
26     *
27     * https://flickity.metafizzy.co
28     * Copyright 2015-2019 Metafizzy
29     */
30window,e.exports&&(e.exports=F)})),X=h(function(e){!function(t,i){e.exports?e.exports=i(j,R):i(t.Flickity,t.fizzyUIUtils)}(c,function(e,t){var i=e.Slide,n=i.prototype.updateTarget;i.prototype.updateTarget=function(){if(n.apply(this,arguments),this.parent.options.fade){var e=this.target-this.x,t=this.cells[0].x;this.cells.forEach(function(i){var n=i.x-t-e;i.renderPosition(n)})}},i.prototype.setOpacity=function(e){this.cells.forEach(function(t){t.element.style.opacity=e})};var o=e.prototype;e.createMethods.push("_createFade"),o._createFade=function(){this.fadeIndex=this.selectedIndex,this.prevSelectedIndex=this.selectedIndex,this.on("select",this.onSelectFade),this.on("dragEnd",this.onDragEndFade),this.on("settle",this.onSettleFade),this.on("activate",this.onActivateFade),this.on("deactivate",this.onDeactivateFade)};var s=o.updateSlides;o.updateSlides=function(){s.apply(this,arguments),this.options.fade&&this.slides.forEac
30h(function(e,t){var i=t==this.selectedIndex?1:0;e.setOpacity(i)},this)},o.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},o.onSettleFade=function(){(delete this.didDragEnd,this.options.fade)&&(this.selectedSlide.setOpacity(1),this.slides[this.fadeIndex]&&this.fadeIndex!=this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0))},o.onDragEndFade=function(){this.didDragEnd=!0},o.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},o.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEach(function(e){e.setOpacity("")}))};var a=o.positionSlider;o.positionSlider=function(){this.options.fade?(this.fadeSlides(),this.dispatchScrollEvent()):a.apply(this,arguments)};var r=o.positionSliderAtSelected;o.positionSliderAtSelected=function(){this.options.fade&&this.setTranslateX(0),r.apply(this,arguments)},o.fadeSlides=function(){if(!(this.slides.length<2)){var e=this.getFadeIndexes(),t=this.slides[e.a],i=this.slides[e.b],n=this.wrapDifference(t.target,i.target),o=this.wrapDifference(t.target,-this.x);o/=n,t.setOpacity(1-o),i.setOpacity(o);var s=e.a;this.isDragging&&(s=o>.5?e.a:e.b),null!=this.fadeHideIndex&&this.fadeHideIndex!=s&&this.fadeHideIndex!=e.a&&this.fadeHideIndex!=e.b&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=s}},o.getFadeIndexes=function(){return this.isDragging||this.didDragEnd?this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes():{a:this.fadeIndex,b:this.selectedIndex}},o.getFadeDragWrapIndexes=function(){var e=this.slides.map(function(e,t){return this.getSlideDistance(-this.x,t)},this),i=e.map(function(e){return Math.abs(e)}),n=Math.min.apply(Math,i),o=i.indexOf(n),s=e[o],a=this.slides.length,r=s>=0?1:-1;return{a:o,b:t.modulo(o+r,a)}},o.getFadeDragLimitIndexes=function(){for(var e=0,t=0;t<this.slides.length-1;t++){var i=this.slides[t];if(-this.x<i.target)break;e=t}return{a:e,b:e+1}},o.wrapDifference=function(e,t){var i=t-e;if(!this.options.wrapAround)return i;var n=i+this.slideableWidth,o=i-this.slideableWidth;return Math.abs(n)<Math.abs(i)&&(i=n),Math.abs(o)<Math.abs(i)&&(i=o),i};var l=o._getWrapShiftCells;o._getWrapShiftCells=function(){this.options.fade||l.apply(this,arguments)};var c=o.shiftWrapCells;return o.shiftWrapCells=function(){this.options.fade||c.apply(this,arguments)},e})});function Y(t){return Y="function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?function(t){return e(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},Y(t)}var G="object"===("undefined"==typeof HTMLElement?"undefined":Y(HTMLElement));function J(e){return G?e instanceof HTMLElement:e&&"object"===Y(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function Q(e,t){t.forEach(function(t){e.classList.add(t)})}function Z(e,t){t.forEach(function(t){e.classList.remove(t)})}function K(){throw new Error("Missing parameter")}function $(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ee=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isShowing=!1;var i=t.namespace,n=void 0===i?null:i,o=t.zoomFactor,s=void 0===o?K():o,a=t.containerEl,r=void 0===a?K():a;this.settings={namespace:n,zoomFactor:s,containerEl:r},this.openClasses=this._buildClasses("open"),this._buildElement()}var t,i,n;return t=e,(i=[{key:"_buildClasses",value:function(e){var t=["drift-".concat(e)],i=this.settings.namespace;return i&&t.push("".concat(i,"-").concat(e)),t}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),Q(this.el,this._buildClasses("bounding-box"))}},{key:"show",value:function(e,t){this.isShowing=!0,this.settings.containerEl.appendChild(this.el);var i=this.el.style;i.width="".concat(Math.round(e/this.settings.zoomFactor),"px"),i.height="".concat(Math.round(t/this.settings.zoomFactor),"px"),Q(this.el,this.openClasses)}},{key:"hide",value:function(){this.isShowing&&this.settings.containerEl.removeChild(this.el),this.isShowing=!1,Z(this.el,this.openClasses)}},{key:"setPosition",value:function(e,t,i){var n=window.pageXOffset,o=window.pageYOffset,s=i.left+e*i.width-this.el.clientWidth/2+n,a=i.top+t*i.height-this.el.clientHeight/2+o;s<i.left+n?s=i.left+n:s+this.el.clientWidth>i.left+i.width+n&&(s=i.left+i.width-this.el.clientWidth+n),a<i.top+o?a=i.top+o:a+this.el.clientHeight>i.top+i.height+o&&(a=i.top+i.height-this.el.clientHeight+o),this.el.style.left="".concat(s,"px"),this.el.style.top="".concat(a,"px")}}
30])&&$(t.prototype,i),n&&$(t,n),e}();function te(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ie=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._show=this._show.bind(this),this._hide=this._hide.bind(this),this._handleEntry=this._handleEntry.bind(this),this._handleMovement=this._handleMovement.bind(this);var i=t.el,n=void 0===i?K():i,o=t.zoomPane,s=void 0===o?K():o,a=t.sourceAttribute,r=void 0===a?K():a,l=t.handleTouch,c=void 0===l?K():l,h=t.onShow,d=void 0===h?null:h,u=t.onHide,p=void 0===u?null:u,m=t.hoverDelay,f=void 0===m?0:m,v=t.touchDelay,g=void 0===v?0:v,y=t.hoverBoundingBox,b=void 0===y?K():y,w=t.touchBoundingBox,_=void 0===w?K():w,k=t.namespace,E=void 0===k?null:k,S=t.zoomFactor,C=void 0===S?K():S,L=t.boundingBoxContainer,x=void 0===L?K():L;this.settings={el:n,zoomPane:s,sourceAttribute:r,handleTouch:c,onShow:d,onHide:p,hoverDelay:f,touchDelay:g,hoverBoundingBox:b,touchBoundingBox:_,namespace:E,zoomFactor:C,boundingBoxContainer:x},(this.settings.hoverBoundingBox||this.settings.touchBoundingBox)&&(this.boundingBox=new ee({namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,containerEl:this.settings.boundingBoxContainer})),this.enabled=!0,this._bindEvents()}var t,i,n;return t=e,(i=[{key:"_preventDefault",value:function(e){e.preventDefault()}},{key:"_preventDefaultAllowTouchScroll",value:function(e){this.settings.touchDelay&&this._isTouchEvent(e)&&!this.isShowing||e.preventDefault()}},{key:"_isTouchEvent",value:function(e){return!!e.touches}},{key:"_bindEvents",value:function(){this.settings.el.addEventListener("mouseenter",this._handleEntry,!1),this.settings.el.addEventListener("mouseleave",this._hide,!1),this.settings.el.addEventListener("mousemove",this._handleMovement,!1),this.settings.handleTouch?(this.settings.el.addEventListener("touchstart",this._handleEntry,!1),this.settings.el.addEventListener("touchend",this._hide,!1),this.settings.el.addEventListener("touchmove",this._handleMovement,!1)):(this.settings.el.addEventListener("touchstart",this._preventDefault,!1),this.settings.el.addEventListener("touchend",this._preventDefault,!1),this.settings.el.addEventListener("touchmove",this._preventDefault,!1))}},{key:"_unbindEvents",value:function(){this.settings.el.removeEventListener("mouseenter",this._handleEntry,!1),this.settings.el.removeEventListener("mouseleave",this._hide,!1),this.settings.el.removeEventListener("mousemove",this._handleMovement,!1),this.settings.handleTouch?(this.settings.el.removeEventListener("touchstart",this._handleEntry,!1),this.settings.el.removeEventListener("touchend",this._hide,!1),this.settings.el.removeEventListener("touchmove",this._handleMovement,!1)):(this.settings.el.removeEventListener("touchstart",this._preventDefault,!1),this.settings.el.removeEventListener("touchend",this._preventDefault,!1),this.settings.el.removeEventListener("touchmove",this._preventDefault,!1))}},{key:"_handleEntry",value:function(e){this._preventDefaultAllowTouchScroll(e),this._lastMovement=e,"mouseenter"==e.type&&this.settings.hoverDelay?this.entryTimeout=setTimeout(this._show,this.settings.hoverDelay):this.settings.touchDelay?this.entryTimeout=setTimeout(this._show,this.settings.touchDelay):this._show()}},{key:"_show",value:function(){if(this.enabled){var e=this.settings.onShow;if(e&&"function"==typeof e&&e(),this.settings.zoomPane.show(this.settings.el.getAttribute(this.settings.sourceAttribute),this.settings.el.clientWidth,this.settings.el.clientHeight),this._lastMovement){var t=this._lastMovement.touches;(t&&this.settings.touchBoundingBox||!t&&this.settings.hoverBoundingBox)&&this.boundingBox.show(this.settings.zoomPane.el.clientWidth,this.settings.zoomPane.el.clientHeight)}this._handleMovement()}}},{key:"_hide",value:function(e){e&&this._preventDefaultAllowTouchScroll(e),this._lastMovement=null,this.entryTimeout&&clearTimeout(this.entryTimeout),this.boundingBox&&this.boundingBox.hide();var t=this.settings.onHide;t&&"function"==typeof t&&t(),this.settings.zoomPane.hide()}},{key:"_handleMovement",value:function(e){if(e)this._preventDefaultAllowTouchScroll(e),this._lastMovement=e;else{if(!this._lastMovement)return;e=this._lastMovement}var t,i;if(e.touches){var n=e.touches[0];t=n.clientX,i=n.clientY}else t=e.clientX,i=e.clientY;var o=this.settings.el.getBoundingClientRect(),s=t-o.left,a=i-o.top,r=s/this.settings.el.clientWidth,l=a/this.settings.el.clientHeight;this.boundingBox&&this.boundingBox.setPosition(r,l,o),this.settings.zoomPane.setPosition(r,l,o)}},{key:"isShowing",get:function(){return this.settings.zoomPane.isShowing}}
30])&&te(t.prototype,i),n&&te(t,n),e}();function ne(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var oe=document.createElement("div").style,se="undefined"!=typeof document&&("animation"in oe||"webkitAnimation"in oe),ae=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._completeShow=this._completeShow.bind(this),this._completeHide=this._completeHide.bind(this),this._handleLoad=this._handleLoad.bind(this),this.isShowing=!1;var i=t.container,n=void 0===i?null:i,o=t.zoomFactor,s=void 0===o?K():o,a=t.inline,r=void 0===a?K():a,l=t.namespace,c=void 0===l?null:l,h=t.showWhitespaceAtEdges,d=void 0===h?K():h,u=t.containInline,p=void 0===u?K():u,m=t.inlineOffsetX,f=void 0===m?0:m,v=t.inlineOffsetY,g=void 0===v?0:v,y=t.inlineContainer,b=void 0===y?document.body:y;this.settings={container:n,zoomFactor:s,inline:r,namespace:c,showWhitespaceAtEdges:d,containInline:p,inlineOffsetX:f,inlineOffsetY:g,inlineContainer:b},this.openClasses=this._buildClasses("open"),this.openingClasses=this._buildClasses("opening"),this.closingClasses=this._buildClasses("closing"),this.inlineClasses=this._buildClasses("inline"),this.loadingClasses=this._buildClasses("loading"),this._buildElement()}var t,i,n;return t=e,(i=[{key:"_buildClasses",value:function(e){var t=["drift-".concat(e)],i=this.settings.namespace;return i&&t.push("".concat(i,"-").concat(e)),t}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),Q(this.el,this._buildClasses("zoom-pane"));var e=document.createElement("div");Q(e,this._buildClasses("zoom-pane-loader")),this.el.appendChild(e),this.imgEl=document.createElement("img"),this.el.appendChild(this.imgEl)}},{key:"_setImageURL",value:function(e){this.imgEl.setAttribute("src",e)}},{key:"_setImageSize",value:function(e,t){this.imgEl.style.width="".concat(e*this.settings.zoomFactor,"px"),this.imgEl.style.height="".concat(t*this.settings.zoomFactor,"px")}},{key:"setPosition",value:function(e,t,i){var n=this.imgEl.offsetWidth,o=this.imgEl.offsetHeight,s=this.el.offsetWidth,a=this.el.offsetHeight,r=s/2-n*e,l=a/2-o*t,c=s-n,h=a-o,d=c>0,u=h>0,p=d?c/2:0,m=u?h/2:0,f=d?c/2:c,v=u?h/2:h;if(this.el.parentElement===this.settings.inlineContainer){var g=window.pageXOffset,y=window.pageYOffset,b=i.left+e*i.width-s/2+this.settings.inlineOffsetX+g,w=i.top+t*i.height-a/2+this.settings.inlineOffsetY+y;this.settings.containInline&&(b<i.left+g?b=i.left+g:b+s>i.left+i.width+g&&(b=i.left+i.width-s+g),w<i.top+y?w=i.top+y:w+a>i.top+i.height+y&&(w=i.top+i.height-a+y)),this.el.style.left="".concat(b,"px"),this.el.style.top="".concat(w,"px")}this.settings.showWhitespaceAtEdges||(r>p?r=p:r<f&&(r=f),l>m?l=m:l<v&&(l=v)),this.imgEl.style.transform="translate(".concat(r,"px, ").concat(l,"px)"),this.imgEl.style.webkitTransform="translate(".concat(r,"px, ").concat(l,"px)")}},{key:"_removeListenersAndResetClasses",value:function(){this.el.removeEventListener("animationend",this._completeShow,!1),this.el.removeEventListener("animationend",this._completeHide,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeShow,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeHide,!1),Z(this.el,this.openClasses),Z(this.el,this.closingClasses)}},{key:"show",value:function(e,t,i){this._removeListenersAndResetClasses(),this.isShowing=!0,Q(this.el,this.openClasses),this.imgEl.getAttribute("src")!=e&&(Q(this.el,this.loadingClasses),this.imgEl.addEventListener("load",this._handleLoad,!1),this._setImageURL(e)),this._setImageSize(t,i),this._isInline?this._showInline():this._showInContainer(),se&&(this.el.addEventListener("animationend",this._completeShow,!1),this.el.addEventListener("webkitAnimationEnd",this._completeShow,!1),Q(this.el,this.openingClasses))}},{key:"_showInline",value:function(){this.settings.inlineContainer.appendChild(this.el),Q(this.el,this.inlineClasses)}},{key:"_showInContainer",value:function(){this.settings.container.appendChild(this.el)}},{key:"hide",value:function(){this._removeListenersAndResetClasses(),this.isShowing=!1,se?(this.el.addEventListener("animationend",this._completeHide,!1),this.el.addEventListener("webkitAnimationEnd",this._completeHide,!1),Q(this.el,this.closingClasses)):(Z(this.el,this.openClasses),Z(this.el,this.inlineClasses))}},{key:"_completeShow",value:function(){this.el.removeEventListener("animationend",this._completeShow,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeShow,!1),Z(this.el,this.openingClasses)}},{key:"_completeHide",value:function(){this.el.removeEventListener("animationend",this._completeHide,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeHide,!1),Z(this.el,this.openClasses),Z(this.el,this.closingClasses),Z(this.el,this.inlineClasses),this.el.setAttribute("style",""),this.el.parentElement===this.settings.container?this.settings.container.removeChild(this.el):this.el.parentElement===this.settings.inlineContainer&&this.settings.inlineContainer.removeChild(this.el)}}
30,{key:"_handleLoad",value:function(){this.imgEl.removeEventListener("load",this._handleLoad,!1),Z(this.el,this.loadingClasses)}},{key:"_isInline",get:function(){var e=this.settings.inline;return!0===e||"number"==typeof e&&window.innerWidth<=e}}])&&ne(t.prototype,i),n&&ne(t,n),e}();function re(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var le=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.VERSION="1.4.0",this.triggerEl=t,this.destroy=this.destroy.bind(this),!J(this.triggerEl))throw new TypeError("`new Drift` requires a DOM element as its first argument.");var n=i.namespace||null,o=i.showWhitespaceAtEdges||!1,s=i.containInline||!1,a=i.inlineOffsetX||0,r=i.inlineOffsetY||0,l=i.inlineContainer||document.body,c=i.sourceAttribute||"data-zoom",h=i.zoomFactor||3,d=void 0===i.paneContainer?document.body:i.paneContainer,u=i.inlinePane||375,p=!("handleTouch"in i)||!!i.handleTouch,m=i.onShow||null,f=i.onHide||null,v=!("injectBaseStyles"in i)||!!i.injectBaseStyles,g=i.hoverDelay||0,y=i.touchDelay||0,b=i.hoverBoundingBox||!1,w=i.touchBoundingBox||!1,_=i.boundingBoxContainer||document.body;if(!0!==u&&!J(d))throw new TypeError("`paneContainer` must be a DOM element when `inlinePane !== true`");if(!J(l))throw new TypeError("`inlineContainer` must be a DOM element");this.settings={namespace:n,showWhitespaceAtEdges:o,containInline:s,inlineOffsetX:a,inlineOffsetY:r,inlineContainer:l,sourceAttribute:c,zoomFactor:h,paneContainer:d,inlinePane:u,handleTouch:p,onShow:m,onHide:f,injectBaseStyles:v,hoverDelay:g,touchDelay:y,hoverBoundingBox:b,touchBoundingBox:w,boundingBoxContainer:_},this.settings.injectBaseStyles&&function(){if(!document.querySelector(".drift-base-styles")){var e=document.createElement("style");e.type="text/css",e.classList.add("drift-base-styles"),e.appendChild(document.createTextNode(".drift-bounding-box,.drift-zoom-pane{position:absolute;pointer-events:none}@keyframes noop{0%{zoom:1}}@-webkit-keyframes noop{0%{zoom:1}}.drift-zoom-pane.drift-open{display:block}.drift-zoom-pane.drift-closing,.drift-zoom-pane.drift-opening{animation:noop 1ms;-webkit-animation:noop 1ms}.drift-zoom-pane{overflow:hidden;width:100%;height:100%;top:0;left:0}.drift-zoom-pane-loader{display:none}.drift-zoom-pane img{position:absolute;display:block;max-width:none;max-height:none}"));var t=document.head;t.insertBefore(e,t.firstChild)}}(),this._buildZoomPane(),this._buildTrigger()}var t,i,n;return t=e,(i=[{key:"_buildZoomPane",value:function(){this.zoomPane=new ae({container:this.settings.paneContainer,zoomFactor:this.settings.zoomFactor,showWhitespaceAtEdges:this.settings.showWhitespaceAtEdges,containInline:this.settings.containInline,inline:this.settings.inlinePane,namespace:this.settings.namespace,inlineOffsetX:this.settings.inlineOffsetX,inlineOffsetY:this.settings.inlineOffsetY,inlineContainer:this.settings.inlineContainer})}},{key:"_buildTrigger",value:function(){this.trigger=new ie({el:this.triggerEl,zoomPane:this.zoomPane,handleTouch:this.settings.handleTouch,onShow:this.settings.onShow,onHide:this.settings.onHide,sourceAttribute:this.settings.sourceAttribute,hoverDelay:this.settings.hoverDelay,touchDelay:this.settings.touchDelay,hoverBoundingBox:this.settings.hoverBoundingBox,touchBoundingBox:this.settings.touchBoundingBox,namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,boundingBoxContainer:this.settings.boundingBoxContainer})}},{key:"setZoomImageURL",value:function(e){this.zoomPane._setImageURL(e)}},{key:"disable",value:function(){this.trigger.enabled=!1}},{key:"enable",value:function(){this.trigger.enabled=!0}},{key:"destroy",value:function(){this.trigger._hide(),this.trigger._unbindEvents()}},{key:"isShowing",get:function(){return this.zoomPane.isShowing}},{key:"zoomFactor",get:function(){return this.settings.zoomFactor},set:function(e){this.settings.zoomFactor=e,this.zoomPane.settings.zoomFactor=e,this.trigger.settings.zoomFactor=e,this.boundingBox.settings.zoomFactor=e}}
30])&&re(t.prototype,i),n&&re(t,n),e}();Object.defineProperty(le.prototype,"isShowing",{get:function(){return this.isShowing}}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this.zoomFactor},set:function(e){this.zoomFactor=e}}),le.prototype.setZoomImageURL=le.prototype.setZoomImageURL,le.prototype.disable=le.prototype.disable,le.prototype.enable=le.prototype.enable,le.prototype.destroy=le.prototype.destroy;var ce,he,de=function(){function e(i,n){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.viewInSpaceElement=this.element.querySelector("[data-shopify-xr]"),this.options=n,this.media={},this.previouslySelectedMedia=null,this._createCarousel(),this._createZoom(),this._attachListeners()}return n(e,[{key:"destroy",value:function(){for(var e in this.flickityInstance&&this.flickityInstance.destroy(),this.media)this.media.hasOwnProperty(e)&&this.media[e].destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("model:played",this._disableDrag.bind(this)),this.delegateElement.on("video:played",this._disableDrag.bind(this)),this.delegateElement.on("model:paused",this._enableDrag.bind(this)),this.delegateElement.on("video:paused",this._enableDrag.bind(this))}},{key:"variantHasChanged",value:function(e){var t=this,i=!1;y.mutate(function(){(t.productGalleryCellsElements.forEach(function(n,o){if(n.hasAttribute("data-group-name")){var s=n.getAttribute("data-group-name");t.options.productOptions.forEach(function(i,a){i.toLowerCase()===s&&(e["option".concat(a+1)].toLowerCase()===n.getAttribute("data-group-value")||e.featured_media&&e.featured_media.id===parseInt(n.getAttribute("data-media-id"))?(n.classList.remove("is-filtered"),t.productThumbnailsCellsElements[o].classList.remove("is-filtered")):(n.classList.add("is-filtered"),t.productThumbnailsCellsElements[o].classList.add("is-filtered")))}),i=!0}}),i&&(t.flickityInstance.deactivate(),t.flickityInstance.activate()),v.matchesBreakpoint("lap-and-up"))&&t.element.querySelectorAll(".product-gallery__carousel-item").forEach(function(e){e.classList.remove("product-gallery__carousel-item--hidden")});e&&e.featured_media&&t.flickityInstance.selectCell('[data-media-id="'.concat(e.featured_media.id,'"]'))})}},{key:"_createCarousel",value:function(){var e=this;if(this.productGalleryElement=this.element.querySelector(".product-gallery__carousel"),this.productGalleryCellsElements=this.productGalleryElement?this.productGalleryElement.querySelectorAll(".product-gallery__carousel-item"):[],this.productGalleryElement&&(this.productGalleryCellsElements.forEach(function(t){switch(t.getAttribute("data-media-type")){case"external_video":case"video":e.media[t.getAttribute("data-media-id")]=new q(t,e.options.enableVideoLooping);break;case"model":e.media[t.getAttribute("data-media-id")]=new D(t)}}),parseInt(this.productGalleryElement.getAttribute("data-media-count"))>1)){var t=[].slice.call(this.productGalleryCellsElements).filter(function(e){return!e.classList.contains("is-filtered")}),i=0;t.forEach(function(t,n){t.getAttribute("data-media-id")===e.productGalleryElement.getAttribute("data-initial-media-id")&&(i=n)}),this.flickityInstance=new X(this.productGalleryElement,{accessibility:!1,prevNextButtons:!0,pageDots:!0,adaptiveHeight:!0,draggable:!v.matchesBreakpoint("supports-hover"),fade:"fade"===this.options.galleryTransitionEffect,cellSelector:".product-gallery__carousel-item:not(.is-filtered)",initialIndex:i})}this.productThumbnailsListElement=this.element.querySelector(".product-gallery__thumbnail-list"),this.productThumbnailsListElement&&this.flickityInstance&&(this.productThumbnailsCellsElements=this.productThumbnailsListElement.querySelectorAll(".product-gallery__thumbnail"),this.delegateElement.on("click",".product-gallery__thumbnail",this._onThumbnailClicked.bind(this)),this.flickityInstance.on("select",this._onGallerySlideChanged.bind(this)),"fade"===this.options.galleryTransitionEffect?this.flickityInstance.on("select",this._onGallerySlideSettled.bind(this)):this.flickityInstance.on("settle",this._onGallerySlideSettled.bind(this)),this._onGallerySlideChanged(!1),this._onGallerySlideSettled())}},{key:"_createZoom",value:function(){var e=this;if(this.options.enableImageZoom){this.driftObjects=[];var t=this.element.querySelector(".product__zoom-wrapper");v.matchesBreakpoint("supports-hover")&&this.element.querySelectorAll(".product-gallery__image").forEach(function(i){e.driftObjects.push(new le(i,{containInl
30ine:"outside"===e.options.zoomEffect,inlinePane:window.innerWidth<1024||"outside"!==e.options.zoomEffect,hoverBoundingBox:"outside"===e.options.zoomEffect,handleTouch:!1,inlineOffsetY:window.innerWidth<1024?-85:0,paneContainer:t}))})}}},{key:"_onGallerySlideChanged",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,n=null;if(this.productThumbnailsCellsElements.forEach(function(t){t.classList.contains("is-nav-selected")&&(i=t),t.getAttribute("data-media-id")===e.flickityInstance.selectedElement.getAttribute("data-media-id")&&(n=t)}),i.classList.remove("is-nav-selected"),n.classList.add("is-nav-selected"),v.matchesBreakpoint("pocket")){var o=n.offsetLeft-(this.productThumbnailsListElement.parentNode.clientWidth-n.clientWidth)/2;this.productThumbnailsListElement.parentNode.scrollTo({left:o,behavior:t?"smooth":"auto"})}else{var s=n.offsetTop-(this.productThumbnailsListElement.clientHeight-n.clientHeight)/2;this.productThumbnailsListElement.scrollTo({top:s,behavior:t?"smooth":"auto"})}}},{key:"_onGallerySlideSettled",value:function(){(this._handleMedia(this.flickityInstance.selectedElement),v.matchesBreakpoint("lap-and-up"))&&this.element.querySelectorAll(".product-gallery__carousel-item:not(.is-selected)").forEach(function(e){e.classList.add("product-gallery__carousel-item--hidden")})}},{key:"_onThumbnailClicked",value:function(e,t){(this.flickityInstance.selectCell('[data-media-id="'.concat(t.getAttribute("data-media-id"),'"]')),e.preventDefault(),v.matchesBreakpoint("lap-and-up"))&&this.element.querySelectorAll(".product-gallery__carousel-item").forEach(function(e){e.classList.remove("product-gallery__carousel-item--hidden")})}},{key:"_disableDrag",value:function(){this.flickityInstance.options.draggable=!1,this.flickityInstance.updateDraggable()}},{key:"_enableDrag",value:function(){this.flickityInstance.options.draggable=!v.matchesBreakpoint("supports-hover"),this.flickityInstance.updateDraggable()}},{key:"_handleMedia",value:function(e){var t=null===this.previouslySelectedMedia;if(this.previouslySelectedMedia&&this.previouslySelectedMedia!==e){switch(this.previouslySelectedMedia.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[this.previouslySelectedMedia.getAttribute("data-media-id")].hasBeenDeselected()}"model"===this.previouslySelectedMedia.getAttribute("data-media-type")&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",this.viewInSpaceElement.getAttribute("data-shopify-model3d-default-id"))}switch(e.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[e.getAttribute("data-media-id")].hasBeenSelected(t),this.element.querySelector(".product-gallery__carousel").classList.remove("product-gallery__carousel--zoomable");break;case"image":this.element.querySelector(".product-gallery__carousel").classList.add("product-gallery__carousel--zoomable")}"model"===e.getAttribute("data-media-type")&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",e.getAttribute("data-media-id")),this.previouslySelectedMedia=e}}]),e}(),ue=function(){function e(i){t(this,e),this.element=i,this._attachListeners()}return n(e,[{key:"_attachListeners",value:function(){this.element.addEventListener("change",this._onSelectValueChanged.bind(this))}},{key:"_onSelectValueChanged",value:function(e){if(10===parseInt(e.target.value)){var t=e.target.closest(".select-wrapper"),i=document.createElement("input");i.id=e.target.id,i.className="product-form__quantity form__field form__field--small form__field--text",i.pattern="[0-9]*",i.name="quantity",i.value="10",t.parentNode.replaceChild(i,t),i.focus(),i.addEventListener("keyup",this._onInputValueChanged.bind(this)),i.addEventListener("focusout",this._onInputFocusOut.bind(this))}}},{key:"_onInputValueChanged",value:function(e){var t=e.target.value;""!==t&&isNaN(t)&&(e.target.value=Math.max(1,parseInt(t)||1))}},{key:"_onInputFocusOut",value:function(e){e.target.value=Math.max(1,parseInt(e.target.value)||1)}}]),e}(),pe=function(){function e(i,n){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=n,this.countrySelector=new f(this.element.querySelector('[name="country"]'),this.element.querySelector('[name="province"]')),this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off("click"),this.countrySelector.destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="estimate-shipping"]',this._fetchRates.bind(this))}},{key:"_fetchRates",value:function(){document.dispatchEvent(new CustomEvent("theme:loading:start")),this.options.singleProduct?this._fetchRatesForProduct():this._fetchRatesForCart()}},{key:"_fetchRatesForCart",value:function(){var e=this,t=this.element.querySelector('[name="country"]').value,i=this.element.querySelector('[name="province"]').value,
30n=this.element.querySelector('[name="zip"]').value;fetch("".concat(window.routes.cartUrl,"/shipping_rates.json?shipping_address[zip]=").concat(n,"&shipping_address[country]=").concat(t,"&shipping_address[province]=").concat(i),{credentials:"same-origin",method:"GET"}).then(function(t){document.dispatchEvent(new CustomEvent("theme:loading:end")),t.json().then(function(i){e._formatResults(t.ok,i)})})}},{key:"_fetchRatesForProduct",value:function(){var e=this,t=this._getCookie("cart"),i="temp-cart-cookie___"+Date.now()+parseInt(1e3*Math.random()),n="fake-cart-cookie___"+Date.now()+parseInt(1e3*Math.random());if(t||(this._updateCartCookie(i),t=this._getCookie("cart")),!(t.length<32)){this._updateCartCookie(n);var o=document.querySelector('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(o)),credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(i){i.json().then(function(){var i=e.element.querySelector('[name="country"]').value,n=e.element.querySelector('[name="province"]').value,o=e.element.querySelector('[name="zip"]').value;fetch("".concat(window.routes.cartUrl,"/shipping_rates.json?shipping_address[zip]=").concat(o,"&shipping_address[country]=").concat(i,"&shipping_address[province]=").concat(n),{credentials:"same-origin",method:"GET"}).then(function(i){document.dispatchEvent(new CustomEvent("theme:loading:end")),i.json().then(function(t){e._formatResults(i.ok,t)}),e._updateCartCookie(t)}).catch(function(){e._updateCartCookie(t)})}).catch(function(){e._updateCartCookie(t),document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}}},{key:"_formatResults",value:function(e,t){var i=this.element.querySelector(".shipping-estimator__results");if(i.innerHTML="",e){var n=t.shipping_rates;if(0===n.length)i.innerHTML="<p>".concat(window.languages.shippingEstimatorNoResults,"</p>");else{1===n.length?i.innerHTML="<p>".concat(window.languages.shippingEstimatorOneResult,"</p>"):i.innerHTML="<p>".concat(window.languages.shippingEstimatorMultipleResults.replace("{{count}}",n.length),"</p>");var o="";n.forEach(function(e){o+="<li>".concat(e.name,": ").concat(P.formatMoney(e.price,window.theme.moneyFormat),"</li>")}),i.innerHTML+="<ul>".concat(o,"</ul>")}}else{i.innerHTML="<p>".concat(window.languages.shippingEstimatorErrors,"</p>");var s="";Object.keys(t).forEach(function(e){s+='<li class="alert__list-item">'.concat(e," ").concat(t[e],"</li>")}),i.innerHTML+="<ul>".concat(s,"</ul>")}i.style.display="block"}},{key:"_getCookie",value:function(e){var t="; ".concat(document.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}},{key:"_updateCartCookie",value:function(e){var t=new Date;t.setTime(t.getTime()+12096e5),document.cookie="cart=".concat(e,"; expires=").concat(t.toUTCString(),"; path=/")}}]),e}(),me=function(){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,e),this.id=i,this.delegateRoot=new p(document.documentElement),this.isOpen=!1,this.togglerElement=document.querySelector('[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]')),this.onSelect=n.onValueSelect||function(){},this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateRoot.off()}},{key:"_attachListeners",value:function(){this.delegateRoot.on("click",'[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]'),this._toggle.bind(this)),this.delegateRoot.on("click",'[data-action="close-value-picker"][aria-controls="'.concat(this.id,'"]'),this._toggle.bind(this)),this.delegateRoot.on("click","#".concat(this.id,' [data-action="select-value"]'),this._selectValue.bind(this)),this.delegateRoot.on("click",this._detectOutsideClick.bind(this),!0),this.delegateRoot.on("focusout","#".concat(this.id),this._onFocusOut.bind(this))}},{key:"_toggle",value:function(e){this.isOpen?this._close(e):this._open(e)}},{key:"_open",value:function(){(document.querySelector('[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]')).setAttribute("aria-expanded","true"),document.getElementById(this.id).setAttribute("aria-hidden","false"),v.matchesBreakpoint("phone"))&&(document.querySelector(".shopify-section__header").style.zIndex="3");this.isOpen=!0,document.body.classList.add("no-mobile-scroll")}},{key:"_close",value:function(){document.querySelector('[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]')).setAttribute("aria-expanded","fal
30se"),document.getElementById(this.id).setAttribute("aria-hidden","true"),document.querySelector(".shopify-section__header").style.zIndex="",this.isOpen=!1,document.body.classList.remove("no-mobile-scroll")}},{key:"_selectValue",value:function(e,t){this.onSelect(t.getAttribute("data-value")),this._close()}},{key:"_onFocusOut",value:function(e){document.getElementById(this.id).contains(e.relatedTarget)||this._close()}},{key:"_detectOutsideClick",value:function(e){this.isOpen&&this.togglerElement!==e.target&&!this.togglerElement.contains(e.target)&&!e.target.closest(".value-picker__inner")&&this.isOpen&&this._close(e)}}]),e}(),fe=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.element.querySelectorAll('[action*="/account/addresses"]').forEach(function(e){new f(e.querySelector('[name="address[country]"]'),e.querySelector('[name="address[province]"]'))}),this.pageSelector=new me("account-selector")}return n(e,[{key:"_onUnload",value:function(){this.pageSelector.destroy()}}]),e}(),ve=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.isOpen=!1,this.options.showNewsletter?document.documentElement.style.setProperty("--announcement-bar-button-width",this.element.querySelector(".announcement-bar__button").clientWidth+"px"):document.documentElement.style.removeProperty("--announcement-bar-button-width"),this._attachListeners()}return n(e,[{key:"onSelect",value:function(){this.options.showNewsletter&&!this.isOpen&&this._toggleNewsletter()}},{key:"onDeselect",value:function(){this.options.showNewsletter&&this.isOpen&&this._toggleNewsletter()}},{key:"onUnload",value:function(){this.domDelegate.off()}},{key:"_attachListeners",value:function(){this.domDelegate.on("click",'[data-action="toggle-newsletter"]',this._toggleNewsletter.bind(this)),this.domDelegate.on("keyup",this._handleKey.bind(this))}},{key:"_toggleNewsletter",value:function(){var e=this.element.querySelector(".announcement-bar__button"),t=this.element.querySelector(".announcement-bar__newsletter");"false"===e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"),r.slideDown(t,function(){k.trapFocus(t,"announcement-bar")})):(e.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true"),r.slideUp(t),k.removeTrapFocus(t,"announcement-bar")),this.isOpen=!this.isOpen}},{key:"_handleKey",value:function(e){27===e.keyCode&&this.isOpen&&this._toggleNewsletter()}}]),e}(),ge=function(){function e(i){if(t(this,e),this.element=i,this.blogTagSelector=new me("blog-tag-selector"),Shopify.designMode){var n=this.element.querySelector(".page__header");n&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",n))}}return n(e,[{key:"onUnload",value:function(){this.blogTagSelector.destroy()}}]),e}(),ye=function e(i){if(t(this,e),this.element=i,Shopify.designMode){var n=this.element.querySelector(".page__header");n&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",n))}},be=function(){function e(i){t(this,e),this.element=i,Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),"blog"===window.theme.pageType&&this._fixItemsPerRow()}return n(e,[{key:"_fixItemsPerRow",value:function(){0===this.element.querySelectorAll(".blog-sidebar__item").length?(document.querySelector(".blog-container").classList.add("blog-container--without-sidebar"),document.querySelectorAll(".shopify-section__blog-posts .block-list__item").forEach(function(e){e.classList.contains("1/2--lap-and-up")&&(e.classList.remove("1/2--lap-and-up"),e.classList.add("1/3--lap-and-up"))})):(document.querySelector(".blog-container").classList.remove("blog-container--without-sidebar"),document.querySelectorAll(".shopify-section__blog-posts .block-list__item").forEach(function(e){e.classList.contains("1/3--lap-and-up")&&(e.classList.remove("1/3--lap-and-up"),e.classList.add("1/2--lap-and-up"))}))}}]),e}(),we=function(){function e(i){var n=this;if(t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.productGallery=new de(this.element,this.options),this._initShopifyReviews(),this.options.isQuickView&&this.options.showPaymentButton&&window.Shopify.PaymentButton&&Shopify.PaymentButton.init(),this.productVariants=new I(this.element,this.options),this.options.showShippingEstimator&&(this.shippingEstimator=new pe(this.element.querySelector(".shipping-estimator"),{singleProduct:!0})),this.options.showQuantitySelector){var o=this.element.querySelector('select[name="quantity"]');o&&(this.quantityPicker=new ue(o))}var s=this.element.querySelector(".product-block-list__item--info .card");
30s&&(this.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(s.clientHeight,"px"),window.ResizeObserver&&(this.productInfoResizeObserver=new ResizeObserver(function(e){e[0].contentBoxSize?n.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(e[0].contentBoxSize.blockSize,"px"):n.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(e[0].contentRect.height,"px")}),this.productInfoResizeObserver.observe(s)),this.options.infoOverflowScroll&&(this.infoOverflowScroller=new x(s,{offsetTop:document.documentElement.style.getPropertyValue("--header-is-sticky")*parseInt(document.documentElement.style.getPropertyValue("--header-height")+30),offsetBottom:30}))),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.productVariants.destroy(),this.productGallery.destroy(),this.options.showShippingEstimator&&this.shippingEstimator.destroy(),this.options.infoOverflowScroll&&this.infoOverflowScroller.destroy(),window.ResizeObserver&&this.productInfoResizeObserver&&this.productInfoResizeObserver.disconnect(),this.delegateElement.off(),this.element.removeEventListener("variant:changed",this._onVariantChangedListener)}},{key:"_attachListeners",value:function(){this._onVariantChangedListener=this._onVariantChanged.bind(this),this.element.addEventListener("variant:changed",this._onVariantChangedListener)}},{key:"_initShopifyReviews",value:function(){var e=this;Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges(),window.SPR.loadProducts()),window.SPRCallbacks={},window.SPRCallbacks.onFormSuccess=function(){e.element.querySelector("#shopify-product-reviews .spr-form").classList.add("spr-form-submitted")},this.options.isQuickView&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges(),this.options.showPaymentButton&&window.Shopify.PaymentButton&&Shopify.PaymentButton.init())}},{key:"_onVariantChanged",value:function(e){this.productGallery.variantHasChanged(e.detail.variant)}}]),e}(),_e=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.delegateRoot=new p(document.documentElement),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.showShippingEstimator&&(this.shippingEstimator=new pe(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._attachListeners(),this._enforceMinimumHeight()}return n(e,[{key:"onUnload",value:function(){this.options.showShippingEstimator&&this.shippingEstimator.destroy()}},{key:"_attachListeners",value:function(){this.domDelegate.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),this.domDelegate.on("click",'[data-action="save-note"]',this._saveNote.bind(this)),this.domDelegate.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this)),this.delegateRoot.on("cart:rerendered",this._onCartRerendered.bind(this))}},{key:"_saveNote",value:function(){var e=this.element.querySelector('[name="cart[note]"]').value;fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({note:e}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),this.element.querySelector(".cart-recap__note-edit").classList.toggle("is-visible",""!==e),document.dispatchEvent(new CustomEvent("collapsible:toggle",{detail:{id:"order-note"}}))}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){e.ok?(t.removeAttribute("disabled"),i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}}))):t.removeAttribute("disabled")}),e.preventDefault()}}},{key:"_openQuickView",value:function(e,t){var i=document.getElementById(t.getAttribute("aria-controls"));i.classList.add("is-loading"),fetch("".concat(t.getAttribute("data-product-url"),"?view=quick-view"),{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){i.querySelector(".modal__inner").innerHTML=e,i.classList.remove("is-loading");var t=new we(i.querySelector('[data-section-type="product"]'));i.addEventListener("modal:closed",function e(){t.onUnload(),i.removeEventListener("modal:closed",e)})})})}},{key:"_enforceMinimumHeight",value:function(){var e=this.element.querySelector(".cart-wrapper"),t=this.element.querySelector(".cart-recap__scroller");e&&t&&(e.style.minHeight="".concat(t.clientHeight,"px"),window.ResizeObserver&&new ResizeObserver(function(t){var i,n=s(t);try{for(n.s();!(i=n.n()).done;){var o=i.value;e.style.minHeight="".concat(parseInt(o.contentRect.height),"px")}}catch(e){n.e(e)}finally{n.f()}}).observe(t))}},{key:"_onCartRerendered",value:function(){this.options.showShippingEstimator&&(this.shippingEstimator.destroy(),this.shippingEstimator=new pe(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._enforceMinimumHeight()}}]),e}(),ke=function(){function e(i){t(this,e),this.element=i,this.flickityInstance=new j(this.element.querySelector(".collection-list"),{watchCSS:!0,prevNextButtons:!0,draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches,pageDots:!1,cellAlign:"left",contain:!0,groupCells:!0})}return n(e,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(e){this.flickityInstance.isActive&&this.flickityInstance.selectCell(parseInt(e.target.getAttribute("data-collection-index")),null,e.detail.load)}}]),e}(),Ee=function(){function e(i){t(this,e),this.element=i,this.flickityInstance=new j(this.element.querySelector(".news-sli
30der"),{prevNextButtons:!0,draggable:!0,pageDots:!1})}return n(e,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(e){this.flickityInstance.isActive&&this.flickityInstance.selectCell(parseInt(e.target.getAttribute("data-collection-index")),null,e.detail.load)}}]),e}(),Se=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.collectionFilterTagElements=this.element.querySelectorAll("[data-tag]"),this.currentUrl=new URL(window.location.href),this.currentTags=this.options.currentTags,Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),this.mobileFilterDrawer=new b(this.options),this.displayByValuePicker=new me("display-by-selector",{onValueSelect:this._showingCountChanged.bind(this)}),this.sortByValuePicker=new me("sort-by-selector",{onValueSelect:this._sortByChanged.bind(this)}),this.productItemColorSwatch=new T(this.element),"search"===window.theme.pageType&&"product"!==window.theme.searchMode&&this._loadContentResults(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.delegateElement.off(),this.mobileFilterDrawer.destroy(),this.displayByValuePicker.destroy(),this.sortByValuePicker.destroy(),this.productItemColorSwatch.destroy()}},{key:"onSelect",value:function(e){Shopify.designMode&&e.detail.load&&this.element.querySelector('.collection__layout-button[data-layout-mode="'.concat(this.options.defaultLayout,'"]')).click()}},{key:"_attachListeners",value:function(){var e=this;this.delegateElement.on("click",'[data-action="change-layout"]',this._changeLayout.bind(this)),this.delegateElement.on("change","#mobile-sort-by, #desktop-sort-by",this._sortByChanged.bind(this)),this.delegateElement.on("change","#showing-count",this._showingCountChanged.bind(this)),this.delegateElement.on("click",".pagination [data-page]",this._paginationPageChanged.bind(this)),this.delegateElement.on("click",'[data-action="toggle-tag"]',this._tagToggled.bind(this)),this.delegateElement.on("click",'[data-action="clear-tags"]',this._clearTags.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this)),this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),window.addEventListener("popstate",function(t){t.state.path&&(e.currentUrl=new URL(t.state.path),e._reload(!1))})}},{key:"_openQuickView",value:function(e,t){var i=new URL("".concat(window.location.origin).concat(t.getAttribute("data-product-url")));if(v.matchesBreakpoint("phone")||v.matchesBreakpoint("tablet"))return window.location.href=i.href,!1;var n=document.getElementById(t.getAttribute("aria-controls"));n.classList.add("is-loading"),i.searchParams.set("view","quick-view"),fetch(i.href,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){n.querySelector(".modal__inner").innerHTML=e,n.classList.remove("is-loading");var t=new we(n.querySelector('[data-section-type="product"]'));n.addEventListener("modal:closed",function e(){t.onUnload(),n.removeEventListener("modal:closed",e)})})})}},{key:"_changeLayout",value:function(e,t){var i=this;if(!t.classList.contains("is-selected")){var n=t.getAttribute("data-layout-mode");fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({attributes:{collection_layout:n}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),y.mutate(function(){l.getSiblings(t,".is-selected").forEach(function(e){return e.classList.remove("is-selected")}),t.classList.add("is-selected"),i.element.querySelectorAll(".product-item").forEach(function(e){e.className="grid"===n?"product-item product-item--vertical ".concat(i.options.gridClasses):"product-item product-item--list"}),i.productItemColorSwatch.recalculateSwatches()})}}},{key:"_sortByChanged",value:function(e){this.currentUrl.searchParams.set("sort_by",e),this.currentUrl.searchParams.delete("page"),this._reload(!0)}},{key:"_showingCountChanged",value:function(e){var t=this;this.currentUrl.searchParams.delete("page"),fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({attributes:{collection_products_per_page:e}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(){t._reload(!0)})}},{key:"_paginationPageChanged",value:function(e,t){e.preventDefault(),this.currentUrl.searchParams.set("page",parseInt(t.getAttribute("data-page"))),this._reload(!0)}},{key:"_tagToggled",value:function(e,t){var i=this,n=t.getAttribute("data-tag"),o=this.currentTags.length>0;if(this.currentTags.includes(n))this.currentTags=this.currentTags.filter(function(e){return e!==n});else if("tag"===this.options.filterType)this.currentTags=[n];else{var s=n.split("_")[0];
30this.currentTags.forEach(function(e){e.split("_")[0]===s&&(i.currentTags=i.currentTags.filter(function(t){return t!==e}))}),this.currentTags.push(n)}this.currentUrl.searchParams.delete("page"),this._updateTagUrl(o),this._reload(!0)}},{key:"_clearTags",value:function(){var e=this.currentTags.length>0;this.currentTags=[],this.currentUrl.searchParams.delete("page"),this._updateTagUrl(e),this._reload(!0).then(function(){document.dispatchEvent(new CustomEvent("collection-filter:close"))})}},{key:"_updateTagUrl",value:function(e){var t=this;if(y.mutate(function(){t.collectionFilterTagElements.forEach(function(e){t.currentTags.includes(e.getAttribute("data-tag"))?(e.classList.add("is-selected"),"INPUT"===e.tagName&&(e.checked=!0)):(e.classList.remove("is-selected"),"INPUT"===e.tagName&&(e.checked=!1))})}),this.options.isAutomatic)0===this.currentTags.length?this.currentUrl.searchParams.delete("constraint"):this.currentUrl.searchParams.set("constraint",this.currentTags.join("+"));else{var i=this.currentTags.join("+"),n="/"===this.currentUrl.pathname.substr(-1)?this.currentUrl.pathname.substr(0,this.currentUrl.pathname.length-1):this.currentUrl.pathname;if(e){var o=n.split("/");o.pop(),this.currentUrl.pathname="".concat(o.join("/"),"/").concat(i)}else this.currentUrl.pathname="".concat(n,"/").concat(i)}}},{key:"_reload",value:function(e){var t=this;e&&window.history.pushState({path:this.currentUrl.toString()},"",this.currentUrl.toString()),document.dispatchEvent(new CustomEvent("theme:loading:start")),this.mobileFilterDrawer._filtersHaveChanged(this.currentTags);var i=window.getComputedStyle(document.documentElement),n="";return n=this.currentUrl.search?"".concat(this.currentUrl.pathname,"/").concat(this.currentUrl.search,"&section_id=").concat(this.element.getAttribute("data-section-id")):"".concat(this.currentUrl.pathname,"?section_id=").concat(this.element.getAttribute("data-section-id")),fetch(n,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){var n=document.createElement("div");n.innerHTML=e,t.element.querySelector(".collection__dynamic-part").innerHTML=n.querySelector(".collection__dynamic-part").innerHTML;var o=t.element.querySelector(".collection__active-filters");o&&(o.innerHTML=n.querySelector(".collection__active-filters").innerHTML),window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),t.productItemColorSwatch.recalculateSwatches();var s=t.element.querySelector(".collection").getBoundingClientRect().top-25-parseInt(i.getPropertyValue("--header-is-sticky"))*parseInt(i.getPropertyValue("--header-height"));s<0&&window.scrollBy({top:s,behavior:"smooth"}),document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}},{key:"_loadContentResults",value:function(){var e=this,t=new URL(window.location.href);fetch("".concat(window.routes.searchUrl,"?view=content&q=").concat(t.searchParams.get("q"),"&type=").concat(window.theme.searchMode.replace("product,","")),{credentials:"same-origin"}).then(function(t){t.text().then(function(t){var i=e.element.querySelector(".link-search-results");i&&""!==t.trim()&&(i.innerHTML=t,i.style.display="block")})})}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.removeAttribute("disabled"),e.ok?i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),e.preventDefault()}}}]),e}(),Ce=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.stackable||(this.flickityInstance=new j(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches})),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),this.productItemColorSwatch=new T(this.element),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.options.stackable||this.flickityInstance.destroy(),this.delegateElement.off("change"),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}},{key:"_openQuickView",value:function(e,t){var i=new URL("".concat(window.location.origin).concat(t.getAttribute("data-product-url")));if(v.matchesBreakpoint("phone")||v.matchesBreakpoint("tablet"))return window.location.href=i.href,!1;var n=document.getElementById(t.getAttribute("aria-controls"));n.classList.add("is-loading"),i.searchParams.set("view","quick-view"),fetch(i.href,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){n.querySelector(".modal__inner").innerHTML=e,n.classList.remove("is-loading");var t=new we(n.querySelector('[data-section-type="product"]'));n.addEventListener("modal:closed",function e(){t.onUnload(),n.removeEventListener("modal:closed",e)})})})}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.removeAttribute("disabled"),e.ok?i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),e.preventDefault()}}}]),e}(),Le=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.stackable||(this.flickityInstance=new j(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches})),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),this.productItemColorSwatch=new T(this.element),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.options.stackable||this.flickityInstance.destroy(),this.delegateElement.off("change"),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}},{key:"_openQuickView",value:function(e,t){var i=new URL("".concat(window.location.origin).concat(t.getAttribute("data-product-url")));if(v.matchesBreakpoint("phone")||v.matchesBreakpoint("tablet"))return window.location.href=i.href,!1;var n=document.getElementById(t.getAttribute("aria-controls"));n.classList.add("is-loading"),i.searchParams.set("view","quick-view"),fetch(i.href,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){n.querySelector(".modal__inner").innerHTML=e,n.classList.remove("is-loading");var t=new we(n.querySelector('[data-section-type="product"]'));n.addEventListener("modal:closed",function e(){t.onUnload(),n.removeEventListener("modal:closed",e)})})})}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.removeAttribute("disabled"),e.ok?i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),e.preventDefault()}}}]),e}(),xe=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this._createQrCode(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.delegateElement.off()}},{key:"_createQrCode",value:function(){document.querySelectorAll(".gift-card__qr").forEach(function(e){new QRCode(e,{text:e.getAttribute("data-identifier"),width:200,height:200})})}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="print"]',this._print.bind(this)),this.delegateElement.on("click",'[data-action="select-code"]',this._selectCode.bind(this))}},{key:"_print",value:function(){window.print()}},{key:"_selectCode",value:function(e,t){t.select()}}]),e}(),Ae=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.localeValuePicker=new me("footer-locale-picker"),this.currencyValuePicker=new me("footer-currency-picker"),this.cookieBarElement=this.element.querySelector(".cookie-bar"),this.cookieBarElement&&this._setupCookieBar(),this._setupCollapsibles(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){window.removeEventListener("resize",this._setupCollapsiblesListener),this.domDelegate.off(),this.localeValuePicker.destroy(),this.currencyValuePicker.destroy()}},{key:"onSelect",value:function(){this.cookieBarElement&&this.cookieBarElement.setAttribute("aria-hidden","false")}},{key:"onDeselect",value:function(){this.cookieBarElement&&this.cookieBarElement.setAttribute("aria-hidden","true")}},{key:"_attachListeners",value:function(){this._setupCollapsiblesListener=this._setupCollapsibles.bind(this),window.addEventListener("resize",this._setupCollapsiblesListener),this.domDelegate.on("click",'[data-action="accept-terms"]',this._acceptCookieBarTerms.bind(this))}},{key:"_setupCollapsibles",value:function(){var e=this.element.querySelectorAll('[data-action="toggle-collapsible"]'),t=v.matchesBreakpoint("phone");e.forEach(function(e){t?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),document.getElementById(e.getAttribute("aria-controls")).style.height="")}
30)}},{key:"_setupCookieBar",value:function(){try{null===localStorage.getItem("cookieWasAccepted")&&this.cookieBarElement.setAttribute("aria-hidden","false")}catch(e){}}},{key:"_acceptCookieBarTerms",value:function(){this.cookieBarElement.setAttribute("aria-hidden","true");try{localStorage.setItem("cookieWasAccepted","true")}catch(e){}}}]),e}(),Te=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.headerElement=this.element.closest(".header"),this.searchBarElement=this.element.querySelector(".search-bar"),this.inputElement=this.element.querySelector('[name="q"]'),this.searchMenuElement=this.element.querySelector(".search-bar__menu-wrapper"),this.searchResultsElement=this.element.querySelector(".search-bar__results"),this.closeButtonElement=this.element.querySelector(".search-bar__close-button"),this.productTypeFilter="",this.isSearchOpen=!1,this._attachListeners()}return n(e,[{key:"destroy",value:function(){this.delegateElement.off()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="clear-input"]',this._clearInput.bind(this)),this.delegateElement.on("click",'[data-action="unfix-search"]',this._unfixMobileSearch.bind(this)),this.delegateElement.on("focusin",'[name="q"]',this._onInputFocus.bind(this)),this.delegateElement.on("focusout",this._onFocusOut.bind(this)),this.delegateElement.on("keydown",'[name="q"]',this._handleTab.bind(this)),this.delegateElement.on("input",'[name="q"]',this._debounce(this._doSearch.bind(this),250)),this.delegateElement.on("change","#search-product-type",this._productTypeChanged.bind(this))}},{key:"toggleMobileSearch",value:function(){this.isSearchOpen?(this.headerElement.classList.remove("header--search-expanded"),this.element.classList.remove("is-visible")):(this.headerElement.classList.add("header--search-expanded"),this.element.classList.add("is-visible")),this.isSearchOpen=!this.isSearchOpen}},{key:"_unfixMobileSearch",value:function(){this.element.classList.remove("is-fixed"),this.closeButtonElement.style.width="",this.searchBarElement.classList.remove("is-expanded"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.inputElement.classList.remove("is-filled"),document.body.classList.remove("no-mobile-scroll"),this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true")}},{key:"_clearInput",value:function(){this.inputElement.value="",this.inputElement.classList.remove("is-filled"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","false")}},{key:"_onInputFocus",value:function(){this.element.classList.add("is-fixed"),this.closeButtonElement.style.width="".concat(this.closeButtonElement.firstElementChild.offsetWidth,"px"),document.body.classList.add("no-mobile-scroll"),""===this.inputElement.value?(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","false"),this.searchResultsElement.setAttribute("aria-hidden","true")):(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","false"),this.inputElement.classList.add("is-filled"),this.searchBarElement.classList.add("is-expanded")),this.searchMenuElement&&this.searchBarElement.classList.add("is-expanded")}},{key:"_onFocusOut",value:function(e){v.matchesBreakpoint("phone")||(this.element.classList.remove("is-fixed"),document.body.classList.remove("no-mobile-scroll"),this.element.contains(e.relatedTarget)||(this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","true"),this.searchBarElement.classList.remove("is-expanded")))}},{key:"_handleTab",value:function(e){if(9===e.keyCode){var t=this.searchResultsElement.querySelector("a");t&&(t.focus(),e.preventDefault())}}},{key:"_doSearch",value:function(){var e=this,t=this.inputElement.value;if(this.lastInputValue=t,""===t)this.searchMenuElement?this.searchMenuElement.setAttribute("aria-hidden","false"):this.searchBarElement.classList.remove("is-expanded"),this.searchResultsElement.setAttribute("aria-hidden","true");else{this.searchMenuElement&&this.searchMenuElement.setAttribute("aria-hidden","true"),this.searchResultsElement.setAttribute("aria-hidden","false"),this.searchBarElement.classList.add("is-expanded","is-loading");var i={method:"GET",credentials:"same-origin"},n="".concat(""!==this.productTypeFilter?"product_type:".concat(this.productTypeFilter," AND "):"").concat(encodeURIComponent(this.lastInputValue)),o=[fetch("".concat(window.routes.searchUrl,"?view=ajax&q=").concat(n,"&options[prefix]=last&type=product"),i)];"product"!==window.theme.searchMode&&o.push(fetch("".concat(window.routes.searchUrl,"?view=ajax&q=").concat(encodeURIComponent(this.lastInputValue),"&options[prefix]=last&type=").concat(window.theme.searchMode.replace("product,","")),i)),Promise.all(o).then(function(i){e.lastInputValue===t&&Promise.all(i.map(function(e){return e.text()})).then(function(t){e.searchBarElement.classList.remove("is-loading");var i=document.createElement("div");i.innerHTML=t.join("").trim();var n=i.querySelector(".search-bar__view-all");n&&i.insertAdjacentElement("beforeend",n),e.searchBarElement.querySelector(".search-bar__results-inner").innerHTML=i.innerHTML})})}}},{key:"_productTypeChanged",value:function(e,t){t.closest(".search-bar__filter").querySelector(".search-bar__filter-active").innerText=t.options[t.selectedIndex].innerText,this.productTypeFilter=t.value,""!==this.inputElement.value&&this._doSearch()}},{key:"_debounce",value:function(e,t){var i=this,n=null;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(i,s)},t)}}}]),e}(),Pe=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.searchBar=new Te(this.element.querySelector(".header__search-bar-wrapper")),this.cart=new E(this.element.querySelector(".header__action-item--cart"),{useStickyHeader:this.options.useStickyHeader});var n=this.element.querySelector("inline"===this.options.navigationLayout?".nav-bar":".header__desktop-nav");n&&(this.desktopNavigation=new g(n,this.options.navigationLayout,this.options.desktopOpenTrigger));var o=this.element.querySelector(".header__mobile-nav");o&&(this.mobileNavigation=new S(o)),this._setupCssVariables(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.searchBar.destroy(),this.cart.destroy(),this.desktopNavigation&&this.desktopNavigation.destroy(),this.mobileNavigation&&this.mobileNavigation.destroy(),window.removeEventListener("resize",this._setupCssVariablesListener)}},{key:"onBlockSelect",value:function(e){this.desktopNavigation&&this.desktopNavigation.onBlockSelect(e)}},{key:"onBlockDeselect",value:function(e){this.desktopNavigation&&this.desktopNavigation.onBlockDeselect(e)}},{key:"_attachListeners",value:function(){this._setupCssVariablesListener=this._setupCssVariables.bind(this),window.addEventListener("resize",this._setupCssVariablesListener),this.delegateElement.on("click",'[data-action="toggle-search"]',this._toggleMobileSearch.bind(this))}},{key:"_setupCssVariables",value:function(){document.documentElement.style.setProperty("--header-height",this.element.parentNode.clientHeight+"px")}},{key:"_toggleMobileSearch",value:function(e){this.searchBar.toggleMobileSearch(),e.preventDefault()}}]),e}(),Me=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.customerLoginForm=this.element.querySelector("#customer_login"),this.recoverPasswordForm=this.element.querySelector("#recover_customer_password"),this.domDelegate.on("click",'[data-action="toggle-login-form"]',this._showRecoverPassword.bind(this))}return n(e,[{key:"_showRecoverPassword",value:function(){"block"===this.customerLoginForm.style.display?(this.customerLoginForm.style.display="none",this.recoverPasswordForm.style.display="block"):(this.customerLoginForm.style.display="block",this.recoverPasswordForm.style.display="none")}}]),e}(),Ie=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(i.getAttribute("data-section-settings")),this.mapPositions=[],this.desktopMarkers=[],this.desktopMapElement=null,this.mobileMarkers=[],this.mobileMapElements=[],this.options.apiKey&&this.options.mapAddresses.length>0&&this._loadScript().then(this._initMaps.bind(this)),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.delegateElement.off("click"),this.options.apiKey&&this.options.mapAddresses.length>0&&google.maps.event.clearInstanceListeners(window)}},{key:"onBlockSelect",value:function(e){this._showStore(e.target)}},{key:"_attachListeners",value:function(){var e=this;this.delegateElement.on("click",'[data-action="toggle-store"]',function(t,i){e._showStore(i.closest(".map__store-item"))})}},{key:"_showStore",value:function(e){var t=this,i=e.querySelector('[data-action="toggle-store"]');if("phone"===v.getCurrentBreakpoint()||"true"!==i.getAttribute("aria-expanded")){"true"===i.getAttribute("aria-expanded")?(i.setAttribute("aria-expanded","fal
30se"),r.slideUp(e.querySelector(".map__store-collapsible"))):(i.setAttribute("aria-expanded","true"),r.slideDown(e.querySelector(".map__store-collapsible"))),l.getSiblings(e).forEach(function(e){e.querySelector('[data-action="toggle-store"]').setAttribute("aria-expanded","false"),r.slideUp(e.querySelector(".map__store-collapsible"))});var n=parseInt(e.getAttribute("data-store-index"));this.desktopMapElement.panTo(this.mapPositions[n]),this.desktopMarkers.forEach(function(e,i){e.setMap(t.desktopMapElement),e.icon.fillColor=i===n?t.options.markerActiveColor:t.options.markerColor})}}},{key:"_loadScript",value:function(){var e=this;return new Promise(function(t,i){var n=document.createElement("script");document.body.appendChild(n),n.onload=t,n.onerror=i,n.async=!0,n.src="https://maps.googleapis.com/maps/api/js?key=".concat(e.options.apiKey)})}},{key:"_initMaps",value:function(){var e=this,t={zoom:this.options.zoom,draggable:this.options.draggableMap,clickableIcons:!1,scrollwheel:this.options.draggableMap,disableDoubleClickZoom:!0,disableDefaultUI:!this.options.showMapControls,styles:JSON.parse(this.element.querySelector("[data-gmap-style]").innerHTML)};this.desktopMapElement=new google.maps.Map(this.element.querySelector(".map__map-container--desktop .map__gmap"),t),this.mobileMapElements=[],this.element.querySelectorAll(".map__map-container--mobile .map__gmap").forEach(function(i,n){e.mobileMapElements[n]=new google.maps.Map(i,t)}),this._geocodeAddresses(),google.maps.event.addDomListener(window,"resize",function(){var t=e.desktopMapElement.getCenter();google.maps.event.trigger(e.desktopMapElement,"resize"),e.desktopMapElement.setCenter(t),e.mobileMapElements.forEach(function(e){var t=e.getCenter();google.maps.event.trigger(e,"resize"),e.setCenter(t)})})}},{key:"_onMarkerClicked",value:function(e){window.open("https://www.google.com/maps/search/?api=1&query=".concat(e),"_blank")}},{key:"_geocodeAddresses",value:function(){var e=this,t=new google.maps.Geocoder;this.options.mapAddresses.forEach(function(i,n){t.geocode({address:i},function(t,o){if(o!==google.maps.GeocoderStatus.OK)Shopify.designMode;else{var s=t[0].geometry.location;e.mapPositions[n]=s,e.desktopMarkers[n]=new google.maps.Marker({map:0===n?e.desktopMapElement:null,position:s,icon:{path:"M12.5,0 C6.388889,0 0,4.7304348 0,12.5217391 C0,19.8956522 11.111111,31.1652174 11.527778,31.5826087 C11.805556,31.8608696 12.083333,32 12.5,32 C12.916667,32 13.194444,31.8608696 13.472222,31.5826087 C13.888889,31.1652174 25,19.8956522 25,12.5217391 C25,4.7304348 18.611111,0 12.5,0 Z M12,16 C9.733333,16 8,14.2666667 8,12 C8,9.7333333 9.733333,8 12,8 C14.266667,8 16,9.7333333 16,12 C16,14.2666667 14.266667,16 12,16 Z",fillColor:0===n?e.options.markerActiveColor:e.options.markerColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),e.mobileMarkers[n]=new google.maps.Marker({map:e.mobileMapElements[n],position:s,icon:{path:"M12.5,0 C6.388889,0 0,4.7304348 0,12.5217391 C0,19.8956522 11.111111,31.1652174 11.527778,31.5826087 C11.805556,31.8608696 12.083333,32 12.5,32 C12.916667,32 13.194444,31.8608696 13.472222,31.5826087 C13.888889,31.1652174 25,19.8956522 25,12.5217391 C25,4.7304348 18.611111,0 12.5,0 Z M12,16 C9.733333,16 8,14.2666667 8,12 C8,9.7333333 9.733333,8 12,8 C14.266667,8 16,9.7333333 16,12 C16,14.2666667 14.266667,16 12,16 Z",fillColor:e.options.markerActiveColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),e.desktopMarkers[n].addListener("click",e._onMarkerClicked.bind(e,i)),e.mobileMarkers[n].addListener("click",e._onMarkerClicked.bind(e,i)),0===n&&e.desktopMapElement.setCenter(s),e.mobileMapElements[n].setCenter(s)}})})}}]),e}(),De=function(){function e(i){t(this,e),this.element=i,this._setupCssVariables(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){window.removeEventListener("resize",this._setupCssVariablesListener)}},{key:"_attachListeners",value:function(){this._setupCssVariablesListener=this._setupCssVariables.bind(this),window.addEventListener("resize",this._setupCssVariablesListener)}},{key:"_setupCssVariables",value:function(){document.documentElement.style.setProperty("--header-height",this.element.parentNode.clientHeight+"px")}}]),e}(),qe=function e(i){t(this,e),this.element=i,Shopify.designMode&&this.element.classList.remove("hidden-lap-and-up")},Oe=function(){function e(i){var n=this;t(this,e),i.querySelectorAll("[data-popup-type]").forEach(function(e){"exit"===e.getAttribute("data-popup-type")?n.exitPopup=new w(e):"newsletter"===e.getAttribute("data-popup-type")&&(n.newsletterPopup=new L(e))})}return n(e,[{key:"onUnload",value:function(){this.exitPopup&&this.exitPopup.destroy(),this.newsletterPopup&&this.newsletterPopup.destroy()}},{key:"onBlockSelect",value:function(e){"exit"===e.target.getAttribute("data-popup-type")&&this.exitPopup?this.exitPopup._openPopup():"newsletter"===e.target.getAttribute("data-popup-type")&&this.newsletterPopup&&this.newsletterPopup._openPopup()}},{key:"onBlockDeselect",value:function(){this.exitPopup&&this.exitPopup._closePopup(),this.newsletterPopup&&this.newsletterPopup._closePopup()}}]),e}(),Be=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.useRecommendations?this._loadRecommendations().then(this._createSlideshow.bind(this)):this._createSlideshow(),this.productItemColorSwatch=new T(this.element),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.options.stackable||this.flickityInstance.destroy(),this.delegateElement.off("change"),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}},{key:"_loadRecommendations",value:function(){var e=this,t="".concat(window.routes.productRecommendationsUrl,"?section_id=product-recommendations&product_id=").concat(this.options.productId,"&limit=").concat(this.options.recommendationsCount);return fetch(t).then(function(t){return t.text().then(function(t){var i=document.createElement("div");i.innerHTML=t,e.element.querySelector(".product-recommendations").innerHTML=i.querySelector(".product-recommendations").innerHTML,e.productItemColorSwatch.recalculateSwatches(),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges())})})}},{key:"_createSlideshow",value:function(){this.options.stackable||(this.flickityInstance=new j(this.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches})),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges())}},{key:"_openQuickView",value:function(e,t){var i=new URL("".concat(window.location.origin).concat(t.getAttribute("data-product-url")));if(v.matchesBreakpoint("phone")||v.matchesBreakpoint("tablet"))return window.location.href=i.href,!1;var n=document.getElementById(t.getAttribute("aria-controls"));n.classList.add("is-loading"),i.searchParams.set("view","quick-view"),fetch(i.href,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){n.querySelector(".modal__inner").innerHTML=e,n.classList.remove("is-loading");var t=new we(n.querySelector('[data-section-type="product"]'));n.addEventListener("modal:closed",function e(){t.onUnload(),n.removeEventListener("modal:closed",e)})})})}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.removeAttribute("disabled"),e.ok?i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),e.preventDefault()}}}]),e}(),ze=function(){function e(i){t(this,e),this.element=i,this.delegateElement=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.currentProductId&&this._saveCurrentProduct(),this.productItemColorSwatch=new T(this.element),this._fetchProducts(),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.flickityInstance&&this.flickityInstance.destroy(),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this.delegateElement.on("click",'[data-action="add-to-cart"]',this._addToCart.bind(this)),this.delegateElement.on("click",'[data-secondary-action="open-quick-view"]',this._openQuickView.bind(this))}},{key:"_saveCurrentProduct",value:function(){var e=JSON.parse(localStorage.getItem("recentlyViewedProducts")||"[]"),t=this.options.currentProductId;e.includes(t)||e.unshift(t);try{localStorage.setItem("recentlyViewedProducts",JSON.stringify(e.slice(0,18)))}catch(e){}}},{key:"_fetchProducts",value:function(){var e=this,t=this._getSearchQueryString();if(""!==t){var i="index"===window.theme.pageType?"recently-viewed-products":"static-recently-viewed-products";fetch("".concat(window.routes.searchUrl,"?view=").concat(i,"&type=product&q=").concat(t),{credentials:"same-origin",method:"GET"}).then(function(t){t.text().then(function(t){var i=document.createElement("div");i.innerHTML=t,e.element.querySelector(".recently-viewed-products-placeholder").innerHTML=i.querySelector('[data-section-type="recently-viewed-products"] .recently-viewed-products-placeholder').innerHTML,e.element.parentNode.style.display="block",e.productItemColorSwatch.recalculateSwatches(),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),e.flickityInstance=new j(e.element.querySelector(".product-list"),{watchCSS:!0,pageDots:!1,prevNextButtons:!0,contain:!0,groupCells:!0,cellAlign:"left",draggable:!window.matchMedia("(-moz-touch-enabled: 0), (hover: hover)").matches})})})}}},{key:"_getSearchQueryString",value:function(){var e=JSON.parse(localStorage.getItem("recentlyViewedProducts")||"[]");return e.includes(this.options.currentProductId)&&e.splice(e.indexOf(this.options.currentProductId),1),e.map(function(e){return"id:"+e}).join(" OR ")}},{key:"_openQuickView",value:function(e,t){var i=new URL("".concat(window.location.origin).concat(t.getAttribute("data-product-url")));if(v.matchesBreakpoint("phone")||v.matchesBreakpoint("tablet"))return window.location.href=i.href,!1;var n=document.getElementById(t.getAttribute("aria-controls"));n.classList.add("is-loading"),i.searchParams.set("view","quick-view"),fetch(i.href,{credentials:"same-origin",method:"GET"}).then(function(e){e.text().then(function(e){n.querySelector(".modal__inner").innerHTML=e,n.classList.remove("is-loading");var t=new we(n.querySelector('[data-section-type="product"]'));n.addEventListener("modal:closed",function e(){t.onUnload(),n.removeEventListener("modal:closed",e)})})})}},{key:"_addToCart",value:function(e,t){var i=this;if("page"!==window.theme.cartType){e.preventDefault(),e.stopPropagation(),t.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var n=t.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(M.serialize(n)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.removeAttribute("disabled"),e.ok?i.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(n.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),e.preventDefault()}}}]),e}(),Re=function(){function e(){t(this,e),this.constructors=[],this.instances=[],this._attachListeners()}return n(e,[{key:"_attachListeners",value:function(){document.addEventListener("shopify:section:load",this._onSectionLoad.bind(this)),document.addEventListener("shopify:section:unload",this._onSectionUnload.bind(this)),document.addEventListener("shopify:section:select",this._onSelect.bind(this)),document.addEventListener("shopify:section:deselect",this._onDeselect.bind(this)),document.addEventListener("shopify:section:reorder",this._onReorder.bind(this)),document.addEventListener("shopify:block:select",this._onBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this._onBlockDeselect.bind(this))}},{key:"register",value:function(e,t){var i=this;this.constructors[e]=t,document.querySelectorAll("[data-section-type=".concat(e,"]")).forEac
30h(function(e){i._createInstance(e,t)})}},{key:"_findInstance",value:function(e,t,i){for(var n=0;n<e.length;n++)if(e[n][t]===i)return e[n]}},{key:"_removeInstance",value:function(e,t,i){for(var n=e.length;n--;)if(e[n][t]===i){e.splice(n,1);break}return e}},{key:"_onSectionLoad",value:function(e){var t=e.target.querySelector("[data-section-id]");t&&this._createInstance(t)}},{key:"_onSectionUnload",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&("function"==typeof t.onUnload&&t.onUnload(e),this.instances=this._removeInstance(this.instances,"id",e.detail.sectionId))}},{key:"_onSelect",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&"function"==typeof t.onSelect&&t.onSelect(e)}},{key:"_onDeselect",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&"function"==typeof t.onDeselect&&t.onDeselect(e)}},{key:"_onReorder",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&"function"==typeof t.onReorder&&t.onReorder(e)}},{key:"_onBlockSelect",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&"function"==typeof t.onBlockSelect&&t.onBlockSelect(e)}},{key:"_onBlockDeselect",value:function(e){var t=this._findInstance(this.instances,"id",e.detail.sectionId);t&&"function"==typeof t.onBlockDeselect&&t.onBlockDeselect(e)}},{key:"_createInstance",value:function(e,t){var i=e.getAttribute("data-section-id"),n=e.getAttribute("data-section-type");if(void 0!==(t=t||this.constructors[n])){var o=Object.assign(new t(e),{id:i,type:n,container:e});this.instances.push(o)}}}]),e}(),He=function(){function e(i){t(this,e),this.element=i,this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.flickityInstance=new X(i.querySelector(".slideshow"),{pageDots:this.options.pageDots,prevNextButtons:this.options.prevNextButtons,wrapAround:!0,dragThreshold:12,draggable:">1",fade:"fade"===this.options.transitionEffect,setGallerySize:this.options.setGallerySize,adaptiveHeight:this.options.adaptiveHeight,autoPlay:!!this.options.autoPlay&&this.options.cycleSpeed})}return n(e,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(e){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(e.target.getAttribute("data-block-index")),!1,e.detail.load),this.flickityInstance.pausePlayer())}},{key:"onBlockDeselect",value:function(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}}]),e}(),Ne=function(){function e(i){t(this,e),this.flickityInstance=new j(i.querySelector(".text-with-icons"),{pageDots:!0,prevNextButtons:!1,wrapAround:!0,autoPlay:5e3,watchCSS:!0})}return n(e,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(e){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(e.target.getAttribute("data-block-index")),!1,e.detail.load),this.flickityInstance.pausePlayer())}},{key:"onBlockDeselect",value:function(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}}]),e}(),Ue=function(){function e(i){t(this,e),this.element=i,this.domDelegate=new p(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this._attachListeners()}return n(e,[{key:"onUnload",value:function(){this.domDelegate.off("click")}},{key:"_attachListeners",value:function(){this.domDelegate.on("click",'[data-action="play-video"]',this._playVideo.bind(this))}},{key:"_playVideo",value:function(e,t){var i=t.querySelector("iframe");i.src=i.getAttribute("data-src"),t.classList.add("is-playing")}}]),e}(),Fe=h(function(t,i){t.exports={polyfill:function(){var t=window,i=document;if(!("scrollBehavior"in i.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var n,o=t.HTMLElement||t.Element,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:o.prototype.scroll||l,scrollIntoView:o.prototype.scrollIntoView},a=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,r=(n=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(t,i.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):s.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!==e(arguments[0])?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?s.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!==e(arguments[0])?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.call(t,i.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},o.prototype.scroll=o.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var t=arguments[0].left,i=arguments[0].top;m.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===i?this.scrollTop:~~i)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==e(arguments[0])?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},o.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},o.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var e=function(e){for(;e!==i.body&&!1===u(e);)e=e.parentNode||e.host;return e}(this),n=e.getBoundingClientRect(),o=this.getBoundingClientRect();e!==i.body?(m.call(this,e,e.scrollLeft+o.left-n.left,e.scrollTop+o.top-n.top),"fixed"!==t.getComputedStyle(e).position&&t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(t){if(null===t||"object"!==e(t)||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;
30if("object"===e(t)&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(e,t){return"Y"===t?e.clientHeight+r<e.scrollHeight:"X"===t?e.clientWidth+r<e.scrollWidth:void 0}function d(e,i){var n=t.getComputedStyle(e,null)["overflow"+i];return"auto"===n||"scroll"===n}function u(e){var t=h(e,"Y")&&d(e,"Y"),i=h(e,"X")&&d(e,"X");return t||i}function p(e){var i,n,o,s,r=(a()-e.startTime)/468;s=r=r>1?1:r,i=.5*(1-Math.cos(Math.PI*s)),n=e.startX+(e.x-e.startX)*i,o=e.startY+(e.y-e.startY)*i,e.method.call(e.scrollable,n,o),n===e.x&&o===e.y||t.requestAnimationFrame(p.bind(t,e))}function m(e,n,o){var r,c,h,d,u=a();e===i.body?(r=t,c=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=s.scroll):(r=e,c=e.scrollLeft,h=e.scrollTop,d=l),p({scrollable:r,method:d,startTime:u,startX:c,startY:h,x:n,y:o})}}}}),Ve=(Fe.polyfill,new Set),We=document.createElement("link"),je=We.relList&&We.relList.supports&&We.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,Xe="instantAllowQueryString"in document.body.dataset,Ye="instantAllowExternalLinks"in document.body.dataset,Ge="instantWhitelist"in document.body.dataset,Je=65,Qe=!1,Ze=!1,Ke=!1;if("instantIntensity"in document.body.dataset){var $e=document.body.dataset.instantIntensity;if("mousedown"==$e.substr(0,9))Qe=!0,"mousedown-only"==$e&&(Ze=!0);else if("viewport"==$e.substr(0,8))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType.includes("2g"))||("viewport"==$e?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(Ke=!0):"viewport-all"==$e&&(Ke=!0));else{var et=parseInt($e);isNaN(et)||(Je=et)}}if(je){var tt={capture:!0,passive:!0};if(Ze||document.addEventListener("touchstart",function(e){he=performance.now();var t=e.target.closest("a");if(!nt(t))return;ot(t.href)},tt),Qe?document.addEventListener("mousedown",function(e){var t=e.target.closest("a");if(!nt(t))return;ot(t.href)},tt):document.addEventListener("mouseover",function(e){if(performance.now()-he<1100)return;var t=e.target.closest("a");if(!nt(t))return;t.addEventListener("mouseout",it,{passive:!0}),ce=setTimeout(function(){ot(t.href),ce=void 0},Je)},tt),Ke)(window.requestIdleCallback?function(e){requestIdleCallback(e,{timeout:1500})}:function(e){e()})(function(){var e=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting){var i=t.target;e.unobserve(i),ot(i.href)}})});document.querySelectorAll("a").forEach(function(t){nt(t)&&e.observe(t)})})}function it(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||ce&&(clearTimeout(ce),ce=void 0)}function nt(e){if(e&&e.href&&(!Ge||"instant"in e.dataset)&&(Ye||e.origin==location.origin||"instant"in e.dataset)&&["http:","https:"].includes(e.protocol)&&("http:"!=e.protocol||"https:"!=location.protocol)&&(Xe||!e.search||"instant"in e.dataset)&&!(e.hash&&e.pathname+e.search==location.pathname+location.search||"noInstant"in e.dataset))return!0}function ot(e){if(!Ve.has(e)){var t=document.createElement("link");t.rel="prefetch",t.href=e,document.head.appendChild(t),Ve.add(e)}}!function(){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var i=0;i<this.length;i++)e.call(t,this[i],i,this)}),Fe.polyfill(),new m,new _,new C,new A;var e,t,i,n,o=new Re;o.register("account",fe),o.register("announcement-bar",ve),o.register("blog",ge),o.register("blog-sidebar",be),o.register("blog-post",ye),o.register("cart",_e),o.register("collection-list",ke),o.register("news-text-slider",Ee),o.register("collection",Se),o.register("featured-collection",Ce),o.register("feat-products",Le),o.register("footer",Ae),o.register("gift-card",xe),o.register("header",Pe),o.register("login",Me),o.register("map",Ie),o.register("minimal-header",De),o.register("popups",Oe),o.register("product-recommendations",Be),o.register("product",we),o.register("quick-links",qe),o.register("recently-viewed-products",ze),o.register("slideshow",He),o.register("text-with-icons",Ne),o.register("video",Ue),document.querySelectorAll(".rte table").forEach(function(e){e.outerHTML='<div class="table-wrapper">'+e.outerHTML+"</div>"}),document.querySelectorAll(".rte iframe").forEach(function(e){-1===e.src.indexOf("youtube")&&-1===e.src.indexOf("youtu.be")&&-1===e.src.indexOf("vimeo")||(e.outerHTML='<div class="video-wrapper">'+e.outerHTML+"</div>",e.src=e.src)}),t=!1,document.body.addEventListener("touchstart",function(i){var n=i.target.closest(".flickity-slider");n&&Flickity.data(n.closest(".flickity-enabled")).isDraggable?(t=!0,e={x:i.touches[0].pageX,y:i.touches[0].pageY}):t=!1}),document.body.addEventListener("touchmove",function(i){if(t&&i.cancelable){var n={x:i.touches[0].pageX-e.x,y:i.touches[0].pageY-e.y};Math.abs(n.x)>8&&i.preventDefault()}},{passive:!1}),function(){if("phone"===v.getCurrentBreakpoint())for(var e=document.querySelectorAll("input[autofocus]"),t=0;t<e.length;t++)e[t].blur(),e[t].removeAttribute("autofocus")}(),new p(document.body).on("click",'[href^="#"], [data-href]',function(e,t){var i=t.hasAttribute("href")?t.getAttribute("href"):t.getAttribute("data-href");if("#"!==i){var n=null;try{n=document.querySelector(i)}catch(e){return}for(var o=parseInt(t.getAttribute("data-offset")||0),s=0;"BODY"!==n.offsetParent.tagName;)s+=n.offsetTop,n=n.offsetParent;s+=n.offsetTop,window.scrollTo({behavior:"smooth",top:s-o}),e.preventDefault()}}),window.addEventListener("keydown",function e(t){9===t.keyCode&&(document.body.classList.add("is-tabbing"),window.removeEventListener("keydown",e))}),(i=new p(document.body)).on("keyup","input, textarea",function(e,t){t.classList.toggle("is-filled",""!==t.value)}),i.on("change","select",function(e,t){t.parentNode.classList.toggle("is-filled",""!==t.value)}),n=document.links,y.mutate(function(){for(var e=0,t=n.length;e<t;e++)n[e].hostname.indexOf("particle.io")||(n[e].target="_blank")})}()});

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.