PageSourceSearch

https://molekule.com/cdn/shop/t/353/assets/z__jsProduct.js?v=134115529022496882741779814679

js molekule.com collected 2026-09-24 08:39:33 UTC 125,309 bytes, 47 lines download raw bytes

1(()=>{"use strict";var __webpack_require__={};__webpack_require__.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})();var __webpack_exports__={};/*!
2 * @pixelunion/rimg-shopify v2.7.1
3 * (c) 2023 Pixel Union
4 *//*!
5 * @pixelunion/rimg v2.2.2
6 * (c) 2022 Pixel Union
7 */function defaultTemplateRender(template,size){return template.replace("{size}","".concat(size.width,"x").concat(size.height))}var defaults={scale:1,template:!1,templateRender:defaultTemplateRender,max:{width:1/0,height:1/0},round:32,placeholder:!1,crop:null};function getData(el,name,options,sanitize){var attr="data-rimg-".concat(name);if(!el.hasAttribute(attr))return options[name]||defaults[name];var value=el.getAttribute(attr);return sanitize?sanitize(value):value}function parseSize(value){return value=value.split("x"),{width:parseInt(value[0],10),height:parseInt(value[1],10)}}function processCropValue(value){switch(value){case"top":case"center":case"bottom":case"left":case"right":return value;default:return null}}function parseItem(el){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},isImage=el.hasAttribute("data-rimg-template");return{el,isImage,isBackgroundImage:isImage&&el.tagName!=="IMG",scale:parseInt(getData(el,"scale",options)),density:window.devicePixelRatio||1,template:getData(el,"template",options),templateRender:options.templateRender||defaults.templateRender,max:getData(el,"max",options,parseSize),round:getData(el,"round",options),placeholder:getData(el,"placeholder",options,parseSize),crop:getData(el,"crop",options,processCropValue)}}function roundSize(size){var multiple=arguments.length>1&&arguments[1]!==void 0?arguments[1]:32,maxLimit=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1/0;return size===0?multiple:Math.min(Math.ceil(size/multiple)*multiple,maxLimit)}function getElementSize(el){for(var size={width:0,height:0};el&&(size.width=el.offsetWidth,size.height=el.offsetHeight,!(size.width>20&&size.height>20));)el=el.parentNode;return size}function supportedDensity(item,size){return Math.min(Math.min(Math.max(item.max.width/size.width,1),item.density),Math.min(Math.max(item.max.height/size.height,1),item.density)).toFixed(2)}function trigger(el,name){var event2=document.createEvent("Event");return event2.initEvent(name,!0,!0),!el.dispatchEvent(event2)}function setImage(item,size,isPlaceholder,onLoad){var render=item.templateRender,density=isPlaceholder?1:supportedDensity(item,size),round=isPlaceholder?1:item.round,targetWidth=size.width*density,targetHeight=size.height*density,displaySize;if(item.crop)displaySize={width:roundSize(targetWidth,round,item.max.width),height:roundSize(targetHeight,round,item.max.height)};else{var containerAspectRatio=size.width/size.height,imageAspectRatio=item.max.width/item.max.height;containerAspectRatio>imageAspectRatio?displaySize={width:roundSize(targetWidth,round,item.max.width),height:roundSize(targetWidth/imageAspectRatio,round,item.max.height)}:displaySize={width:roundSize(targetHeight*imageAspectRatio,round,item.max.width),height:roundSize(targetHeight,round,item.max.height)}}var url=render(item.template,displaySize),image=new Image;image.onload=onLoad,image.src=url,item.isBackgroundImage?item.el.style.backgroundImage="url('".concat(url,"')"):item.el.setAttribute("srcset","".concat(url," ").concat(density,"x"))}function loadFullImage(item,size){var el=item.el;setImage(item,size,!1,function(event2){event2.type==="load"?el.setAttribute("data-rimg","loaded"):(el.setAttribute("data-rimg","error"),trigger(el,"rimg:error")),trigger(el,"rimg:load")})}function loadImage(item){var el=item.el,status=el.getAttribute("data-rimg");if(!(status==="loading"||status==="loaded")){if(!item.isBackgroundImage&&(el.naturalWidth===0||!el.complete)){el.addEventListener("load",function cb(){el.removeEventListener("load",cb),loadImage(item)});return}if(!trigger(el,"rimg:loading")){el.setAttribute("data-rimg","loading");var size=getElementSize(item.el);size.width*=item.scale,size.height*=item.scale,item.placeholder?(item.isBackgroun
7dImage||(el.setAttribute("width",Math.min(Math.floor(item.max.width/item.density),size.width)),el.setAttribute("height",Math.min(Math.floor(item.max.height/item.density),size.height))),setImage(item,item.placeholder,!0,function(){return loadFullImage(item,size)})):loadFullImage(item,size)}}}function load(el,options){if(el){trigger(el,"rimg:enter");var item=parseItem(el,options);item.isImage&&(item.isBackgroundImage||el.setAttribute("data-rimg-template-svg",el.getAttribute("srcset")),loadImage(item))}}function update(el,options){if(el){trigger(el,"rimg:update");var item=parseItem(el,options);item.isImage&&(item.isBackgroundImage||(el.setAttribute("data-rimg","lazy"),el.setAttribute("srcset",el.getAttribute("data-rimg-template-svg"))),loadImage(item))}}function inViewport(el){if(!el.offsetWidth||!el.offsetHeight||!el.getClientRects().length)return!1;var root=document.documentElement,width=Math.min(root.clientWidth,window.innerWidth),height=Math.min(root.clientHeight,window.innerHeight),rect=el.getBoundingClientRect();return rect.bottom>=0&&rect.right>=0&&rect.top<=height&&rect.left<=width}function rimg(){var selector=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'[data-rimg="lazy"]',options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},io=new IntersectionObserver(function(entries){entries.forEach(function(entry){(entry.isIntersecting||entry.intersectionRatio>0)&&(io.unobserve(entry.target),load(entry.target,options))})},{rootMargin:"20% 0px"}),api={track:function(){for(var selector2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'[data-rimg="lazy"]',els=querySelector(selector2),i=0;i<els.length;i++)inViewport(els[i])?load(els[i],options):io.observe(els[i])},update:function(){for(var selector2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'[data-rimg="loaded"]',els=querySelector(selector2),i=0;i<els.length;i++)update(els[i],options)},untrack:function(){for(var selector2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"[data-rimg]",els=querySelector(selector2),i=0;i<els.length;i++)io.unobserve(els[i])},load:function(){for(var selector2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"[data-rimg]",els=querySelector(selector2),i=0;i<els.length;i++)load(els[i],options)},unload:function(){io.disconnect()}};return api.track(selector),api}function querySelector(selector){return typeof selector=="string"?document.querySelectorAll(selector):selector instanceof HTMLElement?[selector]:selector instanceof NodeList?selector:[]}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(s){for(var matches=(this.document||this.ownerDocument).querySelectorAll(s),i=matches.length;--i>=0&&matches.item(i)!==this;);return i>-1});var state={init,watch,unwatch,load:load$1};function init(){var selector=arguments.length>0&&arguments[0]!==void 0?arguments[0]:'[data-rimg="lazy"]',options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};state.selector=selector,state.instance=rimg(selector,options),state.loadedWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0),document.addEventListener("shopify:section:load",function(event2){return watch(event2.target)}),window.addEventListener("resize",function(){return _update()}),document.addEventListener("shopify:section:unload",function(event2){return unwatch(event2.target)}),document.addEventListener("theme:rimg:watch",function(event2){return watch(event2.target)}),document.addEventListener("theme:rimg:unwatch",function(event2){return unwatch(event2.target)}),window.jQuery&&jQuery(document).on({"theme:rimg:watch":function(event2){return watch(event2.target)},"theme:rimg:unwatch":function(event2){return unwatch(event2.target)}})}function watch(el){typeof el.matches=="function"&&el.matches(state.selector)&&state.instance.track(el),state.instance.track(el.querySelectorAll(state.selector))}function unwatch(el){state.instance.untrack(el.querySelectorAll(state.selector)),typeof el.matches=="function"&&el.matches(state.selector)&&state.instance.untrack(el)}function load$1(el){typeof el.matches=="function"&&el.matches(state.selector)&&state.instance.load(el),state.instance.load(el.querySelectorAll(state.selector))}function _update(){var currentWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);currentWidth/state.loadedWidth>.5&&currentWidth/state.loadedWidth<2||(state.loadedWidth=currentWidth,state.instance.update(
7))}const index_es=state;/*!
8 * @pixelunion/pxs-complementary-products v3.5.3
9 * (c) 2022 Pixel Union
10 */function _typeof(obj){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(obj2){return typeof obj2}: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),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof __webpack_require__.g<"u"?__webpack_require__.g:typeof self<"u"?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 EventHandler_1=createCommonjsModule(function(module,exports){exports.__esModule=!0;var EventHandler2=(function(){function EventHandler3(){this.events=[]}return EventHandler3.prototype.register=function(el,event2,listener){return!el||!event2||!listener?null:(this.events.push({el,event:event2,listener}),el.addEventListener(event2,listener),{el,event:event2,listener})},EventHandler3.prototype.unregister=function(_a){var el=_a.el,event2=_a.event,listener=_a.listener;return!el||!event2||!listener?null:(this.events=this.events.filter(function(e){return el!==e.el||event2!==e.event||listener!==e.listener}),el.removeEventListener(event2,listener),{el,event:event2,listener})},EventHandler3.prototype.unregisterAll=function(){this.events.forEach(function(_a){var el=_a.el,event2=_a.event,listener=_a.listener;return el.removeEventListener(event2,listener)}),this.events=[]},EventHandler3})();exports.default=EventHandler2}),EventHandler=unwrapExports(EventHandler_1);/*!
11   * @pixelunion/shopify-asyncview v2.0.5
12   * (c) 2020 Pixel Union
13  */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}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _iterableToArrayLimit(arr,i){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(arr)))){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return!=null&&_i.return()}finally{if(_d)throw _e}}return _arr}}function _unsupportedIterableToArray(o,minLen){if(o){if(typeof o=="str
13ing")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(n);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 _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var deferred={},AsyncView=(function(){function AsyncView2(){_classCallCheck$1(this,AsyncView2)}return _createClass$1(AsyncView2,null,[{key:"load",value:function(url){var query=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("view"in query))return Promise.reject(new Error("'view' not found in 'query' parameter"));var querylessUrl=url.replace(/\?[^#]+/,""),queryParamsString=new RegExp(/.+\?([^#]+)/).exec(url),queryParams=query;queryParamsString&&queryParamsString.length>=2&&queryParamsString[1].split("&").forEach(function(param){var _param$split=param.split("="),_param$split2=_slicedToArray(_param$split,2),key=_param$split2[0],value=_param$split2[1];queryParams[key]=value});var cachebustingParams=_objectSpread2({},queryParams,{_:new Date().getTime()}),hashUrl=querylessUrl.replace(/([^#]+)(.*)/,function(match,address,hash){return"".concat(address,"?").concat(Object.keys(queryParams).sort().map(function(key){return"".concat(key,"=").concat(encodeURIComponent(queryParams[key]))}).join("&")).concat(hash)}),requestUrl=querylessUrl.replace(/([^#]+)(.*)/,function(match,address,hash){return"".concat(address,"?").concat(Object.keys(cachebustingParams).sort().map(function(key){return"".concat(key,"=").concat(encodeURIComponent(cachebustingParams[key]))}).join("&")).concat(hash)}),promise=new Promise(function(resolve,reject){var data;if(hashUrl in deferred){resolve(deferred[hashUrl]);return}if(deferred[hashUrl]=promise,options.hash&&(data=sessionStorage.getItem(hashUrl),data)){var deserialized=JSON.parse(data);if(options.hash===deserialized.options.hash){delete deferred[hashUrl],resolve(deserialized);return}}var xhr=new XMLHttpRequest;xhr.open("GET",requestUrl,!0),xhr.onload=function(){var el=xhr.response,newOptions={},optionsEl=el.querySelector("[data-options]");optionsEl&&optionsEl.innerHTML&&(newOptions=JSON.parse(el.querySelector("[data-options]").innerHTML));var htmlEls=el.querySelectorAll("[data-html]"),newHtml={};if(htmlEls.length===1&&htmlEls[0].getAttribute("data-html")==="")newHtml=htmlEls[0].innerHTML;else for(var i=0;i<htmlEls.length;i++)newHtml[htmlEls[i].getAttribute("data-html")]=htmlEls[i].innerHTML;var dataEls=el.querySelectorAll("[data-data]"),newData={};if(dataEls.length===1&&dataEls[0].getAttribute("data-data")==="")newData=JSON.parse(dataEls[0].innerHTML);else for(var _i=0;_i<dataEls.length;_i++)newData[dataEls[_i].getAttribute("data-data")]=JSON.parse(dataEls[_i].innerHTML);if(options.hash)try{sessionStorage.setItem(hashUrl,JSON.stringify({options:newOptions,data:newData,html:newHtml}))}catch(error){console.error(error)}delete deferred[hashUrl],resolve({data:newData,html:newHtml})},xhr.onerror=function(){delete deferred[hashUrl],reject()},xhr.responseType="document",xhr.send()});return promise}}]),AsyncView2})(),evEmitter=createCommonjsModule(function(module){(function(global,factory){module.exports?module.exports=factory():global.EvEmitter=factory()})(typeof window<"u"?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||{}
14,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){/*!
15 * getSize v2.0.3
16 * measure size of elements
17 * MIT license
18 */(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>"u"?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.innerHeight=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;
18utils2.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",jQuery2=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);jQuery2&&jQuery2.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,this.element.style[this.parent.originSide]=0},proto.destroy=function(){this.unselect(),this.element.style.position="";var side=this.parent.originSide;this.element.style[side]="",this.element.style.transform="",this.element.removeAttribute("aria-hidden")},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 sideOffset=this.parent.originSide==="left"?1:-1,adjustedX=this.parent.options.percentPosition?x*sideOffset*(this.parent.size.innerWidth/this.size.width):x*sideOffset;this.element.style.transform="translateX("+this.parent.getPositionValue(adjustedX)+")"},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]}
18,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-=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){var isResting=!this.isPointerDown&&Math.round(this.x*100)==Math.round(previousX*100);isResting&&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 jQuery2=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 Flickity(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&&instance.option(options),instance}jQuery2&&(this.$element=jQuery2(this.element)),this.options=utils2.extend({},this.constructor.defaults),this.option(options),this._create()}Flickity.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},Flickity.createMethods=[];var proto=Flickity.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)}Flickity.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
18Size();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);
18this.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),jQuery2&&this.$element){type+=this.options.namespaceJQueryEvents?".flickity":"";var $event=type;if(event2){var jQEvent=new jQuery2.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(Flickity,"onresize",150),proto.resize=function(){if(!(!this.isActive||this.isAnimating||this.isDragging)){this.get
vendor: 8,836 bytes, lines 18-26
18Size(),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=Flickity.keyboardHandlers[event2.keyCode];handler&&handler.call(this)}},Flickity.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"),jQuery2&&this.$element&&jQuery2.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete instances[this.guid]},utils2.extend(proto,animatePrototype),Flickity.data=function(elem){elem=utils2.getQueryElement(elem);var id=elem&&elem.flickityGUID;return id&&instances[id]},utils2.htmlInit(Flickity,"flickity"),jQuery2&&jQuery2.bridget&&jQuery2.bridget("flickity",Flickity),Flickity.setJQuery=function(jq){jQuery2=jq},Flickity.Cell=Cell,Flickity.Slide=Slide,Flickity})}),unipointer=createCommonjsModule(function(module){/*!
19 * Unipointer v2.4.0
20 * base class for doing one thing with pointer event
21 * MIT license
22 */(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";"ontouchstart"in window2?startEvent="touchstart":window2.PointerEvent&&(startEvent="pointerdown"),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];events.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){/*!
23 * Unidragger v2.4.0
24 * Draggable base class
25 * MIT license
26 */(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
26Clicks=!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,Flickity,Unidragger,utils2){utils2.extend(Flickity.defaults,{draggable:">1",dragThreshold:3}),Flickity.createMethods.push("_createDrag");var proto=Flickity.prototype;utils2.extend(proto,Unidragger.prototype),proto._touchActionValue="pan-y",proto._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},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%=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=
26positiveResting.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(dist,minDist){return dist<=minDist}:function(dist,minDist){return dist<minDist};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 Flickity})}),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,Flickity,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}
26var 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(Flickity.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),Flickity.createMethods.push("_createPrevNextButtons");var proto=Flickity.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)},Flickity.PrevNextButton=PrevNextButton,Flickity})}),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,Flickity,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()},Flickity.PageDots=PageDots,utils2.extend(Flickity.defaults,{pageDots:!0}),Flickity.createMethods.push("_createPageDots");var proto=Flickity.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()},Flickity.PageDots=PageDots,Flickity})}),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,Flickity){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(Flickity.defaults,{pauseAutoPlayOnHover:!0}),Flickity.createMethods.push("_createPlayer");var proto=Flickity.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)},Flickity.Player=Player,Flickity})}),addRemoveCell=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,utils):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity,utils2){function getCellsFragment(cells){var fragment=document.createDocumentFragment();
26return cells.forEach(function(cell2){fragment.appendChild(cell2.element)}),fragment}var proto=Flickity.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()},Flickity})}),lazyload=createCommonjsModule(function(module){(function(window2,factory){module.exports?module.exports=factory(window2,flickity,utils):factory(window2,window2.Flickity,window2.fizzyUIUtils)})(window,function(window2,Flickity,utils2){Flickity.createMethods.push("_createLazyload");var proto=Flickity.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=[];
26cellElems.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)},Flickity.LazyLoader=LazyLoader,Flickity})}),js=createCommonjsModule(function(module){/*!
27 * Flickity v2.3.0
28 * Touch, responsive, flickable carousels
29 *
30 * Licensed GPLv3 for open source use
31 * or Flickity Commercial License for commercial use
32 *
33 * https://flickity.metafizzy.co
34 * Copyright 2015-2021 Metafizzy
35 */(function(window2,factory){module.exports&&(module.exports=factory(flickity,drag,prevNextButton,pageDots,player,addRemoveCell,lazyload))})(window,function(Flickity){return Flickity})}),ComplementaryProducts=(function(){function ComplementaryProducts2(options){_classCallCheck(this,ComplementaryProducts2),this.sectionEl=options.sectionEl,this.sectionId=options.sectionId,this.events=new EventHandler,this.productId=options.productId,this.includeIndicatorDots=options.includeIndicatorDots||!1,this.recommendationsRoute=options.productRecommendationsRoute,this.limit=options.limit;var defaultArrowShape={x0:10,x1:60,y1:50,x2:65,y2:45,x3:20};this.arrowShape=options.arrowShape||defaultArrowShape,this.recommendationsEl=this.sectionEl.querySelector("[data-complementary-products]"),this.loadRecommendations()}return _createClass(ComplementaryProducts2,[{key:"loadRecommendations",value:function(){var _this=this,url="".concat(this.recommendationsRoute,"?section_id=").concat(this.sectionId,"&limit=").concat(this.limit,"&product_id=").concat(this.productId,"&intent=complementary");AsyncView.load(url,{view:""}).then(function(_ref){var html=_ref.html;if(!(_typeof(html)==="object"&&Object.keys(html).length===0)){if(html.trim().length===0){_this.recommendationsEl.classList.add("complementary-products--no-recommendations");return}_this.recommendationsEl.innerHTML=html,index_es.instance||index_es.init(),index_es.watch(_this.recommendationsEl);var slider=_this.recommendationsEl.querySelector("[data-slider]"),slides=_this.recommendationsEl.querySelectorAll("[data-slide]");slides.length>1&&(_this.slider=new js(slider,{cellSelector:"[data-slide]",accessibility:!1,adaptiveHeight:!1,autoPlay:!1,cellAlign:"left",contain:!0,imagesLoaded:!0,pageDots:_this.includeIndicatorDots,wrapAround:!0,arrowShape:_this.arrowShape}),_this.events.register(slider,"rimg:load",function(){_this.slider.resize()}))}})}},{key:"unload",value:function(){this.slider.destroy()}}]),ComplementaryProducts2})();const dist_index_es=ComplementaryProducts,LOCAL_STORAGE_KEY="pxu-shopify-surface-pick-up",loadingClass="surface-pick-up--loading",isNotExpired=timestamp=>timestamp+1e3*60*60>=Date.now(),removeTrailingSlash=s=>s.replace(/(.*)\/$/,"$1");function calculateDistance(latitude1,longitude1,latitude2,longitude2,unitSystem){const dtor=Math.PI/180,radius=unitSystem==="metric"?6378.14:3959,rlat1=latitude1*dtor,rlong1=longitude1*dtor,rlat2=latitude2*dtor,rlong2=longitude2*dtor,dlon=rlong1-rlong2,dlat=rlat1-rlat2,a=Math.sin(dlat/2)**2+Math.cos(rlat1)*Math.cos(rlat2)*Math.sin(dlon/2)**2,c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));
35return radius*c}async function getGeoLocation(){return new Promise((resolve,reject)=>{const options={maximumAge:36e5,timeout:5e3};navigator.geolocation?navigator.geolocation.getCurrentPosition(({coords})=>resolve(coords),reject,options):reject()})}async function setLocation({latitude,longitude}){const newData={latitude,longitude,timestamp:Date.now()};return localStorage.setItem(LOCAL_STORAGE_KEY,JSON.stringify(newData)),fetch("/localization.json",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({latitude,longitude})}).then(()=>({latitude,longitude}))}async function getLocation(requestLocation=!1){const cachedLocation=JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY));return cachedLocation&&isNotExpired(cachedLocation.timestamp)?cachedLocation:requestLocation?getGeoLocation().then(coords=>(setLocation(coords),coords)):null}class SurfacePickUp{constructor(el,options){this.el=el,this.options={root_url:window.Theme&&window.Theme.routes&&window.Theme.routes.root_url||"",...options},this.options.root_url=removeTrailingSlash(this.options.root_url),this.callbacks=[],this.onBtnPress=null,this.latestVariantId=null}load(variantId){return variantId?(this.latestVariantId=variantId,this.el.classList.add(loadingClass),this._getData(variantId).then(data=>this._injectData(data))):(this.el.innerHTML="",Promise.resolve(!0))}onModalRequest(callback){this.callbacks.indexOf(callback)>=0||this.callbacks.push(callback)}offModalRequest(callback){this.callbacks.splice(this.callbacks.indexOf(callback))}unload(){this.callbacks=[],this.el.innerHTML=""}_getData(variantId){return new Promise(resolve=>{const xhr=new XMLHttpRequest,requestUrl=`${this.options.root_url}/variants/${variantId}/?section_id=surface-pick-up`;xhr.open("GET",requestUrl,!0),xhr.onload=()=>{const el=xhr.response,embed=el.querySelector('[data-html="surface-pick-up-embed"]'),itemsContainer=el.querySelector('[data-html="surface-pick-up-items"]'),items=itemsContainer.content.querySelectorAll("[data-surface-pick-up-item]");resolve({embed,itemsContainer,items,variantId})},xhr.onerror=()=>{resolve({embed:{innerHTML:""},itemsContainer:{innerHTML:""},items:[],variantId})},xhr.responseType="document",xhr.send()})}_injectData({embed,itemsContainer,items,variantId}){if(variantId!==this.latestVariantId||items.length===0){this.el.innerHTML="",this.el.classList.remove(loadingClass);return}this.el.innerHTML=embed.innerHTML,this.el.classList.remove(loadingClass);let calculatedDistances=!1;const calculateDistances=()=>calculatedDistances?Promise.resolve():getLocation(!0).then(coords=>{items.forEach(item=>{const distanceEl=item.querySelector("[data-distance]"),distanceUnitEl=item.querySelector("[data-distance-unit]"),unitSystem=distanceUnitEl.dataset.distanceUnit,itemLatitude=parseFloat(distanceEl.dataset.latitude),itemLongitude=parseFloat(distanceEl.dataset.longitude);if(coords&&isFinite(itemLatitude)&&isFinite(itemLongitude)){const distance=calculateDistance(coords.latitude,coords.longitude,itemLatitude,itemLongitude,unitSystem);distanceEl.innerHTML=distance.toFixed(1)}else distanceEl.remove(),distanceUnitEl.remove()})}).catch(e=>{items.forEach(item=>{const distanceEl=item.querySelector("[data-distance]"),distanceUnitEl=item.querySelector("[data-distance-unit]");distanceEl.remove(),distanceUnitEl.remove()})}).finally(()=>{calculatedDistances=!0});this.el.querySelector("[data-surface-pick-up-embed-modal-btn]").addEventListener("click",()=>{calculateDistances().then(()=>this.callbacks.forEach(callback=>callback(itemsContainer.innerHTML)))})}}const shopify_surface_pick_up_dist_index_es=SurfacePickUp;function index_es_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function index_es_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 index_es_createClass(Constructor,protoProps,staticProps){return protoProps&&index_es_defineProperties(Constructor.prototype,protoProps),staticProps&&index_es_defineProperties(Constructor,staticProps),Constructor}function index_es_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function index_es_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);
35enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function index_es_objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?index_es_ownKeys(Object(source),!0).forEach(function(key){index_es_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):index_es_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}var priceUITemplate=document.getElementById("price-ui").content,priceTemplate=document.getElementById("price-ui__price").content,priceRangeTemplate=document.getElementById("price-ui__price-range").content,unitPriceTemplate=document.getElementById("price-ui__unit-pricing").content;function createPriceRangeFragment(priceMin,priceMax,formatter){var priceRangeFragment=priceRangeTemplate.cloneNode(!0);return priceRangeFragment.querySelector("[data-price-min] [data-price]").innerHTML=formatter(priceMin),priceRangeFragment.querySelector("[data-price-max] [data-price]").innerHTML=formatter(priceMax),priceRangeFragment}function createPriceFragment(price,formatter){var priceFragment=priceTemplate.cloneNode(!0);return priceFragment.querySelector("[data-price]").innerHTML=formatter(price),priceFragment}function createUnitPricing(variant,formatter){var unitPriceContainer=unitPriceTemplate.cloneNode(!0),unitQuantityEl=unitPriceContainer.querySelector("[data-unit-quantity]"),unitPriceEl=unitPriceContainer.querySelector("[data-unit-price] [data-price]"),unitMeasurementEl=unitPriceContainer.querySelector("[data-unit-measurement]");return unitQuantityEl.innerHTML="".concat(variant.unit_price_measurement.quantity_value).concat(variant.unit_price_measurement.quantity_unit),unitPriceEl.innerHTML=formatter(variant.unit_price),variant.unit_price_measurement.reference_value===1?unitMeasurementEl.innerHTML=variant.unit_price_measurement.reference_unit:unitMeasurementEl.innerHTML="".concat(variant.unit_price_measurement.reference_value).concat(variant.unit_price_measurement.reference_unit),unitPriceContainer}var PriceUI=(function(){function PriceUI2(el){index_es_classCallCheck(this,PriceUI2),this._el=el}return index_es_createClass(PriceUI2,[{key:"load",value:function(product,options){var hasTag=product.tags.some(function(v){return v.indexOf("discount_")>=0});if(hasTag)var discountTag=product.tags.filter(s=>s.includes("discount_")),discount=Number(discountTag.toString().split("_")[1]);var _variant$formatter$ha=index_es_objectSpread2({variant:!1,formatter:function(price){return price},handler:function(priceUIFragment2){return priceUIFragment2}},options),variant=_variant$formatter$ha.variant,formatter=_variant$formatter$ha.formatter,handler=_variant$formatter$ha.handler;this._el.classList.add("price-ui--loading");var priceUIFragment=handler(variant?this._loadVariant(variant,formatter,hasTag,discount):this._loadProduct(product,formatter,hasTag,discount),product,options);this._el.innerHTML="",this._el.appendChild(priceUIFragment),this._el.classList.remove("price-ui--loading")}},{key:"_loadVariant",value:function(variant,formatter,hasTag,discount){var priceUIFragment=priceUITemplate.cloneNode(!0),compareAtPriceEl=priceUIFragment.querySelector("[data-compare-at-price]"),priceEl=priceUIFragment.querySelector("[data-price]"),unitPricingEl=priceUIFragment.querySelector("[data-unit-pricing]"),isOnSale=variant.compare_at_price&&variant.compare_at_price!==variant.price;if(isOnSale){priceEl.classList.add("price--sale");var _priceFragment=createPriceFragment(variant.compare_at_price,formatter);compareAtPriceEl.appendChild(_priceFragment)}if(hasTag){var discountPrice=variant.price-variant.price*discount/100,priceFragment=createPriceFragment(discountPrice,formatter),installments=discountPrice/11.08,savingAmount=variant.price-discountPrice;priceUIFragment.querySelector(".custom_price_installments").innerHTML=`${Shopify.formatMoney(installments,$("body").data("money-format"))}/month *`,priceUIFragment.querySelector(".custom_compare_price").innerHTML=Shopify.formatMoney(variant.price,$("body").data("money-format")),priceUIFragment.querySelector(".custom_saving_price").innerHTML=Shopify.formatMoney(savingAmount,$("body").data("money-format"))}else var priceFragment=createPriceFragment(variant.price,formatter);if(priceEl.appendChild(priceFragment),"unit_price"in variant){var unitPricingFragment=createUnitPricing(variant,formatter);
35unitPricingEl.appendChild(unitPricingFragment)}return priceUIFragment}},{key:"_loadProduct",value:function(product,formatter,hasTag,discount){var priceMin=null,priceMax=null,compareAtPriceMin=null,compareAtPriceMax=null,priceVaries=!1,compareAtPriceVaries=!1,isOnSale=!1;product.variants.forEach(function(variant){var tmpCompareAtPrice=variant.compare_at_price?variant.compare_at_price:variant.price;(priceMin===null||variant.price<priceMin)&&(priceMin=variant.price),(priceMax===null||variant.price>priceMax)&&(priceMax=variant.price),(compareAtPriceMin===null||tmpCompareAtPrice<compareAtPriceMin)&&(compareAtPriceMin=tmpCompareAtPrice),(compareAtPriceMax===null||tmpCompareAtPrice>compareAtPriceMax)&&(compareAtPriceMax=tmpCompareAtPrice),tmpCompareAtPrice!==variant.price&&(isOnSale=!0)}),priceVaries=priceMin!==priceMax,compareAtPriceVaries=compareAtPriceMin!==compareAtPriceMax;var priceUIFragment=priceUITemplate.cloneNode(!0),compareAtPriceEl=priceUIFragment.querySelector("[data-compare-at-price]"),priceEl=priceUIFragment.querySelector("[data-price]");if(isOnSale)if(priceEl.classList.add("price--sale"),compareAtPriceVaries){var priceRangeFragment=createPriceRangeFragment(compareAtPriceMin,compareAtPriceMax,formatter);compareAtPriceEl.appendChild(priceRangeFragment)}else{var priceFragment=createPriceFragment(compareAtPriceMin,formatter);compareAtPriceEl.appendChild(priceFragment)}if(priceVaries){var _priceRangeFragment=createPriceRangeFragment(priceMin,priceMax,formatter);priceEl.appendChild(_priceRangeFragment)}else{var _priceFragment2=createPriceFragment(priceMin,formatter);priceEl.appendChild(_priceFragment2)}return priceUIFragment}}]),PriceUI2})(),priceUIBadgeTemplate=document.getElementById("price-ui-badge").content,badgePercentSavingsTemplate=document.getElementById("price-ui-badge__percent-savings").content,badgePercentSavingsRangeTemplate=document.getElementById("price-ui-badge__percent-savings-range").content,badgeSavingsTemplate=document.getElementById("price-ui-badge__price-savings").content,badgeSavingsRangeTemplate=document.getElementById("price-ui-badge__price-savings-range").content,badgeOnSaleTemplate=document.getElementById("price-ui-badge__on-sale").content,badgeSoldOutTemplate=document.getElementById("price-ui-badge__sold-out").content,badgeInStockTemplate=document.getElementById("price-ui-badge__in-stock").content;function createBadgeRangeFragment(savings,percent,style,formatter){var badgeRangeFragment=null;switch(style){case"percent":badgeRangeFragment=badgePercentSavingsRangeTemplate.cloneNode(!0),badgeRangeFragment.querySelector("[data-price-percent]").innerHTML=percent;break;case"money":badgeRangeFragment=badgeSavingsRangeTemplate.cloneNode(!0),badgeRangeFragment.querySelector("[data-price]").innerHTML=formatter(savings);break;default:badgeRangeFragment=badgeOnSaleTemplate.cloneNode(!0);break}return badgeRangeFragment}function createBadgeSingleFragment(savings,percent,style,formatter){var badgeSingleFragment=null;switch(style){case"percent":badgeSingleFragment=badgePercentSavingsTemplate.cloneNode(!0),badgeSingleFragment.querySelector("[data-price-percent]").innerHTML=percent;break;case"money":badgeSingleFragment=badgeSavingsTemplate.cloneNode(!0),badgeSingleFragment.querySelector("[data-price]").innerHTML=formatter(savings);break;default:badgeSingleFragment=badgeOnSaleTemplate.cloneNode(!0);break}return badgeSingleFragment}var PriceUIBadge=(function(){function PriceUIBadge2(el){index_es_classCallCheck(this,PriceUIBadge2),this._el=el}return index_es_createClass(PriceUIBadge2,[{key:"load",value:function(product,options){var _variant$style$format=index_es_objectSpread2({variant:!1,style:"percent",formatter:function(price){return price},handler:function(priceUIFragment){return priceUIFragment}},options),variant=_variant$style$format.variant,style=_variant$style$format.style,formatter=_variant$style$format.formatter,handler=_variant$style$format.handler;this._el.classList.add("price-ui-badge--loading");var priceUIBadgeFragment=handler(variant?this._loadVariant(variant,style,formatter):this._loadProduct(product,style,formatter),product,options);this._el.innerHTML="",this._el.appendChild(priceUIBadgeFragment),this._el.classList.remove("price-ui-badge--loading")}},{key:"_loadVariant",value:function(variant,style,formatter){var priceUIBadgeFragment=priceUIBadgeTemplate.cloneNode(!0),badgeEl=priceUIBadgeFragment.querySelector("[data-badge]"),isOnSale=variant.compare_at_price&&variant.compare_at_price!==variant.price;if(!isOnSale){var badgeInStockFragment=badgeInStockTemplate.cloneNode(!0);return badgeEl.appendChild(badgeInStockFragment),priceUIBadgeFragment}if(variant.available){var savings=variant.compare_at_price-variant.price,percent=Math.round(savings/variant.compare_at_price*100),badgeSingleFragment=createBadgeSingleFragment(savings,percent,style,formatter);badgeEl.appendChild(badgeSingleFragment)}else{var badgeSoldOutFragment=badgeSoldOutTemplate.cloneNode(!0);badgeEl.appendChild(badgeSoldOutFragment)}return priceUIBadgeFragment}},{key:"_loadProduct",value:function(product,style,formatter){var isOnSale=!1,savingsVaries=!1,largestSavings=-1,largestPercentSavings=0;
35product.variants.forEach(function(variant){var tmpCompareAtPrice=variant.compare_at_price;variant.compare_at_price||(tmpCompareAtPrice=variant.price);var tmpSavings=tmpCompareAtPrice-variant.price;largestSavings!==0&&tmpSavings!==largestSavings&&(savingsVaries=!0),tmpSavings>0&&(isOnSale=!0,tmpSavings>largestSavings&&(largestSavings=tmpSavings,largestPercentSavings=tmpSavings/tmpCompareAtPrice))}),largestPercentSavings=Math.round(largestPercentSavings*100);var priceUIBadgeFragment=priceUIBadgeTemplate.cloneNode(!0),badgeEl=priceUIBadgeFragment.querySelector("[data-badge]");if(!isOnSale){var badgeInStockFragment=badgeInStockTemplate.cloneNode(!0);return badgeEl.appendChild(badgeInStockFragment),priceUIBadgeFragment}if(savingsVaries){var badgeRangeFragment=createBadgeRangeFragment(largestSavings,largestPercentSavings,style,formatter);badgeEl.appendChild(badgeRangeFragment)}else{var badgeSingleFragment=createBadgeSingleFragment(largestSavings,largestPercentSavings,style,formatter);badgeEl.appendChild(badgeSingleFragment)}return priceUIBadgeFragment}}]),PriceUIBadge2})();/*!
36 * @pixelunion/shopify-asyncview v2.0.5
37 * (c) 2020 Pixel Union
38*/function dist_index_es_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function dist_index_es_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 dist_index_es_createClass(Constructor,protoProps,staticProps){return protoProps&&dist_index_es_defineProperties(Constructor.prototype,protoProps),staticProps&&dist_index_es_defineProperties(Constructor,staticProps),Constructor}function dist_index_es_defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function dist_index_es_ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function dist_index_es_objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};i%2?dist_index_es_ownKeys(Object(source),!0).forEach(function(key){dist_index_es_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):dist_index_es_ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function index_es_slicedToArray(arr,i){return index_es_arrayWithHoles(arr)||index_es_iterableToArrayLimit(arr,i)||index_es_unsupportedIterableToArray(arr,i)||index_es_nonIterableRest()}function index_es_arrayWithHoles(arr){if(Array.isArray(arr))return arr}function index_es_iterableToArrayLimit(arr,i){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(arr)))){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return!=null&&_i.return()}finally{if(_d)throw _e}}return _arr}}function index_es_unsupportedIterableToArray(o,minLen){if(o){if(typeof o=="string")return index_es_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(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return index_es_arrayLikeToArray(o,minLen)}}function index_es_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 index_es_nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
39In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var index_es_deferred={},index_es_AsyncView=(function(){function AsyncView2(){dist_index_es_classCallCheck(this,AsyncView2)}
39return dist_index_es_createClass(AsyncView2,null,[{key:"load",value:function(url){var query=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("view"in query))return Promise.reject(new Error("'view' not found in 'query' parameter"));var querylessUrl=url.replace(/\?[^#]+/,""),queryParamsString=new RegExp(/.+\?([^#]+)/).exec(url),queryParams=query;queryParamsString&&queryParamsString.length>=2&&queryParamsString[1].split("&").forEach(function(param){var _param$split=param.split("="),_param$split2=index_es_slicedToArray(_param$split,2),key=_param$split2[0],value=_param$split2[1];queryParams[key]=value});var cachebustingParams=dist_index_es_objectSpread2({},queryParams,{_:new Date().getTime()}),hashUrl=querylessUrl.replace(/([^#]+)(.*)/,function(match,address,hash){return"".concat(address,"?").concat(Object.keys(queryParams).sort().map(function(key){return"".concat(key,"=").concat(encodeURIComponent(queryParams[key]))}).join("&")).concat(hash)}),requestUrl=querylessUrl.replace(/([^#]+)(.*)/,function(match,address,hash){return"".concat(address,"?").concat(Object.keys(cachebustingParams).sort().map(function(key){return"".concat(key,"=").concat(encodeURIComponent(cachebustingParams[key]))}).join("&")).concat(hash)}),promise=new Promise(function(resolve,reject){var data;if(hashUrl in index_es_deferred){resolve(index_es_deferred[hashUrl]);return}if(index_es_deferred[hashUrl]=promise,options.hash&&(data=sessionStorage.getItem(hashUrl),data)){var deserialized=JSON.parse(data);if(options.hash===deserialized.options.hash){delete index_es_deferred[hashUrl],resolve(deserialized);return}}var xhr=new XMLHttpRequest;xhr.open("GET",requestUrl,!0),xhr.onload=function(){var el=xhr.response,newOptions={},optionsEl=el.querySelector("[data-options]");optionsEl&&optionsEl.innerHTML&&(newOptions=JSON.parse(el.querySelector("[data-options]").innerHTML));var htmlEls=el.querySelectorAll("[data-html]"),newHtml={};if(htmlEls.length===1&&htmlEls[0].getAttribute("data-html")==="")newHtml=htmlEls[0].innerHTML;else for(var i=0;i<htmlEls.length;i++)newHtml[htmlEls[i].getAttribute("data-html")]=htmlEls[i].innerHTML;var dataEls=el.querySelectorAll("[data-data]"),newData={};if(dataEls.length===1&&dataEls[0].getAttribute("data-data")==="")newData=JSON.parse(dataEls[0].innerHTML);else for(var _i=0;_i<dataEls.length;_i++)newData[dataEls[_i].getAttribute("data-data")]=JSON.parse(dataEls[_i].innerHTML);if(options.hash)try{sessionStorage.setItem(hashUrl,JSON.stringify({options:newOptions,data:newData,html:newHtml}))}catch(error){console.error(error)}delete index_es_deferred[hashUrl],resolve({data:newData,html:newHtml})},xhr.onerror=function(){delete index_es_deferred[hashUrl],reject()},xhr.responseType="document",xhr.send()});return promise}}]),AsyncView2})();const shopify_asyncview_dist_index_es=index_es_AsyncView;/*!
40 * @pixelunion/pxs-gift-card-recipient-form v1.0.0
41 * (c) 2023 Pixel Union
42 */function index_es_unwrapExports(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}function index_es_createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports}var index_es_EventHandler_1=index_es_createCommonjsModule(function(module,exports){exports.__esModule=!0;var EventHandler2=(function(){function EventHandler3(){this.events=[]}return EventHandler3.prototype.register=function(el,event2,listener){return!el||!event2||!listener?null:(this.events.push({el,event:event2,listener}),el.addEventListener(event2,listener),{el,event:event2,listener})},EventHandler3.prototype.unregister=function(_a){var el=_a.el,event2=_a.event,listener=_a.listener;return!el||!event2||!listener?null:(this.events=this.events.filter(function(e){return el!==e.el||event2!==e.event||listener!==e.listener}),el.removeEventListener(event2,listener),{el,event:event2,listener})},EventHandler3.prototype.unregisterAll=function(){this.events.forEach(function(_a){var el=_a.el,event2=_a.event,listener=_a.listener;return el.removeEventListener(event2,listener)}),this.events=[]},EventHandler3})();exports.default=EventHandler2}),index_es_EventHandler=index_es_unwrapExports(index_es_EventHandler_1);/*!
43   * @pixelunion/animations v0.1.0
44   * (c) 2019 Pixel Union
45   * Released under the UNLICENSED license.
46  */function pxs_gift_card_recipient_form_dist_index_es_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function pxs_gift_card_recipient_form_dist_index_es_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 pxs_gift_card_recipient_form_dist_index_es_createClass(Constructor,protoProps,staticProps){return protoProps&&pxs_gift_card_recipient_form_dist_index_es_defineProperties(Constructor.prototype,protoProps),staticProps&&pxs_gift_card_recipient_form_dist_index_es_defineProperties(Constructor,staticProps),Constructor}function raf(){return new Promise(function(resolve){window.requestAnimationFrame(resolve)})}var Animation=(function(){function Animation2(options){pxs_gift_card_recipient_form_dist_index_es_classCallCheck(this,Animation2),this._el=options.el,this.cancelRunning=null,this._state=options.state||"initial",this.initialState=this._state,this.stateAttribute=options.stateAttribute||"data-animation-state",this.stateChangeAttribute=options.stateChangeAttribute||"data-animation",this.endEvent=options.endEvent||"transitionend",this.hold=!!options.hold,this.onStart=options.onStart||function(){},this.activeEventHandler=null}return pxs_gift_card_recipient_form_dist_index_es_createClass(Animation2,[{key:"isState",value:function(state2){return state2===this._state}},{key:"animateTo",value:function(state2){var _this=this,options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},from=this._el.dataset[this.stateAttribute]||this._state,to=state2||this.initialState,force=options.force,hold="hold"in options?options.hold:this.hold;return new Promise(function(resolve){if(_this.cancelRunning&&_this.cancelRunning(),from===to){_this._el.removeAttribute(_this.stateChangeAttribute),resolve(from,null);return}var running=!0;if(_this.cancelRunning=function(){running=!1,resolve(null,null)},_this._el.removeEventListener(_this.endEvent,_this.activeEventHandler),_this.activeEventHandler=null,force){_this._el.setAttribute(_this.stateChangeAttribute,"".concat(from,"=>").concat(to)),_this.onStart({el:_this._el,from,to}),typeof options.onStart=="function"&&options.onStart({el:_this._el,from,to}),_this._el.setAttribute(_this.stateAttribute,to),_this._state=to,hold||_this._el.removeAttribute(_this.stateChangeAttribute),resolve(to,null);return}raf().then(function(){if(!running)throw new Error("cancelled");return _this._el.setAttribute(_this.stateChangeAttribute,"".concat(from,"=>").concat(to)),_this.onStart({el:_this._el,from,to}),typeof options.onStart=="function"&&options.onStart({el:_this._el,from,to}),raf()}).then(function(){if(!running)throw new Error("cancelled");_this._el.removeEventListener(_this.endEvent,_this.activeEventHandler),_this.activeEventHandler=function(e){e.target!==_this._el||!running||(_this._el.removeEventListener(_this.endEvent,_this.activeEventHandler),hold||_this._el.removeAttribute(_this.stateChangeAttribute),resolve(to,e))},_this._el.addEventListener(_this.endEvent,_this.activeEventHandler),_this._el.setAttribute(_this.stateAttribute,to),_this._state=to}).catch(function(error){if(error.message!=="cancelled")throw error})})}},{key:"unload",value:function(){this._el.removeEventListener(this.endEvent,this.activeEventHandler),this.activeEventHandler=null}},{key:"el",get:function(){return this._el}},{key:"state",get:function(){return this._state}}]),Animation2})();function transition(options){return new Animation(options)}class RecipientForm{constructor(el){this.el=el,this.events=new index_es_EventHandler,this.recipientForm=this.el.querySelector("[data-recipient-form]"),this.recipientFormInputs=this.el.querySelectorAll("[data-recipient-form-input]"),this.recipientFormEmailInput=this.el.querySelectorAll("[data-recipient-form-email-input]"),this.disclosure=this.el.querySelector("[data-recipient-disclosure]"),this.disclosureCheckbox=this.el.querySelector("[data-recipient-disclosure-checkbox]"),this.checkmark=this.disclosure.querySelector(".checkmark"),this.checkmarkCheck=this.disclosure.querySelector(".checkmark__check"),this.fillAnimation=transition({el:this.checkmark}),this.checkAnimation=transition({el:this.checkmarkCheck}),this.events.register(this.recipientForm,"keydown",event2=>this._onKeydown(event2)),this.events.register(this.disclosure,"toggle",()=>
46this._onToggle()),this.events.register(this.disclosureCheckbox,"change",()=>this._onChange())}_onChange(){this.disclosure.open=this.disclosureCheckbox.checked}_onKeydown(event2){event2.key==="Enter"&&event2.target.matches("[data-recipient-form-input]")&&event2.preventDefault()}_onToggle(){this.disclosure.open?this._showRecipientForm():this._hideRecipientForm()}_showRecipientForm(){this.checkmark&&this.checkmarkCheck&&(this.fillAnimation.animateTo("checked"),this.checkAnimation.animateTo("checked")),this.disclosureCheckbox.checked=!0,this.recipientFormEmailInput.forEach(el=>{el.required=!0})}_hideRecipientForm(){this.checkmark&&this.checkmarkCheck&&(this.fillAnimation.animateTo("unchecked"),this.checkAnimation.animateTo("unchecked")),this.disclosureCheckbox.checked=!1,this.recipientFormEmailInput.forEach(el=>{el.required=!1}),this._resetRecipientForm()}_resetRecipientForm(){this.recipientFormInputs.forEach(el=>{el.value="",el.classList.contains("form-field-filled")&&el.classList.remove("form-field-filled")}),this.recipientForm.classList.contains("recipient-form--has-errors")&&this.recipientForm.classList.remove("recipient-form--has-errors")}}const pxs_gift_card_recipient_form_dist_index_es=RecipientForm;class Product{static load(url){return shopify_asyncview_dist_index_es.load(url,{view:"quickshop"})}constructor($section){this._section=$section[0],this._data=window.PXUTheme.getSectionData($section),this.stickyOffset=20,window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0"},{name:"model-viewer-ui",version:"1.0"}],window.PXUTheme.productMedia.setupMedia);const priceUIEl=$section[0].querySelector("[data-price-ui]"),priceUIBadgeEl=$section[0].querySelector("[data-price-ui-badge]"),surfacePickUpEl=$section[0].querySelector("[data-surface-pick-up]"),complementaryProductsEl=$section[0].querySelector("[data-complementary-products]");this._section.querySelector("[data-recipient-form]")&&(this.recipientForm=new pxs_gift_card_recipient_form_dist_index_es(this._section)),this.variantSelection=$section[0].querySelector("[data-variant-selection]"),this.variantSelection&&(this.variantSelection.addEventListener("variant-change",event2=>this._switchVariant(event2.detail.product,event2.detail.variant,event2.detail.state)),surfacePickUpEl&&(this.surfacePickUp=new shopify_surface_pick_up_dist_index_es(surfacePickUpEl),this.surfacePickUp.onModalRequest(contents=>{Promise.all([this.variantSelection.getProduct(),this.variantSelection.getVariant()]).then(([product,variant])=>{const surfacePickUpModal=$section[0].querySelector("[data-surface-pick-up-modal]"),fragment=document.createDocumentFragment(),header=document.createElement("div"),title=document.createElement("span"),subtitle=document.createElement("span");header.classList.add("surface-pick-up__modal-header"),title.classList.add("surface-pick-up__modal-title"),subtitle.classList.add("surface-pick-up__modal-subtitle"),title.innerHTML=product.title,subtitle.innerHTML=variant.title,header.appendChild(title),variant.title!=="Default Title"&&header.appendChild(subtitle),fragment.appendChild(header),surfacePickUpModal.innerHTML=contents,surfacePickUpModal.insertBefore(fragment,surfacePickUpModal.firstChild),$.fancybox.open(surfacePickUpModal,{hash:!1,infobar:!1,toolbar:!1,loop:!0,smallBtn:!0,buttons:[],touch:!1,video:{autoStart:!1},mobile:{preventCaptionOverlap:!1,toolbar:!0},beforeShow:()=>{document.body.style.top=`-${window.scrollY}px`,document.body.style.position="fixed"},beforeClose:()=>{const scrollY=document.body.style.top;document.body.style.position="",document.body.style.top="",window.scrollTo(0,parseInt(scrollY||0,10)*-1)}})})}))),priceUIEl&&(this.priceUI=new PriceUI(priceUIEl)),priceUIBadgeEl&&(this.priceUIBadge=new PriceUIBadge(priceUIBadgeEl));const $productGallery=$section.find(".product-gallery__main"),$stickyElement=$section.find(".sticky-product-scroll");$productGallery&&(this.enableSlideshow($productGallery),this._data.enable_zoom&&document.addEventListener("lazyloaded",this.enableZoom),this._data.enable_product_lightbox&&this.enableLightbox($productGallery)),complementaryProductsEl&&(this.complementaryProducts=new dist_index_es({sectionEl:this._section,sectionId:this._data.section_id,productId:this._data.product.id,productRecommendationsRoute:window.PXUTheme.routes.product_recommendations_url,includeIndicatorDots:!0,limit:this._data.product_recommendation_limit,arrowShape:"M 95.04 46 21.68 46 48.18 22.8 42.91 16.78 4.96 50 42.91 83.22 48.18 77.2 21.68 54 95.04 54 95.04 46z"})),$stickyElement&&window.isScreenSizeLarge()&&this._data.template==="image-scroll"&&this.enableStickyScroll($stickyElement,$productGallery),window.location.search==="?contact_posted=true"&&($(".notify_form .contact-form").hide(),$(".notify_form .contact-form").prev(".message").html(window.PXUTheme.translation.notify_form_success)),$(".masonry--true").length>0&&window.PXUTheme.applyMasonry(".thumbnail"),this.variantSelection&&Promise.all([this.variantSelection.getProduct(),this.variantSelection.getVariant(),this.variantSelection.getState()]).then(([product,variant,state2])=>this._switchVariant(product,variant,state2))}enableStickyScroll($stickyElement,$productGallery){let announcementHeight=0,headerHeight=0;typeof window.PXUTheme.jsAnnouncementBar<"u"&&window.PXUTheme.jsAnnouncementBar.enable_sticky&&(announcementHeight=$("#announcement-bar").outerHeight()),window.PXUTheme.theme_settings.header_layout!=="vertical"&&window.PXUTheme.jsHeader.enable_sticky&&(headerHeight=$("#header").outerHeight()),$productGallery.data("media-count")>1&&$stickyElement.stick_in_parent({offset_top:announcementHeight+headerHeight+this.stickyOffset})}enableLightbox($productGallery){$productGallery.find(".product-gallery__link").fancybox({beforeClose:instance=>{const $instanceGallery=instance.$trigger.first().parents(".product-gallery__main");$instanceGallery.hide(),setTimeout(()=>$instanceGallery.fadeIn(100),500)},afterClose:()=>{setTimeout(()=>{$productGallery.find(".is-selected a").focus()},500)}})}enableZoom(){const $image=$(event.target),zoomSrc=$image.data("zoom-src");zoomSrc&&$image.wrap('<span class="zoom-container"></span>').css("display","block").parent().zoom({url:zoomSrc,touch:!1,magnify:1})}disableSlideshow($section,selector){let $slider;$section?$slider=$section.find(".flickity-enabled"):$slider=$(selector),$slider.flickity("destroy")}enableSlideshow(selector,settings){const $productGallery=selector,$thumbnailProductGallery=$productGallery.closest(".product-gallery").find(".product-gallery__thumbnails"),$slides=$productGallery.find(".product-gallery__image"),$thumbnails=$thumbnailProductGallery.find(".product-gallery__thumbnail");function autoplayVideo(videoID,$slide){$.each(window.videoPlayers,(_,player2)=>{player2.id===videoID&&(player2.play(),player2.on("exitfullscreen",()=>$slide.closest(".product-gallery").find(".product-gallery__thumbnails").focus()))})}function autoplayYoutubeVideo(iframeID,$slide){$.each(window.videoPlayers,(_,player2)=>{player2.playing&&player2.pause(),player2.media.id===iframeID&&(player2.play(),player2.on("exitfullscreen",()=>$slide.closest(".product-gallery").find(".product-gallery__thumbnails").focus()))})}function checkForVideos(){$slides.each((index,slide2)=>{const $slide=$(slide2),mediaType=$slide.data("media-type")||$slide.find("[data-media-type]").data("media-type");let videoID=$slide.find("video").data("plyr-video-id");const iframeID=$slide.find("iframe").attr("id");
46$slide.hasClass("is-selected")&&(mediaType==="video"?(videoID=$slide.find("video").data("plyr-video-id"),videoID&&autoplayVideo(videoID,$slide)):mediaType==="external_video"&&iframeID&&autoplayYoutubeVideo(iframeID,$slide))})}$productGallery.find(".gallery-cell:not(.product-gallery__image)").addClass("product-gallery__image"),$thumbnailProductGallery.find(".gallery-cell:not(.product-gallery__thumbnail)").addClass("product-gallery__thumbnail");const{thumbnails_enabled:thumbnailsEnabled,enable_thumbnail_slider:thumbnailsSliderEnabled,thumbnail_position:thumbnailsPosition,gallery_arrows:arrowsEnabled,slideshow_speed:slideshowSpeed,slideshow_transition:slideshowTransition}=settings||this._data;$productGallery.on("ready.flickity",()=>{$slides.each((index,slide2)=>{const mediaType=$(slide2).data("media-type")||$(slide2).find("[data-media-type]").data("media-type");let videoID;const videoLooping=$("[data-video-loop]").data("video-loop"),{videoPlayers}=window;switch(mediaType){case"external_video":if(videoID=$(slide2).find("[data-plyr-video-id]").data("plyr-video-id"),videoPlayers)for(let i=0;i<videoPlayers.length;i++)(videoPlayers[i].id===videoID||videoPlayers[i].media.id===videoID)&&(videoPlayers[i].loop=videoLooping,$(slide2).hasClass("is-selected")||(videoPlayers[i].keyboard={focused:!1,global:!1}));break;case"video":if(videoID=$(slide2).find("[data-plyr-video-id]").data("plyr-video-id"),videoPlayers)for(let i=0;i<videoPlayers.length;i++)(videoPlayers[i].id===videoID||videoPlayers[i].media.id===videoID)&&(videoPlayers[i].loop=videoLooping,$(slide2).hasClass("is-selected")||(videoPlayers[i].keyboard={focused:!0,global:!1}));break;case"model":$(slide2).hasClass("is-selected")&&mediaType==="model"&&window.isScreenSizeLarge()&&($(slide2).on("mouseenter",()=>$productGallery.flickity("unbindDrag")),$(slide2).on("mouseleave",()=>$productGallery.flickity("bindDrag")));break;default:break}$(slide2).keypress(event2=>{event2.which===13&&($(slide2).find("model-viewer, .product-gallery__link, .plyr").focus(),(mediaType==="video"||mediaType==="external_video")&&checkForVideos())})})}),$productGallery.flickity({wrapAround:!0,adaptiveHeight:!0,dragThreshold:10,imagesLoaded:!0,pageDots:!0,prevNextButtons:$productGallery.data("media-count")>1||$slides.length>1,autoPlay:slideshowSpeed*1e3,fade:slideshowTransition==="fade",watchCSS:this._data.template==="image-scroll"&&!$productGallery.hasClass("js-gallery-modal"),arrowShape:"M 10,50 L 60,100 L 70,90 L 30,50  L 70,10 L 60,0 Z"}),$productGallery.on("change.flickity",()=>{$slides.each((index,slide2)=>{const mediaType=$(slide2).data("media-type")||$(slide2).find("[data-media-type]").data("media-type");if($(slide2).hasClass("is-selected"))mediaType==="model"?(window.isScreenSizeLarge()&&($(slide2).on("mouseenter",()=>$productGallery.flickity("unbindDrag")),$(slide2).on("mouseleave",()=>$productGallery.flickity("bindDrag"))),$(slide2).find("model-viewer").on("shopify_model_viewer_ui_toggle_play",()=>$productGallery.flickity("unbindDrag")),$(slide2).find("model-viewer").on("shopify_model_viewer_ui_toggle_pause",()=>$productGallery.flickity("bindDrag"))):$productGallery.flickity("bindDrag");else switch(mediaType){case"external_video":$.each(window.videoPlayers,(_,player2)=>player2.pause());break;case"video":$.each(window.videoPlayers,(_,player2)=>player2.pause());break;case"model":$.each(window.PXUTheme.productMedia.models,(_,model)=>model.pause());break;default:break}}),window.PXUTheme.productMedia.showModelIcon($productGallery)});const $sliderArrows=$productGallery.find(".flickity-prev-next-button");($sliderArrows||$thumbnails)&&window.isScreenSizeLarge()?($sliderArrows.on("click",()=>($productGallery.on("settle.flickity",()=>{const $selectedSlide=$productGallery.find(".product-gallery__image.is-selected"),mediaType=$selectedSlide.data("media-type")||$selectedSlide.find("[data-media-type]").data("media-type"),pId=$productGallery.data("product-id");if((mediaType==="video"||mediaType==="external_video")&&checkForVideos(),mediaType==="model"){const sortedModels=[];$.each(window.PXUTheme.productMedia.models,(index,model)=>{$(model.container).closest(".product-gallery__image").data("product-id")===pId&&sortedModels.push(model)}),$.each(sortedModels,(index,model)=>{$(model.container).parents(".product-gallery__image").hasClass("is-selected")&&model.play()})}$productGallery.off("settle.flickity")}),!1)),$thumbnails.on("click",event2=>{const index=$(event2.currentTarget).index();return $productGallery.flickity("select",index),$productGallery.on("settle.flickity",()=>{const $selectedSlide=$productGallery.find(".product-gallery__image.is-selected"),mediaType=$selectedSlide.data("media-type")||$selectedSlide.find("[data-media-type]").data("media-type"),pId=$productGallery.data("product-id");
46if((mediaType==="video"||mediaType==="external_video")&&checkForVideos(),mediaType==="model"){const sortedModels=[];$.each(window.PXUTheme.productMedia.models,(_,model)=>{$(model.container).closest(".product-gallery__image").data("product-id")===pId&&sortedModels.push(model)}),$.each(sortedModels,(_,model)=>{$(model.container).parents(".product-gallery__image").hasClass("is-selected")&&model.play()})}$productGallery.off("settle.flickity")}),!1}),$thumbnails.keypress(event2=>{const index=$(event2.currentTarget).index();if(event2.which===13){$productGallery.flickity("select",index);const $selectedSlide=$productGallery.find(".product-gallery__image.is-selected"),pId=$productGallery.data("product-id");$productGallery.on("settle.flickity",()=>{$selectedSlide.find("model-viewer, .plyr, a").focus(),$selectedSlide.find("[data-youtube-video]").attr("tabindex","0"),$productGallery.off("settle.flickity")});const mediaType=$selectedSlide.data("media-type");if((mediaType==="video"||mediaType==="external_video")&&checkForVideos(),mediaType==="model"){const sortedModels=[];$.each(window.PXUTheme.productMedia.models,(_,model)=>{$(model.container).closest(".product-gallery__image").data("product-id")===pId&&sortedModels.push(model)}),$.each(sortedModels,(_,model)=>{$(model.container).parents(".product-gallery__image").hasClass("is-selected")&&model.play()})}}})):thumbnailsEnabled&&$thumbnailProductGallery.find(".product-gallery__thumbnail").on("click",event2=>{const index=$(event2.currentTarget).index();$productGallery.flickity("selectCell",index)}),$productGallery.on("settle.flickity",()=>$productGallery.flickity("resize")),$(window).on("load",()=>$productGallery.flickity("resize"));let resizeTimer;if($(window).on("resize",()=>{clearTimeout(resizeTimer),resizeTimer=setTimeout(()=>$productGallery.flickity("resize"),250)}),thumbnailsEnabled===!0&&thumbnailsSliderEnabled===!0&&$slides.length>1)if(window.isScreenSizeLarge())if(thumbnailsPosition==="right-thumbnails"||thumbnailsPosition==="left-thumbnails"){$thumbnailProductGallery.addClass("vertical-slider-enabled");const navCellHeight=$thumbnails.height(),navHeight=$thumbnailProductGallery.height();$(window).on("load",()=>{const $productGalleryHeight=$productGallery.height();$thumbnailProductGallery.css("max-height",$productGalleryHeight)}),$(window).on("resize",()=>{$productGallery.flickity("resize");const $productGalleryHeight=$productGallery.height();$thumbnailProductGallery.css("max-height",$productGalleryHeight)}),$productGallery.on("change.flickity",()=>{$productGallery.flickity("resize");const $productGalleryHeight=$productGallery.height();$thumbnailProductGallery.css("max-height",$productGalleryHeight)}),$productGallery.on("select.flickity",()=>{const flkty=$productGallery.data("flickity");if(flkty){$thumbnailProductGallery.find(".is-nav-selected").removeClass("is-nav-selected");const scrollY=$thumbnails.eq(flkty.selectedIndex).addClass("is-nav-selected").position().top+$thumbnailProductGallery.scrollTop()-(navHeight+navCellHeight)/2;$thumbnailProductGallery.animate({scrollTop:scrollY})}})}else $thumbnailProductGallery.flickity({cellAlign:"center",contain:!0,groupCells:"80%",imagesLoaded:!0,pageDots:!1,prevNextButtons:$thumbnails.length>5?arrowsEnabled:!1,asNavFor:this._data.template==="image-scroll"&&window.isScreenSizeLarge()?"":$productGallery[0],arrowShape:window.arrowShape}),$thumbnailProductGallery.on("settle.flickity",()=>$thumbnailProductGallery.flickity("resize")),$(window).on("load",()=>$thumbnailProductGallery.flickity("resize"));else $thumbnailProductGallery.flickity({cellAlign:"center",contain:!0,groupCells:"80%",imagesLoaded:!0,pageDots:!1,prevNextButtons:$thumbnails.length>5,asNavFor:this._data.template==="image-scroll"&&window.isScreenSizeLarge()?"":$productGallery[0],arrowShape:window.arrowShape})}scrollSelectedImage(variant){let headerHeight=0,announceHeight=0;window.PXUTheme.jsHeader.enable_sticky===!0&&window.PXUTheme.theme_settings.header_layout!=="vertical"&&(headerHeight=window.PXUTheme.jsHeader.getHeaderHeight()),typeof window.PXUTheme.jsAnnouncementBar<"u"&&window.PXUTheme.jsAnnouncementBar.enable_sticky===!0&&window.PXUTheme.theme_settings.header_layout!=="vertical"&&(announceHeight=window.PXUTheme.jsAnnouncementBar.getAnnouncementHeight());const totalHeight=headerHeight+announceHeight+this.stickyOffset;window.PXUTheme.scrollToTop($(`[data-index="${variant}"]`),totalHeight)}unload($section){$(".selector-wrapper select",$section).unwrap(),this.disableSlideshow($section),$("[data-variant-selector]").off(),document.removeEventListener("lazyloaded",this.enableZoom)}_switchVariant(product,variant,state2){if(window.selectCallback(this._section.querySelector(`.product-${product.id}`),product,variant,state2),this.priceUI){const formatter=price=>price===0?window.PXUTheme.translation.free_price_text:Shopify.formatMoney(price,$("body").data("money-format"));this.priceUI.load(product,{variant,formatter,handler:(priceUIFragment,p,{variant:v})=>
46{if(state2==="unavailable")return document.createDocumentFragment();if(v&&v.available){const shopPayInstallmentsTemplate=this._section.querySelector("[data-shop-pay-installments-template] shopify-payment-terms");let shopPayInstallEl=null;if(shopPayInstallmentsTemplate&&(shopPayInstallEl=shopPayInstallmentsTemplate.cloneNode(!0),shopPayInstallEl.setAttribute("variant-id",variant.id)),this._data.display_savings&&v.compare_at_price>v.price){const span=document.createElement("span");span.classList.add("sale","savings"),span.innerHTML=`${window.PXUTheme.translation.product_savings} ${Math.round(parseFloat((v.compare_at_price-v.price)*100/v.compare_at_price,10))}% (<span class="money">${formatter(v.compare_at_price-v.price)}</span>)`,priceUIFragment.appendChild(span)}shopPayInstallEl&&priceUIFragment.appendChild(shopPayInstallEl)}if(window.PXUTheme.currencyConverter){const moneyEls=priceUIFragment.querySelectorAll(".money");for(let i=0;i<moneyEls.length;i++)window.PXUTheme.currencyConverter.update(moneyEls[i])}return priceUIFragment}})}if(this.priceUIBadge&&this.priceUIBadge.load(product,{variant,formatter:price=>price,style:"",handler:()=>{const fragment=document.createDocumentFragment(),sticker=this.priceUIBadge._el.parentNode,stickerText=document.createElement("span");stickerText.classList.add("thumbnail-sticker__text");let text;return variant&&variant.available?variant.compare_at_price>variant.price?(sticker.classList.remove("thumbnail-sticker--hidden"),sticker.classList.contains("thumbnail-sticker--sold-out")?sticker.classList.replace("thumbnail-sticker--sold-out","thumbnail-sticker--sale"):sticker.classList.add("thumbnail-sticker--sale"),text=window.PXUTheme.translation.sale):(sticker.classList.add("thumbnail-sticker--hidden"),text=""):variant&&!variant.available&&(sticker.classList.remove("thumbnail-sticker--hidden"),sticker.classList.contains("thumbnail-sticker--sale")?sticker.classList.replace("thumbnail-sticker--sale","thumbnail-sticker--sold-out"):sticker.classList.add("thumbnail-sticker--sold-out"),text=window.PXUTheme.translation.sold_out),stickerText.innerHTML=text,fragment.appendChild(stickerText),fragment}}),this.surfacePickUp&&this.surfacePickUp.load(variant?variant.id:null),this._section.classList.contains("product-template")&&product.variants.length>1&&this._updateHistory(variant),this._data.template==="image-scroll"&&variant.featured_media){const imagePosition=variant.featured_media.position-1;this.scrollSelectedImage(imagePosition)}}_updateHistory(variant){const url=new URL(window.location);variant.id&&url.searchParams.set("variant",variant.id),window.history.replaceState({},"",url)}}window.PXUTheme.jsProductClass=Product,window.PXUTheme.jsProduct={init($section){return new Product($section)},relatedProducts(){$(".js-related-products-slider .products-slider").each((_,slider)=>{const $relatedSlider=$(slider),slideData={products_per_slide:$relatedSlider.data("products-per-slide"),products_available:$relatedSlider.data("products-available"),products_limit:$relatedSlider.data("products-limit"),initialIndex:0,cellAlign:"left",wrapAround:!0};slideData.products_available>slideData.products_per_slide&&slideData.products_limit>slideData.products_per_slide?slideData.wrapAround=!0:slideData.wrapAround=!1,slideData.products_available<slideData.products_per_slide||slideData.products_limit<slideData.products_per_slide?($relatedSlider.addClass("container is-justify-center"),$relatedSlider.find(".gallery-cell").addClass("column")):($relatedSli
46der.flickity({lazyLoad:2,freeScroll:!0,imagesLoaded:!0,draggable:!0,cellAlign:"center",wrapAround:slideData.wrapAround,pageDots:!1,contain:!0,prevNextButtons:slideData.products_limit>slideData.products_per_slide,initialIndex:slideData.initialIndex,arrowShape:window.arrowShape}),$relatedSlider.on("settle.flickity",()=>$relatedSlider.flickity("resize")),$(window).on("load",()=>$relatedSlider.flickity("resize")))})}}})();
47//# sourceMappingURL=/cdn/shop/t/353/assets/z__jsProduct.js.map?v=134115529022496882741779814679

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.