PageSourceSearch

https://supa.pk/cdn/shop/t/2/assets/theme.js?v=47723023909498885501606189518

js supa.pk collected 2026-09-26 17:36:20 UTC 288,867 bytes, 23 lines download raw bytes

1(function(factory){typeof define=="function"&&define.amd?define("index",factory):factory()})((function(){"use strict";function _typeof(obj){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(obj2){return typeof obj2}:_typeof=function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _unsupportedIterableToArray(o,minLen){if(o){if(typeof o=="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor&&(n=o.constructor.name),n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}}function _arrayLikeToArray(arr,len){(len==null||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _createForOfIteratorHelper(o){if(typeof Symbol=="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(o=_unsupportedIterableToArray(o))){var i=0,F=function(){};return{s:F,n:function(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function(e){throw e},f:F}}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 it,normalCompletion=!0,didErr=!1,err;return{s:function(){it=o[Symbol.iterator]()},n:function(){var step=it.next();return normalCompletion=step.done,step},e:function(e){didErr=!0,err=e},f:function(){try{!normalCompletion&&it.return!=null&&it.return()}finally{if(didErr)throw err}}}}var animationQueue={},Animation=(function(){function Animation2(){_classCallCheck(this,Animation2)}return _createClass(Animation2,null,[{key:"slideUp",value:function(element,callback){var propertyToAnimate=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"height";element.style[propertyToAnimate]="".concat(element.scrollHeight,"px"),element.offsetHeight,element.style[propertyToAnimate]=0,animationQueue[element.id]&&(element.removeEventListener("transitionend",animationQueue[element.id]),delete animationQueue[element.id]);var transitionEnded=function transitionEnded2(event2){event2.propertyName==="height"&&(element.removeEventListener("transitionend",transitionEnded2),(callback||function(){})())};element.addEventListener("transitionend",transitionEnded)}},{key:"slideDown",value:function(element,callback){var propertyToAnimate=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"height";element.style[propertyToAnimate]="".concat(element.scrollHeight,"px");var transitionEnded=function transitionEnded2(event2){if(event2.propertyName===propertyToAnimate){var defaultValue="auto";propertyToAnimate==="max-height"&&(defaultValue="none"),element.style[propertyToAnimate]=defaultValue,element.removeEventListener("transitionend",transitionEnded2),delete animationQueue[element.id],(callback||function(){})()}};element.addEventListener("transitionend",transitionEnded),animationQueue[element.id]=transitionEnded}}]),Animation2})(),Dom=(function(){function Dom2(){_classCallCheck(this,Dom2)}return _createClass(Dom2,null,[{key:"getSiblings",value:function(element,filter){for(var includeSelf=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,siblings=[],currentElement=element;currentElement=currentElement.previousElementSibling;)(!filter||currentElement.matches(filter))&&siblings.push(currentElement);for(includeSelf&&siblings.push(element),currentElement=element;currentElement=currentElement.nextElementSibling;)(!filter||currentElement.matches(filter))&&siblings.push(currentElement);return siblings}}]),Dom2})(),commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function unwrapExports(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}var browser=createCommonjsModule(function(module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function Delegate2(root){this.listenerMap=[{},{}],root&&this.root(root),this.handle=Delegate2.prototype.handle.bind(this),this._removedListeners=[]}Delegate2.prototype.root=function(root){var listenerMap=this.listenerMap,eventType;if(this.rootElement){for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!1)}if(!root||!root.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=root;for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!1);return this},Delegate2.prototype.captureForType=function(eventType){return["blur","error","focus","load","resize","scroll"].indexOf(eventType)!==-1},Delegate2.prototype.on=function(eventType,selector,handler,useCapture){var root,listenerMap,matcher,matcherParam;if(!eventType)throw new TypeError("Invalid event type: "+eventType);if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0&&(useCapture=this.captureForType(eventType)),typeof handler!="function")throw new TypeError("Handler must be a type of Function");return root=this.rootElement,listenerMap=this.listenerMap[useCapture?1:0],listenerMap[eventType]||(root&&root.addEventListener(eventType,this.handle,useCapture),listenerMap[eventType]=[]),selector?/^[a-z]+$/i.test(selector)?(matcherParam=selector,matcher=matchesTag):/^#[a-z0-9\-_]+$/i.test(selector)?(matcherParam=selector.slice(1),matcher=matchesId):(matcherParam=selector,matcher=Element.prototype.matches):(matcherParam=null,matcher=matchesRoot.bind(this)),listenerMap[eventType].push({selector:selector,handler:handler,matcher:matcher,matcherParam:matcherParam}),this},Delegate2.prototype.off=function(eventType,selector,handler,useCapture){var i,listener,listenerMap,listenerList,singleEventType;if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0)return this.off(eventType,selector,handler,!0),this.off(eventType,selector,handler,!1),this;if(listenerMap=this.listenerMap[useCapture?1:0],!eventType){for(singleEventType in listenerMap)listenerMap.hasOwnProperty(singleEventType)&&this.off(singleEventType,selector,handler);return this}if(listenerList=listenerMap[eventType],!listenerList||!listenerList.length)return this;for(i=listenerList.length-1;i>=0;i--)listener=listenerList[i],(!selector||selector===listener.selector)&&(!handler||handler===listener.handler)&&(this._removedListeners.push(listener),listenerList.splice(i,1));return listenerList.length||(delete listenerMap[eventType],this.rootElement&&this.rootElement.removeEventListener(eventType,this.handle,useCapture)),this},Delegate2.prototype.handle=function(event2){var i,l,type=event2.type,root,phase,listener,returned,listenerList=[],target,eventIgnore="ftLabsDelegateIgnore";if(event2[eventIgnore]!==!0){switch(target=event2.target,target.nodeType===3&&(target=target.parentNode),target.correspondingUseElement&&(target=target.correspondingUseElement),root=this.rootElement,phase=event2.eventPhase||(event2.target!==event2.currentTarget?3:2),phase){case 1:listenerList=this.listenerMap[1][type];break;case 2:this.listenerMap[0]&&this.listenerMap[0][type]&&(listenerList=listenerList.concat(this.listenerMap[0][type])),this.listenerMap[1]&&this.listenerMap[1][type]&&(listenerList=listenerList.concat(this.listenerMap[1][type]));break;case 3:listenerList=this.listenerMap[0][type];break}var toFire=[];for(l=listenerList.length;target&&l;){for(i=0;i<l&&(listener=listenerList[i],!!listener);i++)target.tagName&&["button","input","select","textarea"].indexOf(target.tagName.toLowerCase())>-1&&target.hasAttribute("disabled")?toFire=[]:listener.matcher.call(target,listener.matcherParam,target)&&toFire.push([event2,target,listener]);if(target===root||(l=listenerList.length,target=target.parentElement||target.parentNode,target instanceof HTMLDocument))break}var ret;for(i=0;i<toFire.length;i++)if(!(this._removedListeners.indexOf(toFire[i][2])>-1)&&(returned=this.fire.apply(this,toFire[i]),returned===!1)){toFire[i][0][eventIgnore]=!0,toFire[i][0].preventDefault(),ret=!1;break}return ret}},Delegate2.prototype.fire=function(event2,target,listener){return listener.handler.call(target,event2,target)};function matchesTag(tagName,element){return tagName.toLowerCase()===element.tagName.toLowerCase()}function matchesRoot(selector,element){return this.rootElement===window?element===document||element===document.documentElement||element===window:this.rootElement===element}
1function matchesId(id,element){return id===element.id}Delegate2.prototype.destroy=function(){this.off(),this.root()};var _default=Delegate2;exports.default=_default,module.exports=exports.default}),Delegate=unwrapExports(browser),CollapsibleManager=(function(){function CollapsibleManager2(){_classCallCheck(this,CollapsibleManager2),this.domDelegate=new Delegate(document.body),this._attachListeners()}return _createClass(CollapsibleManager2,[{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(event2,target){var _this=this;!target&&event2.detail&&(target=document.querySelector('[aria-controls="'.concat(event2.detail.id,'"]')));var isOpen=target.getAttribute("aria-expanded")==="true",parentCollapsible=target.parentNode;isOpen?this._close(parentCollapsible):this._open(parentCollapsible),target.getAttribute("data-close-siblings")!=="false"&&Dom.getSiblings(parentCollapsible).forEach(function(collapsibleToClose){return _this._close(collapsibleToClose)})}},{key:"_open",value:function(collapsible){var toggleButton=collapsible.querySelector("[aria-controls]");if(!(!toggleButton||toggleButton.getAttribute("aria-expanded")==="true")){var collapsibleContent=collapsible.querySelector("#".concat(toggleButton.getAttribute("aria-controls")));toggleButton.setAttribute("aria-expanded","true"),collapsibleContent.hasAttribute("aria-hidden")&&collapsibleContent.setAttribute("aria-hidden","false"),Animation.slideDown(collapsibleContent,function(){toggleButton.hasAttribute("data-collapsible-force-overflow")&&(collapsibleContent.style.overflow="visible");var autofocusElement=collapsibleContent.querySelector("[autofocus]");autofocusElement&&autofocusElement.focus()})}}},{key:"_close",value:function(collapsible){var toggleButton=collapsible.querySelector("[aria-controls]");if(!(!toggleButton||toggleButton.getAttribute("aria-expanded")==="false")){var collapsibleContent=collapsible.querySelector("#".concat(toggleButton.getAttribute("aria-controls")));toggleButton.hasAttribute("data-collapsible-force-overflow")&&(collapsibleContent.style.overflow="hidden"),collapsibleContent.hasAttribute("aria-hidden")&&collapsibleContent.setAttribute("aria-hidden","true"),toggleButton.setAttribute("aria-expanded","false"),Animation.slideUp(collapsibleContent)}}}]),CollapsibleManager2})(),CountrySelector=(function(){function CountrySelector2(countrySelect,provinceSelect){_classCallCheck(this,CountrySelector2),this.countrySelect=countrySelect,this.provinceSelect=provinceSelect,this.countrySelect&&this.provinceSelect&&(this._attachListeners(),this._initSelectors())}return _createClass(CountrySelector2,[{key:"destroy",value:function(){this.countrySelect&&this.countrySelect.removeEventListener("change",this._onCountryChangedListener)}},{key:"_initSelectors",value:function(){var defaultCountry=this.countrySelect.getAttribute("data-default");if(defaultCountry){for(var i=0;i!==this.countrySelect.options.length;++i)if(this.countrySelect.options[i].text===defaultCountry){this.countrySelect.selectedIndex=i;break}}else this.countrySelect.selectedIndex=0;var event2=new Event("change",{bubbles:!0});this.countrySelect.dispatchEvent(event2);var defaultProvince=this.provinceSelect.getAttribute("data-default");defaultProvince&&(this.provinceSelect.value=defaultProvince)}},{key:"_attachListeners",value:function(){this._onCountryChangedListener=this._onCountryChanged.bind(this),this.countrySelect.addEventListener("change",this._onCountryChangedListener)}},{key:"_onCountryChanged",value:function(){var _this=this,selectedOption=this.countrySelect.options[this.countrySelect.selectedIndex];if(selectedOption){var provinces=JSON.parse(selectedOption.getAttribute("data-provinces")||"[]");if(this.provinceSelect.innerHTML="",provinces.length===0){this.provinceSelect.closest(".form__input-wrapper").style.display="none";return}provinces.forEach(function(data){_this.provinceSelect.options.add(new Option(data[1],data[0]))}),this.provinceSelect.closest(".form__input-wrapper").style.display="block"}}}]),CountrySelector2})(),Responsive=(function(){function Responsive2(){_classCallCheck(this,Responsive2)}return _createClass(Responsive2,null,[{key:"matchesBreakpoint",value:function(breakpoint){switch(breakpoint){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(){if(window.matchMedia("screen and (max-width: 640px)").matches)return"phone";if(window.matchMedia("screen and (min-width: 641px) and (max-width: 1023px)").matches)return"tablet";if(window.matchMedia("screen and (min-width: 1024px) and (max-width: 1279px)").matches)return"lap";if(window.matchMedia("screen and (min-width: 1280px)").matches)return"desk"}}]),Responsive2})(),DesktopNavigation=(function(){function DesktopNavigation2(element,navigationLayout,openTrigger){_classCallCheck(this,DesktopNavigation2),this.element=element,this.delegateElement=new Delegate(this.element),this.delegateRoot=new Delegate(document.documentElement),this.useInlineNavigation=navigationLayout==="inline",this.isNavigationVisible=this.useInlineNavigation,this.openTrigger=openTrigger,Responsive.matchesBreakpoint("supports-hover")||(this.openTrigger="click"),this.openItems=[],this.dropdownActivationTimeouts={},this.dropdownDeactivationTimeouts={},this.DROPDOWN_TIMEOUT=100,this._attachListeners(),this.useInlineNavigation&&this._setupInlineNavigation()}return _createClass(DesktopNavigation2,[{key:"destroy",value:function(){this.delegateElement.off(),this.delegateRoot.off()}},{key:"onBlockSelect",value:function(event2){var _this=this;this.useInlineNavigation||this._openNavigation(),Dom.getSiblings(event2.target.parentNode,".is-dropdown-open").forEach(function(openItem){_this._deactivateDropdown(event2,openItem.querySelector('[data-type="menuitem"][aria-haspopup]'))}),this._activateDropdown(event2,event2.target.previousElementSibling)}},{key:"onBlockDeselect",value:function(event2){this.useInlineNavigation||this._closeNavigation(),this._deactivateDropdown(event2,event2.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)),this.openTrigger==="hover"?(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(event2){event2.relatedTarget!==null&&!this.element.contains(event2.relatedTarget)&&this._closeNavigation()}},{key:"_onClick",value:function(event2){this.element.contains(event2.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 _this2=this;if(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,this.openTrigger==="click"){var cloneOpenItems=this.openItems.slice(0);cloneOpenItems.forEach(function(item){_this2._deactivateDropdown(event,item)})}}},{key:"_toggleNavigation",value:function(event2){this.isNavigationVisible?this._closeNavigation():this._openNavigation()}},{key:"_toggleDropdown",value:function(event2,target){target.getAttribute("aria-expanded")==="false"&&event2.preventDefault(),target.getAttribute("aria-expanded")==="true"?target.getAttribute("href")==="#"&&(event2.preventDefault(),this._deactivateDropdown(event2,target.closest(".is-dropdown-open"))):this._activateDropdown(event2,target)}},{key:"_activateDropdown",value:function(event2,target){var _this3=this;if(this.openTrigger==="click"){var cloneOpenItems=this.openItems.slice(0);
1cloneOpenItems.forEach(function(item){item.contains(target)||_this3._deactivateDropdown(event2,item)})}var menuToOpen=Dom.getSiblings(target,"[aria-hidden]")[0],callback=function(){if(target.setAttribute("aria-expanded","true"),target.parentNode.classList.add("is-dropdown-open"),menuToOpen.setAttribute("aria-hidden","false"),_this3.openTrigger==="hover"&&_this3.dropdownDeactivationTimeouts[menuToOpen.id]&&(clearTimeout(_this3.dropdownDeactivationTimeouts[menuToOpen.id]),delete _this3.dropdownDeactivationTimeouts[menuToOpen.id]),_this3.useInlineNavigation){var windowWidth=window.innerWidth,shouldOpenLeft=!1;menuToOpen.querySelectorAll(".nav-dropdown").forEach(function(subSubMenu){subSubMenu.getBoundingClientRect().right>windowWidth&&(shouldOpenLeft=!0)}),shouldOpenLeft&&menuToOpen.classList.add("nav-dropdown--inverse")}target.closest('[data-type="menu"]').classList.add("nav-dropdown--glued"),menuToOpen.classList.contains("mega-menu")&&_this3._setupMegaMenu(menuToOpen),_this3.openTrigger==="click"&&_this3.openItems.push(target.parentNode)};if(this.openTrigger==="click")callback();else{for(var toDeactivate in this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(toDeactivate)&&(clearTimeout(this.dropdownActivationTimeouts[toDeactivate]),delete this.dropdownActivationTimeouts[toDeactivate]);callback()}}},{key:"_deactivateDropdown",value:function(event2,target){var _this4=this;if(!(this.openTrigger==="hover"&&target.contains(event2.relatedTarget))){var menuToClose=target.querySelector("[aria-hidden]"),callback=function(){target.classList.remove("is-dropdown-open"),target.querySelector('[data-type="menuitem"]').setAttribute("aria-expanded","false");var menuToClose2=target.querySelector("[aria-hidden]");if(menuToClose2.setAttribute("aria-hidden","true"),target.closest('[data-type="menu"]').classList.remove("nav-dropdown--glued"),_this4.openTrigger==="click"){target.querySelectorAll(".is-dropdown-open").forEach(function(item){_this4._deactivateDropdown(event2,item);var index2=_this4.openItems.indexOf(item);index2>-1&&_this4.openItems.splice(index2,1)});var index=_this4.openItems.indexOf(target);index>-1&&_this4.openItems.splice(index,1)}};this.openTrigger==="click"?callback():this.dropdownDeactivationTimeouts[menuToClose.id]=setTimeout(function(){callback(),delete _this4.dropdownDeactivationTimeouts[menuToClose.id]},this.DROPDOWN_TIMEOUT)}}},{key:"_blockDropdownDeactivation",value:function(event2,target){if(this.dropdownDeactivationTimeouts[target.id]!==void 0){clearTimeout(this.dropdownDeactivationTimeouts[target.id]),delete this.dropdownDeactivationTimeouts[target.id];for(var toDeactivate in this.dropdownActivationTimeouts)this.dropdownActivationTimeouts.hasOwnProperty(toDeactivate)&&(clearTimeout(this.dropdownActivationTimeouts[toDeactivate]),delete this.dropdownActivationTimeouts[toDeactivate])}}},{key:"_setupMegaMenu",value:function(megaMenu){if(!this.useInlineNavigation){var navDropdownWidth=megaMenu.closest(".nav-dropdown").clientWidth;megaMenu.style.maxWidth=Math.min(1400-navDropdownWidth,parseInt(window.innerWidth-navDropdownWidth-80))+"px"}}},{key:"_setupInlineNavigation",value:function(){var _this5=this;this.element.querySelectorAll(".mega-menu").forEach(function(megaMenu){megaMenu.closest(".nav-bar__item").classList.add("nav-bar__item--static")}),"MutationObserver"in window&&(this.dropdownMenuObserver=new MutationObserver(function(mutationList){mutationList.forEach(function(mutation){mutation.target.getAttribute("aria-hidden")==="false"&&mutation.target.style.setProperty("--distance-to-top","".concat(mutation.target.getBoundingClientRect().top,"px"))})}),this.element.querySelectorAll(".nav-dropdown .nav-dropdown").forEach(function(item){_this5.dropdownMenuObserver.observe(item,{attributes:!0,attributeFilter:["aria-hidden"]})}))}}]),DesktopNavigation2})(),fastdom=createCommonjsModule(function(module){(function(win){var debug=function(){},raf=win.requestAnimationFrame||win.webkitRequestAnimationFrame||win.mozRequestAnimationFrame||win.msRequestAnimationFrame||function(cb){return setTimeout(cb,16)};function FastDom(){var self2=this;self2.reads=[],self2.writes=[],self2.raf=raf.bind(win)}FastDom.prototype={constructor:FastDom,measure:function(fn,ctx){var task=ctx?fn.bind(ctx):fn;return this.reads.push(task),scheduleFlush(this),task},mutate:function(fn,ctx){var task=ctx?fn.bind(ctx):fn;return this.writes.push(task),scheduleFlush(this),task},clear:function(task){return remove(this.reads,task)||remove(this.writes,task)},extend:function(props){if(_typeof(props)!="object")throw new Error("expected object");var child=Object.create(this);return mixin(child,props),child.fastdom=this,child.initialize&&child.initialize(),child},catch:null};function scheduleFlush(fastdom2){fastdom2.scheduled||(fastdom2.scheduled=!0,fastdom2.raf(flush.bind(null,fastdom2)))}function flush(fastdom2){var writes=fastdom2.writes,reads=fastdom2.reads,error;try{debug("flushing reads",reads.length),runTasks(reads),debug("flushing writes",writes.length),runTasks(writes)}catch(e){error=e}if(fastdom2.scheduled=!1,(reads.length||writes.length)&&scheduleFlush(fastdom2),error)if(debug("task errored",error.message),fastdom2.catch)fastdom2.catch(error);else throw error}function runTasks(tasks){for(var task;task=tasks.shift();)task()}function remove(array,item){var index=array.indexOf(item);return!!~index&&!!array.splice(index,1)}function mixin(target,source){for(var key in source)source.hasOwnProperty(key)&&(target[key]=source[key])}var exports=win.fastdom=win.fastdom||new FastDom;module.exports=exports})(typeof window!="undefined"?window:commonjsGlobal)}),CollectionFilterDrawer=(function(){function CollectionFilterDrawer2(options){_classCallCheck(this,CollectionFilterDrawer2),this.element=document.getElementById("mobile-collection-filters"),this.delegateRoot=new Delegate(document.documentElement),this.options=options,this.isOpen=!1,this.element&&this._attachListeners()}return _createClass(CollectionFilterDrawer2,[{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(event2){event2&&event2.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(event2){event2&&event2.stopPropagation(),this.isOpen=!1,document.querySelector('[aria-controls="mobile-collection-filters"]').setAttribute("aria-expanded","fal
1se"),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(newFilters){var _this=this;this.element&&fastdom.mutate(function(){var filterCountElement=_this.element.querySelector(".collection-drawer__filter-count");filterCountElement.innerText="(".concat(newFilters.length,")"),filterCountElement.style.display=newFilters.length===0?"none":"inline",_this.element.querySelector('[data-action="clear-tags"]').style.display=newFilters.length===0?"none":"block",_this.options.filterType==="group"&&_this.element.querySelectorAll(".collection__filter-item-active").forEach(function(item){var parentList=item.closest(".collection__filter-group"),activeDataTag=parentList.querySelector(".is-selected[data-tag]");activeDataTag?(item.style.display="block",item.innerText=activeDataTag.getAttribute("data-tag-user")):item.style.display="none"})})}},{key:"_detectOutsideClick",value:function(event2){this.isOpen&&!event2.target.closest(".collection-drawer__inner")&&this.close()}}]),CollectionFilterDrawer2})(),ExitPopup=(function(){function ExitPopup2(element){_classCallCheck(this,ExitPopup2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(element.getAttribute("data-popup-settings")),this.hasOpenOnceInCurrentPage=!1;try{window.location.hash==="#exit-popup"&&window.theme.template!="captcha"&&this._openPopup()}catch(error){}this._attachListeners()}return _createClass(ExitPopup2,[{key:"destroy",value:function(){this.delegateElement.off()}},{key:"_attachListeners",value:function(){var _this=this;Responsive.matchesBreakpoint("supports-hover")&&(this.delegateElement.on("click",'[data-action="close-popup"]',this._closePopup.bind(this)),document.body.addEventListener("mouseleave",function(){_this.hasOpenOnceInCurrentPage||(!_this.options.showOnlyOnce||_this.options.showOnlyOnce&&localStorage.getItem("themeExitPopup")===null)&&_this._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(event2){(!this.element.contains(event2.target)||this.element===event2.target)&&this._closePopup()}}]),ExitPopup2})(),LoadingBar=(function(){function LoadingBar2(){_classCallCheck(this,LoadingBar2),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 _createClass(LoadingBar2,[{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(event2){event2.propertyName==="width"&&this.element.classList.contains("is-finished")&&(this.element.classList.remove("is-visible"),this.element.classList.remove("is-finished"),this.element.style.width="0")}}]),LoadingBar2})(),Accessibility=(function(){function Accessibility2(){_classCallCheck(this,Accessibility2)}return _createClass(Accessibility2,null,[{key:"trapFocus",value:function(container,namespace){this.listeners=this.listeners||{};var elementToFocus=container.querySelector("[autofocus]")||container;container.setAttribute("tabindex","-1"),elementToFocus.focus(),this.listeners[namespace]=function(event2){container!==event2.target&&!container.contains(event2.target)&&elementToFocus.focus()},document.addEventListener("focusin",this.listeners[namespace])}},{key:"removeTrapFocus",value:function(container,namespace){container&&container.removeAttribute("tabindex"),document.removeEventListener("focusin",this.listeners[namespace])}},{key:"clearTrapFocus",value:function(){for(var key in this.listeners)this.listeners.hasOwnProperty(key)&&document.removeEventListener("focusin",this.listeners[key]);this.listeners={}}}]),Accessibility2})(),Cart=(function(){function Cart2(element,options){_classCallCheck(this,Cart2),this.element=element,this.delegateElement=new Delegate(this.element),this.delegateRoot=new Delegate(document.documentElement),this.options=options,this.miniCartElement=this.element.querySelector(".mini-cart"),this.isMiniCartOpen=!1,window.theme.pageType!=="cart"&&this.miniCartElement&&(this.miniCartToggleElement=this.element.querySelector('[aria-controls="'.concat(this.miniCartElement.id,'"]')),this._checkMiniCartScrollability()),this.itemCount=window.theme.cartCount,this._attachListeners()}return _createClass(Cart2,[{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),window.theme.pageType!=="cart"&&window.theme.cartType!=="page"&&(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(event2){event2&&event2.preventDefault(),this.isMiniCartOpen?this._closeMiniCart():this._openMiniCart()}},{key:"_openMiniCart",value:function(){this.miniCartToggleElement.setAttribute("aria-expanded","true"),Responsive.getCurrentBreakpoint()==="phone"&&this.miniCartToggleElement.querySelector(".header__cart-icon").setAttribute("aria-expanded","true"),this.miniCartElement.setAttribute("aria-hidden","false"),this.isMiniCartOpen=!0,this._calculateMiniCartHeight(),Accessibility.trapFocus(this.miniCartElement,"mini-cart"),document.body.classList.add("no-mobile-scroll")}},{key:"_closeMiniCart",value:function(){this.miniCartToggleElement.setAttribute("aria-expanded","fal
1se"),Responsive.getCurrentBreakpoint()==="phone"&&(this.miniCartToggleElement.querySelector(".header__cart-icon").setAttribute("aria-expanded","false"),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(Responsive.getCurrentBreakpoint()==="phone")if(this.isMiniCartOpen){var maxHeight=window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom;this.miniCartElement.style.maxHeight="".concat(maxHeight,"px");var miniCartContentElement=this.miniCartElement.querySelector(".mini-cart__content"),miniCartRecapElement=this.miniCartElement.querySelector(".mini-cart__recap");miniCartRecapElement&&(miniCartContentElement.style.maxHeight="".concat(maxHeight-miniCartRecapElement.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(event2,target){var _this=this,parsedQuantity=1;if(window.theme.cartType==="page"&&target.hasAttribute("data-href")){window.location.href=target.getAttribute("data-href");return}target.tagName==="INPUT"?parsedQuantity=parseInt(target.value):parsedQuantity=parseInt(target.getAttribute("data-quantity")),document.dispatchEvent(new CustomEvent("theme:loading:start")),fetch("".concat(window.routes.cartChangeUrl,".js"),{body:JSON.stringify({id:target.getAttribute("data-line-id"),quantity:parsedQuantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(cart){cart.json().then(function(content){_this.itemCount=content.item_count,_this._rerender(!1).then(function(){document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}),event2.preventDefault()}},{key:"_updateQuantitySize",value:function(event2,target){target.setAttribute("size",Math.max(target.value.length,2))}},{key:"_rerender",value:function(){var _this2=this,scrollToTop=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,url="";return window.theme.pageType!=="cart"?url="".concat(window.routes.cartUrl,"?view=mini-cart&timestamp=").concat(Date.now()):url="".concat(window.routes.cartUrl,"?timestamp=").concat(Date.now()),fetch(url,{credentials:"same-origin",method:"GET"}).then(function(content){content.text().then(function(html){var myDiv=document.createElement("div");if(myDiv.innerHTML=html,myDiv.firstElementChild&&myDiv.firstElementChild.hasAttribute("data-item-count")&&(_this2.itemCount=parseInt(myDiv.firstElementChild.getAttribute("data-item-count"))),_this2.element.querySelector(".header__cart-count").textContent=_this2.itemCount,window.theme.cartType==="drawer")if(window.theme.pageType!=="cart"){var tempElement=document.createElement("div");tempElement.innerHTML=html;var miniCartItemListElement=_this2.miniCartElement.querySelector(".mini-cart__line-item-list"),scrollPosition=null;miniCartItemListElement&&(scrollPosition=miniCartItemListElement.scrollTop),_this2.miniCartElement.innerHTML=tempElement.querySelector(".mini-cart").innerHTML;var newMiniCartItemListElement=_this2.miniCartElement.querySelector(".mini-cart__line-item-list");newMiniCartItemListElement&&scrollPosition!==null&&(newMiniCartItemListElement.scrollTop=scrollPosition),_this2._checkMiniCartScrollability(),_this2._calculateMiniCartHeight(),_this2.element.dispatchEvent(new CustomEvent("cart:rerendered"))}else{var _tempElement=document.createElement("div");_tempElement.innerHTML=html;var originalCart=document.querySelector('[data-section-type="cart"]');originalCart.innerHTML=_tempElement.querySelector('[data-section-type="cart"]').innerHTML,scrollToTop&&window.scrollTo({top:0,behavior:"smooth"}),window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),_this2.element.dispatchEvent(new CustomEvent("cart:rerendered",{bubbles:!0}))}})})}},{key:"_checkMiniCartScrollability",value:function(){var miniCartItemList=this.miniCartElement.querySelector(".mini-cart__line-item-list");miniCartItemList&&miniCartItemList.scrollHeight>miniCartItemList.clientHeight&&miniCartItemList.classList.add("is-scrollable")}},{key:"_onProductAdded",value:function(event2){var _this3=this;this.itemCount+=event2.detail.quantity,this._onCartRefresh().then(function(){window.theme.pageType!=="cart"&&(_this3.options.useStickyHeader||window.scrollTo({top:0,behavior:"smooth"}),_this3._openMiniCart())})}},{key:"_onCartRefresh",value:function(event2){var scrollToTop=!0;return event2&&event2.detail&&(scrollToTop=event2.detail.scrollToTop),this._rerender(scrollToTop).then(function(){document.dispatchEvent(new CustomEvent("theme:loading:end"))})}},{key:"_onWindowClick",value:function(event2){this.miniCartElement&&this.isMiniCartOpen&&!this.element.contains(event2.target)&&this._closeMiniCart()}}]),Cart2})(),MobileNavigation=(function(){function MobileNavigation2(element){_classCallCheck(this,MobileNavigation2),this.element=element,this.delegateElement=new Delegate(this.element),this.delegateRoot=new Delegate(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 _createClass(MobileNavigation2,[{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(item){item.classList.remove("is-open")}),document.body.classList.remove("no-mobile-scroll"))}},{key:"_openPanel",value:function(event2,target){target.setAttribute("aria-expanded","true"),this.element.querySelector("#".concat(target.getAttribute("aria-controls"))).classList.add("is-open")}},{key:"_closePanel",value:function(event2,target){var panelToClose=target.closest(".mobile-menu__panel.is-open");panelToClose.classList.remove("is-open"),this.element.querySelector('[aria-controls="'.concat(panelToClose.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(event2){this.isOpen&&!this.element.contains(event2.target)&&this._toggleMenu()}}]),MobileNavigation2})(),ModalManager=(function(){function ModalManager2(){_classCallCheck(this,ModalManager2),this.domDelegate=new Delegate(document.body),this.activeModal=document.querySelector('.modal[aria-hidden="false"]'),this._attachListeners()}return _createClass(ModalManager2,[{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(event2,target){var _this=this,modal=document.querySelector("#".concat(target.getAttribute("aria-controls")));if(modal){var onOpen=function onOpen2(event3){event3.propertyName==="visibility"&&(modal.removeEventListener("transitionend",onOpen2),Accessibility.trapFocus(modal,"modal"),_this.activeModal=modal)};return modal.addEventListener("transitionend",onOpen),modal.setAttribute("aria-hidden","false"),document.documentElement.classList.add("is-locked"),this.domDelegate.on("click",this._clickOutsideListener),!1}}},{key:"_closeModal",value:function(){var _this2=this;if(this.activeModal){var onClose=function onClose2(event2){event2.propertyName==="visibility"&&(_this2.activeModal.removeEventListener("transitionend",onClose2),Accessibility.removeTrapFocus(_this2.activeModal,"modal"),_this2.activeModal.dispatchEvent(new CustomEvent("modal:closed")),_this2.activeModal=null)};this.activeModal.addEventListener("transitionend",onClose),this.activeModal.setAttribute("aria-hidden","true"),document.documentElement.classList.remove("is-locked"),this.domDelegate.off("click",this._clickOutsideListener)}}},{key:"_checkClickOutside",value:function(event2){this.activeModal&&(!this.activeModal.contains(event2.target)||this.activeModal===event2.target)&&this._closeModal()}}]),ModalManager2})(),NewsletterPopup=(function(){function NewsletterPopup2(element){_classCallCheck(this,NewsletterPopup2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(element.getAttribute("data-popup-settings"));try{window.location.hash==="#newsletter-popup"?this._openPopup():(!this.options.showOnlyOnce||this.options.showOnlyOnce&&localStorage.getItem("themePopup")===null)&&setTimeout(this._openPopup.bind(this),this.options.apparitionDelay*1e3)}catch(error){}this._attachListeners()}return _createClass(NewsletterPopup2,[{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(event2){(!this.element.contains(event2.target)||this.element===event2.target)&&this._closePopup()}}]),NewsletterPopup2})(),OverflowScroller=(function(){function OverflowScroller2(element,options){_classCallCheck(this,OverflowScroller2),element&&(this.element=element,this.options=options,this.lastKnownY=window.scrollY,this.currentTop=0,this.initialTopOffset=options.offsetTop||parseInt(window.getComputedStyle(this.element).top),this._attachListeners())}return _createClass(OverflowScroller2,[{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 _this=this;fastdom.measure(function(){var bounds=_this.element.getBoundingClientRect(),maxTop=bou
1nds.top+window.scrollY-_this.element.offsetTop+_this.initialTopOffset,minTop=_this.element.clientHeight-window.innerHeight+(_this.options.offsetBottom||0);window.scrollY<_this.lastKnownY?_this.currentTop-=window.scrollY-_this.lastKnownY:_this.currentTop+=_this.lastKnownY-window.scrollY,_this.currentTop=Math.min(Math.max(_this.currentTop,-minTop),maxTop,_this.initialTopOffset),_this.lastKnownY=window.scrollY}),fastdom.mutate(function(){_this.element.style.top="".concat(_this.currentTop,"px")})}}]),OverflowScroller2})(),PopoverManager=(function(){function PopoverManager2(){_classCallCheck(this,PopoverManager2),this.delegateElement=new Delegate(document.body),this.delegateRoot=new Delegate(document.documentElement),this.activePopover=null,this._attachListeners()}return _createClass(PopoverManager2,[{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(event2,target){var hasActivePopover=this.activePopover!==null,previousActivePopoverId=this.activePopover?this.activePopover.id:null;target.hasAttribute("data-follow-link")&&Responsive.matchesBreakpoint(target.getAttribute("data-follow-link"))||(hasActivePopover&&this._closeActivePopover(),(!hasActivePopover||hasActivePopover&&target.getAttribute("aria-controls")!==previousActivePopoverId)&&this._openPopover(target),event2.preventDefault())}},{key:"_closeActivePopover",value:function(){this.activePopover.setAttribute("aria-hidden","true"),document.querySelector('[aria-controls="'.concat(this.activePopover.id,'"]')).setAttribute("aria-expanded","false"),this.activePopover=null}},{key:"_openPopover",value:function(target){var element=document.getElementById(target.getAttribute("aria-controls"));if(target.setAttribute("aria-expanded","true"),element.setAttribute("aria-hidden","false"),Responsive.getCurrentBreakpoint()==="phone")element.style.height="".concat(window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom,"px");else{element.style.height="";var panelList=element.querySelector(".popover__panel-list");panelList&&(panelList.style.height="".concat(panelList.clientHeight,"px"))}this.activePopover=element}},{key:"_showPanel",value:function(event2,target){if(this.activePopover){var panels=this.activePopover.querySelectorAll(".popover__panel");panels.forEach(function(panel){panel.id===target.getAttribute("aria-controls")?(panel.classList.add("is-selected"),panel.closest(".popover__panel-list").style.height="".concat(panel.clientHeight,"px")):panel.classList.remove("is-selected")})}}},{key:"_onWindowClick",value:function(event2){event2.target.getAttribute("data-action")==="toggle-popover"||event2.target.closest('[data-action="toggle-popover"]')||this.activePopover&&!this.activePopover.contains(event2.target)&&this._closeActivePopover()}},{key:"_windowResized",value:function(){Responsive.getCurrentBreakpoint()==="phone"&&this.activePopover&&(this.activePopover.style.height="".concat(window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom,"px"))}}]),PopoverManager2})(),ProductItemColorSwatch=(function(){function ProductItemColorSwatch2(element){_classCallCheck(this,ProductItemColorSwatch2),this.element=element,this.delegateElement=new Delegate(this.element),this._attachListeners(),this.recalculateSwatches()}return _createClass(ProductItemColorSwatch2,[{key:"destroy",value:function(){this.delegateElement.off(),window.removeEventListener("resize",this._recalculateSwatchesListener)}},{key:"recalculateSwatches",value:function(){var _this=this;fastdom.measure(function(){_this.element.querySelectorAll(".product-item__swatch-list").forEach(function(swatchList){var currentWidth=swatchList.clientWidth,maxAllowedWidth=parseInt(Math.min(currentWidth,200)),maxFit=Math.floor(maxAllowedWidth/30);fastdom.mutate(function(){var colorSwatches=swatchList.querySelectorAll(".color-swatch");
1colorSwatches.forEach(function(colorSwatch,index){colorSwatch.classList.remove("color-swatch--view-more"),maxFit===index+1&&maxFit!==colorSwatches.length&&colorSwatch.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(event2,target){var productItem=target.closest(".product-item"),variantUrl=target.getAttribute("data-variant-url");productItem.querySelector(".product-item__image-wrapper").setAttribute("href",variantUrl),productItem.querySelector(".product-item__title").setAttribute("href",variantUrl);var originalImageElement=productItem.querySelector(".product-item__primary-image");if(target.hasAttribute("data-image-url")&&target.getAttribute("data-media-id")!==originalImageElement.getAttribute("data-media-id")){var newImageElement=document.createElement("img");newImageElement.className="product-item__primary-image lazyload image--fade-in",newImageElement.setAttribute("data-media-id",target.getAttribute("data-media-id")),newImageElement.setAttribute("data-src",target.getAttribute("data-image-url")),newImageElement.setAttribute("data-widths",target.getAttribute("data-image-widths")),newImageElement.setAttribute("data-sizes","auto"),originalImageElement.parentNode.style.paddingBottom="".concat(100/newImageElement.getAttribute("data-image-aspect-ratio"),"%"),originalImageElement.parentNode.replaceChild(newImageElement,originalImageElement)}}}]),ProductItemColorSwatch2})(),Currency=(function(){function Currency2(){_classCallCheck(this,Currency2)}return _createClass(Currency2,null,[{key:"formatMoney",value:function(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));var placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||"${{amount}}";function defaultTo(value2,defaultValue){return value2==null||value2!==value2?defaultValue:value2}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=defaultTo(precision,2),thousands=defaultTo(thousands,","),decimal=defaultTo(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}var value="";switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_space_separator":value=formatWithDelimiters(cents,2," ",".");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,",",".");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break}return formatString.indexOf("with_comma_separator")!==-1?formatString.replace(placeholderRegex,value).replace(",00",""):formatString.replace(placeholderRegex,value).replace(".00","")}}]),Currency2})(),Form=(function(){function Form2(){_classCallCheck(this,Form2)}return _createClass(Form2,null,[{key:"serialize",value:function(form){function stringKey(key,value){var beginBracket=key.lastIndexOf("[");if(beginBracket===-1){var _hash={};return _hash[key]=value,_hash}var newKey=key.substr(0,beginBracket),newValue={};return newValue[key.substring(beginBracket+1,key.length-1)]=value,stringKey(newKey,newValue)}for(var hash={},i=0,len=form.elements.length;i<len;i++){var formElement=form.elements[i];if(!(formElement.name===""||formElement.disabled)&&formElement.name&&!formElement.disabled&&(formElement.checked||/select|textarea/i.test(formElement.nodeName)||/hidden|text|search|tel|url|email|password|datetime|date|month|week|time|datetime-local|number|range|c
1olor/i.test(formElement.type))){var stringKeys=stringKey(formElement.name,formElement.value);hash=Form2.extend(hash,stringKeys)}}return hash}},{key:"extend",value:function(){for(var extended={},i=0,merge=function(obj){for(var prop in obj)obj.hasOwnProperty(prop)&&(Object.prototype.toString.call(obj[prop])==="[object Object]"?extended[prop]=Form2.extend(extended[prop],obj[prop]):extended[prop]=obj[prop])};i<arguments.length;i++)merge(arguments[i]);return extended}}]),Form2})(),ProductVariants=(function(){function ProductVariants2(element,options){var _this=this;_classCallCheck(this,ProductVariants2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=options;var productJsonElement=this.element.querySelector("[data-product-json]");if(productJsonElement){var jsonData=JSON.parse(productJsonElement.innerHTML);this.productData=jsonData.product,this.productOptionsWithValues=jsonData.options_with_values,this.variantsInventories=jsonData.inventories||{},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.forEac
1h(function(variant){variant.id===jsonData.selected_variant_id&&(_this.currentVariant=variant,_this.option1=variant.option1,_this.option2=variant.option2,_this.option3=variant.option3)})}this._updateSelectors(this.currentVariant),this._setupStockCountdown(),this._attachListeners()}return _createClass(ProductVariants2,[{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(previousVariant,newVariant){this._updateProductPrices(newVariant,previousVariant),this._updateInventory(newVariant,previousVariant),this._updateSku(newVariant,previousVariant),this._updateDiscountLabel(newVariant,previousVariant),this._updateUnitPrice(newVariant,previousVariant),this._updateSelectors(newVariant,previousVariant),this._updateAddToCartButton(newVariant,previousVariant),this.element.dispatchEvent(new CustomEvent("variant:changed",{bubbles:!0,detail:{variant:newVariant,previousVariant:previousVariant}}))}},{key:"_updateProductPrices",value:function(newVariant,previousVariant){var productPrices=this.element.querySelector(".price-list");if(!newVariant)productPrices.style.display="none";else{if(previousVariant&&previousVariant.price===newVariant.price&&previousVariant.compare_at_price===newVariant.compare_at_price)return;productPrices.innerHTML="",newVariant.compare_at_price>newVariant.price?(productPrices.innerHTML+='<span class="price price--highlight" data-money-convertible>'.concat(Currency.formatMoney(newVariant.price,window.theme.moneyFormat),"</span>"),productPrices.innerHTML+='<span class="price price--compare" data-money-convertible>'.concat(Currency.formatMoney(newVariant.compare_at_price,window.theme.moneyFormat),"</span>")):productPrices.innerHTML+='<span class="price" data-money-convertible>'.concat(Currency.formatMoney(newVariant.price,window.theme.moneyFormat),"</span>"),productPrices.style.display=""}}},{key:"_updateInventory",value:function(newVariant){if(!(!this.options.showInventoryQuantity||!newVariant)){var productFormInventoryElement=this.element.querySelector(".product-form__inventory"),variantInventoryManagement=this.variantsInventories[newVariant.id].inventory_management,variantInventoryPolicy=this.variantsInventories[newVariant.id].inventory_policy,variantInventoryQuantity=this.variantsInventories[newVariant.id].inventory_quantity,variantInventoryMessage=this.variantsInventories[newVariant.id].inventory_message;productFormInventoryElement.classList.remove("inventory--high"),productFormInventoryElement.classList.remove("inventory--low"),newVariant.available&&(variantInventoryManagement!==null&&variantInventoryPolicy==="deny"&&this.options.lowInventoryThreshold>0&&variantInventoryQuantity<=this.options.lowInventoryThreshold?productFormInventoryElement.classList.add("inventory--low"):productFormInventoryElement.classList.add("inventory--high"));var stockCountdown=this.element.querySelector(".inventory-bar");if(stockCountdown){var stockCountdownProgress=Math.min(Math.max(variantInventoryQuantity/parseInt(stockCountdown.getAttribute("data-stock-countdown-max"))*100,0),100);stockCountdown.classList.toggle("inventory-bar--hidden",stockCountdownProgress===0),stockCountdown.firstElementChild.style.width="".concat(stockCountdownProgress,"%")}productFormInventoryElement.innerHTML=variantInventoryMessage}}},{key:"_updateSku",value:function(newVariant,previousVariant){var productSku=this.element.querySelector(".product-meta__sku-number");if(productSku)if(!newVariant)productSku.style.display="none";else{if(previousVariant&&previousVariant.sku===newVariant.sku)return;productSku.innerHTML=newVariant.sku,productSku.style.display=""}}},{key:"_updateDiscountLabel",value:function(newVariant,previousVariant){if(window.theme.showDiscount){var discountLabel=this.element.querySelector(".product-meta .product-label--on-sale");if(discountLabel)if(!newVariant||!(newVariant.price<newVariant.compare_at_price))discountLabel.style.display="none";else{var savings=null;window.theme.discountMode==="percentage"?savings="".concat(Math.round((newVariant.compare_at_price-newVariant.price)*100/newVariant.compare_at_price),"%"):savings="<span data-money-convertible>".concat(Currency.formatMoney(newVariant.compare_at_price-newVariant.price,window.theme.moneyFormat),"</span>"),discountLabel.innerHTML="".concat(window.languages.collectionOnSaleLabel.replace("{{savings}}",savings)),discountLabel.style.display="inline-block"}}}},{key:"_updateUnitPrice",value:function(newVariant,previousVariant){var unitPriceMeasurement=this.element.querySelector(".unit-price-measurement");
1if(!newVariant||!newVariant.unit_price_measurement)unitPriceMeasurement.parentNode.style.display="none";else{unitPriceMeasurement.parentNode.style.display="block",unitPriceMeasurement.querySelector(".unit-price-measurement__price").innerHTML=Currency.formatMoney(newVariant.unit_price,window.theme.moneyFormat),unitPriceMeasurement.querySelector(".unit-price-measurement__reference-unit").innerHTML=newVariant.unit_price_measurement.reference_unit;var unitPriceReferenceValue=unitPriceMeasurement.querySelector(".unit-price-measurement__reference-value");unitPriceReferenceValue&&(unitPriceReferenceValue.innerHTML=newVariant.unit_price_measurement.reference_value)}}},{key:"_updateSelectors",value:function(newVariant){var _this2=this;if(newVariant){var option1=newVariant.option1,option2=newVariant.option2,option3=newVariant.option3,variantsCount=this.productData.variants.length;this.variantSelectors.forEach(function(selector,i){var selectorType=selector.getAttribute("data-selector-type");if(selectorType!=="select"){var optionIndex=i+1,optionValues=_this2.productOptionsWithValues[i].values;optionValues.forEach(function(valueToCheck,j){var variantAvailable=!1;if(optionIndex===1)for(var k=0;k!==variantsCount;++k){var currentVariant=_this2.productData.variants[k];if(currentVariant.option1===valueToCheck&&currentVariant.option2===option2&&currentVariant.option3===option3){variantAvailable=currentVariant.available;break}}else if(optionIndex===2)for(var _k=0;_k!==variantsCount;++_k){var _currentVariant=_this2.productData.variants[_k];if(_currentVariant.option1===option1&&_currentVariant.option2===valueToCheck&&_currentVariant.option3===option3){variantAvailable=_currentVariant.available;break}}else if(optionIndex===3)for(var _k2=0;_k2!==variantsCount;++_k2){var _currentVariant2=_this2.productData.variants[_k2];if(_currentVariant2.option1===option1&&_currentVariant2.option2===option2&&_currentVariant2.option3===valueToCheck){variantAvailable=_currentVariant2.available;break}}switch(selectorType){case"color":selector.querySelector(".color-swatch:nth-child(".concat(j+1,")")).classList.toggle("color-swatch--disabled",!variantAvailable);break;case"variant":selector.querySelector(".variant-swatch:nth-child(".concat(j+1,")")).classList.toggle("variant-swatch--disabled",!variantAvailable);break;case"block":selector.querySelector(".block-swatch:nth-child(".concat(j+1,")")).classList.toggle("block-swatch--disabled",!variantAvailable);break}})}})}}},{key:"_updateAddToCartButton",value:function(newVariant){var addToCartButtonElement=this.element.querySelector(".product-form__add-button"),infoListElement=this.element.querySelector(".product-form__info-list");if(addToCartButtonElement&&(newVariant?(infoListElement.style.display="block",newVariant.available?(addToCartButtonElement.removeAttribute("disabled"),addToCartButtonElement.classList.remove("button--disabled"),addToCartButtonElement.classList.add("button--primary"),addToCartButtonElement.setAttribute("data-action","add-to-cart"),addToCartButtonElement.innerHTML=window.languages.productFormAddToCart):(addToCartButtonElement.setAttribute("disabled","disabled"),addToCartButtonElement.classList.add("button--disabled"),addToCartButtonElement.classList.remove("button--primary"),addToCartButtonElement.removeAttribute("data-action"),addToCartButtonElement.innerHTML=window.languages.productFormSoldOut)):(addToCartButtonElement.setAttribute("disabled","disabled"),addToCartButtonElement.classList.add("button--disabled"),addToCartButtonElement.classList.remove("button--primary"),addToCartButtonElement.removeAttribute("data-action"),addToCartButtonElement.innerHTML=window.languages.productFormUnavailable,infoListElement.style.display="none"),this.options.showPaymentButton)){var paymentButtonElement=this.element.querySelector(".shopify-payment-button");!newVariant||!newVariant.available?paymentButtonElement.style.display="none":paymentButtonElement.style.display="block"}}},{key:"_onOptionChanged",value:function(event2,target){this["option"+target.getAttribute("data-option-position")]=target.value;var selectedValueElement=target.closest(".product-form__option").querySelector(".product-form__selected-value");selectedValueElement&&(selectedValueElement.innerHTML=target.value);var previousVariant=this.currentVariant;if(this.currentVariant=this._getCurrentVariantFromOptions(),this._onVariantChanged(previousVariant,this.currentVariant),this.currentVariant){if(this.options.enableHistoryState&&history.replaceState){var newUrl="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname,"?variant=").concat(this.currentVariant.id);window.history.replaceState({path:newUrl},"",newUrl)}this.masterSelector.querySelector("[selected]").removeAttribute("selected"),this.masterSelector.querySelector('[value="'.concat(this.currentVariant.id,'"]')).setAttribute("selected","selected")}}},{key:"_getCurrentVariantFromOptions",value:function(){var _this3=this,found=!1;
1return this.productData.variants.forEach(function(variant){variant.option1===_this3.option1&&variant.option2===_this3.option2&&variant.option3===_this3.option3&&(found=variant)}),found||null}},{key:"_addToCart",value:function(event2,target){var _this4=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=this.element.querySelector('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){document.dispatchEvent(new CustomEvent("theme:loading:end")),response.ok?(target.removeAttribute("disabled"),_this4.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:_this4.currentVariant,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}})),_this4.options.isQuickView&&document.dispatchEvent(new CustomEvent("modal:close"))):response.json().then(function(content){var errorMessageElement=document.createElement("div");errorMessageElement.className="product-form__error",errorMessageElement.innerHTML='<p class="alert alert--error">'.concat(content.description,"</p>"),target.removeAttribute("disabled"),target.parentNode.insertAdjacentElement("afterend",errorMessageElement),Animation.slideDown(errorMessageElement),setTimeout(function(){Animation.slideUp(errorMessageElement,function(){errorMessageElement.remove()})},5500)})}),event2.preventDefault()}}},{key:"_setupStockCountdown",value:function(){var _this5=this,stockCountdown=this.element.querySelector(".inventory-bar");if(stockCountdown){var stockCountdownIntersectionObserver=new IntersectionObserver(function(entries){entries.forEach(function(item){if(item.isIntersecting){var variantInventoryQuantity=_this5.variantsInventories[_this5.currentVariant.id].inventory_quantity,stockCountdownProgress=Math.min(Math.max(variantInventoryQuantity/parseInt(stockCountdown.getAttribute("data-stock-countdown-max"))*100,0),100);stockCountdown.classList.toggle("inventory-bar--hidden",stockCountdownProgress===0),stockCountdown.firstElementChild.style.width="".concat(stockCountdownProgress,"%"),stockCountdownIntersectionObserver.disconnect()}})});stockCountdownIntersectionObserver.observe(stockCountdown)}}}]),ProductVariants2})(),ProductModel=(function(){function ProductModel2(element){_classCallCheck(this,ProductModel2),this.element=element,this.delegateElement=new Delegate(this.element),this.delegateRoot=new Delegate(document.documentElement),this._attachListeners();var stylesheet=document.createElement("link");stylesheet.rel="stylesheet",stylesheet.href="https://cdn.shopify.com/shopifycloud/model-viewer-ui/assets/v1.0/model-viewer-ui.css",document.head.appendChild(stylesheet),window.Shopify.loadFeatures([{name:"model-viewer-ui",version:"1.0",onLoad:this._setupModelViewerUI.bind(this)},{name:"shopify-xr",version:"1.0"}])}return _createClass(ProductModel2,[{key:"destroy",value:function(){}},{key:"_attachListeners",value:function(){var _this=this;this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_play",function(){_this.element.dispatchEvent(new CustomEvent("model:played",{bubbles:!0}))}),this.element.querySelector("model-viewer").addEventListener("shopify_model_viewer_ui_toggle_pause",function(){_this.element.dispatchEvent(new CustomEvent("model:paused",{bubbles:!0}))})}},{key:"hasBeenSelected",value:function(isInitialLoading){Responsive.matchesBreakpoint("supports-hover")&&!isInitialLoading&&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)}}]),ProductModel2})(),ProductVideo=(function(){function ProductVideo2(element,enableVideoLooping){switch(_classCallCheck(this,ProductVideo2),this.element=element,this.delegateElement=new Delegate(this.element),this.enableVideoLooping=enableVideoLooping,this.player=null,this.element.getAttribute("data-media-type")){case"video":var stylesheet=document.createElement("link");stylesheet.rel="stylesheet",stylesheet.href="https://cdn.shopify.com/shopifycloud/shopify-plyr/v1.0/shopify-plyr.css",document.head.appendChild(stylesheet),window.Shopify.loadFeatures([{name:"video-u
1i",version:"1.0",onLoad:this._setupHtml5Video.bind(this)}]);break;case"external_video":this._setupExternalVideo();break}}return _createClass(ProductVideo2,[{key:"destroy",value:function(){this.player&&this.player.destroy()}},{key:"hasBeenSelected",value:function(isInitialLoading){Responsive.matchesBreakpoint("supports-hover")&&!isInitialLoading&&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();break}}},{key:"pause",value:function(){switch(this.element.getAttribute("data-media-type")){case"video":this.player.pause();break;case"external_video":this.player.pauseVideo();break}}},{key:"_setupHtml5Video",value:function(){var _this=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(){_this.element.dispatchEvent(new CustomEvent("video:played",{bubbles:!0}))}),this.player.on("pause",function(){_this.element.dispatchEvent(new CustomEvent("video:paused",{bubbles:!0}))})}},{key:"_setupExternalVideo",value:function(){this.element.getAttribute("data-media-host")==="youtube"&&this._loadYouTubeScript().then(this._setupYouTubePlayer.bind(this))}},{key:"_setupYouTubePlayer",value:function(){var _this2=this,playerLoadingInterval=setInterval(function(){window.YT!==void 0&&window.YT.Player!==void 0&&(_this2.player=new YT.Player(_this2.element.querySelector("iframe"),{videoId:_this2.element.getAttribute("data-video-id"),events:{onStateChange:function(event2){event2.data===0&&_this2.enableVideoLooping&&event2.target.seekTo(0)}}}),clearInterval(playerLoadingInterval))},50)}},{key:"_loadYouTubeScript",value:function(){return new Promise(function(resolve,reject){var script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src="//www.youtube.com/iframe_api"})}}]),ProductVideo2})(),evEmitter=createCommonjsModule(function(module){(function(global2,factory){module.exports?module.exports=factory():global2.EvEmitter=factory()})(typeof window!="undefined"?window:commonjsGlobal,function(){function EvEmitter(){}var proto=EvEmitter.prototype;return proto.on=function(eventName,listener){if(!(!eventName||!listener)){var events=this._events=this._events||{},listeners=events[eventName]=events[eventName]||[];return listeners.indexOf(listener)==-1&&listeners.push(listener),this}},proto.once=function(eventName,listener){if(!(!eventName||!listener)){this.on(eventName,listener);var onceEvents=this._onceEvents=this._onceEvents||{},onceListeners=onceEvents[eventName]=onceEvents[eventName]||{};return onceListeners[listener]=!0,this}},proto.off=function(eventName,listener){var listeners=this._events&&this._events[eventName];if(!(!listeners||!listeners.length)){var index=listeners.indexOf(listener);return index!=-1&&listeners.splice(index,1),this}},proto.emitEvent=function(eventName,args){var listeners=this._events&&this._events[eventName];if(!(!listeners||!listeners.length)){listeners=listeners.slice(0),args=args||[];for(var onceListeners=this._onceEvents&&this._onceEvents[eventName],i=0;i<listeners.length;i++){var listener=listeners[i],isOnce=onceListeners&&onceListeners[listener];isOnce&&(this.off(eventName,listener),delete onceListeners[listener]),listener.apply(this,args)}return this}},proto.allOff=function(){delete this._events,delete this._onceEvents},EvEmitter})}),getSize=createCommonjsModule(function(module){/*!
2 * getSize v2.0.3
3 * measure size of elements
4 * MIT license
5 */(function(window2,factory){module.exports?module.exports=factory():window2.getSize=factory()})(window,function(){function getStyleSize(value){var num=parseFloat(value),isValid=value.indexOf("%")==-1&&!isNaN(num);return isValid&&num}function noop(){}var logError=typeof console=="undefined"?noop:function(message){console.error(message)},measurements=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],measurementsLength=measurements.length;function getZeroSize(){for(var size={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},i=0;i<measurementsLength;i++){var measurement=measurements[i];size[measurement]=0}return size}function getStyle(elem){var style=getComputedStyle(elem);return style||logError("Style returned "+style+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),style}var isSetup=!1,isBoxSizeOuter;function setup(){if(!isSetup){isSetup=!0;var div=document.createElement("div");div.style.width="200px",div.style.padding="1px 2px 3px 4px",div.style.borderStyle="solid",div.style.borderWidth="1px 2px 3px 4px",div.style.boxSizing="border-box";var body=document.body||document.documentElement;body.appendChild(div);var style=getStyle(div);isBoxSizeOuter=Math.round(getStyleSize(style.width))==200,getSize2.isBoxSizeOuter=isBoxSizeOuter,body.removeChild(div)}}function getSize2(elem){if(setup(),typeof elem=="string"&&(elem=document.querySelector(elem)),!(!elem||_typeof(elem)!="object"||!elem.nodeType)){var style=getStyle(elem);if(style.display=="none")return getZeroSize();var size={};size.width=elem.offsetWidth,size.height=elem.offsetHeight;for(var isBorderBox=size.isBorderBox=style.boxSizing=="border-box",i=0;i<measurementsLength;i++){var measurement=measurements[i],value=style[measurement],num=parseFloat(value);size[measurement]=isNaN(num)?0:num}var paddingWidth=size.paddingLeft+size.paddingRight,paddingHeight=size.paddingTop+size.paddingBottom,marginWidth=size.marginLeft+size.marginRight,marginHeight=size.marginTop+size.marginBottom,borderWidth=size.borderLeftWidth+size.borderRightWidth,borderHeight=size.borderTopWidth+size.borderBottomWidth,isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter,styleWidth=getStyleSize(style.width);styleWidth!==!1&&(size.width=styleWidth+(isBorderBoxSizeOuter?0:paddingWidth+borderWidth));var styleHeight=getStyleSize(style.height);return styleHeight!==!1&&(size.height=styleHeight+(isBorderBoxSizeOuter?0:paddingHeight+borderHeight)),size.innerWidth=size.width-(paddingWidth+borderWidth),size.innerHe
5ight=size.height-(paddingHeight+borderHeight),size.outerWidth=size.width+marginWidth,size.outerHeight=size.height+marginHeight,size}}return getSize2})}),matchesSelector=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory():window2.matchesSelector=factory()})(window,function(){var matchesMethod=(function(){var ElemProto=window.Element.prototype;if(ElemProto.matches)return"matches";if(ElemProto.matchesSelector)return"matchesSelector";for(var prefixes=["webkit","moz","ms","o"],i=0;i<prefixes.length;i++){var prefix=prefixes[i],method=prefix+"MatchesSelector";if(ElemProto[method])return method}})();return function(elem,selector){return elem[matchesMethod](selector)}})}),utils=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,matchesSelector):window2.fizzyUIUtils=factory(window2,window2.matchesSelector)})(window,function(window2,matchesSelector2){var utils2={};utils2.extend=function(a,b){for(var prop in b)a[prop]=b[prop];return a},utils2.modulo=function(num,div){return(num%div+div)%div};var arraySlice=Array.prototype.slice;utils2.makeArray=function(obj){if(Array.isArray(obj))return obj;if(obj==null)return[];var isArrayLike=_typeof(obj)=="object"&&typeof obj.length=="number";return isArrayLike?arraySlice.call(obj):[obj]},utils2.removeFrom=function(ary,obj){var index=ary.indexOf(obj);index!=-1&&ary.splice(index,1)},utils2.getParent=function(elem,selector){for(;elem.parentNode&&elem!=document.body;)if(elem=elem.parentNode,matchesSelector2(elem,selector))return elem},utils2.getQueryElement=function(elem){return typeof elem=="string"?document.querySelector(elem):elem},utils2.handleEvent=function(event2){var method="on"+event2.type;this[method]&&this[method](event2)},utils2.filterFindElements=function(elems,selector){elems=utils2.makeArray(elems);var ffElems=[];return elems.forEach(function(elem){if(elem instanceof HTMLElement){if(!selector){ffElems.push(elem);return}matchesSelector2(elem,selector)&&ffElems.push(elem);for(var childElems=elem.querySelectorAll(selector),i=0;i<childElems.length;i++)ffElems.push(childElems[i])}}),ffElems},utils2.debounceMethod=function(_class,methodName,threshold){threshold=threshold||100;var method=_class.prototype[methodName],timeoutName=methodName+"Timeout";_class.prototype[methodName]=function(){var timeout=this[timeoutName];clearTimeout(timeout);var args=arguments,_this=this;this[timeoutName]=setTimeout(function(){method.apply(_this,args),delete _this[timeoutName]},threshold)}},utils2.docReady=function(callback){var readyState=document.readyState;readyState=="complete"||readyState=="interactive"?setTimeout(callback):document.addEventListener("DOMContentLoaded",callback)},utils2.toDashed=function(str){return str.replace(/(.)([A-Z])/g,function(match,$1,$2){return $1+"-"+$2}).toLowerCase()};var console2=window2.console;return utils2.htmlInit=function(WidgetClass,namespace){utils2.docReady(function(){var dashedNamespace=utils2.toDashed(namespace),dataAttr="data-"+dashedNamespace,dataAttrElems=document.querySelectorAll("["+dataAttr+"]"),jsDashElems=document.querySelectorAll(".js-"+dashedNamespace),elems=utils2.makeArray(dataAttrElems).concat(utils2.makeArray(jsDashElems)),dataOptionsAttr=dataAttr+"-options",jQuery=window2.jQuery;elems.forEach(function(elem){var attr=elem.getAttribute(dataAttr)||elem.getAttribute(dataOptionsAttr),options;try{options=attr&&JSON.parse(attr)}catch(error){console2&&console2.error("Error parsing "+dataAttr+" on "+elem.className+": "+error);return}var instance=new WidgetClass(elem,options);jQuery&&jQuery.data(elem,namespace,instance)})})},utils2})}),cell=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,getSize):(window2.Flickity=window2.Flickity||{},window2.Flickity.Cell=factory(window2,window2.getSize))})(window,function(window2,getSize2){function Cell(elem,parent){this.element=elem,this.parent=parent,this.create()}var proto=Cell.prototype;return proto.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0},proto.destroy=function(){this.unselect(),this.element.style.position="";var side=this.parent.originSide;this.element.style[side]=""},proto.getSize=function(){this.size=getSize2(this.element)},proto.setPosition=function(x){this.x=x,this.updateTarget(),this.renderPosition(x)},proto.updateTarget=proto.setDefaultTarget=function(){var marginProperty=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[marginProperty]+this.size.width*this.parent.cellAlign},proto.renderPosition=function(x){var side=this.parent.originSide;this.element.style[side]=this.parent.getPositionValue(x)},proto.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},proto.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},proto.wrapShift=function(shift){this.shift=shift,this.renderPosition(this.x+this.parent.slideableWidth*shift)},proto.remove=function(){this.element.parentNode.removeChild(this.element)},Cell})}),slide=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory():(window2.Flickity=window2.Flickity||{},window2.Flickity.Slide=factory())})(window,function(){function Slide(parent){this.parent=parent,this.isOriginLeft=parent.originSide=="left",this.cells=[],this.outerWidth=0,this.height=0}var proto=Slide.prototype;return proto.addCell=function(cell2){if(this.cells.push(cell2),this.outerWidth+=cell2.size.outerWidth,this.height=Math.max(cell2.size.outerHeight,this.height),this.cells.length==1){this.x=cell2.x;var beginMargin=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=cell2.size[beginMargin]}},proto.updateTarget=function(){var endMargin=this.isOriginLeft?"marginRight":"marginLeft",lastCell=this.getLastCell(),lastMargin=lastCell?lastCell.size[endMargin]:0,slideWidth=this.outerWidth-(this.firstMargin+lastMargin);this.target=this.x+this.firstMargin+slideWidth*this.parent.cellAlign},proto.getLastCell=function(){return this.cells[this.cells.length-1]}
5,proto.select=function(){this.cells.forEach(function(cell2){cell2.select()})},proto.unselect=function(){this.cells.forEach(function(cell2){cell2.unselect()})},proto.getCellElements=function(){return this.cells.map(function(cell2){return cell2.element})},Slide})}),animate=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,utils):(window2.Flickity=window2.Flickity||{},window2.Flickity.animatePrototype=factory(window2,window2.fizzyUIUtils))})(window,function(window2,utils2){var proto={};return proto.startAnimation=function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},proto.animate=function(){this.applyDragForce(),this.applySelectedAttraction();var previousX=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(previousX),this.isAnimating){var _this=this;requestAnimationFrame(function(){_this.animate()})}},proto.positionSlider=function(){var x=this.x;this.options.wrapAround&&this.cells.length>1&&(x=utils2.modulo(x,this.slideableWidth),x=x-this.slideableWidth,this.shiftWrapCells(x)),this.setTranslateX(x,this.isAnimating),this.dispatchScrollEvent()},proto.setTranslateX=function(x,is3d){x+=this.cursorPosition,x=this.options.rightToLeft?-x:x;var translateX=this.getPositionValue(x);this.slider.style.transform=is3d?"translate3d("+translateX+",0,0)":"translateX("+translateX+")"},proto.dispatchScrollEvent=function(){var firstSlide=this.slides[0];if(firstSlide){var positionX=-this.x-firstSlide.target,progress=positionX/this.slidesWidth;this.dispatchEvent("scroll",null,[progress,positionX])}},proto.positionSliderAtSelected=function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},proto.getPositionValue=function(position){return this.options.percentPosition?Math.round(position/this.size.innerWidth*1e4)*.01+"%":Math.round(position)+"px"},proto.settle=function(previousX){!this.isPointerDown&&Math.round(this.x*100)==Math.round(previousX*100)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},proto.shiftWrapCells=function(x){var beforeGap=this.cursorPosition+x;this._shiftCells(this.beforeShiftCells,beforeGap,-1);var afterGap=this.size.innerWidth-(x+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,afterGap,1)},proto._shiftCells=function(cells,gap,shift){for(var i=0;i<cells.length;i++){var cell2=cells[i],cellShift=gap>0?shift:0;cell2.wrapShift(cellShift),gap-=cell2.size.outerWidth}},proto._unshiftCells=function(cells){if(!(!cells||!cells.length))for(var i=0;i<cells.length;i++)cells[i].wrapShift(0)},proto.integratePhysics=function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},proto.applyForce=function(force){this.velocity+=force},proto.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},proto.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())},proto.applyDragForce=function(){if(!(!this.isDraggable||!this.isPointerDown)){var dragVelocity=this.dragX-this.x,dragForce=dragVelocity-this.velocity;this.applyForce(dragForce)}},proto.applySelectedAttraction=function(){var dragDown=this.isDraggable&&this.isPointerDown;if(!(dragDown||this.isFreeScrolling||!this.slides.length)){var distance=this.selectedSlide.target*-1-this.x,force=distance*this.options.selectedAttraction;this.applyForce(force)}},proto})}),flickity=createCommonjsModule(function(module){(function(window2,factory){if(module.exports)module.exports=factory(window2,evEmitter,getSize,utils,cell,slide,animate);else{var _Flickity=window2.Flickity;window2.Flickity=factory(window2,window2.EvEmitter,window2.getSize,window2.fizzyUIUtils,_Flickity.Cell,_Flickity.Slide,_Flickity.animatePrototype)}})(window,function(window2,EvEmitter,getSize2,utils2,Cell,Slide,animatePrototype){var jQuery=window2.jQuery,getComputedStyle2=window2.getComputedStyle,console2=window2.console;function moveElements(elems,toElem){for(elems=utils2.makeArray(elems);elems.length;)toElem.appendChild(elems.shift())}var GUID=0,instances={};function Flickity2(element,options){var queryElement=utils2.getQueryElement(element);if(!queryElement){console2&&console2.error("Bad element for Flickity: "+(queryElement||element));return}if(this.element=queryElement,this.element.flickityGUID){var instance=instances[this.element.flickityGUID];return instance.option(options),instance}jQuery&&(this.$element=jQuery(this.element)),this.options=utils2.extend({},this.constructor.defaults),this.option(options),this._create()}Flickity2.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},Flickity2.createMethods=[];var proto=Flickity2.prototype;utils2.extend(proto,EvEmitter.prototype),proto._create=function(){var id=this.guid=++GUID;this.element.flickityGUID=id,instances[id]=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)&&window2.addEventListener("resize",this);for(var eventName in this.options.on){var listener=this.options.on[eventName];this.on(eventName,listener)}Flickity2.createMethods.forEach(function(method){this[method]()},this),this.options.watchCSS?this.watchCSS():this.activate()},proto.option=function(opts){utils2.extend(this.options,opts)},proto.activate=function(){if(!this.isActive){this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.get
5Size();var cellElems=this._filterFindCellElements(this.element.children);moveElements(cellElems,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")}},proto._createSlider=function(){var slider=document.createElement("div");slider.className="flickity-slider",slider.style[this.originSide]=0,this.slider=slider},proto._filterFindCellElements=function(elems){return utils2.filterFindElements(elems,this.options.cellSelector)},proto.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},proto._makeCells=function(elems){var cellElems=this._filterFindCellElements(elems),cells=cellElems.map(function(cellElem){return new Cell(cellElem,this)},this);return cells},proto.getLastCell=function(){return this.cells[this.cells.length-1]},proto.getLastSlide=function(){return this.slides[this.slides.length-1]},proto.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},proto._positionCells=function(index){index=index||0,this.maxCellHeight=index&&this.maxCellHeight||0;var cellX=0;if(index>0){var startCell=this.cells[index-1];cellX=startCell.x+startCell.size.outerWidth}for(var len=this.cells.length,i=index;i<len;i++){var cell2=this.cells[i];cell2.setPosition(cellX),cellX+=cell2.size.outerWidth,this.maxCellHeight=Math.max(cell2.size.outerHeight,this.maxCellHeight)}this.slideableWidth=cellX,this.updateSlides(),this._containSlides(),this.slidesWidth=len?this.getLastSlide().target-this.slides[0].target:0},proto._sizeCells=function(cells){cells.forEach(function(cell2){cell2.getSize()})},proto.updateSlides=function(){if(this.slides=[],!!this.cells.length){var slide2=new Slide(this);this.slides.push(slide2);var isOriginLeft=this.originSide=="left",nextMargin=isOriginLeft?"marginRight":"marginLeft",canCellFit=this._getCanCellFit();this.cells.forEach(function(cell2,i){if(!slide2.cells.length){slide2.addCell(cell2);return}var slideWidth=slide2.outerWidth-slide2.firstMargin+(cell2.size.outerWidth-cell2.size[nextMargin]);canCellFit.call(this,i,slideWidth)||(slide2.updateTarget(),slide2=new Slide(this),this.slides.push(slide2)),slide2.addCell(cell2)},this),slide2.updateTarget(),this.updateSelectedSlide()}},proto._getCanCellFit=function(){var groupCells=this.options.groupCells;if(groupCells){if(typeof groupCells=="number"){var number=parseInt(groupCells,10);return function(i){return i%number!==0}}}else return function(){return!1};var percentMatch=typeof groupCells=="string"&&groupCells.match(/^(\d+)%$/),percent=percentMatch?parseInt(percentMatch[1],10)/100:1;return function(i,slideWidth){return slideWidth<=(this.size.innerWidth+1)*percent}},proto._init=proto.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},proto.getSize=function(){this.size=getSize2(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var cellAlignShorthands={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return proto.setCellAlign=function(){var shorthand=cellAlignShorthands[this.options.cellAlign];this.cellAlign=shorthand?shorthand[this.originSide]:this.options.cellAlign},proto.setGallerySize=function(){if(this.options.setGallerySize){var height=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=height+"px"}},proto._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var gapX=this.cursorPosition,cellIndex=this.cells.length-1;this.beforeShiftCells=this._getGapCells(gapX,cellIndex,-1),gapX=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(gapX,0,1)}},proto._getGapCells=function(gapX,cellIndex,increment){for(var cells=[];gapX>0;){var cell2=this.cells[cellIndex];if(!cell2)break;cells.push(cell2),cellIndex+=increment,gapX-=cell2.size.outerWidth}return cells},proto._containSlides=function(){if(!(!this.options.contain||this.options.wrapAround||!this.cells.length)){var isRightToLeft=this.options.rightToLeft,beginMargin=isRightToLeft?"marginRight":"marginLeft",endMargin=isRightToLeft?"marginLeft":"marginRight",contentWidth=this.slideableWidth-this.getLastCell().size[endMargin],isContentSmaller=contentWidth<this.size.innerWidth,beginBound=this.cursorPosition+this.cells[0].size[beginMargin],endBound=contentWidth-this.size.innerWidth*(1-this.cellAlign);
5this.slides.forEach(function(slide2){isContentSmaller?slide2.target=contentWidth*this.cellAlign:(slide2.target=Math.max(slide2.target,beginBound),slide2.target=Math.min(slide2.target,endBound))},this)}},proto.dispatchEvent=function(type,event2,args){var emitArgs=event2?[event2].concat(args):args;if(this.emitEvent(type,emitArgs),jQuery&&this.$element){type+=this.options.namespaceJQueryEvents?".flickity":"";var $event=type;if(event2){var jQEvent=jQuery.Event(event2);jQEvent.type=type,$event=jQEvent}this.$element.trigger($event,args)}},proto.select=function(index,isWrap,isInstant){if(this.isActive&&(index=parseInt(index,10),this._wrapSelect(index),(this.options.wrapAround||isWrap)&&(index=utils2.modulo(index,this.slides.length)),!!this.slides[index])){var prevIndex=this.selectedIndex;this.selectedIndex=index,this.updateSelectedSlide(),isInstant?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[index]),index!=prevIndex&&this.dispatchEvent("change",null,[index]),this.dispatchEvent("cellSelect")}},proto._wrapSelect=function(index){var len=this.slides.length,isWrapping=this.options.wrapAround&&len>1;if(!isWrapping)return index;var wrapIndex=utils2.modulo(index,len),delta=Math.abs(wrapIndex-this.selectedIndex),backWrapDelta=Math.abs(wrapIndex+len-this.selectedIndex),forewardWrapDelta=Math.abs(wrapIndex-len-this.selectedIndex);!this.isDragSelect&&backWrapDelta<delta?index+=len:!this.isDragSelect&&forewardWrapDelta<delta&&(index-=len),index<0?this.x-=this.slideableWidth:index>=len&&(this.x+=this.slideableWidth)},proto.previous=function(isWrap,isInstant){this.select(this.selectedIndex-1,isWrap,isInstant)},proto.next=function(isWrap,isInstant){this.select(this.selectedIndex+1,isWrap,isInstant)},proto.updateSelectedSlide=function(){var slide2=this.slides[this.selectedIndex];slide2&&(this.unselectSelectedSlide(),this.selectedSlide=slide2,slide2.select(),this.selectedCells=slide2.cells,this.selectedElements=slide2.getCellElements(),this.selectedCell=slide2.cells[0],this.selectedElement=this.selectedElements[0])},proto.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},proto.selectInitialIndex=function(){var initialIndex=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,!1,!0);return}if(initialIndex&&typeof initialIndex=="string"){var cell2=this.queryCell(initialIndex);if(cell2){this.selectCell(initialIndex,!1,!0);return}}var index=0;initialIndex&&this.slides[initialIndex]&&(index=initialIndex),this.select(index,!1,!0)},proto.selectCell=function(value,isWrap,isInstant){var cell2=this.queryCell(value);if(cell2){var index=this.getCellSlideIndex(cell2);this.select(index,isWrap,isInstant)}},proto.getCellSlideIndex=function(cell2){for(var i=0;i<this.slides.length;i++){var slide2=this.slides[i],index=slide2.cells.indexOf(cell2);if(index!=-1)return i}},proto.getCell=function(elem){for(var i=0;i<this.cells.length;i++){var cell2=this.cells[i];if(cell2.element==elem)return cell2}},proto.getCells=function(elems){elems=utils2.makeArray(elems);var cells=[];return elems.forEach(function(elem){var cell2=this.getCell(elem);cell2&&cells.push(cell2)},this),cells},proto.getCellElements=function(){return this.cells.map(function(cell2){return cell2.element})},proto.getParentCell=function(elem){var cell2=this.getCell(elem);return cell2||(elem=utils2.getParent(elem,".flickity-slider > *"),this.getCell(elem))},proto.getAdjacentCellElements=function(adjCount,index){if(!adjCount)return this.selectedSlide.getCellElements();index=index===void 0?this.selectedIndex:index;var len=this.slides.length;if(1+adjCount*2>=len)return this.getCellElements();for(var cellElems=[],i=index-adjCount;i<=index+adjCount;i++){var slideIndex=this.options.wrapAround?utils2.modulo(i,len):i,slide2=this.slides[slideIndex];slide2&&(cellElems=cellElems.concat(slide2.getCellElements()))}return cellElems},proto.queryCell=function(selector){if(typeof selector=="number")return this.cells[selector];if(typeof selector=="string"){if(selector.match(/^[#\.]?[\d\/]/))return;selector=this.element.querySelector(selector)}return this.getCell(selector)},proto.uiChange=function(){this.emitEvent("uiChange")},proto.childUIPointerDown=function(event2){event2.type!="touchstart"&&event2.preventDefault(),this.focus()},proto.onresize=function(){this.watchCSS(),this.resize()},utils2.debounceMethod(Flickity2,"onresize",150),proto.resize=function(){if(this.isActive){this.get
5Size(),this.options.wrapAround&&(this.x=utils2.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var selectedElement=this.selectedElements&&this.selectedElements[0];this.selectCell(selectedElement,!1,!0)}},proto.watchCSS=function(){var watchOption=this.options.watchCSS;if(watchOption){var afterContent=getComputedStyle2(this.element,":after").content;afterContent.indexOf("flickity")!=-1?this.activate():this.deactivate()}},proto.onkeydown=function(event2){var isNotFocused=document.activeElement&&document.activeElement!=this.element;if(!(!this.options.accessibility||isNotFocused)){var handler=Flickity2.keyboardHandlers[event2.keyCode];handler&&handler.call(this)}},Flickity2.keyboardHandlers={37:function(){var leftMethod=this.options.rightToLeft?"next":"previous";this.uiChange(),this[leftMethod]()},39:function(){var rightMethod=this.options.rightToLeft?"previous":"next";this.uiChange(),this[rightMethod]()}},proto.focus=function(){var prevScrollY=window2.pageYOffset;this.element.focus({preventScroll:!0}),window2.pageYOffset!=prevScrollY&&window2.scrollTo(window2.pageXOffset,prevScrollY)},proto.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(cell2){cell2.destroy()}),this.element.removeChild(this.viewport),moveElements(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},proto.destroy=function(){this.deactivate(),window2.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),jQuery&&this.$element&&jQuery.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete instances[this.guid]},utils2.extend(proto,animatePrototype),Flickity2.data=function(elem){elem=utils2.getQueryElement(elem);var id=elem&&elem.flickityGUID;return id&&instances[id]},utils2.htmlInit(Flickity2,"flickity"),jQuery&&jQuery.bridget&&jQuery.bridget("flickity",Flickity2),Flickity2.setJQuery=function(jq){jQuery=jq},Flickity2.Cell=Cell,Flickity2.Slide=Slide,Flickity2})}),unipointer=createCommonjsModule(function(module){/*!
6 * Unipointer v2.3.0
7 * base class for doing one thing with pointer event
8 * MIT license
9 */(function(window2,factory){module.exports?module.exports=factory(window2,evEmitter):window2.Unipointer=factory(window2,window2.EvEmitter)})(window,function(window2,EvEmitter){function noop(){}function Unipointer(){}var proto=Unipointer.prototype=Object.create(EvEmitter.prototype);proto.bindStartEvent=function(elem){this._bindStartEvent(elem,!0)},proto.unbindStartEvent=function(elem){this._bindStartEvent(elem,!1)},proto._bindStartEvent=function(elem,isAdd){isAdd=isAdd===void 0?!0:isAdd;var bindMethod=isAdd?"addEventListener":"removeEventListener",startEvent="mousedown";window2.PointerEvent?startEvent="pointerdown":"ontouchstart"in window2&&(startEvent="touchstart"),elem[bindMethod](startEvent,this)},proto.handleEvent=function(event2){var method="on"+event2.type;this[method]&&this[method](event2)},proto.getTouch=function(touches){for(var i=0;i<touches.length;i++){var touch=touches[i];if(touch.identifier==this.pointerIdentifier)return touch}},proto.onmousedown=function(event2){var button=event2.button;button&&button!==0&&button!==1||this._pointerDown(event2,event2)},proto.ontouchstart=function(event2){this._pointerDown(event2,event2.changedTouches[0])},proto.onpointerdown=function(event2){this._pointerDown(event2,event2)},proto._pointerDown=function(event2,pointer){event2.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=pointer.pointerId!==void 0?pointer.pointerId:pointer.identifier,this.pointerDown(event2,pointer))},proto.pointerDown=function(event2,pointer){this._bindPostStartEvents(event2),this.emitEvent("pointerDown",[event2,pointer])};var postStartEvents={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return proto._bindPostStartEvents=function(event2){if(event2){var events=postStartEvents[event2.type];
vendor: 4,572 bytes, lines 9-13
9events.forEach(function(eventName){window2.addEventListener(eventName,this)},this),this._boundPointerEvents=events}},proto._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(eventName){window2.removeEventListener(eventName,this)},this),delete this._boundPointerEvents)},proto.onmousemove=function(event2){this._pointerMove(event2,event2)},proto.onpointermove=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerMove(event2,event2)},proto.ontouchmove=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerMove(event2,touch)},proto._pointerMove=function(event2,pointer){this.pointerMove(event2,pointer)},proto.pointerMove=function(event2,pointer){this.emitEvent("pointerMove",[event2,pointer])},proto.onmouseup=function(event2){this._pointerUp(event2,event2)},proto.onpointerup=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerUp(event2,event2)},proto.ontouchend=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerUp(event2,touch)},proto._pointerUp=function(event2,pointer){this._pointerDone(),this.pointerUp(event2,pointer)},proto.pointerUp=function(event2,pointer){this.emitEvent("pointerUp",[event2,pointer])},proto._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},proto._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},proto.pointerDone=noop,proto.onpointercancel=function(event2){event2.pointerId==this.pointerIdentifier&&this._pointerCancel(event2,event2)},proto.ontouchcancel=function(event2){var touch=this.getTouch(event2.changedTouches);touch&&this._pointerCancel(event2,touch)},proto._pointerCancel=function(event2,pointer){this._pointerDone(),this.pointerCancel(event2,pointer)},proto.pointerCancel=function(event2,pointer){this.emitEvent("pointerCancel",[event2,pointer])},Unipointer.getPointerPoint=function(pointer){return{x:pointer.pageX,y:pointer.pageY}},Unipointer})}),unidragger=createCommonjsModule(function(module){/*!
10 * Unidragger v2.3.1
11 * Draggable base class
12 * MIT license
13 */(function(window2,factory){module.exports?module.exports=factory(window2,unipointer):window2.Unidragger=factory(window2,window2.Unipointer)})(window,function(window2,Unipointer){function Unidragger(){}var proto=Unidragger.prototype=Object.create(Unipointer.prototype);proto.bindHandles=function(){this._bindHandles(!0)},proto.unbindHandles=function(){this._bindHandles(!1)},proto._bindHandles=function(isAdd){isAdd=isAdd===void 0?!0:isAdd;for(var bindMethod=isAdd?"addEventListener":"removeEventListener",touchAction=isAdd?this._touchActionValue:"",i=0;i<this.handles.length;i++){var handle=this.handles[i];this._bindStartEvent(handle,isAdd),handle[bindMethod]("click",this),window2.PointerEvent&&(handle.style.touchAction=touchAction)}},proto._touchActionValue="none",proto.pointerDown=function(event2,pointer){var isOkay=this.okayPointerDown(event2);isOkay&&(this.pointerDownPointer={pageX:pointer.pageX,pageY:pointer.pageY},event2.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(event2),this.emitEvent("pointerDown",[event2,pointer]))};var cursorNodes={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},clickTypes={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return proto.okayPointerDown=function(event2){var isCursorNode=cursorNodes[event2.target.nodeName],isClickType=clickTypes[event2.target.type],isOkay=!isCursorNode||isClickType;return isOkay||this._pointerReset(),isOkay},proto.pointerDownBlur=function(){var focused=document.activeElement,canBlur=focused&&focused.blur&&focused!=document.body;canBlur&&focused.blur()},proto.pointerMove=function(event2,pointer){var moveVector=this._dragPointerMove(event2,pointer);this.emitEvent("pointerMove",[event2,pointer,moveVector]),this._dragMove(event2,pointer,moveVector)},proto._dragPointerMove=function(event2,pointer){var moveVector={x:pointer.pageX-this.pointerDownPointer.pageX,y:pointer.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(moveVector)&&this._dragStart(event2,pointer),moveVector},proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>3||Math.abs(moveVector.y)>3},proto.pointerUp=function(event2,pointer){this.emitEvent("pointerUp",[event2,pointer]),this._dragPointerUp(event2,pointer)},proto._dragPointerUp=function(event2,pointer){this.isDragging?this._dragEnd(event2,pointer):this._staticClick(event2,pointer)},proto._dragStart=function(event2,pointer){this.isDragging=!0,this.isPreventing
13Clicks=!0,this.dragStart(event2,pointer)},proto.dragStart=function(event2,pointer){this.emitEvent("dragStart",[event2,pointer])},proto._dragMove=function(event2,pointer,moveVector){this.isDragging&&this.dragMove(event2,pointer,moveVector)},proto.dragMove=function(event2,pointer,moveVector){event2.preventDefault(),this.emitEvent("dragMove",[event2,pointer,moveVector])},proto._dragEnd=function(event2,pointer){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(event2,pointer)},proto.dragEnd=function(event2,pointer){this.emitEvent("dragEnd",[event2,pointer])},proto.onclick=function(event2){this.isPreventingClicks&&event2.preventDefault()},proto._staticClick=function(event2,pointer){this.isIgnoringMouseUp&&event2.type=="mouseup"||(this.staticClick(event2,pointer),event2.type!="mouseup"&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},proto.staticClick=function(event2,pointer){this.emitEvent("staticClick",[event2,pointer])},Unidragger.getPointerPoint=Unipointer.getPointerPoint,Unidragger})}),drag=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,unidragger,utils):window2.Flickity=factory(window2,window2.Flickity,window2.Unidragger,window2.fizzyUIUtils)})(window,function(window2,Flickity2,Unidragger,utils2){utils2.extend(Flickity2.defaults,{draggable:">1",dragThreshold:3}),Flickity2.createMethods.push("_createDrag");var proto=Flickity2.prototype;utils2.extend(proto,Unidragger.prototype),proto._touchActionValue="pan-y";var isTouch="createTouch"in document,isTouchmoveScrollCanceled=!1;proto._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),isTouch&&!isTouchmoveScrollCanceled&&(window2.addEventListener("touchmove",function(){}),isTouchmoveScrollCanceled=!0)},proto.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},proto.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},proto.updateDraggable=function(){this.options.draggable==">1"?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")},proto.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},proto.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},proto._uiChangeDrag=function(){delete this.isFreeScrolling},proto.pointerDown=function(event2,pointer){if(!this.isDraggable){this._pointerDownDefault(event2,pointer);return}var isOkay=this.okayPointerDown(event2);isOkay&&(this._pointerDownPreventDefault(event2),this.pointerDownFocus(event2),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=getScrollPosition(),window2.addEventListener("scroll",this),this._pointerDownDefault(event2,pointer))},proto._pointerDownDefault=function(event2,pointer){this.pointerDownPointer={pageX:pointer.pageX,pageY:pointer.pageY},this._bindPostStartEvents(event2),this.dispatchEvent("pointerDown",event2,[pointer])};var focusNodes={INPUT:!0,TEXTAREA:!0,SELECT:!0};proto.pointerDownFocus=function(event2){var isFocusNode=focusNodes[event2.target.nodeName];isFocusNode||this.focus()},proto._pointerDownPreventDefault=function(event2){var isTouchStart=event2.type=="touchstart",isTouchPointer=event2.pointerType=="touch",isFocusNode=focusNodes[event2.target.nodeName];!isTouchStart&&!isTouchPointer&&!isFocusNode&&event2.preventDefault()},proto.hasDragStarted=function(moveVector){return Math.abs(moveVector.x)>this.options.dragThreshold},proto.pointerUp=function(event2,pointer){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",event2,[pointer]),this._dragPointerUp(event2,pointer)},proto.pointerDone=function(){window2.removeEventListener("scroll",this),delete this.pointerDownScroll},proto.dragStart=function(event2,pointer){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window2.removeEventListener("scroll",this),this.dispatchEvent("dragStart",event2,[pointer]))},proto.pointerMove=function(event2,pointer){var moveVector=this._dragPointerMove(event2,pointer);this.dispatchEvent("pointerMove",event2,[pointer,moveVector]),this._dragMove(event2,pointer,moveVector)},proto.dragMove=function(event2,pointer,moveVector){if(this.isDraggable){event2.preventDefault(),this.previousDragX=this.dragX;var direction=this.options.rightToLeft?-1:1;this.options.wrapAround&&(moveVector.x=moveVector.x%this.slideableWidth);var dragX=this.dragStartPosition+moveVector.x*direction;if(!this.options.wrapAround&&this.slides.length){var originBound=Math.max(-this.slides[0].target,this.dragStartPosition);dragX=dragX>originBound?(dragX+originBound)*.5:dragX;var endBound=Math.min(-this.getLastSlide().target,this.dragStartPosition);dragX=dragX<endBound?(dragX+endBound)*.5:dragX}this.dragX=dragX,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",event2,[pointer,moveVector])}},proto.dragEnd=function(event2,pointer){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var index=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var restingX=this.getRestingPosition();this.isFreeScrolling=-restingX>this.slides[0].target&&-restingX<this.getLastSlide().target}else!this.options.freeScroll&&index==this.selectedIndex&&(index+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(index),delete this.isDragSelect,this.dispatchEvent("dragEnd",event2,[pointer])}},proto.dragEndRestingSelect=function(){var restingX=this.getRestingPosition(),distance=Math.abs(this.getSlideDistance(-restingX,this.selectedIndex)),positiveResting=this._getClosestResting(restingX,distance,1),negativeResting=this._getClosestResting(restingX,distance,-1),index=
13positiveResting.distance<negativeResting.distance?positiveResting.index:negativeResting.index;return index},proto._getClosestResting=function(restingX,distance,increment){for(var index=this.selectedIndex,minDistance=1/0,condition=this.options.contain&&!this.options.wrapAround?function(d,md){return d<=md}:function(d,md){return d<md};condition(distance,minDistance)&&(index+=increment,minDistance=distance,distance=this.getSlideDistance(-restingX,index),distance!==null);)distance=Math.abs(distance);return{distance:minDistance,index:index-increment}},proto.getSlideDistance=function(x,index){var len=this.slides.length,isWrapAround=this.options.wrapAround&&len>1,slideIndex=isWrapAround?utils2.modulo(index,len):index,slide2=this.slides[slideIndex];if(!slide2)return null;var wrap=isWrapAround?this.slideableWidth*Math.floor(index/len):0;return x-(slide2.target+wrap)},proto.dragEndBoostSelect=function(){if(this.previousDragX===void 0||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var distance=this.getSlideDistance(-this.dragX,this.selectedIndex),delta=this.previousDragX-this.dragX;return distance>0&&delta>0?1:distance<0&&delta<0?-1:0},proto.staticClick=function(event2,pointer){var clickedCell=this.getParentCell(event2.target),cellElem=clickedCell&&clickedCell.element,cellIndex=clickedCell&&this.cells.indexOf(clickedCell);this.dispatchEvent("staticClick",event2,[pointer,cellElem,cellIndex])},proto.onscroll=function(){var scroll=getScrollPosition(),scrollMoveX=this.pointerDownScroll.x-scroll.x,scrollMoveY=this.pointerDownScroll.y-scroll.y;(Math.abs(scrollMoveX)>3||Math.abs(scrollMoveY)>3)&&this._pointerDone()};function getScrollPosition(){return{x:window2.pageXOffset,y:window2.pageYOffset}}return Flickity2})}),prevNextButton=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,unipointer,utils):factory(window2,window2.Flickity,window2.Unipointer,window2.fizzyUIUtils)})(window,function(window2,Flickity2,Unipointer,utils2){var svgURI="http://www.w3.org/2000/svg";function PrevNextButton(direction,parent){this.direction=direction,this.parent=parent,this._create()}PrevNextButton.prototype=Object.create(Unipointer.prototype),PrevNextButton.prototype._create=function(){this.isEnabled=!0,this.isPrevious=this.direction==-1;var leftDirection=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==leftDirection;var element=this.element=document.createElement("button");element.className="flickity-button flickity-prev-next-button",element.className+=this.isPrevious?" previous":" next",element.setAttribute("type","button"),this.disable(),element.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var svg=this.createSVG();element.appendChild(svg),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},PrevNextButton.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},PrevNextButton.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},PrevNextButton.prototype.createSVG=function(){var svg=document.createElementNS(svgURI,"svg");svg.setAttribute("class","flickity-button-icon"),svg.setAttribute("viewBox","0 0 100 100");var path=document.createElementNS(svgURI,"path"),pathMovements=getArrowMovements(this.parent.options.arrowShape);return path.setAttribute("d",pathMovements),path.setAttribute("class","arrow"),this.isLeft||path.setAttribute("transform","translate(100, 100) rotate(180) "),svg.appendChild(path),svg};function getArrowMovements(shape){return typeof shape=="string"?shape:"M "+shape.x0+",50 L "+shape.x1+","+(shape.y1+50)+" L "+shape.x2+","+(shape.y2+50)+" L "+shape.x3+",50  L "+shape.x2+","+(50-shape.y2)+" L "+shape.x1+","+(50-shape.y1)+" Z"}PrevNextButton.prototype.handleEvent=utils2.handleEvent,PrevNextButton.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var method=this.isPrevious?"previous":"next";this.parent[method]()}},PrevNextButton.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},PrevNextButton.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},PrevNextButton.prototype.update=function(){var slides=this.parent.slides;if(this.parent.options.wrapAround&&slides.length>1){this.enable();return}
13var lastIndex=slides.length?slides.length-1:0,boundIndex=this.isPrevious?0:lastIndex,method=this.parent.selectedIndex==boundIndex?"disable":"enable";this[method]()},PrevNextButton.prototype.destroy=function(){this.deactivate(),this.allOff()},utils2.extend(Flickity2.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),Flickity2.createMethods.push("_createPrevNextButtons");var proto=Flickity2.prototype;return proto._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new PrevNextButton(-1,this),this.nextButton=new PrevNextButton(1,this),this.on("activate",this.activatePrevNextButtons))},proto.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},proto.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},Flickity2.PrevNextButton=PrevNextButton,Flickity2})}),pageDots=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,unipointer,utils):factory(window2,window2.Flickity,window2.Unipointer,window2.fizzyUIUtils)})(window,function(window2,Flickity2,Unipointer,utils2){function PageDots(parent){this.parent=parent,this._create()}PageDots.prototype=Object.create(Unipointer.prototype),PageDots.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))},PageDots.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},PageDots.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},PageDots.prototype.setDots=function(){var delta=this.parent.slides.length-this.dots.length;delta>0?this.addDots(delta):delta<0&&this.removeDots(-delta)},PageDots.prototype.addDots=function(count){for(var fragment=document.createDocumentFragment(),newDots=[],length=this.dots.length,max=length+count,i=length;i<max;i++){var dot=document.createElement("li");dot.className="dot",dot.setAttribute("aria-label","Page dot "+(i+1)),fragment.appendChild(dot),newDots.push(dot)}this.holder.appendChild(fragment),this.dots=this.dots.concat(newDots)},PageDots.prototype.removeDots=function(count){var removeDots=this.dots.splice(this.dots.length-count,count);removeDots.forEach(function(dot){this.holder.removeChild(dot)},this)},PageDots.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"))},PageDots.prototype.onTap=PageDots.prototype.onClick=function(event2){var target=event2.target;if(target.nodeName=="LI"){this.parent.uiChange();var index=this.dots.indexOf(target);this.parent.select(index)}},PageDots.prototype.destroy=function(){this.deactivate(),this.allOff()},Flickity2.PageDots=PageDots,utils2.extend(Flickity2.defaults,{pageDots:!0}),Flickity2.createMethods.push("_createPageDots");var proto=Flickity2.prototype;return proto._createPageDots=function(){this.options.pageDots&&(this.pageDots=new PageDots(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))},proto.activatePageDots=function(){this.pageDots.activate()},proto.updateSelectedPageDots=function(){this.pageDots.updateSelected()},proto.updatePageDots=function(){this.pageDots.setDots()},proto.deactivatePageDots=function(){this.pageDots.deactivate()},Flickity2.PageDots=PageDots,Flickity2})}),player=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(evEmitter,utils,flickity):factory(window2.EvEmitter,window2.fizzyUIUtils,window2.Flickity)})(window,function(EvEmitter,utils2,Flickity2){function Player(parent){this.parent=parent,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}Player.prototype=Object.create(EvEmitter.prototype),Player.prototype.play=function(){if(this.state!="playing"){var isPageHidden=document.hidden;if(isPageHidden){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()}},Player.prototype.tick=function(){if(this.state=="playing"){var time=this.parent.options.autoPlay;time=typeof time=="number"?time:3e3;var _this=this;this.clear(),this.timeout=setTimeout(function(){_this.parent.next(!0),_this.tick()},time)}},Player.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},Player.prototype.clear=function(){clearTimeout(this.timeout)},Player.prototype.pause=function(){this.state=="playing"&&(this.state="paused",this.clear())},Player.prototype.unpause=function(){this.state=="paused"&&this.play()},Player.prototype.visibilityChange=function(){var isPageHidden=document.hidden;this[isPageHidden?"pause":"unpause"]()},Player.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},utils2.extend(Flickity2.defaults,{pauseAutoPlayOnHover:!0}),Flickity2.createMethods.push("_createPlayer");var proto=Flickity2.prototype;return proto._createPlayer=function(){this.player=new Player(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},proto.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},proto.playPlayer=function(){this.player.play()},proto.stopPlayer=function(){this.player.stop()},proto.pausePlayer=function(){this.player.pause()},proto.unpausePlayer=function(){this.player.unpause()},proto.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},proto.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},proto.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},Flickity2.Player=Player,Flickity2})}),addRemoveCell=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,utils):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity2,utils2){function getCellsFragment(cells){var fragment=document.createDocumentFragment();
13return cells.forEach(function(cell2){fragment.appendChild(cell2.element)}),fragment}var proto=Flickity2.prototype;return proto.insert=function(elems,index){var cells=this._makeCells(elems);if(!(!cells||!cells.length)){var len=this.cells.length;index=index===void 0?len:index;var fragment=getCellsFragment(cells),isAppend=index==len;if(isAppend)this.slider.appendChild(fragment);else{var insertCellElement=this.cells[index].element;this.slider.insertBefore(fragment,insertCellElement)}if(index===0)this.cells=cells.concat(this.cells);else if(isAppend)this.cells=this.cells.concat(cells);else{var endCells=this.cells.splice(index,len-index);this.cells=this.cells.concat(cells).concat(endCells)}this._sizeCells(cells),this.cellChange(index,!0)}},proto.append=function(elems){this.insert(elems,this.cells.length)},proto.prepend=function(elems){this.insert(elems,0)},proto.remove=function(elems){var cells=this.getCells(elems);if(!(!cells||!cells.length)){var minCellIndex=this.cells.length-1;cells.forEach(function(cell2){cell2.remove();var index=this.cells.indexOf(cell2);minCellIndex=Math.min(index,minCellIndex),utils2.removeFrom(this.cells,cell2)},this),this.cellChange(minCellIndex,!0)}},proto.cellSizeChange=function(elem){var cell2=this.getCell(elem);if(cell2){cell2.getSize();var index=this.cells.indexOf(cell2);this.cellChange(index)}},proto.cellChange=function(changedCellIndex,isPositioningSlider){var prevSelectedElem=this.selectedElement;this._positionCells(changedCellIndex),this._getWrapShiftCells(),this.setGallerySize();var cell2=this.getCell(prevSelectedElem);cell2&&(this.selectedIndex=this.getCellSlideIndex(cell2)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[changedCellIndex]),this.select(this.selectedIndex),isPositioningSlider&&this.positionSliderAtSelected()},Flickity2})}),lazyload=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,utils):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity2,utils2){Flickity2.createMethods.push("_createLazyload");var proto=Flickity2.prototype;proto._createLazyload=function(){this.on("select",this.lazyLoad)},proto.lazyLoad=function(){var lazyLoad=this.options.lazyLoad;if(lazyLoad){var adjCount=typeof lazyLoad=="number"?lazyLoad:0,cellElems=this.getAdjacentCellElements(adjCount),lazyImages=[];
13cellElems.forEach(function(cellElem){var lazyCellImages=getCellLazyImages(cellElem);lazyImages=lazyImages.concat(lazyCellImages)}),lazyImages.forEach(function(img){new LazyLoader(img,this)},this)}};function getCellLazyImages(cellElem){if(cellElem.nodeName=="IMG"){var lazyloadAttr=cellElem.getAttribute("data-flickity-lazyload"),srcAttr=cellElem.getAttribute("data-flickity-lazyload-src"),srcsetAttr=cellElem.getAttribute("data-flickity-lazyload-srcset");if(lazyloadAttr||srcAttr||srcsetAttr)return[cellElem]}var lazySelector="img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]",imgs=cellElem.querySelectorAll(lazySelector);return utils2.makeArray(imgs)}function LazyLoader(img,flickity2){this.img=img,this.flickity=flickity2,this.load()}return LazyLoader.prototype.handleEvent=utils2.handleEvent,LazyLoader.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var src=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),srcset=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=src,srcset&&this.img.setAttribute("srcset",srcset),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},LazyLoader.prototype.onload=function(event2){this.complete(event2,"flickity-lazyloaded")},LazyLoader.prototype.onerror=function(event2){this.complete(event2,"flickity-lazyerror")},LazyLoader.prototype.complete=function(event2,className){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var cell2=this.flickity.getParentCell(this.img),cellElem=cell2&&cell2.element;this.flickity.cellSizeChange(cellElem),this.img.classList.add(className),this.flickity.dispatchEvent("lazyLoad",event2,cellElem)},Flickity2.LazyLoader=LazyLoader,Flickity2})}),js=createCommonjsModule(function(module){/*!
14 * Flickity v2.2.1
15 * Touch, responsive, flickable carousels
16 *
17 * Licensed GPLv3 for open source use
18 * or Flickity Commercial License for commercial use
19 *
20 * https://flickity.metafizzy.co
21 * Copyright 2015-2019 Metafizzy
22 */(function(window2,factory){module.exports&&(module.exports=factory(flickity,drag,prevNextButton,pageDots,player,addRemoveCell,lazyload))})(window,function(Flickity2){return Flickity2})}),flickityFade=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(js,utils):factory(window2.Flickity,window2.fizzyUIUtils)})(commonjsGlobal,function(Flickity2,utils2){var Slide=Flickity2.Slide,slideUpdateTarget=Slide.prototype.updateTarget;Slide.prototype.updateTarget=function(){if(slideUpdateTarget.apply(this,arguments),!!this.parent.options.fade){var slideTargetX=this.target-this.x,firstCellX=this.cells[0].x;this.cells.forEach(function(cell2){var targetX=cell2.x-firstCellX-slideTargetX;cell2.renderPosition(targetX)})}},Slide.prototype.setOpacity=function(alpha){this.cells.forEach(function(cell2){cell2.element.style.opacity=alpha})};var proto=Flickity2.prototype;Flickity2.createMethods.push("_createFade"),proto._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 updateSlides=proto.updateSlides;proto.updateSlides=function(){updateSlides.apply(this,arguments),this.options.fade&&this.slides.forEach(function(slide2,i){var alpha=i==this.selectedIndex?1:0;slide2.setOpacity(alpha)},this)},proto.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},proto.onSettleFade=function(){if(delete this.didDragEnd,!!this.options.fade){this.selectedSlide.setOpacity(1);var fadedSlide=this.slides[this.fadeIndex];fadedSlide&&this.fadeIndex!=this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0)}},proto.onDragEndFade=function(){this.didDragEnd=!0},proto.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},proto.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEac
22h(function(slide2){slide2.setOpacity("")}))};var positionSlider=proto.positionSlider;proto.positionSlider=function(){if(!this.options.fade){positionSlider.apply(this,arguments);return}this.fadeSlides(),this.dispatchScrollEvent()};var positionSliderAtSelected=proto.positionSliderAtSelected;proto.positionSliderAtSelected=function(){this.options.fade&&this.setTranslateX(0),positionSliderAtSelected.apply(this,arguments)},proto.fadeSlides=function(){if(!(this.slides.length<2)){var indexes=this.getFadeIndexes(),fadeSlideA=this.slides[indexes.a],fadeSlideB=this.slides[indexes.b],distance=this.wrapDifference(fadeSlideA.target,fadeSlideB.target),progress=this.wrapDifference(fadeSlideA.target,-this.x);progress=progress/distance,fadeSlideA.setOpacity(1-progress),fadeSlideB.setOpacity(progress);var fadeHideIndex=indexes.a;this.isDragging&&(fadeHideIndex=progress>.5?indexes.a:indexes.b);var isNewHideIndex=this.fadeHideIndex!=null&&this.fadeHideIndex!=fadeHideIndex&&this.fadeHideIndex!=indexes.a&&this.fadeHideIndex!=indexes.b;isNewHideIndex&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=fadeHideIndex}},proto.getFadeIndexes=function(){return!this.isDragging&&!this.didDragEnd?{a:this.fadeIndex,b:this.selectedIndex}:this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes()},proto.getFadeDragWrapIndexes=function(){var distances=this.slides.map(function(slide2,i){return this.getSlideDistance(-this.x,i)},this),absDistances=distances.map(function(distance2){return Math.abs(distance2)}),minDistance=Math.min.apply(Math,absDistances),closestIndex=absDistances.indexOf(minDistance),distance=distances[closestIndex],len=this.slides.length,delta=distance>=0?1:-1;return{a:closestIndex,b:utils2.modulo(closestIndex+delta,len)}},proto.getFadeDragLimitIndexes=function(){for(var dragIndex=0,i=0;i<this.slides.length-1;i++){var slide2=this.slides[i];if(-this.x<slide2.target)break;dragIndex=i}return{a:dragIndex,b:dragIndex+1}},proto.wrapDifference=function(a,b){var diff=b-a;if(!this.options.wrapAround)return diff;var diffPlus=diff+this.slideableWidth,diffMinus=diff-this.slideableWidth;return Math.abs(diffPlus)<Math.abs(diff)&&(diff=diffPlus),Math.abs(diffMinus)<Math.abs(diff)&&(diff=diffMinus),diff};var _getWrapShiftCells=proto._getWrapShiftCells;proto._getWrapShiftCells=function(){this.options.fade||_getWrapShiftCells.apply(this,arguments)};var shiftWrapCells=proto.shiftWrapCells;return proto.shiftWrapCells=function(){this.options.fade||shiftWrapCells.apply(this,arguments)},Flickity2})});function _typeof$1(obj){return typeof Symbol=="function"&&_typeof(Symbol.iterator)==="symbol"?_typeof$1=function(obj2){return _typeof(obj2)}:_typeof$1=function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":_typeof(obj2)},_typeof$1(obj)}var HAS_DOM_2=(typeof HTMLElement=="undefined"?"undefined":_typeof$1(HTMLElement))==="object";function isDOMElement(obj){return HAS_DOM_2?obj instanceof HTMLElement:obj&&_typeof$1(obj)==="object"&&obj!==null&&obj.nodeType===1&&typeof obj.nodeName=="string"}function addClasses(el,classNames){classNames.forEach(function(className){el.classList.add(className)})}function removeClasses(el,classNames){classNames.forEach(function(className){el.classList.remove(className)})}var RULES=".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}";function injectBaseStylesheet(){if(!document.querySelector(".drift-base-styles")){var styleEl=document.createElement("style");styleEl.type="text/css",styleEl.classList.add("drift-base-styles"),styleEl.appendChild(document.createTextNode(RULES));var head=document.head;head.insertBefore(styleEl,head.firstChild)}}function throwIfMissing(){throw new Error("Missing parameter")}function _classCallCheck$1(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass$1(Constructor,protoProps,staticProps){return protoProps&&_defineProperties$1(Constructor.prototype,protoProps),staticProps&&_defineProperties$1(Constructor,staticProps),Constructor}var BoundingBox=(function(){function BoundingBox2(options){_classCallCheck$1(this,BoundingBox2),this.isShowing=!1;var _options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$containerEl=options.containerEl,containerEl=_options$containerEl===void 0?throwIfMissing():_options$containerEl;this.settings={namespace:namespace,zoomFactor:zoomFactor,containerEl:containerEl}
22,this.openClasses=this._buildClasses("open"),this._buildElement()}return _createClass$1(BoundingBox2,[{key:"_buildClasses",value:function(suffix){var classes=["drift-".concat(suffix)],ns=this.settings.namespace;return ns&&classes.push("".concat(ns,"-").concat(suffix)),classes}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),addClasses(this.el,this._buildClasses("bounding-box"))}},{key:"show",value:function(zoomPaneWidth,zoomPaneHeight){this.isShowing=!0,this.settings.containerEl.appendChild(this.el);var style=this.el.style;style.width="".concat(Math.round(zoomPaneWidth/this.settings.zoomFactor),"px"),style.height="".concat(Math.round(zoomPaneHeight/this.settings.zoomFactor),"px"),addClasses(this.el,this.openClasses)}},{key:"hide",value:function(){this.isShowing&&this.settings.containerEl.removeChild(this.el),this.isShowing=!1,removeClasses(this.el,this.openClasses)}},{key:"setPosition",value:function(percentageOffsetX,percentageOffsetY,triggerRect){var pageXOffset=window.pageXOffset,pageYOffset=window.pageYOffset,inlineLeft=triggerRect.left+percentageOffsetX*triggerRect.width-this.el.clientWidth/2+pageXOffset,inlineTop=triggerRect.top+percentageOffsetY*triggerRect.height-this.el.clientHeight/2+pageYOffset;inlineLeft<triggerRect.left+pageXOffset?inlineLeft=triggerRect.left+pageXOffset:inlineLeft+this.el.clientWidth>triggerRect.left+triggerRect.width+pageXOffset&&(inlineLeft=triggerRect.left+triggerRect.width-this.el.clientWidth+pageXOffset),inlineTop<triggerRect.top+pageYOffset?inlineTop=triggerRect.top+pageYOffset:inlineTop+this.el.clientHeight>triggerRect.top+triggerRect.height+pageYOffset&&(inlineTop=triggerRect.top+triggerRect.height-this.el.clientHeight+pageYOffset),this.el.style.left="".concat(inlineLeft,"px"),this.el.style.top="".concat(inlineTop,"px")}}]),BoundingBox2})();function _classCallCheck$2(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass$2(Constructor,protoProps,staticProps){return protoProps&&_defineProperties$2(Constructor.prototype,protoProps),staticProps&&_defineProperties$2(Constructor,staticProps),Constructor}var Trigger=(function(){function Trigger2(){var options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_classCallCheck$2(this,Trigger2),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 _options$el=options.el,el=_options$el===void 0?throwIfMissing():_options$el,_options$zoomPane=options.zoomPane,zoomPane=_options$zoomPane===void 0?throwIfMissing():_options$zoomPane,_options$sourceAttrib=options.sourceAttribute,sourceAttribute=_options$sourceAttrib===void 0?throwIfMissing():_options$sourceAttrib,_options$handleTouch=options.handleTouch,handleTouch=_options$handleTouch===void 0?throwIfMissing():_options$handleTouch,_options$onShow=options.onShow,onShow=_options$onShow===void 0?null:_options$onShow,_options$onHide=options.onHide,onHide=_options$onHide===void 0?null:_options$onHide,_options$hoverDelay=options.hoverDelay,hoverDelay=_options$hoverDelay===void 0?0:_options$hoverDelay,_options$touchDelay=options.touchDelay,touchDelay=_options$touchDelay===void 0?0:_options$touchDelay,_options$hoverBoundin=options.hoverBoundingBox,hoverBoundingBox=_options$hoverBoundin===void 0?throwIfMissing():_options$hoverBoundin,_options$touchBoundin=options.touchBoundingBox,touchBoundingBox=_options$touchBoundin===void 0?throwIfMissing():_options$touchBoundin,_options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$boundingBoxC=options.boundingBoxContainer,boundingBoxContainer=_options$boundingBoxC===void 0?throwIfMissing():_options$boundingBoxC;this.settings={el:el,zoomPane:zoomPane,sourceAttribute:sourceAttribute,handleTouch:handleTouch,onShow:onShow,onHide:onHide,hoverDelay:hoverDelay,touchDelay:touchDelay,hoverBoundingBox:hoverBoundingBox,touchBoundingBox:touchBoundingBox,namespace:namespace,zoomFactor:zoomFactor,boundingBoxContainer:boundingBoxContainer},(this.settings.hoverBoundingBox||this.settings.touchBoundingBox)&&(this.boundingBox=new BoundingBox({namespace:this.settings.namespace,zoomFactor:this.settings.zoomFactor,containerEl:this.settings.boundingBoxContainer})),this.enabled=!0,this._bindEvents()}return _createClass$2(Trigger2,[{key:"_preventDefault",value:function(event2){event2.preventDefault()}},{key:"_preventDefaultAllowTouchScroll",value:function(event2){(!this.settings.touchDelay||!this._isTouchEvent(event2)||this.isShowing)&&event2.preventDefault()}},{key:"_isTouchEvent",value:function(event2){return!!event2.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,e.type=="mouseenter"&&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 onShow=this.settings.onShow;if(onShow&&typeof onShow=="function"&&onShow(),this.settings.zoomPane.show(this.settings.el.getAttribute(this.settings.sourceAttribute),this.settings.el.clientWidth,this.settings.el.clientHeight),this._lastMovement){var touchActivated=this._lastMovement.touches;(touchActivated&&this.settings.touchBoundingBox||!touchActivated&&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 onHide=this.settings.onHide;onHide&&typeof onHide=="function"&&onHide(),this.settings.zoomPane.hide()}},{key:"_handleMovement",value:function(e){if(e)this._preventDefaultAllowTouchScroll(e),this._lastMovement=e;else if(this._lastMovement)e=this._lastMovement;else return;var movementX,movementY;if(e.touches){var firstTouch=e.touches[0];movementX=firstTouch.clientX,movementY=firstTouch.clientY}else movementX=e.clientX,movementY=e.clientY;var el=this.settings.el,rect=el.getBoundingClientRect(),offsetX=movementX-rect.left,offsetY=movementY-rect.top,percentageOffsetX=offsetX/this.settings.el.clientWidth,percentageOffsetY=offsetY/this.settings.el.clientHeight;this.boundingBox&&this.boundingBox.setPosition(percentageOffsetX,percentageOffsetY,rect),this.settings.zoomPane.setPosition(percentageOffsetX,percentageOffsetY,rect)}},{key:"isShowing",get:function(){return this.settings.zoomPane.isShowing}}]),Trigger2})();function _classCallCheck$3(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass$3(Constructor,protoProps,staticProps){return protoProps&&_defineProperties$3(Constructor.prototype,protoProps),staticProps&&_defineProperties$3(Constructor,staticProps),Constructor}var divStyle=document.createElement("div").style,HAS_ANIMATION=typeof document=="undefined"?!1:"animation"in divStyle||"webkitAnimation"in divStyle,ZoomPane=(function(){function ZoomPane2(){var options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_classCallCheck$3(this,ZoomPane2),this._completeShow=this._completeShow.bind(this),this._completeHide=this._completeHide.bind(this),this._handleLoad=this._handleLoad.bind(this),this.isShowing=!1;var _options$container=options.container,container=_options$container===void 0?null:_options$container,_options$zoomFactor=options.zoomFactor,zoomFactor=_options$zoomFactor===void 0?throwIfMissing():_options$zoomFactor,_options$inline=options.inline,inline=_options$inline===void 0?throwIfMissing():_options$inline,_options$namespace=options.namespace,namespace=_options$namespace===void 0?null:_options$namespace,_options$showWhitespa=options.showWhitespaceAtEdges,showWhitespaceAtEdges=_options$showWhitespa===void 0?throwIfMissing():_options$showWhitespa,_options$containInl
22in=options.containInline,containInline=_options$containInlin===void 0?throwIfMissing():_options$containInlin,_options$inlineOffset=options.inlineOffsetX,inlineOffsetX=_options$inlineOffset===void 0?0:_options$inlineOffset,_options$inlineOffset2=options.inlineOffsetY,inlineOffsetY=_options$inlineOffset2===void 0?0:_options$inlineOffset2,_options$inlineContai=options.inlineContainer,inlineContainer=_options$inlineContai===void 0?document.body:_options$inlineContai;this.settings={container:container,zoomFactor:zoomFactor,inline:inline,namespace:namespace,showWhitespaceAtEdges:showWhitespaceAtEdges,containInline:containInline,inlineOffsetX:inlineOffsetX,inlineOffsetY:inlineOffsetY,inlineContainer:inlineContainer},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()}return _createClass$3(ZoomPane2,[{key:"_buildClasses",value:function(suffix){var classes=["drift-".concat(suffix)],ns=this.settings.namespace;return ns&&classes.push("".concat(ns,"-").concat(suffix)),classes}},{key:"_buildElement",value:function(){this.el=document.createElement("div"),addClasses(this.el,this._buildClasses("zoom-pane"));var loaderEl=document.createElement("div");addClasses(loaderEl,this._buildClasses("zoom-pane-loader")),this.el.appendChild(loaderEl),this.imgEl=document.createElement("img"),this.el.appendChild(this.imgEl)}},{key:"_setImageURL",value:function(imageURL){this.imgEl.setAttribute("src",imageURL)}},{key:"_setImageSize",value:function(triggerWidth,triggerHeight){this.img
22El.style.width="".concat(triggerWidth*this.settings.zoomFactor,"px"),this.imgEl.style.height="".concat(triggerHeight*this.settings.zoomFactor,"px")}},{key:"setPosition",value:function(percentageOffsetX,percentageOffsetY,triggerRect){var imgElWidth=this.imgEl.offsetWidth,imgElHeight=this.imgEl.offsetHeight,elWidth=this.el.offsetWidth,elHeight=this.el.offsetHeight,centreOfContainerX=elWidth/2,centreOfContainerY=elHeight/2,targetImgXToBeCentre=imgElWidth*percentageOffsetX,targetImgYToBeCentre=imgElHeight*percentageOffsetY,left=centreOfContainerX-targetImgXToBeCentre,top=centreOfContainerY-targetImgYToBeCentre,differenceBetweenContainerWidthAndImgWidth=elWidth-imgElWidth,differenceBetweenContainerHeightAndImgHeight=elHeight-imgElHeight,isContainerLargerThanImgX=differenceBetweenContainerWidthAndImgWidth>0,isContainerLargerThanImgY=differenceBetweenContainerHeightAndImgHeight>0,minLeft=isContainerLargerThanImgX?differenceBetweenContainerWidthAndImgWidth/2:0,minTop=isContainerLargerThanImgY?differenceBetweenContainerHeightAndImgHeight/2:0,maxLeft=isContainerLargerThanImgX?differenceBetweenContainerWidthAndImgWidth/2:differenceBetweenContainerWidthAndImgWidth,maxTop=isContainerLargerThanImgY?differenceBetweenContainerHeightAndImgHeight/2:differenceBetweenContainerHeightAndImgHeight;if(this.el.parentElement===this.settings.inlineContainer){var scrollX=window.pageXOffset,scrollY=window.pageYOffset,inlineLeft=triggerRect.left+percentageOffsetX*triggerRect.width-elWidth/2+this.settings.inlineOffsetX+scrollX,inlineTop=triggerRect.top+percentageOffsetY*triggerRect.height-elHeight/2+this.settings.inlineOffsetY+scrollY;this.settings.containInline&&(inlineLeft<triggerRect.left+scrollX?inlineLeft=triggerRect.left+scrollX:inlineLeft+elWidth>triggerRect.left+triggerRect.width+scrollX&&(inlineLeft=triggerRect.left+triggerRect.width-elWidth+scrollX),inlineTop<triggerRect.top+scrollY?inlineTop=triggerRect.top+scrollY:inlineTop+elHeight>triggerRect.top+triggerRect.height+scrollY&&(inlineTop=triggerRect.top+triggerRect.height-elHeight+scrollY)),this.el.style.left="".concat(inlineLeft,"px"),this.el.style.top="".concat(inlineTop,"px")}this.settings.showWhitespaceAtEdges||(left>minLeft?left=minLeft:left<maxLeft&&(left=maxLeft),top>minTop?top=minTop:top<maxTop&&(top=maxTop)),this.imgEl.style.transform="translate(".concat(left,"px, ").concat(top,"px)"),this.imgEl.style.webkitTransform="translate(".concat(left,"px, ").concat(top,"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),removeClasses(this.el,this.openClasses),removeClasses(this.el,this.closingClasses)}},{key:"show",value:function(imageURL,triggerWidth,triggerHeight){this._removeListenersAndResetClasses(),this.isShowing=!0,addClasses(this.el,this.openClasses),this.imgEl.getAttribute("src")!=imageURL&&(addClasses(this.el,this.loadingClasses),this.imgEl.addEventListener("load",this._handleLoad,!1),this._setImageURL(imageURL)),this._setImageSize(triggerWidth,triggerHeight),this._isInline?this._showInline():this._showInContainer(),HAS_ANIMATION&&(this.el.addEventListener("animationend",this._completeShow,!1),this.el.addEventListener("webkitAnimationEnd",this._completeShow,!1),addClasses(this.el,this.openingClasses))}},{key:"_showInline",value:function(){this.settings.inlineContainer.appendChild(this.el),addClasses(this.el,this.inlineClasses)}},{key:"_showInContainer",value:function(){this.settings.container.appendChild(this.el)}},{key:"hide",value:function(){this._removeListenersAndResetClasses(),this.isShowing=!1,HAS_ANIMATION?(this.el.addEventListener("animationend",this._completeHide,!1),this.el.addEventListener("webkitAnimationEnd",this._completeHide,!1),addClasses(this.el,this.closingClasses)):(removeClasses(this.el,this.openClasses),removeClasses(this.el,this.inlineClasses))}},{key:"_completeShow",value:function(){this.el.removeEventListener("animationend",this._completeShow,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeShow,!1),removeClasses(this.el,this.openingClasses)}},{key:"_completeHide",value:function(){this.el.removeEventListener("animationend",this._completeHide,!1),this.el.removeEventListener("webkitAnimationEnd",this._completeHide,!1),removeClasses(this.el,this.openClasses),removeClasses(this.el,this.closingClasses),removeClasses(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)}}
22,{key:"_handleLoad",value:function(){this.imgEl.removeEventListener("load",this._handleLoad,!1),removeClasses(this.el,this.loadingClasses)}},{key:"_isInline",get:function(){var inline=this.settings.inline;return inline===!0||typeof inline=="number"&&window.innerWidth<=inline}}]),ZoomPane2})();function _classCallCheck$4(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass$4(Constructor,protoProps,staticProps){return protoProps&&_defineProperties$4(Constructor.prototype,protoProps),staticProps&&_defineProperties$4(Constructor,staticProps),Constructor}var Drift=(function(){function Drift2(triggerEl){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_classCallCheck$4(this,Drift2),this.VERSION="1.4.0",this.triggerEl=triggerEl,this.destroy=this.destroy.bind(this),!isDOMElement(this.triggerEl))throw new TypeError("`new Drift` requires a DOM element as its first argument.");var namespace=options.namespace||null,showWhitespaceAtEdges=options.showWhitespaceAtEdges||!1,containInl
22ine=options.containInline||!1,inlineOffsetX=options.inlineOffsetX||0,inlineOffsetY=options.inlineOffsetY||0,inlineContainer=options.inlineContainer||document.body,sourceAttribute=options.sourceAttribute||"data-zoom",zoomFactor=options.zoomFactor||3,paneContainer=options.paneContainer===void 0?document.body:options.paneContainer,inlinePane=options.inlinePane||375,handleTouch="handleTouch"in options?!!options.handleTouch:!0,onShow=options.onShow||null,onHide=options.onHide||null,injectBaseStyles="injectBaseStyles"in options?!!options.injectBaseStyles:!0,hoverDelay=options.hoverDelay||0,touchDelay=options.touchDelay||0,hoverBoundingBox=options.hoverBoundingBox||!1,touchBoundingBox=options.touchBoundingBox||!1,boundingBoxContainer=options.boundingBoxContainer||document.body;if(inlinePane!==!0&&!isDOMElement(paneContainer))throw new TypeError("`paneContainer` must be a DOM element when `inlinePane !== true`");if(!isDOMElement(inlineContainer))throw new TypeError("`inlineContainer` must be a DOM element");this.settings={namespace:namespace,showWhitespaceAtEdges:showWhitespaceAtEdges,containInline:containInline,inlineOffsetX:inlineOffsetX,inlineOffsetY:inlineOffsetY,inlineContainer:inlineContainer,sourceAttribute:sourceAttribute,zoomFactor:zoomFactor,paneContainer:paneContainer,inlinePane:inlinePane,handleTouch:handleTouch,onShow:onShow,onHide:onHide,injectBaseStyles:injectBaseStyles,hoverDelay:hoverDelay,touchDelay:touchDelay,hoverBoundingBox:hoverBoundingBox,touchBoundingBox:touchBoundingBox,boundingBoxContainer:boundingBoxContainer},this.settings.injectBaseStyles&&injectBaseStylesheet(),this._buildZoomPane(),this._buildTrigger()}return _createClass$4(Drift2,[{key:"_buildZoomPane",value:function(){this.zoomPane=new ZoomPane({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 Trigger({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(imageURL){this.zoomPane._setImageURL(imageURL)}},{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(zf){this.settings.zoomFactor=zf,this.zoomPane.settings.zoomFactor=zf,this.trigger.settings.zoomFactor=zf,this.boundingBox.settings.zoomFactor=zf}}]),Drift2})();Object.defineProperty(Drift.prototype,"isShowing",{get:function(){return this.isShowing}}),Object.defineProperty(Drift.prototype,"zoomFactor",{get:function(){return this.zoomFactor},set:function(value){this.zoomFactor=value}}),Drift.prototype.setZoomImageURL=Drift.prototype.setZoomImageURL,Drift.prototype.disable=Drift.prototype.disable,Drift.prototype.enable=Drift.prototype.enable,Drift.prototype.destroy=Drift.prototype.destroy;var ProductGallery=(function(){function ProductGallery2(element,options){_classCallCheck(this,ProductGallery2),this.element=element,this.delegateElement=new Delegate(this.element),this.viewInSpaceElement=this.element.querySelector("[data-shopify-xr]"),this.options=options,this.media={},this.previouslySelectedMedia=null,this._createCarousel(),this._createZoom(),this._attachListeners()}return _createClass(ProductGallery2,[{key:"destroy",value:function(){this.flickityInstance&&this.flickityInstance.destroy();for(var mediaId in this.media)this.media.hasOwnProperty(mediaId)&&this.media[mediaId].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(newVariant){var _this=this,shouldReload=!1;fastdom.mutate(function(){if(_this.productGalleryCellsElements.forEac
22h(function(cell2,imageIndex){if(cell2.hasAttribute("data-group-name")){var groupName=cell2.getAttribute("data-group-name");_this.options.productOptions.forEach(function(option,optionIndex){option.toLowerCase()===groupName&&(newVariant["option".concat(optionIndex+1)].toLowerCase()===cell2.getAttribute("data-group-value")||newVariant.featured_media&&newVariant.featured_media.id===parseInt(cell2.getAttribute("data-media-id"))?(cell2.classList.remove("is-filtered"),_this.productThumbnailsCellsElements[imageIndex].classList.remove("is-filtered")):(cell2.classList.add("is-filtered"),_this.productThumbnailsCellsElements[imageIndex].classList.add("is-filtered")))}),shouldReload=!0}}),shouldReload&&(_this.flickityInstance.deactivate(),_this.flickityInstance.activate()),Responsive.matchesBreakpoint("lap-and-up")){var slides=_this.element.querySelectorAll(".product-gallery__carousel-item");slides.forEach(function(slide2){slide2.classList.remove("product-gallery__carousel-item--hidden")})}newVariant&&newVariant.featured_media&&_this.flickityInstance.selectCell('[data-media-id="'.concat(newVariant.featured_media.id,'"]'))})}},{key:"_createCarousel",value:function(){var _this2=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(item){switch(item.getAttribute("data-media-type")){case"external_video":case"video":_this2.media[item.getAttribute("data-media-id")]=new ProductVideo(item,_this2.options.enableVideoLooping);break;case"model":_this2.media[item.getAttribute("data-media-id")]=new ProductModel(item);break}}),parseInt(this.productGalleryElement.getAttribute("data-media-count"))>1)){var filteredCells=[].slice.call(this.productGalleryCellsElements).filter(function(item){return!item.classList.contains("is-filtered")}),initialIndex=0;filteredCells.forEach(function(item,index){item.getAttribute("data-media-id")===_this2.productGalleryElement.getAttribute("data-initial-media-id")&&(initialIndex=index)}),this.flickityInstance=new flickityFade(this.productGalleryElement,{accessibility:!1,prevNextButtons:!1,pageDots:!1,adaptiveHeight:!0,draggable:!Responsive.matchesBreakpoint("supports-hover"),fade:this.options.galleryTransitionEffect==="fade",cellSelector:".product-gallery__carousel-item:not(.is-filtered)",initialIndex:initialIndex})}this.productThumbnailsListElement=this.element.querySelector(".product-gallery__thumbnail-list"),this.delegateElement.on("click",".product-gallery__thumbnail",this._onThumbnailClicked.bind(this)),this.productThumbnailsListElement&&this.flickityInstance&&(this.productThumbnailsCellsElements=this.productThumbnailsListElement.querySelectorAll(".product-gallery__thumbnail"),this.flickityInstance.on("select",this._onGallerySlideChanged.bind(this)),this.options.galleryTransitionEffect==="fade"?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 _this3=this;if(this.options.enableImageZoom){this.driftObjects=[];var zoomWrapper=this.element.querySelector(".product__zoom-wrapper");Responsive.matchesBreakpoint("supports-hover")&&this.element.querySelectorAll(".product-gallery__image").forEach(function(image){_this3.driftObjects.push(new Drift(image,{containInline:_this3.options.zoomEffect==="outside",inlinePane:window.innerWidth<1024?!0:_this3.options.zoomEffect!=="outside",hoverBoundingBox:_this3.options.zoomEffect==="outside",handleTouch:!1,inlineOffsetY:window.innerWidth<1024?-85:0,paneContainer:zoomWrapper}))})}}},{key:"_onGallerySlideChanged",value:function(){var _this4=this,animate2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,previousNavElement=null,newNavElement=null;if(this.productThumbnailsCellsElements.forEach(function(item){item.classList.contains("is-nav-selected")&&(previousNavElement=item),item.getAttribute("data-media-id")===_this4.flickityInstance.selectedElement.getAttribute("data-media-id")&&(newNavElement=item)}),previousNavElement.classList.remove("is-nav-selected"),newNavElement.classList.add("is-nav-selected"),Responsive.matchesBreakpoint("pocket")){var scrollX=newNavElement.offsetLeft-(this.productThumbn
22ailsListElement.parentNode.clientWidth-newNavElement.clientWidth)/2;this.productThumbnailsListElement.parentNode.scrollTo({left:scrollX,behavior:animate2?"smooth":"auto"})}else{var scrollY=newNavElement.offsetTop-(this.productThumbnailsListElement.clientHeight-newNavElement.clientHeight)/2;this.productThumbnailsListElement.scrollTo({top:scrollY,behavior:animate2?"smooth":"auto"})}}},{key:"_onGallerySlideSettled",value:function(){if(this._handleMedia(this.flickityInstance.selectedElement),Responsive.matchesBreakpoint("lap-and-up")){var slides=this.element.querySelectorAll(".product-gallery__carousel-item:not(.is-selected)");slides.forEach(function(slide2){slide2.classList.add("product-gallery__carousel-item--hidden")})}}},{key:"_onThumbnailClicked",value:function(event2,target){if(event2.preventDefault(),this.flickityInstance&&(this.flickityInstance.selectCell('[data-media-id="'.concat(target.getAttribute("data-media-id"),'"]')),Responsive.matchesBreakpoint("lap-and-up"))){var slides=this.element.querySelectorAll(".product-gallery__carousel-item");slides.forEach(function(slide2){slide2.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=!Responsive.matchesBreakpoint("supports-hover"),this.flickityInstance.updateDraggable()}},{key:"_handleMedia",value:function(item){var isInitialLoading=this.previouslySelectedMedia===null;if(this.previouslySelectedMedia&&this.previouslySelectedMedia!==item){switch(this.previouslySelectedMedia.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[this.previouslySelectedMedia.getAttribute("data-media-id")].hasBeenDeselected()}this.previouslySelectedMedia.getAttribute("data-media-type")==="model"&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",this.viewInSpaceElement.getAttribute("data-shopify-model3d-default-id"))}switch(item.getAttribute("data-media-type")){case"video":case"external_video":case"model":this.media[item.getAttribute("data-media-id")].hasBeenSelected(isInitialLoading),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");break}item.getAttribute("data-media-type")==="model"&&this.viewInSpaceElement&&this.viewInSpaceElement.setAttribute("data-shopify-model3d-id",item.getAttribute("data-media-id")),this.previouslySelectedMedia=item}}]),ProductGallery2})(),QuantityPicker=(function(){function QuantityPicker2(element){_classCallCheck(this,QuantityPicker2),this.element=element,this._attachListeners()}return _createClass(QuantityPicker2,[{key:"_attachListeners",value:function(){this.element.addEventListener("change",this._onSelectValueChanged.bind(this))}},{key:"_onSelectValueChanged",value:function(event2){var value=parseInt(event2.target.value);if(value===10){var selectWrapper=event2.target.closest(".select-wrapper"),inputElement=document.createElement("input");inputElement.id=event2.target.id,inputElement.className="product-form__quantity form__field form__field--small form__field--text",inputElement.pattern="[0-9]*",inputElement.name="quantity",inputElement.value="10",selectWrapper.parentNode.replaceChild(inputElement,selectWrapper),inputElement.focus(),inputElement.addEventListener("keyup",this._onInputValueChanged.bind(this)),inputElement.addEventListener("focusout",this._onInputFocusOut.bind(this))}}},{key:"_onInputValueChanged",value:function(event2){var value=event2.target.value;value!==""&&isNaN(value)&&(event2.target.value=Math.max(1,parseInt(value)||1))}},{key:"_onInputFocusOut",value:function(event2){event2.target.value=Math.max(1,parseInt(event2.target.value)||1)}}]),QuantityPicker2})(),ShippingEstimator=(function(){function ShippingEstimator2(element,options){_classCallCheck(this,ShippingEstimator2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=options,this.countrySelector=new CountrySelector(this.element.querySelector('[name="country"]'),this.element.querySelector('[name="province"]')),this._attachListeners()}return _createClass(ShippingEstimator2,[{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 _this=this,country=this.element.querySelector('[name="country"]').value,province=this.element.querySelector('[name="province"]').value,zip=this.element.querySelector('[name="zip"]').value;fetch("".concat(window.routes.cartUrl,"/shipping_rates.json?shipping_address[zip]=").concat(zip,"&shipping_address[country]=").concat(country,"&shipping_address[province]=").concat(province),{credentials:"same-origin",method:"GET"}).then(function(response){document.dispatchEvent(new CustomEvent("theme:loading:end")),response.json().then(function(result){_this._formatResults(response.ok,result)})})}},{key:"_fetchRatesForProduct",value:function(){var _this2=this,cartCookie=this._getCookie("cart"),tempCookieValue="temp-cart-cookie___"+Date.now()+parseInt(Math.random()*1e3),fakeCookieValue="fake-cart-cookie___"+Date.now()+parseInt(Math.random()*1e3);if(cartCookie||(this._updateCartCookie(tempCookieValue),cartCookie=this._getCookie("cart")),!(cartCookie.length<32)){this._updateCartCookie(fakeCookieValue);var formElement=document.querySelector('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(response){response.json().then(function(){var country=_this2.element.querySelector('[name="country"]').value,province=_this2.element.querySelector('[name="province"]').value,zip=_this2.element.querySelector('[name="zip"]').value;fetch("".concat(window.routes.cartUrl,"/shipping_rates.json?shipping_address[zip]=").concat(zip,"&shipping_address[country]=").concat(country,"&shipping_address[province]=").concat(province),{credentials:"same-origin",method:"GET"}).then(function(response2){document.dispatchEvent(new CustomEvent("theme:loading:end")),response2.json().then(function(result){_this2._formatResults(response2.ok,result)}),_this2._updateCartCookie(cartCookie)}).catch(function(){_this2._updateCartCookie(cartCookie)})}).catch(function(){_this2._updateCartCookie(cartCookie),document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}}},{key:"_formatResults",value:function(isOk,results){var resultsElement=this.element.querySelector(".shipping-estimator__results");if(resultsElement.innerHTML="",isOk){var shippingRates=results.shipping_rates;if(shippingRates.length===0)resultsElement.innerHTML="<p>".concat(window.languages.shippingEstimatorNoResults,"</p>");else{shippingRates.length===1?resultsElement.innerHTML="<p>".concat(window.languages.shippingEstimatorOneResult,"</p>"):resultsElement.innerHTML="<p>".concat(window.languages.shippingEstimatorMultipleResults.replace("{{count}}",shippingRates.length),"</p>");var listRatesHtml="";
22shippingRates.forEach(function(item){listRatesHtml+="<li>".concat(item.name,": ").concat(Currency.formatMoney(item.price,window.theme.moneyFormat),"</li>")}),resultsElement.innerHTML+="<ul>".concat(listRatesHtml,"</ul>")}}else{resultsElement.innerHTML="<p>".concat(window.languages.shippingEstimatorErrors,"</p>");var errorHtml="";Object.keys(results).forEach(function(key){errorHtml+='<li class="alert__list-item">'.concat(key," ").concat(results[key],"</li>")}),resultsElement.innerHTML+="<ul>".concat(errorHtml,"</ul>")}resultsElement.style.display="block"}},{key:"_getCookie",value:function(name){var value="; ".concat(document.cookie),parts=value.split("; "+name+"=");if(parts.length===2)return parts.pop().split(";").shift()}},{key:"_updateCartCookie",value:function(value){var date=new Date;date.setTime(date.getTime()+14*864e5),document.cookie="cart=".concat(value,"; expires=").concat(date.toUTCString(),"; path=/")}}]),ShippingEstimator2})(),ValuePicker=(function(){function ValuePicker2(id){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_classCallCheck(this,ValuePicker2),this.id=id,this.delegateRoot=new Delegate(document.documentElement),this.isOpen=!1,this.togglerElement=document.querySelector('[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]')),this.onSelect=options.onValueSelect||function(){},this._attachListeners()}return _createClass(ValuePicker2,[{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(event2){this.isOpen?this._close(event2):this._open(event2)}},{key:"_open",value:function(){if(document.querySelector('[data-action="open-value-picker"][aria-controls="'.concat(this.id,'"]')).setAttribute("aria-expanded","true"),document.getElementById(this.id).setAttribute("aria-hidden","false"),Responsive.matchesBreakpoint("phone")){var headerElement=document.querySelector(".shopify-section__header");headerElement.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","false"),document.getElementById(this.id).setAttribute("aria-hidden","true");var headerElement=document.querySelector(".shopify-section__header");headerElement.style.zIndex="",this.isOpen=!1,document.body.classList.remove("no-mobile-scroll")}},{key:"_selectValue",value:function(event2,target){this.onSelect(target.getAttribute("data-value")),this._close()}},{key:"_onFocusOut",value:function(event2){var container=document.getElementById(this.id);container.contains(event2.relatedTarget)||this._close()}},{key:"_detectOutsideClick",value:function(event2){!this.isOpen||this.togglerElement===event2.target||this.togglerElement.contains(event2.target)||!event2.target.closest(".value-picker__inner")&&this.isOpen&&this._close(event2)}}]),ValuePicker2})(),AccountSection=(function(){function AccountSection2(element){_classCallCheck(this,AccountSection2),this.element=element,this.domDelegate=new Delegate(this.element),this.element.querySelectorAll('[action*="/account/addresses"]').forEach(function(addressForm){new CountrySelector(addressForm.querySelector('[name="address[country]"]'),addressForm.querySelector('[name="address[province]"]'))}),this.pageSelector=new ValuePicker("account-selector")}return _createClass(AccountSection2,[{key:"_onUnload",value:function(){this.pageSelector.destroy()}}]),AccountSection2})(),AnnouncementBarSection=(function(){function AnnouncementBarSection2(element){_classCallCheck(this,AnnouncementBarSection2),this.element=element,this.domDelegate=new Delegate(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 _createClass(AnnouncementBarSection2,[{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 togglerElement=this.element.querySelector(".announcement-bar__button"),newsletterElement=this.element.querySelector(".announcement-bar__newsletter");togglerElement.getAttribute("aria-expanded")==="false"?(togglerElement.setAttribute("aria-expanded","true"),newsletterElement.setAttribute("aria-hidden","false"),Animation.slideDown(newsletterElement,function(){Accessibility.trapFocus(newsletterElement,"announcement-bar")}
22)):(togglerElement.setAttribute("aria-expanded","false"),newsletterElement.setAttribute("aria-hidden","true"),Animation.slideUp(newsletterElement),Accessibility.removeTrapFocus(newsletterElement,"announcement-bar")),this.isOpen=!this.isOpen}},{key:"_handleKey",value:function(event2){event2.keyCode===27&&this.isOpen&&this._toggleNewsletter()}}]),AnnouncementBarSection2})(),BlogSection=(function(){function BlogSection2(element){if(_classCallCheck(this,BlogSection2),this.element=element,this.blogTagSelector=new ValuePicker("blog-tag-selector"),Shopify.designMode){var elementToAdd=this.element.querySelector(".page__header");elementToAdd&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",elementToAdd))}}return _createClass(BlogSection2,[{key:"onUnload",value:function(){this.blogTagSelector.destroy()}}]),BlogSection2})(),BlogPostSection=function BlogPostSection2(element){if(_classCallCheck(this,BlogPostSection2),this.element=element,Shopify.designMode){var elementToAdd=this.element.querySelector(".page__header");elementToAdd&&(document.querySelector(".blog-container").previousElementSibling.remove(),document.querySelector(".blog-container").insertAdjacentElement("beforebegin",elementToAdd))}},BlogSidebarSection=(function(){function BlogSidebarSection2(element){_classCallCheck(this,BlogSidebarSection2),this.element=element,Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),window.theme.pageType==="blog"&&this._fixItemsPerRow()}return _createClass(BlogSidebarSection2,[{key:"_fixItemsPerRow",value:function(){var blocks=this.element.querySelectorAll(".blog-sidebar__item");blocks.length===0?(document.querySelector(".blog-container").classList.add("blog-container--without-sidebar"),document.querySelectorAll(".shopify-section__blog-posts .block-list__item").forEach(function(item){item.classList.contains("1/2--lap-and-up")&&(item.classList.remove("1/2--lap-and-up"),item.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(item){item.classList.contains("1/3--lap-and-up")&&(item.classList.remove("1/3--lap-and-up"),item.classList.add("1/2--lap-and-up"))}))}}]),BlogSidebarSection2})(),ProductSection=(function(){function ProductSection2(element){var _this=this;if(_classCallCheck(this,ProductSection2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.productGallery=new ProductGallery(this.element,this.options),this._initShopifyReviews(),this.options.isQuickView&&this.options.showPaymentButton&&window.Shopify.PaymentButton&&Shopify.PaymentButton.init(),this.productVariants=new ProductVariants(this.element,this.options),this.options.showShippingEstimator&&(this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!0})),this.options.showQuantitySelector){var quantityPickerElement=this.element.querySelector('select[name="quantity"]');quantityPickerElement&&(this.quantityPicker=new QuantityPicker(quantityPickerElement))}var productInfoElement=this.element.querySelector(".product-block-list__item--info .card");productInfoElement&&(this.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(productInfoElement.clientHeight,"px"),window.ResizeObserver&&(this.productInfoResizeObserver=new ResizeObserver(function(event2){event2[0].contentBoxSize?_this.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(event2[0].contentBoxSize.blockSize,"px"):_this.element.querySelector(".product-block-list__wrapper").style.minHeight="".concat(event2[0].contentRect.height,"px")}),this.productInfoResizeObserver.observe(productInfoElement)),this.options.infoOverflowScroll&&(this.infoOverflowScroller=new OverflowScroller(productInfoElement,{offsetTop:document.documentElement.style.getPropertyValue("--header-is-sticky")*parseInt(document.documentElement.style.getPropertyValue("--header-height")+30),offsetBottom:30}))),this._attachListeners()}return _createClass(ProductSection2,[{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 _this2=this;Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges(),window.SPR.loadProducts()),window.SPRCallbacks={},window.SPRCallbacks.onFormSuccess=function(){_this2.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(event2){this.productGallery.variantHasChanged(event2.detail.variant)}}]),ProductSection2})(),CartSection=(function(){function CartSection2(element){_classCallCheck(this,CartSection2),this.element=element,this.domDelegate=new Delegate(this.element),this.delegateRoot=new Delegate(document.documentElement),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.showShippingEstimator&&(this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._attachListeners(),this._enforceMinimumHeight()}return _createClass(CartSection2,[{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))}}
22,{key:"_saveNote",value:function(){var noteValue=this.element.querySelector('[name="cart[note]"]').value;fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({note:noteValue}),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",noteValue!==""),document.dispatchEvent(new CustomEvent("collapsible:toggle",{detail:{id:"order-note"}}))}},{key:"_addToCart",value:function(event2,target){var _this=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=target.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){response.ok?(target.removeAttribute("disabled"),_this.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}}))):target.removeAttribute("disabled")}),event2.preventDefault()}}},{key:"_openQuickView",value:function(event2,target){var modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),fetch("".concat(target.getAttribute("data-product-url"),"?view=quick-view"),{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){modal.querySelector(".modal__inner").innerHTML=content,modal.classList.remove("is-loading");var modalProductSection=new ProductSection(modal.querySelector('[data-section-type="product"]')),doCleanUp=function doCleanUp2(){modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp2)};modal.addEventListener("modal:closed",doCleanUp)})})}},{key:"_enforceMinimumHeight",value:function(){var cartWrapperElement=this.element.querySelector(".cart-wrapper"),cartRecapScrollerElement=this.element.querySelector(".cart-recap__scroller");if(cartWrapperElement&&cartRecapScrollerElement&&(cartWrapperElement.style.minHeight="".concat(cartRecapScrollerElement.clientHeight,"px"),window.ResizeObserver)){var resizeObserver=new ResizeObserver(function(entries){var _iterator=_createForOfIteratorHelper(entries),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var entry=_step.value;cartWrapperElement.style.minHeight="".concat(parseInt(entry.contentRect.height),"px")}}catch(err){_iterator.e(err)}finally{_iterator.f()}});resizeObserver.observe(cartRecapScrollerElement)}}},{key:"_onCartRerendered",value:function(){this.options.showShippingEstimator&&(this.shippingEstimator.destroy(),this.shippingEstimator=new ShippingEstimator(this.element.querySelector(".shipping-estimator"),{singleProduct:!1})),this._enforceMinimumHeight()}}]),CartSection2})(),CollectionListSection=(function(){function CollectionListSection2(element){_classCallCheck(this,CollectionListSection2),this.element=element,this.flickityInstance=new js(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 _createClass(CollectionListSection2,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(event2){this.flickityInstance.isActive&&this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-collection-index")),null,event2.detail.load)}}]),CollectionListSection2})(),CollectionSection=(function(){function CollectionSection2(element){_classCallCheck(this,CollectionSection2),this.element=element,this.delegateElement=new Delegate(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 CollectionFilterDrawer(this.options),this.displayByValuePicker=new ValuePicker("display-by-selector",{onValueSelect:this._showingCountChanged.bind(this)}),this.sortByValuePicker=new ValuePicker("sort-by-selector",{onValueSelect:this._sortByChanged.bind(this)}),this.productItemColorSwatch=new ProductItemColorSwatch(this.element),window.theme.pageType==="search"&&window.theme.searchMode!=="product"&&this._loadContentResults(),this._attachListeners()}return _createClass(CollectionSection2,[{key:"onUnload",value:function(){this.delegateElement.off(),this.mobileFilterDrawer.destroy(),this.displayByValuePicker.destroy(),this.sortByValuePicker.destroy(),this.productItemColorSwatch.destroy()}},{key:"onSelect",value:function(event2){Shopify.designMode&&event2.detail.load&&(this.element.querySelector('.collection__layout-button[data-layout-mode="'.concat(this.options.defaultLayout,'"]')).click(),this._showingCountChanged(this.options.defaultProductsPerPage))}},{key:"_attachListeners",value:function(){var _this=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(event2){event2.state.path&&(_this.currentUrl=new URL(event2.state.path),_this._reload(!1))})}},{key:"_openQuickView",value:function(event2,target){var productUrl=new URL("".concat(window.location.origin).concat(target.getAttribute("data-product-url")));if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;var modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),productUrl.searchParams.set("view","quick-view"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){modal.querySelector(".modal__inner").innerHTML=content,modal.classList.remove("is-loading");var modalProductSection=new ProductSection(modal.querySelector('[data-section-type="product"]')),doCleanUp=function doCleanUp2(){modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp2)};modal.addEventListener("modal:closed",doCleanUp)})})}},{key:"_changeLayout",value:function(event2,target){var _this2=this;if(!target.classList.contains("is-selected")){var newLayoutMode=target.getAttribute("data-layout-mode");fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({attributes:{collection_layout:newLayoutMode}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),fastdom.mutate(function(){Dom.getSiblings(target,".is-selected").forEach(function(button){return button.classList.remove("is-selected")}),target.classList.add("is-selected"),_this2.element.querySelectorAll(".product-item").forEach(function(item){newLayoutMode==="grid"?item.className="product-item product-item--vertical ".concat(_this2.options.gridClasses):item.className="product-item product-item--list"}),_this2.productItemColorSwatch.recalculateSwatches()})}}},{key:"_sortByChanged",value:function(value){this.currentUrl.searchParams.set("sort_by",value),this.currentUrl.searchParams.delete("page"),this._reload(!0)}},{key:"_showingCountChanged",value:function(value){var _this3=this;this.currentUrl.searchParams.delete("page"),fetch("".concat(window.routes.cartUrl,"/update.js"),{body:JSON.stringify({attributes:{collection_products_per_page:value}}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(){_this3._reload(!0)})}},{key:"_paginationPageChanged",value:function(event2,target){event2.preventDefault(),this.currentUrl.searchParams.set("page",parseInt(target.getAttribute("data-page"))),this._reload(!0)}},{key:"_tagToggled",value:function(event2,target){var _this4=this,newTag=target.getAttribute("data-tag"),hadTags=this.currentTags.length>0;if(this.currentTags.includes(newTag))this.currentTags=this.currentTags.filter(function(value){return value!==newTag});else if(this.options.filterType==="tag")this.currentTags=[newTag];else{var tagGroup=newTag.split("_")[0];
22this.currentTags.forEach(function(existingTag){existingTag.split("_")[0]===tagGroup&&(_this4.currentTags=_this4.currentTags.filter(function(value){return value!==existingTag}))}),this.currentTags.push(newTag)}this.currentUrl.searchParams.delete("page"),this._updateTagUrl(hadTags),this._reload(!0)}},{key:"_clearTags",value:function(){var hadTags=this.currentTags.length>0;this.currentTags=[],this.currentUrl.searchParams.delete("page"),this._updateTagUrl(hadTags),this._reload(!0).then(function(){document.dispatchEvent(new CustomEvent("collection-filter:close"))})}},{key:"_updateTagUrl",value:function(hadTags){var _this5=this;if(fastdom.mutate(function(){_this5.collectionFilterTagElements.forEach(function(tagElement){_this5.currentTags.includes(tagElement.getAttribute("data-tag"))?(tagElement.classList.add("is-selected"),tagElement.tagName==="INPUT"&&(tagElement.checked=!0)):(tagElement.classList.remove("is-selected"),tagElement.tagName==="INPUT"&&(tagElement.checked=!1))})}),this.options.isAutomatic)this.currentTags.length===0?this.currentUrl.searchParams.delete("constraint"):this.currentUrl.searchParams.set("constraint",this.currentTags.join("+"));else{var tagPath=this.currentTags.join("+"),currentPathName=this.currentUrl.pathname.substr(-1)==="/"?this.currentUrl.pathname.substr(0,this.currentUrl.pathname.length-1):this.currentUrl.pathname;if(hadTags){var pathParts=currentPathName.split("/");pathParts.pop(),this.currentUrl.pathname="".concat(pathParts.join("/"),"/").concat(tagPath)}else this.currentUrl.pathname="".concat(currentPathName,"/").concat(tagPath)}}},{key:"_reload",value:function(pushState){var _this6=this;pushState&&window.history.pushState({path:this.currentUrl.toString()},"",this.currentUrl.toString()),document.dispatchEvent(new CustomEvent("theme:loading:start")),this.mobileFilterDrawer._filtersHaveChanged(this.currentTags);var computedStyles=window.getComputedStyle(document.documentElement),sectionUrl="";return this.currentUrl.search?sectionUrl="".concat(this.currentUrl.pathname,"/").concat(this.currentUrl.search,"&section_id=").concat(this.element.getAttribute("data-section-id")):sectionUrl="".concat(this.currentUrl.pathname,"?section_id=").concat(this.element.getAttribute("data-section-id")),fetch(sectionUrl,{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){var tempElement=document.createElement("div");tempElement.innerHTML=content,_this6.element.querySelector(".collection__dynamic-part").innerHTML=tempElement.querySelector(".collection__dynamic-part").innerHTML;var activeFilters=_this6.element.querySelector(".collection__active-filters");activeFilters&&(activeFilters.innerHTML=tempElement.querySelector(".collection__active-filters").innerHTML),window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),_this6.productItemColorSwatch.recalculateSwatches();var elementOffset=_this6.element.querySelector(".collection").getBoundingClientRect().top-25-parseInt(computedStyles.getPropertyValue("--header-is-sticky"))*parseInt(computedStyles.getPropertyValue("--header-height"));elementOffset<0&&window.scrollBy({top:elementOffset,behavior:"smooth"}),document.dispatchEvent(new CustomEvent("theme:loading:end"))})})}},{key:"_loadContentResults",value:function(){var _this7=this,currentUrl=new URL(window.location.href);fetch("".concat(window.routes.searchUrl,"?view=content&q=").concat(currentUrl.searchParams.get("q"),"&type=").concat(window.theme.searchMode.replace("product,","")),{credentials:"same-origin"}).then(function(response){response.text().then(function(content){var linkSearchResults=_this7.element.querySelector(".link-search-results");linkSearchResults&&content.trim()!==""&&(linkSearchResults.innerHTML=content,linkSearchResults.style.display="block")})})}},{key:"_addToCart",value:function(event2,target){var _this8=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=target.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){target.removeAttribute("disabled"),response.ok?_this8.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),event2.preventDefault()}}}]),CollectionSection2})(),FeaturedCollectionSection=(function(){function FeaturedCollectionSection2(element){_classCallCheck(this,FeaturedCollectionSection2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.stackable||(this.flickityInstance=new js(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 ProductItemColorSwatch(this.element),this._fixSafari(),this._attachListeners()}return _createClass(FeaturedCollectionSection2,[{key:"onUnload",value:function(){this.options.stackable||this.flickityInstance.destroy(),window.removeEventListener("resize",this._fixSafariListener),this.delegateElement.off("change"),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this._fixSafariListener=this._fixSafari.bind(this),window.addEventListener("resize",this._fixSafariListener),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:"_fixSafari",value:function(){var userAgent=window.navigator.userAgent.toLowerCase();if(userAgent.includes("safari")&&(userAgent.includes("version/10.1")||userAgent.includes("version/10.3")||userAgent.includes("version/11.0"))){var isPhone=Responsive.matchesBreakpoint("phone");this.element.querySelectorAll(".product-item__image-wrapper .aspect-ratio, .product-item__image-wrapper .placeholder-svg").forEach(function(image){isPhone?image.parentNode.style.height=null:image.parentNode.style.height="".concat(image.clientHeight,"px")})}}},{key:"_openQuickView",value:function(event2,target){var productUrl=new URL("".concat(window.location.origin).concat(target.getAttribute("data-product-url")));if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;var modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),productUrl.searchParams.set("view","quick-view"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){modal.querySelector(".modal__inner").innerHTML=content,modal.classList.remove("is-loading");var modalProductSection=new ProductSection(modal.querySelector('[data-section-type="product"]')),doCleanUp=function doCleanUp2(){modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp2)};modal.addEventListener("modal:closed",doCleanUp)})})}},{key:"_addToCart",value:function(event2,target){var _this=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=target.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){target.removeAttribute("disabled"),response.ok?_this.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),event2.preventDefault()}}}]),FeaturedCollectionSection2})(),GiftCardSection=(function(){function GiftCardSection2(container){_classCallCheck(this,GiftCardSection2),this.element=container,this.delegateElement=new Delegate(this.element),this._createQrCode(),this._attachListeners()}return _createClass(GiftCardSection2,[{key:"onUnload",value:function(){this.delegateElement.off()}},{key:"_createQrCode",value:function(){var qrCodeElements=document.querySelectorAll(".gift-card__qr");
22qrCodeElements.forEach(function(qrCodeElement){new QRCode(qrCodeElement,{text:qrCodeElement.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(event2,element){element.select()}}]),GiftCardSection2})(),FooterSection=(function(){function FooterSection2(element){_classCallCheck(this,FooterSection2),this.element=element,this.domDelegate=new Delegate(this.element),this.localeValuePicker=new ValuePicker("footer-locale-picker"),this.currencyValuePicker=new ValuePicker("footer-currency-picker"),this.cookieBarElement=this.element.querySelector(".cookie-bar"),this.cookieBarElement&&this._setupCookieBar(),this._setupCollapsibles(),this._attachListeners()}return _createClass(FooterSection2,[{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 collapsibleToggles=this.element.querySelectorAll('[data-action="toggle-collapsible"]'),isPhone=Responsive.matchesBreakpoint("phone");collapsibleToggles.forEach(function(collapsibleToggle){isPhone?collapsibleToggle.removeAttribute("disabled"):(collapsibleToggle.setAttribute("disabled","disabled"),document.getElementById(collapsibleToggle.getAttribute("aria-controls")).style.height="")})}},{key:"_setupCookieBar",value:function(){try{localStorage.getItem("cookieWasAccepted")===null&&this.cookieBarElement.setAttribute("aria-hidden","false")}catch(exception){}}},{key:"_acceptCookieBarTerms",value:function(){this.cookieBarElement.setAttribute("aria-hidden","true");try{localStorage.setItem("cookieWasAccepted","true")}catch(exception){}}}]),FooterSection2})(),SearchBar=(function(){function SearchBar2(element){_classCallCheck(this,SearchBar2),this.element=element,this.delegateElement=new Delegate(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 _createClass(SearchBar2,[{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(event2){Responsive.matchesBreakpoint("phone")||(this.element.classList.remove("is-fixed"),document.body.classList.remove("no-mobile-scroll"),this.element.contains(event2.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(event2){if(event2.keyCode===9){var firstFocusableElement=this.searchResultsElement.querySelector("a");firstFocusableElement&&(firstFocusableElement.focus(),event2.preventDefault())}}},{key:"_doSearch",value:function(){var _this=this,currentInput=this.inputElement.value;if(this.lastInputValue=currentInput,currentInput==="")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 queryOptions={method:"GET",credentials:"same-origin"},productQuery="".concat(this.productTypeFilter!==""?"product_type:".concat(this.productTypeFilter," AND "):"").concat(encodeURIComponent(this.lastInputValue)),queries=[fetch("".concat(window.routes.searchUrl,"?view=ajax&q=").concat(productQuery,"&options[prefix]=last&type=product"),queryOptions)];window.theme.searchMode!=="product"&&queries.push(fetch("".concat(window.routes.searchUrl,"?view=ajax&q=").concat(encodeURIComponent(this.lastInputValue),"&options[prefix]=last&type=").concat(window.theme.searchMode.replace("product,","")),queryOptions)),Promise.all(queries).then(function(responses){_this.lastInputValue===currentInput&&Promise.all(responses.map(function(response){return response.text()})).then(function(contents){_this.searchBarElement.classList.remove("is-loading");var searchContent=document.createElement("div");searchContent.innerHTML=contents.join("").trim();var viewAll=searchContent.querySelector(".search-bar__view-all");viewAll&&searchContent.insertAdjacentElement("beforeend",viewAll),_this.searchBarElement.querySelector(".search-bar__results-inner").innerHTML=searchContent.innerHTML})})}}},{key:"_productTypeChanged",value:function(event2,target){target.closest(".search-bar__filter").querySelector(".search-bar__filter-active").innerText=target.options[target.selectedIndex].innerText,this.productTypeFilter=target.value,this.inputElement.value!==""&&this._doSearch()}},{key:"_debounce",value:function(fn,delay){var _this2=this,timer=null;return function(){for(var _len=arguments.length,args=new Array(_len),_
22key=0;_key<_len;_key++)args[_key]=arguments[_key];clearTimeout(timer),timer=setTimeout(function(){fn.apply(_this2,args)},delay)}}}]),SearchBar2})(),HeaderSection=(function(){function HeaderSection2(element){_classCallCheck(this,HeaderSection2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.searchBar=new SearchBar(this.element.querySelector(".header__search-bar-wrapper")),this.cart=new Cart(this.element.querySelector(".header__action-item--cart"),{useStickyHeader:this.options.useStickyHeader});var desktopNavigationElement=this.element.querySelector(this.options.navigationLayout==="inline"?".nav-bar":".header__desktop-nav");desktopNavigationElement&&(this.desktopNavigation=new DesktopNavigation(desktopNavigationElement,this.options.navigationLayout,this.options.desktopOpenTrigger));var mobileNavigationElement=this.element.querySelector(".header__mobile-nav");mobileNavigationElement&&(this.mobileNavigation=new MobileNavigation(mobileNavigationElement)),this._setupCssVariables(),this._attachListeners()}return _createClass(HeaderSection2,[{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(event2){this.desktopNavigation&&this.desktopNavigation.onBlockSelect(event2)}},{key:"onBlockDeselect",value:function(event2){this.desktopNavigation&&this.desktopNavigation.onBlockDeselect(event2)}},{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(event2){this.searchBar.toggleMobileSearch(),event2.preventDefault()}}]),HeaderSection2})(),LoginSection=(function(){function LoginSection2(element){_classCallCheck(this,LoginSection2),this.element=element,this.domDelegate=new Delegate(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 _createClass(LoginSection2,[{key:"_showRecoverPassword",value:function(){var isLoginActive=this.customerLoginForm.style.display==="block";isLoginActive?(this.customerLoginForm.style.display="none",this.recoverPasswordForm.style.display="block"):(this.customerLoginForm.style.display="block",this.recoverPasswordForm.style.display="none")}}]),LoginSection2})(),MapSection=(function(){function MapSection2(element){_classCallCheck(this,MapSection2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(element.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 _createClass(MapSection2,[{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(event2){this._showStore(event2.target)}},{key:"_attachListeners",value:function(){var _this=this;this.delegateElement.on("click",'[data-action="toggle-store"]',function(event2,target){_this._showStore(target.closest(".map__store-item"))})}},{key:"_showStore",value:function(storeItem){var _this2=this,toggleButton=storeItem.querySelector('[data-action="toggle-store"]');if(!(Responsive.getCurrentBreakpoint()!=="phone"&&toggleButton.getAttribute("aria-expanded")==="true")){toggleButton.getAttribute("aria-expanded")==="true"?(toggleButton.setAttribute("aria-expanded","fal
22se"),Animation.slideUp(storeItem.querySelector(".map__store-collapsible"))):(toggleButton.setAttribute("aria-expanded","true"),Animation.slideDown(storeItem.querySelector(".map__store-collapsible"))),Dom.getSiblings(storeItem).forEach(function(storeItemToClose){storeItemToClose.querySelector('[data-action="toggle-store"]').setAttribute("aria-expanded","false"),Animation.slideUp(storeItemToClose.querySelector(".map__store-collapsible"))});var storeIndex=parseInt(storeItem.getAttribute("data-store-index"));this.desktopMapElement.panTo(this.mapPositions[storeIndex]),this.desktopMarkers.forEach(function(marker,index){marker.setMap(_this2.desktopMapElement),index===storeIndex?marker.icon.fillColor=_this2.options.markerActiveColor:marker.icon.fillColor=_this2.options.markerColor})}}},{key:"_loadScript",value:function(){var _this3=this;return new Promise(function(resolve,reject){var script=document.createElement("script");document.body.appendChild(script),script.onload=resolve,script.onerror=reject,script.async=!0,script.src="https://maps.googleapis.com/maps/api/js?key=".concat(_this3.options.apiKey)})}},{key:"_initMaps",value:function(){var _this4=this,mapOptions={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"),mapOptions),this.mobileMapElements=[],this.element.querySelectorAll(".map__map-container--mobile .map__gmap").forEach(function(item,index){_this4.mobileMapElements[index]=new google.maps.Map(item,mapOptions)}),this._geocodeAddresses(),google.maps.event.addDomListener(window,"resize",function(){var desktopCenter=_this4.desktopMapElement.getCenter();google.maps.event.trigger(_this4.desktopMapElement,"resize"),_this4.desktopMapElement.setCenter(desktopCenter),_this4.mobileMapElements.forEach(function(mobileMap){var mobileCenter=mobileMap.getCenter();google.maps.event.trigger(mobileMap,"resize"),mobileMap.setCenter(mobileCenter)})})}},{key:"_onMarkerClicked",value:function(address){window.open("https://www.google.com/maps/search/?api=1&query=".concat(address),"_blank")}},{key:"_geocodeAddresses",value:function(){var _this5=this,geocoder=new google.maps.Geocoder;this.options.mapAddresses.forEach(function(address,index){geocoder.geocode({address:address},function(results,status){if(status!==google.maps.GeocoderStatus.OK)Shopify.designMode;else{var position=results[0].geometry.location;_this5.mapPositions[index]=position,_this5.desktopMarkers[index]=new google.maps.Marker({map:index===0?_this5.desktopMapElement:null,position:position,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:index===0?_this5.options.markerActiveColor:_this5.options.markerColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),_this5.mobileMarkers[index]=new google.maps.Marker({map:_this5.mobileMapElements[index],position:position,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:_this5.options.markerActiveColor,fillOpacity:1,anchor:new google.maps.Point(12,30),strokeWeight:0}}),_this5.desktopMarkers[index].addListener("click",_this5._onMarkerClicked.bind(_this5,address)),_this5.mobileMarkers[index].addListener("click",_this5._onMarkerClicked.bind(_this5,address)),index===0&&_this5.desktopMapElement.setCenter(position),_this5.mobileMapElements[index].setCenter(position)}})})}}]),MapSection2})(),MinimalHeaderSection=(function(){function MinimalHeaderSection2(element){_classCallCheck(this,MinimalHeaderSection2),this.element=element,this._setupCssVariables(),this._attachListeners()}return _createClass(MinimalHeaderSection2,[{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")}}]),MinimalHeaderSection2})(),QuickLinksSection=function QuickLinksSection2(element){_classCallCheck(this,QuickLinksSection2),this.element=element,Shopify.designMode&&this.element.classList.remove("hidden-lap-and-up")},PopupsSection=(function(){function PopupsSection2(element){var _this=this;_classCallCheck(this,PopupsSection2),element.querySelectorAll("[data-popup-type]").forEach(function(popup){popup.getAttribute("data-popup-type")==="exit"?_this.exitPopup=new ExitPopup(popup):popup.getAttribute("data-popup-type")==="newsletter"&&(_this.newsletterPopup=new NewsletterPopup(popup))})}return _createClass(PopupsSection2,[{key:"onUnload",value:function(){this.exitPopup&&this.exitPopup.destroy(),this.newsletterPopup&&this.newsletterPopup.destroy()}},{key:"onBlockSelect",value:function(event2){event2.target.getAttribute("data-popup-type")==="exit"&&this.exitPopup?this.exitPopup._openPopup():event2.target.getAttribute("data-popup-type")==="newsletter"&&this.newsletterPopup&&this.newsletterPopup._openPopup()}},{key:"onBlockDeselect",value:function(){this.exitPopup&&this.exitPopup._closePopup(),this.newsletterPopup&&this.newsletterPopup._closePopup()}}]),PopupsSection2})(),ProductRecommendationsSection=(function(){function ProductRecommendationsSection2(element){_classCallCheck(this,ProductRecommendationsSection2),this.element=element,this.delegateElement=new Delegate(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 ProductItemColorSwatch(this.element),this._fixSafari(),this._attachListeners()}return _createClass(ProductRecommendationsSection2,[{key:"onUnload",value:function(){this.options.stackable||this.flickityInstance.destroy(),window.removeEventListener("resize",this._fixSafariListener),this.delegateElement.off("change"),this.productItemColorSwatch.destroy()}},{key:"_attachListeners",value:function(){this._fixSafariListener=this._fixSafari.bind(this),window.addEventListener("resize",this._fixSafariListener),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:"_fixSafari",value:function(){var userAgent=window.navigator.userAgent.toLowerCase();if(userAgent.includes("safari")&&(userAgent.includes("version/10.1")||userAgent.includes("version/10.3")||userAgent.includes("version/11.0"))){var isPhone=Responsive.matchesBreakpoint("phone");this.element.querySelectorAll(".product-item__image-wrapper .aspect-ratio, .product-item__image-wrapper .placeholder-svg").forEach(function(image){isPhone?image.parentNode.style.height=null:image.parentNode.style.height="".concat(image.clientHeight,"px")})}}},{key:"_loadRecommendations",value:function(){var _this=this,url="".concat(window.routes.productRecommendationsUrl,"?section_id=product-recommendations&product_id=").concat(this.options.productId,"&limit=").concat(this.options.recommendationsCount);return fetch(url).then(function(response){return response.text().then(function(content){var container=document.createElement("div");container.innerHTML=content,_this.element.querySelector(".product-recommendations").innerHTML=container.querySelector(".product-recommendations").innerHTML,_this.productItemColorSwatch.recalculateSwatches(),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges())})})}},{key:"_createSlideshow",value:function(){this.options.stackable||(this.flickityInstance=new js(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(event2,target){var productUrl=new URL("".concat(window.location.origin).concat(target.getAttribute("data-product-url")));if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;var modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),productUrl.searchParams.set("view","quick-view"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){modal.querySelector(".modal__inner").innerHTML=content,modal.classList.remove("is-loading");var modalProductSection=new ProductSection(modal.querySelector('[data-section-type="product"]')),doCleanUp=function doCleanUp2(){modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp2)};modal.addEventListener("modal:closed",doCleanUp)})})}},{key:"_addToCart",value:function(event2,target){var _this2=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=target.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){target.removeAttribute("disabled"),response.ok?_this2.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),event2.preventDefault()}}}]),ProductRecommendationsSection2})(),RecentlyViewedProductsSection=(function(){function RecentlyViewedProductsSection2(element){_classCallCheck(this,RecentlyViewedProductsSection2),this.element=element,this.delegateElement=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.currentProductId&&this._saveCurrentProduct(),this.productItemColorSwatch=new ProductItemColorSwatch(this.element),this._fetchProducts(),this._attachListeners()}return _createClass(RecentlyViewedProductsSection2,[{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 items=JSON.parse(localStorage.getItem("recentlyViewedProducts")||"[]"),currentProductId=this.options.currentProductId;items.includes(currentProductId)||items.unshift(currentProductId);try{localStorage.setItem("recentlyViewedProducts",JSON.stringify(items.slice(0,18)))}catch(error){}}},{key:"_fetchProducts",value:function(){var _this=this,queryString=this._getSearchQueryString();if(queryString!==""){var template=window.theme.pageType==="index"?"recently-viewed-products":"static-recently-viewed-products";fetch("".concat(window.routes.searchUrl,"?view=").concat(template,"&type=product&q=").concat(queryString),{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){var tempElement=document.createElement("div");tempElement.innerHTML=content,_this.element.querySelector(".recently-viewed-products-placeholder").innerHTML=tempElement.querySelector('[data-section-type="recently-viewed-products"] .recently-viewed-products-placeholder').innerHTML,_this.element.parentNode.style.display="block",_this.productItemColorSwatch.recalculateSwatches(),Shopify.designMode&&window.SPR&&(window.SPR.initDomEls(),window.SPR.loadBadges()),_this.flickityInstance=new js(_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})})})}}},{key:"_getSearchQueryString",value:function(){var items=JSON.parse(localStorage.getItem("recentlyViewedProducts")||"[]");return items.includes(this.options.currentProductId)&&items.splice(items.indexOf(this.options.currentProductId),1),items.map(function(item){return"id:"+item}).join(" OR ")}},{key:"_openQuickView",value:function(event2,target){var productUrl=new URL("".concat(window.location.origin).concat(target.getAttribute("data-product-url")));if(Responsive.matchesBreakpoint("phone")||Responsive.matchesBreakpoint("tablet"))return window.location.href=productUrl.href,!1;var modal=document.getElementById(target.getAttribute("aria-controls"));modal.classList.add("is-loading"),productUrl.searchParams.set("view","quick-view"),fetch(productUrl.href,{credentials:"same-origin",method:"GET"}).then(function(response){response.text().then(function(content){modal.querySelector(".modal__inner").innerHTML=content,modal.classList.remove("is-loading");var modalProductSection=new ProductSection(modal.querySelector('[data-section-type="product"]')),doCleanUp=function doCleanUp2(){modalProductSection.onUnload(),modal.removeEventListener("modal:closed",doCleanUp2)};modal.addEventListener("modal:closed",doCleanUp)})})}},{key:"_addToCart",value:function(event2,target){var _this2=this;if(window.theme.cartType!=="page"){event2.preventDefault(),event2.stopPropagation(),target.setAttribute("disabled","disabled"),document.dispatchEvent(new CustomEvent("theme:loading:start"));var formElement=target.closest('form[action*="/cart/add"]');fetch("".concat(window.routes.cartAddUrl,".js"),{body:JSON.stringify(Form.serialize(formElement)),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){target.removeAttribute("disabled"),response.ok?_this2.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:null,quantity:parseInt(formElement.querySelector('[name="quantity"]').value)}})):document.dispatchEvent(new CustomEvent("theme:loading:end"))}),event2.preventDefault()}}}]),RecentlyViewedProductsSection2})(),SectionContainer=(function(){function SectionContainer2(){_classCallCheck(this,SectionContainer2),this.constructors=[],this.instances=[],this._attachListeners()}return _createClass(SectionContainer2,[{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(type,constructor){var _this=this;this.constructors[type]=constructor,document.querySelectorAll("[data-section-type=".concat(type,"]")).forEac
22h(function(container){_this._createInstance(container,constructor)})}},{key:"_findInstance",value:function(array,key,value){for(var i=0;i<array.length;i++)if(array[i][key]===value)return array[i]}},{key:"_removeInstance",value:function(array,key,value){for(var i=array.length;i--;)if(array[i][key]===value){array.splice(i,1);break}return array}},{key:"_onSectionLoad",value:function(event2){var container=event2.target.querySelector("[data-section-id]");container&&this._createInstance(container)}},{key:"_onSectionUnload",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&(typeof instance.onUnload=="function"&&instance.onUnload(event2),this.instances=this._removeInstance(this.instances,"id",event2.detail.sectionId))}},{key:"_onSelect",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onSelect=="function"&&instance.onSelect(event2)}},{key:"_onDeselect",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onDeselect=="function"&&instance.onDeselect(event2)}},{key:"_onReorder",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onReorder=="function"&&instance.onReorder(event2)}},{key:"_onBlockSelect",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onBlockSelect=="function"&&instance.onBlockSelect(event2)}},{key:"_onBlockDeselect",value:function(event2){var instance=this._findInstance(this.instances,"id",event2.detail.sectionId);instance&&typeof instance.onBlockDeselect=="function"&&instance.onBlockDeselect(event2)}},{key:"_createInstance",value:function(container,constructor){var id=container.getAttribute("data-section-id"),type=container.getAttribute("data-section-type");if(constructor=constructor||this.constructors[type],typeof constructor!="undefined"){var instance=Object.assign(new constructor(container),{id:id,type:type,container:container});this.instances.push(instance)}}}]),SectionContainer2})(),SlideshowSection=(function(){function SlideshowSection2(element){_classCallCheck(this,SlideshowSection2),this.element=element,this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.flickityInstance=new flickityFade(element.querySelector(".slideshow"),{pageDots:this.options.pageDots,prevNextButtons:this.options.prevNextButtons,wrapAround:!0,dragThreshold:12,draggable:">1",fade:this.options.transitionEffect==="fade",setGallerySize:this.options.setGallerySize,adaptiveHeight:this.options.adaptiveHeight,autoPlay:this.options.autoPlay?this.options.cycleSpeed:!1})}return _createClass(SlideshowSection2,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(event2){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-block-index")),!1,event2.detail.load),this.flickityInstance.pausePlayer())}},{key:"onBlockDeselect",value:function(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}}]),SlideshowSection2})(),TextWithIconsSection=(function(){function TextWithIconsSection2(element){_classCallCheck(this,TextWithIconsSection2),this.flickityInstance=new js(element.querySelector(".text-with-icons"),{pageDots:!0,prevNextButtons:!1,wrapAround:!0,autoPlay:5e3,watchCSS:!0})}return _createClass(TextWithIconsSection2,[{key:"onUnload",value:function(){this.flickityInstance.destroy()}},{key:"onBlockSelect",value:function(event2){this.flickityInstance.isActive&&(this.flickityInstance.selectCell(parseInt(event2.target.getAttribute("data-block-index")),!1,event2.detail.load),this.flickityInstance.pausePlayer())}},{key:"onBlockDeselect",value:function(){this.flickityInstance.isActive&&this.flickityInstance.unpausePlayer()}}]),TextWithIconsSection2})(),VideoSection=(function(){function VideoSection2(element){_classCallCheck(this,VideoSection2),this.element=element,this.domDelegate=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this._attachListeners()}return _createClass(VideoSection2,[{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(event2,target){var iframe=target.querySelector("iframe");
vendor: 5,561 bytes, line 22
22iframe.src=iframe.getAttribute("data-src"),target.classList.add("is-playing")}}]),VideoSection2})(),smoothscroll=createCommonjsModule(function(module,exports){(function(){function polyfill(){var w=window,d=document;if("scrollBehavior"in d.documentElement.style&&w.__forceSmoothScrollPolyfill__!==!0)return;var Element2=w.HTMLElement||w.Element,SCROLL_TIME=468,original={scroll:w.scroll||w.scrollTo,scrollBy:w.scrollBy,elementScroll:Element2.prototype.scroll||scrollElement,scrollIntoView:Element2.prototype.scrollIntoView},now=w.performance&&w.performance.now?w.performance.now.bind(w.performance):Date.now;function isMicrosoftBrowser(userAgent){var userAgentPatterns=["MSIE ","Trident/","Edge/"];return new RegExp(userAgentPatterns.join("|")).test(userAgent)}var ROUNDING_TOLERANCE=isMicrosoftBrowser(w.navigator.userAgent)?1:0;function scrollElement(x,y){this.scrollLeft=x,this.scrollTop=y}function ease(k){return .5*(1-Math.cos(Math.PI*k))}function shouldBailOut(firstArg){if(firstArg===null||_typeof(firstArg)!=="object"||firstArg.behavior===void 0||firstArg.behavior==="auto"||firstArg.behavior==="instant")return!0;if(_typeof(firstArg)==="object"&&firstArg.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+firstArg.behavior+" is not a valid value for enumeration ScrollBehavior.")}function hasScrollableSpace(el,axis){if(axis==="Y")return el.clientHeight+ROUNDING_TOLERANCE<el.scrollHeight;if(axis==="X")return el.clientWidth+ROUNDING_TOLERANCE<el.scrollWidth}function canOverflow(el,axis){var overflowValue=w.getComputedStyle(el,null)["overflow"+axis];return overflowValue==="auto"||overflowValue==="scroll"}function isScrollable(el){var isScrollableY=hasScrollableSpace(el,"Y")&&canOverflow(el,"Y"),isScrollableX=hasScrollableSpace(el,"X")&&canOverflow(el,"X");return isScrollableY||isScrollableX}function findScrollableParent(el){for(;el!==d.body&&isScrollable(el)===!1;)el=el.parentNode||el.host;return el}function step(context){var time=now(),value,currentX,currentY,elapsed=(time-context.startTime)/SCROLL_TIME;elapsed=elapsed>1?1:elapsed,value=ease(elapsed),currentX=context.startX+(context.x-context.startX)*value,currentY=context.startY+(context.y-context.startY)*value,context.method.call(context.scrollable,currentX,currentY),(currentX!==context.x||currentY!==context.y)&&w.requestAnimationFrame(step.bind(w,context))}function smoothScroll(el,x,y){var scrollable,startX,startY,method,startTime=now();el===d.body?(scrollable=w,startX=w.scrollX||w.pageXOffset,startY=w.scrollY||w.pageYOffset,method=original.scroll):(scrollable=el,startX=el.scrollLeft,startY=el.scrollTop,method=scrollElement),step({scrollable:scrollable,method:method,startTime:startTime,startX:startX,startY:startY,x:x,y:y})}w.scroll=w.scrollTo=function(){if(arguments[0]!==void 0){if(shouldBailOut(arguments[0])===!0){original.scroll.call(w,arguments[0].left!==void 0?arguments[0].left:_typeof(arguments[0])!=="object"?arguments[0]:w.scrollX||w.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:w.scrollY||w.pageYOffset);return}smoothScroll.call(w,d.body,arguments[0].left!==void 0?~~arguments[0].left:w.scrollX||w.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:w.scrollY||w.pageYOffset)}},w.scrollBy=function(){if(arguments[0]!==void 0){if(shouldBailOut(arguments[0])){original.scrollBy.call(w,arguments[0].left!==void 0?arguments[0].left:_typeof(arguments[0])!=="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}smoothScroll.call(w,d.body,~~arguments[0].left+(w.scrollX||w.pageXOffset),~~arguments[0].top+(w.scrollY||w.pageYOffset))}},Element2.prototype.scroll=Element2.prototype.scrollTo=function(){if(arguments[0]!==void 0){if(shouldBailOut(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");original.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:_typeof(arguments[0])!=="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}var left=arguments[0].left,top=arguments[0].top;smoothScroll.call(this,this,typeof left=="undefined"?this.scrollLeft:~~left,typeof top=="undefined"?this.scrollTop:~~top)}},Element2.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(shouldBailOut(arguments[0])===!0){original.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},Element2.prototype.scrollIntoView=function(){if(shouldBailOut(arguments[0])===!0){original.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}var scrollableParent=findScrollableParent(this),parentRects=scrollableParent.getBoundingClientRect(),clientRects=this.getBoundingClientRect();scrollableParent!==d.body?(smoothScroll.call(this,scrollableParent,scrollableParent.scrollLeft+clientRects.left-parentRects.left,scrollableParent.scrollTop+clientRects.top-parentRects.top),w.getComputedStyle(scrollableParent).position!=="fixed"&&w.scrollBy({left:parentRects.left,top:parentRects.top,behavior:"smooth"})):w.scrollBy({left:clientRects.left,top:clientRects.top,behavior:"smooth"})}}module.exports={polyfill:polyfill}})()}),smoothscroll_1=smoothscroll.polyfill;
22/*! instant.page v5.1.0 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */var mouseoverTimer,lastTouchTimestamp,prefetches=new Set,prefetchElement=document.createElement("link"),isSupported=prefetchElement.relList&&prefetchElement.relList.supports&&prefetchElement.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,allowQueryString="instantAllowQueryString"in document.body.dataset,allowExternalLinks="instantAllowExternalLinks"in document.body.dataset,useWhitelist="instantWhitelist"in document.body.dataset,mousedownShortcut="instantMousedownShortcut"in document.body.dataset,DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION=1111,delayOnHover=65,useMousedown=!1,useMousedownOnly=!1,useViewport=!1;if("instantIntensity"in document.body.dataset){var intensity=document.body.dataset.instantIntensity;if(intensity.substr(0,9)=="mousedown")useMousedown=!0,intensity=="mousedown-only"&&(useMousedownOnly=!0);else if(intensity.substr(0,8)=="viewport")navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||(intensity=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(useViewport=!0):intensity=="viewport-all"&&(useViewport=!0));else{var milliseconds=parseInt(intensity);isNaN(milliseconds)||(delayOnHover=milliseconds)}}if(isSupported){var eventListenersOptions={capture:!0,passive:!0};if(useMousedownOnly||document.addEventListener("touchstart",touchstartListener,eventListenersOptions),useMousedown?mousedownShortcut||document.addEventListener("mousedown",mousedownListener,eventListenersOptions):document.addEventListener("mouseover",mouseoverListener,eventListenersOptions),mousedownShortcut&&document.addEventListener("mousedown",mousedownShortcutListener,eventListenersOptions),useViewport){var triggeringFunction;window.requestIdleCallback?triggeringFunction=function(callback){requestIdleCallback(callback,{timeout:1500})}:triggeringFunction=function(callback){callback()},triggeringFunction(function(){var intersectionObserver=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){var linkElement=entry.target;intersectionObserver.unobserve(linkElement),preload(linkElement.href)}})});document.querySelectorAll("a").forEach(function(linkElement){isPreloadable(linkElement)&&intersectionObserver.observe(linkElement)})})}}function touchstartListener(event2){lastTouchTimestamp=performance.now();var linkElement=event2.target.closest("a");isPreloadable(linkElement)&&preload(linkElement.href)}function mouseoverListener(event2){if(!(performance.now()-lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION)){var linkElement=event2.target.closest("a");isPreloadable(linkElement)&&(linkElement.addEventListener("mouseout",mouseoutListener,{passive:!0}),mouseoverTimer=setTimeout(function(){preload(linkElement.href),mouseoverTimer=void 0},delayOnHover))}}function mousedownListener(event2){var linkElement=event2.target.closest("a");isPreloadable(linkElement)&&preload(linkElement.href)}function mouseoutListener(event2){event2.relatedTarget&&event2.target.closest("a")==event2.relatedTarget.closest("a")||mouseoverTimer&&(clearTimeout(mouseoverTimer),mouseoverTimer=void 0)}function mousedownShortcutListener(event2){if(!(performance.now()-lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION)){var linkElement=event2.target.closest("a");if(!(event2.which>1||event2.metaKey||event2.ctrlKey)&&linkElement){linkElement.addEventListener("click",function(event3){event3.detail!=1337&&event3.preventDefault()},{capture:!0,passive:!1,once:!0});var customEvent=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});linkElement.dispatchEvent(customEvent)}}}function isPreloadable(linkElement){if(!(!linkElement||!linkElement.href)&&!(useWhitelist&&!("instant"in linkElement.dataset))&&!(!allowExternalLinks&&linkElement.origin!=location.origin&&!("instant"in linkElement.dataset))&&["http:","https:"].includes(linkElement.protocol)&&!(linkElement.protocol=="http:"&&location.protocol=="https:")&&!(!allowQueryString&&linkElement.search&&!("instant"in linkElement.dataset))&&!(linkElement.hash&&linkElement.pathname+linkElement.search==location.pathname+location.search)&&!("noInstant"in linkElement.dataset))return!0}function preload(url){if(!prefetches.has(url)){var prefetcher=document.createElement("link");prefetcher.rel="prefetch",prefetcher.href=url,document.head.appendChild(prefetcher),prefetches.add(url)}}var lazysizes=createCommonjsModule(function(module){(function(window2,factory){var lazySizes=factory(window2,window2.document,Date);window2.lazySizes=lazySizes,module.exports&&(module.exports=lazySizes)})(typeof window!="undefined"?window:{},function(window2,document2,Date2){var lazysizes2,lazySizesCfg;if((function(){var prop,lazySizesDefaults={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};lazySizesCfg=window2.lazySizesConfig||window2.lazysizesConfig||{};for(prop in lazySizesDefaults)prop in lazySizesCfg||(lazySizesCfg[prop]=lazySizesDefaults[prop])})(),!document2||!document2.getElementsByClassName)return{init:function(){},cfg:lazySizesCfg,noSupport:!0};var docElem=document2.documentElement,supportPicture=window2.HTMLPictureElement,_addEventListener="addEventListener",_getAttribute="getAttribute",addEventListener2=window2[_addEventListener].bind(window2),setTimeout2=window2.setTimeout,requestAnimationFrame2=window2.requestAnimationFrame||setTimeout2,requestIdleCallback2=window2.requestIdleCallback,regPicture=/^picture$/i,loadEvents=["load","error","lazyincluded","_lazyloaded"],regClassCache={},forEach=Array.prototype.forEach,hasClass=function(ele,cls){return regClassCache[cls]||(regClassCache[cls]=new RegExp("(\\s|^)"+cls+"(\\s|$)")),regClassCache[cls].test(ele[_getAttribute]("class")||"")&&regClassCache[cls]},addClass=function(ele,cls){hasClass(ele,cls)||ele.setAttribute("class",(ele[_getAttribute]("class")||"").trim()+" "+cls)},removeClass=function(ele,cls){var reg;(reg=hasClass(ele,cls))&&ele.setAttribute("class",(ele[_getAttribute]("class")||"").replace(reg," "))},addRemoveLoadEvents=function addRemoveLoadEvents2(dom,fn,add){var action=add?_addEventListener:"removeEventListener";
22add&&addRemoveLoadEvents2(dom,fn),loadEvents.forEach(function(evt){dom[action](evt,fn)})},triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event2=document2.createEvent("Event");return detail||(detail={}),detail.instance=lazysizes2,event2.initEvent(name,!noBubbles,!noCancelable),event2.detail=detail,elem.dispatchEvent(event2),event2},updatePolyfill=function(el,full){var polyfill;!supportPicture&&(polyfill=window2.picturefill||lazySizesCfg.pf)?(full&&full.src&&!el[_getAttribute]("srcset")&&el.setAttribute("srcset",full.src),polyfill({reevaluate:!0,elements:[el]})):full&&full.src&&(el.src=full.src)},getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]},getWidth=function(elem,parent,width){for(width=width||elem.offsetWidth;width<lazySizesCfg.minSize&&parent&&!elem._lazysizesWidth;)width=parent.offsetWidth,parent=parent.parentNode;return width},rAF=(function(){var running,waiting,firstFns=[],secondFns=[],fns=firstFns,run=function(){var runFns=fns;for(fns=firstFns.length?secondFns:firstFns,running=!0,waiting=!1;runFns.length;)runFns.shift()();running=!1},rafBatch=function(fn,queue){running&&!queue?fn.apply(this,arguments):(fns.push(fn),waiting||(waiting=!0,(document2.hidden?setTimeout2:requestAnimationFrame2)(run)))};return rafBatch._lsFlush=run,rafBatch})(),rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this,args=arguments;rAF(function(){fn.apply(that,args)})}},throttle=function(fn){var running,lastTime=0,gDelay=lazySizesCfg.throttleDelay,rICTimeout=lazySizesCfg.ricTimeout,run=function(){running=!1,lastTime=Date2.now(),fn()},idleCallback=requestIdleCallback2&&rICTimeout>49?function(){requestIdleCallback2(run,{timeout:rICTimeout}),rICTimeout!==lazySizesCfg.ricTimeout&&(rICTimeout=lazySizesCfg.ricTimeout)}:rAFIt(function(){setTimeout2(run)},!0);return function(isPriority){var delay;(isPriority=isPriority===!0)&&(rICTimeout=33),!running&&(running=!0,delay=gDelay-(Date2.now()-lastTime),delay<0&&(delay=0),isPriority||delay<9?idleCallback():setTimeout2(idleCallback,delay))}},debounce=function(func){var timeout,timestamp,wait=99,run=function(){timeout=null,func()},later=function later2(){var last=Date2.now()-timestamp;last<wait?setTimeout2(later2,wait-last):(requestIdleCallback2||run)(run)};return function(){timestamp=Date2.now(),timeout||(timeout=setTimeout2(later,wait))}},loader=(function(){var preloadElems,isCompleted,resetPreloadingTimer,loadMode,started,eLvW,elvH,eLtop,eLleft,eLright,eLbottom,isBodyHidden,regImg=/^img$/i,regIframe=/^iframe$/i,supportScroll="onscroll"in window2&&!/(gle|ing)bot/.test(navigator.userAgent),shrinkExpand=0,currentExpand=0,isLoading=0,lowRuns=-1,resetPreloading=function(e){isLoading--,(!e||isLoading<0||!e.target)&&(isLoading=0)},isVisible=function(elem){return isBodyHidden==null&&(isBodyHidden=getCSS(document2.body,"visibility")=="hidden"),isBodyHidden||!(getCSS(elem.parentNode,"visibility")=="hidden"&&getCSS(elem,"visibility")=="hidden")},isNestedVisible=function(elem,elemExpand){var outerRect,parent=elem,visible=isVisible(elem);for(eLtop-=elemExpand,eLbottom+=elemExpand,eLleft-=elemExpand,eLright+=elemExpand;visible&&(parent=parent.offsetParent)&&parent!=document2.body&&parent!=docElem;)visible=(getCSS(parent,"opacity")||1)>0,visible&&getCSS(parent,"overflow")!="visible"&&(outerRect=parent.getBoundingClientRect(),visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1);return visible},checkElements=function(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal,defaultExpand,preloadExpand,hFac,lazyloadElems=lazysizes2.elements;if((loadMode=lazySizesCfg.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){for(i=0,lowRuns++;i<eLlen;i++)if(!(!lazyloadElems[i]||lazyloadElems[i]._lazyRace)){if(!supportScroll||lazysizes2.prematureUnveil&&lazysizes2.prematureUnveil(lazyloadElems[i])){unveilElement(lazyloadElems[i]);continue}if((!(elemExpandVal=lazyloadElems[i][_getAttribute]("data-expand"))||!(elemExpand=elemExpandVal*1))&&(elemExpand=currentExpand),defaultExpand||(defaultExpand=!lazySizesCfg.expand||lazySizesCfg.expand<1?docElem.clientHeight>500&&docElem.clientWidth>500?500:370:lazySizesCfg.expand,lazysizes2._defEx=defaultExpand,preloadExpand=defaultExpand*lazySizesCfg.expFactor,hFac=lazySizesCfg.hFac,isBodyHidden=null,currentExpand<preloadExpand&&isLoading<1&&lowRuns>2&&loadMode>2&&!document2.hidden?(currentExpand=preloadExpand,lowRuns=0):loadMode>1&&lowRuns>1&&isLoading<6?currentExpand=defaultExpand:currentExpand=shrinkExpand),beforeE
22xpandVal!==elemExpand&&(eLvW=innerWidth+elemExpand*hFac,elvH=innerHeight+elemExpand,elemNegativeExpand=elemExpand*-1,beforeExpandVal=elemExpand),rect=lazyloadElems[i].getBoundingClientRect(),(eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(lazySizesCfg.loadHidden||isVisible(lazyloadElems[i]))&&(isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4)||isNestedVisible(lazyloadElems[i],elemExpand))){if(unveilElement(lazyloadElems[i]),loadedSomething=!0,isLoading>9)break}else!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&loadMode>2&&(preloadElems[0]||lazySizesCfg.preloadAfterLoad)&&(preloadElems[0]||!elemExpandVal&&(eLbottom||eLright||eLleft||eLtop||lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr)!="auto"))&&(autoLoadElem=preloadElems[0]||lazyloadElems[i])}autoLoadElem&&!loadedSomething&&unveilElement(autoLoadElem)}},throttledCheckElements=throttle(checkElements),switchLoadingClass=function(e){var elem=e.target;if(elem._lazyCache){delete elem._lazyCache;return}resetPreloading(e),addClass(elem,lazySizesCfg.loadedClass),removeClass(elem,lazySizesCfg.loadingClass),addRemoveLoadEvents(elem,rafSwitchLoadingClass),triggerEvent(elem,"lazyloaded")},rafedSwitchLoadingClass=rAFIt(switchLoadingClass),rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})},changeIframeSrc=function(elem,src){try{elem.contentWindow.location.replace(src)}catch(e){elem.src=src}},handleSources=function(source){var customMedia,sourceSrcset=source[_getAttribute](lazySizesCfg.srcsetAttr);(customMedia=lazySizesCfg.customMedia[source[_getAttribute]("data-media")||source[_getAttribute]("media")])&&source.setAttribute("media",customMedia),sourceSrcset&&source.setAttribute("srcset",sourceSrcset)},lazyUnveil=rAFIt(function(elem,detail,isAuto,sizes,isImg){var src,srcset,parent,isPicture,event2,firesLoad;(event2=triggerEvent(elem,"lazybeforeunveil",detail)).defaultPrevented||(sizes&&(isAuto?addClass(elem,lazySizesCfg.autosizesClass):elem.setAttribute("sizes",sizes)),srcset=elem[_getAttribute](lazySizesCfg.srcsetAttr),src=elem[_getAttribute](lazySizesCfg.srcAttr),isImg&&(parent=elem.parentNode,isPicture=parent&&regPicture.test(parent.nodeName||"")),firesLoad=detail.firesLoad||"src"in elem&&(srcset||src||isPicture),event2={target:elem},addClass(elem,lazySizesCfg.loadingClass),firesLoad&&(clearTimeout(resetPreloadingTimer),resetPreloadingTimer=setTimeout2(resetPreloading,2500),addRemoveLoadEvents(elem,rafSwitchLoadingClass,!0)),isPicture&&forEach.call(parent.getElementsByTagName("source"),handleSources),srcset?elem.setAttribute("srcset",srcset):src&&!isPicture&&(regIframe.test(elem.nodeName)?changeIframeSrc(elem,src):elem.src=src),isImg&&(srcset||isPicture)&&updatePolyfill(elem,{src:src})),elem._lazyRace&&delete elem._lazyRace,removeClass(elem,lazySizesCfg.lazyClass),rAF(function(){var isLoaded=elem.complete&&elem.naturalWidth>1;(!firesLoad||isLoaded)&&(isLoaded&&addClass(elem,"ls-is-cached"),switchLoadingClass(event2),elem._lazyCache=!0,setTimeout2(function(){"_lazyCache"in elem&&delete elem._lazyCache},9)),elem.loading=="lazy"&&isLoading--},!0)}),unveilElement=function(elem){if(!elem._lazyRace){var detail,isImg=regImg.test(elem.nodeName),sizes=isImg&&(elem[_getAttribute](lazySizesCfg.sizesAttr)||elem[_getAttribute]("sizes")),isAuto=sizes=="auto";(isAuto||!isCompleted)&&isImg&&(elem[_getAttribute]("src")||elem.srcset)&&!elem.complete&&!hasClass(elem,lazySizesCfg.errorClass)&&hasClass(elem,lazySizesCfg.lazyClass)||(detail=triggerEvent(elem,"lazyunveilread").detail,isAuto&&autoSizer.updateElem(elem,!0,elem.offsetWidth),elem._lazyRace=!0,isLoading++,lazyUnveil(elem,detail,isAuto,sizes,isImg))}},afterScroll=debounce(function(){lazySizesCfg.loadMode=3,throttledCheckElements()}),altLoadmodeScrollListner=function(){lazySizesCfg.loadMode==3&&(lazySizesCfg.loadMode=2),afterScroll()},onload=function onload2(){if(!isCompleted){if(Date2.now()-started<999){setTimeout2(onload2,999);return}isCompleted=!0,lazySizesCfg.loadMode=3,throttledCheckElements(),addEventListener2("scroll",altLoadmodeScrollListner,!0)}};return{_:function(){started=Date2.now(),lazysizes2.elements=document2.getElementsByClassName(lazySizesCfg.lazyClass),preloadElems=document2.getElementsByClassName(lazySizesCfg.lazyClass+" "+lazySizesCfg.preloadClass),addEventListener2("scroll",throttledCheckElements,!0),addEventListener2("resize",throttledCheckElements,!0),addEventListener2("pageshow",function(e){if(e.persisted){var loadingElements=document2.querySelectorAll("."+lazySizesCfg.loadingClass);
22loadingElements.length&&loadingElements.forEach&&requestAnimationFrame2(function(){loadingElements.forEach(function(img){img.complete&&unveilElement(img)})})}}),window2.MutationObserver?new MutationObserver(throttledCheckElements).observe(docElem,{childList:!0,subtree:!0,attributes:!0}):(docElem[_addEventListener]("DOMNodeInserted",throttledCheckElements,!0),docElem[_addEventListener]("DOMAttrModified",throttledCheckElements,!0),setInterval(throttledCheckElements,999)),addEventListener2("hashchange",throttledCheckElements,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(name){document2[_addEventListener](name,throttledCheckElements,!0)}),/d$|^c/.test(document2.readyState)?onload():(addEventListener2("load",onload),document2[_addEventListener]("DOMContentLoaded",throttledCheckElements),setTimeout2(onload,2e4)),lazysizes2.elements.length?(checkElements(),rAF._lsFlush()):throttledCheckElements()},checkElems:throttledCheckElements,unveil:unveilElement,_aLSL:altLoadmodeScrollListner}})(),autoSizer=(function(){var autosizesElems,sizeElement=rAFIt(function(elem,parent,event2,width){var sources,i,len;if(elem._lazysizesWidth=width,width+="px",elem.setAttribute("sizes",width),regPicture.test(parent.nodeName||""))for(sources=parent.getElementsByTagName("source"),i=0,len=sources.length;i<len;i++)sources[i].setAttribute("sizes",width);event2.detail.dataAttr||updatePolyfill(elem,event2.detail)}),getSizeElement=function(elem,dataAttr,width){var event2,parent=elem.parentNode;parent&&(width=getWidth(elem,parent,width),event2=triggerEvent(elem,"lazybeforesizes",{width:width,dataAttr:!!dataAttr}),event2.defaultPrevented||(width=event2.detail.width,width&&width!==elem._lazysizesWidth&&sizeElement(elem,parent,event2,width)))},updateElementsSizes=function(){var i,len=autosizesElems.length;if(len)for(i=0;i<len;i++)getSizeElement(autosizesElems[i])},debouncedUpdateElementsSizes=debounce(updateElementsSizes);return{_:function(){autosizesElems=document2.getElementsByClassName(lazySizesCfg.autosizesClass),addEventListener2("resize",debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes,updateElem:getSizeElement}})(),init=function init2(){!init2.i&&document2.getElementsByClassName&&(init2.i=!0,autoSizer._(),loader._())};return setTimeout2(function(){lazySizesCfg.init&&init()}),lazysizes2={cfg:lazySizesCfg,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF},lazysizes2})}),ls_rias=createCommonjsModule(function(module){(function(window2,factory){var globalInstall=function globalInstall2(){factory(window2.lazySizes),window2.removeEventListener("lazyunveilread",globalInstall2,!0)};factory=factory.bind(null,window2,window2.document),module.exports?factory(lazysizes):window2.lazySizes?globalInstall():window2.addEventListener("lazyunveilread",globalInstall,!0)})(window,function(window2,document2,lazySizes){var config,riasCfg,lazySizesCfg=lazySizes.cfg,replaceTypes={string:1,number:1},regNumber=/^\-*\+*\d+\.*\d*$/,regPicture=/^picture$/i,regWidth=/\s*\{\s*width\s*\}\s*/i,regHeight=/\s*\{\s*height\s*\}\s*/i,regPlaceholder=/\s*\{\s*([a-z0-9]+)\s*\}\s*/ig,regObj=/^\[.*\]|\{.*\}$/,regAllowedSizes=/^(?:auto|\d+(px)?)$/,anchor=document2.createElement("a"),img=document2.createElement("img"),buggySizes="srcset"in img&&!("sizes"in img),supportPicture=!!window2.HTMLPictureElement&&!buggySizes;(function(){var prop,noop=function(){},riasDefaults={prefix:"",postfix:"",srcAttr:"data-src",absUrl:!1,modifyOptions:noop,widthmap:{},ratio:!1,traditionalRatio:!1,aspectratio:!1};
22config=lazySizes&&lazySizes.cfg,config.supportsType||(config.supportsType=function(type){return!type}),config.rias||(config.rias={}),riasCfg=config.rias,"widths"in riasCfg||(riasCfg.widths=[],(function(widths){for(var width,i=0;!width||width<3e3;)i+=5,i>30&&(i+=1),width=36*i,widths.push(width)})(riasCfg.widths));for(prop in riasDefaults)prop in riasCfg||(riasCfg[prop]=riasDefaults[prop])})();function getElementOptions(elem,src){var attr,parent,setOption,options,elemStyles=window2.getComputedStyle(elem);parent=elem.parentNode,options={isPicture:!!(parent&&regPicture.test(parent.nodeName||""))},setOption=function(attr2,run){var attrVal=elem.getAttribute("data-"+attr2);if(!attrVal){var styles=elemStyles.getPropertyValue("--ls-"+attr2);styles&&(attrVal=styles.trim())}if(attrVal){if(attrVal=="true")attrVal=!0;else if(attrVal=="false")attrVal=!1;else if(regNumber.test(attrVal))attrVal=parseFloat(attrVal);else if(typeof riasCfg[attr2]=="function")attrVal=riasCfg[attr2](elem,attrVal);else if(regObj.test(attrVal))try{attrVal=JSON.parse(attrVal)}catch(e){}options[attr2]=attrVal}else attr2 in riasCfg&&typeof riasCfg[attr2]!="function"?options[attr2]=riasCfg[attr2]:run&&typeof riasCfg[attr2]=="function"&&(options[attr2]=riasCfg[attr2](elem,attrVal))};for(attr in riasCfg)setOption(attr);return src.replace(regPlaceholder,function(full,match){match in options||setOption(match,!0)}),options}function replaceUrlProps(url,options){var candidates=[],replaceFn=function(full,match){return replaceTypes[_typeof(options[match])]?options[match]:full};return candidates.srcset=[],options.absUrl&&(anchor.setAttribute("href",url),url=anchor.href),url=((options.prefix||"")+url+(options.postfix||"")).replace(regPlaceholder,replaceFn),options.widths.forEach(function(width){var widthAlias=options.widthmap[width]||width,ratio=options.aspectratio||options.ratio,traditionalRatio=!options.aspectratio&&riasCfg.traditionalRatio,candidate={u:url.replace(regWidth,widthAlias).replace(regHeight,ratio?Math.round(traditionalRatio?width*ratio:width/ratio):""),w:width};candidates.push(candidate),candidates.srcset.push(candidate.c=candidate.u+" "+width+"w")}),candidates}function setSrc(src,opts,elem){var elemW=0,elemH=0,sizeElement=elem;if(src){if(opts.ratio==="container"){for(elemW=sizeElement.scrollWidth,elemH=sizeElement.scrollHeight;(!elemW||!elemH)&&sizeElement!==document2;)sizeElement=sizeElement.parentNode,elemW=sizeElement.scrollWidth,elemH=sizeElement.scrollHeight;elemW&&elemH&&(opts.ratio=opts.traditionalRatio?elemH/elemW:elemW/elemH)}src=replaceUrlProps(src,opts),src.isPicture=opts.isPicture,buggySizes&&elem.nodeName.toUpperCase()=="IMG"?elem.removeAttribute(config.srcsetAttr):elem.setAttribute(config.srcsetAttr,src.srcset.join(", ")),Object.defineProperty(elem,"_lazyrias",{value:src,writable:!0})}}function createAttrObject(elem,src){var opts=getElementOptions(elem,src);return riasCfg.modifyOptions.call(elem,{target:elem,details:opts,detail:opts}),lazySizes.fire(elem,"lazyriasmodifyoptions",opts),opts}function getSrc(elem){return elem.getAttribute(elem.getAttribute("data-srcattr")||riasCfg.srcAttr)||elem.getAttribute(config.srcsetAttr)||elem.getAttribute(config.srcAttr)||elem.getAttribute("data-pfsrcset")||""}addEventListener("lazybeforesizes",function(e){if(e.detail.instance==lazySizes){var elem,src,elemOpts,parent,sources,i,len,sourceSrc,sizes,detail,hasPlaceholder,modified,emptyList;if(elem=e.target,!(!e.detail.dataAttr||e.defaultPrevented||riasCfg.disabled||!((sizes=elem.getAttribute(config.sizesAttr)||elem.getAttribute("sizes"))&&regAllowedSizes.test(sizes)))){if(src=getSrc(elem),elemOpts=createAttrObject(elem,src),hasPlaceholder=regWidth.test(elemOpts.prefix)||regWidth.test(elemOpts.postfix),elemOpts.isPicture&&(parent=elem.parentNode))for(sources=parent.getElementsByTagName("source"),i=0,len=sources.length;i<len;i++)(hasPlaceholder||regWidth.test(sourceSrc=getSrc(sources[i])))&&(setSrc(sourceSrc,elemOpts,sources[i]),modified=!0);hasPlaceholder||regWidth.test(src)?(setSrc(src,elemOpts,elem),modified=!0):modified&&(emptyList=[],emptyList.srcset=[],emptyList.isPicture=!0,Object.defineProperty(elem,"_lazyrias",{value:emptyList,writable:!0})),modified&&(supportPicture?elem.removeAttribute(config.srcAttr):sizes!="auto"&&(detail={width:parseInt(sizes,10)}
22,polyfill({target:elem,detail:detail})))}}},!0);var polyfill=(function(){var ascendingSort=function(a,b){return a.w-b.w},reduceCandidate=function(srces){var lowerCandidate,bonusFactor,len=srces.length,candidate=srces[len-1],i=0;for(i;i<len;i++)if(candidate=srces[i],candidate.d=candidate.w/srces.w,candidate.d>=srces.d){!candidate.cached&&(lowerCandidate=srces[i-1])&&lowerCandidate.d>srces.d-.13*Math.pow(srces.d,2.2)&&(bonusFactor=Math.pow(lowerCandidate.d-.6,1.6),lowerCandidate.cached&&(lowerCandidate.d+=.15*bonusFactor),lowerCandidate.d+(candidate.d-srces.d)*bonusFactor>srces.d&&(candidate=lowerCandidate));break}return candidate},getWSet=function(elem,testPicture){var src;return!elem._lazyrias&&lazySizes.pWS&&(src=lazySizes.pWS(elem.getAttribute(config.srcsetAttr||""))).length&&(Object.defineProperty(elem,"_lazyrias",{value:src,writable:!0}),testPicture&&elem.parentNode&&(src.isPicture=elem.parentNode.nodeName.toUpperCase()=="PICTURE")),elem._lazyrias},getX=function(elem){var dpr=window2.devicePixelRatio||1,optimum=lazySizes.getX&&lazySizes.getX(elem);return Math.min(optimum||dpr,2.4,dpr)},getCandidate=function(elem,width){var sources,i,len,media,srces,src;if(srces=elem._lazyrias,srces.isPicture&&window2.matchMedia){for(i=0,sources=elem.parentNode.getElementsByTagName("source"),len=sources.length;i<len;i++)if(getWSet(sources[i])&&!sources[i].getAttribute("type")&&(!(media=sources[i].getAttribute("media"))||(matchMedia(media)||{}).matches)){srces=sources[i]._lazyrias;break}}return(!srces.w||srces.w<width)&&(srces.w=width,srces.d=getX(elem),src=reduceCandidate(srces.sort(ascendingSort))),src},_polyfill=function(e){if(e.detail.instance==lazySizes){var candidate,elem=e.target;if(!buggySizes&&(window2.respimage||window2.picturefill||lazySizesCfg.pf)){document2.removeEventListener("lazybeforesizes",_polyfill);return}!("_lazyrias"in elem)&&(!e.detail.dataAttr||!getWSet(elem,!0))||(candidate=getCandidate(elem,e.detail.width),candidate&&candidate.u&&elem._lazyrias.cur!=candidate.u&&(elem._lazyrias.cur=candidate.u,candidate.cached=!0,lazySizes.rAF(function(){elem.setAttribute(config.srcAttr,candidate.u),elem.setAttribute("src",candidate.u)})))}};return supportPicture?_polyfill=function(){}:addEventListener("lazybeforesizes",_polyfill),_polyfill})()})}),ls_unveilhooks=createCommonjsModule(function(module){(function(window2,factory){var globalInstall=function globalInstall2(){factory(window2.lazySizes),window2.removeEventListener("lazyunveilread",globalInstall2,!0)};factory=factory.bind(null,window2,window2.document),module.exports?factory(lazysizes):window2.lazySizes?globalInstall():window2.addEventListener("lazyunveilread",globalInstall,!0)})(window,function(window2,document2,lazySizes){var bgLoad,regBgUrlEscape,uniqueUrls={};document2.addEventListener&&(regBgUrlEscape=/\(|\)|\s|'/,bgLoad=function(url,cb){var img=document2.createElement("img");img.onload=function(){img.onload=null,img.onerror=null,img=null,cb()},img.onerror=img.onload,img.src=url,img&&img.complete&&img.onload&&img.onload()},addEventListener("lazybeforeunveil",function(e){if(e.detail.instance==lazySizes){var tmp,load,bg,poster;if(!e.defaultPrevented){var target=e.target;if(target.preload=="none"&&(target.preload=target.getAttribute("data-preload")||"auto"),target.getAttribute("data-autoplay")!=null)if(target.getAttribute("data-expand")&&!target.autoplay)try{target.play()}catch(er){}else requestAnimationFrame(function(){target.setAttribute("data-expand","-10"),lazySizes.aC(target,lazySizes.cfg.lazyClass)});tmp=target.getAttribute("data-link"),tmp&&addStyleScript(tmp,!0),tmp=target.getAttribute("data-script"),tmp&&addStyleScript(tmp),tmp=target.getAttribute("data-require"),tmp&&(lazySizes.cfg.requireJs?lazySizes.cfg.requireJs([tmp]):addStyleScript(tmp)),bg=target.getAttribute("data-bg"),bg&&(e.detail.firesLoad=!0,load=function(){target.style.backgroundImage="url("+(regBgUrlEscape.test(bg)?JSON.stringify(bg):bg)+")",e.detail.firesLoad=!1,lazySizes.fire(target,"_lazyloaded",{},!0,!0)},bgLoad(bg,load)),poster=target.getAttribute("data-poster"),poster&&(e.detail.firesLoad=!0,load=function(){target.poster=poster,e.detail.firesLoad=!1,lazySizes.fire(target,"_lazyloaded",{},!0,!0)},bgLoad(poster,load))}}},!1));function addStyleScript(src,style){if(!uniqueUrls[src]){var elem=document2.createElement(style?"link":"script"),insertElem=document2.getElementsByTagName("script")[0];style?(elem.rel="stylesheet",elem.href=src):elem.src=src,uniqueUrls[src]=!0,uniqueUrls[elem.src||elem.href]=!0,insertElem.parentNode.insertBefore(elem,insertElem)}}})}),ls_bgset=createCommonjsModule(function(module){(function(window2,factory){var globalInstall=function globalInstall2(){factory(window2.lazySizes),window2.removeEventListener("lazyunveilread",globalInstall2,!0)};factory=factory.bind(null,window2,window2.document),module.exports?factory(lazysizes):window2.lazySizes?globalInstall():window2.addEventListener("lazyunveilread",globalInstall,!0)})(window,function(window2,document2,lazySizes){if(window2.addEventListener){var lazySizesCfg=lazySizes.cfg,regWhite=/\s+/g,regSplitSet=/\s*\|\s+|\s+\|\s*/g,regSource=/^(.+?)(?:\s+\[\s*(.+?)\s*\])(?:\s+\[\s*(.+?)\s*\])?$/,regType=/^\s*\(*\s*type\s*:\s*(.+?)\s*\)*\s*$/,regBgUrlEscape=/\(|\)|'/,allowedBackgroun
22dSize={contain:1,cover:1},proxyWidth=function(elem){var width=lazySizes.gW(elem,elem.parentNode);return(!elem._lazysizesWidth||width>elem._lazysizesWidth)&&(elem._lazysizesWidth=width),elem._lazysizesWidth},getBgSize=function(elem){var bgSize;return bgSize=(getComputedStyle(elem)||{getPropertyValue:function(){}}).getPropertyValue("background-size"),!allowedBackgroundSize[bgSize]&&allowedBackgroundSize[elem.style.backgroundSize]&&(bgSize=elem.style.backgroundSize),bgSize},setTypeOrMedia=function(source,match){if(match){var typeMatch=match.match(regType);typeMatch&&typeMatch[1]?source.setAttribute("type",typeMatch[1]):source.setAttribute("media",lazySizesCfg.customMedia[match]||match)}},createPicture=function(sets,elem,img){var picture=document2.createElement("picture"),sizes=elem.getAttribute(lazySizesCfg.sizesAttr),ratio=elem.getAttribute("data-ratio"),optimumx=elem.getAttribute("data-optimumx");elem._lazybgset&&elem._lazybgset.parentNode==elem&&elem.removeChild(elem._lazybgset),Object.defineProperty(img,"_lazybgset",{value:elem,writable:!0}),Object.defineProperty(elem,"_lazybgset",{value:picture,writable:!0}),sets=sets.replace(regWhite," ").split(regSplitSet),picture.style.display="none",img.className=lazySizesCfg.lazyClass,sets.length==1&&!sizes&&(sizes="auto"),sets.forEach(function(set){var match,source=document2.createElement("source");sizes&&sizes!="auto"&&source.setAttribute("sizes",sizes),(match=set.match(regSource))?(source.setAttribute(lazySizesCfg.srcsetAttr,match[1]),setTypeOrMedia(source,match[2]),setTypeOrMedia(source,match[3])):source.setAttribute(lazySizesCfg.srcsetAttr,set),picture.appendChild(source)}),sizes&&(img.setAttribute(lazySizesCfg.sizesAttr,sizes),elem.removeAttribute(lazySizesCfg.sizesAttr),elem.removeAttribute("sizes")),optimumx&&img.setAttribute("data-optimumx",optimumx),ratio&&img.setAttribute("data-ratio",ratio),picture.appendChild(img),elem.appendChild(picture)},proxyLoad=function(e){if(e.target._lazybgset){var image=e.target,elem=image._lazybgset,bg=image.currentSrc||image.src;if(bg){var event2=lazySizes.fire(elem,"bgsetproxy",{src:bg,useSrc:regBgUrlEscape.test(bg)?JSON.stringify(bg):bg});event2.defaultPrevented||(elem.style.backgroundImage="url("+event2.detail.useSrc+")")}image._lazybgsetLoading&&(lazySizes.fire(elem,"_lazyloaded",{},!1,!0),delete image._lazybgsetLoading)}};addEventListener("lazybeforeunveil",function(e){var set,image,elem;e.defaultPrevented||!(set=e.target.getAttribute("data-bgset"))||(elem=e.target,image=document2.createElement("img"),image.alt="",image._lazybgsetLoading=!0,e.detail.firesLoad=!0,createPicture(set,elem,image),setTimeout(function(){lazySizes.loader.unveil(image),lazySizes.rAF(function(){lazySizes.fire(image,"_lazyloaded",{},!0,!0),image.complete&&proxyLoad({target:image})})}))}),document2.addEventListener("load",proxyLoad,!0),window2.addEventListener("lazybeforesizes",function(e){if(e.detail.instance==lazySizes&&e.target._lazybgset&&e.detail.dataAttr){var elem=e.target._lazybgset,bgSize=getBgSize(elem);allowedBackgroundSize[bgSize]&&(e.target._lazysizesParentFit=bgSize,lazySizes.rAF(function(){e.target.setAttribute("data-parent-fit",bgSize),e.target._lazysizesParentFit&&delete e.target._lazysizesParentFit}))}},!0),document2.documentElement.addEventListener("lazybeforesizes",function(e){e.defaultPrevented||!e.target._lazybgset||e.detail.instance!=lazySizes||(e.detail.width=proxyWidth(e.target._lazybgset))})}})}),ls_optimumx=createCommonjsModule(function(module){(function(window2,factory){if(window2){var globalInstall=function globalInstall2(){factory(window2.lazySizes),window2.removeEventListener("lazyunveilread",globalInstall2,!0)};factory=factory.bind(null,window2,window2.document),module.exports?factory(lazysizes):window2.lazySizes?globalInstall():window2.addEventListener("lazyunveilread",globalInstall,!0)}})(typeof window!="undefined"?window:0,function(window2,document2,lazySizes){if(window2.addEventListener){var config,regPicture=/^picture$/i,docElem=document2.documentElement,parseWsrcset=(function(){var candidates,reg=/(([^,\s].[^\s]+)\s+(\d+)(w|h)(\s+(\d+)(w|h))?)/g,addCandidate=function(match,candidate,url,descNumber1,descType1,fullDesc,descNumber2,descType2){candidates.push({c:candidate,u:url,w:(descType2=="w"?descNumber2:descNumber1)*1})};return function(input){return candidates=[],input.replace(reg,addCandidate),candidates}})(),parseImg=(function(){var ascendingSort=function(a,b){return a.w-b.w},parseSets=function(elem,dataName){var lazyData={srcset:elem.getAttribute(lazySizes.cfg.srcsetAttr)||""},cands=parseWsrcset(lazyData.srcset);return Object.defineProperty(elem,dataName,{value:lazyData,writable:!0}),lazyData.cands=cands,lazyData.index=0,lazyData.dirty=!1,cands[0]&&cands[0].w?(cands.sort(ascendingSort),lazyData.cSrcset=[cands[lazyData.index].c]):(lazyData.cSrcset=lazyData.srcset?[lazyData.srcset]:[],lazyData.cands=[]),lazyData};return function(elem,dataName){var sources,i,len,parent;if(!elem[dataName]&&(parent=elem.parentNode||{},elem[dataName]=parseSets(elem,dataName),elem[dataName].isImg=!0,regPicture.test(parent.nodeName||"")))for(elem[dataName].picture=!0,sources=parent.getElementsByTagName("source"),i=0,len=sources.length;i<len;i++)parseSets(sources[i],dataName).isImg=!1;return elem[dataName]}})(),constraintFns={_lazyOptimumx:(function(){var takeHighRes=function(lowerCandidate,higherCandidateResolution,optimumx){var low,bonusFactor,substract;return!lowerCandidate||!lowerCandidate.d?!0:(substract=optimumx>.7?.6:.4,lowerCandidate.d>=optimumx?!1:(bonusFactor=Math.pow(lowerCandidate.d-substract,1.6)||.1,bonusFactor<.1?bonusFactor=.1:bonusFactor>3&&(bonusFactor=3),low=lowerCandidate.d+(higherCandidateResolution-optimumx)*bonusFactor,low<optimumx))};return function(data,width,optimumx){var i,can;for(i=0;i<data.cands.length;i++)if(can=data.cands[i],can.d=(can.w||1)/width,!(data.index>=i))if(can.d<=optimumx||takeHighRes(data.cands[i-1],can.d,optimumx))data.cSrcset.push(can.c),data.index=i;else break}})()},constrainSets=(function(){var constrainSet=function(elem,displayWidth,optimumx,attr,dataName){var curIndex,lazyData=elem[dataName];lazyData&&(curIndex=lazyData.index,constraintFns[dataName](lazyData,displayWidth,optimumx),(!lazyData.dirty||curIndex!=lazyData.index)&&(lazyData.cSrcset.join(", "),elem.setAttribute(attr,lazy
22Data.cSrcset.join(", ")),lazyData.dirty=!0))};return function(image,displayWidth,optimumx,attr,dataName){var sources,parent,len,i,lazyData=image[dataName];if(lazyData.width=displayWidth,lazyData.picture&&(parent=image.parentNode))for(sources=parent.getElementsByTagName("source"),i=0,len=sources.length;i<len;i++)constrainSet(sources[i],displayWidth,optimumx,attr,dataName);constrainSet(image,displayWidth,optimumx,attr,dataName)}})(),getOptimumX=function(element){var optimumx=element.getAttribute("data-optimumx")||element.getAttribute("data-maxdpr");return!optimumx&&config.constrainPixelDensity&&(optimumx="auto"),optimumx&&(optimumx=="auto"?optimumx=config.getOptimumX(element):optimumx=parseFloat(optimumx,10)),optimumx},extentLazySizes=function extentLazySizes2(){lazySizes&&!lazySizes.getOptimumX&&(lazySizes.getX=getOptimumX,lazySizes.pWS=parseWsrcset,docElem.removeEventListener("lazybeforeunveil",extentLazySizes2))};docElem.addEventListener("lazybeforeunveil",extentLazySizes),setTimeout(extentLazySizes),config=lazySizes&&lazySizes.cfg,typeof config.getOptimumX!="function"&&(config.getOptimumX=function(){var dpr=window2.devicePixelRatio||1;return dpr>2.6?dpr*=.6:dpr>1.9?dpr*=.8:dpr-=.01,Math.min(Math.round(dpr*100)/100,2)}),window2.devicePixelRatio&&addEventListener("lazybeforesizes",function(e){if(e.detail.instance==lazySizes){var optimumx,lazyData,width,attr,elem=e.target,detail=e.detail,dataAttr=detail.dataAttr;e.defaultPrevented||!(optimumx=getOptimumX(elem))||optimumx>=devicePixelRatio||(dataAttr&&elem._lazyOptimumx&&!detail.reloaded&&(!config.unloadedClass||!lazySizes.hC(elem,config.unloadedClass))&&(elem._lazyOptimumx=null),lazyData=parseImg(elem,"_lazyOptimumx"),width=detail.width,width&&(lazyData.width||0)<width&&(attr=dataAttr?lazySizes.cfg.srcsetAttr:"srcset",lazySizes.rAF(function(){constrainSets(elem,width,optimumx,attr,"_lazyOptimumx")})))}})}})}),ls_respimg=createCommonjsModule(function(module){(function(window2,factory){if(window2){var globalInstall=function globalInstall2(){factory(window2.lazySizes),window2.removeEventListener("lazyunveilread",globalInstall2,!0)};factory=factory.bind(null,window2,window2.document),module.exports?factory(lazysizes):window2.lazySizes?globalInstall():window2.addEventListener("lazyunveilread",globalInstall,!0)}})(typeof window!="undefined"?window:0,function(window2,document2,lazySizes){var polyfill,lazySizesCfg=lazySizes.cfg,img=document2.createElement("img"),supportSrcset="sizes"in img&&"srcset"in img,regHDesc=/\s+\d+h/g,fixEdgeHDescriptor=(function(){var regDescriptors=/\s+(\d+)(w|h)\s+(\d+)(w|h)/,forEach=Array.prototype.forEach;return function(){var img2=document2.createElement("img"),removeHDescriptors=function(source){var ratio,match,srcset=source.getAttribute(lazySizesCfg.srcsetAttr);srcset&&(match=srcset.match(regDescriptors))&&(match[2]=="w"?ratio=match[1]/match[3]:ratio=match[3]/match[1],ratio&&source.setAttribute("data-aspectratio",ratio),source.setAttribute(lazySizesCfg.srcsetAttr,srcset.replace(regHDesc,"")))},handler=function(e){if(e.detail.instance==lazySizes){var picture=e.target.parentNode;picture&&picture.nodeName=="PICTURE"&&forEach.call(picture.getElementsByTagName("source"),removeHDescriptors),removeHDescriptors(e.target)}},test=function(){img2.currentSrc&&document2.removeEventListener("lazybeforeunveil",handler)};document2.addEventListener("lazybeforeunveil",handler),img2.onload=test,img2.onerror=test,img2.srcset="data:,a 1w 1h",img2.complete&&test()}})();if(lazySizesCfg.supportsType||(lazySizesCfg.supportsType=function(type){return!type}),window2.HTMLPictureElement&&supportSrcset){!lazySizes.hasHDescriptorFix&&document2.msElementsFromPoint&&(lazySizes.hasHDescriptorFix=!0,fixEdgeHDescriptor());return}window2.picturefill||lazySizesCfg.pf||(lazySizesCfg.pf=function(options){var i,len;if(!window2.picturefill)for(i=0,len=options.elements.length;i<len;i++)polyfill(options.elements[i])},polyfill=(function(){var ascendingSort=function(a,b){return a.w-b.w},regPxLength=/^\s*\d+\.*\d*px\s*$/,reduceCandidate=function(srces){var lowerCandidate,bonusFactor,len=srces.length,candidate=srces[len-1],i=0;for(i;i<len;i++)if(candidate=srces[i],candidate.d=candidate.w/srces.w,candidate.d>=srces.d){!candidate.cached&&(lowerCandidate=srces[i-1])&&lowerCandidate.d>srces.d-.13*Math.pow(srces.d,2.2)&&(bonusFactor=Math.pow(lowerCandidate.d-.6,1.6),lowerCandidate.cached&&(lowerCandidate.d+=.15*bonusFactor),lowerCandidate.d+(candidate.d-srces.d)*bonusFactor>srces.d&&(candidate=lowerCandidate));break}return candidate},parseWsrcset=(function(){var candidates,regWCandidates=/(([^,\s].[^\s]+)\s+(\d+)w)/g,regMultiple=/\s/,addCandidate=function(match,candidate,url,wDescriptor){candidates.push({c:candidate,u:url,w:wDescriptor*1})};return function(input){return candidates=[],input=input.trim(),input.replace(regHDesc,"").replace(regWCandidates,addCandidate),!candidates.length&&input&&!regMultiple.test(input)&&candidates.push({c:input,u:input,w:99}),candidates}})(),runMatchMedia=function runMatchMedia2(){runMatchMedia2.init||(runMatchMedia2.init=!0,addEventListener("resize",(function(){var timer,matchMediaElems=document2.getElementsByClassName("lazymatchmedia"),run=function(){var i,len;for(i=0,len=matchMediaElems.length;i<len;i++)polyfill(matchMediaElems[i])};return function(){clearTimeout(timer),timer=setTimeout(run,66)}})()))},createSrcset=function(elem,isImage){var parsedSet,srcSet=elem.getAttribute("srcset")||elem.getAttribute(lazySizesCfg.srcsetAttr);
22!srcSet&&isImage&&(srcSet=elem._lazypolyfill?elem._lazypolyfill._set:elem.getAttribute(lazySizesCfg.srcAttr)||elem.getAttribute("src")),(!elem._lazypolyfill||elem._lazypolyfill._set!=srcSet)&&(parsedSet=parseWsrcset(srcSet||""),isImage&&elem.parentNode&&(parsedSet.isPicture=elem.parentNode.nodeName.toUpperCase()=="PICTURE",parsedSet.isPicture&&window2.matchMedia&&(lazySizes.aC(elem,"lazymatchmedia"),runMatchMedia())),parsedSet._set=srcSet,Object.defineProperty(elem,"_lazypolyfill",{value:parsedSet,writable:!0}))},getX=function(elem){var dpr=window2.devicePixelRatio||1,optimum=lazySizes.getX&&lazySizes.getX(elem);return Math.min(optimum||dpr,2.5,dpr)},_matchesMedia=function(media){if(window2.matchMedia)_matchesMedia=function(media2){return!media2||(matchMedia(media2)||{}).matches};else return!media;return _matchesMedia(media)},getCandidate=function(elem){var sources,i,len,source,srces,src,width;if(source=elem,createSrcset(source,!0),srces=source._lazypolyfill,srces.isPicture){for(i=0,sources=elem.parentNode.getElementsByTagName("source"),len=sources.length;i<len;i++)if(lazySizesCfg.supportsType(sources[i].getAttribute("type"),elem)&&_matchesMedia(sources[i].getAttribute("media"))){source=sources[i],createSrcset(source),srces=source._lazypolyfill;break}}return srces.length>1?(width=source.getAttribute("sizes")||"",width=regPxLength.test(width)&&parseInt(width,10)||lazySizes.gW(elem,elem.parentNode),srces.d=getX(elem),!srces.src||!srces.w||srces.w<width?(srces.w=width,src=reduceCandidate(srces.sort(ascendingSort)),srces.src=src):src=srces.src):src=srces[0],src},p=function(elem){if(!(supportSrcset&&elem.parentNode&&elem.parentNode.nodeName.toUpperCase()!="PICTURE")){var candidate=getCandidate(elem);candidate&&candidate.u&&elem._lazypolyfill.cur!=candidate.u&&(elem._lazypolyfill.cur=candidate.u,candidate.cached=!0,elem.setAttribute(lazySizesCfg.srcAttr,candidate.u),elem.setAttribute("src",candidate.u))}};return p.parse=parseWsrcset,p})(),lazySizesCfg.loadedClass&&lazySizesCfg.loadingClass&&(function(){var sels=[];['img[sizes$="px"][srcset].',"picture > img:not([srcset])."].forEach(function(sel){sels.push(sel+lazySizesCfg.loadedClass),sels.push(sel+lazySizesCfg.loadingClass)}),lazySizesCfg.pf({elements:document2.querySelectorAll(sels.join(", "))})})())})});(function(){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(callback,thisArg){thisArg=thisArg||window;for(var i=0;i<this.length;i++)callback.call(thisArg,this[i],i,this)}),smoothscroll.polyfill(),new CollapsibleManager,new LoadingBar,new ModalManager,new PopoverManager;var sections=new SectionContainer;sections.register("account",AccountSection),sections.register("announcement-bar",AnnouncementBarSection),sections.register("blog",BlogSection),sections.register("blog-sidebar",BlogSidebarSection),sections.register("blog-post",BlogPostSection),sections.register("cart",CartSection),sections.register("collection-list",CollectionListSection),sections.register("collection",CollectionSection),sections.register("featured-collection",FeaturedCollectionSection),sections.register("footer",FooterSection),sections.register("gift-card",GiftCardSection),sections.register("header",HeaderSection),sections.register("login",LoginSection),sections.register("map",MapSection),sections.register("minimal-header",MinimalHeaderSection),sections.register("popups",PopupsSection),sections.register("product-recommendations",ProductRecommendationsSection),sections.register("product",ProductSection),sections.register("quick-links",QuickLinksSection),sections.register("recently-viewed-products",RecentlyViewedProductsSection),sections.register("slideshow",SlideshowSection),sections.register("text-with-icons",TextWithIconsSection),sections.register("video",VideoSection),(function(){document.querySelectorAll(".rte table").forEach(function(table){table.outerHTML='<div class="table-wrapper">'+table.outerHTML+"</div>"}),document.querySelectorAll(".rte iframe").forEach(function(iframe){(iframe.src.indexOf("youtube")!==-1||iframe.src.indexOf("youtu.be")!==-1||iframe.src.indexOf("vimeo")!==-1)&&(iframe.outerHTML='<div class="video-wrapper">'+iframe.outerHTML+"</div>
22",iframe.src=iframe.src)})})(),(function(){var touchingCarousel=!1,touchStartCoords;document.body.addEventListener("touchstart",function(e){var flickitySliderElement=e.target.closest(".flickity-slider");if(flickitySliderElement){var flickity2=Flickity.data(flickitySliderElement.closest(".flickity-enabled"));if(flickity2.isDraggable)touchingCarousel=!0;else{touchingCarousel=!1;return}}else{touchingCarousel=!1;return}touchStartCoords={x:e.touches[0].pageX,y:e.touches[0].pageY}}),document.body.addEventListener("touchmove",function(e){if(touchingCarousel&&e.cancelable){var moveVector={x:e.touches[0].pageX-touchStartCoords.x,y:e.touches[0].pageY-touchStartCoords.y};Math.abs(moveVector.x)>8&&e.preventDefault()}},{passive:!1})})(),(function(){var documentDelegate=new Delegate(document.body);documentDelegate.on("click",".expandable-content__toggle",function(item,expandableButton){var parentSection=expandableButton.closest(".expandable-content");if(parentSection.getAttribute("aria-expanded")==="true"){parentSection.setAttribute("aria-expanded","false"),parentSection.style["max-height"]="".concat(parentSection.offsetHeight,"px"),parentSection.offsetHeight,parentSection.style["max-height"]=null;var expandableText=expandableButton.querySelector(".expandable-content__toggle-text");expandableText.innerHTML=expandableText.getAttribute("data-view-more");var parentCard=parentSection.closest(".card");if(parentCard){var amountToScroll=parentCard.getBoundingClientRect().top-15-parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"));window.scrollBy({top:amountToScroll,behavior:"smooth"})}}else{parentSection.setAttribute("aria-expanded","true"),expandableButton.previousElementSibling&&(expandableButton.previousElementSibling.style["margin-bottom"]="".concat(parseInt(expandableButton.clientHeight/1.5),"px")),Animation.slideDown(parentSection,null,"max-height");var _expandableText=expandableButton.querySelector(".expandable-content__toggle-text");_expandableText.innerHTML=_expandableText.getAttribute("data-view-less")}});var processCollapsibles=function(){document.querySelectorAll(".expandable-content[aria-expanded]").forEach(function(item){item.scrollHeight>item.clientHeight?item.classList.add("expandable-content--expandable"):item.setAttribute("aria-expanded","true")})};document.addEventListener("shopify:section:load",function(event2){processCollapsibles()}),processCollapsibles()})(),(function(){if(Responsive.getCurrentBreakpoint()==="phone")for(var autoFocusedElements=document.querySelectorAll("input[autofocus]"),i=0;i<autoFocusedElements.length;i++)autoFocusedElements[i].blur(),autoFocusedElements[i].removeAttribute("autofocus")})(),(function(){var documentDelegate=new Delegate(document.body);documentDelegate.on("click",'[href^="#"], [data-href]',function(event2,target){var selector=target.hasAttribute("href")?target.getAttribute("href"):target.getAttribute("data-href");if(selector!=="#"){var element=null;try{element=document.querySelector(selector)}catch(exception){return}for(var offset=parseInt(target.getAttribute("data-offset")||0),toTop=0;element.offsetParent.tagName!=="BODY";)toTop+=element.offsetTop,element=element.offsetParent;toTop+=element.offsetTop,window.scrollTo({behavior:"smooth",top:toTop-offset}),event2.preventDefault()}})})(),(function(){function handleFirstTab(event2){event2.keyCode===9&&(document.body.classList.add("is-tabbing"),window.removeEventListener("keydown",handleFirstTab))}window.addEventListener("keydown",handleFirstTab)})(),(function(){var documentDelegate=new Delegate(document.body);documentDelegate.on("keyup","input, textarea",function(event2,target){target.classList.toggle("is-filled",target.value!=="")}),documentDelegate.on("change","select",function(event2,target){target.parentNode.classList.toggle("is-filled",target.value!=="")})})(),(function(){var links=document.links;fastdom.mutate(function(){for(var i=0,linksLength=links.length;i<linksLength;i++)links[i].hostname!==window.location.hostname&&(links[i].target="_blank")})})()})()}));
23//# sourceMappingURL=/cdn/shop/t/2/assets/theme.js.map?v=47723023909498885501606189518

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.