@lime-bundles/widget 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var LimeBundles=(()=>{var pt=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var gr=Object.prototype.hasOwnProperty;var xr=(e,t)=>{for(var n in t)pt(e,n,{get:t[n],enumerable:!0})},vr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fr(t))!gr.call(e,o)&&o!==n&&pt(e,o,{get:()=>t[o],enumerable:!(r=hr(t,o))||r.enumerable});return e};var yr=e=>vr(pt({},"__esModule",{value:!0}),e);var Vo={};xr(Vo,{LimeBundleElement:()=>Re,trackInputMode:()=>ut});var wr=Object.defineProperty,Wt=(e,t)=>{for(var n in t)wr(e,n,{get:t[n],enumerable:!0})},Bt=class extends Error{constructor(e){super(e.map(t=>t.message).join("; ")),this.errors=e,this.name="StorefrontApiError"}},_r="2025-10";async function Cr(e){if(e)return typeof e=="function"?await e():e}function jt(e){return!!(e.country||e.language||e.buyer)}function ht(e){let t=e.apiVersion??_r,n=`https://${e.shopDomain}/api/${t}/graphql.json`;return{async query(r,o,i){let a={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":e.accessToken};e.buyerIp&&(a["Shopify-Storefront-Buyer-IP"]=e.buyerIp);let l=await Cr(e.buyer),d={...o??{}};e.country&&(d.country=e.country),e.language&&(d.language=e.language),l&&(d.buyer=l);let s=await fetch(n,{method:"POST",headers:a,body:JSON.stringify({query:r,variables:d}),signal:i?.signal});if(!s.ok)throw new Bt([{message:`Storefront API error: ${s.status} ${s.statusText}`}]);let c=await s.json();if(c.errors?.length)throw new Bt(c.errors);return c.data}}}function $t(e){return e.replace(/query\s+(\w+)\s*(?:\(([^)]*)\))?\s*\{/,(t,n,r)=>{let o=(r||"").trim(),i="$country: CountryCode, $language: LanguageCode, $buyer: BuyerInput",a=o?`${o}, ${i}`:i;return`query ${n}(${a}) @inContext(country: $country, language: $language, buyer: $buyer) {`})}var Gt=`#graphql
1
+ "use strict";var LimeBundles=(()=>{var gt=Object.defineProperty;var Ir=Object.getOwnPropertyDescriptor;var Mr=Object.getOwnPropertyNames;var Ar=Object.prototype.hasOwnProperty;var Lr=(e,t)=>{for(var n in t)gt(e,n,{get:t[n],enumerable:!0})},Pr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mr(t))!Ar.call(e,o)&&o!==n&&gt(e,o,{get:()=>t[o],enumerable:!(r=Ir(t,o))||r.enumerable});return e};var Br=e=>Pr(gt({},"__esModule",{value:!0}),e);var ti={};Lr(ti,{LimeBundleElement:()=>He,trackInputMode:()=>ft});var qr=Object.defineProperty,Yt=(e,t)=>{for(var n in t)qr(e,n,{get:t[n],enumerable:!0})},Dt=class extends Error{constructor(e){super(e.map(t=>t.message).join("; ")),this.errors=e,this.name="StorefrontApiError"}},Rr="2026-07";async function Nr(e){if(e)return typeof e=="function"?await e():e}function Jt(e){return!!(e.country||e.language||e.buyer)}function yt(e){let t=e.apiVersion??Rr,n=`https://${e.shopDomain}/api/${t}/graphql.json`;return{async query(r,o,i){let a={"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":e.accessToken};e.buyerIp&&(a["Shopify-Storefront-Buyer-IP"]=e.buyerIp);let l=await Nr(e.buyer),d={...o??{}};e.country&&(d.country=e.country),e.language&&(d.language=e.language),l&&(d.buyer=l);let s=await fetch(n,{method:"POST",headers:a,body:JSON.stringify({query:r,variables:d}),signal:i?.signal});if(!s.ok)throw new Dt([{message:`Storefront API error: ${s.status} ${s.statusText}`}]);let u=await s.json();if(u.errors?.length)throw new Dt(u.errors);return u.data}}}function Xt(e){return e.replace(/query\s+(\w+)\s*(?:\(([^)]*)\))?\s*\{/,(t,n,r)=>{let o=(r||"").trim(),i="$country: CountryCode, $language: LanguageCode, $buyer: BuyerInput",a=o?`${o}, ${i}`:i;return`query ${n}(${a}) @inContext(country: $country, language: $language, buyer: $buyer) {`})}var Zt=`#graphql
2
2
  query BundleMetaobject($id: ID!) {
3
3
  metaobject(id: $id) {
4
4
  id
@@ -100,18 +100,15 @@
100
100
  }
101
101
  }
102
102
  }
103
- `,Kt=`#graphql
103
+ `,en=`#graphql
104
104
  query ShopSettings {
105
105
  shop {
106
106
  customCss: metafield(namespace: "$app", key: "custom_css") {
107
107
  value
108
108
  }
109
- outOfStockBehavior: metafield(namespace: "$app", key: "out_of_stock_behavior") {
110
- value
111
- }
112
109
  }
113
110
  }
114
- `,Yt=`#graphql
111
+ `,tn=`#graphql
115
112
  query BundlesForProduct($handle: String!) {
116
113
  product(handle: $handle) {
117
114
  id
@@ -224,21 +221,23 @@
224
221
  }
225
222
  }
226
223
  }
227
- `,Jt=`#graphql
224
+ `,nn=`#graphql
228
225
  mutation CartCreate($input: CartInput!) {
229
226
  cartCreate(input: $input) {
230
227
  cart { id checkoutUrl }
231
- userErrors { field message }
228
+ userErrors { field message code }
229
+ warnings { code message target }
232
230
  }
233
231
  }
234
- `,Xt=`#graphql
232
+ `,rn=`#graphql
235
233
  mutation CartLinesAdd($cartId: ID!, $lines: [CartLineInput!]!) {
236
234
  cartLinesAdd(cartId: $cartId, lines: $lines) {
237
235
  cart { id checkoutUrl }
238
- userErrors { field message }
236
+ userErrors { field message code }
237
+ warnings { code message target }
239
238
  }
240
239
  }
241
- `;var ft="show_greyed_out";function Zt(e){return e==="hide"?"hide":ft}var ae=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},qt={none:0,subtle:6,rounded:12,round:18},ie={header:{countdownBgColor:"#B4DC7F47",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:"subtle"},productList:{textColor:"#555555",thumbnailRatio:"square",showPrice:!0,showCompareAtPrice:!0,showUnitPrice:!0,showQuantity:!0},pricing:{showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#B4DC7F",buttonTextColor:"#555555",borderWidth:0,borderColor:"#B4DC7F"},savingsBar:{visible:!0},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A"},showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowTypeFilters:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:1,pickerBorderColor:"#E5E5E5",pickerBorderRadius:"subtle",pickerThumbnailRatio:"square",pickerAddBgColor:"#B4DC7F",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#B4DC7F",defaultTier:"first"};function kr(e){if(!e||typeof e!="object")return ie;let t=e;return{...ie,...t,defaultTier:Sr(t.defaultTier),pickerBorderRadius:Rt(t.pickerBorderRadius),header:{...ie.header,...t.header??{}},layout:{...ie.layout,...t.layout??{},borderRadius:Rt(t.layout?.borderRadius)},productList:{...ie.productList,...t.productList??{}},pricing:{...ie.pricing,...t.pricing??{}},cta:{...ie.cta,...t.cta??{}},savingsBar:{...ie.savingsBar,...t.savingsBar??{}},countdown:{...ie.countdown,...t.countdown??{}},popularBadge:{...ie.popularBadge,...t.popularBadge??{}}}}function Sr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ie.defaultTier}function Rt(e){return e==="none"||e==="subtle"||e==="rounded"||e==="round"?e:ie.layout.borderRadius}function Tr(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,borderRadius:qt[e.layout.borderRadius],countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,thumbnailRatio:e.productList.thumbnailRatio,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showProductUnitPrice:e.productList.showUnitPrice,showProductQuantity:e.productList.showQuantity,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,showSearch:e.showSearch,mixMatchShowTypeFilters:e.mixMatchShowTypeFilters,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:qt[e.pickerBorderRadius],pickerThumbnailRatio:e.pickerThumbnailRatio,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var Er={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color"},Mr=new Set(["borderRadius","borderWidth","ctaBorderWidth","popularBadgeBorderWidth","pickerBorderWidth","pickerBorderRadius","pickerAddBorderWidth"]);function en(e,t){let n=Tr(t);for(let[i,a]of Object.entries(Er)){let l=n[i];if(l==null)continue;let d=Mr.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-product-unit-price-display",t.productList.showUnitPrice?"block":"none"),e.style.setProperty("--lb-product-qty-chip-display",t.productList.showQuantity?"inline-flex":"none"),e.style.setProperty("--lb-product-qty-inline-display",t.productList.showQuantity?"inline":"none"),e.style.setProperty("--lb-variant-chevron",Nt(t.layout.borderColor)),e.style.setProperty("--lb-picker-variant-chevron",Nt(t.pickerBorderColor));let r=Ot(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",r.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",r.imgFit),e.style.setProperty("--lb-thumbnail-img-height",r.imgHeight);let o=Ot(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",o.imgHeight)}function Nt(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Ot(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var Ir=new Set(["fixed","mix_match","volume","bogo","multi_step"]),Ar=new Set(["active"]);function gt(e,t){try{return Lr(e,t)}catch(n){if(n instanceof ae)return null;throw n}}function Lr(e,t){let n=new Map(t.map(C=>[C.key,C])),r=n.get("title")?.value??"Bundle",o=n.get("bundle_type")?.value,i=n.get("status")?.value;if(!o||!Ir.has(o))throw new ae(`Invalid or missing bundle_type: ${o??"null"}`,"invalid_type");let a=o;if(!i||!Ar.has(i))throw new ae(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=n.get("starts_at")?.value??null,s=n.get("ends_at")?.value??null,c=new Date;if(d){let C=new Date(d);if(Number.isNaN(C.getTime()))throw new ae(`Invalid starts_at: ${d}`,"invalid_type");if(C>c)throw new ae(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let C=new Date(s);if(Number.isNaN(C.getTime()))throw new ae(`Invalid ends_at: ${s}`,"invalid_type");if(C<c)throw new ae(`Bundle has expired: ends_at=${s}`,"expired")}let u=Rr(n),p=Nr(n),v=Or(n),g={id:e,title:r,description:n.get("description")?.value||null,status:l,products:u,discountConfig:p,widgetConfig:v,startsAt:d,endsAt:s,discountLabel:n.get("discount_label")?.value??null,selectedVariantIds:Hr(n),productQuantities:Ht(n,"product_quantities"),variantQuantities:Ht(n,"variant_quantities"),marketVisibility:Dr(n),marketIds:Fr(n),abTestId:n.get("ab_test_id")?.value||null,abWeight:Vr(n)};switch(a){case"fixed":return{...g,bundleType:"fixed"};case"volume":return{...g,bundleType:"volume",volumeTiers:Ur(n)};case"mix_match":return{...g,bundleType:"mix_match",minQuantity:Qr(n,"min_quantity",{min:1}),maxQuantity:null,productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules")};case"bogo":return{...g,bundleType:"bogo",...qr(n)};case"multi_step":return{...g,bundleType:"multi_step",steps:Pr(n),productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules"),collectionProductIds:Br(n)}}}function Pr(e){let t=xe(e,"steps");if(!Array.isArray(t))throw new ae("Invalid or missing steps","invalid_type");let n=o=>Array.isArray(o)?o.filter(i=>typeof i=="string"):[],r=[];for(let o of t){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o;if(typeof i.name!="string")continue;let a=typeof i.minQuantity=="number"?i.minQuantity:Number(i.minQuantity),l=Number.isFinite(a)&&a>=1?Math.floor(a):1,d=null;typeof i.maxQuantity=="number"&&Number.isFinite(i.maxQuantity)&&(d=Math.max(l,Math.floor(i.maxQuantity))),r.push({name:i.name,minQuantity:l,maxQuantity:d,productIds:n(i.productIds),collectionIds:n(i.collectionIds)})}if(r.length===0)throw new ae("multi_step bundle has no valid steps","invalid_type");return r}function Br(e){let t={},n=e.get("collection");if(!n?.references?.nodes)return t;for(let r of n.references.nodes)!("products"in r)||!r.products?.nodes||(t[r.id]=r.products.nodes.map(o=>o.id));return t}function qr(e){let t=xe(e,"bogo_config");if(!t||typeof t!="object"||Array.isArray(t))throw new ae("Invalid or missing bogo_config","invalid_type");let n=t,r=typeof n.buyProductId=="string"?n.buyProductId:"",o=typeof n.getProductId=="string"?n.getProductId:"";if(!r||!o)throw new ae("bogo_config is missing buy/get product ids","invalid_type");let i=a=>{let l=typeof a=="number"?a:Number(a);return!Number.isFinite(l)||l<1?1:Math.min(99,Math.floor(l))};return{buyProductId:r,getProductId:o,buyQuantity:i(n.buyQuantity),getQuantity:i(n.getQuantity)}}function Rr(e){let t=[],n=e.get("products");if(n?.reference&&"variants"in n.reference&&t.push(n.reference),n?.references?.nodes)for(let o of n.references.nodes)"variants"in o?t.push(o):"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);let r=e.get("collection");if(r?.references?.nodes)for(let o of r.references.nodes)"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);return t}function Nr(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function Or(e){return kr(xe(e,"widget_config"))}function Hr(e){let t=xe(e,"selected_variant_ids");if(!Array.isArray(t))return null;let n=[];for(let r of t)Array.isArray(r)?n.push(r.filter(o=>typeof o=="string")):n.push([]);return n}function Ht(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(r[o]=Math.floor(a))}return r}function Oe(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){if(!i||typeof i!="object"||Array.isArray(i))continue;let{min:a,max:l,required:d}=i,s=typeof a=="number"?a:Number(a),c=typeof l=="number"?l:Number(l);if(!Number.isFinite(s)||!Number.isFinite(c))continue;let u=Math.max(1,Math.min(99,Math.floor(s))),p=Math.max(u,Math.min(99,Math.floor(c)));r[o]=d===!0?{min:u,max:p,required:!0}:{min:u,max:p}}return r}function Dr(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function Fr(e){let t=e.get("markets")?.value;if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}catch{return[]}}function Vr(e){let t=e.get("ab_weight")?.value;if(!t)return 0;let n=Number.parseInt(t,10);return Number.isNaN(n)?0:Math.min(100,Math.max(0,n))}function Ur(e){let t=xe(e,"volume_tiers");return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null).map(zr):[]}function zr(e){let t=Number(e.minQuantity??0),n={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(n.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(n.amount=e.amount),n}function xe(e,t){let n=e.get(t)?.value;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Qr(e,t,n={}){let r=e.get(t)?.value;if(!r)return null;let o=parseInt(r,10);return isNaN(o)||n.min!==void 0&&o<n.min?null:o}function Dt(e){return e.split("/").pop()??e}function tn(e,t){if(e.marketVisibility!=="specific")return!0;if(!t)return!1;let n=Dt(t);return e.marketIds.some(r=>Dt(r)===n)}function xt(e,t,n){let r=e.variantQuantities[n];return r!==void 0?r:e.productQuantities[t]??1}function nn(e,t){let n=e.steps[t];if(!n)return[];let r=new Set(n.productIds),o=new Set;for(let l of n.collectionIds)for(let d of e.collectionProductIds[l]??[])o.add(d);let i=new Set,a=[];for(let l of e.products)i.has(l.id)||!r.has(l.id)&&!o.has(l.id)||(i.add(l.id),a.push(l));return a}async function rn(e,t){await ln(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,occurredAt:new Date().toISOString()})}async function on(e,t){await ln(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function an(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let n=new IntersectionObserver(r=>{for(let o of r)o.isIntersecting&&(t(),n.unobserve(o.target))},{threshold:.5});return n.observe(e),()=>n.disconnect()}async function ln(e,t){let n=`${e.appUrl}/api/analytics`,r=JSON.stringify(t);try{(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(n,r)}catch{}}}var Ft=1e4,Wr=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],jr=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function vt(e){if(e.length>Ft)return{ok:!1,error:`CSS exceeds ${Ft.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(o,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[o,i]of Wr)if(o.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let n=/url\s*\(\s*([\s\S]*?)\s*\)/gi,r;for(;(r=n.exec(t))!==null;){let o=r[1].trim();if((o.startsWith("'")||o.startsWith('"'))&&(o=o.slice(1)),(o.endsWith("'")||o.endsWith('"'))&&(o=o.slice(0,-1)),o=o.trim(),o&&!jr.test(o))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var $r="lb-custom-css-";function sn(e,t){if(typeof document>"u"||!t)return!1;let n=vt(t);if(!n.ok||!n.css.trim())return!1;let r=$r+Gr(e),o=document.getElementById(r);return o||(o=document.createElement("style"),o.id=r,o.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(o)),o.textContent!==n.css&&(o.textContent=n.css),!0}function Gr(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function Kr(e,t){let n=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(n)}catch{return`${t} ${n.toFixed(2)}`}}function De(e,t,n){return t==="percentage"?Math.max(0,e*(1-n/100)):Math.max(0,e-n)}var Yr={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function dn(e,t,n){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let r=parseFloat(e.amount);if(!Number.isFinite(r))return null;let o=Yr[t.referenceUnit]??"";if(!o)return null;let i=e.currencyCode||n||"USD",a=Kr(r,i),l=t.referenceValue,d=l===1?o:`${l}${o}`;return`${a}/${d}`}var ve={};Wt(ve,{computePosition:()=>Xr,emptyTypeAheadState:()=>ro,firstEnabled:()=>He,handleKey:()=>to,pushTypeAheadChar:()=>oo});var Jr=4;function Xr({trigger:e,viewportHeight:t,desiredHeight:n,margin:r=Jr,clip:o}){let i=o?Math.min(t,o.bottom):t,a=o?Math.max(0,o.top):0,l=Math.max(0,i-e.bottom-r),d=Math.max(0,e.top-a-r),s=n<=l?"down":d>l?"up":"down",u=Math.min(n,s==="down"?l:d),p=s==="down"?e.bottom+r:e.top-r-u;return{placement:s,maxHeight:u,offsetTop:p,offsetLeft:e.left,width:e.width}}var mt={type:"passthrough",preventDefault:!1};function He(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function Vt(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function Zr(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r].disabled)return r}return t}function eo(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r].disabled)return r}return t}function Ut(e){return e.length===1&&e!==" "&&/\S/.test(e)}function to(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return mt;let{key:n}=e,{isOpen:r,activeIndex:o,selectedIndex:i,options:a}=t;if(!r)switch(n){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:He(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Vt(a),preventDefault:!0};default:return Ut(n)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:He(a),preventDefault:!0}:mt}switch(n){case"ArrowDown":return{type:"move-active",activeIndex:Zr(a,o),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:eo(a,o),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:He(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:Vt(a),preventDefault:!0};case"Enter":case" ":return o>=0&&!a[o]?.disabled?{type:"commit",index:o,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return Ut(n)?{type:"type-ahead",char:n,preventDefault:!1}:mt}}var no=500;function ro(){return{buffer:"",lastTime:0}}function oo(e,t,n,r,o=no){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(n-e.lastTime>o?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:n};for(let d=0;d<r.length;d++){let s=r[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var io={};Wt(io,{findVariantByOptions:()=>ao,isOptionValueAvailable:()=>lo,toPickerVariant:()=>so});function ao(e,t){if(e.length===0)return null;for(let n of e){if(n.optionValues.length!==t.length)continue;let r=!0;for(let o=0;o<n.optionValues.length;o++)if(n.optionValues[o]!==t[o]){r=!1;break}if(r)return n}return null}function lo(e,t,n,r){for(let o of e){if(!o.available||o.optionValues[t]!==n)continue;let i=!0;for(let a=0;a<o.optionValues.length;a++)if(a!==t&&o.optionValues[a]!==r[a]){i=!1;break}if(i)return!0}return!1}function so(e){return{id:e.id,optionValues:e.selectedOptions.map(t=>t.value),available:e.availableForSale}}var zt="_lb_v",bt=null;function co(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t>>>=0;return t>>>0}function cn(){try{let e=window.localStorage.getItem(zt);if(e)return e;let t=Qt();return window.localStorage.setItem(zt,t),t}catch{return bt||(bt=Qt()),bt}}function Qt(){return Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10)}function uo(e,t,n){let r=e.slice().sort((a,l)=>a.id<l.id?-1:a.id>l.id?1:0),o=co(t+":"+n)%100,i=0;for(let a of r)if(i+=Math.max(0,a.abWeight),o<i)return a;return r[r.length-1]}function un(e,t){let n=new Map;for(let o of e){if(!o.abTestId)continue;let i=n.get(o.abTestId);i?i.push(o):n.set(o.abTestId,[o])}if(n.size===0)return e.slice();let r=new Map;return n.forEach((o,i)=>{if(o.length===1){r.set(i,o[0]);return}r.set(i,uo(o,t,i))}),e.filter(o=>!o.abTestId||r.get(o.abTestId)===o)}function pn(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null?!0:e.quantityAvailable>=t:!1}function mn(e){let t=e.slice(e.lastIndexOf("/")+1),n=Number(t);return Number.isFinite(n)&&t!==""?n:e}function Fe(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?Math.round(t*100):0}function po(e,t,n){return{id:mn(e.id),title:e.title,options:(e.selectedOptions??[]).map(r=>r.value),available:pn(e,t),price:Fe(e.price?.amount),compareAtPrice:Fe(e.compareAtPrice?.amount),unitPrice:dn(e.unitPrice,e.unitPriceMeasurement,n),image:e.image?.url??null}}function _e(e,t,n){let r=n.allowedVariantIds,o=e.variants.nodes.filter(s=>!r||r.length===0||r.includes(s.id)),i=e.priceRange.minVariantPrice.currencyCode,a=xt(n.quantities,e.id,o[0]?.id??""),l=o.map(s=>{let c=xt(n.quantities,e.id,s.id),u=po(s,c,i);return c!==a&&(u.quantity=c),u}),d=l.find(s=>s.available)??l[0];return{productId:mn(e.id),title:e.title,url:e.handle?"/products/"+e.handle:null,featuredImage:e.featuredImage?.url??null,quantity:a,selectedVariantId:d?d.id:"",optionNames:(o[0]?.selectedOptions??[]).map(s=>s.name),variants:l}}function Ve(e){return e.products.map((t,n)=>_e(t,e.id,{quantities:{productQuantities:e.productQuantities,variantQuantities:e.variantQuantities},allowedVariantIds:e.selectedVariantIds?.[n]??null}))}function Y(e,t){for(let n=0;n<e.variants.length;n++)if(String(e.variants[n].id)===String(t))return e.variants[n];return e.variants[0]}function bn(e,t){if(!e.variants||!t)return null;for(let n=0;n<e.variants.length;n++){let r=e.variants[n];if(!r.options||r.options.length!==t.length)continue;let o=!0;for(let i=0;i<r.options.length;i++)if(r.options[i]!==t[i]){o=!1;break}if(o)return r}return null}function hn(e,t,n,r){for(let o=0;o<e.length;o++){let i=e[o];if(i.available===!1||!i.options||i.options[t]!==n)continue;let a=!0;for(let l=0;l<i.options.length;l++)if(l!==t&&i.options[l]!==r[l]){a=!1;break}if(a)return!0}return!1}function fn(e){let t=[];for(let n=0;n<e.length;n++){let r=Y(e[n],e[n].selectedVariantId),o=r.quantity||e[n].quantity||1;t.push({variantId:Number(e[n].selectedVariantId),quantity:o,priceCents:(r.price||0)*o})}return t}function mo(e,t,n){let r=0,o=0;for(let i=0;i<e.length;i++){let a=Y(e[i],e[i].selectedVariantId),l=a.quantity||e[i].quantity||1,d=a.price*l;if(r+=d,t==="percentage"){let s=Math.floor(a.price*n/100);o+=(a.price-s)*l}else o+=d}if(t==="fixed_amount"&&(o=Math.max(0,r-Math.round(n*100))),t==="flat_price"){let i=Math.round(n*100);o=i<r?i:r}return{totalPrice:r,salePrice:o,savings:r-o}}function yt(e,t,n){let r=e.classList?.contains("lb-fixed")?e:e.querySelector(".lb-fixed");if(!r)return;let{totalPrice:o,salePrice:i,savings:a}=mo(t,r.getAttribute("data-discount-type")||"",parseFloat(r.getAttribute("data-discount-value")??"")||0),l=e.querySelector("[data-sale-price]"),d=e.querySelector("[data-compare-price]"),s=e.querySelector("[data-savings-bar]"),c=e.querySelector("[data-savings-amount]"),u=e.querySelector("[data-savings-percent]");if(l&&(l.textContent=n(i)),d&&(a>0?(d.textContent=n(o),d.style.display=""):d.style.display="none"),s)if(a>0){if(c&&(c.textContent=n(a)),u){let p=o>0?Math.round(a*100/o):0;u.textContent="("+p+"%)"}s.style.display=""}else s.style.display="none"}function le(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(t/100)}catch{return e+" "+(t/100).toFixed(2)}}}var bo="_lime_bundle_gid",ho="_lime_bundle_type";function se(e,t){return[{key:bo,value:e},{key:ho,value:t}]}function Ue(e,t,n){let r=e.querySelectorAll("[data-variant-option]");if(!r.length)return;function o(s){return parseInt(s.getAttribute("data-option-position")??"",10)}function i(){let s=[];for(let c=0;c<r.length;c++){let u=o(r[c]);!u||u<1||(s[u-1]=r[c].value)}return s}function a(s){if(!(!s||!s.options))for(let c=0;c<r.length;c++){let u=o(r[c]);if(!u||u<1)continue;let p=s.options[u-1];r[c].value!==p&&(r[c].value=p)}}function l(s,c){for(let u=0;u<r.length;u++){let p=r[u],v=o(p);if(!v||v<1)continue;let g=p.options;for(let C=0;C<g.length;C++)g[C].disabled=!hn(s.variants,v-1,g[C].value,c)}}let d=t();if(d){let s=Y(d,d.selectedVariantId);s&&s.options&&l(d,s.options)}for(let s=0;s<r.length;s++)r[s].addEventListener("change",c=>{c.stopPropagation();let u=t();if(!u)return;let p=bn(u,i());if(!p){let v=Y(u,u.selectedVariantId);a(v),v&&v.options&&l(u,v.options);return}u.selectedVariantId=p.id,l(u,p.options),n(p,u)})}function ze(e,t,n){if(!t.variants.length)return;let r=e.querySelector(".lb-bundle-variant-badge");r&&!r.textContent&&(r.textContent=n.title);let o=e.querySelector(".lb-bundle-variant-option-groups");o&&!o.children.length&&fo(o,t,n)}function fo(e,t,n){let r=t.optionNames||[];for(let o=0;o<r.length;o++){let i=document.createElement("div");i.className="lb-bundle-variant-option-group";let a=document.createElement("span");a.className="lb-bundle-variant-option-label",a.textContent=r[o],i.appendChild(a);let l=document.createElement("select");l.className="lb-bundle-variant-select",l.setAttribute("data-variant-option",""),l.setAttribute("data-option-position",String(o+1)),l.setAttribute("data-product-id",String(t.productId)),l.name="lb-variant-"+t.productId+"-"+(o+1),l.setAttribute("aria-label",r[o]);let d=Object.create(null);for(let s of t.variants){let c=s.options&&s.options[o];if(!c||d[c])continue;d[c]=!0;let u=document.createElement("option");u.value=c,u.textContent=c,n.options&&n.options[o]===c&&(u.selected=!0),l.appendChild(u)}i.appendChild(l),e.appendChild(i)}}var wt=new WeakMap;function Qe(e,t,n){let r=e.querySelector("[data-thumbnail]");if(!r)return;let o=r.querySelector("img");if(!wt.has(e)){let a=n||(o?o.src:null);a&&wt.set(e,a)}let i=t.image||wt.get(e)||null;if(i)if(o)o.src=i,o.srcset="";else{let a=document.createElement("img");a.src=i,a.loading="lazy",a.alt="",r.textContent="",r.appendChild(a)}}function go(e,t){let n=e.querySelector("[data-qty-inline]");n&&(n.textContent="\xD7"+t)}function _t(e,t,n,r){if(!t)return;Qe(e,t,n.featuredImage),go(e,t.quantity||n.quantity||1);let o=e.querySelector("[data-product-price]");o&&t.price!=null&&(o.textContent=r(t.price));let i=e.querySelector("[data-product-compare-price]");if(i){let l=t.compareAtPrice;l&&l>t.price?(i.textContent=r(l),i.hidden=!1):(i.textContent="",i.hidden=!0)}let a=e.querySelector("[data-product-unit-price]");a&&(t.unitPrice?(a.textContent=t.unitPrice,a.hidden=!1):(a.textContent="",a.hidden=!0))}function q(e,t,n){let r=document.createElement(e);r.className=t;for(let o in n)r.setAttribute(o,n[o]);return r}function We(e,t,n){let r=e.variants.length,o=q("div","lb-bundle-product-row");n.isOos&&(o.classList.add("lb-bundle-product-row--oos"),o.setAttribute("aria-disabled","true")),o.setAttribute("data-product-id",String(e.productId)),n.bogoRole&&o.setAttribute("data-bogo-role",n.bogoRole),o.appendChild(q("div","lb-bundle-thumbnail",{"data-thumbnail":""}));let i=q("div","lb-bundle-product-info"),a=document.createElement(n.href?"a":"span");if(a.className="lb-bundle-product-name",n.href&&(a.href=n.href),a.textContent=e.title??"",i.appendChild(a),n.isOos){let d=q("span","lb-bundle-oos-label");return d.textContent=t.outOfStock||"Out of stock",i.appendChild(d),o.appendChild(i),o}r===1&&e.variants[0]?.title!=="Default Title"&&i.appendChild(q("span","lb-bundle-variant-badge"));let l=q("span","lb-bundle-product-prices");if(l.appendChild(q("span","lb-bundle-product-compare-price",{"data-product-compare-price":"",hidden:""})),l.appendChild(q("span","lb-bundle-product-price",{"data-product-price":""})),n.inlineQuantity!=null){let d=q("span","lb-bundle-qty-inline",{"data-qty-inline":""});d.textContent="\xD7"+n.inlineQuantity,l.appendChild(d)}if(i.appendChild(l),i.appendChild(q("span","lb-bundle-product-unit-price",{"data-product-unit-price":""})),r>1&&i.appendChild(q("div","lb-bundle-variant-option-groups",{style:"--lb-row-option-count: "+(e.optionNames.length||1)})),o.appendChild(i),n.inlineQuantity==null&&o.appendChild(q("span","lb-bundle-qty-chip",{"data-qty-inline":""})),n.badgeText){let d=q("span","lb-bogo__badge");d.textContent=n.badgeText,o.appendChild(d)}return o}function de(e,t){let n=q("div",e),r=q("div","lb-bundle-header"),o=q("h3","lb-bundle-title");if(o.textContent=t.title,r.appendChild(o),t.subtitle){let p=q("p","lb-bundle-subtitle");p.textContent=t.subtitle,r.appendChild(p)}if(n.appendChild(r),t.endsAt){let p=q("div","lb-bundle-countdown",{"data-countdown":""}),v=q("span","lb-bundle-countdown-label");v.textContent=t.countdownLabel??"Ends in",p.appendChild(v),p.appendChild(q("span","lb-bundle-countdown-timer",{"data-countdown-timer":""})),n.appendChild(p)}let i=q("div",e+"__products lb-edge-fade");n.appendChild(i),n.appendChild(q("div","lb-bundle-divider"));let a=q("div","lb-bundle-summary"),l=q("div","lb-bundle-summary__text"),d=q("span","lb-bundle-summary__label");if(d.textContent=t.summaryLabel??"Bundle price",l.appendChild(d),t.withItemCount&&d.appendChild(q("span","",{"data-item-count":""})),t.showSavingsBar){let p=q("p","lb-bundle-savings-line",{"data-savings-bar":"",style:"display:none"});p.appendChild(document.createTextNode("Save ")),p.appendChild(q("span","",{"data-savings-amount":""})),p.appendChild(document.createTextNode(" ")),p.appendChild(q("span","",{"data-savings-percent":""})),l.appendChild(p)}a.appendChild(l);let s=q("span","lb-bundle-summary__prices");t.showComparePrice&&s.appendChild(q("span","lb-bundle-compare-price",{"data-compare-price":""})),s.appendChild(q("span","lb-bundle-sale-price",{[t.totalPriceSlot?"data-total-price":"data-sale-price"]:""})),a.appendChild(s),n.appendChild(a);let c=q("button","lb-bundle-cta",{type:"button","data-add-bundle":""}),u=q("span","lb-cta-label",{"data-cta-label":""});return u.textContent=t.ctaText,c.appendChild(u),n.appendChild(c),n.appendChild(q("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),n.appendChild(q("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),{root:n,products:i,cta:c}}function gn(e,t){let n=q("div","lb-volume__tiers lb-edge-fade",{role:"radiogroup","aria-label":t,"data-tier-group":""});return e.forEach((r,o)=>{let i=q("div","lb-volume__tier",{role:"radio","aria-checked":r.selected?"true":"false",tabindex:r.selected?"0":"-1","data-tier-index":String(o),"data-tier-qty":String(r.quantity),"data-tier-pct":String(r.percent),"data-tier-amt":String(r.amountCents)}),a=q("span","lb-volume__radio");a.appendChild(q("span","lb-volume__radio-dot")),i.appendChild(a);let l=q("span","lb-volume__tier-info"),d=q("span","lb-volume__tier-label");d.textContent=r.label,l.appendChild(d);let s=q("span","lb-volume__tier-price");if(s.appendChild(q("span","lb-volume__tier-compare")),s.appendChild(q("span","",{"data-tier-price-each":""})),l.appendChild(s),i.appendChild(l),r.badgeLabel||r.savingsLabel){let c=q("span","lb-volume__tier-right");if(r.badgeLabel){let u=q("span","lb-volume__tier-badge");u.textContent=r.badgeLabel,c.appendChild(u)}if(r.savingsLabel){let u=q("span","lb-volume__tier-savings");u.textContent=r.savingsLabel,c.appendChild(u)}i.appendChild(c)}n.appendChild(i)}),n}function je(e){let t=q("div","lb-mix-match__progress",{"data-progress":""}),n=q("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)});for(let o=0;o<e;o++)n.appendChild(q("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));t.appendChild(n);let r=q("div","lb-mix-match__progress-labels");return r.appendChild(q("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"})),r.appendChild(q("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"})),t.appendChild(r),t}function Ce(e){return e<10?"0"+e:String(e)}function ce(e){e._lbCountdownInterval&&(clearInterval(e._lbCountdownInterval),e._lbCountdownInterval=null);let t=e.querySelector("[data-countdown]");if(!t)return;let n=e.closest(".lb-bundle-widget"),r=n&&n.getAttribute("data-ends-at");if(!r){t.style.display="none";return}let o=new Date(r).getTime();if(isNaN(o)){t.style.display="none";return}let i=t.querySelector("[data-countdown-timer]");if(!i)return;let a;function l(){let d=o-Date.now();if(d<=0){n&&(n.style.display="none"),a&&clearInterval(a);return}let s=Math.floor(d/864e5),c=Math.floor(d%864e5/36e5),u=Math.floor(d%36e5/6e4),p=Math.floor(d%6e4/1e3);i.textContent=s>0?s+"d "+Ce(c)+"h "+Ce(u)+"m "+Ce(p)+"s":Ce(c)+"h "+Ce(u)+"m "+Ce(p)+"s"}l(),o-Date.now()>0&&(a=setInterval(l,1e3),e._lbCountdownInterval=a)}var ue={locale:"en",addItem:"Add",addedItem:"Added",removeItem:"Remove",swapItem:"Swap",required:"Required",soldOut:"Sold out",outOfStock:"Out of stock",itemsOutOfStock:"__COUNT__ items out of stock",quantity:"Quantity",increaseQuantity:"Increase quantity",decreaseQuantity:"Decrease quantity",allTypes:"All",editSelection:"Edit selection",addToCart:"Add to cart",bundlePrice:"Bundle price",save:"Save",complete:"Complete",ofSelected:"__COUNT__ of __TOTAL__ added",moreToGo:"__COUNT__ more to go",nProductsShown:"__COUNT__ products shown",bundleComplete:"Your bundle is complete",chooseMoreUnlock:"Choose __COUNT__ more to unlock __PCT__% off",chooseMoreComplete:"Choose __COUNT__ more to complete your bundle",stepOf:"Step __STEP__ of __TOTAL__",stepsCompleted:"__COUNT__ of __TOTAL__ steps completed",each:" each",buyQty:"Buy __COUNT__",needsSpots:{one:"Needs __COUNT__ spot",other:"Needs __COUNT__ spots"}};function xn(e){let t=e.ownerDocument,n=t&&t.defaultView;if(!n)return null;let r=e.parentElement;for(;r&&r!==t.body;){let o=n.getComputedStyle(r).overflowY;if(o==="auto"||o==="scroll"||o==="hidden")return r;r=r.parentElement}return null}var re=[],$e=!1;function xo(e,t){if(e.composedPath){let r=e.composedPath();for(let o=0;o<r.length;o++)if(r[o]===t.shell||r[o]===t.listbox)return!0;return!1}let n=e.target;return t.shell.contains(n)||t.listbox.contains(n)}function Ge(e){for(let t=re.length-1;t>=0;t--)xo(e,re[t])||re[t].close()}function vn(){for(let e=re.length-1;e>=0;e--)re[e].close()}function vo(){$e||(document.addEventListener("pointerdown",Ge,!0),window.addEventListener("resize",vn),window.addEventListener("scroll",Ge,!0),$e=!0)}function yo(){$e&&(document.removeEventListener("pointerdown",Ge,!0),window.removeEventListener("resize",vn),window.removeEventListener("scroll",Ge,!0),$e=!1)}function yn(e){re.push(e),re.length===1&&vo()}function wn(e){let t=re.indexOf(e);t>=0&&re.splice(t,1),re.length===0&&yo()}function _n(e){for(let t=re.length-1;t>=0;t--)re[t]!==e&&re[t].close()}var wo=32,_o=8,Co=8,Ct=new WeakMap;function Cn(e){return Ct.get(e)}function kn(e){if(e.classList.contains("lb-dropdown-state"))return null;let t=document,n=e.getAttribute("aria-label")||"",r="lb-dd-"+Math.random().toString(36).slice(2,9);e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let o=t.createElement("div");o.className="lb-dropdown",o.setAttribute("data-lb-dropdown","");let i=t.createElement("button");i.type="button",i.className="lb-dropdown-trigger",i.setAttribute("role","combobox"),i.setAttribute("aria-haspopup","listbox"),i.setAttribute("aria-expanded","false");let a=r+"-listbox";i.setAttribute("aria-controls",a),n&&i.setAttribute("aria-label",n);let l=t.createElement("span");l.className="lb-dropdown-trigger-value";let d=t.createElement("span");d.className="lb-dropdown-chevron",d.setAttribute("aria-hidden","true"),i.appendChild(l),i.appendChild(d);let s=t.createElement("ul");s.id=a,s.className="lb-dropdown-listbox",s.setAttribute("role","listbox"),n&&s.setAttribute("aria-label",n),s.hidden=!0,o.appendChild(i),e.parentNode?.insertBefore(o,e.nextSibling);let c=e.closest("[data-modal-overlay]");c?(c.appendChild(s),s.setAttribute("data-lb-dropdown-portal","")):o.appendChild(s);let u=!1,p=-1,v=ve.emptyTypeAheadState(),g=[];function C(){let P=[];for(let T=0;T<e.options.length;T++){let h=e.options[T];P.push({disabled:h.disabled,label:h.textContent||h.value})}return P}function I(){i.disabled=e.disabled;let P=C(),T=e.selectedIndex;for(l.textContent=T>=0&&P[T]?P[T].label:"";s.firstChild;)s.removeChild(s.firstChild);g=[];for(let h=0;h<P.length;h++){let M=t.createElement("li");M.id=r+"-opt-"+h,M.className="lb-dropdown-option",M.setAttribute("role","option"),M.setAttribute("aria-selected",h===T?"true":"false"),P[h].disabled&&M.setAttribute("aria-disabled","true"),M.setAttribute("data-value",e.options[h].value),M.setAttribute("data-index",String(h)),M.textContent=P[h].label,s.appendChild(M),g.push(M)}}function b(P){if(p>=0&&g[p]&&g[p].classList.remove("is-active"),p=P,P<0||!g[P]){i.setAttribute("aria-activedescendant","");return}let T=g[P];T.classList.add("is-active"),i.setAttribute("aria-activedescendant",T.id);let h=T.offsetTop,M=h+T.offsetHeight,D=s.scrollTop,f=D+s.clientHeight;h<D?s.scrollTop=h:M>f&&(s.scrollTop=M-s.clientHeight)}function A(){let P=i.getBoundingClientRect();if(P.width===0)return!1;let h=Math.min(g.length||1,Co)*wo+_o,M=xn(i),D=M?{top:M.getBoundingClientRect().top,bottom:M.getBoundingClientRect().bottom}:void 0,f=ve.computePosition({trigger:{top:P.top,bottom:P.bottom,left:P.left,width:P.width},viewportHeight:window.innerHeight,desiredHeight:h,clip:D});return s.setAttribute("data-placement",f.placement),s.style.maxHeight=f.maxHeight+"px",s.hasAttribute("data-lb-dropdown-portal")&&(s.style.top=f.offsetTop+"px",s.style.left=f.offsetLeft+"px",s.style.width=f.width+"px"),!0}function O(){if(u)return;_n($),u=!0,s.hidden=!1,i.setAttribute("aria-expanded","true"),A()||requestAnimationFrame(()=>{A()});let P=C(),T=e.selectedIndex;T>=0&&P[T]&&!P[T].disabled?b(T):b(ve.firstEnabled(P)),yn($)}function k(P){u&&(u=!1,s.hidden=!0,i.setAttribute("aria-expanded","false"),i.setAttribute("aria-activedescendant",""),p>=0&&g[p]&&g[p].classList.remove("is-active"),p=-1,wn($),P&&i.focus())}function m(P){let T=e.options[P];!T||T.disabled||(e.value!==T.value&&(e.value=T.value,e.dispatchEvent(new Event("change",{bubbles:!0}))),I(),k(!0))}function w(P){let T=C(),h=ve.handleKey({key:P.key,ctrlKey:P.ctrlKey,metaKey:P.metaKey,altKey:P.altKey,shiftKey:P.shiftKey},{isOpen:u,activeIndex:p,selectedIndex:e.selectedIndex,options:T});switch(h.preventDefault&&P.preventDefault(),h.type){case"open":O(),h.activeIndex>=0&&b(h.activeIndex);break;case"close":k(h.restoreFocus);break;case"move-active":b(h.activeIndex);break;case"commit":m(h.index);break;case"type-ahead":{let M=ve.pushTypeAheadChar(v,h.char,Date.now(),T);v=M.newState,M.matchedIndex!==null&&(u||O(),b(M.matchedIndex));break}}}function E(P){P.preventDefault(),u?k(!1):O()}function x(P){let T=P.target;for(;T&&T!==s;){if(T.classList&&T.classList.contains("lb-dropdown-option")){let h=parseInt(T.getAttribute("data-index")??"",10);return isNaN(h)?null:h}T=T.parentNode}return null}function z(P){let T=x(P);T!==null&&m(T)}function F(P){let T=P.target;for(;T&&T!==s;){if(T.classList&&T.classList.contains("lb-dropdown-option")){if(T.getAttribute("aria-disabled")==="true")return;let h=parseInt(T.getAttribute("data-index")??"",10);!isNaN(h)&&h!==p&&b(h);return}T=T.parentNode}}function Q(){setTimeout(()=>{u&&(o.contains(document.activeElement)||k(!1))},0)}function W(){I()}let te=new MutationObserver(()=>{I()});te.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});function ne(P){P.preventDefault()}i.addEventListener("click",E),i.addEventListener("keydown",w),o.addEventListener("focusout",Q),s.addEventListener("mousedown",ne),s.addEventListener("click",z),s.addEventListener("mousemove",F),e.addEventListener("change",W);function K(){u&&k(!1),te.disconnect(),i.removeEventListener("click",E),i.removeEventListener("keydown",w),o.removeEventListener("focusout",Q),s.removeEventListener("mousedown",ne),s.removeEventListener("click",z),s.removeEventListener("mousemove",F),e.removeEventListener("change",W),o.parentNode?.removeChild(o),s.parentNode?.removeChild(s),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),Ct.delete(e)}let $={shell:o,listbox:s,select:e,close:()=>k(!1),destroy:K};return Ct.set(e,$),I(),$}var ko="select.lb-bundle-variant-select:not(.lb-dropdown-state), select.lb-mix-match__variant-select:not(.lb-dropdown-state)";function Sn(e){let n=(e??document).querySelectorAll(ko);for(let r=0;r<n.length;r++)kn(n[r])}function Tn(e){let n=(e??document).querySelectorAll("select.lb-dropdown-state");for(let r=0;r<n.length;r++)Cn(n[r])?.destroy()}function he(e){return Sn(e),()=>Tn(e)}function En(e,t,n,r,o){let i=t.widgetConfig,a=Ve(t);if(!a.length)return;let l=a.filter(p=>!p.variants.some(v=>v.available));if(n==="hide"&&l.length>0)return;let d=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",s=le(d),c=ue,u=de("lb-fixed",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||c.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});u.root.setAttribute("data-discount-type",t.discountConfig.discountType),u.root.setAttribute("data-discount-value",String(t.discountConfig.discountValue));for(let p of a){let v=!p.variants.some(I=>I.available),g=We(p,c,{isOos:v,href:p.url});if(u.products.appendChild(g),v)continue;let C=Y(p,p.selectedVariantId);ze(g,p,C),_t(g,C,p,s),Ue(g,()=>p,(I,b)=>{_t(g,I,b,s),yt(u.root,a,s)})}if(l.length>0){u.cta.disabled=!0;let p=u.cta.querySelector("[data-cta-label]");p&&(p.textContent=(c.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(l.length)))}else u.cta.addEventListener("click",()=>{r(fn(a).map(p=>({merchandiseId:"gid://shopify/ProductVariant/"+p.variantId,quantity:p.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(u.root),ce(u.root),yt(u.root,a,s),o?.(he(u.root))}function J(e,t){let n=e;for(let r in t)n=n.split("__"+r+"__").join(String(t[r]));return n}function Ke(e,t){let n=t.needsSpots;if(!n)return"Needs "+e+" spots";let r=new Intl.PluralRules(t.locale||"en").select(e);return J(n[r]||n.other||"__COUNT__",{COUNT:e})}function Ye(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Mn(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function In(e,t,n,r){if(e<=0)return r.bundleComplete||"Your bundle is complete";let o=t==="percentage"&&n?Math.round(n):0;return o>0?J(r.chooseMoreUnlock||"Choose __COUNT__ more to unlock __PCT__% off",{COUNT:e,PCT:o}):J(r.chooseMoreComplete||"Choose __COUNT__ more to complete your bundle",{COUNT:e})}var So={min:1,max:99};function X(e,t,n){if(n!=null){let o=t["gid://shopify/ProductVariant/"+n];if(o&&typeof o.min=="number"&&typeof o.max=="number")return o}let r=t["gid://shopify/Product/"+e];return!r||typeof r.min!="number"||typeof r.max!="number"?So:r}function pe(e,t){if(e==null)return;let n=t["gid://shopify/ProductVariant/"+e];if(!(!n||typeof n.min!="number"||typeof n.max!="number"))return n}function Je(e,t){let n=e??{};if(!t)return n;let r=Object.keys(t);if(r.length===0)return n;let o={...n};for(let i of r)o[i]=t[i];return o}function Xe(e,t,n){return X(e,t,n).min}function oe(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].quantity||1;return t}function me(e,t){for(let n=0;n<e.length;n++)if(e[n]&&e[n].variantId===t)return n;return-1}function An(e,t){let n=me(e,t);return n===-1?0:e[n].quantity||0}function Ln(e,t){return e.min<=t}function Pn(e,t,n,r=0,o=0,i){let a=Math.min(e.max-o,r+t);return typeof i=="number"&&(a=Math.min(a,i)),typeof n=="number"?Math.min(a,n):a}var Bn=[120,180,240],kt=[480,600,768,1024],qn="60px",Rn="(max-width: 767px) 45vw, 228px";function ke(e,t){return e&&(/[?&]width=\d+/.test(e)?e.replace(/([?&])width=\d+/,"$1width="+t):e+(e.indexOf("?")===-1?"?":"&")+"width="+t)}function Me(e,t){return e?t.map(n=>ke(e,n)+" "+n+"w").join(", "):""}function Ze(e,t){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Se(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():""}var Nn=600;function et(e,t,n){let{t:r,rulesMap:o,capacity:i,formatMoney:a}=n,l=X(e.id,o),d=document.createElement("div");d.className="lb-mix-match__modal-product",e.available||(d.className+=" lb-mix-match__modal-product--sold-out"),d.setAttribute("data-product-item",""),d.setAttribute("data-title",Se(e.title)),d.setAttribute("data-type",e.type||"");let s=!1,c=!1,u=document.createElement("div");u.className="lb-mix-match__modal-product-thumb";let p=document.createElement("span");p.className="lb-mix-match__modal-added-badge",p.textContent=r.addedItem||"Added",p.hidden=!0,u.appendChild(p);let v=e.variants.find(f=>f.available)??null,g=v&&v.image||e.featuredImage;if(g){let f=document.createElement("img");f.src=ke(g,Nn),f.srcset=Me(g,kt),f.sizes=Rn,f.alt=e.title,f.loading="lazy",u.appendChild(f)}d.appendChild(u);let C=document.createElement("div");C.className="lb-mix-match__modal-product-info";let I=document.createElement("p");if(I.className="lb-mix-match__modal-product-title",e.url){let f=document.createElement("a");f.href=e.url,f.target="_blank",f.rel="noopener noreferrer",f.textContent=e.title,I.appendChild(f)}else I.textContent=e.title;C.appendChild(I);let b=v??(e.variants.length>0?e.variants[0]:null),A=f=>X(e.id,o,f?f.id:null),O=b?A(b).min:1,k=document.createElement("p");k.className="lb-mix-match__modal-product-price",k.setAttribute("data-row-price","");let m=document.createElement("span");m.setAttribute("data-row-price-sale",""),b&&(m.textContent=a(b.price*O)),k.appendChild(m);let w=document.createElement("s");w.className="lb-mix-match__modal-product-compare",w.setAttribute("data-row-compare",""),k.appendChild(w),C.appendChild(k);function E(f,H,_){let y=H&&H.compareAtPrice?H.compareAtPrice*_:0,L=H?H.price*_:0;y>L?(f.textContent=a(y),f.hidden=!1):(f.textContent="",f.hidden=!0)}E(w,b,O);let x=document.createElement("p");x.className="lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price",x.setAttribute("data-row-unit-price","");let z=b?b.unitPrice:null;z?x.textContent=z:x.hidden=!0,C.appendChild(x);let F=null,Q=null,W=A(b).min,te=A(b).max,ne=null,K=null;if(e.available&&n.showQtySelector){F=document.createElement("div"),F.className="lb-bundle-variant-option-group lb-mix-match__qty-stepper-group";let f=document.createElement("div");f.className="lb-mix-match__qty-stepper",f.setAttribute("role","group"),f.setAttribute("aria-label",r.quantity||"Quantity");let H=document.createElement("button");H.type="button",H.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",H.setAttribute("aria-label",r.decreaseQuantity||"Decrease quantity"),H.textContent="\u2212",Q=document.createElement("span"),Q.className="lb-mix-match__qty-stepper-value",Q.setAttribute("data-row-qty",""),Q.setAttribute("aria-live","polite"),Q.textContent=String(A(b).min);let _=document.createElement("button");_.type="button",_.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",_.setAttribute("aria-label",r.increaseQuantity||"Increase quantity"),_.textContent="+",f.appendChild(H),f.appendChild(Q),f.appendChild(_),F.appendChild(f);let y=Q;ne=()=>{y.textContent=String(W),y.setAttribute("data-qty",String(W)),H.disabled=c||W<=A(b).min,_.disabled=c||W>=te},K=(S,N=0)=>{let B=S?S.id:null,R=B===null?0:i.ownQty(B),V=B===null?0:i.productUnitsElsewhere(e.id,B),U=B===null?0:i.swapUnits(e.id,B),G=S?S.inventoryQuantity:null,Z=Math.max(0,N-R),be=typeof G=="number"?Math.max(0,G-Z):void 0,ge=pe(B,o)?.max,ee=A(S).min;te=U>0?typeof be=="number"?Math.min(U,be):U:Pn(l,i.remainingSpots(),be,R,V,ge),te<ee?W=ee:(W>te&&(W=te),W<ee&&(W=ee)),ne()};let L=()=>{b&&i.commitQty(b.id,W)&&n.onCommittedQtyChanged()};H.addEventListener("click",()=>{W>A(b).min&&(W-=1),ne(),L()}),_.addEventListener("click",()=>{W<te&&(W+=1),ne(),L()}),b?K(b):ne()}let $=e.variants.slice(),P=[];if($.length>1){let f=e.optionNames||[];b=$.find(B=>B.available!==!1)??$[0];let H=()=>{let B=P.map(R=>R.value);for(let R of $)if(!(!R.options||R.options.length!==B.length)&&R.options.every((V,U)=>V===B[U]))return R;return null},_=B=>{if(!(!B||!B.options))for(let R=0;R<P.length&&R<B.options.length;R++)P[R].value!==B.options[R]&&(P[R].value=B.options[R])},y=(B,R,V)=>{for(let U of $){if(U.available===!1||!U.options||U.options[B]!==R)continue;let G=!0;for(let Z=0;Z<U.options.length;Z++)if(Z!==B&&U.options[Z]!==V[Z]){G=!1;break}if(G)return!0}return!1},L=B=>{for(let R=0;R<P.length;R++){let V=P[R];for(let U=0;U<V.options.length;U++)V.options[U].disabled=!y(R,V.options[U].value,B)}},S=()=>{let B=H();if(!B){_(b),b?.options&&L(b.options);return}b=B,d.setAttribute("data-selected-variant-id",String(B.id));let R=A(B).min;m.textContent=a(B.price*R),E(w,B,R),B.unitPrice?(x.textContent=B.unitPrice,x.hidden=!1):(x.textContent="",x.hidden=!0);let V=u.querySelector("img"),U=B.image||e.featuredImage;V&&U&&(V.src=ke(U,Nn),V.srcset=Me(U,kt)),K?.(B,i.variantUnitsElsewhere(B.id)),B.options&&L(B.options),D()},N=document.createElement("div");N.className="lb-bundle-variant-option-groups";for(let B=0;B<f.length;B++){let R=f[B],V=document.createElement("div");V.className="lb-bundle-variant-option-group";let U=document.createElement("span");U.className="lb-bundle-variant-option-label",U.textContent=R,V.appendChild(U);let G=document.createElement("select");G.className="lb-mix-match__variant-select",G.setAttribute("data-variant-option",""),G.setAttribute("data-option-position",String(B+1)),G.name="lb-variant-"+e.id+"-"+(B+1),G.setAttribute("aria-label",R);let Z=Object.create(null),be=b?.options?.[B];for(let ge of $){let ee=ge.options&&ge.options[B];if(!ee||Z[ee])continue;Z[ee]=!0;let Ne=document.createElement("option");Ne.value=ee,Ne.textContent=ee,ee===be&&(Ne.selected=!0),G.appendChild(Ne)}G.addEventListener("change",S),P.push(G),V.appendChild(G),N.appendChild(V)}C.appendChild(N),b&&(d.setAttribute("data-selected-variant-id",String(b.id)),b.options&&L(b.options))}else if($.length===1&&$[0].title!=="Default Title"){let f=document.createElement("span");f.className="lb-mix-match__filled-variant",f.textContent=$[0].title,C.appendChild(f)}let T=null;e.available&&(T=document.createElement("span"),T.className="lb-mix-match__modal-needs-spots",T.hidden=!0,C.appendChild(T));let h=null;if(e.available){let f=document.createElement("div");f.className="lb-mix-match__modal-product-actions",F&&f.appendChild(F),h=document.createElement("button"),h.type="button",h.className="lb-mix-match__modal-add",h.textContent=r.addItem||"Add",h.setAttribute("aria-label",(r.addItem||"Add")+" "+e.title),h.setAttribute("data-add-product",String(t)),f.appendChild(h),C.appendChild(f)}else{let f=document.createElement("span");f.className="lb-mix-match__modal-sold-out-label",f.textContent=r.soldOut||"Sold out",d.setAttribute("aria-disabled","true"),C.appendChild(f)}d.appendChild(C);let M=b?b.id:null;function D(){if(!b)return;let f=b,H=f.inventoryQuantity,_=typeof H=="number"?i.variantUnitsElsewhere(f.id):0,y=i.isInBundle(f.id);if(K){let V=i.ownQty(f.id);V>0?W=V:M!==f.id&&(W=A(f).min),M=f.id,K(f,_)}let L=i.swapUnits(e.id,f.id),S=A(f),N=L>=S.min,B=i.remainingSpots(),R=!y&&!N&&!Ln(S,B);if(T&&(R&&B>0?(T.textContent=Ke(S.min,r),T.hidden=!1):T.hidden=!0),h)if(y)h.disabled=!1,i.canRemove(f.id)?(h.textContent=r.removeItem||"Remove",h.setAttribute("aria-label",(r.removeItem||"Remove")+" "+e.title),h.classList.remove("lb-mix-match__modal-add--required")):(h.disabled=!0,h.textContent=r.required||"Required",h.setAttribute("aria-label",e.title+" is required and cannot be removed"),h.classList.add("lb-mix-match__modal-add--required")),h.classList.add("lb-mix-match__modal-add--added"),d.classList.add("lb-mix-match__modal-product--in-bundle"),p.hidden=!1;else{let V=r.swapItem||"Swap",U=N?V:r.addItem||"Add";h.textContent=U,h.setAttribute("aria-label",U+" "+e.title),h.classList.remove("lb-mix-match__modal-add--added"),h.classList.remove("lb-mix-match__modal-add--required"),d.classList.remove("lb-mix-match__modal-product--in-bundle"),p.hidden=!0;let G=typeof H=="number"?Math.max(0,H-_)<S.min:!1;if(N)h.disabled=G;else{let Z=l.max-i.productUnitsElsewhere(e.id,f.id)<S.min;h.disabled=G||Z||R||i.isFull()}}s=!e.available,c=!e.available||!y&&!!h?.disabled,ne?.();for(let V of P)V.disabled=s}return{el:d,refresh:D}}var To='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';function tt(e){let t=e.querySelectorAll(To),n=[];for(let r=0;r<t.length;r++)t[r].offsetParent!==null&&n.push(t[r]);return n}var St=0,Ie=0;function nt(){if(Ie++,Ie>1)return;St=window.pageYOffset||document.documentElement.scrollTop;let e=document.body;e.style.position="fixed",e.style.top="-"+St+"px",e.style.left="0",e.style.right="0",e.style.overflow="hidden"}function rt(){if(Ie<=0||(Ie--,Ie>0))return;let e=document.body;e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",window.scrollTo(0,St)}var Ae="__all__",Eo=300,Mo=200;function On(e){let{container:t,data:n,t:r,eligibleProducts:o,items:i}=e,a=t.querySelector("[data-modal-overlay]");a&&e.portalTarget&&e.portalTarget.appendChild(a);let l=h=>a?a.querySelector(h):null,d=l('[role="dialog"]'),s=l("[data-modal-search]"),c=l("[data-modal-search-clear]"),u=l("[data-modal-list]"),p=l("[data-modal-empty]"),v=l("[data-modal-live]"),g=l("[data-modal-close]"),C=l("[data-modal-done]"),I=l("[data-modal-footer-count]"),b=l("[data-modal-subtitle]"),A=l("[data-modal-filters]"),O=n.showTypeFilters!==!1,k=Ae,m=!1,w=!1,E=!1,x=[];function z(){for(let h of x)h.refresh()}function F(){let h=Math.min(oe(i),e.requiredQty),M=Math.max(0,e.requiredQty-h);I&&(I.textContent=Ye(h,e.requiredQty,r)),b&&(b.textContent=In(M,n.discountType,n.discountValue,r))}function Q(){z(),F()}function W(){if(u){e.dropdown?.unbindAll(u),u.innerHTML="",x=[];for(let h=0;h<o.length;h++){let M=et(o[h],h,{t:r,rulesMap:e.rulesMap,showQtySelector:e.showQtySelector,capacity:e.rowCapacity,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),Q()}});x.push(M),u.appendChild(M.el)}e.dropdown?.bindAll(u),u.addEventListener("click",te)}}function te(h){let M=h.target.closest("[data-add-product]");if(!M||M.disabled)return;let D=parseInt(M.getAttribute("data-add-product")??"",10),f=o[D];if(!f)return;let H=M.closest(".lb-mix-match__modal-product"),_=H&&H.getAttribute("data-selected-variant-id"),y=(_?f.variants.find(R=>R.id===parseInt(_,10)):null)??null;if(y||(y=f.variants.find(R=>R.available)??null),!y)return;if(e.isInBundle(y.id)){e.removeVariant(y.id),Q();return}let L=H?.querySelector("[data-row-qty]"),S=L?Math.max(1,parseInt(L.getAttribute("data-qty")||L.textContent||"",10)||1):Xe(f.id,e.rulesMap,y.id),N={productId:f.id,variantId:y.id,title:f.title,url:f.url||null,variantTitle:y.title,featuredImage:y.image||f.featuredImage||null,price:y.price,compareAtPrice:y.compareAtPrice||null,unitPrice:y.unitPrice||null,quantity:S},B=e.swapUnitsFor(f.id,y.id);if(B>0){e.swapVariant(N,Math.min(S,B)),Q();return}e.atCapacity()||(e.addSelection(N),Q())}function ne(){if(!A||!O)return;let h=[],M=Object.create(null);for(let D of o){let f=(D.type||"").trim();f&&!M[f]&&(M[f]=!0,h.push(f))}if(h.length<2){A.style.display="none",d?.classList.add("lb-mix-match__modal--filters-hidden");return}A.innerHTML="";for(let D of[Ae,...h]){let f=document.createElement("button");f.type="button",f.className="lb-mix-match__filter",f.setAttribute("data-filter",D),f.setAttribute("aria-pressed",D===k?"true":"false"),D===k&&f.classList.add("lb-mix-match__filter--active"),f.textContent=D===Ae?r.allTypes||"All":D,f.addEventListener("click",()=>{k=D,K(),$(s?s.value:"")}),A.appendChild(f)}}function K(){if(!A)return;let h=A.querySelectorAll("[data-filter]");for(let M=0;M<h.length;M++){let D=h[M].getAttribute("data-filter")===k;h[M].classList.toggle("lb-mix-match__filter--active",D),h[M].setAttribute("aria-pressed",D?"true":"false")}}function $(h){if(!u)return;let M=Se(h),D=u.querySelectorAll("[data-product-item]"),f=0;for(let H=0;H<D.length;H++){let _=D[H].getAttribute("data-title")??"",y=D[H].getAttribute("data-type")||"",L=(!M||_.indexOf(M)!==-1)&&(k===Ae||y===k);D[H].classList.toggle("lb-hidden",!L),L&&f++}p&&(p.style.display=f===0&&M.length>0?"":"none"),c&&(c.style.display=h.length>0?"":"none"),v&&(v.textContent=J(r.nProductsShown||"__COUNT__ products shown",{COUNT:f}))}if(s){let h=Ze(()=>$(s.value),Mo);s.addEventListener("input",h)}c&&c.addEventListener("click",()=>{s&&(s.value="",$(""),s.focus())});function P(){!a||E||(E=!0,m||(W(),m=!0),w||(ne(),w=!0),Q(),k=Ae,K(),s&&(s.value=""),$(s?s.value:""),a.style.display="",a.offsetHeight,a.classList.add("lb-mix-match__modal-overlay--open"),nt(),setTimeout(()=>{s?s.focus():d?.focus()},50))}function T(){if(!a||!E)return;E=!1,a.classList.remove("lb-mix-match__modal-overlay--open"),rt(),setTimeout(()=>{E||(a.style.display="none")},Eo);let h=e.fallbackFocus;h&&typeof h.focus=="function"&&setTimeout(()=>h.focus(),0)}if(g?.addEventListener("click",T),C?.addEventListener("click",T),a){let h=null;a.addEventListener("mousedown",M=>{h=M.target}),a.addEventListener("mouseup",M=>{M.target===a&&h===a&&T(),h=null})}return document.addEventListener("keydown",h=>{if(E){if(h.key==="Escape"){h.preventDefault(),T();return}if(h.key==="Tab"&&d){let M=tt(d);if(M.length===0){h.preventDefault();return}let D=M[0],f=M[M.length-1];h.shiftKey&&document.activeElement===D?(h.preventDefault(),f.focus()):!h.shiftKey&&document.activeElement===f&&(h.preventDefault(),D.focus())}}}),{open:P,close:T,isOpen:()=>E,refresh:Q,overlay:a}}function Hn(e,t){return Math.max(0,t-oe(e))}function Tt(e,t){return oe(e)>=t}function Dn(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].variantId===t&&(n+=e[r].quantity||0);return n}function ot(e,t,n){let r=0;for(let o=0;o<e.length;o++){let i=e[o];i&&i.productId===t&&i.variantId!==n&&(r+=i.quantity||0)}return r}function Te(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i=0;i<e.length;i++){let a=e[i];a!==t&&a.productId===t.productId&&(o+=a.quantity||1)}return o>=r.min}function Et(e,t,n,r){let o=X(t,r);return!o.required||o.max!==o.min||me(e,n)!==-1?0:ot(e,t,n)}function Io(){let e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("viewBox","0 0 20 20"),t.setAttribute("fill","none");for(let[n,r,o,i]of[["5","5","15","15"],["15","5","5","15"]]){let a=document.createElementNS(e,"line");a.setAttribute("x1",n),a.setAttribute("y1",r),a.setAttribute("x2",o),a.setAttribute("y2",i),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","2"),a.setAttribute("stroke-linecap","round"),t.appendChild(a)}return t}function it(e,t,n,r,o,i){let a=document.createElement("div");a.className="lb-mix-match__slot lb-mix-match__slot--filled";let l=document.createElement("div");if(l.className="lb-bundle-thumbnail",e.featuredImage){let g=document.createElement("img");g.src=ke(e.featuredImage,240),g.srcset=Me(e.featuredImage,Bn),g.sizes=qn,g.alt=e.title,g.loading="lazy",l.appendChild(g)}a.appendChild(l);let d=document.createElement("div");d.className="lb-mix-match__filled-info";let s=document.createElement("button");if(s.type="button",s.className="lb-mix-match__filled-title",s.textContent=e.title,s.setAttribute("aria-label",(t.editSelection||"Edit selection")+": "+e.title),d.appendChild(s),e.variantTitle&&e.variantTitle!=="Default Title"){let g=document.createElement("span");g.className="lb-mix-match__filled-variant",g.textContent=e.variantTitle,d.appendChild(g)}let c=document.createElement("span");c.className="lb-mix-match__filled-price";let u=e.compareAtPrice||0;if(u>e.price){let g=document.createElement("s");g.className="lb-mix-match__filled-compare",g.textContent=n(u),c.appendChild(g)}let p=document.createElement("span");p.className="lb-bundle-product-price",p.textContent=n(e.price),c.appendChild(p);let v=document.createElement("span");if(v.className="lb-bundle-qty-inline",v.textContent="\xD7"+(e.quantity||1),c.appendChild(v),d.appendChild(c),e.unitPrice){let g=document.createElement("span");g.className="lb-bundle-product-unit-price",g.textContent=e.unitPrice,d.appendChild(g)}if(a.appendChild(d),r){let g=document.createElement("button");g.type="button",g.className="lb-mix-match__slot-remove",g.setAttribute("aria-label",(t.removeItem||"Remove")+" "+e.title),g.appendChild(Io()),g.addEventListener("click",C=>{C.stopPropagation(),o()}),a.appendChild(g)}else{let g=document.createElement("span");g.className="lb-mix-match__slot-required",g.textContent=t.required||"Required",a.appendChild(g)}return a.addEventListener("click",i),a}function Fn(e,t,n,r,o){let i=r.translations||{},a=e.querySelector("[data-selection-slots]");if(a){a.innerHTML="";for(let s=0;s<t.length;s++){let c=s;a.appendChild(it(t[c],i,o.formatMoney,Te(t,t[c],o.rulesMap),()=>o.onRemove(c),o.onEdit))}}let l=e.querySelector("[data-add-product-trigger]");l&&(l.style.display=oe(t)>=n?"none":"");let d=e.querySelector("[data-add-bundle]");if(d){d.disabled=oe(t)<n;let s=d.querySelector("[data-cta-label]");s&&(s.textContent=d.getAttribute("data-cta-text")||i.addToCart||"Add to cart")}}function Vn(e,t,n,r,o,i){let a=e.querySelector("[data-pricing-section]");if(oe(t)<n){a&&(a.style.display="none");return}a&&(a.style.display="");let l=0;for(let d=0;d<t.length;d++)l+=t[d].price*(t[d].quantity||1);l>0&&r.discountType&&i(e,o(l,r.discountType,r.discountValue??0),l)}function Un(e,t,n,r,o){let i=Math.min(oe(n),r),a=Math.max(0,r-i),l=[e];t&&l.push(t);for(let d of l){let s=d.querySelectorAll("[data-progress-segment]");for(let v=0;v<s.length;v++)s[v].classList.toggle("lb-mix-match__progress-segment--filled",v<i);let c=d.querySelector("[data-progress-count]");c&&(c.textContent=Ye(i,r,o));let u=d.querySelector("[data-progress-remaining]");u&&(u.textContent=Mn(a,o));let p=d.querySelector(".lb-mix-match__progress-segments");p&&p.setAttribute("aria-valuenow",String(i))}}function at(e){return(t,n,r)=>{let o=t.querySelector("[data-sale-price]"),i=t.querySelector("[data-compare-price]"),a=t.querySelector("[data-savings-bar]"),l=t.querySelector("[data-savings-amount]"),d=t.querySelector("[data-savings-percent]"),s=r-n;if(o&&(o.textContent=e(n)),i&&(s>0?(i.textContent=e(r),i.style.display=""):i.style.display="none"),a)if(s>0){if(l&&(l.textContent=e(s)),d){let c=r>0?Math.round(s*100/r):0;d.textContent="("+c+"%)"}a.style.display=""}else a.style.display="none"}}function zn(e,t,n,r){let o=c=>c.variants.find(u=>u.available)??null,i=(c,u,p)=>({productId:c.id,variantId:u.id,title:c.title,url:c.url||null,variantTitle:u.title,featuredImage:c.featuredImage||null,price:u.price,compareAtPrice:u.compareAtPrice||null,unitPrice:u.unitPrice||null,quantity:p}),a=[];for(let c of e){if(!c.available||!c.variants)continue;let u=!1;for(let g of c.variants){let C=pe(g.id,t);!C?.required||!g.available||(a.push(i(c,g,Math.max(1,C.min))),u=!0)}if(u)continue;let p=X(c.id,t);if(!p.required)continue;let v=o(c);v&&a.push(i(c,v,Math.max(1,p.min)))}if(a.length||!r?.enabled)return a;let l=c=>c.available&&X(c.id,t).min<=n,d=(r.currentProductId!=null?e.find(c=>c.id===r.currentProductId&&l(c)):null)??e.find(l);if(!d)return[];let s=o(d);return s?[i(d,s,X(d.id,t).min)]:[]}function Qn(e){let t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("viewBox","0 0 20 20"),n.setAttribute("fill","none");for(let[r,o,i,a]of e){let l=document.createElementNS(t,"line");l.setAttribute("x1",r),l.setAttribute("y1",o),l.setAttribute("x2",i),l.setAttribute("y2",a),l.setAttribute("stroke","currentColor"),l.setAttribute("stroke-width","2"),l.setAttribute("stroke-linecap","round"),n.appendChild(l)}return n}function j(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let o in n)r.setAttribute(o,n[o]);return r}function lt(e){let t="lb-modal-title-"+e.domId,n=j("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.bundleGid,style:"display: none;"}),r=j("div","lb-mix-match__modal"+(e.showTypeFilters?"":" lb-mix-match__modal--filters-hidden"),{role:"dialog","aria-modal":"true","aria-labelledby":t,tabindex:"-1"}),o=j("div","lb-mix-match__modal-header"),i=j("div","lb-mix-match__modal-header-top"),a=j("div","lb-mix-match__modal-heading"),l=j("h4","lb-mix-match__modal-title",{id:t});e.wizard&&l.setAttribute("tabindex","-1"),l.textContent="Add to your bundle",a.appendChild(l),a.appendChild(j("p","lb-mix-match__modal-subtitle",{"data-modal-subtitle":""})),i.appendChild(a);let d=j("button","lb-mix-match__modal-close",{type:"button","data-modal-close":"","aria-label":"Close"});d.appendChild(Qn([["5","5","15","15"],["15","5","5","15"]])),i.appendChild(d),o.appendChild(i);let s=j("div","lb-mix-match__progress lb-mix-match__modal-progress",{"data-progress":""}),c=j("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e.segmentCount??0)});if(e.wizard)c.setAttribute("data-modal-step-segments","");else for(let C=0;C<(e.segmentCount??0);C++)c.appendChild(j("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));if(s.appendChild(c),o.appendChild(s),r.appendChild(o),e.showSearch){let C=j("div","lb-mix-match__modal-search"),I=j("input","lb-mix-match__modal-search-input",{type:"text","data-modal-search":"",role:"searchbox","aria-label":"Search products",placeholder:"Search products",autocomplete:"off"});C.appendChild(I);let b=j("button","lb-mix-match__modal-search-clear",{type:"button","data-modal-search-clear":"","aria-label":"Clear search",style:"display: none;"});b.appendChild(Qn([["5","5","15","15"],["15","5","5","15"]])),C.appendChild(b),r.appendChild(C)}e.showTypeFilters&&r.appendChild(j("div","lb-mix-match__filters",{"data-modal-filters":"",role:"group","aria-label":"Filter by type"})),r.appendChild(j("div","lb-mix-match__modal-list",{"data-modal-list":""}));let u=j("div","lb-mix-match__modal-empty",{"data-modal-empty":"",style:"display: none;"}),p=document.createElement("p");p.textContent="No products match your search",u.appendChild(p),r.appendChild(u),r.appendChild(j("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"}));let v=j("div",e.wizard?"lb-mix-match__modal-footer lb-multi-step__modal-footer":"lb-mix-match__modal-footer");if(e.wizard){let C=j("button","lb-multi-step__modal-back",{type:"button","data-modal-back":"",style:"display: none;"});C.textContent="Back",v.appendChild(C)}if(v.appendChild(j("span","lb-mix-match__modal-footer-count",{"data-modal-footer-count":"","aria-live":"polite"})),e.wizard){let C=j("button","lb-mix-match__modal-done",{type:"button","data-modal-next":"",style:"display: none;"});C.textContent="Next",v.appendChild(C)}let g=j("button","lb-mix-match__modal-done",{type:"button","data-modal-done":"",...e.wizard?{style:"display: none;"}:{}});return g.textContent="Done",v.appendChild(g),r.appendChild(v),n.appendChild(r),n}function Wn(e,t,n,r,o){let i=t.widgetConfig,a=ue,l=t.minQuantity||1,d=Je(t.productRules,t.variantRules),c=Ve(t).map(m=>({id:Number(m.productId),title:m.title??"",url:m.url??null,type:"",featuredImage:m.featuredImage??null,available:m.variants.some(w=>w.available),optionNames:m.optionNames,variants:m.variants.map(w=>({id:Number(w.id),title:w.title,options:w.options,available:w.available,price:w.price,compareAtPrice:w.compareAtPrice,unitPrice:w.unitPrice,image:w.image,inventoryQuantity:null}))}));if(!c.length)return;let u=c.filter(m=>m.available).length;if(n==="hide"&&u===0)return;let p=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),v=de("lb-mix-match",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});v.root.setAttribute("data-required-quantity",String(l)),v.products.before(je(l));let g=document.createElement("div");g.className="lb-mix-match__slots lb-edge-fade",g.setAttribute("data-selection-slots",""),v.products.replaceWith(g);let C=document.createElement("button");C.type="button",C.className="lb-mix-match__add-product",C.setAttribute("data-add-product-trigger",""),C.textContent=(a.addItem,"Add a product"),g.after(C);let I=lt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!1,segmentCount:l,wizard:!1});v.root.appendChild(I);let b=zn(c,d,l),A={remainingSpots:()=>Hn(b,l),ownQty:m=>An(b,m),variantUnitsElsewhere:m=>Dn(b,m),productUnitsElsewhere:(m,w)=>ot(b,m,w),swapUnits:(m,w)=>Et(b,m,w,d),isInBundle:m=>me(b,m)!==-1,canRemove:m=>{let w=me(b,m);return w!==-1&&Te(b,b[w],d)},isFull:()=>Tt(b,l),commitQty:(m,w)=>{let E=me(b,m);return E===-1||b[E].quantity===w?!1:(b[E].quantity=w,!0)}};function O(){Fn(v.root,b,l,t,{formatMoney:p,rulesMap:d,onRemove:m=>{Te(b,b[m],d)&&(b.splice(m,1),O(),k.isOpen()&&k.refresh())},onEdit:()=>k.open()}),Vn(v.root,b,l,t,(m,w,E)=>De(m,w,E),at(p)),Un(v.root,k.overlay,b,l,a)}let k=On({container:v.root,data:{translations:a,discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},t:a,rulesMap:d,eligibleProducts:c,requiredQty:l,showQtySelector:!0,items:b,formatMoney:p,rowCapacity:A,dropdown:void 0,portalTarget:null,fallbackFocus:C,onSelectionChanged:O,addSelection:m=>{if(oe(b)+(m.quantity||1)>l)return;let w=pe(m.variantId,d)?.max,E=X(m.productId,d).max-ot(b,m.productId,m.variantId);typeof w=="number"&&(E=Math.min(E,w)),!((m.quantity||1)>E)&&(b.push(m),O())},removeVariant:m=>{let w=me(b,m);w===-1||!Te(b,b[w],d)||(b.splice(w,1),O())},swapVariant:(m,w)=>{let E=0;for(let x=b.length-1;x>=0&&E<w;x--){let z=b[x];if(z.productId!==m.productId||z.variantId===m.variantId)continue;let F=Math.min(z.quantity||1,w-E);F>=(z.quantity||1)?b.splice(x,1):z.quantity=(z.quantity||1)-F,E+=F}E>0&&(m.quantity=E,b.push(m),O())},swapUnitsFor:(m,w)=>Et(b,m,w,d),isInBundle:m=>me(b,m)!==-1,atCapacity:()=>Tt(b,l)});C.addEventListener("click",()=>{k.isOpen()||k.open()}),v.cta.addEventListener("click",()=>{oe(b)<l||r(b.map(m=>({merchandiseId:"gid://shopify/ProductVariant/"+m.variantId,quantity:m.quantity||1,attributes:se(t.id,t.bundleType)})))}),e.appendChild(v.root),ce(v.root),O(),o?.(he(v.root))}function Ao(e,t,n){if(t==="fixed_amount"){let o=parseInt(n.getAttribute("data-tier-amt")??"",10)||0;return Math.max(0,e-o)}let r=parseInt(n.getAttribute("data-tier-pct")??"",10)||0;return Math.max(0,e-Math.floor(e*r/100))}function Lo(e,t,n){let r=parseInt(n.getAttribute("data-tier-qty")??"",10),o=Ao(e,t,n),i=o*r,a=e*r;return{qty:r,priceEach:o,totalPrice:i,undiscountedTotal:a,totalSavings:a-i}}function Po(e,t){if(!t.itemCount)return null;let n=new Intl.PluralRules(t.locale||"en").select(e);return" ("+(t.itemCount[n]||t.itemCount.other||"__COUNT__").split("__COUNT__").join(String(e))+")"}function jn(e,t,n,r,o,i,a){for(let b=0;b<t.length;b++)t[b].setAttribute("aria-checked",b===o?"true":"false"),t[b].setAttribute("tabindex",b===o?"0":"-1");let{qty:l,totalPrice:d,undiscountedTotal:s,totalSavings:c}=Lo(n,r,t[o]),u=e.querySelector("[data-item-count]");if(u){let b=Po(l,i);b!==null&&(u.textContent=b)}let p=e.querySelector("[data-total-price]");p&&(p.textContent=a(d));let v=e.querySelector("[data-compare-price]");v&&(c>0?(v.textContent=a(s),v.style.display=""):v.style.display="none");let g=e.querySelector("[data-savings-bar]"),C=e.querySelector("[data-savings-amount]"),I=e.querySelector("[data-savings-percent]");if(g)if(c>0){if(C&&(C.textContent=a(c)),I){let b=s>0?Math.round(c*100/s):0;I.textContent="("+b+"%)"}g.style.display=""}else g.style.display="none"}function $n(e,t,n,r){let o=t.widgetConfig,i=t.products[0];if(!i)return;let a=i.variants.nodes,l=a.find(m=>m.availableForSale)??a[0];if(!l)return;let d=a.some(m=>m.availableForSale);if(n==="hide"&&!d)return;let s=Fe(l.price.amount),c=t.discountConfig.discountType,u=le(i.priceRange.minVariantPrice.currencyCode),p=ue,v=o.popularBadge?.visible?Math.floor((t.volumeTiers.length-1)/2):-1,g=0,C=t.volumeTiers.map((m,w)=>{let E=c==="fixed_amount"?0:Math.round(m.percentage??0),x=c==="fixed_amount"?Math.round((m.amount??0)*100):0,z=c==="fixed_amount"?Math.max(0,s-x):Math.max(0,s-Math.floor(s*E/100)),F=s>0?Math.round((s-z)*100/s):0;return{quantity:m.minQuantity,percent:E,amountCents:x,label:J(p.buyQty||"Buy __COUNT__",{COUNT:m.minQuantity}),savingsLabel:F>0?"Save "+F+"%":null,badgeLabel:w===v?o.popularBadge?.text||"Most popular":null,selected:w===g}});if(!C.length)return;let I=de("lb-volume",{title:t.title,subtitle:t.description,summaryLabel:"Total",withItemCount:!0,totalPriceSlot:!0,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||p.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt}),b=gn(C,"Select quantity");I.products.replaceWith(b);let A=b.querySelectorAll("[data-tier-index]"),O=g,k=()=>jn(I.root,A,s,c,O,p,u);if(b.addEventListener("click",m=>{let w=m.target.closest("[data-tier-index]");w&&(O=parseInt(w.getAttribute("data-tier-index")??"",10)||0,k())}),b.addEventListener("keydown",m=>{m.key==="ArrowDown"||m.key==="ArrowRight"?(m.preventDefault(),O=Math.min(O+1,A.length-1),k(),A[O].focus()):(m.key==="ArrowUp"||m.key==="ArrowLeft")&&(m.preventDefault(),O=Math.max(O-1,0),k(),A[O].focus())}),d)I.cta.addEventListener("click",()=>{let m=parseInt(A[O].getAttribute("data-tier-qty")??"",10);r([{merchandiseId:l.id,quantity:m,attributes:se(t.id,t.bundleType)}])});else{I.cta.disabled=!0;let m=I.cta.querySelector("[data-cta-label]");m&&(m.textContent=p.outOfStock||"Out of stock")}e.appendChild(I.root),ce(I.root),k()}function st(e,t){return e-Math.floor(e*t/100)}function Bo(e,t,n,r){let o=Y(e[0],e[0].selectedVariantId),i=Y(e[1],e[1].selectedVariantId),a=o.price*n+i.price*r,l=o.price*n+st(i.price,t)*r;return{totalPrice:a,salePrice:l,savings:a-l}}function Mt(e,t,n,r,o){let i=e.querySelector("[data-product-price]"),a=e.querySelector("[data-product-compare-price]");if(i){if(r&&n>0){i.textContent=o(st(t.price,n)),a&&(a.textContent=o(t.price),a.hidden=!1);return}if(i.textContent=o(t.price),a){let l=t.compareAtPrice;l&&l>t.price?(a.textContent=o(l),a.hidden=!1):(a.textContent="",a.hidden=!0)}}}function It(e,t,n,r,o,i){let{totalPrice:a,salePrice:l,savings:d}=Bo(t,n,r,o),s=e.querySelector("[data-sale-price]"),c=e.querySelector("[data-compare-price]"),u=e.querySelector("[data-savings-bar]"),p=e.querySelector("[data-savings-amount]"),v=e.querySelector("[data-savings-percent]");if(s&&(s.textContent=i(l)),c&&(d>0?(c.textContent=i(a),c.style.display=""):c.style.display="none"),u)if(d>0){if(p&&(p.textContent=i(d)),v){let g=a>0?Math.round(d*100/a):0;v.textContent="("+g+"%)"}u.style.display=""}else u.style.display="none"}function Gn(e,t,n,r){let o=Y(e[0],e[0].selectedVariantId),i=Y(e[1],e[1].selectedVariantId),a={variantId:Number(e[0].selectedVariantId),quantity:n,priceCents:(o.price||0)*n},l=st(i.price||0,t)*r;return String(e[0].selectedVariantId)===String(e[1].selectedVariantId)?[{variantId:a.variantId,quantity:n+r,priceCents:(a.priceCents??0)+l}]:[a,{variantId:Number(e[1].selectedVariantId),quantity:r,priceCents:l}]}function Kn(e,t,n,r,o){let i=t.widgetConfig,a=t.products.find(A=>A.id===t.buyProductId),l=t.products.find(A=>A.id===t.getProductId);if(!a||!l)return;let d=t.buyQuantity,s=t.getQuantity,c=t.discountConfig.discountValue,u={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},p=[{..._e(a,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[0]??null}),role:"buy"},{..._e(l,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[1]??null}),role:"get"}],v=p.filter(A=>!A.variants.some(O=>O.available)).length;if(n==="hide"&&v>0)return;let g=le(a.priceRange.minVariantPrice.currencyCode),C=ue,I=de("lb-bogo",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||C.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});I.root.setAttribute("data-discount-value",String(c)),I.root.setAttribute("data-buy-qty",String(d)),I.root.setAttribute("data-get-qty",String(s));let b=c>=100?"Free":c+"% off";if(p.forEach((A,O)=>{let k=O===1,m=!A.variants.some(x=>x.available),w=We(A,C,{isOos:m,href:A.url,bogoRole:A.role,inlineQuantity:k?s:d,badgeText:k&&!m?b:null});if(I.products.appendChild(w),m)return;let E=Y(A,A.selectedVariantId);ze(w,A,E),Qe(w,E,A.featuredImage),Mt(w,E,c,k,g),Ue(w,()=>A,x=>{Qe(w,x,A.featuredImage),Mt(w,x,c,k,g),It(I.root,p,c,d,s,g)})}),v>0){I.cta.disabled=!0;let A=I.cta.querySelector("[data-cta-label]");A&&(A.textContent=(C.itemsOutOfStock||"__COUNT__ items out of stock").split("__COUNT__").join(String(v)))}else I.cta.addEventListener("click",()=>{r(Gn(p,c,d,s).map(A=>({merchandiseId:"gid://shopify/ProductVariant/"+A.variantId,quantity:A.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(I.root),ce(I.root),It(I.root,p,c,d,s,g),o?.(he(I.root))}function At(e,t,n){return J(n.stepOf||"Step __STEP__ of __TOTAL__",{STEP:e+1,TOTAL:t})}function Le(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Yn(e,t,n){return J(n.stepsCompleted||"__COUNT__ of __TOTAL__ steps completed",{COUNT:e,TOTAL:t})}function Jn(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function fe(e,t){let n=0;for(let r=0;r<e[t].length;r++)n+=e[t][r].quantity||1;return n}function ye(e,t,n){return fe(e,n)>=(t[n].minQuantity||1)}function Ee(e,t,n){let r=t[n].maxQuantity;return r==null?1/0:Math.max(0,r-fe(e,n))}function Pe(e,t){for(let n=0;n<t.length;n++)if(!ye(e,t,n))return!1;return!0}function Be(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i of e)for(let a of i)a!==t&&a.productId===t.productId&&(o+=a.quantity||1);return o>=r.min}function Lt(e,t,n,r,o){let i=X(n,o);if(!i.required||i.max!==i.min||we(e,t,r)!==-1)return 0;let a=0;for(let l of e[t])l.productId===n&&l.variantId!==r&&(a+=l.quantity||1);return a}function we(e,t,n){for(let r=0;r<e[t].length;r++)if(e[t][r].variantId===n)return r;return-1}function Xn(e){let{container:t,steps:n,selections:r,t:o}=e;for(let i=0;i<n.length;i++){let a=n[i].minQuantity||1,l=t.querySelector('[data-step-count="'+i+'"]');l&&(l.textContent=Le(Math.min(fe(r,i),a),a,o),l.classList.toggle("lb-multi-step__group-count--met",ye(r,n,i)));let d=t.querySelector('[data-step-slots="'+i+'"]');if(d){d.innerHTML="";for(let s=0;s<r[i].length;s++){let c=i,u=s,p=r[c][u];d.appendChild(it(p,o,e.formatMoney,Be(r,p,e.rulesMap),()=>e.onRemove(c,u),()=>e.onEdit(c)))}}}for(let i=0;i<n.length;i++){let a=t.querySelector('[data-step-trigger="'+i+'"]');a&&(a.style.display=Ee(r,n,i)===0?"none":"")}}function Zn(e,t,n,r){let{container:o,steps:i,selections:a}=e,l=o.querySelector("[data-pricing-section]");if(!Pe(a,i)){l&&(l.style.display="none");return}l&&(l.style.display="");let d=0;for(let s of a)for(let c of s)d+=c.price*(c.quantity||1);d>0&&t.discountType&&r(o,n(d,t.discountType,t.discountValue??0),d)}function er(e){let{container:t,steps:n,selections:r,t:o}=e,i=0;for(let u=0;u<n.length;u++)ye(r,n,u)&&(i+=1);let a=n.length-i,l=t.querySelectorAll("[data-progress] [data-progress-segment]");for(let u=0;u<l.length;u++)l[u].classList.toggle("lb-mix-match__progress-segment--filled",u<i);let d=t.querySelector("[data-progress-count]");d&&(d.textContent=Yn(i,n.length,o));let s=t.querySelector("[data-progress-remaining]");s&&(s.textContent=Jn(a,o));let c=t.querySelector(".lb-mix-match__progress-segments");c&&c.setAttribute("aria-valuenow",String(i))}function tr(e){let t=e.container.querySelector("[data-add-bundle]");if(!t)return;t.disabled=!Pe(e.selections,e.steps);let n=t.querySelector("[data-cta-label]");n&&(n.textContent=t.getAttribute("data-cta-text")||e.t.addToCart||"Add to cart")}function nr(e){let t=Object.create(null),n=[];for(let r of e)for(let o of r){let i=o.quantity||1,a=String(o.variantId);t[a]?(t[a].quantity+=i,t[a].priceCents=(t[a].priceCents??0)+(o.price||0)*i):(t[a]={variantId:o.variantId,quantity:i,priceCents:(o.price||0)*i},n.push(a))}return n.map(r=>t[r])}var qe="__all__",qo=300,Ro=200;function rr(e){let{container:t,steps:n,selections:r,t:o}=e,i=t.querySelector("[data-modal-overlay]");i&&e.portalTarget&&e.portalTarget.appendChild(i);let a=_=>i?i.querySelector(_):null,l=a('[role="dialog"]'),d=a(".lb-mix-match__modal-title"),s=a("[data-modal-search]"),c=a("[data-modal-search-clear]"),u=a("[data-modal-list]"),p=a("[data-modal-empty]"),v=a("[data-modal-live]"),g=a("[data-modal-close]"),C=a("[data-modal-back]"),I=a("[data-modal-next]"),b=a("[data-modal-done]"),A=a("[data-modal-footer-count]"),O=a("[data-modal-subtitle]"),k=a("[data-modal-step-segments]"),m=a("[data-modal-filters]"),w=qe,E=!1,x=0,z=[],F=_=>n[_].eligibleProducts||[],Q={remainingSpots:()=>Ee(r,n,x),ownQty:_=>{let y=we(r,x,_);return y===-1?0:r[x][y].quantity||0},variantUnitsElsewhere:_=>{let y=0;for(let L of r)for(let S of L)S.variantId===_&&(y+=S.quantity||0);return y},productUnitsElsewhere:(_,y)=>{let L=0;for(let S=0;S<r.length;S++)for(let N of r[S])N.productId===_&&(S===x&&N.variantId===y||(L+=N.quantity||0));return L},swapUnits:(_,y)=>Lt(r,x,_,y,e.rulesMap),isInBundle:_=>we(r,x,_)!==-1,canRemove:_=>{let y=we(r,x,_);return y!==-1&&e.canRemove(r[x][y])},isFull:()=>Ee(r,n,x)===0,commitQty:(_,y)=>{let L=we(r,x,_);return L===-1||r[x][L].quantity===y?!1:(r[x][L].quantity=y,!0)}};function W(_){if(!k)return;let y=n[_].minQuantity||1;k.innerHTML="",k.setAttribute("aria-valuemax",String(y));for(let L=0;L<y;L++){let S=document.createElement("span");S.className="lb-mix-match__progress-segment",S.setAttribute("data-progress-segment",""),k.appendChild(S)}te()}function te(){if(!k)return;let _=n[x].minQuantity||1,y=Math.min(fe(r,x),_),L=k.querySelectorAll("[data-progress-segment]");for(let S=0;S<L.length;S++)L[S].classList.toggle("lb-mix-match__progress-segment--filled",S<y);k.setAttribute("aria-valuenow",String(y))}function ne(){let _=n[x].minQuantity||1,y=Math.min(fe(r,x),_);A&&(A.textContent=Le(y,_,o)),O&&(O.textContent=At(x,n.length,o)+" \xB7 "+(n[x].name||""));let L=ye(r,n,x),S=x===n.length-1;C&&(C.style.display=x>0?"":"none"),I&&(I.style.display=S?"none":"",I.disabled=!L),b&&(b.style.display=S?"":"none",b.disabled=!L),te()}function K(){for(let _ of z)_.refresh();ne()}function $(_){if(!u)return;e.dropdown?.unbindAll(u),u.innerHTML="",z=[];let y=F(_);for(let L=0;L<y.length;L++){let S=et(y[L],L,{t:o,rulesMap:e.rulesMap,capacity:Q,showQtySelector:e.showQtySelector,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),K()}});z.push(S),u.appendChild(S.el)}e.dropdown?.bindAll(u)}function P(_){let y=_.target.closest("[data-add-product]");if(!y||y.disabled)return;let S=F(x)[parseInt(y.getAttribute("data-add-product")??"",10)];if(!S)return;let N=y.closest(".lb-mix-match__modal-product"),B=N&&N.getAttribute("data-selected-variant-id"),R=(B?S.variants.find(ee=>ee.id===parseInt(B,10)):null)??null;if(R||(R=S.variants.find(ee=>ee.available)??null),!R)return;let V=we(r,x,R.id);if(V!==-1){if(!e.canRemove(r[x][V]))return;r[x].splice(V,1),e.onSelectionChanged(),K();return}let U=N?.querySelector("[data-row-qty]"),G=U?Math.max(1,parseInt(U.getAttribute("data-qty")||U.textContent||"",10)||1):Xe(S.id,e.rulesMap,R.id),Z={productId:S.id,variantId:R.id,title:S.title,url:S.url||null,variantTitle:R.title,featuredImage:R.image||S.featuredImage||null,price:R.price,compareAtPrice:R.compareAtPrice||null,unitPrice:R.unitPrice||null,quantity:G},be=Lt(r,x,S.id,R.id,e.rulesMap);if(be>0){e.swapVariant(x,Z,Math.min(G,be)),K();return}let ge=Ee(r,n,x);ge!==1/0&&G>ge||(r[x].push(Z),e.onSelectionChanged(),K())}u&&u.addEventListener("click",P);function T(_){if(!m||!e.showTypeFilters)return;let y=[],L=Object.create(null);for(let S of F(_)){let N=(S.type||"").trim();N&&!L[N]&&(L[N]=!0,y.push(N))}if(y.length<2){m.style.display="none",l?.classList.add("lb-mix-match__modal--filters-hidden");return}m.style.display="",l?.classList.remove("lb-mix-match__modal--filters-hidden"),m.innerHTML="";for(let S of[qe,...y]){let N=document.createElement("button");N.type="button",N.className="lb-mix-match__filter",N.setAttribute("data-filter",S),N.setAttribute("aria-pressed",S===w?"true":"false"),S===w&&N.classList.add("lb-mix-match__filter--active"),N.textContent=S===qe?o.allTypes||"All":S,N.addEventListener("click",()=>{w=S,h(),M(s?s.value:"")}),m.appendChild(N)}}function h(){if(!m)return;let _=m.querySelectorAll("[data-filter]");for(let y=0;y<_.length;y++){let L=_[y].getAttribute("data-filter")===w;_[y].classList.toggle("lb-mix-match__filter--active",L),_[y].setAttribute("aria-pressed",L?"true":"false")}}function M(_){if(!u)return;let y=Se(_),L=u.querySelectorAll("[data-product-item]"),S=0;for(let N=0;N<L.length;N++){let B=L[N].getAttribute("data-title")??"",R=L[N].getAttribute("data-type")||"",V=(!y||B.indexOf(y)!==-1)&&(w===qe||R===w);L[N].classList.toggle("lb-hidden",!V),V&&S++}p&&(p.style.display=S===0&&y.length>0?"":"none"),c&&(c.style.display=_.length>0?"":"none"),v&&(v.textContent=J(o.nProductsShown||"__COUNT__ products shown",{COUNT:S}))}if(s){let _=Ze(()=>M(s.value),Ro);s.addEventListener("input",_)}c&&c.addEventListener("click",()=>{s&&(s.value="",M(""),s.focus())});function D(_,y={}){if(x=Math.max(0,Math.min(n.length-1,_)),$(x),T(x),w=qe,h(),s&&(s.value=""),M(""),W(x),K(),v){let L=n[x].minQuantity||1;v.textContent=At(x,n.length,o)+". "+(n[x].name||"")+". "+Le(Math.min(fe(r,x),L),L,o)}!y.skipFocus&&d&&typeof d.focus=="function"&&d.focus()}function f(_){!i||E||(E=!0,D(typeof _=="number"?_:0,{skipFocus:!0}),i.style.display="",i.offsetHeight,i.classList.add("lb-mix-match__modal-overlay--open"),nt(),setTimeout(()=>{s?s.focus():l?.focus()},50))}function H(){if(!i||!E)return;E=!1,i.classList.remove("lb-mix-match__modal-overlay--open"),rt(),setTimeout(()=>{E||(i.style.display="none")},qo);let _=t.querySelector('[data-step-trigger="'+x+'"]'),y=_&&_.offsetParent!==null?_:e.ctaButton;y&&typeof y.focus=="function"&&setTimeout(()=>y.focus(),0)}if(g?.addEventListener("click",H),b?.addEventListener("click",H),C?.addEventListener("click",()=>{x>0&&D(x-1)}),I?.addEventListener("click",()=>{x<n.length-1&&ye(r,n,x)&&D(x+1)}),i){let _=null;i.addEventListener("mousedown",y=>{_=y.target}),i.addEventListener("mouseup",y=>{y.target===i&&_===i&&H(),_=null})}return document.addEventListener("keydown",_=>{if(E){if(_.key==="Escape"){_.preventDefault(),H();return}if(_.key==="Tab"&&l){let y=tt(l);if(y.length===0){_.preventDefault();return}let L=y[0],S=y[y.length-1];_.shiftKey&&document.activeElement===L?(_.preventDefault(),S.focus()):!_.shiftKey&&document.activeElement===S&&(_.preventDefault(),L.focus())}}}),{open:f,close:H,isOpen:()=>E,refresh:K}}function or(e,t,n,r,o){let i=t.widgetConfig,a=ue,l=Je(t.productRules,t.variantRules),d=t.steps??[];if(!d.length)return;let s={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},c=d.map((k,m)=>nn(t,m).map(w=>{let E=_e(w,t.id,{quantities:s,allowedVariantIds:null});return{id:Number(E.productId),title:E.title??"",url:E.url??null,type:w.productType??"",featuredImage:E.featuredImage??null,available:E.variants.some(x=>x.available),optionNames:E.optionNames,variants:E.variants.map(x=>({id:Number(x.id),title:x.title,options:x.options,available:x.available,price:x.price,compareAtPrice:x.compareAtPrice,unitPrice:x.unitPrice,image:x.image,inventoryQuantity:null}))}})),u=c.some(k=>k.some(m=>m.available));if(n==="hide"&&!u)return;let p=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),v=de("lb-multi-step",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});v.products.before(je(d.length));let g=document.createElement("div");g.className="lb-multi-step__groups",d.forEach((k,m)=>{let w=document.createElement("div");w.className="lb-multi-step__group",w.setAttribute("data-step-group",String(m));let E=document.createElement("div");E.className="lb-multi-step__group-heading";let x=document.createElement("span");x.className="lb-multi-step__group-name",x.textContent=k.name,E.appendChild(x);let z=document.createElement("span");z.className="lb-multi-step__group-count",z.setAttribute("data-step-count",String(m)),E.appendChild(z),w.appendChild(E);let F=document.createElement("div");F.className="lb-mix-match__slots lb-edge-fade",F.setAttribute("data-step-slots",String(m)),w.appendChild(F);let Q=document.createElement("button");Q.type="button",Q.className="lb-mix-match__add-product",Q.setAttribute("data-step-trigger",String(m)),Q.textContent="Add a product",w.appendChild(Q),g.appendChild(w)}),v.products.replaceWith(g);let C=lt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:!0,showTypeFilters:!0,segmentCount:null,wizard:!0});v.root.appendChild(C);let I=d.map(()=>[]),b={container:v.root,steps:d.map((k,m)=>({name:k.name,minQuantity:k.minQuantity,maxQuantity:k.maxQuantity,eligibleProducts:c[m]})),selections:I,t:a,rulesMap:l,formatMoney:p,onRemove:(k,m)=>{let w=I[k][m];!w||!Be(I,w,l)||(I[k].splice(m,1),A(),O.isOpen()&&O.refresh())},onEdit:k=>O.open(k)};function A(){Xn(b),Zn(b,{discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},(k,m,w)=>De(k,m,w),at(p)),er(b),tr(b)}let O=rr({container:v.root,steps:b.steps,selections:I,t:a,rulesMap:l,showQtySelector:!0,showTypeFilters:!0,formatMoney:p,dropdown:void 0,portalTarget:null,ctaButton:v.cta,onSelectionChanged:A,swapVariant:(k,m,w)=>{let E=0,x=I[k];for(let z=x.length-1;z>=0&&E<w;z--){let F=x[z];if(F.productId!==m.productId||F.variantId===m.variantId)continue;let Q=Math.min(F.quantity||1,w-E);Q>=(F.quantity||1)?x.splice(z,1):F.quantity=(F.quantity||1)-Q,E+=Q}E>0&&(m.quantity=E,x.push(m),A())},canRemove:k=>Be(I,k,l)});v.root.querySelectorAll("[data-step-trigger]").forEach(k=>{k.addEventListener("click",()=>{O.isOpen()||O.open(parseInt(k.getAttribute("data-step-trigger")??"",10)||0)})}),v.cta.addEventListener("click",()=>{Pe(I,b.steps)&&r(nr(I).map(k=>({merchandiseId:"gid://shopify/ProductVariant/"+k.variantId,quantity:k.quantity,attributes:se(t.id,t.bundleType)})))}),e.appendChild(v.root),ce(v.root),A(),o?.(he(v.root))}var No=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),dt=new Set,ct=!1;function ir(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let n of dt)n.classList.add(e),n.classList.remove(t)}function ar(e){No.has(e.key)&&ir("using-keyboard")}function lr(){ir("using-mouse")}function Oo(){ct||(ct=!0,document.addEventListener("keydown",ar,!0),document.addEventListener("pointerdown",lr,!0))}function Ho(){ct&&(ct=!1,document.removeEventListener("keydown",ar,!0),document.removeEventListener("pointerdown",lr,!0))}function ut(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),dt.add(e),Oo(),()=>{dt.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),dt.size===0&&Ho()}}var Pt=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
240
+ `;var ae=class extends Error{constructor(e,t){super(e),this.reason=t,this.name="BundleParseError"}},Ot={none:0,subtle:6,rounded:12,round:18},ie={header:{countdownBgColor:"#B4DC7F47",countdownTextColor:"#555555"},layout:{backgroundColor:"#FCFCFC",borderColor:"#E5E5E5",borderWidth:1,borderRadius:"subtle"},productList:{textColor:"#555555",thumbnailRatio:"square",showPrice:!0,showCompareAtPrice:!0,showUnitPrice:!0,showQuantity:!0},pricing:{showComparePrice:!0,showPerUnitPrice:!0,showItemCount:!0,showCompareAtPrice:!0},cta:{ctaText:"Add to cart",primaryColor:"#B4DC7F",buttonTextColor:"#555555",borderWidth:0,borderColor:"#B4DC7F"},savingsBar:{visible:!0},countdown:{showCountdown:!0},popularBadge:{visible:!0,text:"Most Popular",bgColor:"#1A1A1A",textColor:"#FFFFFF",borderWidth:0,borderColor:"#1A1A1A"},showLowStockBadge:!0,lowStockThreshold:10,lowStockBgColor:"#FEF3C7",lowStockTextColor:"#92400E",showSearch:!0,mixMatchShowTypeFilters:!0,mixMatchShowQuantitySelector:!0,pickerBgColor:"#FCFCFC",pickerTextColor:"#555555",pickerBorderWidth:1,pickerBorderColor:"#E5E5E5",pickerBorderRadius:"subtle",pickerThumbnailRatio:"square",pickerAddBgColor:"#B4DC7F",pickerAddLabelColor:"#555555",pickerAddBorderWidth:0,pickerAddBorderColor:"#B4DC7F",defaultTier:"first"};function Hr(e){if(!e||typeof e!="object")return ie;let t=e;return{...ie,...t,defaultTier:Dr(t.defaultTier),pickerBorderRadius:Ft(t.pickerBorderRadius),header:{...ie.header,...t.header??{}},layout:{...ie.layout,...t.layout??{},borderRadius:Ft(t.layout?.borderRadius)},productList:{...ie.productList,...t.productList??{}},pricing:{...ie.pricing,...t.pricing??{}},cta:{...ie.cta,...t.cta??{}},savingsBar:{...ie.savingsBar,...t.savingsBar??{}},countdown:{...ie.countdown,...t.countdown??{}},popularBadge:{...ie.popularBadge,...t.popularBadge??{}}}}function Dr(e){return e==="first"||e==="best_value"||typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ie.defaultTier}function Ft(e){return e==="none"||e==="subtle"||e==="rounded"||e==="round"?e:ie.layout.borderRadius}function Or(e){return{primaryColor:e.cta.primaryColor,backgroundColor:e.layout.backgroundColor,textColor:e.productList.textColor,borderColor:e.layout.borderColor,borderWidth:e.layout.borderWidth,buttonTextColor:e.cta.buttonTextColor,ctaBorderWidth:e.cta.borderWidth,ctaBorderColor:e.cta.borderColor,borderRadius:Ot[e.layout.borderRadius],countdownBgColor:e.header.countdownBgColor,countdownTextColor:e.header.countdownTextColor,thumbnailRatio:e.productList.thumbnailRatio,showProductPrice:e.productList.showPrice,showProductCompareAtPrice:e.productList.showCompareAtPrice,showProductUnitPrice:e.productList.showUnitPrice,showProductQuantity:e.productList.showQuantity,showCountdown:e.countdown.showCountdown,ctaText:e.cta.ctaText,showLowStockBadge:e.showLowStockBadge,lowStockThreshold:e.lowStockThreshold,lowStockBgColor:e.lowStockBgColor,lowStockTextColor:e.lowStockTextColor,showComparePrice:e.pricing.showComparePrice,showPerUnitPrice:e.pricing.showPerUnitPrice,showItemCount:e.pricing.showItemCount,showCompareAtPrice:e.pricing.showCompareAtPrice,showMostPopular:e.popularBadge.visible,popularBadgeText:e.popularBadge.text,popularBadgeBgColor:e.popularBadge.bgColor,popularBadgeTextColor:e.popularBadge.textColor,popularBadgeBorderWidth:e.popularBadge.borderWidth,popularBadgeBorderColor:e.popularBadge.borderColor,showSearch:e.showSearch,mixMatchShowTypeFilters:e.mixMatchShowTypeFilters,pickerBgColor:e.pickerBgColor,pickerTextColor:e.pickerTextColor,pickerBorderWidth:e.pickerBorderWidth,pickerBorderColor:e.pickerBorderColor,pickerBorderRadius:Ot[e.pickerBorderRadius],pickerThumbnailRatio:e.pickerThumbnailRatio,pickerAddBgColor:e.pickerAddBgColor,pickerAddLabelColor:e.pickerAddLabelColor,pickerAddBorderWidth:e.pickerAddBorderWidth,pickerAddBorderColor:e.pickerAddBorderColor,defaultTier:e.defaultTier,...e.popularBadge.tierIndex!==void 0&&{mostPopularTierIndex:e.popularBadge.tierIndex}}}var Fr={primaryColor:"--lb-primary-color",backgroundColor:"--lb-bg",textColor:"--lb-text",borderColor:"--lb-border",borderWidth:"--lb-border-width",buttonTextColor:"--lb-btn-text",borderRadius:"--lb-radius",countdownBgColor:"--lb-countdown-bg",countdownTextColor:"--lb-countdown-text",ctaBorderWidth:"--lb-cta-border-width",ctaBorderColor:"--lb-cta-border-color",popularBadgeBgColor:"--lb-popular-badge-bg",popularBadgeTextColor:"--lb-popular-badge-text",popularBadgeBorderWidth:"--lb-popular-badge-border-width",popularBadgeBorderColor:"--lb-popular-badge-border-color",pickerBgColor:"--lb-picker-bg",pickerTextColor:"--lb-picker-text",pickerBorderWidth:"--lb-picker-border-width",pickerBorderColor:"--lb-picker-border-color",pickerBorderRadius:"--lb-picker-radius",pickerAddBgColor:"--lb-picker-add-bg",pickerAddLabelColor:"--lb-picker-add-label",pickerAddBorderWidth:"--lb-picker-add-border-width",pickerAddBorderColor:"--lb-picker-add-border-color"},Vr=new Set(["borderRadius","borderWidth","ctaBorderWidth","popularBadgeBorderWidth","pickerBorderWidth","pickerBorderRadius","pickerAddBorderWidth"]);function on(e,t){let n=Or(t);for(let[i,a]of Object.entries(Fr)){let l=n[i];if(l==null)continue;let d=Vr.has(i)?`${l}px`:String(l);e.style.setProperty(a,d)}e.style.setProperty("--lb-product-price-display",t.productList.showPrice?"block":"none"),e.style.setProperty("--lb-product-compare-display",t.productList.showCompareAtPrice?"inline":"none"),e.style.setProperty("--lb-product-unit-price-display",t.productList.showUnitPrice?"block":"none"),e.style.setProperty("--lb-product-qty-chip-display",t.productList.showQuantity?"inline-flex":"none"),e.style.setProperty("--lb-product-qty-inline-display",t.productList.showQuantity?"inline":"none"),e.style.setProperty("--lb-variant-chevron",Vt(t.layout.borderColor)),e.style.setProperty("--lb-picker-variant-chevron",Vt(t.pickerBorderColor));let r=Ut(t.productList.thumbnailRatio);e.style.setProperty("--lb-thumbnail-aspect-ratio",r.aspectRatio),e.style.setProperty("--lb-thumbnail-img-fit",r.imgFit),e.style.setProperty("--lb-thumbnail-img-height",r.imgHeight);let o=Ut(t.pickerThumbnailRatio);e.style.setProperty("--lb-picker-thumbnail-aspect-ratio",o.aspectRatio),e.style.setProperty("--lb-picker-thumbnail-img-fit",o.imgFit),e.style.setProperty("--lb-picker-thumbnail-img-height",o.imgHeight)}function Vt(e){return`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='${e.replace(/#/g,"%23")}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`}function Ut(e){switch(e){case"tall":return{aspectRatio:"3 / 4",imgFit:"cover",imgHeight:"100%"};case"wide":return{aspectRatio:"4 / 3",imgFit:"cover",imgHeight:"100%"};case"original":return{aspectRatio:"auto",imgFit:"contain",imgHeight:"auto"};default:return{aspectRatio:"1 / 1",imgFit:"cover",imgHeight:"100%"}}}var Ur=new Set(["fixed","mix_match","volume","bogo","multi_step"]),zr=new Set(["active"]);function wt(e,t){try{return Qr(e,t)}catch(n){if(n instanceof ae)return null;throw n}}function Qr(e,t){let n=new Map(t.map(g=>[g.key,g])),r=n.get("title")?.value??"Bundle",o=n.get("bundle_type")?.value,i=n.get("status")?.value;if(!o||!Ur.has(o))throw new ae(`Invalid or missing bundle_type: ${o??"null"}`,"invalid_type");let a=o;if(!i||!zr.has(i))throw new ae(`Bundle is not active: status=${i??"null"}`,"inactive");let l=i,d=n.get("starts_at")?.value??null,s=n.get("ends_at")?.value??null,u=new Date;if(d){let g=new Date(d);if(Number.isNaN(g.getTime()))throw new ae(`Invalid starts_at: ${d}`,"invalid_type");if(g>u)throw new ae(`Bundle not yet started: starts_at=${d}`,"not_started")}if(s){let g=new Date(s);if(Number.isNaN(g.getTime()))throw new ae(`Invalid ends_at: ${s}`,"invalid_type");if(g<u)throw new ae(`Bundle has expired: ends_at=${s}`,"expired")}let c=Gr(n),m=Kr(n),y=Yr(n),v={id:e,title:r,description:n.get("description")?.value||null,status:l,products:c,discountConfig:m,widgetConfig:y,startsAt:d,endsAt:s,discountLabel:n.get("discount_label")?.value??null,selectedVariantIds:Jr(n),productQuantities:zt(n,"product_quantities"),variantQuantities:zt(n,"variant_quantities"),marketVisibility:Xr(n),marketIds:Zr(n),abTestId:n.get("ab_test_id")?.value||null,abWeight:eo(n)};switch(a){case"fixed":return{...v,bundleType:"fixed"};case"volume":return{...v,bundleType:"volume",volumeTiers:to(n)};case"mix_match":return{...v,bundleType:"mix_match",minQuantity:ro(n,"min_quantity",{min:1}),maxQuantity:null,productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules")};case"bogo":return{...v,bundleType:"bogo",...$r(n)};case"multi_step":return{...v,bundleType:"multi_step",steps:Wr(n),productRules:Oe(n,"product_rules"),variantRules:Oe(n,"variant_rules"),collectionProductIds:jr(n)}}}function Wr(e){let t=xe(e,"steps");if(!Array.isArray(t))throw new ae("Invalid or missing steps","invalid_type");let n=o=>Array.isArray(o)?o.filter(i=>typeof i=="string"):[],r=[];for(let o of t){if(!o||typeof o!="object"||Array.isArray(o))continue;let i=o;if(typeof i.name!="string")continue;let a=typeof i.minQuantity=="number"?i.minQuantity:Number(i.minQuantity),l=Number.isFinite(a)&&a>=1?Math.floor(a):1,d=null;typeof i.maxQuantity=="number"&&Number.isFinite(i.maxQuantity)&&(d=Math.max(l,Math.floor(i.maxQuantity))),r.push({name:i.name,minQuantity:l,maxQuantity:d,productIds:n(i.productIds),collectionIds:n(i.collectionIds)})}if(r.length===0)throw new ae("multi_step bundle has no valid steps","invalid_type");return r}function jr(e){let t={},n=e.get("collection");if(!n?.references?.nodes)return t;for(let r of n.references.nodes)!("products"in r)||!r.products?.nodes||(t[r.id]=r.products.nodes.map(o=>o.id));return t}function $r(e){let t=xe(e,"bogo_config");if(!t||typeof t!="object"||Array.isArray(t))throw new ae("Invalid or missing bogo_config","invalid_type");let n=t,r=typeof n.buyProductId=="string"?n.buyProductId:"",o=typeof n.getProductId=="string"?n.getProductId:"";if(!r||!o)throw new ae("bogo_config is missing buy/get product ids","invalid_type");let i=a=>{let l=typeof a=="number"?a:Number(a);return!Number.isFinite(l)||l<1?1:Math.min(99,Math.floor(l))};return{buyProductId:r,getProductId:o,buyQuantity:i(n.buyQuantity),getQuantity:i(n.getQuantity)}}function Gr(e){let t=[],n=e.get("products");if(n?.reference&&"variants"in n.reference&&t.push(n.reference),n?.references?.nodes)for(let o of n.references.nodes)"variants"in o?t.push(o):"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);let r=e.get("collection");if(r?.references?.nodes)for(let o of r.references.nodes)"products"in o&&o.products?.nodes&&t.push(...o.products.nodes);return t}function Kr(e){return{discountType:e.get("discount_type")?.value??"percentage",discountValue:parseFloat(e.get("discount_value")?.value??"0"),allowStacking:e.get("allow_stacking")?.value==="true"}}function Yr(e){return Hr(xe(e,"widget_config"))}function Jr(e){let t=xe(e,"selected_variant_ids");if(!Array.isArray(t))return null;let n=[];for(let r of t)Array.isArray(r)?n.push(r.filter(o=>typeof o=="string")):n.push([]);return n}function zt(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){let a=typeof i=="number"?i:Number(i);Number.isFinite(a)&&a>=0&&a<=99&&(r[o]=Math.floor(a))}return r}function Oe(e,t){let n=xe(e,t);if(!n||typeof n!="object"||Array.isArray(n))return{};let r={};for(let[o,i]of Object.entries(n)){if(!i||typeof i!="object"||Array.isArray(i))continue;let{min:a,max:l,required:d}=i,s=typeof a=="number"?a:Number(a),u=typeof l=="number"?l:Number(l);if(!Number.isFinite(s)||!Number.isFinite(u))continue;let c=Math.max(1,Math.min(99,Math.floor(s))),m=Math.max(c,Math.min(99,Math.floor(u)));r[o]=d===!0?{min:c,max:m,required:!0}:{min:c,max:m}}return r}function Xr(e){return e.get("market_visibility")?.value==="specific"?"specific":"all"}function Zr(e){let t=e.get("markets")?.value;if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}catch{return[]}}function eo(e){let t=e.get("ab_weight")?.value;if(!t)return 0;let n=Number.parseInt(t,10);return Number.isNaN(n)?0:Math.min(100,Math.max(0,n))}function to(e){let t=xe(e,"volume_tiers");return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null).map(no):[]}function no(e){let t=Number(e.minQuantity??0),n={minQuantity:Number.isFinite(t)&&t>=0?t:0};return typeof e.percentage=="number"&&Number.isFinite(e.percentage)&&(n.percentage=e.percentage),typeof e.amount=="number"&&Number.isFinite(e.amount)&&(n.amount=e.amount),n}function xe(e,t){let n=e.get(t)?.value;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function ro(e,t,n={}){let r=e.get(t)?.value;if(!r)return null;let o=parseInt(r,10);return isNaN(o)||n.min!==void 0&&o<n.min?null:o}function an(e,t){let n=0,r=0;for(let o=0;o<e.length;o++){let i=t==="fixed_amount"?e[o].amount??0:e[o].percentage??0;i>n&&(n=i,r=o)}return r}function ln(e,t,n){return t<=0?0:e==="best_value"?Math.min(n,t-1):Math.max(0,Math.min(Math.floor(typeof e=="number"?e:0),t-1))}function sn(e,t,n){return t?typeof e=="number"&&Number.isFinite(e)?Math.floor(e):n:-1}function Qt(e){return e.split("/").pop()??e}function dn(e,t){if(e.marketVisibility!=="specific")return!0;if(!t)return!1;let n=Qt(t);return e.marketIds.some(r=>Qt(r)===n)}function _t(e,t,n){let r=e.variantQuantities[n];return r!==void 0?r:e.productQuantities[t]??1}function cn(e,t){let n=e.steps[t];if(!n)return[];let r=new Set(n.productIds),o=new Set;for(let l of n.collectionIds)for(let d of e.collectionProductIds[l]??[])o.add(d);let i=new Set,a=[];for(let l of e.products)i.has(l.id)||!r.has(l.id)&&!o.has(l.id)||(i.add(l.id),a.push(l));return a}async function un(e,t){await bn(e,{shopDomain:e.shopDomain,eventType:"bundle_impression",bundleGid:t.bundleGid,bundleType:t.bundleType,productId:t.productId,occurredAt:new Date().toISOString()})}async function pn(e,t){await bn(e,{shopDomain:e.shopDomain,eventType:"bundle_add_to_cart",...t,occurredAt:new Date().toISOString()})}function mn(e,t){if(typeof IntersectionObserver>"u")return t(),()=>{};let n=new IntersectionObserver(r=>{for(let o of r)o.isIntersecting&&(t(),n.unobserve(o.target))},{threshold:.5});return n.observe(e),()=>n.disconnect()}async function bn(e,t){let n=`${e.appUrl}/api/analytics`,r=JSON.stringify(t);try{(await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r})).ok||(await new Promise(i=>setTimeout(i,2e3)),await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:r}))}catch{try{typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(n,r)}catch{}}}var Wt=1e4,oo=[[/@import/i,"@import rules"],[/@charset/i,"@charset declarations"],[/expression\s*\(/i,"CSS expressions"],[/-moz-binding/i,"-moz-binding"],[/-webkit-binding/i,"-webkit-binding"],[/behavior\s*:/i,"behavior property"]],io=/^(https:|\/[^/]|\.\/|\.\.\/|#)/;function Ct(e){if(e.length>Wt)return{ok:!1,error:`CSS exceeds ${Wt.toLocaleString("en-US")} character limit`};let t=e.replace(/\/\*[\s\S]*?\*\//g,"");try{t=t.replace(/\\([0-9a-fA-F]{1,6})[ \t\n\f]?/g,(o,i)=>{let a=parseInt(i,16);return a<0||a>1114111?"\uFFFD":String.fromCodePoint(a)}),t=t.replace(/\\\r?\n/g,""),t=t.replace(/\\([^\n\r\f0-9a-fA-F])/g,"$1")}catch{return{ok:!1,error:"CSS contains invalid unicode escape sequences"}}t=t.replace(/</g,"").replace(/>/g,"");for(let[o,i]of oo)if(o.test(t))return{ok:!1,error:`CSS contains blocked pattern: ${i}`};let n=/url\s*\(\s*([\s\S]*?)\s*\)/gi,r;for(;(r=n.exec(t))!==null;){let o=r[1].trim();if((o.startsWith("'")||o.startsWith('"'))&&(o=o.slice(1)),(o.endsWith("'")||o.endsWith('"'))&&(o=o.slice(0,-1)),o=o.trim(),o&&!io.test(o))return{ok:!1,error:"CSS url() values must use https:// or relative paths"}}return{ok:!0,css:t}}var ao="lb-custom-css-";function hn(e,t){if(typeof document>"u"||!t)return!1;let n=Ct(t);if(!n.ok||!n.css.trim())return!1;let r=ao+lo(e),o=document.getElementById(r);return o||(o=document.createElement("style"),o.id=r,o.setAttribute("data-lime-bundles","custom-css"),document.head.appendChild(o)),o.textContent!==n.css&&(o.textContent=n.css),!0}function lo(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function so(e,t){let n=typeof e=="string"?parseFloat(e):e;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(n)}catch{return`${t} ${n.toFixed(2)}`}}function Ve(e,t,n){return t==="percentage"?Math.max(0,e*(1-n/100)):Math.max(0,e-n)}var co={CL:"cl",CM:"cm",FLOZ:"fl oz",FT:"ft",FT2:"ft\xB2",G:"g",GAL:"gal",IN:"in",ITEM:"each",KG:"kg",L:"l",LB:"lb",M:"m",M2:"m\xB2",M3:"m\xB3",MG:"mg",ML:"ml",MM:"mm",OZ:"oz",PT:"pt",QT:"qt",UNKNOWN:"",YD:"yd"};function fn(e,t,n){if(!e||!t||t.referenceUnit==="UNKNOWN")return null;let r=parseFloat(e.amount);if(!Number.isFinite(r))return null;let o=co[t.referenceUnit]??"";if(!o)return null;let i=e.currencyCode||n||"USD",a=so(r,i),l=t.referenceValue,d=l===1?o:`${l}${o}`;return`${a}/${d}`}var ve={};Yt(ve,{computePosition:()=>po,emptyTypeAheadState:()=>go,firstEnabled:()=>Fe,handleKey:()=>ho,pushTypeAheadChar:()=>xo});var uo=4;function po({trigger:e,viewportHeight:t,desiredHeight:n,margin:r=uo,clip:o}){let i=o?Math.min(t,o.bottom):t,a=o?Math.max(0,o.top):0,l=Math.max(0,i-e.bottom-r),d=Math.max(0,e.top-a-r),s=n<=l?"down":d>l?"up":"down",c=Math.min(n,s==="down"?l:d),m=s==="down"?e.bottom+r:e.top-r-c;return{placement:s,maxHeight:c,offsetTop:m,offsetLeft:e.left,width:e.width}}var xt={type:"passthrough",preventDefault:!1};function Fe(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return-1}function jt(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return-1}function mo(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r].disabled)return r}return t}function bo(e,t){if(e.length===0)return-1;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r].disabled)return r}return t}function $t(e){return e.length===1&&e!==" "&&/\S/.test(e)}function ho(e,t){if(e.ctrlKey||e.metaKey||e.altKey)return xt;let{key:n}=e,{isOpen:r,activeIndex:o,selectedIndex:i,options:a}=t;if(!r)switch(n){case"Enter":case" ":case"ArrowDown":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Fe(a),preventDefault:!0};case"ArrowUp":return{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:jt(a),preventDefault:!0};default:return $t(n)?{type:"open",activeIndex:i>=0&&!a[i]?.disabled?i:Fe(a),preventDefault:!0}:xt}switch(n){case"ArrowDown":return{type:"move-active",activeIndex:mo(a,o),preventDefault:!0};case"ArrowUp":return{type:"move-active",activeIndex:bo(a,o),preventDefault:!0};case"Home":return{type:"move-active",activeIndex:Fe(a),preventDefault:!0};case"End":return{type:"move-active",activeIndex:jt(a),preventDefault:!0};case"Enter":case" ":return o>=0&&!a[o]?.disabled?{type:"commit",index:o,preventDefault:!0}:{type:"passthrough",preventDefault:!0};case"Escape":return{type:"close",commit:!1,restoreFocus:!0,preventDefault:!0};case"Tab":return{type:"close",commit:!1,restoreFocus:!1,preventDefault:!1};default:return $t(n)?{type:"type-ahead",char:n,preventDefault:!1}:xt}}var fo=500;function go(){return{buffer:"",lastTime:0}}function xo(e,t,n,r,o=fo){if(t.length!==1)return{newState:e,matchedIndex:null};let a=(n-e.lastTime>o?"":e.buffer)+t.toLowerCase(),l={buffer:a,lastTime:n};for(let d=0;d<r.length;d++){let s=r[d];if(!s.disabled&&s.label.toLowerCase().startsWith(a))return{newState:l,matchedIndex:d}}return{newState:l,matchedIndex:null}}var vo={};Yt(vo,{findVariantByOptions:()=>yo,isOptionValueAvailable:()=>wo,toPickerVariant:()=>_o});function gn(e){return e.availableForSale&&!e.currentlyNotInStock&&e.quantityAvailable!=null&&e.quantityAvailable<=0}function Ie(e,t){return e.availableForSale?e.currentlyNotInStock||e.quantityAvailable==null||gn(e)?!0:e.quantityAvailable>=t:!1}function Ue(e){return e.currentlyNotInStock||e.quantityAvailable==null||gn(e)?null:Math.max(0,e.quantityAvailable)}function yo(e,t){if(e.length===0)return null;for(let n of e){if(n.optionValues.length!==t.length)continue;let r=!0;for(let o=0;o<n.optionValues.length;o++)if(n.optionValues[o]!==t[o]){r=!1;break}if(r)return n}return null}function wo(e,t,n,r){for(let o of e){if(!o.available||o.optionValues[t]!==n)continue;let i=!0;for(let a=0;a<o.optionValues.length;a++)if(a!==t&&o.optionValues[a]!==r[a]){i=!1;break}if(i)return!0}return!1}function _o(e,t){return{id:e.id,optionValues:e.selectedOptions.map(n=>n.value),available:t!==void 0?Ie(e,t):e.availableForSale}}var Gt="_lb_v",vt=null;function Co(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t>>>=0;return t>>>0}function xn(){try{let e=window.localStorage.getItem(Gt);if(e)return e;let t=Kt();return window.localStorage.setItem(Gt,t),t}catch{return vt||(vt=Kt()),vt}}function Kt(){return Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,10)}function ko(e,t,n){let r=e.slice().sort((a,l)=>a.id<l.id?-1:a.id>l.id?1:0),o=Co(t+":"+n)%100,i=0;for(let a of r)if(i+=Math.max(0,a.abWeight),o<i)return a;return r[r.length-1]}function vn(e,t){let n=new Map;for(let o of e){if(!o.abTestId)continue;let i=n.get(o.abTestId);i?i.push(o):n.set(o.abTestId,[o])}if(n.size===0)return e.slice();let r=new Map;return n.forEach((o,i)=>{if(o.length===1){r.set(i,o[0]);return}r.set(i,ko(o,t,i))}),e.filter(o=>!o.abTestId||r.get(o.abTestId)===o)}function yn(e){let t=e.slice(e.lastIndexOf("/")+1),n=Number(t);return Number.isFinite(n)&&t!==""?n:e}function ze(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?Math.round(t*100):0}function To(e,t,n){return{id:yn(e.id),title:e.title,options:(e.selectedOptions??[]).map(r=>r.value),available:Ie(e,t),price:ze(e.price?.amount),compareAtPrice:ze(e.compareAtPrice?.amount),unitPrice:fn(e.unitPrice,e.unitPriceMeasurement,n),image:e.image?.url??null,inventoryQuantity:Ue(e)}}function _e(e,t,n){let r=n.allowedVariantIds,o=e.variants.nodes.filter(s=>!r||r.length===0||r.includes(s.id)),i=e.priceRange.minVariantPrice.currencyCode,a=_t(n.quantities,e.id,o[0]?.id??""),l=o.map(s=>{let u=_t(n.quantities,e.id,s.id),c=To(s,u,i);return u!==a&&(c.quantity=u),c}),d=l.find(s=>s.available)??l[0];return{productId:yn(e.id),title:e.title,url:e.handle?"/products/"+e.handle:null,featuredImage:e.featuredImage?.url??null,quantity:a,selectedVariantId:d?d.id:"",optionNames:(o[0]?.selectedOptions??[]).map(s=>s.name),variants:l}}function Qe(e){return e.products.map((t,n)=>_e(t,e.id,{quantities:{productQuantities:e.productQuantities,variantQuantities:e.variantQuantities},allowedVariantIds:e.selectedVariantIds?.[n]??null}))}function K(e,t){for(let n=0;n<e.variants.length;n++)if(String(e.variants[n].id)===String(t))return e.variants[n];return e.variants[0]}function wn(e){let t=K(e,e.selectedVariantId);if(t&&t.available!==!1)return t;for(let n=0;n<e.variants.length;n++)if(e.variants[n].available!==!1)return e.variants[n];return null}function _n(e,t){if(!e.variants||!t)return null;for(let n=0;n<e.variants.length;n++){let r=e.variants[n];if(!r.options||r.options.length!==t.length)continue;let o=!0;for(let i=0;i<r.options.length;i++)if(r.options[i]!==t[i]){o=!1;break}if(o)return r}return null}function Cn(e,t,n,r){for(let o=0;o<e.length;o++){let i=e[o];if(i.available===!1||!i.options||i.options[t]!==n)continue;let a=!0;for(let l=0;l<i.options.length;l++)if(l!==t&&i.options[l]!==r[l]){a=!1;break}if(a)return!0}return!1}function kn(e){let t=[];for(let n=0;n<e.length;n++){let r=K(e[n],e[n].selectedVariantId),o=r.quantity||e[n].quantity||1;t.push({variantId:Number(e[n].selectedVariantId),quantity:o,priceCents:(r.price||0)*o})}return t}function So(e,t,n){let r=0,o=0;for(let i=0;i<e.length;i++){let a=K(e[i],e[i].selectedVariantId),l=a.quantity||e[i].quantity||1,d=a.price*l;if(r+=d,t==="percentage"){let s=Math.floor(a.price*n/100);o+=(a.price-s)*l}else o+=d}if(t==="fixed_amount"&&(o=Math.max(0,r-Math.round(n*100))),t==="flat_price"){let i=Math.round(n*100);o=i<r?i:r}return{totalPrice:r,salePrice:o,savings:r-o}}function kt(e,t,n){let r=e.classList?.contains("lb-fixed")?e:e.querySelector(".lb-fixed");if(!r)return;let{totalPrice:o,salePrice:i,savings:a}=So(t,r.getAttribute("data-discount-type")||"",parseFloat(r.getAttribute("data-discount-value")??"")||0),l=e.querySelector("[data-sale-price]"),d=e.querySelector("[data-compare-price]"),s=e.querySelector("[data-savings-bar]"),u=e.querySelector("[data-savings-amount]"),c=e.querySelector("[data-savings-percent]");if(l&&(l.textContent=n(i)),d&&(a>0?(d.textContent=n(o),d.style.display=""):d.style.display="none"),s)if(a>0){if(u&&(u.textContent=n(a)),c){let m=o>0?Math.round(a*100/o):0;c.textContent="("+m+"%)"}s.style.display=""}else s.style.display="none"}function le(e){return t=>{try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(t/100)}catch{return e+" "+(t/100).toFixed(2)}}}var Eo="_lime_bundle_gid",Io="_lime_bundle_type";function se(e,t){return[{key:Eo,value:e},{key:Io,value:t}]}function We(e,t,n){let r=e.querySelectorAll("[data-variant-option]");if(!r.length)return;function o(s){return parseInt(s.getAttribute("data-option-position")??"",10)}function i(){let s=[];for(let u=0;u<r.length;u++){let c=o(r[u]);!c||c<1||(s[c-1]=r[u].value)}return s}function a(s){if(!(!s||!s.options))for(let u=0;u<r.length;u++){let c=o(r[u]);if(!c||c<1)continue;let m=s.options[c-1];r[u].value!==m&&(r[u].value=m)}}function l(s,u){for(let c=0;c<r.length;c++){let m=r[c],y=o(m);if(!y||y<1)continue;let v=m.options;for(let g=0;g<v.length;g++)v[g].disabled=!Cn(s.variants,y-1,v[g].value,u)}}let d=t();if(d){let s=K(d,d.selectedVariantId);s&&s.options&&l(d,s.options)}for(let s=0;s<r.length;s++)r[s].addEventListener("change",u=>{u.stopPropagation();let c=t();if(!c)return;let m=_n(c,i());if(!m){let y=K(c,c.selectedVariantId);a(y),y&&y.options&&l(c,y.options);return}c.selectedVariantId=m.id,l(c,m.options),n(m,c)})}function je(e,t,n){if(!t.variants.length)return;let r=e.querySelector(".lb-bundle-variant-badge");r&&!r.textContent&&(r.textContent=n.title);let o=e.querySelector(".lb-bundle-variant-option-groups");o&&!o.children.length&&Mo(o,t,n)}function Mo(e,t,n){let r=t.optionNames||[];for(let o=0;o<r.length;o++){let i=document.createElement("div");i.className="lb-bundle-variant-option-group";let a=document.createElement("span");a.className="lb-bundle-variant-option-label",a.textContent=r[o],i.appendChild(a);let l=document.createElement("select");l.className="lb-bundle-variant-select",l.setAttribute("data-variant-option",""),l.setAttribute("data-option-position",String(o+1)),l.setAttribute("data-product-id",String(t.productId)),l.name="lb-variant-"+t.productId+"-"+(o+1),l.setAttribute("aria-label",r[o]);let d=Object.create(null);for(let s of t.variants){let u=s.options&&s.options[o];if(!u||d[u])continue;d[u]=!0;let c=document.createElement("option");c.value=u,c.textContent=u,n.options&&n.options[o]===u&&(c.selected=!0),l.appendChild(c)}i.appendChild(l),e.appendChild(i)}}var Tt=new WeakMap;function $e(e,t,n){let r=e.querySelector("[data-thumbnail]");if(!r)return;let o=r.querySelector("img");if(!Tt.has(e)){let a=n||(o?o.src:null);a&&Tt.set(e,a)}let i=t.image||Tt.get(e)||null;if(i)if(o)o.src=i,o.srcset="";else{let a=document.createElement("img");a.src=i,a.loading="lazy",a.alt="",r.textContent="",r.appendChild(a)}}function Ao(e,t){let n=e.querySelector("[data-qty-inline]");n&&(n.textContent="\xD7"+t)}function St(e,t,n,r){if(!t)return;$e(e,t,n.featuredImage),Ao(e,t.quantity||n.quantity||1);let o=e.querySelector("[data-product-price]");o&&t.price!=null&&(o.textContent=r(t.price));let i=e.querySelector("[data-product-compare-price]");if(i){let l=t.compareAtPrice;l&&l>t.price?(i.textContent=r(l),i.hidden=!1):(i.textContent="",i.hidden=!0)}let a=e.querySelector("[data-product-unit-price]");a&&(t.unitPrice?(a.textContent=t.unitPrice,a.hidden=!1):(a.textContent="",a.hidden=!0))}function q(e,t,n){let r=document.createElement(e);r.className=t;for(let o in n)r.setAttribute(o,n[o]);return r}function Ge(e,t,n){let r=e.variants.length,o=q("div","lb-bundle-product-row");n.isOos&&(o.classList.add("lb-bundle-product-row--oos"),o.setAttribute("aria-disabled","true")),o.setAttribute("data-product-id",String(e.productId)),n.bogoRole&&o.setAttribute("data-bogo-role",n.bogoRole),o.appendChild(q("div","lb-bundle-thumbnail",{"data-thumbnail":""}));let i=q("div","lb-bundle-product-info"),a=document.createElement(n.href?"a":"span");if(a.className="lb-bundle-product-name",n.href&&(a.href=n.href),a.textContent=e.title??"",i.appendChild(a),n.isOos){let d=q("span","lb-bundle-oos-label");return d.textContent=t.outOfStock||"Out of stock",i.appendChild(d),o.appendChild(i),o}r===1&&e.variants[0]?.title!=="Default Title"&&i.appendChild(q("span","lb-bundle-variant-badge"));let l=q("span","lb-bundle-product-prices");if(l.appendChild(q("span","lb-bundle-product-compare-price",{"data-product-compare-price":"",hidden:""})),l.appendChild(q("span","lb-bundle-product-price",{"data-product-price":""})),n.inlineQuantity!=null){let d=q("span","lb-bundle-qty-inline",{"data-qty-inline":""});d.textContent="\xD7"+n.inlineQuantity,l.appendChild(d)}if(i.appendChild(l),i.appendChild(q("span","lb-bundle-product-unit-price",{"data-product-unit-price":""})),r>1&&i.appendChild(q("div","lb-bundle-variant-option-groups",{style:"--lb-row-option-count: "+(e.optionNames.length||1)})),o.appendChild(i),n.inlineQuantity==null&&o.appendChild(q("span","lb-bundle-qty-chip",{"data-qty-inline":""})),n.badgeText){let d=q("span","lb-bogo__badge");d.textContent=n.badgeText,o.appendChild(d)}return o}function de(e,t){let n=q("div",e),r=q("div","lb-bundle-header"),o=q("h3","lb-bundle-title");if(o.textContent=t.title,r.appendChild(o),t.subtitle){let m=q("p","lb-bundle-subtitle");m.textContent=t.subtitle,r.appendChild(m)}if(n.appendChild(r),t.endsAt){let m=q("div","lb-bundle-countdown",{"data-countdown":""}),y=q("span","lb-bundle-countdown-label");y.textContent=t.countdownLabel??"Limited time offer",m.appendChild(y),m.appendChild(q("span","lb-bundle-countdown-timer",{"data-countdown-timer":""})),n.appendChild(m)}let i=q("div",e+"__products lb-edge-fade");n.appendChild(i),n.appendChild(q("div","lb-bundle-divider"));let a=q("div","lb-bundle-summary",{"data-pricing-section":""}),l=q("div","lb-bundle-summary__text"),d=q("span","lb-bundle-summary__label");if(d.textContent=t.summaryLabel??"Bundle total",l.appendChild(d),t.withItemCount&&d.appendChild(q("span","",{"data-item-count":""})),t.showSavingsBar){let m=q("p","lb-bundle-savings-line",{"data-savings-bar":"",style:"display:none"});m.appendChild(document.createTextNode("Save ")),m.appendChild(q("span","",{"data-savings-amount":""})),m.appendChild(document.createTextNode(" ")),m.appendChild(q("span","",{"data-savings-percent":""})),l.appendChild(m)}a.appendChild(l);let s=q("span","lb-bundle-summary__prices");t.showComparePrice&&s.appendChild(q("span","lb-bundle-compare-price",{"data-compare-price":""})),s.appendChild(q("span","lb-bundle-sale-price",{[t.totalPriceSlot?"data-total-price":"data-sale-price"]:""})),a.appendChild(s),n.appendChild(a);let u=q("button","lb-bundle-cta",{"data-cta-text":t.ctaText,type:"button","data-add-bundle":""}),c=q("span","lb-cta-label",{"data-cta-label":""});return c.textContent=t.ctaText,u.appendChild(c),n.appendChild(u),n.appendChild(q("p","lb-bundle-error",{"data-error":"","aria-live":"polite"})),n.appendChild(q("span","lb-visually-hidden",{"data-status":"","aria-live":"polite"})),{root:n,products:i,cta:u}}function Tn(e,t,n={}){let r=n.showCompare!==!1,o=n.showPriceEach!==!1,i=q("div","lb-volume__tiers lb-edge-fade",{role:"radiogroup","aria-label":t,"data-tier-group":""});return e.forEach((a,l)=>{let d=q("div","lb-volume__tier",{role:"radio","aria-checked":a.selected?"true":"false",tabindex:a.selected?"0":"-1","data-tier-index":String(l),"data-tier-qty":String(a.quantity),"data-tier-pct":String(a.percent),"data-tier-amt":String(a.amountCents)}),s=q("span","lb-volume__radio");s.appendChild(q("span","lb-volume__radio-dot")),d.appendChild(s);let u=q("span","lb-volume__tier-info"),c=q("span","lb-volume__tier-label");c.textContent=a.label,u.appendChild(c);let m=q("span","lb-volume__tier-price");if(r&&(a.percent>0||a.amountCents>0)&&m.appendChild(q("span","lb-volume__tier-compare")),o&&(m.appendChild(q("span","",{"data-tier-price-each":""})),n.unitLabel)){let y=q("span","lb-volume__tier-unit");y.textContent=n.unitLabel,m.appendChild(y)}if(u.appendChild(m),d.appendChild(u),a.badgeLabel||a.savingsLabel){let y=q("span","lb-volume__tier-right");if(a.badgeLabel){let v=q("span","lb-volume__tier-badge");v.textContent=a.badgeLabel,y.appendChild(v)}if(a.savingsLabel){let v=q("span","lb-volume__tier-savings");v.textContent=a.savingsLabel,y.appendChild(v)}d.appendChild(y)}i.appendChild(d)}),i}function Ke(e){let t=q("div","lb-mix-match__progress",{"data-progress":""}),n=q("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e)});for(let o=0;o<e;o++)n.appendChild(q("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));t.appendChild(n);let r=q("div","lb-mix-match__progress-labels");return r.appendChild(q("span","lb-mix-match__progress-count",{"data-progress-count":"","aria-live":"polite"})),r.appendChild(q("span","lb-mix-match__progress-remaining",{"data-progress-remaining":"","aria-live":"polite"})),t.appendChild(r),t}function Ce(e){return e<10?"0"+e:String(e)}function ce(e){e._lbCountdownInterval&&(clearInterval(e._lbCountdownInterval),e._lbCountdownInterval=null);let t=e.querySelector("[data-countdown]");if(!t)return;let n=e.closest(".lb-bundle-widget"),r=n&&n.getAttribute("data-ends-at");if(!r){t.style.display="none";return}let o=new Date(r).getTime();if(isNaN(o)){t.style.display="none";return}let i=t.querySelector("[data-countdown-timer]");if(!i)return;let a;function l(){let d=o-Date.now();if(d<=0){n&&(n.style.display="none"),a&&clearInterval(a);return}let s=Math.floor(d/864e5),u=Math.floor(d%864e5/36e5),c=Math.floor(d%36e5/6e4),m=Math.floor(d%6e4/1e3);i.textContent=s>0?s+"d "+Ce(u)+"h "+Ce(c)+"m "+Ce(m)+"s":Ce(u)+"h "+Ce(c)+"m "+Ce(m)+"s"}l(),o-Date.now()>0&&(a=setInterval(l,1e3),e._lbCountdownInterval=a)}var ue={locale:"en",addItem:"Add",addedItem:"Added",removeItem:"Remove",swapItem:"Swap",required:"Required",soldOut:"Sold out",outOfStock:"Out of stock",itemsOutOfStock:{one:"__COUNT__ item out of stock",other:"__COUNT__ items out of stock"},quantity:"Quantity",increaseQuantity:"Increase quantity",decreaseQuantity:"Decrease quantity",allTypes:"All",editSelection:"Edit selection",addToCart:"Add to cart",bundlePrice:"Bundle price",save:"Save",complete:"Complete",ofSelected:"__COUNT__ of __TOTAL__ added",moreToGo:"__COUNT__ more to go",nProductsShown:"__COUNT__ products shown",bundleComplete:"Your bundle is complete",chooseMoreUnlock:"Choose __COUNT__ more to unlock __PCT__% off",chooseMoreComplete:"Choose __COUNT__ more to complete your bundle",stepOf:"Step __STEP__ of __TOTAL__",stepsCompleted:"__COUNT__ of __TOTAL__ steps completed",each:" each",buyQty:"Buy __COUNT__",itemCount:{one:"__COUNT__ item",other:"__COUNT__ items"},needsSpots:{one:"Needs __COUNT__ spot",other:"Needs __COUNT__ spots"}};function Ye(e,t){let n=e.itemsOutOfStock,r;if(n&&typeof n=="object"){let o=new Intl.PluralRules(e.locale||"en").select(t);r=n[o]||n.other}else r=n;return(r||"__COUNT__ items out of stock").split("__COUNT__").join(String(t))}function Sn(e){let t=e.ownerDocument,n=t&&t.defaultView;if(!n)return null;let r=e.parentElement;for(;r&&r!==t.body;){let o=n.getComputedStyle(r).overflowY;if(o==="auto"||o==="scroll"||o==="hidden")return r;r=r.parentElement}return null}var re=[],Je=!1;function Lo(e,t){if(e.composedPath){let r=e.composedPath();for(let o=0;o<r.length;o++)if(r[o]===t.shell||r[o]===t.listbox)return!0;return!1}let n=e.target;return t.shell.contains(n)||t.listbox.contains(n)}function Xe(e){for(let t=re.length-1;t>=0;t--)Lo(e,re[t])||re[t].close()}function En(){for(let e=re.length-1;e>=0;e--)re[e].close()}function Po(){Je||(document.addEventListener("pointerdown",Xe,!0),window.addEventListener("resize",En),window.addEventListener("scroll",Xe,!0),Je=!0)}function Bo(){Je&&(document.removeEventListener("pointerdown",Xe,!0),window.removeEventListener("resize",En),window.removeEventListener("scroll",Xe,!0),Je=!1)}function In(e){re.push(e),re.length===1&&Po()}function Mn(e){let t=re.indexOf(e);t>=0&&re.splice(t,1),re.length===0&&Bo()}function An(e){for(let t=re.length-1;t>=0;t--)re[t]!==e&&re[t].close()}var qo=32,Ro=8,No=8,Et=new WeakMap;function Ln(e){return Et.get(e)}function Pn(e){if(e.classList.contains("lb-dropdown-state"))return null;let t=document,n=e.getAttribute("aria-label")||"",r="lb-dd-"+Math.random().toString(36).slice(2,9);e.classList.add("lb-dropdown-state"),e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1");let o=t.createElement("div");o.className="lb-dropdown",o.setAttribute("data-lb-dropdown","");let i=t.createElement("button");i.type="button",i.className="lb-dropdown-trigger",i.setAttribute("role","combobox"),i.setAttribute("aria-haspopup","listbox"),i.setAttribute("aria-expanded","false");let a=r+"-listbox";i.setAttribute("aria-controls",a),n&&i.setAttribute("aria-label",n);let l=t.createElement("span");l.className="lb-dropdown-trigger-value";let d=t.createElement("span");d.className="lb-dropdown-chevron",d.setAttribute("aria-hidden","true"),i.appendChild(l),i.appendChild(d);let s=t.createElement("ul");s.id=a,s.className="lb-dropdown-listbox",s.setAttribute("role","listbox"),n&&s.setAttribute("aria-label",n),s.hidden=!0,o.appendChild(i),e.parentNode?.insertBefore(o,e.nextSibling);let u=e.closest("[data-modal-overlay]");u?(u.appendChild(s),s.setAttribute("data-lb-dropdown-portal","")):o.appendChild(s);let c=!1,m=-1,y=ve.emptyTypeAheadState(),v=[];function g(){let L=[];for(let E=0;E<e.options.length;E++){let b=e.options[E];L.push({disabled:b.disabled,label:b.textContent||b.value})}return L}function H(){i.disabled=e.disabled;let L=g(),E=e.selectedIndex;for(l.textContent=E>=0&&L[E]?L[E].label:"";s.firstChild;)s.removeChild(s.firstChild);v=[];for(let b=0;b<L.length;b++){let T=t.createElement("li");T.id=r+"-opt-"+b,T.className="lb-dropdown-option",T.setAttribute("role","option"),T.setAttribute("aria-selected",b===E?"true":"false"),L[b].disabled&&T.setAttribute("aria-disabled","true"),T.setAttribute("data-value",e.options[b].value),T.setAttribute("data-index",String(b)),T.textContent=L[b].label,s.appendChild(T),v.push(T)}}function x(L){if(m>=0&&v[m]&&v[m].classList.remove("is-active"),m=L,L<0||!v[L]){i.setAttribute("aria-activedescendant","");return}let E=v[L];E.classList.add("is-active"),i.setAttribute("aria-activedescendant",E.id);let b=E.offsetTop,T=b+E.offsetHeight,F=s.scrollTop,f=F+s.clientHeight;b<F?s.scrollTop=b:T>f&&(s.scrollTop=T-s.clientHeight)}function C(){let L=i.getBoundingClientRect();if(L.width===0)return!1;let b=Math.min(v.length||1,No)*qo+Ro,T=Sn(i),F=T?{top:T.getBoundingClientRect().top,bottom:T.getBoundingClientRect().bottom}:void 0,f=ve.computePosition({trigger:{top:L.top,bottom:L.bottom,left:L.left,width:L.width},viewportHeight:window.innerHeight,desiredHeight:b,clip:F});return s.setAttribute("data-placement",f.placement),s.style.maxHeight=f.maxHeight+"px",s.hasAttribute("data-lb-dropdown-portal")&&(s.style.top=f.offsetTop+"px",s.style.left=f.offsetLeft+"px",s.style.width=f.width+"px"),!0}function A(){if(c)return;An($),c=!0,s.hidden=!1,i.setAttribute("aria-expanded","true"),C()||requestAnimationFrame(()=>{C()});let L=g(),E=e.selectedIndex;E>=0&&L[E]&&!L[E].disabled?x(E):x(ve.firstEnabled(L)),In($)}function I(L){c&&(c=!1,s.hidden=!0,i.setAttribute("aria-expanded","false"),i.setAttribute("aria-activedescendant",""),m>=0&&v[m]&&v[m].classList.remove("is-active"),m=-1,Mn($),L&&i.focus())}function P(L){let E=e.options[L];!E||E.disabled||(e.value!==E.value&&(e.value=E.value,e.dispatchEvent(new Event("change",{bubbles:!0}))),H(),I(!0))}function p(L){let E=g(),b=ve.handleKey({key:L.key,ctrlKey:L.ctrlKey,metaKey:L.metaKey,altKey:L.altKey,shiftKey:L.shiftKey},{isOpen:c,activeIndex:m,selectedIndex:e.selectedIndex,options:E});switch(b.preventDefault&&L.preventDefault(),b.type){case"open":A(),b.activeIndex>=0&&x(b.activeIndex);break;case"close":I(b.restoreFocus);break;case"move-active":x(b.activeIndex);break;case"commit":P(b.index);break;case"type-ahead":{let T=ve.pushTypeAheadChar(y,b.char,Date.now(),E);y=T.newState,T.matchedIndex!==null&&(c||A(),x(T.matchedIndex));break}}}function k(L){L.preventDefault(),c?I(!1):A()}function h(L){let E=L.target;for(;E&&E!==s;){if(E.classList&&E.classList.contains("lb-dropdown-option")){let b=parseInt(E.getAttribute("data-index")??"",10);return isNaN(b)?null:b}E=E.parentNode}return null}function U(L){let E=h(L);E!==null&&P(E)}function O(L){let E=L.target;for(;E&&E!==s;){if(E.classList&&E.classList.contains("lb-dropdown-option")){if(E.getAttribute("aria-disabled")==="true")return;let b=parseInt(E.getAttribute("data-index")??"",10);!isNaN(b)&&b!==m&&x(b);return}E=E.parentNode}}function Q(){setTimeout(()=>{c&&(o.contains(document.activeElement)||I(!1))},0)}function W(){H()}let te=new MutationObserver(()=>{H()});te.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","value","selected"]});function ne(L){L.preventDefault()}i.addEventListener("click",k),i.addEventListener("keydown",p),o.addEventListener("focusout",Q),s.addEventListener("mousedown",ne),s.addEventListener("click",U),s.addEventListener("mousemove",O),e.addEventListener("change",W);function Y(){c&&I(!1),te.disconnect(),i.removeEventListener("click",k),i.removeEventListener("keydown",p),o.removeEventListener("focusout",Q),s.removeEventListener("mousedown",ne),s.removeEventListener("click",U),s.removeEventListener("mousemove",O),e.removeEventListener("change",W),o.parentNode?.removeChild(o),s.parentNode?.removeChild(s),e.classList.remove("lb-dropdown-state"),e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),Et.delete(e)}let $={shell:o,listbox:s,select:e,close:()=>I(!1),destroy:Y};return Et.set(e,$),H(),$}var Ho="select.lb-bundle-variant-select:not(.lb-dropdown-state), select.lb-mix-match__variant-select:not(.lb-dropdown-state)";function Bn(e){let n=(e??document).querySelectorAll(Ho);for(let r=0;r<n.length;r++)Pn(n[r])}function qn(e){let n=(e??document).querySelectorAll("select.lb-dropdown-state");for(let r=0;r<n.length;r++)Ln(n[r])?.destroy()}function he(e){return Bn(e),()=>qn(e)}function Rn(e,t,n,r){let o=t.widgetConfig,i=Qe(t);if(!i.length)return;let a=i.filter(c=>!c.variants.some(m=>m.available)),l=t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD",d=le(l),s=ue,u=de("lb-fixed",{title:t.title,subtitle:t.description,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||s.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt});u.root.setAttribute("data-discount-type",t.discountConfig.discountType),u.root.setAttribute("data-discount-value",String(t.discountConfig.discountValue));for(let c of i){let m=!c.variants.some(H=>H.available),y=Ge(c,s,{isOos:m,href:c.url});if(u.products.appendChild(y),m)continue;let v=wn(c);v&&(c.selectedVariantId=v.id);let g=v??K(c,c.selectedVariantId);je(y,c,g),St(y,g,c,d),We(y,()=>c,(H,x)=>{St(y,H,x,d),kt(u.root,i,d)})}if(a.length>0){u.cta.disabled=!0;let c=u.cta.querySelector("[data-cta-label]");c&&(c.textContent=Ye(s,a.length))}else u.cta.addEventListener("click",()=>{n(kn(i).map(c=>({merchandiseId:"gid://shopify/ProductVariant/"+c.variantId,quantity:c.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(u.root),ce(u.root),kt(u.root,i,d),r?.(he(u.root))}function J(e,t){let n=e;for(let r in t)n=n.split("__"+r+"__").join(String(t[r]));return n}function Ze(e,t){let n=t.needsSpots;if(!n)return"Needs "+e+" spots";let r=new Intl.PluralRules(t.locale||"en").select(e);return J(n[r]||n.other||"__COUNT__",{COUNT:e})}function et(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function Nn(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function Hn(e,t,n,r){if(e<=0)return r.bundleComplete||"Your bundle is complete";let o=t==="percentage"&&n?Math.round(n):0;return o>0?J(r.chooseMoreUnlock||"Choose __COUNT__ more to unlock __PCT__% off",{COUNT:e,PCT:o}):J(r.chooseMoreComplete||"Choose __COUNT__ more to complete your bundle",{COUNT:e})}var Do={min:1,max:99};function X(e,t,n){if(n!=null){let o=t["gid://shopify/ProductVariant/"+n];if(o&&typeof o.min=="number"&&typeof o.max=="number")return o}let r=t["gid://shopify/Product/"+e];return!r||typeof r.min!="number"||typeof r.max!="number"?Do:r}function pe(e,t){if(e==null)return;let n=t["gid://shopify/ProductVariant/"+e];if(!(!n||typeof n.min!="number"||typeof n.max!="number"))return n}function tt(e,t){let n=e??{};if(!t)return n;let r=Object.keys(t);if(r.length===0)return n;let o={...n};for(let i of r)o[i]=t[i];return o}function nt(e,t,n){return X(e,t,n).min}function oe(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].quantity||1;return t}function me(e,t){for(let n=0;n<e.length;n++)if(e[n]&&e[n].variantId===t)return n;return-1}function Dn(e,t){let n=me(e,t);return n===-1?0:e[n].quantity||0}function On(e,t){return e.min<=t}function Fn(e,t,n,r=0,o=0,i){let a=Math.min(e.max-o,r+t);return typeof i=="number"&&(a=Math.min(a,i)),typeof n=="number"?Math.min(a,n):a}var Vn=[120,180,240],It=[480,600,768,1024],Un="60px",zn="(max-width: 767px) 45vw, 228px";function ke(e,t){return e&&(/[?&]width=\d+/.test(e)?e.replace(/([?&])width=\d+/,"$1width="+t):e+(e.indexOf("?")===-1?"?":"&")+"width="+t)}function Me(e,t){return e?t.map(n=>ke(e,n)+" "+n+"w").join(", "):""}function rt(e,t){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Te(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase():""}var Qn=600;function ot(e,t,n){let{t:r,rulesMap:o,capacity:i,formatMoney:a}=n,l=X(e.id,o),d=document.createElement("div");d.className="lb-mix-match__modal-product",e.available||(d.className+=" lb-mix-match__modal-product--sold-out"),d.setAttribute("data-product-item",""),d.setAttribute("data-title",Te(e.title)),d.setAttribute("data-type",e.type||"");let s=!1,u=!1,c=document.createElement("div");c.className="lb-mix-match__modal-product-thumb";let m=document.createElement("span");m.className="lb-mix-match__modal-added-badge",m.textContent=r.addedItem||"Added",m.hidden=!0,c.appendChild(m);let y=e.variants.find(f=>f.available)??null,v=y&&y.image||e.featuredImage;if(v){let f=document.createElement("img");f.src=ke(v,Qn),f.srcset=Me(v,It),f.sizes=zn,f.alt=e.title,f.loading="lazy",c.appendChild(f)}d.appendChild(c);let g=document.createElement("div");g.className="lb-mix-match__modal-product-info";let H=document.createElement("p");if(H.className="lb-mix-match__modal-product-title",e.url){let f=document.createElement("a");f.href=e.url,f.target="_blank",f.rel="noopener noreferrer",f.textContent=e.title,H.appendChild(f)}else H.textContent=e.title;g.appendChild(H);let x=y??(e.variants.length>0?e.variants[0]:null),C=f=>X(e.id,o,f?f.id:null),A=x?C(x).min:1,I=document.createElement("p");I.className="lb-mix-match__modal-product-price",I.setAttribute("data-row-price","");let P=document.createElement("span");P.setAttribute("data-row-price-sale",""),x&&(P.textContent=a(x.price*A)),I.appendChild(P);let p=document.createElement("s");p.className="lb-mix-match__modal-product-compare",p.setAttribute("data-row-compare",""),I.appendChild(p),g.appendChild(I);function k(f,D,_){let w=D&&D.compareAtPrice?D.compareAtPrice*_:0,B=D?D.price*_:0;w>B?(f.textContent=a(w),f.hidden=!1):(f.textContent="",f.hidden=!0)}k(p,x,A);let h=document.createElement("p");h.className="lb-mix-match__modal-product-unit-price lb-bundle-product-unit-price",h.setAttribute("data-row-unit-price","");let U=x?x.unitPrice:null;U?h.textContent=U:h.hidden=!0,g.appendChild(h);let O=null,Q=null,W=C(x).min,te=C(x).max,ne=null,Y=null;if(e.available&&n.showQtySelector){O=document.createElement("div"),O.className="lb-bundle-variant-option-group lb-mix-match__qty-stepper-group";let f=document.createElement("div");f.className="lb-mix-match__qty-stepper",f.setAttribute("role","group"),f.setAttribute("aria-label",r.quantity||"Quantity");let D=document.createElement("button");D.type="button",D.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--minus",D.setAttribute("aria-label",r.decreaseQuantity||"Decrease quantity"),D.textContent="\u2212",Q=document.createElement("span"),Q.className="lb-mix-match__qty-stepper-value",Q.setAttribute("data-row-qty",""),Q.setAttribute("aria-live","polite"),Q.textContent=String(C(x).min);let _=document.createElement("button");_.type="button",_.className="lb-mix-match__qty-stepper-button lb-mix-match__qty-stepper-button--plus",_.setAttribute("aria-label",r.increaseQuantity||"Increase quantity"),_.textContent="+",f.appendChild(D),f.appendChild(Q),f.appendChild(_),O.appendChild(f);let w=Q;ne=()=>{w.textContent=String(W),w.setAttribute("data-qty",String(W)),D.disabled=u||W<=C(x).min,_.disabled=u||W>=te},Y=(S,N=0)=>{let M=S?S.id:null,R=M===null?0:i.ownQty(M),V=M===null?0:i.productUnitsElsewhere(e.id,M),z=M===null?0:i.swapUnits(e.id,M),G=S?S.inventoryQuantity:null,Z=Math.max(0,N-R),be=typeof G=="number"?Math.max(0,G-Z):void 0,ge=pe(M,o)?.max,ee=C(S).min;te=z>0?typeof be=="number"?Math.min(z,be):z:Fn(l,i.remainingSpots(),be,R,V,ge),te<ee?W=ee:(W>te&&(W=te),W<ee&&(W=ee)),ne()};let B=()=>{x&&i.commitQty(x.id,W)&&n.onCommittedQtyChanged()};D.addEventListener("click",()=>{W>C(x).min&&(W-=1),ne(),B()}),_.addEventListener("click",()=>{W<te&&(W+=1),ne(),B()}),x?Y(x):ne()}let $=e.variants.slice(),L=[];if($.length>1){let f=e.optionNames||[];x=$.find(M=>M.available!==!1)??$[0];let D=()=>{let M=L.map(R=>R.value);for(let R of $)if(!(!R.options||R.options.length!==M.length)&&R.options.every((V,z)=>V===M[z]))return R;return null},_=M=>{if(!(!M||!M.options))for(let R=0;R<L.length&&R<M.options.length;R++)L[R].value!==M.options[R]&&(L[R].value=M.options[R])},w=(M,R,V)=>{for(let z of $){if(z.available===!1||!z.options||z.options[M]!==R)continue;let G=!0;for(let Z=0;Z<z.options.length;Z++)if(Z!==M&&z.options[Z]!==V[Z]){G=!1;break}if(G)return!0}return!1},B=M=>{for(let R=0;R<L.length;R++){let V=L[R];for(let z=0;z<V.options.length;z++)V.options[z].disabled=!w(R,V.options[z].value,M)}},S=()=>{let M=D();if(!M){_(x),x?.options&&B(x.options);return}x=M,d.setAttribute("data-selected-variant-id",String(M.id));let R=C(M).min;P.textContent=a(M.price*R),k(p,M,R),M.unitPrice?(h.textContent=M.unitPrice,h.hidden=!1):(h.textContent="",h.hidden=!0);let V=c.querySelector("img"),z=M.image||e.featuredImage;V&&z&&(V.src=ke(z,Qn),V.srcset=Me(z,It)),Y?.(M,i.variantUnitsElsewhere(M.id)),M.options&&B(M.options),F()},N=document.createElement("div");N.className="lb-bundle-variant-option-groups";for(let M=0;M<f.length;M++){let R=f[M],V=document.createElement("div");V.className="lb-bundle-variant-option-group";let z=document.createElement("span");z.className="lb-bundle-variant-option-label",z.textContent=R,V.appendChild(z);let G=document.createElement("select");G.className="lb-mix-match__variant-select",G.setAttribute("data-variant-option",""),G.setAttribute("data-option-position",String(M+1)),G.name="lb-variant-"+e.id+"-"+(M+1),G.setAttribute("aria-label",R);let Z=Object.create(null),be=x?.options?.[M];for(let ge of $){let ee=ge.options&&ge.options[M];if(!ee||Z[ee])continue;Z[ee]=!0;let De=document.createElement("option");De.value=ee,De.textContent=ee,ee===be&&(De.selected=!0),G.appendChild(De)}G.addEventListener("change",S),L.push(G),V.appendChild(G),N.appendChild(V)}g.appendChild(N),x&&(d.setAttribute("data-selected-variant-id",String(x.id)),x.options&&B(x.options))}else if($.length===1&&$[0].title!=="Default Title"){let f=document.createElement("span");f.className="lb-mix-match__filled-variant",f.textContent=$[0].title,g.appendChild(f)}let E=null;e.available&&(E=document.createElement("span"),E.className="lb-mix-match__modal-needs-spots",E.hidden=!0,g.appendChild(E));let b=null;if(e.available){let f=document.createElement("div");f.className="lb-mix-match__modal-product-actions",O&&f.appendChild(O),b=document.createElement("button"),b.type="button",b.className="lb-mix-match__modal-add",b.textContent=r.addItem||"Add",b.setAttribute("aria-label",(r.addItem||"Add")+" "+e.title),b.setAttribute("data-add-product",String(t)),f.appendChild(b),g.appendChild(f)}else{let f=document.createElement("span");f.className="lb-mix-match__modal-sold-out-label",f.textContent=r.soldOut||"Sold out",d.setAttribute("aria-disabled","true"),g.appendChild(f)}d.appendChild(g);let T=x?x.id:null;function F(){if(!x)return;let f=x,D=f.inventoryQuantity,_=typeof D=="number"?i.variantUnitsElsewhere(f.id):0,w=i.isInBundle(f.id);if(Y){let V=i.ownQty(f.id);V>0?W=V:T!==f.id&&(W=C(f).min),T=f.id,Y(f,_)}let B=i.swapUnits(e.id,f.id),S=C(f),N=B>=S.min,M=i.remainingSpots(),R=!w&&!N&&!On(S,M);if(E&&(R&&M>0?(E.textContent=Ze(S.min,r),E.hidden=!1):E.hidden=!0),b)if(w)b.disabled=!1,i.canRemove(f.id)?(b.textContent=r.removeItem||"Remove",b.setAttribute("aria-label",(r.removeItem||"Remove")+" "+e.title),b.classList.remove("lb-mix-match__modal-add--required")):(b.disabled=!0,b.textContent=r.required||"Required",b.setAttribute("aria-label",e.title+" is required and cannot be removed"),b.classList.add("lb-mix-match__modal-add--required")),b.classList.add("lb-mix-match__modal-add--added"),d.classList.add("lb-mix-match__modal-product--in-bundle"),m.hidden=!1;else{let V=r.swapItem||"Swap",z=N?V:r.addItem||"Add";b.textContent=z,b.setAttribute("aria-label",z+" "+e.title),b.classList.remove("lb-mix-match__modal-add--added"),b.classList.remove("lb-mix-match__modal-add--required"),d.classList.remove("lb-mix-match__modal-product--in-bundle"),m.hidden=!0;let G=typeof D=="number"?Math.max(0,D-_)<S.min:!1;if(N)b.disabled=G;else{let Z=l.max-i.productUnitsElsewhere(e.id,f.id)<S.min;b.disabled=G||Z||R||i.isFull()}}s=!e.available,u=!e.available||!w&&!!b?.disabled,ne?.();for(let V of L)V.disabled=s}return{el:d,refresh:F}}var Oo='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';function it(e){let t=e.querySelectorAll(Oo),n=[];for(let r=0;r<t.length;r++)t[r].offsetParent!==null&&n.push(t[r]);return n}var Mt=0,Ae=0;function at(){if(Ae++,Ae>1)return;Mt=window.pageYOffset||document.documentElement.scrollTop;let e=document.body;e.style.position="fixed",e.style.top="-"+Mt+"px",e.style.left="0",e.style.right="0",e.style.overflow="hidden"}function lt(){if(Ae<=0||(Ae--,Ae>0))return;let e=document.body;e.style.position="",e.style.top="",e.style.left="",e.style.right="",e.style.overflow="",window.scrollTo(0,Mt)}function st(e,t,n){let r=[],o=[];for(let i=0;i<t.length;i++)(n(i)?o:r).push(t[i]);for(let i of r)e.appendChild(i);for(let i of o)e.appendChild(i)}var Le="__all__",Fo=300,Vo=200;function Wn(e){let{container:t,data:n,t:r,eligibleProducts:o,items:i}=e,a=t.querySelector("[data-modal-overlay]");a&&e.portalTarget&&e.portalTarget.appendChild(a);let l=b=>a?a.querySelector(b):null,d=l('[role="dialog"]'),s=l("[data-modal-search]"),u=l("[data-modal-search-clear]"),c=l("[data-modal-list]"),m=l("[data-modal-empty]"),y=l("[data-modal-live]"),v=l("[data-modal-close]"),g=l("[data-modal-done]"),H=l("[data-modal-footer-count]"),x=l("[data-modal-subtitle]"),C=l("[data-modal-filters]"),A=n.showTypeFilters!==!1,I=Le,P=!1,p=!1,k=!1,h=[];function U(){for(let b of h)b.refresh()}function O(){let b=Math.min(oe(i),e.requiredQty),T=Math.max(0,e.requiredQty-b);H&&(H.textContent=et(b,e.requiredQty,r)),x&&(x.textContent=Hn(T,n.discountType,n.discountValue,r))}function Q(){U(),O()}function W(){if(c){e.dropdown?.unbindAll(c),c.innerHTML="",h=[];for(let b=0;b<o.length;b++){let T=ot(o[b],b,{t:r,rulesMap:e.rulesMap,showQtySelector:e.showQtySelector,capacity:e.rowCapacity,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),Q()}});h.push(T),c.appendChild(T.el)}e.dropdown?.bindAll(c),c.addEventListener("click",te)}}function te(b){let T=b.target.closest("[data-add-product]");if(!T||T.disabled)return;let F=parseInt(T.getAttribute("data-add-product")??"",10),f=o[F];if(!f)return;let D=T.closest(".lb-mix-match__modal-product"),_=D&&D.getAttribute("data-selected-variant-id"),w=(_?f.variants.find(R=>R.id===parseInt(_,10)):null)??null;if(w||(w=f.variants.find(R=>R.available)??null),!w)return;if(e.isInBundle(w.id)){e.removeVariant(w.id),Q();return}let B=D?.querySelector("[data-row-qty]"),S=B?Math.max(1,parseInt(B.getAttribute("data-qty")||B.textContent||"",10)||1):nt(f.id,e.rulesMap,w.id),N={productId:f.id,variantId:w.id,title:f.title,url:f.url||null,variantTitle:w.title,featuredImage:w.image||f.featuredImage||null,price:w.price,compareAtPrice:w.compareAtPrice||null,unitPrice:w.unitPrice||null,quantity:S},M=e.swapUnitsFor(f.id,w.id);if(M>0){e.swapVariant(N,Math.min(S,M)),Q();return}e.atCapacity()||(e.addSelection(N),Q())}function ne(){if(!C||!A)return;let b=[],T=Object.create(null);for(let F of o){let f=(F.type||"").trim();f&&!T[f]&&(T[f]=!0,b.push(f))}if(b.length<2){C.style.display="none",d?.classList.add("lb-mix-match__modal--filters-hidden");return}C.innerHTML="";for(let F of[Le,...b]){let f=document.createElement("button");f.type="button",f.className="lb-mix-match__filter",f.setAttribute("data-filter",F),f.setAttribute("aria-pressed",F===I?"true":"false"),F===I&&f.classList.add("lb-mix-match__filter--active"),f.textContent=F===Le?r.allTypes||"All":F,f.addEventListener("click",()=>{I=F,Y(),$(s?s.value:"")}),C.appendChild(f)}}function Y(){if(!C)return;let b=C.querySelectorAll("[data-filter]");for(let T=0;T<b.length;T++){let F=b[T].getAttribute("data-filter")===I;b[T].classList.toggle("lb-mix-match__filter--active",F),b[T].setAttribute("aria-pressed",F?"true":"false")}}function $(b){if(!c)return;let T=Te(b),F=c.querySelectorAll("[data-product-item]"),f=0;for(let D=0;D<F.length;D++){let _=F[D].getAttribute("data-title")??"",w=F[D].getAttribute("data-type")||"",B=(!T||_.indexOf(T)!==-1)&&(I===Le||w===I);F[D].classList.toggle("lb-hidden",!B),B&&f++}m&&(m.style.display=f===0&&T.length>0?"":"none"),u&&(u.style.display=b.length>0?"":"none"),y&&(y.textContent=J(r.nProductsShown||"__COUNT__ products shown",{COUNT:f}))}if(s){let b=rt(()=>$(s.value),Vo);s.addEventListener("input",b)}u&&u.addEventListener("click",()=>{s&&(s.value="",$(""),s.focus())});function L(){if(!(!a||k)){if(k=!0,P||(W(),P=!0),p||(ne(),p=!0),Q(),I=Le,Y(),s&&(s.value=""),$(s?s.value:""),c){let b=Object.create(null);for(let T of i)b[String(T.productId)]=!0;st(c,h.map(T=>T.el),T=>b[String(o[T].id)]===!0),c.scrollTop=0}a.style.display="",a.offsetHeight,a.classList.add("lb-mix-match__modal-overlay--open"),at(),setTimeout(()=>{v?v.focus():d?.focus()},50)}}function E(){if(!a||!k)return;k=!1,a.classList.remove("lb-mix-match__modal-overlay--open"),lt(),setTimeout(()=>{k||(a.style.display="none")},Fo);let b=e.fallbackFocus;b&&typeof b.focus=="function"&&setTimeout(()=>b.focus(),0)}if(v?.addEventListener("click",E),g?.addEventListener("click",E),a){let b=null;a.addEventListener("mousedown",T=>{b=T.target}),a.addEventListener("mouseup",T=>{T.target===a&&b===a&&E(),b=null})}return document.addEventListener("keydown",b=>{if(k){if(b.key==="Escape"){b.preventDefault(),E();return}if(b.key==="Tab"&&d){let T=it(d);if(T.length===0){b.preventDefault();return}let F=T[0],f=T[T.length-1];b.shiftKey&&document.activeElement===F?(b.preventDefault(),f.focus()):!b.shiftKey&&document.activeElement===f&&(b.preventDefault(),F.focus())}}}),{open:L,close:E,isOpen:()=>k,refresh:Q,overlay:a}}function jn(e,t){return Math.max(0,t-oe(e))}function At(e,t){return oe(e)>=t}function $n(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].variantId===t&&(n+=e[r].quantity||0);return n}function dt(e,t,n){let r=0;for(let o=0;o<e.length;o++){let i=e[o];i&&i.productId===t&&i.variantId!==n&&(r+=i.quantity||0)}return r}function Se(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i=0;i<e.length;i++){let a=e[i];a!==t&&a.productId===t.productId&&(o+=a.quantity||1)}return o>=r.min}function Lt(e,t,n,r){let o=X(t,r);return!o.required||o.max!==o.min||me(e,n)!==-1?0:dt(e,t,n)}function Uo(){let e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","16"),t.setAttribute("height","16"),t.setAttribute("viewBox","0 0 20 20"),t.setAttribute("fill","none");for(let[n,r,o,i]of[["5","5","15","15"],["15","5","5","15"]]){let a=document.createElementNS(e,"line");a.setAttribute("x1",n),a.setAttribute("y1",r),a.setAttribute("x2",o),a.setAttribute("y2",i),a.setAttribute("stroke","currentColor"),a.setAttribute("stroke-width","2"),a.setAttribute("stroke-linecap","round"),t.appendChild(a)}return t}function ct(e,t,n,r,o,i){let a=document.createElement("div");a.className="lb-mix-match__slot lb-mix-match__slot--filled";let l=document.createElement("div");if(l.className="lb-bundle-thumbnail",e.featuredImage){let v=document.createElement("img");v.src=ke(e.featuredImage,240),v.srcset=Me(e.featuredImage,Vn),v.sizes=Un,v.alt=e.title,v.loading="lazy",l.appendChild(v)}a.appendChild(l);let d=document.createElement("div");d.className="lb-mix-match__filled-info";let s=document.createElement("button");if(s.type="button",s.className="lb-mix-match__filled-title",s.textContent=e.title,s.setAttribute("aria-label",(t.editSelection||"Edit selection")+": "+e.title),d.appendChild(s),e.variantTitle&&e.variantTitle!=="Default Title"){let v=document.createElement("span");v.className="lb-mix-match__filled-variant",v.textContent=e.variantTitle,d.appendChild(v)}let u=document.createElement("span");u.className="lb-mix-match__filled-price";let c=e.compareAtPrice||0;if(c>e.price){let v=document.createElement("s");v.className="lb-mix-match__filled-compare",v.textContent=n(c),u.appendChild(v)}let m=document.createElement("span");m.className="lb-bundle-product-price",m.textContent=n(e.price),u.appendChild(m);let y=document.createElement("span");if(y.className="lb-bundle-qty-inline",y.textContent="\xD7"+(e.quantity||1),u.appendChild(y),d.appendChild(u),e.unitPrice){let v=document.createElement("span");v.className="lb-bundle-product-unit-price",v.textContent=e.unitPrice,d.appendChild(v)}if(a.appendChild(d),r){let v=document.createElement("button");v.type="button",v.className="lb-mix-match__slot-remove",v.setAttribute("aria-label",(t.removeItem||"Remove")+" "+e.title),v.appendChild(Uo()),v.addEventListener("click",g=>{g.stopPropagation(),o()}),a.appendChild(v)}else{let v=document.createElement("span");v.className="lb-mix-match__slot-required",v.textContent=t.required||"Required",a.appendChild(v)}return a.addEventListener("click",i),a}function Gn(e,t,n,r,o){let i=r.translations||{},a=e.querySelector("[data-selection-slots]");if(a){a.innerHTML="";for(let s=0;s<t.length;s++){let u=s;a.appendChild(ct(t[u],i,o.formatMoney,Se(t,t[u],o.rulesMap),()=>o.onRemove(u),o.onEdit))}}let l=e.querySelector("[data-add-product-trigger]");l&&(l.style.display=oe(t)>=n?"none":"");let d=e.querySelector("[data-add-bundle]");if(d){d.disabled=oe(t)<n;let s=d.querySelector("[data-cta-label]");s&&(s.textContent=d.getAttribute("data-cta-text")||i.addToCart||"Add to cart")}}function Kn(e,t,n,r,o,i){let a=e.querySelector("[data-pricing-section]");if(oe(t)<n){a&&(a.style.display="none");return}a&&(a.style.display="");let l=0;for(let d=0;d<t.length;d++)l+=t[d].price*(t[d].quantity||1);l>0&&r.discountType&&i(e,o(l,r.discountType,r.discountValue??0),l)}function Yn(e,t,n,r,o){let i=Math.min(oe(n),r),a=Math.max(0,r-i),l=[e];t&&l.push(t);for(let d of l){let s=d.querySelectorAll("[data-progress-segment]");for(let y=0;y<s.length;y++)s[y].classList.toggle("lb-mix-match__progress-segment--filled",y<i);let u=d.querySelector("[data-progress-count]");u&&(u.textContent=et(i,r,o));let c=d.querySelector("[data-progress-remaining]");c&&(c.textContent=Nn(a,o));let m=d.querySelector(".lb-mix-match__progress-segments");m&&m.setAttribute("aria-valuenow",String(i))}}function ut(e){return(t,n,r)=>{let o=t.querySelector("[data-sale-price]"),i=t.querySelector("[data-compare-price]"),a=t.querySelector("[data-savings-bar]"),l=t.querySelector("[data-savings-amount]"),d=t.querySelector("[data-savings-percent]"),s=r-n;if(o&&(o.textContent=e(n)),i&&(s>0?(i.textContent=e(r),i.style.display=""):i.style.display="none"),a)if(s>0){if(l&&(l.textContent=e(s)),d){let u=r>0?Math.round(s*100/r):0;d.textContent="("+u+"%)"}a.style.display=""}else a.style.display="none"}}function Jn(e,t,n,r){let o=u=>u.variants.find(c=>c.available)??null,i=(u,c,m)=>({productId:u.id,variantId:c.id,title:u.title,url:u.url||null,variantTitle:c.title,featuredImage:u.featuredImage||null,price:c.price,compareAtPrice:c.compareAtPrice||null,unitPrice:c.unitPrice||null,quantity:m}),a=[];for(let u of e){if(!u.available||!u.variants)continue;let c=!1;for(let v of u.variants){let g=pe(v.id,t);!g?.required||!v.available||(a.push(i(u,v,Math.max(1,g.min))),c=!0)}if(c)continue;let m=X(u.id,t);if(!m.required)continue;let y=o(u);y&&a.push(i(u,y,Math.max(1,m.min)))}if(a.length||!r?.enabled)return a;let l=u=>u.available&&X(u.id,t).min<=n,d=(r.currentProductId!=null?e.find(u=>u.id===r.currentProductId&&l(u)):null)??e.find(l);if(!d)return[];let s=o(d);return s?[i(d,s,X(d.id,t).min)]:[]}function Xn(e){let t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("viewBox","0 0 20 20"),n.setAttribute("fill","none");for(let[r,o,i,a]of e){let l=document.createElementNS(t,"line");l.setAttribute("x1",r),l.setAttribute("y1",o),l.setAttribute("x2",i),l.setAttribute("y2",a),l.setAttribute("stroke","currentColor"),l.setAttribute("stroke-width","2"),l.setAttribute("stroke-linecap","round"),n.appendChild(l)}return n}function j(e,t,n={}){let r=document.createElement(e);t&&(r.className=t);for(let o in n)r.setAttribute(o,n[o]);return r}function pt(e){let t="lb-modal-title-"+e.domId,n=j("div","lb-mix-match__modal-overlay",{"data-modal-overlay":"","data-bundle-gid":e.bundleGid,style:"display: none;"}),r=j("div","lb-mix-match__modal"+(e.showTypeFilters?"":" lb-mix-match__modal--filters-hidden"),{role:"dialog","aria-modal":"true","aria-labelledby":t,tabindex:"-1"}),o=j("div","lb-mix-match__modal-header"),i=j("div","lb-mix-match__modal-header-top"),a=j("div","lb-mix-match__modal-heading"),l=j("h4","lb-mix-match__modal-title",{id:t});e.wizard&&l.setAttribute("tabindex","-1"),l.textContent="Add to your bundle",a.appendChild(l),a.appendChild(j("p","lb-mix-match__modal-subtitle",{"data-modal-subtitle":""})),i.appendChild(a);let d=j("button","lb-mix-match__modal-close",{type:"button","data-modal-close":"","aria-label":"Close"});d.appendChild(Xn([["5","5","15","15"],["15","5","5","15"]])),i.appendChild(d),o.appendChild(i);let s=j("div","lb-mix-match__progress lb-mix-match__modal-progress",{"data-progress":""}),u=j("div","lb-mix-match__progress-segments",{role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":String(e.segmentCount??0)});if(e.wizard)u.setAttribute("data-modal-step-segments","");else for(let g=0;g<(e.segmentCount??0);g++)u.appendChild(j("span","lb-mix-match__progress-segment",{"data-progress-segment":""}));if(s.appendChild(u),o.appendChild(s),r.appendChild(o),e.showSearch){let g=j("div","lb-mix-match__modal-search"),H=j("input","lb-mix-match__modal-search-input",{type:"text","data-modal-search":"",role:"searchbox","aria-label":"Search products",placeholder:"Search products",autocomplete:"off"});g.appendChild(H);let x=j("button","lb-mix-match__modal-search-clear",{type:"button","data-modal-search-clear":"","aria-label":"Clear search",style:"display: none;"});x.appendChild(Xn([["5","5","15","15"],["15","5","5","15"]])),g.appendChild(x),r.appendChild(g)}e.showTypeFilters&&r.appendChild(j("div","lb-mix-match__filters",{"data-modal-filters":"",role:"group","aria-label":"Filter by type"})),r.appendChild(j("div","lb-mix-match__modal-list",{"data-modal-list":""}));let c=j("div","lb-mix-match__modal-empty",{"data-modal-empty":"",style:"display: none;"}),m=document.createElement("p");m.textContent="No products match your search",c.appendChild(m),r.appendChild(c),r.appendChild(j("span","lb-visually-hidden",{"data-modal-live":"","aria-live":"polite"}));let y=j("div",e.wizard?"lb-mix-match__modal-footer lb-multi-step__modal-footer":"lb-mix-match__modal-footer");if(e.wizard){let g=j("button","lb-multi-step__modal-back",{type:"button","data-modal-back":"",style:"display: none;"});g.textContent="Back",y.appendChild(g)}if(y.appendChild(j("span","lb-mix-match__modal-footer-count",{"data-modal-footer-count":"","aria-live":"polite"})),e.wizard){let g=j("button","lb-mix-match__modal-done",{type:"button","data-modal-next":"",style:"display: none;"});g.textContent="Next",y.appendChild(g)}let v=j("button","lb-mix-match__modal-done",{type:"button","data-modal-done":"",...e.wizard?{style:"display: none;"}:{}});return v.textContent="Done",y.appendChild(v),r.appendChild(y),n.appendChild(r),n}function Zn(e,t,n,r,o){let i=t.widgetConfig,a=ue,l=t.minQuantity||1,d=tt(t.productRules,t.variantRules),u=Qe(t).map((p,k)=>({id:Number(p.productId),title:p.title??"",url:p.url??null,type:t.products[k]?.productType??"",featuredImage:p.featuredImage??null,available:p.variants.some(h=>h.available),optionNames:p.optionNames,variants:p.variants.map(h=>({id:Number(h.id),title:h.title,options:h.options,available:h.available,price:h.price,compareAtPrice:h.compareAtPrice,unitPrice:h.unitPrice,image:h.image,inventoryQuantity:h.inventoryQuantity??null}))}));if(!u.length||u.filter(p=>p.available).length===0)return;let m=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),y=de("lb-mix-match",{title:t.title,subtitle:t.description,showSavingsBar:i.savingsBar?.visible!==!1,showComparePrice:i.pricing?.showCompareAtPrice!==!1,ctaText:i.cta?.ctaText||a.addToCart||"Add to cart",endsAt:i.countdown?.showCountdown===!1?null:t.endsAt});y.root.setAttribute("data-required-quantity",String(l)),y.products.before(Ke(l));let v=document.createElement("div");v.className="lb-mix-match__slots lb-edge-fade",v.setAttribute("data-selection-slots",""),y.products.replaceWith(v);let g=document.createElement("button");g.type="button",g.className="lb-mix-match__add-product",g.setAttribute("data-add-product-trigger",""),g.textContent=(a.addItem,"Add a product"),v.after(g);let H=pt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:i.showSearch!==!1,showTypeFilters:i.mixMatchShowTypeFilters!==!1,segmentCount:l,wizard:!1});y.root.appendChild(H);let x=o?t.products.findIndex(p=>p.handle===o):-1,C=Jn(u,d,l,{enabled:!!o,currentProductId:x!==-1?u[x]?.id??null:null}),A={remainingSpots:()=>jn(C,l),ownQty:p=>Dn(C,p),variantUnitsElsewhere:p=>$n(C,p),productUnitsElsewhere:(p,k)=>dt(C,p,k),swapUnits:(p,k)=>Lt(C,p,k,d),isInBundle:p=>me(C,p)!==-1,canRemove:p=>{let k=me(C,p);return k!==-1&&Se(C,C[k],d)},isFull:()=>At(C,l),commitQty:(p,k)=>{let h=me(C,p);return h===-1||C[h].quantity===k?!1:(C[h].quantity=k,!0)}};function I(){Gn(y.root,C,l,t,{formatMoney:m,rulesMap:d,onRemove:p=>{Se(C,C[p],d)&&(C.splice(p,1),I(),P.isOpen()&&P.refresh())},onEdit:()=>P.open()}),Kn(y.root,C,l,{discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},(p,k,h)=>Ve(p,k,h),ut(m)),Yn(y.root,P.overlay,C,l,a)}let P=Wn({container:y.root,data:{translations:a,discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},t:a,rulesMap:d,eligibleProducts:u,requiredQty:l,showQtySelector:i.mixMatchShowQuantitySelector!==!1,items:C,formatMoney:m,rowCapacity:A,dropdown:void 0,portalTarget:null,fallbackFocus:g,onSelectionChanged:I,addSelection:p=>{if(oe(C)+(p.quantity||1)>l)return;let k=pe(p.variantId,d)?.max,h=X(p.productId,d).max-dt(C,p.productId,p.variantId);typeof k=="number"&&(h=Math.min(h,k)),!((p.quantity||1)>h)&&(C.push(p),I())},removeVariant:p=>{let k=me(C,p);k===-1||!Se(C,C[k],d)||(C.splice(k,1),I())},swapVariant:(p,k)=>{let h=0;for(let U=C.length-1;U>=0&&h<k;U--){let O=C[U];if(O.productId!==p.productId||O.variantId===p.variantId)continue;let Q=Math.min(O.quantity||1,k-h);Q>=(O.quantity||1)?C.splice(U,1):O.quantity=(O.quantity||1)-Q,h+=Q}h>0&&(p.quantity=h,C.push(p),I())},swapUnitsFor:(p,k)=>Lt(C,p,k,d),isInBundle:p=>me(C,p)!==-1,atCapacity:()=>At(C,l)});g.addEventListener("click",()=>{P.isOpen()||P.open()}),y.cta.addEventListener("click",()=>{oe(C)<l||n(C.map(p=>({merchandiseId:"gid://shopify/ProductVariant/"+p.variantId,quantity:p.quantity||1,attributes:se(t.id,t.bundleType)})))}),e.appendChild(y.root),ce(y.root),I(),r?.(he(y.root))}var er="lb-volume__tier--oos";function zo(e){return parseInt(e.getAttribute("data-tier-qty")??"",10)||0}function Pe(e){return e.getAttribute("aria-disabled")==="true"}function tr(e,t){for(let n=0;n<e.length;n++){let r=e[n];t!==null&&zo(r)>t?(r.classList.add(er),r.setAttribute("aria-disabled","true")):(r.classList.remove(er),r.removeAttribute("aria-disabled"))}}function nr(e,t){let n=e[t];if(n&&!Pe(n))return t;for(let r=0;r<e.length;r++)if(!Pe(e[r]))return r;return-1}function Pt(e,t,n){let r=t+n;for(;r>=0&&r<e.length;){if(!Pe(e[r]))return r;r+=n}return t}function rr(e,t,n){if(t==="fixed_amount"){let o=parseInt(n.getAttribute("data-tier-amt")??"",10)||0;return Math.max(0,e-o)}let r=parseInt(n.getAttribute("data-tier-pct")??"",10)||0;return Math.max(0,e-Math.floor(e*r/100))}function Qo(e,t,n){let r=parseInt(n.getAttribute("data-tier-qty")??"",10),o=rr(e,t,n),i=o*r,a=e*r;return{qty:r,priceEach:o,totalPrice:i,undiscountedTotal:a,totalSavings:a-i}}function Wo(e,t){if(!t.itemCount)return null;let n=new Intl.PluralRules(t.locale||"en").select(e);return" ("+(t.itemCount[n]||t.itemCount.other||"__COUNT__").split("__COUNT__").join(String(e))+")"}function or(e,t,n,r){for(let o=0;o<e.length;o++){let i=e[o],a=i.querySelector("[data-tier-price-each]");a&&(a.textContent=r(rr(t,n,i)));let l=i.querySelector(".lb-volume__tier-compare");l&&(l.textContent=r(t))}}function ir(e,t,n,r,o,i,a){for(let x=0;x<t.length;x++)t[x].setAttribute("aria-checked",x===o?"true":"false"),t[x].setAttribute("tabindex",x===o?"0":"-1");let{qty:l,totalPrice:d,undiscountedTotal:s,totalSavings:u}=Qo(n,r,t[o]),c=e.querySelector("[data-item-count]");if(c){let x=Wo(l,i);x!==null&&(c.textContent=x)}let m=e.querySelector("[data-total-price]");m&&(m.textContent=a(d));let y=e.querySelector("[data-compare-price]");y&&(u>0?(y.textContent=a(s),y.style.display=""):y.style.display="none");let v=e.querySelector("[data-savings-bar]"),g=e.querySelector("[data-savings-amount]"),H=e.querySelector("[data-savings-percent]");if(v)if(u>0){if(g&&(g.textContent=a(u)),H){let x=s>0?Math.round(u*100/s):0;H.textContent="("+x+"%)"}v.style.display=""}else v.style.display="none"}function ar(e,t,n){let r=t.widgetConfig,o=t.products[0];if(!o)return;let i=o.variants.nodes,a=Math.min(...t.volumeTiers.map(p=>p.minQuantity)),l=i.find(p=>Ie(p,a))??i.find(p=>p.availableForSale)??i[0];if(!l)return;let d=ze(l.price.amount),s=t.discountConfig.discountType,u=le(o.priceRange.minVariantPrice.currencyCode),c=ue,m=an(t.volumeTiers,s),y=ln(r.defaultTier,t.volumeTiers.length,m),v=sn(r.popularBadge?.tierIndex,r.popularBadge?.visible!==!1,m),g=t.volumeTiers.map((p,k)=>{let h=s==="fixed_amount"?0:Math.round(p.percentage??0),U=s==="fixed_amount"?Math.round((p.amount??0)*100):0,O=s==="fixed_amount"?Math.max(0,d-U):Math.max(0,d-Math.floor(d*h/100)),Q=d>0?Math.round((d-O)*100/d):0;return{quantity:p.minQuantity,percent:h,amountCents:U,label:J(c.buyQty||"Buy __COUNT__",{COUNT:p.minQuantity}),savingsLabel:Q>0?"Save "+Q+"%":null,badgeLabel:k===v?r.popularBadge?.text||"Most popular":null,selected:k===y}});if(!g.length)return;let H=de("lb-volume",{title:t.title,subtitle:t.description,summaryLabel:"Total",withItemCount:r.pricing?.showItemCount!==!1,totalPriceSlot:!0,showSavingsBar:r.savingsBar?.visible!==!1,showComparePrice:r.pricing?.showCompareAtPrice!==!1,ctaText:r.cta?.ctaText||c.addToCart||"Add to cart",endsAt:r.countdown?.showCountdown===!1?null:t.endsAt}),x=Tn(g,"Select quantity",{showCompare:r.pricing?.showComparePrice!==!1,showPriceEach:r.pricing?.showPerUnitPrice!==!1,unitLabel:(c.each||"each").trim()});H.products.replaceWith(x);let C=x.querySelectorAll("[data-tier-index]");or(C,d,s,u),tr(C,Ue(l));let A=nr(C,y),I=A===-1;I&&(A=y);let P=()=>ir(H.root,C,d,s,A,c,u);if(x.addEventListener("click",p=>{let k=p.target.closest("[data-tier-index]");!k||Pe(k)||(A=parseInt(k.getAttribute("data-tier-index")??"",10)||0,P())}),x.addEventListener("keydown",p=>{p.key==="ArrowDown"||p.key==="ArrowRight"?(p.preventDefault(),A=Pt(C,A,1),P(),C[A].focus()):(p.key==="ArrowUp"||p.key==="ArrowLeft")&&(p.preventDefault(),A=Pt(C,A,-1),P(),C[A].focus())}),I){H.cta.disabled=!0;let p=H.cta.querySelector("[data-cta-label]");p&&(p.textContent=c.outOfStock||"Out of stock")}else H.cta.addEventListener("click",()=>{let p=parseInt(C[A].getAttribute("data-tier-qty")??"",10);n([{merchandiseId:l.id,quantity:p,attributes:se(t.id,t.bundleType)}])});e.appendChild(H.root),ce(H.root),P()}function mt(e,t){return e-Math.floor(e*t/100)}function jo(e,t,n,r){let o=K(e[0],e[0].selectedVariantId),i=K(e[1],e[1].selectedVariantId),a=o.price*n+i.price*r,l=o.price*n+mt(i.price,t)*r;return{totalPrice:a,salePrice:l,savings:a-l}}function Bt(e,t,n,r,o){let i=e.querySelector("[data-product-price]"),a=e.querySelector("[data-product-compare-price]");if(i){if(r&&n>0){i.textContent=o(mt(t.price,n)),a&&(a.textContent=o(t.price),a.hidden=!1);return}if(i.textContent=o(t.price),a){let l=t.compareAtPrice;l&&l>t.price?(a.textContent=o(l),a.hidden=!1):(a.textContent="",a.hidden=!0)}}}function qt(e,t,n,r,o,i){let{totalPrice:a,salePrice:l,savings:d}=jo(t,n,r,o),s=e.querySelector("[data-sale-price]"),u=e.querySelector("[data-compare-price]"),c=e.querySelector("[data-savings-bar]"),m=e.querySelector("[data-savings-amount]"),y=e.querySelector("[data-savings-percent]");if(s&&(s.textContent=i(l)),u&&(d>0?(u.textContent=i(a),u.style.display=""):u.style.display="none"),c)if(d>0){if(m&&(m.textContent=i(d)),y){let v=a>0?Math.round(d*100/a):0;y.textContent="("+v+"%)"}c.style.display=""}else c.style.display="none"}function lr(e,t,n,r){let o=K(e[0],e[0].selectedVariantId),i=K(e[1],e[1].selectedVariantId),a={variantId:Number(e[0].selectedVariantId),quantity:n,priceCents:(o.price||0)*n},l=mt(i.price||0,t)*r;return String(e[0].selectedVariantId)===String(e[1].selectedVariantId)?[{variantId:a.variantId,quantity:n+r,priceCents:(a.priceCents??0)+l}]:[a,{variantId:Number(e[1].selectedVariantId),quantity:r,priceCents:l}]}function $o(){let e=document.createElement("div");return e.className="lb-bogo__plus",e.setAttribute("aria-hidden","true"),e.innerHTML='<svg width="12" height="12" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><line x1="9" y1="3" x2="9" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><line x1="3" y1="9" x2="15" y2="9" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>',e}function sr(e,t,n,r){let o=t.widgetConfig,i=t.products.find(x=>x.id===t.buyProductId),a=t.products.find(x=>x.id===t.getProductId);if(!i||!a)return;let l=t.buyQuantity,d=t.getQuantity,s=t.discountConfig.discountValue,u={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},c=[{..._e(i,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[0]??null}),role:"buy"},{..._e(a,t.id,{quantities:u,allowedVariantIds:t.selectedVariantIds?.[1]??null}),role:"get"}],m=c.filter(x=>!x.variants.some(C=>C.available)).length,y=le(i.priceRange.minVariantPrice.currencyCode),v=ue,g=de("lb-bogo",{title:t.title,subtitle:t.description,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||v.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt});g.root.setAttribute("data-discount-value",String(s)),g.root.setAttribute("data-buy-qty",String(l)),g.root.setAttribute("data-get-qty",String(d));let H=s>=100?"Free":s+"% off";if(c.forEach((x,C)=>{let A=C===1;A&&g.products.appendChild($o());let I=!x.variants.some(k=>k.available),P=Ge(x,v,{isOos:I,href:x.url,bogoRole:x.role,inlineQuantity:A?d:l,badgeText:A&&!I?H:null});if(g.products.appendChild(P),I)return;let p=K(x,x.selectedVariantId);je(P,x,p),$e(P,p,x.featuredImage),Bt(P,p,s,A,y),We(P,()=>x,k=>{$e(P,k,x.featuredImage),Bt(P,k,s,A,y),qt(g.root,c,s,l,d,y)})}),m>0){g.cta.disabled=!0;let x=g.cta.querySelector("[data-cta-label]");x&&(x.textContent=Ye(v,m))}else g.cta.addEventListener("click",()=>{n(lr(c,s,l,d).map(x=>({merchandiseId:"gid://shopify/ProductVariant/"+x.variantId,quantity:x.quantity,attributes:se(t.id,t.bundleType)})))});e.appendChild(g.root),ce(g.root),qt(g.root,c,s,l,d,y),r?.(he(g.root))}function Rt(e,t,n){return J(n.stepOf||"Step __STEP__ of __TOTAL__",{STEP:e+1,TOTAL:t})}function Be(e,t,n){return J(n.ofSelected||"__COUNT__ of __TOTAL__ added",{COUNT:e,TOTAL:t})}function dr(e,t,n){return J(n.stepsCompleted||"__COUNT__ of __TOTAL__ steps completed",{COUNT:e,TOTAL:t})}function cr(e,t){return e>0?J(t.moreToGo||"__COUNT__ more to go",{COUNT:e}):t.complete||"Complete"}function fe(e,t){let n=0;for(let r=0;r<e[t].length;r++)n+=e[t][r].quantity||1;return n}function ye(e,t,n){return fe(e,n)>=(t[n].minQuantity||1)}function Ee(e,t,n){let r=t[n].maxQuantity;return r==null?1/0:Math.max(0,r-fe(e,n))}function qe(e,t){for(let n=0;n<t.length;n++)if(!ye(e,t,n))return!1;return!0}function Re(e,t,n){if(pe(t.variantId,n)?.required)return!1;let r=X(t.productId,n);if(!r.required)return!0;let o=0;for(let i of e)for(let a of i)a!==t&&a.productId===t.productId&&(o+=a.quantity||1);return o>=r.min}function Nt(e,t,n,r,o){let i=X(n,o);if(!i.required||i.max!==i.min||we(e,t,r)!==-1)return 0;let a=0;for(let l of e[t])l.productId===n&&l.variantId!==r&&(a+=l.quantity||1);return a}function we(e,t,n){for(let r=0;r<e[t].length;r++)if(e[t][r].variantId===n)return r;return-1}function ur(e){let{container:t,steps:n,selections:r,t:o}=e;for(let i=0;i<n.length;i++){let a=n[i].minQuantity||1,l=t.querySelector('[data-step-count="'+i+'"]');l&&(l.textContent=Be(Math.min(fe(r,i),a),a,o),l.classList.toggle("lb-multi-step__group-count--met",ye(r,n,i)));let d=t.querySelector('[data-step-slots="'+i+'"]');if(d){d.innerHTML="";for(let s=0;s<r[i].length;s++){let u=i,c=s,m=r[u][c];d.appendChild(ct(m,o,e.formatMoney,Re(r,m,e.rulesMap),()=>e.onRemove(u,c),()=>e.onEdit(u)))}}}for(let i=0;i<n.length;i++){let a=t.querySelector('[data-step-trigger="'+i+'"]');a&&(a.style.display=Ee(r,n,i)===0?"none":"")}}function pr(e,t,n,r){let{container:o,steps:i,selections:a}=e,l=o.querySelector("[data-pricing-section]");if(!qe(a,i)){l&&(l.style.display="none");return}l&&(l.style.display="");let d=0;for(let s of a)for(let u of s)d+=u.price*(u.quantity||1);d>0&&t.discountType&&r(o,n(d,t.discountType,t.discountValue??0),d)}function mr(e){let{container:t,steps:n,selections:r,t:o}=e,i=0;for(let c=0;c<n.length;c++)ye(r,n,c)&&(i+=1);let a=n.length-i,l=t.querySelectorAll("[data-progress] [data-progress-segment]");for(let c=0;c<l.length;c++)l[c].classList.toggle("lb-mix-match__progress-segment--filled",c<i);let d=t.querySelector("[data-progress-count]");d&&(d.textContent=dr(i,n.length,o));let s=t.querySelector("[data-progress-remaining]");s&&(s.textContent=cr(a,o));let u=t.querySelector(".lb-mix-match__progress-segments");u&&u.setAttribute("aria-valuenow",String(i))}function br(e){let t=e.container.querySelector("[data-add-bundle]");if(!t)return;t.disabled=!qe(e.selections,e.steps);let n=t.querySelector("[data-cta-label]");n&&(n.textContent=t.getAttribute("data-cta-text")||e.t.addToCart||"Add to cart")}function hr(e){let t=Object.create(null),n=[];for(let r of e)for(let o of r){let i=o.quantity||1,a=String(o.variantId);t[a]?(t[a].quantity+=i,t[a].priceCents=(t[a].priceCents??0)+(o.price||0)*i):(t[a]={variantId:o.variantId,quantity:i,priceCents:(o.price||0)*i},n.push(a))}return n.map(r=>t[r])}var Ne="__all__",Go=300,Ko=200;function fr(e){let{container:t,steps:n,selections:r,t:o}=e,i=t.querySelector("[data-modal-overlay]");i&&e.portalTarget&&e.portalTarget.appendChild(i);let a=_=>i?i.querySelector(_):null,l=a('[role="dialog"]'),d=a(".lb-mix-match__modal-title"),s=a("[data-modal-search]"),u=a("[data-modal-search-clear]"),c=a("[data-modal-list]"),m=a("[data-modal-empty]"),y=a("[data-modal-live]"),v=a("[data-modal-close]"),g=a("[data-modal-back]"),H=a("[data-modal-next]"),x=a("[data-modal-done]"),C=a("[data-modal-footer-count]"),A=a("[data-modal-subtitle]"),I=a("[data-modal-step-segments]"),P=a("[data-modal-filters]"),p=Ne,k=!1,h=0,U=[],O=_=>n[_].eligibleProducts||[],Q={remainingSpots:()=>Ee(r,n,h),ownQty:_=>{let w=we(r,h,_);return w===-1?0:r[h][w].quantity||0},variantUnitsElsewhere:_=>{let w=0;for(let B of r)for(let S of B)S.variantId===_&&(w+=S.quantity||0);return w},productUnitsElsewhere:(_,w)=>{let B=0;for(let S=0;S<r.length;S++)for(let N of r[S])N.productId===_&&(S===h&&N.variantId===w||(B+=N.quantity||0));return B},swapUnits:(_,w)=>Nt(r,h,_,w,e.rulesMap),isInBundle:_=>we(r,h,_)!==-1,canRemove:_=>{let w=we(r,h,_);return w!==-1&&e.canRemove(r[h][w])},isFull:()=>Ee(r,n,h)===0,commitQty:(_,w)=>{let B=we(r,h,_);return B===-1||r[h][B].quantity===w?!1:(r[h][B].quantity=w,!0)}};function W(_){if(!I)return;let w=n[_].minQuantity||1;I.innerHTML="",I.setAttribute("aria-valuemax",String(w));for(let B=0;B<w;B++){let S=document.createElement("span");S.className="lb-mix-match__progress-segment",S.setAttribute("data-progress-segment",""),I.appendChild(S)}te()}function te(){if(!I)return;let _=n[h].minQuantity||1,w=Math.min(fe(r,h),_),B=I.querySelectorAll("[data-progress-segment]");for(let S=0;S<B.length;S++)B[S].classList.toggle("lb-mix-match__progress-segment--filled",S<w);I.setAttribute("aria-valuenow",String(w))}function ne(){let _=n[h].minQuantity||1,w=Math.min(fe(r,h),_);C&&(C.textContent=Be(w,_,o)),A&&(A.textContent=Rt(h,n.length,o)+" \xB7 "+(n[h].name||""));let B=ye(r,n,h),S=h===n.length-1;g&&(g.style.display=h>0?"":"none"),H&&(H.style.display=S?"none":"",H.disabled=!B),x&&(x.style.display=S?"":"none",x.disabled=!B),te()}function Y(){for(let _ of U)_.refresh();ne()}function $(_){if(!c)return;e.dropdown?.unbindAll(c),c.innerHTML="",U=[];let w=O(_);for(let N=0;N<w.length;N++){let M=ot(w[N],N,{t:o,rulesMap:e.rulesMap,capacity:Q,showQtySelector:e.showQtySelector,formatMoney:e.formatMoney,onCommittedQtyChanged:()=>{e.onSelectionChanged(),Y()}});U.push(M),c.appendChild(M.el)}let B=r[_]||[],S=Object.create(null);for(let N of B)S[String(N.productId)]=!0;st(c,U.map(N=>N.el),N=>S[String(w[N].id)]===!0),e.dropdown?.bindAll(c)}function L(_){let w=_.target.closest("[data-add-product]");if(!w||w.disabled)return;let S=O(h)[parseInt(w.getAttribute("data-add-product")??"",10)];if(!S)return;let N=w.closest(".lb-mix-match__modal-product"),M=N&&N.getAttribute("data-selected-variant-id"),R=(M?S.variants.find(ee=>ee.id===parseInt(M,10)):null)??null;if(R||(R=S.variants.find(ee=>ee.available)??null),!R)return;let V=we(r,h,R.id);if(V!==-1){if(!e.canRemove(r[h][V]))return;r[h].splice(V,1),e.onSelectionChanged(),Y();return}let z=N?.querySelector("[data-row-qty]"),G=z?Math.max(1,parseInt(z.getAttribute("data-qty")||z.textContent||"",10)||1):nt(S.id,e.rulesMap,R.id),Z={productId:S.id,variantId:R.id,title:S.title,url:S.url||null,variantTitle:R.title,featuredImage:R.image||S.featuredImage||null,price:R.price,compareAtPrice:R.compareAtPrice||null,unitPrice:R.unitPrice||null,quantity:G},be=Nt(r,h,S.id,R.id,e.rulesMap);if(be>0){e.swapVariant(h,Z,Math.min(G,be)),Y();return}let ge=Ee(r,n,h);ge!==1/0&&G>ge||(r[h].push(Z),e.onSelectionChanged(),Y())}c&&c.addEventListener("click",L);function E(_){if(!P||!e.showTypeFilters)return;let w=[],B=Object.create(null);for(let S of O(_)){let N=(S.type||"").trim();N&&!B[N]&&(B[N]=!0,w.push(N))}if(w.length<2){P.style.display="none",l?.classList.add("lb-mix-match__modal--filters-hidden");return}P.style.display="",l?.classList.remove("lb-mix-match__modal--filters-hidden"),P.innerHTML="";for(let S of[Ne,...w]){let N=document.createElement("button");N.type="button",N.className="lb-mix-match__filter",N.setAttribute("data-filter",S),N.setAttribute("aria-pressed",S===p?"true":"false"),S===p&&N.classList.add("lb-mix-match__filter--active"),N.textContent=S===Ne?o.allTypes||"All":S,N.addEventListener("click",()=>{p=S,b(),T(s?s.value:"")}),P.appendChild(N)}}function b(){if(!P)return;let _=P.querySelectorAll("[data-filter]");for(let w=0;w<_.length;w++){let B=_[w].getAttribute("data-filter")===p;_[w].classList.toggle("lb-mix-match__filter--active",B),_[w].setAttribute("aria-pressed",B?"true":"false")}}function T(_){if(!c)return;let w=Te(_),B=c.querySelectorAll("[data-product-item]"),S=0;for(let N=0;N<B.length;N++){let M=B[N].getAttribute("data-title")??"",R=B[N].getAttribute("data-type")||"",V=(!w||M.indexOf(w)!==-1)&&(p===Ne||R===p);B[N].classList.toggle("lb-hidden",!V),V&&S++}m&&(m.style.display=S===0&&w.length>0?"":"none"),u&&(u.style.display=_.length>0?"":"none"),y&&(y.textContent=J(o.nProductsShown||"__COUNT__ products shown",{COUNT:S}))}if(s){let _=rt(()=>T(s.value),Ko);s.addEventListener("input",_)}u&&u.addEventListener("click",()=>{s&&(s.value="",T(""),s.focus())});function F(_,w={}){if(h=Math.max(0,Math.min(n.length-1,_)),$(h),E(h),p=Ne,b(),s&&(s.value=""),T(""),c&&(c.scrollTop=0),W(h),Y(),y){let B=n[h].minQuantity||1;y.textContent=Rt(h,n.length,o)+". "+(n[h].name||"")+". "+Be(Math.min(fe(r,h),B),B,o)}!w.skipFocus&&d&&typeof d.focus=="function"&&d.focus()}function f(_){!i||k||(k=!0,F(typeof _=="number"?_:0,{skipFocus:!0}),i.style.display="",i.offsetHeight,i.classList.add("lb-mix-match__modal-overlay--open"),at(),setTimeout(()=>{v?v.focus():l?.focus()},50))}function D(){if(!i||!k)return;k=!1,i.classList.remove("lb-mix-match__modal-overlay--open"),lt(),setTimeout(()=>{k||(i.style.display="none")},Go);let _=t.querySelector('[data-step-trigger="'+h+'"]'),w=_&&_.offsetParent!==null?_:e.ctaButton;w&&typeof w.focus=="function"&&setTimeout(()=>w.focus(),0)}if(v?.addEventListener("click",D),x?.addEventListener("click",D),g?.addEventListener("click",()=>{h>0&&F(h-1)}),H?.addEventListener("click",()=>{h<n.length-1&&ye(r,n,h)&&F(h+1)}),i){let _=null;i.addEventListener("mousedown",w=>{_=w.target}),i.addEventListener("mouseup",w=>{w.target===i&&_===i&&D(),_=null})}return document.addEventListener("keydown",_=>{if(k){if(_.key==="Escape"){_.preventDefault(),D();return}if(_.key==="Tab"&&l){let w=it(l);if(w.length===0){_.preventDefault();return}let B=w[0],S=w[w.length-1];_.shiftKey&&document.activeElement===B?(_.preventDefault(),S.focus()):!_.shiftKey&&document.activeElement===S&&(_.preventDefault(),B.focus())}}}),{open:f,close:D,isOpen:()=>k,refresh:Y}}function gr(e,t,n,r){let o=t.widgetConfig,i=ue,a=tt(t.productRules,t.variantRules),l=t.steps??[];if(!l.length)return;let d={productQuantities:t.productQuantities,variantQuantities:t.variantQuantities},s=l.map((A,I)=>cn(t,I).map(P=>{let p=_e(P,t.id,{quantities:d,allowedVariantIds:null});return{id:Number(p.productId),title:p.title??"",url:p.url??null,type:P.productType??"",featuredImage:p.featuredImage??null,available:p.variants.some(k=>k.available),optionNames:p.optionNames,variants:p.variants.map(k=>({id:Number(k.id),title:k.title,options:k.options,available:k.available,price:k.price,compareAtPrice:k.compareAtPrice,unitPrice:k.unitPrice,image:k.image,inventoryQuantity:k.inventoryQuantity??null}))}}));if(!(s.length>0&&s.every(A=>A.some(I=>I.available))))return;let c=le(t.products[0]?.priceRange.minVariantPrice.currencyCode??"USD"),m=de("lb-multi-step",{title:t.title,subtitle:t.description,showSavingsBar:o.savingsBar?.visible!==!1,showComparePrice:o.pricing?.showCompareAtPrice!==!1,ctaText:o.cta?.ctaText||i.addToCart||"Add to cart",endsAt:o.countdown?.showCountdown===!1?null:t.endsAt});m.products.before(Ke(l.length));let y=document.createElement("div");y.className="lb-multi-step__groups",l.forEach((A,I)=>{let P=document.createElement("div");P.className="lb-multi-step__group",P.setAttribute("data-step-group",String(I));let p=document.createElement("div");p.className="lb-multi-step__group-heading";let k=document.createElement("span");k.className="lb-multi-step__group-name",k.textContent=A.name,p.appendChild(k);let h=document.createElement("span");h.className="lb-multi-step__group-count",h.setAttribute("data-step-count",String(I)),p.appendChild(h),P.appendChild(p);let U=document.createElement("div");U.className="lb-mix-match__slots lb-edge-fade",U.setAttribute("data-step-slots",String(I)),P.appendChild(U);let O=document.createElement("button");O.type="button",O.className="lb-mix-match__add-product",O.setAttribute("data-step-trigger",String(I)),O.textContent="Add a product",P.appendChild(O),y.appendChild(P)}),m.products.replaceWith(y);let v=pt({bundleGid:t.id,domId:t.id.replace(/\D/g,""),showSearch:o.showSearch!==!1,showTypeFilters:o.mixMatchShowTypeFilters!==!1,segmentCount:null,wizard:!0});m.root.appendChild(v);let g=l.map(()=>[]),H={container:m.root,steps:l.map((A,I)=>({name:A.name,minQuantity:A.minQuantity,maxQuantity:A.maxQuantity,eligibleProducts:s[I]})),selections:g,t:i,rulesMap:a,formatMoney:c,onRemove:(A,I)=>{let P=g[A][I];!P||!Re(g,P,a)||(g[A].splice(I,1),x(),C.isOpen()&&C.refresh())},onEdit:A=>C.open(A)};function x(){ur(H),pr(H,{discountType:t.discountConfig.discountType,discountValue:t.discountConfig.discountValue},(A,I,P)=>Ve(A,I,P),ut(c)),mr(H),br(H)}let C=fr({container:m.root,steps:H.steps,selections:g,t:i,rulesMap:a,showQtySelector:o.mixMatchShowQuantitySelector!==!1,showTypeFilters:o.mixMatchShowTypeFilters!==!1,formatMoney:c,dropdown:void 0,portalTarget:null,ctaButton:m.cta,onSelectionChanged:x,swapVariant:(A,I,P)=>{let p=0,k=g[A];for(let h=k.length-1;h>=0&&p<P;h--){let U=k[h];if(U.productId!==I.productId||U.variantId===I.variantId)continue;let O=Math.min(U.quantity||1,P-p);O>=(U.quantity||1)?k.splice(h,1):U.quantity=(U.quantity||1)-O,p+=O}p>0&&(I.quantity=p,k.push(I),x())},canRemove:A=>Re(g,A,a)});m.root.querySelectorAll("[data-step-trigger]").forEach(A=>{A.addEventListener("click",()=>{C.isOpen()||C.open(parseInt(A.getAttribute("data-step-trigger")??"",10)||0)})}),m.cta.addEventListener("click",()=>{qe(g,H.steps)&&n(hr(g).map(A=>({merchandiseId:"gid://shopify/ProductVariant/"+A.variantId,quantity:A.quantity,attributes:se(t.id,t.bundleType)})))}),e.appendChild(m.root),ce(m.root),x(),r?.(he(m.root))}var Yo=new Set(["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","Enter"," ","Escape"]),bt=new Set,ht=!1;function xr(e){let t=e==="using-mouse"?"using-keyboard":"using-mouse";for(let n of bt)n.classList.add(e),n.classList.remove(t)}function vr(e){Yo.has(e.key)&&xr("using-keyboard")}function yr(){xr("using-mouse")}function Jo(){ht||(ht=!0,document.addEventListener("keydown",vr,!0),document.addEventListener("pointerdown",yr,!0))}function Xo(){ht&&(ht=!1,document.removeEventListener("keydown",vr,!0),document.removeEventListener("pointerdown",yr,!0))}function ft(e){return e.classList.add("using-mouse"),e.classList.remove("using-keyboard"),bt.add(e),Jo(),()=>{bt.delete(e),e.classList.remove("using-mouse"),e.classList.remove("using-keyboard"),bt.size===0&&Xo()}}var Ht=`/* Lime Bundles \u2014 shared base styles for all bundle widget types */
242
241
 
243
242
  .lb-bundle-widget.lb-bundle-widget,
244
243
  .lb-bundle-widget.lb-bundle-widget * {
@@ -941,7 +940,7 @@ a.lb-bundle-product-name:focus-visible {
941
940
  emit the inline var for the "original" ratio and nothing else. Emitting it
942
941
  unconditionally silently replaced every merchant ratio with the image's own,
943
942
  which looks like the setting being ignored. */
944
- `,sr=`/* Lime Bundles \u2014 Fixed bundle styles */
943
+ `,wr=`/* Lime Bundles \u2014 Fixed bundle styles */
945
944
 
946
945
  .lb-fixed__products {
947
946
  display: flex;
@@ -1034,7 +1033,7 @@ a.lb-bundle-product-name:focus-visible {
1034
1033
  outline-offset: 2px;
1035
1034
  box-shadow: none;
1036
1035
  }
1037
- `,dr=`/* Lime Bundles \u2014 Mix & Match styles */
1036
+ `,_r=`/* Lime Bundles \u2014 Mix & Match styles */
1038
1037
 
1039
1038
  /* === Selected product list ================================================
1040
1039
  The chosen products render as bordered cards. Capped height so long
@@ -1845,7 +1844,7 @@ a.lb-bundle-product-name:focus-visible {
1845
1844
  transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
1846
1845
  }
1847
1846
 
1848
- .lb-mix-match__modal-add:hover {
1847
+ .lb-mix-match__modal-add:hover:not(:disabled) {
1849
1848
  opacity: 0.9;
1850
1849
  }
1851
1850
 
@@ -1960,8 +1959,15 @@ a.lb-bundle-product-name:focus-visible {
1960
1959
  color: color-mix(in srgb, var(--lb-picker-text) 70%, transparent);
1961
1960
  }
1962
1961
 
1963
- /* "Done" reuses the picker Add-button styling so it matches the Add buttons. */
1962
+ /* "Done" reuses the picker Add-button styling so it matches the Add buttons.
1963
+ The flex centring + min-height pin the footer-button silhouette: the wizard
1964
+ Back (bundle-multi-step.css) copies these metrics so the pair stays
1965
+ equal-height whatever border widths the merchant's picker tokens set. */
1964
1966
  .lb-mix-match__modal-done {
1967
+ display: inline-flex;
1968
+ align-items: center;
1969
+ justify-content: center;
1970
+ min-height: 40px;
1965
1971
  padding: 10px 24px;
1966
1972
  transition: opacity 0.25s ease;
1967
1973
  background: var(--lb-picker-add-bg);
@@ -1975,7 +1981,7 @@ a.lb-bundle-product-name:focus-visible {
1975
1981
  cursor: pointer;
1976
1982
  }
1977
1983
 
1978
- .lb-mix-match__modal-done:hover {
1984
+ .lb-mix-match__modal-done:hover:not(:disabled) {
1979
1985
  opacity: 0.9;
1980
1986
  }
1981
1987
 
@@ -1985,6 +1991,16 @@ a.lb-bundle-product-name:focus-visible {
1985
1991
  box-shadow: none;
1986
1992
  }
1987
1993
 
1994
+ /* Disabled Next/Done (wizard step minimum not met) \u2014 same washed-out
1995
+ treatment as a disabled row Add, so an unfinished step reads at a
1996
+ glance. Hover is gated off above; the solid button returns the moment
1997
+ the requirement is met. */
1998
+ .lb-mix-match__modal-done:disabled {
1999
+ background: color-mix(in srgb, var(--lb-picker-add-bg) 35%, var(--lb-picker-bg));
2000
+ color: color-mix(in srgb, var(--lb-picker-add-label) 85%, transparent);
2001
+ cursor: not-allowed;
2002
+ }
2003
+
1988
2004
  /* Hidden utility for search filtering */
1989
2005
  .lb-hidden {
1990
2006
  display: none !important;
@@ -2064,7 +2080,7 @@ a.lb-bundle-product-name:focus-visible {
2064
2080
  transition: none;
2065
2081
  }
2066
2082
  }
2067
- `,cr=`/* Lime Bundles \u2014 Volume / Quantity Breaks styles */
2083
+ `,Cr=`/* Lime Bundles \u2014 Volume / Quantity Breaks styles */
2068
2084
 
2069
2085
  .lb-volume__tiers {
2070
2086
  display: flex;
@@ -2240,7 +2256,14 @@ a.lb-bundle-product-name:focus-visible {
2240
2256
  white-space: nowrap;
2241
2257
  font-variant-numeric: tabular-nums;
2242
2258
  }
2243
- `,ur=`/* Lime Bundles \u2014 BOGO (Buy X Get Y) bundle styles */
2259
+
2260
+ /* Tier the selected variant can't cover \u2014 same greyed treatment as an
2261
+ out-of-stock product row, and not selectable. */
2262
+ .lb-volume__tier--oos {
2263
+ opacity: 0.5;
2264
+ cursor: not-allowed;
2265
+ }
2266
+ `,kr=`/* Lime Bundles \u2014 BOGO (Buy X Get Y) bundle styles */
2244
2267
 
2245
2268
  .lb-bogo__products {
2246
2269
  display: flex;
@@ -2313,7 +2336,7 @@ a.lb-bundle-product-name:focus-visible {
2313
2336
  text-decoration: line-through;
2314
2337
  opacity: 0.6;
2315
2338
  }
2316
- `,pr=`/**
2339
+ `,Tr=`/**
2317
2340
  * Lime Bundles \u2014 Multi-step bundle widget styles (wizard chrome ONLY).
2318
2341
  *
2319
2342
  * The multi-step widget reuses the mix & match classes wholesale \u2014
@@ -2406,14 +2429,23 @@ a.lb-bundle-product-name:focus-visible {
2406
2429
  justify-self: end;
2407
2430
  }
2408
2431
 
2409
- /* Back \u2014 secondary treatment beside the primary Next/Done (which reuse
2410
- .lb-mix-match__modal-done). */
2432
+ /* Back \u2014 secondary (outlined) treatment beside the primary Next/Done
2433
+ (which reuse .lb-mix-match__modal-done). Same silhouette as Next \u2014
2434
+ metrics copied from the modal-done recipe (padding, type, radius,
2435
+ min-height) \u2014 and picker tokens only: the modal is portaled out of the
2436
+ widget, so the widget vars (--lb-text, --lb-border-*) it previously
2437
+ used don't reliably resolve here and break palette isolation. */
2411
2438
  .lb-multi-step__modal-back {
2412
- padding: 10px 16px;
2439
+ display: inline-flex;
2440
+ align-items: center;
2441
+ justify-content: center;
2442
+ min-height: 40px;
2443
+ padding: 10px 24px;
2413
2444
  background: none;
2414
- border: var(--lb-border-width) solid var(--lb-border-color);
2415
- border-radius: var(--lb-radius-sm);
2416
- color: var(--lb-text);
2445
+ border: var(--lb-picker-border-width) solid var(--lb-picker-border-color);
2446
+ border-radius: var(--lb-picker-radius-sm);
2447
+ box-sizing: border-box;
2448
+ color: var(--lb-picker-text);
2417
2449
  font-family: inherit;
2418
2450
  font-size: 14px;
2419
2451
  font-weight: 600;
@@ -2422,14 +2454,14 @@ a.lb-bundle-product-name:focus-visible {
2422
2454
  }
2423
2455
 
2424
2456
  .lb-multi-step__modal-back:hover {
2425
- background: color-mix(in srgb, var(--lb-text) 5%, transparent);
2457
+ background: color-mix(in srgb, var(--lb-picker-text) 5%, transparent);
2426
2458
  }
2427
2459
 
2428
2460
  .lb-multi-step__modal-back:focus-visible {
2429
2461
  outline: 2px solid var(--lb-primary-color);
2430
2462
  outline-offset: 2px;
2431
2463
  }
2432
- `,mr=`/**
2464
+ `,Sr=`/**
2433
2465
  * Lime Bundles \u2014 Custom variant-picker dropdown styling.
2434
2466
  *
2435
2467
  * Reuses existing CSS variables: no new merchant-configurable surface.
@@ -2692,7 +2724,7 @@ a.lb-bundle-product-name:focus-visible {
2692
2724
  [data-modal-overlay] > .lb-dropdown-listbox::-webkit-scrollbar-thumb {
2693
2725
  background: color-mix(in srgb, var(--lb-picker-text) 15%, transparent);
2694
2726
  }
2695
- `,br=`/* Lime Bundles \u2014 web-component loading skeleton (not mirrored to theme assets) */
2727
+ `,Er=`/* Lime Bundles \u2014 web-component loading skeleton (not mirrored to theme assets) */
2696
2728
 
2697
2729
  .lb-bundle-widget--loading {
2698
2730
  display: block;
@@ -2788,10 +2820,10 @@ a.lb-bundle-product-name:focus-visible {
2788
2820
  animation: none;
2789
2821
  }
2790
2822
  }
2791
- `;var Do=e=>`lb_cart_id:${e}`;function Fo(e){if(e)return e.trim()||null;if(typeof document<"u"){let t=document.querySelector('meta[name="shopify:product-handle"]');if(t?.content)return t.content.trim()||null}if(typeof window<"u"){let t=window.location.pathname.match(/\/products\/([^/?#]+)/);if(t?.[1])return decodeURIComponent(t[1])}return null}var Re=class extends HTMLElement{static observedAttributes=["shop-domain","storefront-token","bundle-gid","product-handle","app-url","analytics","locale","country","language","market-id"];buyer=void 0;shadow;bundles=[];abortController=null;impressionCleanups=[];renderCleanups=[];shopCustomCss=null;outOfStockBehavior=ft;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.fetchBundle()}disconnectedCallback(){this.abortController?.abort(),this.teardownImpressions(),this.teardownRenderers()}teardownImpressions(){for(let t of this.impressionCleanups)t();this.impressionCleanups=[]}teardownRenderers(){for(let t of this.renderCleanups)t();this.renderCleanups=[]}attributeChangedCallback(t,n,r){n===r||!this.isConnected||(t==="bundle-gid"||t==="product-handle"||t==="shop-domain"||t==="storefront-token")&&this.shopDomain&&this.storefrontToken&&this.fetchBundle()}get shopDomain(){return this.getAttribute("shop-domain")??""}get storefrontToken(){return this.getAttribute("storefront-token")??""}get bundleGid(){return this.getAttribute("bundle-gid")??""}get productHandleAttr(){return this.getAttribute("product-handle")??""}get appUrl(){return this.getAttribute("app-url")??""}get analyticsEnabled(){return this.getAttribute("analytics")!=="false"}get country(){return this.getAttribute("country")??void 0}get language(){return this.getAttribute("language")??void 0}get marketId(){return this.getAttribute("market-id")??void 0}wrapQueryForContext(t){return jt({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer})?$t(t):t}isMarketHidden(t){return!tn(t,this.marketId)}async fetchBundle(){if(!this.shopDomain||!this.storefrontToken){this.renderError("Missing required attributes: shop-domain, storefront-token");return}this.abortController?.abort();let t=new AbortController;this.abortController=t,this.renderLoading();let n=ht({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer});try{let r,o=!1;if(this.bundleGid)o=!0,r=this.fetchSingleBundle(n,t.signal);else{let d=Fo(this.productHandleAttr);if(!d){this.teardownImpressions(),this.renderError("No bundle-gid or product-handle provided, and the current URL doesn't match /products/<handle>.");return}r=this.fetchProductBundles(n,t.signal,d)}let i=n.query(Kt,void 0,{signal:t.signal}).catch(()=>null);if(await r,t.signal.aborted)return;if(o&&this.bundles.length===0){this.teardownImpressions(),this.renderError("Bundle not found");return}let a=await i,l=a?.shop?.customCss?.value;if(l){sn(this.shopDomain,l);let d=vt(l);d.ok&&(this.shopCustomCss=d.css)}this.outOfStockBehavior=Zt(a?.shop?.outOfStockBehavior?.value),this.renderBundles()}catch(r){if(t.signal.aborted)return;this.bundles=[],this.teardownImpressions(),this.renderError(r instanceof Error?r.message:"Failed to load bundle")}}async fetchSingleBundle(t,n){let r=await t.query(this.wrapQueryForContext(Gt),{id:this.bundleGid},{signal:n});if(!r.metaobject){this.bundles=[];return}let o=gt(r.metaobject.id,r.metaobject.fields);this.bundles=o&&!this.isMarketHidden(o)?[o]:[]}async fetchProductBundles(t,n,r){let o=await t.query(this.wrapQueryForContext(Yt),{handle:r},{signal:n});if(!o.product){this.bundles=[];return}let i=o.product.metafield?.references?.nodes??[],a=[];for(let l of i){let d=gt(l.id,l.fields);d&&!this.isMarketHidden(d)&&a.push(d)}this.bundles=un(a,cn())}handleAddToCart=async(t,n)=>{let r=new CustomEvent("lime-bundle:add-to-cart",{detail:{lines:n},bubbles:!0,composed:!0,cancelable:!0}),o=this.dispatchEvent(r);this.reportAddToCartEvent(t,n),o&&await this.defaultAddToCart(n)};async defaultAddToCart(t){if(typeof window>"u")return;let n=ht({shopDomain:this.shopDomain,accessToken:this.storefrontToken}),r=window.localStorage,o=Do(this.shopDomain),i=r?.getItem(o)??null;try{let a=null;if(i){let d=(await n.query(Xt,{cartId:i,lines:t})).cartLinesAdd;d?.userErrors?.length?r?.removeItem(o):d?.cart&&(a=d.cart.checkoutUrl)}if(!a){let d=(await n.query(Jt,{input:{lines:t}})).cartCreate;d?.cart&&(r?.setItem(o,d.cart.id),a=d.cart.checkoutUrl)}a?window.location.assign(a):this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:"Cart creation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}catch(a){this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:a instanceof Error?a.message:"Cart mutation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}}reportAddToCartEvent(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=n.reduce((i,a)=>i+a.quantity,0),o=n.reduce((i,a)=>{let d=t.products.find(c=>c.variants.nodes.some(u=>u.id===a.merchandiseId))?.variants.nodes.find(c=>c.id===a.merchandiseId),s=d?parseFloat(d.price.amount):0;return i+s*a.quantity},0);on({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType,productId:t.products[0]?.id??"",quantity:r,totalPrice:Math.round(o*100)/100})}renderBundles(){this.teardownImpressions(),this.teardownRenderers(),this.shadow.innerHTML="";let t=document.createElement("style");if(t.textContent=[Pt,sr,dr,pr,cr,ur,mr].join(`
2792
- `),this.shadow.appendChild(t),this.shopCustomCss){let r=document.createElement("style");r.setAttribute("data-lime-bundles","shop-custom-css"),r.textContent=this.shopCustomCss,this.shadow.appendChild(r)}for(let r of this.bundles){let o=document.createElement("div");o.className="lb-bundle-widget",o.setAttribute("role","region"),o.setAttribute("aria-label",r.title),o.setAttribute("data-bundle-type",r.bundleType),o.setAttribute("data-bundle-gid",r.id),en(o,r.widgetConfig),this.renderCleanups.push(ut(o));let i=l=>this.handleAddToCart(r,l),a=l=>this.renderCleanups.push(l);switch(r.bundleType){case"fixed":En(o,r,this.outOfStockBehavior,i,a);break;case"mix_match":Wn(o,r,this.outOfStockBehavior,i,a);break;case"volume":$n(o,r,this.outOfStockBehavior,i);break;case"bogo":Kn(o,r,this.outOfStockBehavior,i,a);break;case"multi_step":or(o,r,this.outOfStockBehavior,i,a);break}this.shadow.appendChild(o),this.setupImpressionFor(r,o)}let n=this.bundles[0];this.dispatchEvent(new CustomEvent("lime-bundle:loaded",{detail:{bundleCount:this.bundles.length,bundleTypes:this.bundles.map(r=>r.bundleType),bundleType:n?.bundleType,title:n?.title},bubbles:!0,composed:!0}))}setupImpressionFor(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=an(n,()=>{rn({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType})});this.impressionCleanups.push(r)}renderLoading(){this.shadow.innerHTML=`
2793
- <style>${Pt}</style>
2794
- <style>${br}</style>
2823
+ `;var Zo=e=>`lb_cart_id:${e}`;function ei(e){if(e)return e.trim()||null;if(typeof document<"u"){let t=document.querySelector('meta[name="shopify:product-handle"]');if(t?.content)return t.content.trim()||null}if(typeof window<"u"){let t=window.location.pathname.match(/\/products\/([^/?#]+)/);if(t?.[1])return decodeURIComponent(t[1])}return null}var He=class extends HTMLElement{static observedAttributes=["shop-domain","storefront-token","bundle-gid","product-handle","app-url","analytics","locale","country","language","market-id"];buyer=void 0;shadow;bundles=[];currentProductHandle=null;abortController=null;impressionCleanups=[];renderCleanups=[];shopCustomCss=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.fetchBundle()}disconnectedCallback(){this.abortController?.abort(),this.teardownImpressions(),this.teardownRenderers()}teardownImpressions(){for(let t of this.impressionCleanups)t();this.impressionCleanups=[]}teardownRenderers(){for(let t of this.renderCleanups)t();this.renderCleanups=[]}attributeChangedCallback(t,n,r){n===r||!this.isConnected||(t==="bundle-gid"||t==="product-handle"||t==="shop-domain"||t==="storefront-token")&&this.shopDomain&&this.storefrontToken&&this.fetchBundle()}get shopDomain(){return this.getAttribute("shop-domain")??""}get storefrontToken(){return this.getAttribute("storefront-token")??""}get bundleGid(){return this.getAttribute("bundle-gid")??""}get productHandleAttr(){return this.getAttribute("product-handle")??""}get appUrl(){return this.getAttribute("app-url")??""}get analyticsEnabled(){return this.getAttribute("analytics")!=="false"}get country(){return this.getAttribute("country")??void 0}get language(){return this.getAttribute("language")??void 0}get marketId(){return this.getAttribute("market-id")??void 0}wrapQueryForContext(t){return Jt({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer})?Xt(t):t}isMarketHidden(t){return!dn(t,this.marketId)}async fetchBundle(){if(!this.shopDomain||!this.storefrontToken){this.renderError("Missing required attributes: shop-domain, storefront-token");return}this.abortController?.abort();let t=new AbortController;this.abortController=t,this.renderLoading();let n=yt({shopDomain:this.shopDomain,accessToken:this.storefrontToken,country:this.country,language:this.language,buyer:this.buyer});try{let r,o=!1;if(this.currentProductHandle=ei(this.productHandleAttr),this.bundleGid)o=!0,r=this.fetchSingleBundle(n,t.signal);else{let d=this.currentProductHandle;if(!d){this.teardownImpressions(),this.renderError("No bundle-gid or product-handle provided, and the current URL doesn't match /products/<handle>.");return}r=this.fetchProductBundles(n,t.signal,d)}let i=n.query(en,void 0,{signal:t.signal}).catch(()=>null);if(await r,t.signal.aborted)return;if(o&&this.bundles.length===0){this.teardownImpressions(),this.renderError("Bundle not found");return}let l=(await i)?.shop?.customCss?.value;if(l){hn(this.shopDomain,l);let d=Ct(l);d.ok&&(this.shopCustomCss=d.css)}this.renderBundles()}catch(r){if(t.signal.aborted)return;this.bundles=[],this.teardownImpressions(),this.renderError(r instanceof Error?r.message:"Failed to load bundle")}}async fetchSingleBundle(t,n){let r=await t.query(this.wrapQueryForContext(Zt),{id:this.bundleGid},{signal:n});if(!r.metaobject){this.bundles=[];return}let o=wt(r.metaobject.id,r.metaobject.fields);this.bundles=o&&!this.isMarketHidden(o)?[o]:[]}async fetchProductBundles(t,n,r){let o=await t.query(this.wrapQueryForContext(tn),{handle:r},{signal:n});if(!o.product){this.bundles=[];return}let i=o.product.metafield?.references?.nodes??[],a=[];for(let l of i){let d=wt(l.id,l.fields);d&&!this.isMarketHidden(d)&&a.push(d)}this.bundles=vn(a,xn())}handleAddToCart=async(t,n)=>{let r=new CustomEvent("lime-bundle:add-to-cart",{detail:{lines:n},bubbles:!0,composed:!0,cancelable:!0}),o=this.dispatchEvent(r);this.reportAddToCartEvent(t,n),o&&await this.defaultAddToCart(n)};async defaultAddToCart(t){if(typeof window>"u")return;let n=yt({shopDomain:this.shopDomain,accessToken:this.storefrontToken}),r=window.localStorage,o=Zo(this.shopDomain),i=r?.getItem(o)??null,a=s=>s.length>0&&s.every(u=>(u.field??[]).includes("cartId")),l=s=>(s??[]).some(u=>u.code==="MERCHANDISE_NOT_ENOUGH_STOCK"),d=s=>{this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:s,code:"CART_ERROR"},bubbles:!0,composed:!0}))};try{let s=null;if(i){let c=(await n.query(rn,{cartId:i,lines:t})).cartLinesAdd;if(c?.userErrors?.length){if(!a(c.userErrors)){d(c.userErrors[0].message);return}r?.removeItem(o)}else if(l(c?.warnings)){d("Some items in this bundle are out of stock.");return}else c?.cart&&(s=c.cart.checkoutUrl)}if(!s){let c=(await n.query(nn,{input:{lines:t}})).cartCreate;if(c?.userErrors?.length){d(c.userErrors[0].message);return}if(l(c?.warnings)){d("Some items in this bundle are out of stock.");return}c?.cart&&(r?.setItem(o,c.cart.id),s=c.cart.checkoutUrl)}s?window.location.assign(s):d("Cart creation failed")}catch(s){this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:s instanceof Error?s.message:"Cart mutation failed",code:"CART_ERROR"},bubbles:!0,composed:!0}))}}reportAddToCartEvent(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=n.reduce((i,a)=>i+a.quantity,0),o=n.reduce((i,a)=>{let d=t.products.find(u=>u.variants.nodes.some(c=>c.id===a.merchandiseId))?.variants.nodes.find(u=>u.id===a.merchandiseId),s=d?parseFloat(d.price.amount):0;return i+s*a.quantity},0);pn({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType,productId:t.products[0]?.id??"",quantity:r,totalPrice:Math.round(o*100)/100})}renderBundles(){this.teardownImpressions(),this.teardownRenderers(),this.shadow.innerHTML="";let t=document.createElement("style");if(t.textContent=[Ht,wr,_r,Tr,Cr,kr,Sr].join(`
2824
+ `),this.shadow.appendChild(t),this.shopCustomCss){let r=document.createElement("style");r.setAttribute("data-lime-bundles","shop-custom-css"),r.textContent=this.shopCustomCss,this.shadow.appendChild(r)}for(let r of this.bundles){let o=document.createElement("div");o.className="lb-bundle-widget",o.setAttribute("role","region"),o.setAttribute("aria-label",r.title),o.setAttribute("data-bundle-type",r.bundleType),o.setAttribute("data-bundle-gid",r.id),r.endsAt&&o.setAttribute("data-ends-at",r.endsAt),on(o,r.widgetConfig),this.renderCleanups.push(ft(o));let i=l=>this.handleAddToCart(r,l),a=l=>this.renderCleanups.push(l);switch(r.bundleType){case"fixed":Rn(o,r,i,a);break;case"mix_match":Zn(o,r,i,a,this.currentProductHandle);break;case"volume":ar(o,r,i);break;case"bogo":sr(o,r,i,a);break;case"multi_step":gr(o,r,i,a);break}this.shadow.appendChild(o),this.setupImpressionFor(r,o)}let n=this.bundles[0];this.dispatchEvent(new CustomEvent("lime-bundle:loaded",{detail:{bundleCount:this.bundles.length,bundleTypes:this.bundles.map(r=>r.bundleType),bundleType:n?.bundleType,title:n?.title},bubbles:!0,composed:!0}))}setupImpressionFor(t,n){if(!this.analyticsEnabled||!this.appUrl)return;let r=mn(n,()=>{un({shopDomain:this.shopDomain,appUrl:this.appUrl},{bundleGid:t.id,bundleType:t.bundleType})});this.impressionCleanups.push(r)}renderLoading(){this.shadow.innerHTML=`
2825
+ <style>${Ht}</style>
2826
+ <style>${Er}</style>
2795
2827
  <div class="lb-bundle-widget lb-bundle-widget--loading" aria-busy="true" aria-label="Loading bundle">
2796
2828
  <div class="lb-skeleton lb-skeleton--title"></div>
2797
2829
  <div class="lb-skeleton--products">
@@ -2825,5 +2857,5 @@ a.lb-bundle-product-name:focus-visible {
2825
2857
  <div class="lb-skeleton lb-skeleton--cta"></div>
2826
2858
  </div>
2827
2859
  </div>
2828
- `}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",Re);return yr(Vo);})();
2860
+ `}renderError(t){this.shadow.innerHTML="",this.dispatchEvent(new CustomEvent("lime-bundle:error",{detail:{message:t,code:"LOAD_ERROR"},bubbles:!0,composed:!0}))}};typeof customElements<"u"&&!customElements.get("lime-bundle")&&customElements.define("lime-bundle",He);return Br(ti);})();
2829
2861
  //# sourceMappingURL=lime-bundle.global.js.map