;(function(){"use strict";var Z=Object.defineProperty;var K=(t,e,n)=>e in t?Z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var b=(t,e,n)=>(K(t,typeof e!="symbol"?e+"":e,n),n);async function DEPRECATED_handleFeaturedProductPrice(){const t=window.jQuery;!t||t('[data-pf-type="Shopify.FeaturedProduct"]').each((e,n)=>{t(n).find(".product__variants select").on("change",r=>{const o=t(r.target),s=o.closest(".pf-feature-product__infos").find(".pf-fp-pr"),c=o.find(":selected"),d=c.data("regular"),l=c.data("sale"),u=c.data("image");let f=r.target;for(;f&&f.nodeName!=="BODY"&&!f.querySelector(".pf-c");)f=f.parentNode;l?(s.addClass("pf-p-hs"),parseInt(l)!==parseInt(d)?s.find(".pf-p-prr").removeClass("hide").html(l):s.find(".pf-p-prr").addClass("hide"),s.find(".pf-p-prs").html(d)):(s.find(".pf-p-prr").addClass("hide"),s.find(".pf-p-prs").html(d)),u&&f.querySelector(".pf-feature-product__image img")&&f.querySelector(".pf-feature-product__image img").setAttribute("src",u)})})}async function handleDEPRECATEDelements(){DEPRECATED_handleFeaturedProductPrice().catch(console.log)}class PageFlyHelperStore{constructor(){b(this,"cart",{});b(this,"_listeners",[]);b(this,"lastATCResult",{});b(this,"autoCartUpdate",!0)}subscribe(e){this._listeners.push(e)}unsubscribe(e){this._listeners=this._listeners.filter(n=>n!==e)}update(e){this._listeners.forEach(n=>n(e))}set(e,n){this[e]=n,this.update()}}const defaultStyle=[],ShadesOfGrey=[{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}],SubtleGrayscale=[{featureType:"administrative",elementType:"all",stylers:[{saturation:"-100"}]},{featureType:"administrative.province",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",elementType:"all",stylers:[{saturation:-100},{lightness:"50"},{visibility:"simplified"}]},{featureType:"road",elementType:"all",stylers:[{saturation:"-100"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"all",stylers:[{lightness:"30"}]},{featureType:"road.local",elementType:"all",stylers:[{lightness:"40"}]},{featureType:"transit",elementType:"all",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]},{featureType:"water",elementType:"labels",stylers:[{lightness:-25},{saturation:-100}]}],UltraLight=[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}],BrightColors=[{featureType:"all",elementType:"all",stylers:[{saturation:"32"},{lightness:"-3"},{visibility:"on"},{weight:"1.18"}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.man_made",elementType:"all",stylers:[{saturation:"-70"},{lightness:"14"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{saturation:"100"},{lightness:"-14"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"off"},{lightness:"12"}]}];var LIST_LAYOUT=(t=>(t[t.GRID=0]="GRID",t[t.SLIDE=1]="SLIDE",t))(LIST_LAYOUT||{}),HOVER_ACTION=(t=>(t[t.NONE=0]="NONE",t[t.MAGNIFIER=1]="MAGNIFIER",t[t.HOVER=2]="HOVER",t))(HOVER_ACTION||{}),ON_HOVER=(t=>(t[t.NEXT_IMAGE=0]="NEXT_IMAGE",t[t.LAST_IMAGE=1]="LAST_IMAGE",t[t.RANDOM_IMAGE=2]="RANDOM_IMAGE",t[t.ALL_IMAGE=3]="ALL_IMAGE",t))(ON_HOVER||{}),CLICK_ACTION=(t=>(t[t.NONE=0]="NONE",t[t.LINK_TO_PRODUCT=1]="LINK_TO_PRODUCT",t[t.SHOW_FULLSCREEN=2]="SHOW_FULLSCREEN",t))(CLICK_ACTION||{});const DEVICES_MAP={laptop:{from:1025,to:1200},tablet:{from:768,to:1024},mobile:{from:0,to:767}},REGEX_CHECK_LAST_WORD_BEFORE_UNDERSCORE=/_(\d+)(?!.*_)/,DATE_FORMATS_METAFIELD={"%m-%d-%Y":"MM-dd-yyyy","%d-%m-%Y":"dd-MM-yyyy","%Y-%m-%d":"yyyy-MM-dd","%m/%d/%Y":"MM/dd/yyyy","%d/%m/%Y":"dd/MM/yyyy","%Y/%m/%d":"yyyy/MM/dd","%B %e, %Y":"MMMM d, yyyy","%e %B, %Y":"d MMMM, yyyy","%d %b, %Y":"dd MMM, yyyy"},TIME_FORMATS_METAFIELD={"%I:%M %p":"KK:mm a","%H:%M":"HH:mm"},TYPE_METAFIELD={COLOR_FIELD:"color",DATE_FIELD:"date",DATE_TIME_FIELD:"date_time",SINGLE_LINE_TEXT_FIELD:"single_line_text_field",MULTI_LINE_TEXT_FIELD:"multi_line_text_field",NUMBER_INTEGER_FIELD:"number_integer",NUMBER_DECIMAL_FIELD:"number_decimal",URL_FIELD:"url",DIMENSION_FIELD:"dimension",VOLUME_FIELD:"volume",WEIGHT_FIELD:"weight",RATING_FIELD:"rating",FILE_REFERENCE_FIELD:"file_reference",IMAGE_REFERENCE_FIELD:"image_reference",PAGE_REFERENCE_FIELD:"page_reference",PRODUCT_REFERENCE_FIELD:"product_reference",VARIANT_REFERENCE_FIELD:"variant_reference",LIST_COLOR_FIELD:"list.color",LIST_DATE_TIME_FIELD:"list.date_time",LIST_DATE_FIELD:"list.date",LIST_NUMBER_INTEGER_FIELD:"list.number_integer",LIST_NUMBER_DECIMAL_FIELD:"list.number_decimal",LIST_VARIANT_REFERENCE_FIELD:"list.variant_reference",LIST_PRODUCT_REFERENCE_FIELD:"list.product_reference",LIST_FILE_REFERENCE_FIELD:"list.file_reference",LIST_PAGE_REFERENCE_FIELD:"list.page_reference",LIST_IMAGE_REFERENCE_FIELD:"list.image_reference",LIST_META_OBJECT_FIELD:"list.metaobject_reference",LIST_WEIGHT_FIELD:"list.weight",LIST_VOLUME_FIELD:"list.volume",LIST_RATING_FIELD:"list.rating",LIST_DIMENSION_FIELD:"list.dimension",LIST_SINGLE_LINE_TEXT_FIELD:"list.single_line_text_field",LIST_URL_FIELD:"list.url",BOOLEAN_FIELD:"boolean",RICH_TEXT_FIELD:"rich_text_field",JSON_FIELD:"json",META_OBJECT_FIELD:"metaobject_reference",MONEY_FIELD:"money"},UNIT_MAPPING_METAFIELD={MILLIMETERS:"mm",CENTIMETERS:"cm",METERS:"m",INCHES:"in",FEET:"ft",YARDS:"yd",MILLILITERS:"ml",CENTILITERS:"cl",LITERS:"l",CUBIC_METERS:"m\xB3",FLUID_OUNCES:"fl oz",PINTS:"pt",QUARTS:"qt",GALLONS:"gal",IMPERIAL_FLUID_OUNCES:"fl oz imp",IMPERIAL_PINTS:"pt imp",IMPERIAL_QUARTS:"qt imp",IMPERIAL_GALLONS:"gal imp",KILOGRAMS:"kg",GRAMS:"g",POUNDS:"lb",OUNCES:"oz",m3:"m\xB3",us_fl_oz:"fl oz",us_pt:"pt",us_qt:"qt",us_gal:"gal",imp_fl_oz:"fl oz imp",imp_pt:"pt imp",imp_qt:"qt imp",imp_gal:"gal imp"},VALUE_NOT_SATISFY_METAFIELD=[void 0,null],leftIcon=` `,rightIcon=` `,videoIcon=` `,modelIcon=` `,ATC_PF_ANALYTICS_ID="__pf_analytics_orderitem_id",pageflyProducts=window.__pageflyProducts||{},pageflyProductCollections=window.__pagefly_product_collections||{},OUTSIDE_BOX_KEY="outside",__pagefly_product_store__=window.__pagefly_product_store__=new PageFlyHelperStore,__pagefly_helper_store__$1=window.__pagefly_helper_store__=new PageFlyHelperStore,MapStyles={default:defaultStyle,ShadesOfGrey,UltraLight,SubtleGrayscale,BrightColors},modalDataCss=".pf-m{display:none;top:50%;left:50%;transform:translate(-50%,-50%);max-height:min(calc(9/16*100vw), calc(100% - 6px - 2em));-webkit-overflow-scrolling:touch;overflow:hidden;background:0 0;border:none;margin:0;padding:0;flex-direction:column;align-items:flex-end}.pf-m::backdrop{background:rgba(0,0,0,.9);opacity:1}.pf-m iframe{border:0;}.pf-m>img{max-width:90vw;max-height:90vh;vertical-align:middle}.pf-close-btn{height:16px;background:none;border:none;margin-bottom:8px;padding:0;cursor:pointer}.pf-close-btn:focus-visible{box-shadow:none;}svg{pointer-events:none}",STARTED_VERSION_USING_THEME_APP_EXTENSION="3.0.0",getDevice=()=>{const{innerWidth:t}=window;return Object.keys(DEVICES_MAP).find(e=>{const{from:n,to:a}=DEVICES_MAP[e];return t>=n&&t<=a})||"all"},getElemIdByClassname=t=>t?t.split(" ").find(e=>e.match(/pf-(\d)+_|pf-(\w+)-(\d)+_/)):null;function debounce$1(t,e,n=!1){let a;return function(){const r=this,o=arguments,i=function(){a=null,n||t.apply(r,o)},s=n&&!a;clearTimeout(a),a=setTimeout(i,e),s&&t.apply(r,o)}}async function getHttpRequest(t){return new Promise((e,n)=>{const a=new XMLHttpRequest;a.open("GET",t,!0),a.onload=()=>a.status===200?e(a.response):n(Error(a.statusText)),a.onerror=r=>n(Error(`Network Error: ${r}`)),a.send()})}const initZoomImage=t=>{const e=t.querySelector("img"),n=e.src;if(!n)return;const a={width:e.width,height:e.height},r=document.createElement("div");r.className="zoom-image",r.style.cssText=` background: url('${n}') no-repeat center/contain; z-index: 1; width: ${e.width}px; height: ${e.height}px; position: absolute; top: 0; `,!!t.querySelector("div.zoom-image")||t.insertBefore(r,t.firstElementChild.nextSibling),t.addEventListener("mouseenter",function(){e.style.display="none",r.style.backgroundSize="150%",r.style.width="100%",r.style.height="100%"}),t.addEventListener("mousemove",function(i){const s=this.getBoundingClientRect(),c=i.clientX-s.left,d=i.clientY-s.top,l=Math.round(100/(s.width/c)),u=Math.round(100/(s.height/d));r.style.backgroundPosition=`${l}% ${u}%`}),t.addEventListener("mouseleave",function(){t.querySelector("div.zoom-image").style.display!=="none"&&(e.style.display="inline"),r.style.backgroundSize="contain",r.style.backgroundPosition="center",r.style.width=`${a.width}px`,r.style.height=`${a.height}px`})},initZoomImage2=t=>{const e=t.querySelector("img"),n=e.parentElement;n.addEventListener("mouseenter",function(){e.style.opacity=0,n.style.backgroundImage=`url("${e.currentSrc}")`,n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="200%"}),n.addEventListener("mousemove",function(a){var d,l;let r,o;const i=a.currentTarget;a.offsetX?r=a.offsetX:r=(d=a.touches)==null?void 0:d[0].pageX,a.offsetY?o=a.offsetY:r=(l=a.touches)==null?void 0:l[0].pageX;const s=r/i.offsetWidth*100,c=o/i.offsetHeight*100;i.style.backgroundPosition=`${s}% ${c}%`}),n.addEventListener("mouseleave",function(){e.style.opacity=1,n.style.backgroundImage=""})},getMobileOS=()=>{const t=navigator.userAgent;return/android/i.test(t)?"Android":/iPad|iPhone|iPod/.test(t)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1?"iOS":"Other"},checkARCompatible=t=>{if(t==="Android")return"xr"in window.navigator;if(t==="iOS"){let e=!1;return document.createElement("a").relList.supports("ar")&&(e=!0),e}return!1};function getPageTypeFromPFPageSetting(){var t;return pfPageSetting.pageType||((t=window.__pagefly_setting__)==null?void 0:t.pageType)}const TIMER_OUT=1500,timeoutPromise=(t=TIMER_OUT)=>new Promise(e=>{setTimeout(e,t)}),isTrackingActive=()=>{var t,e,n;return(((t=window.__pagefly_analytics_settings__)==null?void 0:t.acceptNewTracking)||((e=window.__pagefly_analytics_settings__)==null?void 0:e.acceptTracking))&&!window.location.href.includes("preview?id=")&&(typeof((n=window.Shopify.customerPrivacy)==null?void 0:n.userCanBeTracked)=="function"?window.Shopify.customerPrivacy.userCanBeTracked():!0)},truncateText=(t,e,n)=>{if(!e)return t;const a="[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B",r=new RegExp(a),o=!!t.match(r);let i=t,s=t.replace(/<[^>]*>/g," ").trim();if(o){const d=new RegExp(`(${a})`,"g");i=i.replace(d," $1"),s=s.replace(d," $1")}s=s.match(/\S+/g);let c=[];if(s&&s.length>e){const d=i.replace(//g,"> ").split(/\s/);let l=0;for(let f=0;f]*>/g,"").replace(/^[^>]*>/g,"").replace(/<[^>]*$/g,"");if(s[0]===v){const y=s.splice(0,1)[0];!v.match(/^&[a-z0-9]+;$/i)&&(v.length>1||v.match(/[a-z0-9]/i)||v.match(r))&&![""," ","`","-","=","~","!","@","#","$","%","^","&","*","(",")","_","+","[","]","\\",";","'",",",".","/","{","}","|",":",'"',"<",">","?"].includes(v)&&(l++,n&&l===e&&(h=h.replace(y,`${y}…`)))}c.push(h)}c=c.join(" ").replace(/ /g,">"),o&&(c=c.replace(new RegExp(` (${a})`,"g"),"$1"));const u=c.match(/<[^>]*>/g);if(u){const f=[];u.forEach(h=>{if(h.match(/\/>$/)||h.match(//))return;let v=h.match(/^<([a-z0-9\-_]+)/i);if(v)return f.push(v[1].toLowerCase());if(v=h.match(/^<\/([a-z0-9\-_]+)>/i),v&&v[1].toLowerCase()===f[f.length-1])return f.pop()}),f.length&&f.reverse().forEach(h=>{c+=``})}return c}return t},textToJsonUseVal=inputText=>{try{const jsonString=`{"data": ${inputText}}`,jsonObject=eval(`(${jsonString})`);return jsonObject.data}catch(t){return console.error("===> Error textToJsonUseVal:",t),null}};function hideElementIfNotFound(t,e){const n=t.length,a=e.length;if(n>a)for(let r=a;r{var a;const e=getElemIdByClassname(t.className);return(((a=window.__pagefly_setting__)==null?void 0:a.elementData)||{})[e]},pageflyLivePageRedirect=t=>{var a;const e=(a=window.Shopify)==null?void 0:a.designMode,n=e?window.location:window.top.location;console.log("PageFly:: redirect data:",{url:t,isInShopifyThemeEditor:e}),n.href=t};window.__pagefly__.pageflyLivePageRedirect=pageflyLivePageRedirect;const appProxyUrl="/apps/pagefly";function getDefaultRequestConfig(){return JSON.parse(JSON.stringify({credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;"}}))}function fetchJSON(t,e){return fetch(t,e).then(n=>n.json())}function getCart(){return fetchJSON("/cart.js",getDefaultRequestConfig())}function cartAddFromForm(t){var n,a;const e=getDefaultRequestConfig();return delete e.headers["Content-Type"],e.method="POST",e.body=t,fetchJSON((a=(n=window.Shopify)==null?void 0:n.routes)!=null&&a.root?`${window.Shopify.routes.root}cart/add.js`:"/cart/add.js",e)}async function createOrderItem(t){try{const e=await fetch(`${appProxyUrl}/order-item/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok)throw new Error("Bad response :<");const n=await e.json();if(!n.success)throw new Error(n.message)}catch(e){console.error(e instanceof Error?e.message:e)}}async function onCreateOrderItem(t){var l;const{shouldTrackOrder:e,pfPageInfo:n,atcId:a,data:r,generatedId:o,product:i,pageType:s,pageId:c,collectionsOfProduct:d}=t;try{let u=o;if(!e||!n)return;const f=await getCart();if(!f)return;const{items:h}=f,v=h.find(I=>I.id===a&&!!I.properties[ATC_PF_ANALYTICS_ID]);v&&(r[`properties[${ATC_PF_ANALYTICS_ID}]`]=u=v.properties[ATC_PF_ANALYTICS_ID]);const{pf_page_name:y,pf_page_subject_id:p}=n,S=(l=window.__pagefly_setting__)==null?void 0:l.shopDomain,T={_id:u,shopDomain:S,properties:{}};if(i){const{featured_image:I,title:w}=i,C={pageType:s,pageId:c,pageName:y,pageSubjectId:p,productPageImage:I,productName:w};Object.assign(T.properties,C)}if(d&&d instanceof Array){const I=[];d.forEach(w=>{const{id:C,title:O,image:k}=w,q=k==null?void 0:k.src;I.push({collectionId:C,collectionTitle:O,collectionImageSrc:q})}),Object.assign(T.properties,{collectionsOfProduct:I})}await createOrderItem(T)}catch(u){console.log(u instanceof Error?u.message:u)}}const GROUPTHOUGHT_THEME=["pipeline","story"],handleGroupThoughtThemes=async()=>{var t,e,n,a;window.theme&&((e=(t=window.theme)==null?void 0:t.info)==null?void 0:e.name)&&GROUPTHOUGHT_THEME.includes((a=(n=window.theme)==null?void 0:n.info)==null?void 0:a.name)&&handleGroupThoughtThemePartner().catch(console.error)},handleGroupThoughtThemePartner=async()=>{var e;const t=await window.getCart();document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:t}})),(e=document.querySelector('[data-drawer="drawer-cart"]'))==null||e.dispatchEvent(new CustomEvent("theme:drawer:open"))};function handlePixelUnionThemes(t){switch(!0){case/Editions/i.test(t):handleThemeEditions();break;case/Empire/i.test(t):handleThemeEmpire();break;case/Handy/i.test(t):break;case/Pacific/i.test(t):handleThemePacific();break;case/Startup/i.test(t):handleThemeStartup();break;case/Atlantic/i.test(t):break;case/Launch/i.test(t):handleThemeLaunch();break;case/Reach/i.test(t):handleThemeReach();break;case/Grid/i.test(t):break;case/Vogue/i.test(t):handleThemeVogue();break}}const handleThemeEditions=()=>{window.Shopify.getCart(t=>{const e=document.querySelector("[data-header-cart-count]");e&&(e.innerHTML=`(${t.item_count})`)})},handleThemeEmpire=()=>{fetch("/cart.json").then(t=>t.json()).then(t=>{const e=new CustomEvent("cartcount:update",{detail:t});window.dispatchEvent(e)})},handleThemePacific=()=>{window.Shopify.getCart(t=>{window.$(".cart-item-count").html(t.item_count),window.$(".header-tools-cart").addClass("cart-has-content")})},handleThemeStartup=()=>{window.Shopify.getCart(t=>{document.dispatchEvent(new CustomEvent("cart:count",{detail:{count:t.item_count}}))})},handleThemeLaunch=()=>{window.Shopify.getCart(t=>{document.querySelectorAll(".cart-link .cart-count").forEach(e=>e.innerHTML=t.item_count),document.querySelectorAll(".header-cart-count").forEach(e=>e.classList.add("active"))})},handleThemeReach=()=>{window.Shopify.getCart(t=>{document.querySelectorAll("[data-cart-count]").forEach(e=>e.innerHTML=t.item_count)})},handleThemeVogue=()=>{window.Shopify.getCart(t=>{document.querySelectorAll("[data-cart-count]").forEach(e=>e.innerHTML=t.item_count)})},RED_PLUG_DESIGN_THEME=["Avenue"],handleRedPlugDesignThemes=async()=>{var t,e;window.themeInfo&&((t=window.themeInfo)==null?void 0:t.name)&&RED_PLUG_DESIGN_THEME.includes((e=window.themeInfo)==null?void 0:e.name)&&handleRedPlugDesignTheme().catch(console.error)},handleRedPlugDesignTheme=async()=>{typeof window.CartDrop=="function"&&window.CartDrop(!1)};function handleRoarTheme(t){var n;const{lastATCResult:e}=__pagefly_helper_store__$1;(n=window.Fastor)!=null&&n.setupCartPopup?handleThemeFastor(e):/BeYours/i.test(t)&&handleThemeBeYours(e)}function handleThemeFastor(t){window.Fastor.setupCartPopup(t)}function handleThemeBeYours(t){document.querySelector("mini-cart").renderContents(t)}function handleStudioZashTheme(t){switch(!0){case/Cindy/i.test(t):case/Carla/i.test(t):case/Claudia/i.test(t):handleThemeOfStudioZash();break}}const handleThemeOfStudioZash=()=>{const{lastATCResult:t}=__pagefly_helper_store__$1,e=document.querySelector("cart-notification");e.setActiveElement(document.activeElement),e.renderContents(t)};let IDX=36,HEX="";for(;IDX--;)HEX+=IDX.toString(36);function uid(t){let e="",n=t||11;for(;n--;)e+=HEX[Math.random()*36|0];return e}let SIZE=4096,HEX2=[],IDX2=0,BUFFER;for(;IDX2<256;IDX2++)HEX2[IDX2]=(IDX2+256).toString(16).substring(1);function uuid(){(!BUFFER||IDX2+16>SIZE)&&(BUFFER=crypto.getRandomValues(new Uint8Array(SIZE)),IDX2=0);let t=0,e,n="";for(;t<16;t++)e=BUFFER[t+IDX2],t==6?n+=HEX2[e&15|64]:t==8?n+=HEX2[e&63|128]:n+=HEX2[e],t&1&&t>1&&t<11&&(n+="-");return IDX2++,n}const validationRegex=/^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-4[A-Za-z0-9]{3}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$/,validateUUID=t=>typeof t=="string"&&validationRegex.test(t);window.uniqueId={uid,uuid,validateUUID};function formcheck(t){console.log("validating...",t);const e=window._pagefly_form_fields_selector||'[name][required]:not([hidden]):not([type="file"]):not([type="hidden"])',n=t.querySelectorAll(e),a=[];return n.forEach((r,o)=>{if(r.required&&!["hidden","file"].includes(r.type))if(r.type==="radio"){let i=!1;const s=r.name;t.querySelectorAll(`input[name="${s}"]`).forEach((c,d)=>{c.value&&(i=!0)}),i||a.push(r)}else r.value||a.push(r)}),a}function checkLanguage(){const t=__pagefly_helper_store__$1.cart;return t.attributes&&t.attributes.ml_lang||window.Shopify.locale}function toFormData(t){let e=new FormData;return typeof e._asNative=="function"&&(e=e._asNative().fd),Object.entries(t).forEach(([n,a])=>{e.append(n,a)}),e}const handleTimberTheme=async()=>{const t=await window.getCart();window.ajaxCart.cartUpdateCallback(t)},handleBlumTheme=t=>{typeof window.SHTHelper.forceUpdateCartStatus=="function"&&window.SHTHelper.forceUpdateCartStatus(t)};function ajaxCartUpdate(t){var e,n,a;try{__pagefly_helper_store__$1.cart&&(__pagefly_helper_store__$1.lastATCResult=t,__pagefly_helper_store__$1.update(t));const{lastATCResult:r,autoCartUpdate:o}=__pagefly_helper_store__$1;if(o&&r&&((n=(e=window.Shopify)==null?void 0:e.theme)==null?void 0:n.name)){const i=window.__pagefly_theme_atc_check__||window.Shopify.theme.name;handlePixelUnionThemes(i),handleGroupThoughtThemes(),handleRedPlugDesignThemes(),handleRoarTheme(i),handleStudioZashTheme(i),handleBlumTheme(t),window.timber&&((a=window.ajaxCart)==null?void 0:a.cartUpdateCallback)&&handleTimberTheme().catch(console.error)}}catch(r){console.warn(r)}}function customDataForTheme(){var e,n;const t=window.__pagefly_theme_atc_check__||((n=(e=window==null?void 0:window.Shopify)==null?void 0:e.theme)==null?void 0:n.name);switch(!0){case/Cindy|Carla|Claudia/i.test(t):return{sections:"cart-notification-product,cart-notification-button,cart-icon-bubble"};case/BeYours/i.test(t):return{sections:"cart-icon-bubble,mini-cart"};default:return{}}}async function handleShopifyProductATC(){DEPRECATED_addToCartHelper().catch(console.log);const t=[...document.querySelectorAll('[data-pf-type="ProductATC"]'),...document.querySelectorAll('[data-pf-type="ProductATC2"]')];if(t.length)try{fetch("/cart.json").then(r=>{r.json().then(function(o){__pagefly_helper_store__$1.cart=o})}).catch(function(r){console.warn(r)})}catch(r){console.warn(r)}document.querySelectorAll('[data-pf-type="ProductText"][data-product-type="compare_at_price"]').forEach((r,o)=>{const i=r.getAttribute("data-product-id");pageflyProducts[i]&&(pageflyProducts[i].comparePrices=pageflyProducts[i].comparePrices||[],pageflyProducts[i].comparePrices.push(r))});const n=document.createElement("p");n.style.color="red",n.style.marginTop="15px";const a=isTrackingActive()&&!window.ReCharge;t.forEach(r=>{const o=r.closest("form"),i=getFrontEndSettings(r),{iconPos:s="left"}=i||{},c=r.querySelectorAll('[data-pf-type="Icon"],[data-pf-type="Icon2"]');r.addEventListener("click",async d=>{var M,F,R,B;d.preventDefault(),d.stopPropagation();const l=d.currentTarget,u=pfPageSetting.pageId||pfSetting.pageId,f=pfPageSetting.pageType||pfSetting.pageType,h=l.getAttribute("data-checkout"),v=l.getAttribute("data-checkout-link"),y=l.getAttribute("data-product-id"),p=l.getAttribute("data-adding"),S=l.getAttribute("data-added"),T=pageflyProducts[y],I=pageflyProductCollections[y],w=l.closest('[data-pf-type="ProductBox"]'),C=w&&w.className;if(!T)return;let O;const k=T.pfCurrentVariant&&T.pfCurrentVariant[getElemIdByClassname(C)||OUTSIDE_BOX_KEY];if(k&&k.id?O=k.id:l.getAttribute("data-current-variant")?O=l.getAttribute("data-current-variant"):O=((M=T.selected_or_first_available_variant)==null?void 0:M.id)||((F=T==null?void 0:T.variants[0])==null?void 0:F.id),!O)return console.warn("Variant have no product!");if(o){if(o.querySelector(".pplr-wrapper")){if(!o.checkValidity())o.reportValidity();else return o.submit();return}if((B=(R=window.shopstorm)==null?void 0:R.apps)!=null&&B.productCustomizer)try{if(o.querySelector(".product-customizer-options")&&o.querySelector('input[type="file"]')){window.shopstorm.apps.productCustomizer.addOptionPricingItemToCart(y);const H=document.createElement("input");if(H.type="hidden",H.name="id",H.value=O,o.appendChild(H),!o.checkValidity())o.reportValidity();else return o.submit()}}catch(H){console.warn(H)}if(o.querySelector('[data-pf-type="InfiniteProductOption"]')&&!(window.validate_options&&await window.validate_options(y)))return;const W=o.querySelector('[data-pf-type="InfiniteOptionsShopPad"]');if(W&&W.querySelector('[data-uploadery-valid="false"]')||"__pf_formcheck_callback"in window&&typeof window.__pf_formcheck_callback=="function"&&!window.__pf_formcheck_callback(o))return;if(!o.checkValidity()){o.reportValidity();return}const V=formcheck(o);if(V.length>0){console.warn("missing field",V);const H=document.createElement("a");H.style.color="#dc3545",H.textContent="Please fill all the required fields(*) before Add To Cart!",l.insertAfter(H),setTimeout(()=>H.remove(),3e3);return}}const q=w?w.querySelector('[data-pf-type="ProductQuantity"] input'):T.quantityArr&&T.quantityArr.get(OUTSIDE_BOX_KEY)&&T.quantityArr.get(OUTSIDE_BOX_KEY)[0].querySelector("input"),D=q&&q.value||1;let _,L={};L=customDataForTheme(),window.__getPFCustomATCData&&typeof window.__getPFCustomATCData=="function"&&(L=window.__getPFCustomATCData(y));const A={quantity:D,id:O,...L},x=window.pfPageInfo,m=uuid();if(isTrackingActive()){const N=await getCart(),{items:Y}=N,W=Y.find(V=>V.id===O&&!!V.properties[ATC_PF_ANALYTICS_ID]);W?A[`properties[${ATC_PF_ANALYTICS_ID}]`]=W.properties[ATC_PF_ANALYTICS_ID]:A[`properties[${ATC_PF_ANALYTICS_ID}]`]=m}if(o){_=new FormData(o),typeof _._asNative=="function"&&(_=_._asNative().fd);const N=o.querySelector('[name="id"]'),Y=N&&N.value;Number(Y)||_.append("id",O),Object.entries(L).forEach(([W,V])=>{_.append(W,V)}),x&&a&&A[`properties[${ATC_PF_ANALYTICS_ID}]`]&&_.append(`properties[${ATC_PF_ANALYTICS_ID}]`,A[`properties[${ATC_PF_ANALYTICS_ID}]`])}else _=toFormData(A);const g=l.textContent,E=l.children;l.dataset.pfType==="ProductATC"?Array.from(E).forEach(N=>N.style.display="none"):l.dataset.pfType==="ProductATC2"&&(l.textContent="");const P=document.createElement("span");if(P.textContent=p,l.append(P),c&&c.forEach(N=>{s==="left"?r.prepend(N):r.append(N)}),l.setAttribute("disabled","true"),isTrackingActive()){const N="add_to_cart";if(typeof window<"u"){if(!window.gtag)return;window.gtag("event","pf_add_to_cart",Object.assign({pf_add_to_cart:sessionStorage.getItem(N)?0:1,send_to:"pagefly",pf_product_id:O,pf_event:"add_to_cart",event_callback:()=>{sessionStorage.setItem(N,"true")}},window.pfPageInfo))}}return cartAddFromForm(_).then(async N=>{console.log("PF ATC Result: ",N);const{status:Y,description:W}=N;if(Y>=422)l.parentElement.append(n),n.textContent=`* ${W}`;else{P.textContent=S;const V={shouldTrackOrder:a,pfPageInfo:x,atcId:O,data:N,generatedId:m,product:T,pageType:f,pageId:u,collectionsOfProduct:I},H=new Promise(async X=>{await onCreateOrderItem(V),X("Created order item")});switch(await Promise.race([H,timeoutPromise()]),console.info("After ATC action: ",h),h){default:case"same":ajaxCartUpdate(N);break;case"cart":console.log("checkout..."),pageflyLivePageRedirect("/cart");break;case"checkout":console.log("checkout...");const X=checkLanguage();pageflyLivePageRedirect(`/checkout${X?`?locale=${X}`:""}`);break;case"link":pageflyLivePageRedirect(v);break}}if(setTimeout(()=>{P.remove(),l.dataset.pfType==="ProductATC"?Array.from(E).forEach(V=>V.style.display="inline-block"):l.dataset.pfType==="ProductATC2"&&(l.textContent=g),c&&c.forEach(V=>{s==="left"?r.prepend(V):r.append(V)}),l.removeAttribute("disabled"),n.remove()},Y<300?1e3:1500),!(Y>=422))return N}).catch(N=>{throw new Error(N)})})})}async function DEPRECATED_addToCartHelper(){const t=window.jQuery;if(!t)return;t('a[data-action="AddToCart"]').length&&getCart().then(n=>{__pagefly_helper_store__$1.cart=n}),t(document).click(n=>{var a,r,o,i;if(n.target.getAttribute("data-action")==="AddToCart"){const s=t(n.target);n.preventDefault(),n.stopPropagation();const c=s.data("text"),d=s.data("checkout"),l=s.siblings('[name="quantity"]'),u=l.length?l.eq(0).val():1,f=s.data("variation");let h;h=s.find("span").data("variant"),(f||!h)&&(h=s.closest("form").find("select").val());const v={quantity:u,id:h};s.addClass("is-loading");const y=s.children().eq(0);y.addClass("pfa pfa-spinner pfa-spin"),y.text(""),t.ajax({type:"POST",url:(r=(a=window.Shopify)==null?void 0:a.routes)!=null&&r.root?`${(i=(o=window.Shopify)==null?void 0:o.routes)==null?void 0:i.root}cart/add.js`:"/cart/add.js",dataType:"text json",data:v,error:p=>{if(p.status===422){const S=JSON.parse(p.responseText);s.html(`

${S.description}

`)}},success:p=>{y.removeClass("pfa pfa-spinner pfa-spin"),s.removeClass("is-loading"),s.addClass("is-added"),y.text("Added"),ajaxCartUpdate(p),d?(async()=>{const S=checkLanguage();window.open(`${window.location.origin}/checkout${S?`?locale=${S}`:""}`,"_self")})():setTimeout(()=>{y.text(c),s.removeClass("is-added")},2e3)}})}})}function updateATCTextButtonOnChangeVariant(t,e,n){var a;if(t&&(n==null?void 0:n.available)){t.removeAttribute("disabled");const r=getElemIdByClassname(t.className),o=e.get(r);if(!t.querySelector("span"))t.innerHTML=o;else{const i=new DOMParser().parseFromString(`
${o}
`,"text/xml"),s=((a=i==null?void 0:i.firstElementChild)==null?void 0:a.querySelector('[data-pf-type="Text"]'))||(i==null?void 0:i.firstElementChild),c=s?s.innerHTML.trim().replace("/>",">"):"Add to Cart";t.querySelector("span").innerHTML=c}}else if(t){t.setAttribute("disabled","true");const r=window.__pf_unavailable_text||"Unavailable",o=n?t.getAttribute("data-soldout")||"Sold Out":r;t.querySelector("span")?t.querySelector("span").innerHTML=o:t.innerHTML=`${o}`}}async function storeSomeProductElements(){const t=document.querySelectorAll('[data-product-type="price"]'),e=document.querySelectorAll('[data-product-type="compare_at_price"]'),n=[...document.querySelectorAll('[data-pf-type="ProductATC2"]'),...document.querySelectorAll('[data-pf-type="ProductATC"]')],a=document.querySelectorAll('[data-pf-type="ProductMedia"]'),r=document.querySelectorAll('[data-pf-type="ProductMedia2"]');storeElsInProductByType(t,"price"),storeElsInProductByType(e,"comparePrice"),storeElsInProductByType(n,"atc"),storeElsInProductByType(a,"media"),storeElsInProductByType(r,"media2")}function storeElemInProductByType(t,e){const n=t.getAttribute("data-product-id"),a=pageflyProducts[n];if(!a)return;const r=`${e}Arr`;a[r]=a[r]||new Map;const o=t.closest('[data-pf-type="ProductBox"]');if(o){const i=a[r].get(getElemIdByClassname(o.className))||[];i.push(t),a[r].set(getElemIdByClassname(o.className),i)}else{const i=a[r].get(OUTSIDE_BOX_KEY)||[];i.push(t),a[r].set(OUTSIDE_BOX_KEY,i)}if(e==="atc"){const{atcContents:i=new Map}=a,s=getElemIdByClassname(t.className);if(!i.get(s)){const{innerHTML:c}=t;i.set(s,c),a.atcContents=i}}}function storeInstanceInProductByType(t,e){const n=t.pId,a=pageflyProducts[n];if(!a)return;const r=`${e}Instances`,o=t.boxId||OUTSIDE_BOX_KEY;a[r]=a[r]||new Map;const i=a[r].get(o)||[];i.push(t),a[r].set(o,i)}async function storeElsInProductByType(t,e){t.forEach(n=>{storeElemInProductByType(n,e)})}async function handleShopifyProductBadge(){document.querySelectorAll('[data-pf-type="ProductBadge"]').forEach((e,n)=>{storeElemInProductByType(e,"badge");const a=e.getAttribute("data-product-id"),r=pageflyProducts[a],o=getFrontEndSettings(e);isValidCondition(a,o)&&e.removeAttribute("hidden"),updateProductBadgeByVariant([e],r==null?void 0:r.selected_or_first_available_variant),updateProductBadgeByVariant([e],r==null?void 0:r.selected_or_first_available_variant)&&(e.style.display="none")})}function isValidCondition(t,e){const{applyCondition:n=!1,tags:a=[],collectionSource:r="",collectionIds:o=[]}=e;if(!n)return!0;const i=pageflyProducts[t].tags,s=(a==null?void 0:a.split(",").map(f=>f.trim().toLowerCase()).filter(f=>f!==""))||[],c=window.__pagefly_product_collections[t].map(f=>`${f.id}`),d=!!i.some(f=>s.includes(f.toLowerCase())),l=r==="custom"&&!!o.filter(f=>c.includes(f)).length,u=r==="all"&&c.length===window.__pagefly_collections_count;return d||l||u}function updateProductBadgeByVariant(t,e){let n=!1;t&&e&&(a(),n=r()),t!=null&&t.length&&(t[0].style.display=n?"none":"block");function a(){const i=(window.__pagefly_variant_stock||{})[e.id];if(typeof i=="number"){const s=t[0].querySelector("[data-badge-type='stock']");s&&(s.textContent=i)}}function r(){const{price:o,compare_at_price:i}=e;let s=0;const c=parseFloat(o||"0"),d=parseFloat(i||"0");d>c&&d!==0&&(s=100-Math.round(c/d*100));const l=t[0].querySelectorAll("[data-badge-type='discount']");return l.length&&s===0?!0:(l.forEach(u=>{u.textContent=s>0?`${s}`:""}),!1)}return n}async function handleProductCollectionDescription(){const t=document.querySelectorAll('[data-pf-type="ProductDescription"][data-product-type="content"]:not([data-loaded-des="true"])'),e=document.querySelectorAll('[data-pf-type="CollectionDescription"][data-collection-type="description"]:not([data-loaded-des="true"])'),n=document.querySelectorAll('[data-pf-type="ArticleExcerpt"]:not([data-loaded-des="true"])'),a=r=>{const o=r.getAttribute("data-compact");r.getAttribute("data-loaded-des")||r.setAttribute("data-loaded-des","true");const s=/]*>|(