@best-bundles/bundle-ui 0.0.34 → 0.0.36
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.
- package/dist/components/BundleBuilderDrawer.d.ts.map +1 -1
- package/dist/components/BundleBuilderPanel.d.ts +7 -0
- package/dist/components/BundleBuilderPanel.d.ts.map +1 -0
- package/dist/context/BundleProvider.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1280 -882
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.css +1 -1
- package/dist/liquid/bundle-ui.iife.js +27 -17
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/dist/liquid/iife.d.ts +9 -0
- package/dist/liquid/iife.d.ts.map +1 -1
- package/dist/stories/BundleBuilderPanel.stories.d.ts +6 -0
- package/dist/stories/BundleBuilderPanel.stories.d.ts.map +1 -0
- package/dist/stories/fixtures/productBundle.d.ts +4 -0
- package/dist/stories/fixtures/productBundle.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_jhu8z_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--bb-backdrop-z-index, 2147483647);display:flex;justify-content:flex-end;background:var(--bb-backdrop-bg, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(var(--bb-backdrop-blur, 2px));backdrop-filter:blur(var(--bb-backdrop-blur, 2px));padding:var(--bb-backdrop-padding, 12px);opacity:0;transition:opacity var(--bb-drawer-transition-duration, .22s) ease}._celebrationOverlay_jhu8z_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_jhu8z_23{font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.03em;font-size:18px;line-height:1;padding:12px 16px;border-radius:999px;color:var(--bb-celebration-text, #0b1b44);background:linear-gradient(180deg,var(--bb-celebration-bg-top, #ffffff),var(--bb-celebration-bg-bottom, #bae6fd));border:2px solid var(--bb-celebration-border, rgba(37, 99, 235, .28));box-shadow:0 18px 55px #0006,0 10px 28px #2563eb33,inset 0 1px #ffffffbf;transform-origin:50% 60%;will-change:transform,opacity,filter;animation:_bbCelebrationPop_jhu8z_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_jhu8z_1{0%{opacity:0;transform:translateY(10px) scale(.6);filter:blur(1px) saturate(1.1)}12%{opacity:1;transform:translateY(0) scale(1.12);filter:blur(0px) saturate(1.1)}22%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.98)}}._backdropOpen_jhu8z_74{opacity:1}._backdropClosed_jhu8z_78{opacity:0}._panel_jhu8z_82{width:440px;max-width:100%;height:100%;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border-radius:var(--bb-panel-radius, 16px);box-shadow:0 20px 60px #00000059;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;outline:none;position:relative;top:unset;right:unset;bottom:unset;left:unset}._panelOpen_jhu8z_102{animation:_bbSlideInFromRight_jhu8z_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_jhu8z_106{animation:_bbSlideOutToRight_jhu8z_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_jhu8z_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_jhu8z_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_jhu8z_1{transition:none}._celebrationChip_jhu8z_23,._panelOpen_jhu8z_102,._panelClosed_jhu8z_106{animation:none}}._header_jhu8z_145{display:grid;grid-template-columns:36px 1fr 36px;align-items:center;column-gap:12px;padding:var(--bb-header-padding, 16px 16px 12px 16px);border-bottom:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._headerCenter_jhu8z_154{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_jhu8z_162{font-size:24px;margin:0;line-height:1.2;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._searchIconButton_jhu8z_171{width:36px;height:36px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}._searchIconButton_jhu8z_171:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_jhu8z_171:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_jhu8z_193{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_jhu8z_197{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transform:translateY(-2px);transition:opacity .18s ease,transform .22s ease}._headerSearchOpen_jhu8z_209 ._headerTitleWrap_jhu8z_193{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_jhu8z_209 ._headerSearchWrap_jhu8z_197{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_jhu8z_221{width:min(320px,100%);height:36px;display:flex;align-items:center;gap:8px;background:var(--bb-surface-bg, #ffffff);border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));border-radius:10px;padding:0 8px}._searchInput_jhu8z_233{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_jhu8z_233::-webkit-search-cancel-button,._searchInput_jhu8z_233::-webkit-search-decoration,._searchInput_jhu8z_233::-webkit-search-results-button,._searchInput_jhu8z_233::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_jhu8z_254{border:none;background:transparent;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:6px;border-radius:10px;line-height:1}._searchClearButton_jhu8z_254:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_jhu8z_254:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_jhu8z_276{border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);width:36px;height:36px;border-radius:10px;cursor:pointer;flex:0 0 auto}._closeButton_jhu8z_276:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_jhu8z_276:disabled{opacity:.6;cursor:not-allowed}._closeButton_jhu8z_276:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_jhu8z_193,._headerSearchWrap_jhu8z_197{transition:none}}._body_jhu8z_309{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_jhu8z_314{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_jhu8z_319{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_jhu8z_324{margin-top:4px}._variantList_jhu8z_328{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_jhu8z_336{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_jhu8z_344{opacity:.65}._variantLeft_jhu8z_348{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_jhu8z_355{height:100%;align-self:stretch;border-radius:12px;border:none;background:var(--bb-cta-bg, #91aae5);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:800;padding:0 16px;cursor:pointer;white-space:nowrap}._addToBundleButton_jhu8z_355:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_jhu8z_355:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_jhu8z_355:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_jhu8z_383{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_jhu8z_383{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._variantThumb_jhu8z_400{width:60px;height:60px;border-radius:12px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));flex:0 0 auto}._variantThumbImg_jhu8z_410{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_jhu8z_417{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_jhu8z_427{min-width:0}._variantName_jhu8z_431{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_jhu8z_440{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_jhu8z_448{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_jhu8z_455{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_jhu8z_448{font-size:13px;font-weight:800}._qtyControls_jhu8z_466{display:inline-flex;align-items:center;gap:6px}._qtyButton_jhu8z_472{width:34px;height:34px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);cursor:pointer;line-height:1;font-size:16px}._qtyButton_jhu8z_472:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_jhu8z_472:disabled{opacity:.6;cursor:not-allowed}._qtyButton_jhu8z_472:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_jhu8z_497{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_jhu8z_504{padding:var(--bb-footer-padding, 12px 16px 16px 16px);border-top:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);position:relative}._poweredBy_jhu8z_511{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_jhu8z_511 a{color:inherit;text-decoration:none}._boxSummaryWindow_jhu8z_523{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_jhu8z_523::-webkit-scrollbar{display:none}._boxSummaryRow_jhu8z_540{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_jhu8z_548{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_jhu8z_557{width:100%;aspect-ratio:1 / 1;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;box-sizing:border-box}._boxItemClickable_jhu8z_569{cursor:pointer}._boxItemClickable_jhu8z_569:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_jhu8z_578{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._boxItemPlaceholder_jhu8z_589{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemFilled_jhu8z_595{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_jhu8z_601{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemDiscountText_jhu8z_609{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_jhu8z_617{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_jhu8z_624{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_jhu8z_631{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._ctaButtonGroup_jhu8z_642{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_jhu8z_649{gap:0}._cta_jhu8z_642{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer}._ctaSecondary_jhu8z_665{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}._ctaDualLeft_jhu8z_677{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),background .3s cubic-bezier(.4,0,.2,1),color .3s cubic-bezier(.4,0,.2,1),border-right-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualLeftAnimating_jhu8z_695{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0;background:var(--bb-cta-bg, #2563eb);opacity:.6;color:var(--bb-cta-text, #ffffff)}._ctaDualLeftAnimating_jhu8z_695>span{opacity:0}._ctaDualRight_jhu8z_708{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),border-left-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualRightAnimating_jhu8z_724{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_jhu8z_724>span{opacity:0}._ctaTotals_jhu8z_735{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_jhu8z_743{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:linear-gradient(180deg,#2563eb24,#2563eb0f);border:1px solid rgba(37,99,235,.3);color:#1d4ed8f2;white-space:nowrap}._ctaTotalsWrap_jhu8z_757{overflow:hidden;max-height:0;opacity:0;transform:translateY(4px);margin-bottom:0;transition:max-height .22s ease,opacity .16s ease,transform .22s ease,margin-bottom .22s ease}._ctaTotalsWrapVisible_jhu8z_770{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_jhu8z_777{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_jhu8z_784{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_jhu8z_757{transition:none}}._cta_jhu8z_642:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_jhu8z_642:disabled{opacity:.6;cursor:not-allowed}._cta_jhu8z_642:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_jhu8z_665:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_jhu8z_665:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_jhu8z_665:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_jhu8z_677:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_jhu8z_677:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_jhu8z_677:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_jhu8z_708:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_jhu8z_708:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_jhu8z_708:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_jhu8z_853{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}@media(max-width:767px){._backdrop_jhu8z_1{padding:0;justify-content:stretch}._panel_jhu8z_82{width:100%;height:100%;border-radius:0}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_i1rsh_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--bb-backdrop-z-index, 2147483647);display:flex;justify-content:flex-end;background:var(--bb-backdrop-bg, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(var(--bb-backdrop-blur, 2px));backdrop-filter:blur(var(--bb-backdrop-blur, 2px));padding:var(--bb-backdrop-padding, 12px);opacity:0;transition:opacity var(--bb-drawer-transition-duration, .22s) ease}._celebrationOverlay_i1rsh_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_i1rsh_23{font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.03em;font-size:18px;line-height:1;padding:12px 16px;border-radius:999px;color:var(--bb-celebration-text, #0b1b44);background:linear-gradient(180deg,var(--bb-celebration-bg-top, #ffffff),var(--bb-celebration-bg-bottom, #bae6fd));border:2px solid var(--bb-celebration-border, rgba(37, 99, 235, .28));box-shadow:0 18px 55px #0006,0 10px 28px #2563eb33,inset 0 1px #ffffffbf;transform-origin:50% 60%;will-change:transform,opacity,filter;animation:_bbCelebrationPop_i1rsh_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_i1rsh_1{0%{opacity:0;transform:translateY(10px) scale(.6);filter:blur(1px) saturate(1.1)}12%{opacity:1;transform:translateY(0) scale(1.12);filter:blur(0px) saturate(1.1)}22%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.98)}}._backdropOpen_i1rsh_74{opacity:1}._backdropClosed_i1rsh_78{opacity:0}._panel_i1rsh_82{width:440px;max-width:100%;min-width:0;height:100%;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border-radius:var(--bb-panel-radius, 16px);box-shadow:0 20px 60px #00000059;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;outline:none;position:relative;top:unset;right:unset;bottom:unset;left:unset}._panelOpen_i1rsh_103{animation:_bbSlideInFromRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_i1rsh_107{animation:_bbSlideOutToRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_i1rsh_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_i1rsh_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_i1rsh_1{transition:none}._celebrationChip_i1rsh_23,._panelOpen_i1rsh_103,._panelClosed_i1rsh_107{animation:none}}._header_i1rsh_146{display:grid;grid-template-columns:36px 1fr 36px;align-items:center;column-gap:12px;padding:var(--bb-header-padding, 16px 16px 12px 16px);border-bottom:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._headerCenter_i1rsh_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_i1rsh_163{font-size:24px;margin:0;line-height:1.2;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._searchIconButton_i1rsh_172{width:36px;height:36px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}._searchIconButton_i1rsh_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_i1rsh_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_i1rsh_194{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_i1rsh_198{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transform:translateY(-2px);transition:opacity .18s ease,transform .22s ease}._headerSearchOpen_i1rsh_210 ._headerTitleWrap_i1rsh_194{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_i1rsh_210 ._headerSearchWrap_i1rsh_198{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_i1rsh_222{width:min(320px,100%);height:36px;display:flex;align-items:center;gap:8px;background:var(--bb-surface-bg, #ffffff);border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));border-radius:10px;padding:0 8px}._searchInput_i1rsh_234{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_i1rsh_234::-webkit-search-cancel-button,._searchInput_i1rsh_234::-webkit-search-decoration,._searchInput_i1rsh_234::-webkit-search-results-button,._searchInput_i1rsh_234::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_i1rsh_255{border:none;background:transparent;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:6px;border-radius:10px;line-height:1}._searchClearButton_i1rsh_255:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_i1rsh_255:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_i1rsh_277{border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);width:36px;height:36px;border-radius:10px;cursor:pointer;flex:0 0 auto}._closeButton_i1rsh_277:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_i1rsh_277:disabled{opacity:.6;cursor:not-allowed}._closeButton_i1rsh_277:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_i1rsh_194,._headerSearchWrap_i1rsh_198{transition:none}}._body_i1rsh_310{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_i1rsh_315{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_i1rsh_320{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_i1rsh_325{margin-top:4px}._variantList_i1rsh_329{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_i1rsh_337{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_i1rsh_345{opacity:.65}._variantLeft_i1rsh_349{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_i1rsh_356{height:100%;align-self:stretch;border-radius:12px;border:none;background:var(--bb-cta-bg, #91aae5);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:800;padding:0 16px;cursor:pointer;white-space:nowrap}._addToBundleButton_i1rsh_356:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_i1rsh_356:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_i1rsh_356:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_i1rsh_384{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_i1rsh_384{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._variantThumb_i1rsh_401{width:60px;height:60px;border-radius:12px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));flex:0 0 auto}._variantThumbImg_i1rsh_411{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_i1rsh_418{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_i1rsh_428{min-width:0}._variantName_i1rsh_432{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_i1rsh_441{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_i1rsh_449{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_i1rsh_456{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_i1rsh_449{font-size:13px;font-weight:800}._qtyControls_i1rsh_467{display:inline-flex;align-items:center;gap:6px}._qtyButton_i1rsh_473{width:34px;height:34px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);cursor:pointer;line-height:1;font-size:16px}._qtyButton_i1rsh_473:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_i1rsh_473:disabled{opacity:.6;cursor:not-allowed}._qtyButton_i1rsh_473:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_i1rsh_498{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_i1rsh_505{padding:var(--bb-footer-padding, 12px 16px 16px 16px);border-top:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);position:relative;min-width:0}._poweredBy_i1rsh_513{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_i1rsh_513 a{color:inherit;text-decoration:none}._boxSummaryWindow_i1rsh_525{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;min-width:0;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_i1rsh_525::-webkit-scrollbar{display:none}._boxSummaryRow_i1rsh_543{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_i1rsh_551{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_i1rsh_560{width:100%;aspect-ratio:1 / 1;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;box-sizing:border-box}._boxItemClickable_i1rsh_572{cursor:pointer}._boxItemClickable_i1rsh_572:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_i1rsh_581{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._boxItemPlaceholder_i1rsh_592{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemFilled_i1rsh_598{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_i1rsh_604{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemDiscountText_i1rsh_612{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_i1rsh_620{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_i1rsh_627{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_i1rsh_634{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._ctaButtonGroup_i1rsh_645{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_i1rsh_652{gap:0}._cta_i1rsh_645{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer}._ctaSecondary_i1rsh_668{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}._ctaDualLeft_i1rsh_680{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),background .3s cubic-bezier(.4,0,.2,1),color .3s cubic-bezier(.4,0,.2,1),border-right-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualLeftAnimating_i1rsh_698{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0;background:var(--bb-cta-bg, #2563eb);opacity:.6;color:var(--bb-cta-text, #ffffff)}._ctaDualLeftAnimating_i1rsh_698>span{opacity:0}._ctaDualRight_i1rsh_711{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),border-left-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualRightAnimating_i1rsh_727{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_i1rsh_727>span{opacity:0}._ctaTotals_i1rsh_738{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_i1rsh_746{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));color:var(--bb-tier-text, rgba(29, 78, 216, .95));white-space:nowrap}._ctaTotalsWrap_i1rsh_760{overflow:hidden;max-height:0;opacity:0;transform:translateY(4px);margin-bottom:0;transition:max-height .22s ease,opacity .16s ease,transform .22s ease,margin-bottom .22s ease}._ctaTotalsWrapVisible_i1rsh_773{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_i1rsh_780{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_i1rsh_787{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_i1rsh_760{transition:none}}._cta_i1rsh_645:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_i1rsh_645:disabled{opacity:.6;cursor:not-allowed}._cta_i1rsh_645:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_i1rsh_668:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_i1rsh_668:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_i1rsh_668:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_i1rsh_680:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_i1rsh_680:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_i1rsh_680:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_i1rsh_711:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_i1rsh_711:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_i1rsh_711:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_i1rsh_856{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}@media(max-width:767px){._backdrop_i1rsh_1{padding:0;justify-content:stretch}._panel_i1rsh_82{width:100%;height:100%;border-radius:0}}._panel_1n9m6_2 button,._panel_1n9m6_2 input,._panel_1n9m6_2 [role=button]{box-sizing:border-box;margin:0}._panel_1n9m6_2{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));border-radius:var(--bb-panel-radius, 16px);padding:20px;display:grid;gap:14px}._header_1n9m6_20{text-align:start}._title_1n9m6_24{font-size:22px;margin:0;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_1n9m6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_1n9m6_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_1n9m6_43{font-size:13px;color:#b45309;font-weight:600}._section_1n9m6_49{display:grid;gap:6px}._sectionTitle_1n9m6_54{text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._rules_1n9m6_63{display:flex;justify-content:center;gap:6px}._rulesList_1n9m6_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_1n9m6_80{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 10px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .25));background:var(--bb-tier-bg, rgba(37, 99, 235, .06));color:var(--bb-tier-text, #1f2937)}._ruleMin_1n9m6_92{font-weight:600;font-size:13px}._ruleDiscount_1n9m6_97{font-weight:700;font-size:13px}._ruleLabel_1n9m6_102{font-size:12px;opacity:.7}._rulesVisual_1n9m6_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_1n9m6_114,._rulesLinesRow_1n9m6_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_1n9m6_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_1n9m6_128:empty{display:flex!important}._rulesLineLabel_1n9m6_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_1n9m6_145{height:1em}._rulesLine_1n9m6_121{display:block;width:100%;height:4px;border-radius:999px;background-color:var(--bb-tier-background, rgba(148, 163, 184, .22));transition:background-color .2s ease}._rulesLine_1n9m6_121:empty{display:block!important}._rulesLineEmpty_1n9m6_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_1n9m6_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_1n9m6_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_1n9m6_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1n9m6_186{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start;padding:8px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));background:#fff;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}._variantRowInteractive_1n9m6_198{cursor:pointer}._variantRowSelected_1n9m6_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_1n9m6_207{opacity:.65}._variantMedia_1n9m6_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_1n9m6_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_1n9m6_227{display:flex;flex-direction:column;gap:4px}._variantTitle_1n9m6_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_1n9m6_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_1n9m6_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_1n9m6_255{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:10px;text-transform:uppercase;letter-spacing:.08em}._variantMeta_1n9m6_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_1n9m6_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_1n9m6_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_1n9m6_286{display:grid;align-items:end;justify-items:end}._qtyActions_1n9m6_292{display:inline-flex;align-items:center;gap:6px}._variantUnavailable_1n9m6_298{display:none}._qtyControls_1n9m6_302{display:inline-flex;align-items:center;gap:6px;padding:4px;border-radius:999px;border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .12));background:#0f172a0a}._qtyButton_1n9m6_312{width:30px;height:30px;padding:0;border-radius:999px;border:0;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-size:16px;cursor:pointer;display:grid;place-items:center}._qtyButton_1n9m6_312:disabled{cursor:not-allowed;opacity:.4}._qtyButton_1n9m6_312:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1n9m6_336{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_1n9m6_343{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._qtyChip_1n9m6_351{min-width:44px;height:30px;padding:0 2px;border-radius:var(--bb-border-radius, 12px);background:#0f172a14;color:#0f172a;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:3px}._qtyChipInteractive_1n9m6_366{cursor:pointer}._qtyChipValue_1n9m6_370{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_1n9m6_376{margin-bottom:-3px;font-weight:500}._qtyChipClear_1n9m6_381{width:22px;height:22px;border-radius:999px;border:1px solid rgba(15,23,42,.12);background:#fff;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0;transition:background .16s ease,color .16s ease}._qtyChip_1n9m6_351:hover ._qtyChipClear_1n9m6_381{background:#0f172a;color:#fff}._qtyTrash_1n9m6_400{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_1n9m6_412{display:grid;padding-top:6px}._boxSummaryWindow_1n9m6_417{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_1n9m6_417::-webkit-scrollbar{display:none}._boxSummaryRow_1n9m6_431{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1n9m6_439{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_1n9m6_448{width:100%;border-radius:var(--bb-border-radius, 12px);position:relative;display:block;-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden}._boxItem_1n9m6_448:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_1n9m6_465{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_1n9m6_471{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemThreshold_1n9m6_477{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemClickable_1n9m6_485{cursor:pointer}._boxItemClickable_1n9m6_485:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_1n9m6_494{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;display:block}._boxItemFallback_1n9m6_505{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._boxItemPlus_1n9m6_518{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemDiscountText_1n9m6_530{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxThresholdLabel_1n9m6_543{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._totalsReveal_1n9m6_554{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_1n9m6_562{max-height:80px;opacity:1}._ctaTotalsWrap_1n9m6_567{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_1n9m6_572{opacity:1}._ctaTotals_1n9m6_567{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_1n9m6_587{padding:4px 8px;border-radius:999px;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));color:var(--bb-tier-text, rgba(30, 64, 175, .9));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));font-size:11px;text-transform:uppercase;letter-spacing:.08em}._ctaTotalsStrike_1n9m6_598{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_1n9m6_604{font-weight:700;color:#0f172a}._cta_1n9m6_567{border:0;border-radius:var(--bb-border-radius, 12px);padding:14px 18px;min-height:44px;font-weight:700;font-size:14px;background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff);cursor:pointer;letter-spacing:.02em;transition:transform .14s ease,box-shadow .14s ease,background .14s ease;box-shadow:0 10px 24px #0f172a40}._cta_1n9m6_567:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_1n9m6_567:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_1n9m6_636{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_1n9m6_642,._ctaDualRight_1n9m6_643{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_1n9m6_642{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_1n9m6_643{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1n9m6_642:disabled,._ctaDualRight_1n9m6_643:disabled{cursor:not-allowed;opacity:.6}._poweredBy_1n9m6_670{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_1n9m6_670 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_1n9m6_2{padding:16px}._variantRow_1n9m6_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_1n9m6_302{justify-self:start}._variantDetailsRow_1n9m6_239{grid-template-columns:1fr}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { jsx as s, jsxs as S, Fragment as Xe } from "react/jsx-runtime";
|
|
3
|
+
import Ve, { useState as j, useRef as J, useEffect as V, useCallback as Te, useMemo as k, createContext as St, useContext as Bt, forwardRef as wt, createElement as Ze } from "react";
|
|
4
|
+
const $e = {
|
|
5
5
|
bundleId: "_bundle_id",
|
|
6
6
|
bundleConfig: "_bundle_config",
|
|
7
7
|
bundleSource: "_bundle_source",
|
|
8
8
|
bundleTitle: "_bundle_title"
|
|
9
9
|
};
|
|
10
|
-
async function
|
|
10
|
+
async function Tt(o) {
|
|
11
11
|
const e = new URL("/api/public/bundle-config", o.apiBaseUrl);
|
|
12
12
|
e.searchParams.set("shop", o.shop), o.configHandle && e.searchParams.set("handle", o.configHandle);
|
|
13
|
-
const
|
|
13
|
+
const r = await (await fetch(e, {
|
|
14
14
|
method: "GET",
|
|
15
15
|
signal: o.signal,
|
|
16
16
|
headers: { "Content-Type": "application/json" }
|
|
17
17
|
})).json().catch(() => null);
|
|
18
|
-
return !
|
|
18
|
+
return !r || typeof r != "object" ? { ok: !1, error: "Invalid response." } : r;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
20
|
+
const dt = "bb_anonymous_user_id";
|
|
21
|
+
function Le() {
|
|
22
22
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
23
23
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
24
24
|
try {
|
|
25
|
-
const o = localStorage.getItem(
|
|
25
|
+
const o = localStorage.getItem(dt);
|
|
26
26
|
if (o && typeof o == "string" && o.length > 0)
|
|
27
27
|
return o;
|
|
28
28
|
let e;
|
|
@@ -35,17 +35,17 @@ function Te() {
|
|
|
35
35
|
} catch {
|
|
36
36
|
e = `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
37
37
|
}
|
|
38
|
-
return localStorage.setItem(
|
|
38
|
+
return localStorage.setItem(dt, e), e;
|
|
39
39
|
} catch {
|
|
40
40
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
async function
|
|
43
|
+
async function Oe(o, e, t) {
|
|
44
44
|
if (!(typeof window > "u"))
|
|
45
45
|
try {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
46
|
+
const r = new URL(o, window.location.origin);
|
|
47
|
+
r.searchParams.set("shop", e);
|
|
48
|
+
const i = await fetch(r, {
|
|
49
49
|
method: "POST",
|
|
50
50
|
headers: {
|
|
51
51
|
"Content-Type": "application/json"
|
|
@@ -54,25 +54,25 @@ async function Ce(o, e, t) {
|
|
|
54
54
|
// Don't wait for response - fire and forget
|
|
55
55
|
keepalive: !0
|
|
56
56
|
});
|
|
57
|
-
|
|
58
|
-
`[Bundle Analytics] Event tracking failed with status ${
|
|
59
|
-
await
|
|
57
|
+
i.ok || console.warn(
|
|
58
|
+
`[Bundle Analytics] Event tracking failed with status ${i.status}:`,
|
|
59
|
+
await i.text().catch(() => "Unable to read response")
|
|
60
60
|
);
|
|
61
|
-
} catch (
|
|
62
|
-
console.warn("[Bundle Analytics] Failed to track event:",
|
|
61
|
+
} catch (r) {
|
|
62
|
+
console.warn("[Bundle Analytics] Failed to track event:", r);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const gt = St(null), qe = "#best-bundles";
|
|
66
|
+
function Rt(o) {
|
|
67
67
|
const e = String(o ?? "").trim().toLowerCase();
|
|
68
|
-
if (!e.startsWith(
|
|
69
|
-
if (e ===
|
|
70
|
-
const t = `${
|
|
68
|
+
if (!e.startsWith(qe)) return null;
|
|
69
|
+
if (e === qe) return "default";
|
|
70
|
+
const t = `${qe}:`;
|
|
71
71
|
if (!e.startsWith(t)) return null;
|
|
72
|
-
const
|
|
73
|
-
return
|
|
72
|
+
const r = e.slice(t.length).trim();
|
|
73
|
+
return r && r.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const kt = {
|
|
76
76
|
primaryColor: "--bb-cta-bg",
|
|
77
77
|
primaryHoverColor: "--bb-cta-bg-hover",
|
|
78
78
|
primaryTextColor: "--bb-cta-text",
|
|
@@ -94,43 +94,43 @@ const Nt = {
|
|
|
94
94
|
celebrationBorderColor: "--bb-celebration-border",
|
|
95
95
|
fontFamilyBody: "--bb-font-family-body",
|
|
96
96
|
fontFamilyTitle: "--bb-font-family-title"
|
|
97
|
-
},
|
|
98
|
-
function
|
|
97
|
+
}, He = "bb-google-fonts";
|
|
98
|
+
function ht(o) {
|
|
99
99
|
const e = (o ?? "").trim().replace(/^["']|["']$/g, "");
|
|
100
100
|
return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Pt(o) {
|
|
103
103
|
var c;
|
|
104
104
|
if (typeof document > "u" || !document.head) return;
|
|
105
105
|
if (!o) {
|
|
106
|
-
(c = document.getElementById(
|
|
106
|
+
(c = document.getElementById(He)) == null || c.remove();
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""),
|
|
110
|
-
e &&
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
|
|
109
|
+
const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), r = [];
|
|
110
|
+
e && r.push("family=" + ht(e)), t && t !== e && r.push("family=" + ht(t));
|
|
111
|
+
const i = document.getElementById(He);
|
|
112
|
+
if (r.length === 0) {
|
|
113
|
+
i == null || i.remove();
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
const n = `https://fonts.googleapis.com/css2?${
|
|
117
|
-
if (
|
|
118
|
-
|
|
116
|
+
const n = `https://fonts.googleapis.com/css2?${r.join("&")}&display=swap`;
|
|
117
|
+
if (i) {
|
|
118
|
+
i.getAttribute("href") !== n && i.setAttribute("href", n);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const d = document.createElement("link");
|
|
122
|
+
d.id = He, d.rel = "stylesheet", d.href = n, document.head.appendChild(d);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function mt(o) {
|
|
125
125
|
if (!o) return;
|
|
126
|
-
|
|
126
|
+
Pt(o);
|
|
127
127
|
const e = document.documentElement;
|
|
128
|
-
Object.entries(
|
|
129
|
-
let
|
|
130
|
-
|
|
128
|
+
Object.entries(kt).forEach(([t, r]) => {
|
|
129
|
+
let i = o[t];
|
|
130
|
+
i && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(i) && !/^["']/.test(i.trim()) && (i = `"${i.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(r, i));
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function ft(o) {
|
|
134
134
|
if (typeof window > "u") return o;
|
|
135
135
|
const e = window.__BUNDLE_PREVIEW_STYLES__;
|
|
136
136
|
return e && typeof e == "object" ? e : o;
|
|
@@ -143,547 +143,556 @@ function Ot() {
|
|
|
143
143
|
}
|
|
144
144
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function pt(o) {
|
|
147
147
|
return Number.isFinite(o) ? Math.max(0, Math.floor(o)) : 0;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Fr(o) {
|
|
150
150
|
const {
|
|
151
151
|
apiBaseUrl: e,
|
|
152
152
|
shop: t,
|
|
153
|
-
cartAdapter:
|
|
154
|
-
configHandle:
|
|
153
|
+
cartAdapter: r,
|
|
154
|
+
configHandle: i = "default",
|
|
155
155
|
initialData: n,
|
|
156
|
-
configFetcher:
|
|
156
|
+
configFetcher: d,
|
|
157
157
|
analyticsEndpoint: c,
|
|
158
|
-
allowDrawerWhenInactive:
|
|
159
|
-
children:
|
|
160
|
-
} = o, x = c ?? `${e}/api/public/bundle-analytics`, [
|
|
158
|
+
allowDrawerWhenInactive: I = !1,
|
|
159
|
+
children: G
|
|
160
|
+
} = o, x = c ?? `${e}/api/public/bundle-analytics`, [A, P] = j(!1), [z, H] = j(!n), [te, ne] = j(!1), [L, Q] = j(null), [ee, ue] = j((n == null ? void 0 : n.currencyCode) ?? null), [w, D] = j((n == null ? void 0 : n.config) ?? null), [W, Y] = j(
|
|
161
161
|
(n == null ? void 0 : n.eligibleVariants) ?? []
|
|
162
|
-
), [
|
|
162
|
+
), [de, Ce] = j(
|
|
163
163
|
() => ({ selections: {}, order: [] })
|
|
164
|
-
),
|
|
165
|
-
|
|
166
|
-
var
|
|
164
|
+
), Ne = J(null);
|
|
165
|
+
V(() => {
|
|
166
|
+
var g;
|
|
167
167
|
if (n) return;
|
|
168
|
-
(
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
if (!
|
|
174
|
-
|
|
168
|
+
(g = Ne.current) == null || g.abort();
|
|
169
|
+
const a = new AbortController();
|
|
170
|
+
Ne.current = a;
|
|
171
|
+
const _ = d ?? Tt;
|
|
172
|
+
return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle: i, signal: a.signal }).then((b) => {
|
|
173
|
+
if (!b.ok) {
|
|
174
|
+
Q(b.error || "Failed to load bundle config."), D(null), Y([]), ue(null);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
Y(
|
|
177
|
+
ue(b.currencyCode ?? null);
|
|
178
|
+
const y = typeof window < "u" ? window : null, R = y == null ? void 0 : y.__BUNDLE_PREVIEW_CONFIG__;
|
|
179
|
+
if (R) {
|
|
180
|
+
D(R);
|
|
181
|
+
const U = y.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
|
|
182
|
+
if (U !== void 0)
|
|
183
|
+
Y(U);
|
|
184
184
|
else {
|
|
185
|
-
const
|
|
185
|
+
const B = new Set(R.eligibleVariantIds ?? []);
|
|
186
186
|
Y(
|
|
187
|
-
|
|
187
|
+
B.size === 0 ? b.eligibleVariants ?? [] : (b.eligibleVariants ?? []).filter((E) => B.has(E.id))
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
H(y.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0);
|
|
191
191
|
} else
|
|
192
|
-
|
|
193
|
-
}).catch((
|
|
194
|
-
const
|
|
195
|
-
|
|
192
|
+
D(b.config), Y(b.eligibleVariants ?? []), H(!1);
|
|
193
|
+
}).catch((b) => {
|
|
194
|
+
const y = b instanceof Error ? b.message : "Failed to load bundle config.";
|
|
195
|
+
Q(y), D(null), Y([]), ue(null);
|
|
196
196
|
}).finally(() => {
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
}), () =>
|
|
200
|
-
}, [e, t,
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
}, [
|
|
197
|
+
const b = typeof window < "u" ? window : null;
|
|
198
|
+
b != null && b.__BUNDLE_PREVIEW_CONFIG__ || H(!1);
|
|
199
|
+
}), () => a.abort();
|
|
200
|
+
}, [e, t, i, n, d]), V(() => {
|
|
201
|
+
const a = ft(w == null ? void 0 : w.styleSettings);
|
|
202
|
+
a && mt(a);
|
|
203
|
+
}, [w == null ? void 0 : w.styleSettings]), V(() => {
|
|
204
204
|
if (typeof window > "u") return;
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
|
|
205
|
+
const a = () => {
|
|
206
|
+
const _ = ft(void 0);
|
|
207
|
+
_ && mt(_);
|
|
208
208
|
};
|
|
209
|
-
return window.addEventListener("bundle-preview-styles-updated",
|
|
210
|
-
}, []),
|
|
209
|
+
return window.addEventListener("bundle-preview-styles-updated", a), () => window.removeEventListener("bundle-preview-styles-updated", a);
|
|
210
|
+
}, []), V(() => {
|
|
211
211
|
if (typeof window > "u") return;
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
if (!
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
return
|
|
212
|
+
const a = window, _ = () => {
|
|
213
|
+
const g = a.__BUNDLE_PREVIEW_CONFIG__;
|
|
214
|
+
if (!g) return;
|
|
215
|
+
const b = a.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
|
|
216
|
+
H(b), D(g);
|
|
217
|
+
const y = a.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
|
|
218
|
+
y ? Y(y) : b || Y((R) => {
|
|
219
|
+
const U = new Set(g.eligibleVariantIds ?? []);
|
|
220
|
+
return U.size === 0 || R.length === 0 ? R : R.filter((B) => U.has(B.id));
|
|
221
221
|
});
|
|
222
222
|
};
|
|
223
|
-
return
|
|
223
|
+
return a.__BUNDLE_PREVIEW_CONFIG__ && _(), window.addEventListener("bundle-preview-config-updated", _), () => window.removeEventListener("bundle-preview-config-updated", _);
|
|
224
224
|
}, []);
|
|
225
|
-
const
|
|
226
|
-
if (!(!
|
|
225
|
+
const ie = Te(() => {
|
|
226
|
+
if (!(!I && w != null && !w.isActive) && (P(!0), x))
|
|
227
227
|
try {
|
|
228
|
-
const
|
|
229
|
-
|
|
228
|
+
const a = Le();
|
|
229
|
+
Oe(x, t, {
|
|
230
230
|
eventType: "DRAWER_OPENED",
|
|
231
231
|
shop: t,
|
|
232
|
-
anonymousUserId:
|
|
232
|
+
anonymousUserId: a,
|
|
233
233
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
234
234
|
mixpanelEvent: "bundle_opened"
|
|
235
|
-
}).catch((
|
|
236
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
235
|
+
}).catch((_) => {
|
|
236
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", _);
|
|
237
237
|
});
|
|
238
|
-
} catch (
|
|
239
|
-
console.warn("[Bundle Analytics] Error in open() callback:",
|
|
238
|
+
} catch (a) {
|
|
239
|
+
console.warn("[Bundle Analytics] Error in open() callback:", a);
|
|
240
240
|
}
|
|
241
|
-
}, [x, t,
|
|
241
|
+
}, [x, t, w, I]), oe = Te(() => {
|
|
242
242
|
if (x)
|
|
243
243
|
try {
|
|
244
|
-
const
|
|
245
|
-
|
|
244
|
+
const a = Le();
|
|
245
|
+
Oe(x, t, {
|
|
246
246
|
eventType: "DRAWER_CLOSED",
|
|
247
247
|
shop: t,
|
|
248
|
-
anonymousUserId:
|
|
248
|
+
anonymousUserId: a,
|
|
249
249
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
250
250
|
mixpanelEvent: "bundle_closed"
|
|
251
|
-
}).catch((
|
|
252
|
-
console.warn("[Bundle Analytics] Failed to track drawer closed:",
|
|
251
|
+
}).catch((_) => {
|
|
252
|
+
console.warn("[Bundle Analytics] Failed to track drawer closed:", _);
|
|
253
253
|
});
|
|
254
|
-
} catch (
|
|
255
|
-
console.warn("[Bundle Analytics] Error in close() callback:",
|
|
254
|
+
} catch (a) {
|
|
255
|
+
console.warn("[Bundle Analytics] Error in close() callback:", a);
|
|
256
256
|
}
|
|
257
|
-
|
|
257
|
+
P(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(qe) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
258
258
|
}, [x, t]);
|
|
259
|
-
|
|
259
|
+
V(() => {
|
|
260
260
|
if (typeof window > "u") return;
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
|
|
261
|
+
const a = () => {
|
|
262
|
+
const _ = Rt(window.location.hash);
|
|
263
|
+
_ && (_ === "default" || _ === i) && ie();
|
|
264
264
|
};
|
|
265
|
-
return
|
|
266
|
-
}, [
|
|
267
|
-
const
|
|
268
|
-
!
|
|
269
|
-
if (
|
|
270
|
-
|
|
265
|
+
return a(), window.addEventListener("hashchange", a), () => window.removeEventListener("hashchange", a);
|
|
266
|
+
}, [ie, i]);
|
|
267
|
+
const we = Te(() => {
|
|
268
|
+
!I && !A && w != null && !w.isActive || P((a) => {
|
|
269
|
+
if (a)
|
|
270
|
+
oe();
|
|
271
271
|
else if (x)
|
|
272
272
|
try {
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
const _ = Le();
|
|
274
|
+
Oe(x, t, {
|
|
275
275
|
eventType: "DRAWER_OPENED",
|
|
276
276
|
shop: t,
|
|
277
|
-
anonymousUserId:
|
|
277
|
+
anonymousUserId: _,
|
|
278
278
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
279
279
|
mixpanelEvent: "bundle_opened"
|
|
280
|
-
}).catch((
|
|
281
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
280
|
+
}).catch((g) => {
|
|
281
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", g);
|
|
282
282
|
});
|
|
283
|
-
} catch (
|
|
284
|
-
console.warn("[Bundle Analytics] Error in toggle() callback:",
|
|
283
|
+
} catch (_) {
|
|
284
|
+
console.warn("[Bundle Analytics] Error in toggle() callback:", _);
|
|
285
285
|
}
|
|
286
|
-
return !
|
|
286
|
+
return !a;
|
|
287
287
|
});
|
|
288
|
-
}, [x, t,
|
|
289
|
-
|
|
290
|
-
!
|
|
291
|
-
}, [
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
return Math.max(2, Math.min(100,
|
|
295
|
-
}, [
|
|
296
|
-
|
|
297
|
-
), [
|
|
298
|
-
const
|
|
299
|
-
return
|
|
300
|
-
}, [
|
|
301
|
-
if (!
|
|
288
|
+
}, [x, t, oe, w, A, I]);
|
|
289
|
+
V(() => {
|
|
290
|
+
!I && (w == null ? void 0 : w.isActive) === !1 && A && oe();
|
|
291
|
+
}, [I, w == null ? void 0 : w.isActive, A, oe]);
|
|
292
|
+
const ge = k(() => {
|
|
293
|
+
const a = Number((w == null ? void 0 : w.maxBundleSize) ?? NaN), _ = Number.isFinite(a) ? Math.floor(a) : 100;
|
|
294
|
+
return Math.max(2, Math.min(100, _));
|
|
295
|
+
}, [w == null ? void 0 : w.maxBundleSize]), X = k(() => new Set(
|
|
296
|
+
W.filter((a) => a.availableForSale !== !1).map((a) => a.id)
|
|
297
|
+
), [W]), se = k(() => {
|
|
298
|
+
const a = (w == null ? void 0 : w.rules) ?? [], _ = a.length ? Math.min(...a.map((R) => R.minBundleSize)) : 2, g = Number.isFinite(_) && _ > 0 ? _ : 2, b = Number((w == null ? void 0 : w.minBundleSize) ?? NaN), y = Number.isFinite(b) && Number.isInteger(b) ? Math.max(2, Math.min(100, b)) : null;
|
|
299
|
+
return y == null ? g : Math.min(g, y);
|
|
300
|
+
}, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), ke = Te((a, _) => {
|
|
301
|
+
if (!X.has(a) && !z)
|
|
302
302
|
return;
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
const
|
|
303
|
+
const g = pt(_);
|
|
304
|
+
Ce((b) => {
|
|
305
|
+
const y = b.selections[a] ?? 0, R = g - y, U = Object.values(b.selections).reduce((re, O) => re + (O || 0), 0), B = R > 0 ? Math.min(R, Math.max(0, ge - U)) : R, E = y + B;
|
|
306
306
|
let K;
|
|
307
|
-
if (
|
|
308
|
-
const { [
|
|
309
|
-
K =
|
|
310
|
-
} else
|
|
311
|
-
let
|
|
312
|
-
if (
|
|
313
|
-
|
|
314
|
-
else if (
|
|
315
|
-
let
|
|
316
|
-
const
|
|
317
|
-
for (let
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
320
|
-
|
|
307
|
+
if (E <= 0) {
|
|
308
|
+
const { [a]: re, ...O } = b.selections;
|
|
309
|
+
K = O;
|
|
310
|
+
} else y === E ? K = b.selections : K = { ...b.selections, [a]: E };
|
|
311
|
+
let _e = b.order;
|
|
312
|
+
if (B > 0)
|
|
313
|
+
_e = [...b.order, ...Array.from({ length: B }, () => a)];
|
|
314
|
+
else if (B < 0) {
|
|
315
|
+
let re = -B;
|
|
316
|
+
const O = [];
|
|
317
|
+
for (let q = b.order.length - 1; q >= 0; q--) {
|
|
318
|
+
const T = b.order[q];
|
|
319
|
+
if (T === a && re > 0) {
|
|
320
|
+
re--;
|
|
321
321
|
continue;
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
O.push(T);
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
O.reverse(), _e = O;
|
|
326
326
|
}
|
|
327
|
-
if (K ===
|
|
328
|
-
const
|
|
327
|
+
if (K === b.selections && _e === b.order) return b;
|
|
328
|
+
const be = U, Se = Object.values(K).reduce((re, O) => re + (O || 0), 0);
|
|
329
329
|
if (x)
|
|
330
330
|
try {
|
|
331
|
-
const
|
|
331
|
+
const re = Le(), O = {
|
|
332
332
|
eventType: "VARIANT_SELECTION_CHANGED",
|
|
333
333
|
shop: t,
|
|
334
|
-
anonymousUserId:
|
|
335
|
-
before: { ...
|
|
334
|
+
anonymousUserId: re,
|
|
335
|
+
before: { ...b.selections },
|
|
336
336
|
after: { ...K },
|
|
337
337
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
...
|
|
339
|
+
Oe(x, t, O), be === 0 && Se >= 1 && Oe(x, t, {
|
|
340
|
+
...O,
|
|
341
341
|
mixpanelEvent: "bundle_started"
|
|
342
|
-
}),
|
|
343
|
-
...
|
|
342
|
+
}), be < se && Se >= se && Oe(x, t, {
|
|
343
|
+
...O,
|
|
344
344
|
mixpanelEvent: "bundle_completed"
|
|
345
345
|
});
|
|
346
346
|
} catch {
|
|
347
347
|
}
|
|
348
|
-
return { selections: K, order:
|
|
348
|
+
return { selections: K, order: _e };
|
|
349
|
+
});
|
|
350
|
+
}, [ge, se, X, x, t, z]);
|
|
351
|
+
V(() => {
|
|
352
|
+
z || Ce((a) => {
|
|
353
|
+
const _ = Object.entries(a.selections).filter(
|
|
354
|
+
([y]) => X.has(y)
|
|
355
|
+
), g = Object.fromEntries(_), b = a.order.filter((y) => X.has(y));
|
|
356
|
+
return b.length === a.order.length && _.length === Object.keys(a.selections).length ? a : { selections: g, order: b };
|
|
349
357
|
});
|
|
350
|
-
}, [
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
358
|
+
}, [z, X]);
|
|
359
|
+
const xe = Te(() => Ce({ selections: {}, order: [] }), []), he = de.selections, ye = de.order, me = k(() => Object.values(he).reduce((a, _) => a + (_ || 0), 0), [he]), fe = k(() => !(z || te || L || !(w != null && w.isActive) || me < se), [me, w == null ? void 0 : w.isActive, L, z, se, te]), pe = Te(async (a) => {
|
|
360
|
+
var O, q;
|
|
361
|
+
if (!fe || !w) return;
|
|
362
|
+
const _ = Ot(), g = (w.title ?? "").trim().slice(0, 255), b = Object.entries(he).map(([T, Z]) => ({ merchandiseId: T, quantity: pt(Z) })).filter((T) => T.quantity > 0).filter((T) => X.has(T.merchandiseId)).map((T) => ({
|
|
363
|
+
merchandiseId: T.merchandiseId,
|
|
364
|
+
quantity: T.quantity,
|
|
356
365
|
attributes: [
|
|
357
|
-
{ key:
|
|
358
|
-
{ key:
|
|
359
|
-
{ key:
|
|
360
|
-
...
|
|
366
|
+
{ key: $e.bundleId, value: _ },
|
|
367
|
+
{ key: $e.bundleConfig, value: i },
|
|
368
|
+
{ key: $e.bundleSource, value: "bundle_builder" },
|
|
369
|
+
...g ? [{ key: $e.bundleTitle, value: g }] : []
|
|
361
370
|
]
|
|
362
371
|
}));
|
|
363
|
-
if (!
|
|
364
|
-
const
|
|
365
|
-
let
|
|
366
|
-
for (const [
|
|
367
|
-
const
|
|
368
|
-
if (
|
|
369
|
-
const
|
|
370
|
-
Number.isFinite(
|
|
372
|
+
if (!b.length) return;
|
|
373
|
+
const y = new Map(W.map((T) => [T.id, T]));
|
|
374
|
+
let R = 0;
|
|
375
|
+
for (const [T, Z] of Object.entries(he)) {
|
|
376
|
+
const Fe = Z ?? 0;
|
|
377
|
+
if (Fe <= 0) continue;
|
|
378
|
+
const Me = y.get(T), Be = Number(Me == null ? void 0 : Me.price);
|
|
379
|
+
Number.isFinite(Be) && (R += Be * Fe);
|
|
371
380
|
}
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
let
|
|
375
|
-
for (const
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
const
|
|
379
|
-
return Number.isFinite(
|
|
380
|
-
})() : null, K =
|
|
381
|
-
|
|
381
|
+
R = Math.round(R * 100) / 100;
|
|
382
|
+
const U = [...w.rules ?? []].sort((T, Z) => T.minBundleSize - Z.minBundleSize);
|
|
383
|
+
let B = null;
|
|
384
|
+
for (const T of U)
|
|
385
|
+
me >= T.minBundleSize && (B = T);
|
|
386
|
+
const E = B ? (() => {
|
|
387
|
+
const T = Number.parseFloat(B.discountPercent);
|
|
388
|
+
return Number.isFinite(T) && T > 0 ? T : null;
|
|
389
|
+
})() : null, K = E ? Math.round(R * (1 - E / 100) * 100) / 100 : R, _e = R - K, be = b.map((T) => T.merchandiseId), Se = (B == null ? void 0 : B.handle) ?? "", re = ((O = B == null ? void 0 : B.label) == null ? void 0 : O.trim()) || "";
|
|
390
|
+
ne(!0);
|
|
382
391
|
try {
|
|
383
|
-
if (
|
|
392
|
+
if (a != null && a.checkout ? await r.linesAddForCheckout(b) : await r.linesAdd(b), x)
|
|
384
393
|
try {
|
|
385
|
-
const
|
|
386
|
-
|
|
394
|
+
const T = Le(), Z = !!(a != null && a.checkout);
|
|
395
|
+
Oe(x, t, {
|
|
387
396
|
eventType: "BUNDLE_ADDED_TO_BASKET",
|
|
388
397
|
shop: t,
|
|
389
|
-
anonymousUserId:
|
|
390
|
-
bundleId:
|
|
391
|
-
productVariantIds:
|
|
392
|
-
grossPrice:
|
|
398
|
+
anonymousUserId: T,
|
|
399
|
+
bundleId: _,
|
|
400
|
+
productVariantIds: be,
|
|
401
|
+
grossPrice: R,
|
|
393
402
|
discountedPrice: K,
|
|
394
|
-
currency:
|
|
395
|
-
discountThresholdIdentifier:
|
|
396
|
-
discountLabel:
|
|
397
|
-
discountPercentage:
|
|
398
|
-
discountedAmount:
|
|
403
|
+
currency: ee ?? void 0,
|
|
404
|
+
discountThresholdIdentifier: Se,
|
|
405
|
+
discountLabel: re,
|
|
406
|
+
discountPercentage: E,
|
|
407
|
+
discountedAmount: _e,
|
|
399
408
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
400
|
-
checkout:
|
|
401
|
-
mixpanelEvent:
|
|
409
|
+
checkout: Z,
|
|
410
|
+
mixpanelEvent: Z ? "checkout_started_with_bundle" : "bundle_added_to_cart"
|
|
402
411
|
});
|
|
403
412
|
} catch {
|
|
404
413
|
}
|
|
405
|
-
|
|
414
|
+
xe(), oe(), (q = a == null ? void 0 : a.onComplete) == null || q.call(a);
|
|
406
415
|
} finally {
|
|
407
|
-
|
|
416
|
+
ne(!1);
|
|
408
417
|
}
|
|
409
418
|
}, [
|
|
410
|
-
|
|
411
|
-
i,
|
|
412
|
-
_e,
|
|
413
|
-
te,
|
|
414
|
-
m,
|
|
419
|
+
fe,
|
|
415
420
|
r,
|
|
416
|
-
|
|
421
|
+
xe,
|
|
417
422
|
oe,
|
|
423
|
+
w,
|
|
424
|
+
i,
|
|
418
425
|
ee,
|
|
419
|
-
|
|
420
|
-
|
|
426
|
+
he,
|
|
427
|
+
X,
|
|
428
|
+
W,
|
|
429
|
+
me,
|
|
421
430
|
x,
|
|
422
431
|
t
|
|
423
|
-
]),
|
|
424
|
-
await
|
|
432
|
+
]), le = Te(async () => {
|
|
433
|
+
await pe(
|
|
425
434
|
{
|
|
426
435
|
onComplete: () => {
|
|
427
|
-
var
|
|
428
|
-
(
|
|
436
|
+
var a;
|
|
437
|
+
(a = r.openCartUI) == null || a.call(r);
|
|
429
438
|
}
|
|
430
439
|
}
|
|
431
440
|
);
|
|
432
|
-
}, [
|
|
433
|
-
await
|
|
441
|
+
}, [pe, r]), m = Te(async () => {
|
|
442
|
+
await pe(
|
|
434
443
|
{
|
|
435
444
|
checkout: !0,
|
|
436
445
|
onComplete: () => {
|
|
437
|
-
var
|
|
438
|
-
(
|
|
446
|
+
var a;
|
|
447
|
+
(a = r.navigateToCheckout) == null || a.call(r);
|
|
439
448
|
}
|
|
440
449
|
}
|
|
441
450
|
);
|
|
442
|
-
}, [
|
|
451
|
+
}, [pe, r]), p = k(
|
|
443
452
|
() => ({
|
|
444
|
-
isOpen:
|
|
445
|
-
open:
|
|
446
|
-
close:
|
|
447
|
-
toggle:
|
|
448
|
-
loading:
|
|
449
|
-
submitting:
|
|
450
|
-
error:
|
|
451
|
-
currencyCode:
|
|
452
|
-
config:
|
|
453
|
-
eligibleVariants:
|
|
454
|
-
selections:
|
|
455
|
-
selectionOrder:
|
|
456
|
-
setQuantity:
|
|
457
|
-
clearSelections:
|
|
458
|
-
bundleSize:
|
|
459
|
-
minRequired:
|
|
460
|
-
canSubmit:
|
|
461
|
-
submit:
|
|
462
|
-
submitAndCheckout:
|
|
453
|
+
isOpen: A,
|
|
454
|
+
open: ie,
|
|
455
|
+
close: oe,
|
|
456
|
+
toggle: we,
|
|
457
|
+
loading: z,
|
|
458
|
+
submitting: te,
|
|
459
|
+
error: L,
|
|
460
|
+
currencyCode: ee,
|
|
461
|
+
config: w,
|
|
462
|
+
eligibleVariants: W,
|
|
463
|
+
selections: he,
|
|
464
|
+
selectionOrder: ye,
|
|
465
|
+
setQuantity: ke,
|
|
466
|
+
clearSelections: xe,
|
|
467
|
+
bundleSize: me,
|
|
468
|
+
minRequired: se,
|
|
469
|
+
canSubmit: fe,
|
|
470
|
+
submit: le,
|
|
471
|
+
submitAndCheckout: m
|
|
463
472
|
}),
|
|
464
473
|
[
|
|
465
|
-
|
|
466
|
-
be,
|
|
467
|
-
te,
|
|
468
|
-
Ae,
|
|
469
|
-
Z,
|
|
470
|
-
Q,
|
|
471
|
-
z,
|
|
472
|
-
V,
|
|
473
|
-
m,
|
|
474
|
+
A,
|
|
474
475
|
ie,
|
|
475
476
|
oe,
|
|
476
477
|
we,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
478
|
+
z,
|
|
479
|
+
te,
|
|
480
|
+
L,
|
|
481
|
+
ee,
|
|
482
|
+
w,
|
|
483
|
+
W,
|
|
484
|
+
he,
|
|
485
|
+
ye,
|
|
486
|
+
ke,
|
|
487
|
+
xe,
|
|
488
|
+
me,
|
|
489
|
+
se,
|
|
490
|
+
fe,
|
|
481
491
|
le,
|
|
482
|
-
|
|
483
|
-
Ee
|
|
492
|
+
m
|
|
484
493
|
]
|
|
485
494
|
);
|
|
486
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ s(gt.Provider, { value: p, children: G });
|
|
487
496
|
}
|
|
488
|
-
function
|
|
489
|
-
const o =
|
|
497
|
+
function ze() {
|
|
498
|
+
const o = Bt(gt);
|
|
490
499
|
if (!o)
|
|
491
500
|
throw new Error("useBundleBuilder must be used within <BundleProvider />");
|
|
492
501
|
return o;
|
|
493
502
|
}
|
|
494
|
-
function
|
|
495
|
-
const { isOpen: o, open: e, close: t, toggle:
|
|
496
|
-
return { isOpen: o, open: e, close: t, toggle:
|
|
503
|
+
function Ar() {
|
|
504
|
+
const { isOpen: o, open: e, close: t, toggle: r } = ze();
|
|
505
|
+
return { isOpen: o, open: e, close: t, toggle: r };
|
|
497
506
|
}
|
|
498
|
-
const
|
|
499
|
-
button:
|
|
507
|
+
const Mt = "_button_18rtl_1", Ft = {
|
|
508
|
+
button: Mt
|
|
500
509
|
};
|
|
501
|
-
function
|
|
502
|
-
const { toggle: e } =
|
|
503
|
-
return /* @__PURE__ */
|
|
510
|
+
function Lr(o) {
|
|
511
|
+
const { toggle: e } = ze();
|
|
512
|
+
return /* @__PURE__ */ s(
|
|
504
513
|
"button",
|
|
505
514
|
{
|
|
506
515
|
type: "button",
|
|
507
516
|
onClick: e,
|
|
508
|
-
className: [
|
|
517
|
+
className: [Ft.button, o.className].filter(Boolean).join(" "),
|
|
509
518
|
children: o.children ?? "Build a bundle"
|
|
510
519
|
}
|
|
511
520
|
);
|
|
512
521
|
}
|
|
513
|
-
var
|
|
514
|
-
function
|
|
515
|
-
if (
|
|
516
|
-
|
|
522
|
+
var Qe, _t;
|
|
523
|
+
function At() {
|
|
524
|
+
if (_t) return Qe;
|
|
525
|
+
_t = 1;
|
|
517
526
|
var o = {
|
|
518
|
-
linear: function(e, t,
|
|
519
|
-
var n =
|
|
520
|
-
return n * e /
|
|
527
|
+
linear: function(e, t, r, i) {
|
|
528
|
+
var n = r - t;
|
|
529
|
+
return n * e / i + t;
|
|
521
530
|
},
|
|
522
|
-
easeInQuad: function(e, t,
|
|
523
|
-
var n =
|
|
524
|
-
return n * (e /=
|
|
531
|
+
easeInQuad: function(e, t, r, i) {
|
|
532
|
+
var n = r - t;
|
|
533
|
+
return n * (e /= i) * e + t;
|
|
525
534
|
},
|
|
526
|
-
easeOutQuad: function(e, t,
|
|
527
|
-
var n =
|
|
528
|
-
return -n * (e /=
|
|
535
|
+
easeOutQuad: function(e, t, r, i) {
|
|
536
|
+
var n = r - t;
|
|
537
|
+
return -n * (e /= i) * (e - 2) + t;
|
|
529
538
|
},
|
|
530
|
-
easeInOutQuad: function(e, t,
|
|
531
|
-
var n =
|
|
532
|
-
return (e /=
|
|
539
|
+
easeInOutQuad: function(e, t, r, i) {
|
|
540
|
+
var n = r - t;
|
|
541
|
+
return (e /= i / 2) < 1 ? n / 2 * e * e + t : -n / 2 * (--e * (e - 2) - 1) + t;
|
|
533
542
|
},
|
|
534
|
-
easeInCubic: function(e, t,
|
|
535
|
-
var n =
|
|
536
|
-
return n * (e /=
|
|
543
|
+
easeInCubic: function(e, t, r, i) {
|
|
544
|
+
var n = r - t;
|
|
545
|
+
return n * (e /= i) * e * e + t;
|
|
537
546
|
},
|
|
538
|
-
easeOutCubic: function(e, t,
|
|
539
|
-
var n =
|
|
540
|
-
return n * ((e = e /
|
|
547
|
+
easeOutCubic: function(e, t, r, i) {
|
|
548
|
+
var n = r - t;
|
|
549
|
+
return n * ((e = e / i - 1) * e * e + 1) + t;
|
|
541
550
|
},
|
|
542
|
-
easeInOutCubic: function(e, t,
|
|
543
|
-
var n =
|
|
544
|
-
return (e /=
|
|
551
|
+
easeInOutCubic: function(e, t, r, i) {
|
|
552
|
+
var n = r - t;
|
|
553
|
+
return (e /= i / 2) < 1 ? n / 2 * e * e * e + t : n / 2 * ((e -= 2) * e * e + 2) + t;
|
|
545
554
|
},
|
|
546
|
-
easeInQuart: function(e, t,
|
|
547
|
-
var n =
|
|
548
|
-
return n * (e /=
|
|
555
|
+
easeInQuart: function(e, t, r, i) {
|
|
556
|
+
var n = r - t;
|
|
557
|
+
return n * (e /= i) * e * e * e + t;
|
|
549
558
|
},
|
|
550
|
-
easeOutQuart: function(e, t,
|
|
551
|
-
var n =
|
|
552
|
-
return -n * ((e = e /
|
|
559
|
+
easeOutQuart: function(e, t, r, i) {
|
|
560
|
+
var n = r - t;
|
|
561
|
+
return -n * ((e = e / i - 1) * e * e * e - 1) + t;
|
|
553
562
|
},
|
|
554
|
-
easeInOutQuart: function(e, t,
|
|
555
|
-
var n =
|
|
556
|
-
return (e /=
|
|
563
|
+
easeInOutQuart: function(e, t, r, i) {
|
|
564
|
+
var n = r - t;
|
|
565
|
+
return (e /= i / 2) < 1 ? n / 2 * e * e * e * e + t : -n / 2 * ((e -= 2) * e * e * e - 2) + t;
|
|
557
566
|
},
|
|
558
|
-
easeInQuint: function(e, t,
|
|
559
|
-
var n =
|
|
560
|
-
return n * (e /=
|
|
567
|
+
easeInQuint: function(e, t, r, i) {
|
|
568
|
+
var n = r - t;
|
|
569
|
+
return n * (e /= i) * e * e * e * e + t;
|
|
561
570
|
},
|
|
562
|
-
easeOutQuint: function(e, t,
|
|
563
|
-
var n =
|
|
564
|
-
return n * ((e = e /
|
|
571
|
+
easeOutQuint: function(e, t, r, i) {
|
|
572
|
+
var n = r - t;
|
|
573
|
+
return n * ((e = e / i - 1) * e * e * e * e + 1) + t;
|
|
565
574
|
},
|
|
566
|
-
easeInOutQuint: function(e, t,
|
|
567
|
-
var n =
|
|
568
|
-
return (e /=
|
|
575
|
+
easeInOutQuint: function(e, t, r, i) {
|
|
576
|
+
var n = r - t;
|
|
577
|
+
return (e /= i / 2) < 1 ? n / 2 * e * e * e * e * e + t : n / 2 * ((e -= 2) * e * e * e * e + 2) + t;
|
|
569
578
|
},
|
|
570
|
-
easeInSine: function(e, t,
|
|
571
|
-
var n =
|
|
572
|
-
return -n * Math.cos(e /
|
|
579
|
+
easeInSine: function(e, t, r, i) {
|
|
580
|
+
var n = r - t;
|
|
581
|
+
return -n * Math.cos(e / i * (Math.PI / 2)) + n + t;
|
|
573
582
|
},
|
|
574
|
-
easeOutSine: function(e, t,
|
|
575
|
-
var n =
|
|
576
|
-
return n * Math.sin(e /
|
|
583
|
+
easeOutSine: function(e, t, r, i) {
|
|
584
|
+
var n = r - t;
|
|
585
|
+
return n * Math.sin(e / i * (Math.PI / 2)) + t;
|
|
577
586
|
},
|
|
578
|
-
easeInOutSine: function(e, t,
|
|
579
|
-
var n =
|
|
580
|
-
return -n / 2 * (Math.cos(Math.PI * e /
|
|
587
|
+
easeInOutSine: function(e, t, r, i) {
|
|
588
|
+
var n = r - t;
|
|
589
|
+
return -n / 2 * (Math.cos(Math.PI * e / i) - 1) + t;
|
|
581
590
|
},
|
|
582
|
-
easeInExpo: function(e, t,
|
|
583
|
-
var n =
|
|
584
|
-
return e == 0 ? t : n * Math.pow(2, 10 * (e /
|
|
591
|
+
easeInExpo: function(e, t, r, i) {
|
|
592
|
+
var n = r - t;
|
|
593
|
+
return e == 0 ? t : n * Math.pow(2, 10 * (e / i - 1)) + t;
|
|
585
594
|
},
|
|
586
|
-
easeOutExpo: function(e, t,
|
|
587
|
-
var n =
|
|
588
|
-
return e ==
|
|
595
|
+
easeOutExpo: function(e, t, r, i) {
|
|
596
|
+
var n = r - t;
|
|
597
|
+
return e == i ? t + n : n * (-Math.pow(2, -10 * e / i) + 1) + t;
|
|
589
598
|
},
|
|
590
|
-
easeInOutExpo: function(e, t,
|
|
591
|
-
var n =
|
|
592
|
-
return e === 0 ? t : e ===
|
|
599
|
+
easeInOutExpo: function(e, t, r, i) {
|
|
600
|
+
var n = r - t;
|
|
601
|
+
return e === 0 ? t : e === i ? t + n : (e /= i / 2) < 1 ? n / 2 * Math.pow(2, 10 * (e - 1)) + t : n / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
|
|
593
602
|
},
|
|
594
|
-
easeInCirc: function(e, t,
|
|
595
|
-
var n =
|
|
596
|
-
return -n * (Math.sqrt(1 - (e /=
|
|
603
|
+
easeInCirc: function(e, t, r, i) {
|
|
604
|
+
var n = r - t;
|
|
605
|
+
return -n * (Math.sqrt(1 - (e /= i) * e) - 1) + t;
|
|
597
606
|
},
|
|
598
|
-
easeOutCirc: function(e, t,
|
|
599
|
-
var n =
|
|
600
|
-
return n * Math.sqrt(1 - (e = e /
|
|
607
|
+
easeOutCirc: function(e, t, r, i) {
|
|
608
|
+
var n = r - t;
|
|
609
|
+
return n * Math.sqrt(1 - (e = e / i - 1) * e) + t;
|
|
601
610
|
},
|
|
602
|
-
easeInOutCirc: function(e, t,
|
|
603
|
-
var n =
|
|
604
|
-
return (e /=
|
|
611
|
+
easeInOutCirc: function(e, t, r, i) {
|
|
612
|
+
var n = r - t;
|
|
613
|
+
return (e /= i / 2) < 1 ? -n / 2 * (Math.sqrt(1 - e * e) - 1) + t : n / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
|
|
605
614
|
},
|
|
606
|
-
easeInElastic: function(e, t,
|
|
607
|
-
var n =
|
|
608
|
-
return
|
|
615
|
+
easeInElastic: function(e, t, r, i) {
|
|
616
|
+
var n = r - t, d, c, I;
|
|
617
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i) === 1 ? t + n : (c || (c = i * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), -(d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c)) + t);
|
|
609
618
|
},
|
|
610
|
-
easeOutElastic: function(e, t,
|
|
611
|
-
var n =
|
|
612
|
-
return
|
|
619
|
+
easeOutElastic: function(e, t, r, i) {
|
|
620
|
+
var n = r - t, d, c, I;
|
|
621
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i) === 1 ? t + n : (c || (c = i * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), d * Math.pow(2, -10 * e) * Math.sin((e * i - I) * (2 * Math.PI) / c) + n + t);
|
|
613
622
|
},
|
|
614
|
-
easeInOutElastic: function(e, t,
|
|
615
|
-
var n =
|
|
616
|
-
return
|
|
623
|
+
easeInOutElastic: function(e, t, r, i) {
|
|
624
|
+
var n = r - t, d, c, I;
|
|
625
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= i / 2) === 2 ? t + n : (c || (c = i * (0.3 * 1.5)), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), e < 1 ? -0.5 * (d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c)) + t : d * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * i - I) * (2 * Math.PI) / c) * 0.5 + n + t);
|
|
617
626
|
},
|
|
618
|
-
easeInBack: function(e, t,
|
|
619
|
-
var
|
|
620
|
-
return n === void 0 && (n = 1.70158),
|
|
627
|
+
easeInBack: function(e, t, r, i, n) {
|
|
628
|
+
var d = r - t;
|
|
629
|
+
return n === void 0 && (n = 1.70158), d * (e /= i) * e * ((n + 1) * e - n) + t;
|
|
621
630
|
},
|
|
622
|
-
easeOutBack: function(e, t,
|
|
623
|
-
var
|
|
624
|
-
return n === void 0 && (n = 1.70158),
|
|
631
|
+
easeOutBack: function(e, t, r, i, n) {
|
|
632
|
+
var d = r - t;
|
|
633
|
+
return n === void 0 && (n = 1.70158), d * ((e = e / i - 1) * e * ((n + 1) * e + n) + 1) + t;
|
|
625
634
|
},
|
|
626
|
-
easeInOutBack: function(e, t,
|
|
627
|
-
var
|
|
628
|
-
return n === void 0 && (n = 1.70158), (e /=
|
|
635
|
+
easeInOutBack: function(e, t, r, i, n) {
|
|
636
|
+
var d = r - t;
|
|
637
|
+
return n === void 0 && (n = 1.70158), (e /= i / 2) < 1 ? d / 2 * (e * e * (((n *= 1.525) + 1) * e - n)) + t : d / 2 * ((e -= 2) * e * (((n *= 1.525) + 1) * e + n) + 2) + t;
|
|
629
638
|
},
|
|
630
|
-
easeInBounce: function(e, t,
|
|
631
|
-
var n =
|
|
632
|
-
return
|
|
639
|
+
easeInBounce: function(e, t, r, i) {
|
|
640
|
+
var n = r - t, d;
|
|
641
|
+
return d = o.easeOutBounce(i - e, 0, n, i), n - d + t;
|
|
633
642
|
},
|
|
634
|
-
easeOutBounce: function(e, t,
|
|
635
|
-
var n =
|
|
636
|
-
return (e /=
|
|
643
|
+
easeOutBounce: function(e, t, r, i) {
|
|
644
|
+
var n = r - t;
|
|
645
|
+
return (e /= i) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
|
|
637
646
|
},
|
|
638
|
-
easeInOutBounce: function(e, t,
|
|
639
|
-
var n =
|
|
640
|
-
return e <
|
|
647
|
+
easeInOutBounce: function(e, t, r, i) {
|
|
648
|
+
var n = r - t, d;
|
|
649
|
+
return e < i / 2 ? (d = o.easeInBounce(e * 2, 0, n, i), d * 0.5 + t) : (d = o.easeOutBounce(e * 2 - i, 0, n, i), d * 0.5 + n * 0.5 + t);
|
|
641
650
|
}
|
|
642
651
|
};
|
|
643
|
-
return
|
|
652
|
+
return Qe = o, Qe;
|
|
644
653
|
}
|
|
645
|
-
var
|
|
646
|
-
function
|
|
654
|
+
var Lt = At();
|
|
655
|
+
function Dt(o) {
|
|
647
656
|
return o * Math.PI / 180;
|
|
648
657
|
}
|
|
649
|
-
function
|
|
658
|
+
function ae(o, e) {
|
|
650
659
|
return o + Math.random() * (e - o);
|
|
651
660
|
}
|
|
652
|
-
function
|
|
661
|
+
function $t(o, e) {
|
|
653
662
|
return Math.floor(o + Math.random() * (e - o + 1));
|
|
654
663
|
}
|
|
655
|
-
var
|
|
664
|
+
var De;
|
|
656
665
|
(function(o) {
|
|
657
666
|
o[o.Circle = 0] = "Circle", o[o.Square = 1] = "Square", o[o.Strip = 2] = "Strip";
|
|
658
|
-
})(
|
|
659
|
-
var
|
|
667
|
+
})(De || (De = {}));
|
|
668
|
+
var Re;
|
|
660
669
|
(function(o) {
|
|
661
670
|
o[o.Positive = 1] = "Positive", o[o.Negative = -1] = "Negative";
|
|
662
|
-
})(
|
|
663
|
-
const
|
|
664
|
-
class
|
|
665
|
-
constructor(e, t,
|
|
671
|
+
})(Re || (Re = {}));
|
|
672
|
+
const Et = 1e3 / 60;
|
|
673
|
+
class qt {
|
|
674
|
+
constructor(e, t, r, i) {
|
|
666
675
|
this.getOptions = t;
|
|
667
|
-
const { colors: n, initialVelocityX:
|
|
668
|
-
this.context = e, this.x =
|
|
676
|
+
const { colors: n, initialVelocityX: d, initialVelocityY: c } = this.getOptions();
|
|
677
|
+
this.context = e, this.x = r, this.y = i, this.w = ae(5, 20), this.h = ae(5, 20), this.radius = ae(5, 10), this.vx = typeof d == "number" ? ae(-d, d) : ae(d.min, d.max), this.vy = typeof c == "number" ? ae(-c, 0) : ae(c.min, c.max), this.shape = $t(0, 2), this.angle = Dt(ae(0, 360)), this.angularSpin = ae(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = ae(0, 1), this.rotationDirection = ae(0, 1) ? Re.Positive : Re.Negative;
|
|
669
678
|
}
|
|
670
679
|
update(e) {
|
|
671
|
-
const { gravity: t, wind:
|
|
672
|
-
this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx +=
|
|
673
|
-
const
|
|
674
|
-
if (this.rotateY +=
|
|
675
|
-
|
|
680
|
+
const { gravity: t, wind: r, friction: i, opacity: n, drawShape: d } = this.getOptions(), c = e / Et;
|
|
681
|
+
this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx += r * c, this.vx *= i ** c, this.vy *= i ** c, this.rotateY >= 1 && this.rotationDirection === Re.Positive ? this.rotationDirection = Re.Negative : this.rotateY <= -1 && this.rotationDirection === Re.Negative && (this.rotationDirection = Re.Positive);
|
|
682
|
+
const I = 0.1 * this.rotationDirection * c;
|
|
683
|
+
if (this.rotateY += I, this.angle += this.angularSpin, this.context.save(), this.context.translate(this.x, this.y), this.context.rotate(this.angle), this.context.scale(1, this.rotateY), this.context.rotate(this.angle), this.context.beginPath(), this.context.fillStyle = this.color, this.context.strokeStyle = this.color, this.context.globalAlpha = n, this.context.lineCap = "round", this.context.lineWidth = 2, d && typeof d == "function")
|
|
684
|
+
d.call(this, this.context);
|
|
676
685
|
else
|
|
677
686
|
switch (this.shape) {
|
|
678
|
-
case
|
|
687
|
+
case De.Circle: {
|
|
679
688
|
this.context.beginPath(), this.context.arc(0, 0, this.radius, 0, 2 * Math.PI), this.context.fill();
|
|
680
689
|
break;
|
|
681
690
|
}
|
|
682
|
-
case
|
|
691
|
+
case De.Square: {
|
|
683
692
|
this.context.fillRect(-this.w / 2, -this.h / 2, this.w, this.h);
|
|
684
693
|
break;
|
|
685
694
|
}
|
|
686
|
-
case
|
|
695
|
+
case De.Strip: {
|
|
687
696
|
this.context.fillRect(-this.w / 6, -this.h / 2, this.w / 3, this.h);
|
|
688
697
|
break;
|
|
689
698
|
}
|
|
@@ -691,39 +700,39 @@ class Mt {
|
|
|
691
700
|
this.context.closePath(), this.context.restore();
|
|
692
701
|
}
|
|
693
702
|
}
|
|
694
|
-
class
|
|
703
|
+
class Vt {
|
|
695
704
|
constructor(e, t) {
|
|
696
|
-
this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (
|
|
697
|
-
this.particles.splice(
|
|
705
|
+
this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (i) => {
|
|
706
|
+
this.particles.splice(i, 1);
|
|
698
707
|
}, this.getParticle = () => {
|
|
699
|
-
const
|
|
700
|
-
return new
|
|
701
|
-
}, this.animate = (
|
|
702
|
-
const { canvas: n, context:
|
|
703
|
-
if (!
|
|
708
|
+
const i = ae(this.x, this.w + this.x), n = ae(this.y, this.h + this.y);
|
|
709
|
+
return new qt(this.context, this.getOptions, i, n);
|
|
710
|
+
}, this.animate = (i) => {
|
|
711
|
+
const { canvas: n, context: d, particlesGenerated: c, lastNumberOfPieces: I } = this, { run: G, recycle: x, numberOfPieces: A, debug: P, tweenFunction: z, tweenDuration: H } = this.getOptions();
|
|
712
|
+
if (!G)
|
|
704
713
|
return !1;
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
for (let
|
|
714
|
+
const te = this.particles.length, ne = x ? te : c;
|
|
715
|
+
if (ne < A) {
|
|
716
|
+
I !== A && (this.tweenProgress = 0, this.tweenFrom = ne, this.lastNumberOfPieces = A), this.tweenProgress = Math.min(H, Math.max(0, this.tweenProgress + i));
|
|
717
|
+
const L = z(this.tweenProgress, this.tweenFrom, A, H), Q = Math.round(L - ne);
|
|
718
|
+
for (let ee = 0; ee < Q; ee++)
|
|
710
719
|
this.particles.push(this.getParticle());
|
|
711
|
-
this.particlesGenerated +=
|
|
720
|
+
this.particlesGenerated += Q;
|
|
712
721
|
}
|
|
713
|
-
|
|
714
|
-
for (let
|
|
715
|
-
const
|
|
716
|
-
|
|
722
|
+
P && (d.font = "12px sans-serif", d.fillStyle = "#333", d.textAlign = "right", d.fillText(`Particles: ${te}`, n.width - 10, n.height - 20));
|
|
723
|
+
for (let L = this.particles.length - 1; L >= 0; L--) {
|
|
724
|
+
const Q = this.particles[L];
|
|
725
|
+
Q.update(i), (Q.y > n.height || Q.y < -100 || Q.x > n.width + 100 || Q.x < -100) && (x && ne <= A ? this.particles[L] = this.getParticle() : this.removeParticleAt(L));
|
|
717
726
|
}
|
|
718
|
-
return
|
|
727
|
+
return te > 0 || ne < A;
|
|
719
728
|
}, this.canvas = e;
|
|
720
|
-
const
|
|
721
|
-
if (!
|
|
729
|
+
const r = this.canvas.getContext("2d");
|
|
730
|
+
if (!r)
|
|
722
731
|
throw new Error("Could not get canvas context");
|
|
723
|
-
this.context =
|
|
732
|
+
this.context = r, this.getOptions = t;
|
|
724
733
|
}
|
|
725
734
|
}
|
|
726
|
-
const
|
|
735
|
+
const Je = {
|
|
727
736
|
width: typeof window < "u" ? window.innerWidth : 300,
|
|
728
737
|
height: typeof window < "u" ? window.innerHeight : 200,
|
|
729
738
|
numberOfPieces: 200,
|
|
@@ -753,14 +762,14 @@ const Xe = {
|
|
|
753
762
|
],
|
|
754
763
|
opacity: 1,
|
|
755
764
|
debug: !1,
|
|
756
|
-
tweenFunction:
|
|
765
|
+
tweenFunction: Lt.easeInOutQuad,
|
|
757
766
|
tweenDuration: 5e3,
|
|
758
767
|
recycle: !0,
|
|
759
768
|
run: !0
|
|
760
769
|
};
|
|
761
|
-
class
|
|
770
|
+
class zt {
|
|
762
771
|
constructor(e, t) {
|
|
763
|
-
this.lastFrameTime = 0, this.setOptionsWithDefaults = (
|
|
772
|
+
this.lastFrameTime = 0, this.setOptionsWithDefaults = (i) => {
|
|
764
773
|
const n = {
|
|
765
774
|
confettiSource: {
|
|
766
775
|
x: 0,
|
|
@@ -771,55 +780,55 @@ class Dt {
|
|
|
771
780
|
};
|
|
772
781
|
this._options = {
|
|
773
782
|
...n,
|
|
774
|
-
...
|
|
775
|
-
...
|
|
776
|
-
}, Object.assign(this,
|
|
777
|
-
}, this.update = (
|
|
778
|
-
const { options: { run: n, onConfettiComplete:
|
|
783
|
+
...Je,
|
|
784
|
+
...i
|
|
785
|
+
}, Object.assign(this, i.confettiSource);
|
|
786
|
+
}, this.update = (i = 0) => {
|
|
787
|
+
const { options: { run: n, onConfettiComplete: d, frameRate: c }, canvas: I, context: G } = this, x = Math.min(i - this.lastFrameTime, 50);
|
|
779
788
|
if (c && x < 1e3 / c) {
|
|
780
789
|
this.rafId = requestAnimationFrame(this.update);
|
|
781
790
|
return;
|
|
782
791
|
}
|
|
783
|
-
this.lastFrameTime =
|
|
792
|
+
this.lastFrameTime = i - (c ? x % c : 0), n && (G.fillStyle = "white", G.clearRect(0, 0, I.width, I.height)), this.generator.animate(x) ? this.rafId = requestAnimationFrame(this.update) : (d && typeof d == "function" && this.generator.particlesGenerated > 0 && d.call(this, this), this._options.run = !1);
|
|
784
793
|
}, this.reset = () => {
|
|
785
794
|
this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
|
|
786
795
|
}, this.stop = () => {
|
|
787
796
|
this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
|
|
788
797
|
}, this.canvas = e;
|
|
789
|
-
const
|
|
790
|
-
if (!
|
|
798
|
+
const r = this.canvas.getContext("2d");
|
|
799
|
+
if (!r)
|
|
791
800
|
throw new Error("Could not get canvas context");
|
|
792
|
-
this.context =
|
|
801
|
+
this.context = r, this.generator = new Vt(this.canvas, () => this.options), this.options = t, this.update();
|
|
793
802
|
}
|
|
794
803
|
get options() {
|
|
795
804
|
return this._options;
|
|
796
805
|
}
|
|
797
806
|
set options(e) {
|
|
798
|
-
var
|
|
799
|
-
const t = (
|
|
800
|
-
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle &&
|
|
807
|
+
var i, n;
|
|
808
|
+
const t = (i = this._options) == null ? void 0 : i.run, r = (n = this._options) == null ? void 0 : n.recycle;
|
|
809
|
+
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && r === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
|
|
801
810
|
}
|
|
802
811
|
}
|
|
803
|
-
const
|
|
804
|
-
class
|
|
812
|
+
const Wt = Ve.createRef();
|
|
813
|
+
class et extends Ve.Component {
|
|
805
814
|
constructor(e) {
|
|
806
|
-
super(e), this.canvas =
|
|
815
|
+
super(e), this.canvas = Ve.createRef(), this.canvas = e.canvasRef || Wt;
|
|
807
816
|
}
|
|
808
817
|
componentDidMount() {
|
|
809
818
|
if (this.canvas.current) {
|
|
810
|
-
const e =
|
|
811
|
-
this.confetti = new
|
|
819
|
+
const e = Ke(this.props)[0];
|
|
820
|
+
this.confetti = new zt(this.canvas.current, e);
|
|
812
821
|
}
|
|
813
822
|
}
|
|
814
823
|
componentDidUpdate() {
|
|
815
|
-
const e =
|
|
824
|
+
const e = Ke(this.props)[0];
|
|
816
825
|
this.confetti && (this.confetti.options = e);
|
|
817
826
|
}
|
|
818
827
|
componentWillUnmount() {
|
|
819
828
|
this.confetti && this.confetti.stop(), this.confetti = void 0;
|
|
820
829
|
}
|
|
821
830
|
render() {
|
|
822
|
-
const [e, t] =
|
|
831
|
+
const [e, t] = Ke(this.props), r = {
|
|
823
832
|
zIndex: 2,
|
|
824
833
|
position: "absolute",
|
|
825
834
|
pointerEvents: "none",
|
|
@@ -829,41 +838,41 @@ class Ze extends Le.Component {
|
|
|
829
838
|
right: 0,
|
|
830
839
|
...t.style
|
|
831
840
|
};
|
|
832
|
-
return
|
|
841
|
+
return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: r });
|
|
833
842
|
}
|
|
834
843
|
}
|
|
835
|
-
|
|
836
|
-
...
|
|
844
|
+
et.defaultProps = {
|
|
845
|
+
...Je
|
|
837
846
|
};
|
|
838
|
-
|
|
839
|
-
function
|
|
840
|
-
const e = {}, t = {},
|
|
841
|
-
...Object.keys(
|
|
847
|
+
et.displayName = "ReactConfetti";
|
|
848
|
+
function Ke(o) {
|
|
849
|
+
const e = {}, t = {}, r = {}, i = [
|
|
850
|
+
...Object.keys(Je),
|
|
842
851
|
"confettiSource",
|
|
843
852
|
"drawShape",
|
|
844
853
|
"onConfettiComplete",
|
|
845
854
|
"frameRate"
|
|
846
855
|
], n = ["canvasRef"];
|
|
847
|
-
for (const
|
|
848
|
-
const c = o[
|
|
849
|
-
|
|
856
|
+
for (const d in o) {
|
|
857
|
+
const c = o[d];
|
|
858
|
+
i.includes(d) ? e[d] = c : n.includes(d) ? n[d] = c : r[d] = c;
|
|
850
859
|
}
|
|
851
|
-
return [e,
|
|
860
|
+
return [e, r, t];
|
|
852
861
|
}
|
|
853
|
-
const
|
|
862
|
+
const Ut = Ve.forwardRef((o, e) => s(et, { canvasRef: e, ...o }));
|
|
854
863
|
/**
|
|
855
864
|
* @license lucide-react v0.515.0 - ISC
|
|
856
865
|
*
|
|
857
866
|
* This source code is licensed under the ISC license.
|
|
858
867
|
* See the LICENSE file in the root directory of this source tree.
|
|
859
868
|
*/
|
|
860
|
-
const
|
|
869
|
+
const jt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gt = (o) => o.replace(
|
|
861
870
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
862
|
-
(e, t,
|
|
863
|
-
),
|
|
864
|
-
const e =
|
|
871
|
+
(e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
872
|
+
), bt = (o) => {
|
|
873
|
+
const e = Gt(o);
|
|
865
874
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
866
|
-
},
|
|
875
|
+
}, xt = (...o) => o.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim(), Ht = (o) => {
|
|
867
876
|
for (const e in o)
|
|
868
877
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
869
878
|
return !0;
|
|
@@ -874,7 +883,7 @@ const Vt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), qt = (
|
|
|
874
883
|
* This source code is licensed under the ISC license.
|
|
875
884
|
* See the LICENSE file in the root directory of this source tree.
|
|
876
885
|
*/
|
|
877
|
-
var
|
|
886
|
+
var Qt = {
|
|
878
887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
879
888
|
width: 24,
|
|
880
889
|
height: 24,
|
|
@@ -891,31 +900,31 @@ var Wt = {
|
|
|
891
900
|
* This source code is licensed under the ISC license.
|
|
892
901
|
* See the LICENSE file in the root directory of this source tree.
|
|
893
902
|
*/
|
|
894
|
-
const
|
|
903
|
+
const Kt = wt(
|
|
895
904
|
({
|
|
896
905
|
color: o = "currentColor",
|
|
897
906
|
size: e = 24,
|
|
898
907
|
strokeWidth: t = 2,
|
|
899
|
-
absoluteStrokeWidth:
|
|
900
|
-
className:
|
|
908
|
+
absoluteStrokeWidth: r,
|
|
909
|
+
className: i = "",
|
|
901
910
|
children: n,
|
|
902
|
-
iconNode:
|
|
911
|
+
iconNode: d,
|
|
903
912
|
...c
|
|
904
|
-
},
|
|
913
|
+
}, I) => Ze(
|
|
905
914
|
"svg",
|
|
906
915
|
{
|
|
907
|
-
ref:
|
|
908
|
-
...
|
|
916
|
+
ref: I,
|
|
917
|
+
...Qt,
|
|
909
918
|
width: e,
|
|
910
919
|
height: e,
|
|
911
920
|
stroke: o,
|
|
912
|
-
strokeWidth:
|
|
913
|
-
className:
|
|
914
|
-
...!n && !
|
|
921
|
+
strokeWidth: r ? Number(t) * 24 / Number(e) : t,
|
|
922
|
+
className: xt("lucide", i),
|
|
923
|
+
...!n && !Ht(c) && { "aria-hidden": "true" },
|
|
915
924
|
...c
|
|
916
925
|
},
|
|
917
926
|
[
|
|
918
|
-
...
|
|
927
|
+
...d.map(([G, x]) => Ze(G, x)),
|
|
919
928
|
...Array.isArray(n) ? n : [n]
|
|
920
929
|
]
|
|
921
930
|
)
|
|
@@ -926,20 +935,20 @@ const Gt = bt(
|
|
|
926
935
|
* This source code is licensed under the ISC license.
|
|
927
936
|
* See the LICENSE file in the root directory of this source tree.
|
|
928
937
|
*/
|
|
929
|
-
const
|
|
930
|
-
const t =
|
|
931
|
-
({ className:
|
|
938
|
+
const tt = (o, e) => {
|
|
939
|
+
const t = wt(
|
|
940
|
+
({ className: r, ...i }, n) => Ze(Kt, {
|
|
932
941
|
ref: n,
|
|
933
942
|
iconNode: e,
|
|
934
|
-
className:
|
|
935
|
-
`lucide-${
|
|
943
|
+
className: xt(
|
|
944
|
+
`lucide-${jt(bt(o))}`,
|
|
936
945
|
`lucide-${o}`,
|
|
937
|
-
|
|
946
|
+
r
|
|
938
947
|
),
|
|
939
|
-
...
|
|
948
|
+
...i
|
|
940
949
|
})
|
|
941
950
|
);
|
|
942
|
-
return t.displayName =
|
|
951
|
+
return t.displayName = bt(o), t;
|
|
943
952
|
};
|
|
944
953
|
/**
|
|
945
954
|
* @license lucide-react v0.515.0 - ISC
|
|
@@ -947,306 +956,324 @@ const Ht = (o, e) => {
|
|
|
947
956
|
* This source code is licensed under the ISC license.
|
|
948
957
|
* See the LICENSE file in the root directory of this source tree.
|
|
949
958
|
*/
|
|
950
|
-
const
|
|
959
|
+
const Yt = [
|
|
960
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
961
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
962
|
+
], yt = tt("plus", Yt);
|
|
963
|
+
/**
|
|
964
|
+
* @license lucide-react v0.515.0 - ISC
|
|
965
|
+
*
|
|
966
|
+
* This source code is licensed under the ISC license.
|
|
967
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
968
|
+
*/
|
|
969
|
+
const Xt = [
|
|
951
970
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
952
971
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
953
|
-
],
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
972
|
+
], Zt = tt("search", Xt);
|
|
973
|
+
/**
|
|
974
|
+
* @license lucide-react v0.515.0 - ISC
|
|
975
|
+
*
|
|
976
|
+
* This source code is licensed under the ISC license.
|
|
977
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
978
|
+
*/
|
|
979
|
+
const Jt = [
|
|
980
|
+
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
981
|
+
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
982
|
+
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
983
|
+
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
984
|
+
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
985
|
+
], en = tt("trash-2", Jt), tn = "_backdrop_i1rsh_1", nn = "_celebrationOverlay_i1rsh_14", rn = "_celebrationChip_i1rsh_23", an = "_backdropOpen_i1rsh_74", on = "_backdropClosed_i1rsh_78", sn = "_panel_i1rsh_82", ln = "_panelOpen_i1rsh_103", cn = "_panelClosed_i1rsh_107", un = "_header_i1rsh_146", dn = "_headerCenter_i1rsh_155", hn = "_title_i1rsh_163", mn = "_searchIconButton_i1rsh_172", fn = "_headerTitleWrap_i1rsh_194", pn = "_headerSearchWrap_i1rsh_198", _n = "_headerSearchOpen_i1rsh_210", bn = "_searchBar_i1rsh_222", yn = "_searchInput_i1rsh_234", vn = "_searchClearButton_i1rsh_255", wn = "_closeButton_i1rsh_277", gn = "_body_i1rsh_310", xn = "_muted_i1rsh_315", In = "_error_i1rsh_320", Cn = "_variants_i1rsh_325", Nn = "_variantList_i1rsh_329", Sn = "_variantRow_i1rsh_337", Bn = "_variantRowSoldOut_i1rsh_345", Tn = "_variantLeft_i1rsh_349", Rn = "_addToBundleButton_i1rsh_356", kn = "_soldOutContainer_i1rsh_384", Pn = "_soldOut_i1rsh_384", On = "_variantThumb_i1rsh_401", Mn = "_variantThumbImg_i1rsh_411", Fn = "_variantThumbFallback_i1rsh_418", An = "_variantInfo_i1rsh_428", Ln = "_variantName_i1rsh_432", Dn = "_variantMeta_i1rsh_441", $n = "_variantPriceRow_i1rsh_449", En = "_variantCompareAt_i1rsh_456", qn = "_variantPrice_i1rsh_449", Vn = "_qtyControls_i1rsh_467", zn = "_qtyButton_i1rsh_473", Wn = "_qtyValue_i1rsh_498", Un = "_footer_i1rsh_505", jn = "_poweredBy_i1rsh_513", Gn = "_boxSummaryWindow_i1rsh_525", Hn = "_boxSummaryRow_i1rsh_543", Qn = "_boxSlot_i1rsh_551", Kn = "_boxItem_i1rsh_560", Yn = "_boxItemClickable_i1rsh_572", Xn = "_boxThresholdLabel_i1rsh_581", Zn = "_boxItemPlaceholder_i1rsh_592", Jn = "_boxItemFilled_i1rsh_598", ei = "_boxItemThreshold_i1rsh_604", ti = "_boxItemDiscountText_i1rsh_612", ni = "_boxItemPlus_i1rsh_620", ii = "_boxItemImage_i1rsh_627", ri = "_boxItemFallback_i1rsh_634", ai = "_ctaButtonGroup_i1rsh_645", oi = "_ctaButtonGroupAnimating_i1rsh_652", si = "_cta_i1rsh_645", li = "_ctaDualLeft_i1rsh_680", ci = "_ctaDualLeftAnimating_i1rsh_698", ui = "_ctaDualRight_i1rsh_711", di = "_ctaDualRightAnimating_i1rsh_727", hi = "_ctaTotals_i1rsh_738", mi = "_ctaDiscountBadge_i1rsh_746", fi = "_ctaTotalsWrap_i1rsh_760", pi = "_ctaTotalsWrapVisible_i1rsh_773", _i = "_ctaTotalsStrike_i1rsh_780", bi = "_ctaTotalsPrice_i1rsh_787", h = {
|
|
986
|
+
backdrop: tn,
|
|
987
|
+
celebrationOverlay: nn,
|
|
988
|
+
celebrationChip: rn,
|
|
989
|
+
backdropOpen: an,
|
|
990
|
+
backdropClosed: on,
|
|
991
|
+
panel: sn,
|
|
992
|
+
panelOpen: ln,
|
|
993
|
+
panelClosed: cn,
|
|
994
|
+
header: un,
|
|
995
|
+
headerCenter: dn,
|
|
996
|
+
title: hn,
|
|
997
|
+
searchIconButton: mn,
|
|
998
|
+
headerTitleWrap: fn,
|
|
999
|
+
headerSearchWrap: pn,
|
|
1000
|
+
headerSearchOpen: _n,
|
|
1001
|
+
searchBar: bn,
|
|
1002
|
+
searchInput: yn,
|
|
1003
|
+
searchClearButton: vn,
|
|
1004
|
+
closeButton: wn,
|
|
1005
|
+
body: gn,
|
|
1006
|
+
muted: xn,
|
|
1007
|
+
error: In,
|
|
1008
|
+
variants: Cn,
|
|
1009
|
+
variantList: Nn,
|
|
1010
|
+
variantRow: Sn,
|
|
1011
|
+
variantRowSoldOut: Bn,
|
|
1012
|
+
variantLeft: Tn,
|
|
1013
|
+
addToBundleButton: Rn,
|
|
1014
|
+
soldOutContainer: kn,
|
|
1015
|
+
soldOut: Pn,
|
|
1016
|
+
variantThumb: On,
|
|
1017
|
+
variantThumbImg: Mn,
|
|
1018
|
+
variantThumbFallback: Fn,
|
|
1019
|
+
variantInfo: An,
|
|
1020
|
+
variantName: Ln,
|
|
1021
|
+
variantMeta: Dn,
|
|
1022
|
+
variantPriceRow: $n,
|
|
991
1023
|
variantCompareAt: En,
|
|
992
|
-
variantPrice:
|
|
993
|
-
qtyControls:
|
|
994
|
-
qtyButton:
|
|
995
|
-
qtyValue:
|
|
996
|
-
footer:
|
|
997
|
-
poweredBy:
|
|
998
|
-
boxSummaryWindow:
|
|
999
|
-
boxSummaryRow:
|
|
1000
|
-
boxSlot:
|
|
1001
|
-
boxItem:
|
|
1002
|
-
boxItemClickable:
|
|
1003
|
-
boxThresholdLabel:
|
|
1004
|
-
boxItemPlaceholder:
|
|
1005
|
-
boxItemFilled:
|
|
1006
|
-
boxItemThreshold:
|
|
1007
|
-
boxItemDiscountText:
|
|
1008
|
-
boxItemPlus:
|
|
1009
|
-
boxItemImage:
|
|
1010
|
-
boxItemFallback:
|
|
1011
|
-
ctaButtonGroup:
|
|
1012
|
-
ctaButtonGroupAnimating:
|
|
1013
|
-
cta:
|
|
1014
|
-
ctaDualLeft:
|
|
1015
|
-
ctaDualLeftAnimating:
|
|
1016
|
-
ctaDualRight:
|
|
1017
|
-
ctaDualRightAnimating:
|
|
1018
|
-
ctaTotals:
|
|
1019
|
-
ctaDiscountBadge:
|
|
1020
|
-
ctaTotalsWrap:
|
|
1021
|
-
ctaTotalsWrapVisible:
|
|
1022
|
-
ctaTotalsStrike:
|
|
1023
|
-
ctaTotalsPrice:
|
|
1024
|
+
variantPrice: qn,
|
|
1025
|
+
qtyControls: Vn,
|
|
1026
|
+
qtyButton: zn,
|
|
1027
|
+
qtyValue: Wn,
|
|
1028
|
+
footer: Un,
|
|
1029
|
+
poweredBy: jn,
|
|
1030
|
+
boxSummaryWindow: Gn,
|
|
1031
|
+
boxSummaryRow: Hn,
|
|
1032
|
+
boxSlot: Qn,
|
|
1033
|
+
boxItem: Kn,
|
|
1034
|
+
boxItemClickable: Yn,
|
|
1035
|
+
boxThresholdLabel: Xn,
|
|
1036
|
+
boxItemPlaceholder: Zn,
|
|
1037
|
+
boxItemFilled: Jn,
|
|
1038
|
+
boxItemThreshold: ei,
|
|
1039
|
+
boxItemDiscountText: ti,
|
|
1040
|
+
boxItemPlus: ni,
|
|
1041
|
+
boxItemImage: ii,
|
|
1042
|
+
boxItemFallback: ri,
|
|
1043
|
+
ctaButtonGroup: ai,
|
|
1044
|
+
ctaButtonGroupAnimating: oi,
|
|
1045
|
+
cta: si,
|
|
1046
|
+
ctaDualLeft: li,
|
|
1047
|
+
ctaDualLeftAnimating: ci,
|
|
1048
|
+
ctaDualRight: ui,
|
|
1049
|
+
ctaDualRightAnimating: di,
|
|
1050
|
+
ctaTotals: hi,
|
|
1051
|
+
ctaDiscountBadge: mi,
|
|
1052
|
+
ctaTotalsWrap: fi,
|
|
1053
|
+
ctaTotalsWrapVisible: pi,
|
|
1054
|
+
ctaTotalsStrike: _i,
|
|
1055
|
+
ctaTotalsPrice: bi
|
|
1024
1056
|
};
|
|
1025
|
-
function
|
|
1026
|
-
var
|
|
1057
|
+
function Dr(o) {
|
|
1058
|
+
var ct, ut;
|
|
1027
1059
|
const {
|
|
1028
1060
|
isOpen: e,
|
|
1029
1061
|
close: t,
|
|
1030
|
-
loading:
|
|
1031
|
-
submitting:
|
|
1062
|
+
loading: r,
|
|
1063
|
+
submitting: i,
|
|
1032
1064
|
error: n,
|
|
1033
|
-
currencyCode:
|
|
1065
|
+
currencyCode: d,
|
|
1034
1066
|
config: c,
|
|
1035
|
-
eligibleVariants:
|
|
1036
|
-
selections:
|
|
1067
|
+
eligibleVariants: I,
|
|
1068
|
+
selections: G,
|
|
1037
1069
|
selectionOrder: x,
|
|
1038
|
-
setQuantity:
|
|
1039
|
-
bundleSize:
|
|
1040
|
-
minRequired:
|
|
1041
|
-
canSubmit:
|
|
1042
|
-
submit:
|
|
1043
|
-
submitAndCheckout:
|
|
1044
|
-
} =
|
|
1070
|
+
setQuantity: A,
|
|
1071
|
+
bundleSize: P,
|
|
1072
|
+
minRequired: z,
|
|
1073
|
+
canSubmit: H,
|
|
1074
|
+
submit: te,
|
|
1075
|
+
submitAndCheckout: ne
|
|
1076
|
+
} = ze(), [L, Q] = j(!1), [ee, ue] = j(""), w = J(null), D = J(null), W = J(null), [Y, de] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ce, Ne] = j(0), [ie, oe] = j(null), [we, ge] = j(!1), X = J(null), se = J(P), ke = 7e3, [xe, he] = j(0), [ye, me] = j(null), [fe, pe] = j(!1), le = J(null), m = 2800, p = [
|
|
1045
1077
|
"#2563eb",
|
|
1046
1078
|
"#3b82f6",
|
|
1047
1079
|
"#60a5fa",
|
|
1048
1080
|
"#93c5fd",
|
|
1049
1081
|
"#bae6fd",
|
|
1050
1082
|
"#e0f2fe"
|
|
1051
|
-
],
|
|
1052
|
-
var
|
|
1053
|
-
const
|
|
1054
|
-
return Array.isArray(
|
|
1055
|
-
(
|
|
1056
|
-
) : [...
|
|
1057
|
-
}, [(
|
|
1058
|
-
const
|
|
1059
|
-
return Number.isFinite(
|
|
1060
|
-
},
|
|
1061
|
-
const
|
|
1062
|
-
var
|
|
1063
|
-
const
|
|
1064
|
-
return !(!
|
|
1083
|
+
], a = k(() => {
|
|
1084
|
+
var u;
|
|
1085
|
+
const l = (u = c == null ? void 0 : c.styleSettings) == null ? void 0 : u.confettiColors;
|
|
1086
|
+
return Array.isArray(l) && l.length >= 6 ? l.slice(0, 6).map(
|
|
1087
|
+
(v, N) => typeof v == "string" && v.trim() ? v : p[N]
|
|
1088
|
+
) : [...p];
|
|
1089
|
+
}, [(ct = c == null ? void 0 : c.styleSettings) == null ? void 0 : ct.confettiColors]), _ = (l) => {
|
|
1090
|
+
const u = Number.parseFloat(l);
|
|
1091
|
+
return Number.isFinite(u) ? String(Math.round(u)) : l;
|
|
1092
|
+
}, g = (l) => {
|
|
1093
|
+
const u = (l ?? []).filter((v) => {
|
|
1094
|
+
var F, M;
|
|
1095
|
+
const N = (F = v == null ? void 0 : v.name) == null ? void 0 : F.trim(), C = (M = v == null ? void 0 : v.value) == null ? void 0 : M.trim();
|
|
1096
|
+
return !(!N || !C || N.toLowerCase() === "title");
|
|
1065
1097
|
});
|
|
1066
|
-
return
|
|
1067
|
-
},
|
|
1068
|
-
var
|
|
1069
|
-
return ((
|
|
1070
|
-
},
|
|
1071
|
-
const
|
|
1072
|
-
return [
|
|
1073
|
-
}, [
|
|
1074
|
-
const
|
|
1075
|
-
if (!Number.isFinite(
|
|
1076
|
-
if (
|
|
1098
|
+
return u.length ? u.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
|
|
1099
|
+
}, b = (l) => {
|
|
1100
|
+
var u;
|
|
1101
|
+
return ((u = l.product) == null ? void 0 : u.title) ?? l.displayName ?? l.title;
|
|
1102
|
+
}, y = (l) => {
|
|
1103
|
+
const u = b(l), v = g(l.selectedOptions);
|
|
1104
|
+
return [u, v].filter(Boolean).join(" — ");
|
|
1105
|
+
}, [R, U] = j(e), B = J(null), E = (l) => {
|
|
1106
|
+
const u = Number(l);
|
|
1107
|
+
if (!Number.isFinite(u)) return l;
|
|
1108
|
+
if (d)
|
|
1077
1109
|
try {
|
|
1078
|
-
return new Intl.NumberFormat(void 0, { style: "currency", currency:
|
|
1110
|
+
return new Intl.NumberFormat(void 0, { style: "currency", currency: d }).format(u);
|
|
1079
1111
|
} catch {
|
|
1080
1112
|
}
|
|
1081
|
-
return `$${
|
|
1082
|
-
}, K = ((
|
|
1083
|
-
const
|
|
1084
|
-
return Math.max(2, Math.min(100,
|
|
1085
|
-
}, [c == null ? void 0 : c.maxBundleSize]),
|
|
1086
|
-
const
|
|
1087
|
-
if (!
|
|
1088
|
-
const
|
|
1089
|
-
var
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
for (const
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
return
|
|
1113
|
+
return `$${u.toFixed(2)}`;
|
|
1114
|
+
}, K = ((ut = c == null ? void 0 : c.title) == null ? void 0 : ut.trim()) || "Build your bundle", _e = k(() => {
|
|
1115
|
+
const l = Number((c == null ? void 0 : c.maxBundleSize) ?? NaN), u = Number.isFinite(l) ? Math.floor(l) : 100;
|
|
1116
|
+
return Math.max(2, Math.min(100, u));
|
|
1117
|
+
}, [c == null ? void 0 : c.maxBundleSize]), be = P >= _e, Se = k(() => [...I].sort((l, u) => l.displayName.localeCompare(u.displayName)), [I]), re = k(() => {
|
|
1118
|
+
const l = ee.trim().toLowerCase();
|
|
1119
|
+
if (!l) return Se;
|
|
1120
|
+
const u = l.split(/\s+/).filter(Boolean), v = (N) => {
|
|
1121
|
+
var M;
|
|
1122
|
+
const C = [];
|
|
1123
|
+
C.push(N.displayName), (M = N.product) != null && M.title && C.push(N.product.title);
|
|
1124
|
+
for (const $ of N.selectedOptions ?? [])
|
|
1125
|
+
C.push($.name), C.push($.value);
|
|
1126
|
+
const F = C.join(" ").toLowerCase();
|
|
1127
|
+
return u.every(($) => F.includes($));
|
|
1096
1128
|
};
|
|
1097
|
-
return
|
|
1098
|
-
}, [
|
|
1099
|
-
let
|
|
1100
|
-
for (const
|
|
1101
|
-
|
|
1102
|
-
return
|
|
1103
|
-
}, [
|
|
1104
|
-
if (!
|
|
1105
|
-
const
|
|
1106
|
-
return !Number.isFinite(
|
|
1107
|
-
}, [
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
for (const [h, w] of Object.entries(H)) {
|
|
1116
|
-
const _ = w ?? 0;
|
|
1117
|
-
if (_ <= 0) continue;
|
|
1118
|
-
const S = a.get(h), C = Number(S == null ? void 0 : S.price);
|
|
1119
|
-
Number.isFinite(C) && (s += C * _);
|
|
1129
|
+
return Se.filter(v);
|
|
1130
|
+
}, [ee, Se]), O = k(() => [...(c == null ? void 0 : c.rules) ?? []].sort((l, u) => l.minBundleSize - u.minBundleSize), [c == null ? void 0 : c.rules]), q = k(() => Math.max(0, z - P), [P, z]), T = k(() => {
|
|
1131
|
+
let l = null;
|
|
1132
|
+
for (const u of O)
|
|
1133
|
+
P >= u.minBundleSize && (l = u);
|
|
1134
|
+
return l;
|
|
1135
|
+
}, [P, O]), Z = k(() => {
|
|
1136
|
+
if (!T) return null;
|
|
1137
|
+
const l = Number.parseFloat(T.discountPercent);
|
|
1138
|
+
return !Number.isFinite(l) || l <= 0 ? null : l;
|
|
1139
|
+
}, [T]), Fe = O[0], Me = !!(Fe && P >= Fe.minBundleSize), Be = k(() => {
|
|
1140
|
+
const l = new Map(I.map((v) => [v.id, v]));
|
|
1141
|
+
let u = 0;
|
|
1142
|
+
for (const [v, N] of Object.entries(G)) {
|
|
1143
|
+
const C = N ?? 0;
|
|
1144
|
+
if (C <= 0) continue;
|
|
1145
|
+
const F = l.get(v), M = Number(F == null ? void 0 : F.price);
|
|
1146
|
+
Number.isFinite(M) && (u += M * C);
|
|
1120
1147
|
}
|
|
1121
|
-
return Math.round(
|
|
1122
|
-
}, [
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
return Math.round(
|
|
1126
|
-
}, [
|
|
1127
|
-
const
|
|
1128
|
-
return x.map((
|
|
1129
|
-
}, [
|
|
1130
|
-
var
|
|
1131
|
-
const
|
|
1132
|
-
for (const
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
discountPercent:
|
|
1136
|
-
minBundleSize:
|
|
1137
|
-
label: ((
|
|
1148
|
+
return Math.round(u * 100) / 100;
|
|
1149
|
+
}, [I, G]), It = k(() => {
|
|
1150
|
+
if (!Z) return Be;
|
|
1151
|
+
const l = Be * (1 - Z / 100);
|
|
1152
|
+
return Math.round(l * 100) / 100;
|
|
1153
|
+
}, [Z, Be]), nt = k(() => O.length ? Math.max(...O.map((l) => l.minBundleSize)) : 0, [O]), We = k(() => {
|
|
1154
|
+
const l = new Map(I.map((u) => [u.id, u]));
|
|
1155
|
+
return x.map((u) => l.get(u)).filter((u) => !!u);
|
|
1156
|
+
}, [I, x]), Ct = k(() => {
|
|
1157
|
+
var u;
|
|
1158
|
+
const l = /* @__PURE__ */ new Map();
|
|
1159
|
+
for (const v of O) {
|
|
1160
|
+
const N = Math.max(0, v.minBundleSize - 1);
|
|
1161
|
+
l.set(N, {
|
|
1162
|
+
discountPercent: v.discountPercent,
|
|
1163
|
+
minBundleSize: v.minBundleSize,
|
|
1164
|
+
label: ((u = v.label) == null ? void 0 : u.trim()) || `Buy ${v.minBundleSize}+`
|
|
1138
1165
|
});
|
|
1139
1166
|
}
|
|
1140
|
-
return
|
|
1141
|
-
}, [
|
|
1142
|
-
|
|
1167
|
+
return l;
|
|
1168
|
+
}, [O]), Nt = k(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue, it] = j(!0), rt = J(q);
|
|
1169
|
+
V(() => {
|
|
1143
1170
|
if (((c == null ? void 0 : c.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1171
|
+
const u = rt.current > 0;
|
|
1172
|
+
it(!(u && q === 0));
|
|
1146
1173
|
}
|
|
1147
|
-
|
|
1148
|
-
}, [
|
|
1149
|
-
const
|
|
1150
|
-
const
|
|
1151
|
-
if (!
|
|
1152
|
-
const
|
|
1153
|
-
if (!
|
|
1154
|
-
const
|
|
1155
|
-
if (
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1174
|
+
rt.current = q;
|
|
1175
|
+
}, [q, c == null ? void 0 : c.ctaButtonMode]);
|
|
1176
|
+
const je = J(null), at = J(null), ot = J(null), st = J(P), lt = (l) => {
|
|
1177
|
+
const u = at.current;
|
|
1178
|
+
if (!u) return;
|
|
1179
|
+
const v = u.querySelector(`[data-variant-row="${l}"]`);
|
|
1180
|
+
if (!v) return;
|
|
1181
|
+
const N = u.getBoundingClientRect(), C = v.getBoundingClientRect(), F = 8;
|
|
1182
|
+
if (C.top >= N.top + F && C.bottom <= N.bottom - F) return;
|
|
1183
|
+
const $ = Math.max(0, u.scrollHeight - u.clientHeight), ce = C.top - N.top + C.height / 2, ve = u.scrollTop + ce - u.clientHeight / 2, Ie = Math.min($, Math.max(0, ve));
|
|
1184
|
+
u.scrollTo({ top: Ie, behavior: "smooth" });
|
|
1158
1185
|
};
|
|
1159
|
-
return
|
|
1186
|
+
return V(() => {
|
|
1160
1187
|
if (!e) return;
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1188
|
+
const l = (u) => {
|
|
1189
|
+
u.key === "Escape" && t();
|
|
1163
1190
|
};
|
|
1164
|
-
return window.addEventListener("keydown",
|
|
1165
|
-
}, [t, e]),
|
|
1191
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
1192
|
+
}, [t, e]), V(() => {
|
|
1166
1193
|
if (typeof window > "u") return;
|
|
1167
|
-
const
|
|
1168
|
-
return
|
|
1169
|
-
}, []),
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1194
|
+
const l = () => de({ width: window.innerWidth, height: window.innerHeight });
|
|
1195
|
+
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
1196
|
+
}, []), V(() => {
|
|
1197
|
+
if (B.current != null && (window.clearTimeout(B.current), B.current = null), e) {
|
|
1198
|
+
U(!0);
|
|
1172
1199
|
return;
|
|
1173
1200
|
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1201
|
+
B.current = window.setTimeout(() => {
|
|
1202
|
+
U(!1), B.current = null;
|
|
1176
1203
|
}, 220);
|
|
1177
|
-
}, [e]),
|
|
1178
|
-
|
|
1179
|
-
}, []),
|
|
1180
|
-
|
|
1181
|
-
}, []),
|
|
1182
|
-
|
|
1183
|
-
}, []),
|
|
1184
|
-
if (!e || !
|
|
1185
|
-
const
|
|
1186
|
-
var
|
|
1187
|
-
return (
|
|
1204
|
+
}, [e]), V(() => () => {
|
|
1205
|
+
B.current != null && window.clearTimeout(B.current);
|
|
1206
|
+
}, []), V(() => () => {
|
|
1207
|
+
X.current != null && window.clearTimeout(X.current);
|
|
1208
|
+
}, []), V(() => () => {
|
|
1209
|
+
le.current != null && window.clearTimeout(le.current);
|
|
1210
|
+
}, []), V(() => {
|
|
1211
|
+
if (!e || !L) return;
|
|
1212
|
+
const l = requestAnimationFrame(() => {
|
|
1213
|
+
var u;
|
|
1214
|
+
return (u = w.current) == null ? void 0 : u.focus();
|
|
1188
1215
|
});
|
|
1189
|
-
return () => cancelAnimationFrame(
|
|
1190
|
-
}, [e,
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1193
|
-
const
|
|
1194
|
-
if (!
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1197
|
-
const
|
|
1198
|
-
const
|
|
1199
|
-
if (!
|
|
1200
|
-
const
|
|
1201
|
-
if (
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1216
|
+
return () => cancelAnimationFrame(l);
|
|
1217
|
+
}, [e, L]), V(() => {
|
|
1218
|
+
const l = st.current;
|
|
1219
|
+
if (st.current = P, P <= l) return;
|
|
1220
|
+
const u = ot.current;
|
|
1221
|
+
if (!u) return;
|
|
1222
|
+
const v = O.some((M) => M.minBundleSize === P), N = O.find((M) => M.minBundleSize > P), C = N && v ? N.minBundleSize - 1 : N ? null : P - 1;
|
|
1223
|
+
if (C == null || C < 0) return;
|
|
1224
|
+
const F = requestAnimationFrame(() => {
|
|
1225
|
+
const M = u.querySelector(`[data-box-slot="${C}"]`);
|
|
1226
|
+
if (!M) return;
|
|
1227
|
+
const $ = u.getBoundingClientRect(), ve = M.getBoundingClientRect().right - $.right;
|
|
1228
|
+
if (ve <= 1) return;
|
|
1229
|
+
const Ie = Math.max(0, u.scrollWidth - u.clientWidth), Pe = Math.min(Ie, Math.max(0, u.scrollLeft + ve));
|
|
1230
|
+
u.scrollTo({ left: Pe, behavior: "smooth" });
|
|
1204
1231
|
});
|
|
1205
|
-
return () => cancelAnimationFrame(
|
|
1206
|
-
}, [
|
|
1232
|
+
return () => cancelAnimationFrame(F);
|
|
1233
|
+
}, [P, O]), V(() => {
|
|
1207
1234
|
if (!e) return;
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
},
|
|
1214
|
-
}, [
|
|
1215
|
-
if (!e || !
|
|
1216
|
-
const
|
|
1217
|
-
var
|
|
1218
|
-
const
|
|
1219
|
-
x:
|
|
1220
|
-
y:
|
|
1235
|
+
const l = se.current;
|
|
1236
|
+
if (se.current = P, P <= l) return;
|
|
1237
|
+
const u = O.find((v) => v.minBundleSize === P);
|
|
1238
|
+
u && (me(`You received a ${_(u.discountPercent)}% discount!`), he((v) => v + 1), pe(!0), le.current != null && window.clearTimeout(le.current), le.current = window.setTimeout(() => {
|
|
1239
|
+
pe(!1), le.current = null;
|
|
1240
|
+
}, m));
|
|
1241
|
+
}, [P, e, O]), V(() => {
|
|
1242
|
+
if (!e || !fe || !ye) return;
|
|
1243
|
+
const l = requestAnimationFrame(() => {
|
|
1244
|
+
var $;
|
|
1245
|
+
const u = W.current, v = u == null ? void 0 : u.getBoundingClientRect(), N = ($ = je.current) == null ? void 0 : $.getBoundingClientRect(), C = v ? v.left + v.width / 2 : N ? N.left + N.width / 2 : window.innerWidth / 2, F = v ? v.top + v.height / 2 : N ? N.top + N.height / 2 : window.innerHeight / 2, M = {
|
|
1246
|
+
x: C - 2,
|
|
1247
|
+
y: F - 2,
|
|
1221
1248
|
w: 4,
|
|
1222
1249
|
h: 4
|
|
1223
1250
|
};
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
},
|
|
1251
|
+
oe(M), Ne((ce) => ce + 1), ge(!0), X.current != null && window.clearTimeout(X.current), X.current = window.setTimeout(() => {
|
|
1252
|
+
ge(!1), X.current = null;
|
|
1253
|
+
}, ke);
|
|
1227
1254
|
});
|
|
1228
|
-
return () => cancelAnimationFrame(
|
|
1229
|
-
}, [
|
|
1230
|
-
var
|
|
1231
|
-
e && ((
|
|
1232
|
-
}, [e]),
|
|
1255
|
+
return () => cancelAnimationFrame(l);
|
|
1256
|
+
}, [xe, ye, ke, fe, e]), V(() => {
|
|
1257
|
+
var l;
|
|
1258
|
+
e && ((l = je.current) == null || l.focus());
|
|
1259
|
+
}, [e]), R ? /* @__PURE__ */ S(
|
|
1233
1260
|
"div",
|
|
1234
1261
|
{
|
|
1235
1262
|
role: "dialog",
|
|
1236
1263
|
"aria-modal": "true",
|
|
1237
1264
|
"aria-label": "Bundle builder",
|
|
1238
|
-
className: [
|
|
1239
|
-
onMouseDown: (
|
|
1240
|
-
|
|
1265
|
+
className: [h.backdrop, e ? h.backdropOpen : h.backdropClosed, o.className].filter(Boolean).join(" "),
|
|
1266
|
+
onMouseDown: (l) => {
|
|
1267
|
+
l.target === l.currentTarget && t();
|
|
1241
1268
|
},
|
|
1242
1269
|
children: [
|
|
1243
|
-
|
|
1244
|
-
|
|
1270
|
+
we && ie && Y.width > 0 && Y.height > 0 ? /* @__PURE__ */ s(
|
|
1271
|
+
Ut,
|
|
1245
1272
|
{
|
|
1246
1273
|
width: Y.width,
|
|
1247
1274
|
height: Y.height,
|
|
1248
|
-
confettiSource:
|
|
1249
|
-
colors:
|
|
1275
|
+
confettiSource: ie,
|
|
1276
|
+
colors: a,
|
|
1250
1277
|
recycle: !1,
|
|
1251
1278
|
numberOfPieces: 70,
|
|
1252
1279
|
tweenDuration: 100,
|
|
@@ -1255,52 +1282,52 @@ function yr(o) {
|
|
|
1255
1282
|
initialVelocityX: { min: -6, max: 6 },
|
|
1256
1283
|
style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
|
|
1257
1284
|
},
|
|
1258
|
-
|
|
1285
|
+
Ce
|
|
1259
1286
|
) : null,
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
/* @__PURE__ */
|
|
1287
|
+
/* @__PURE__ */ S("aside", { ref: je, className: [h.panel, e ? h.panelOpen : h.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
|
|
1288
|
+
fe && ye ? /* @__PURE__ */ s("div", { className: h.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: W, className: h.celebrationChip, children: ye }, xe) }) : null,
|
|
1289
|
+
/* @__PURE__ */ S("header", { className: [h.header, L ? h.headerSearchOpen : null].filter(Boolean).join(" "), children: [
|
|
1290
|
+
/* @__PURE__ */ s(
|
|
1264
1291
|
"button",
|
|
1265
1292
|
{
|
|
1266
1293
|
type: "button",
|
|
1267
|
-
className:
|
|
1268
|
-
"aria-label":
|
|
1269
|
-
"aria-expanded":
|
|
1294
|
+
className: h.searchIconButton,
|
|
1295
|
+
"aria-label": L ? "Search (expanded)" : "Search",
|
|
1296
|
+
"aria-expanded": L,
|
|
1270
1297
|
onClick: () => {
|
|
1271
|
-
|
|
1298
|
+
Q(!0);
|
|
1272
1299
|
},
|
|
1273
|
-
children: /* @__PURE__ */
|
|
1300
|
+
children: /* @__PURE__ */ s(Zt, { size: 18, "aria-hidden": "true" })
|
|
1274
1301
|
}
|
|
1275
1302
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1303
|
+
/* @__PURE__ */ S("div", { className: h.headerCenter, children: [
|
|
1304
|
+
/* @__PURE__ */ s("div", { className: h.headerTitleWrap, "aria-hidden": L, children: /* @__PURE__ */ s("h2", { className: h.title, children: K }) }),
|
|
1305
|
+
/* @__PURE__ */ s("div", { className: h.headerSearchWrap, "aria-hidden": !L, children: /* @__PURE__ */ S("div", { className: h.searchBar, children: [
|
|
1306
|
+
/* @__PURE__ */ s(
|
|
1280
1307
|
"input",
|
|
1281
1308
|
{
|
|
1282
|
-
ref:
|
|
1283
|
-
className:
|
|
1309
|
+
ref: w,
|
|
1310
|
+
className: h.searchInput,
|
|
1284
1311
|
type: "search",
|
|
1285
|
-
value:
|
|
1312
|
+
value: ee,
|
|
1286
1313
|
placeholder: "Search",
|
|
1287
|
-
onChange: (
|
|
1314
|
+
onChange: (l) => ue(l.target.value),
|
|
1288
1315
|
onBlur: () => {
|
|
1289
|
-
|
|
1316
|
+
ee.trim() === "" && Q(!1);
|
|
1290
1317
|
}
|
|
1291
1318
|
}
|
|
1292
1319
|
),
|
|
1293
|
-
|
|
1320
|
+
ee.trim() ? /* @__PURE__ */ s(
|
|
1294
1321
|
"button",
|
|
1295
1322
|
{
|
|
1296
1323
|
type: "button",
|
|
1297
|
-
className:
|
|
1298
|
-
onMouseDown: (
|
|
1299
|
-
|
|
1324
|
+
className: h.searchClearButton,
|
|
1325
|
+
onMouseDown: (l) => {
|
|
1326
|
+
l.preventDefault();
|
|
1300
1327
|
},
|
|
1301
1328
|
onClick: () => {
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1329
|
+
var l;
|
|
1330
|
+
ue(""), (l = w.current) == null || l.focus();
|
|
1304
1331
|
},
|
|
1305
1332
|
"aria-label": "Clear search",
|
|
1306
1333
|
children: "Clear"
|
|
@@ -1308,168 +1335,168 @@ function yr(o) {
|
|
|
1308
1335
|
) : null
|
|
1309
1336
|
] }) })
|
|
1310
1337
|
] }),
|
|
1311
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: t, disabled: i, className: h.closeButton, "aria-label": "Close", children: "×" })
|
|
1312
1339
|
] }),
|
|
1313
|
-
/* @__PURE__ */
|
|
1314
|
-
|
|
1315
|
-
n ? /* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */
|
|
1317
|
-
var
|
|
1318
|
-
const
|
|
1319
|
-
return /* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ S("div", { className: h.body, ref: at, children: [
|
|
1341
|
+
r ? /* @__PURE__ */ s("p", { className: h.muted, children: "Loading…" }) : null,
|
|
1342
|
+
n ? /* @__PURE__ */ s("p", { className: h.error, children: n }) : null,
|
|
1343
|
+
/* @__PURE__ */ s("div", { className: h.variants, children: /* @__PURE__ */ s("ul", { className: h.variantList, children: re.map((l) => {
|
|
1344
|
+
var ve, Ie, Pe, Ae;
|
|
1345
|
+
const u = G[l.id] ?? 0, v = b(l), N = g(l.selectedOptions), C = y(l), F = Z, M = Number(l.price), $ = F != null && Number.isFinite(F) && F > 0 && Number.isFinite(M), ce = $ ? Math.round(M * (1 - F / 100) * 100) / 100 : null;
|
|
1346
|
+
return /* @__PURE__ */ S(
|
|
1320
1347
|
"li",
|
|
1321
1348
|
{
|
|
1322
|
-
className: [
|
|
1323
|
-
"data-variant-row":
|
|
1349
|
+
className: [h.variantRow, l.availableForSale === !1 && h.variantRowSoldOut].filter(Boolean).join(" "),
|
|
1350
|
+
"data-variant-row": l.id,
|
|
1324
1351
|
children: [
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ S("div", { className: h.variantLeft, children: [
|
|
1353
|
+
/* @__PURE__ */ s("div", { className: h.variantThumb, "aria-hidden": "true", children: (ve = l.image) != null && ve.url ? /* @__PURE__ */ s(
|
|
1327
1354
|
"img",
|
|
1328
1355
|
{
|
|
1329
|
-
className:
|
|
1330
|
-
src:
|
|
1331
|
-
alt:
|
|
1356
|
+
className: h.variantThumbImg,
|
|
1357
|
+
src: l.image.url,
|
|
1358
|
+
alt: l.image.altText ?? C,
|
|
1332
1359
|
loading: "lazy"
|
|
1333
1360
|
}
|
|
1334
|
-
) : /* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
|
|
1340
|
-
/* @__PURE__ */
|
|
1341
|
-
|
|
1361
|
+
) : /* @__PURE__ */ s("div", { className: h.variantThumbFallback, children: ((Ae = (Pe = (Ie = l.product) == null ? void 0 : Ie.title) == null ? void 0 : Pe.slice(0, 1)) == null ? void 0 : Ae.toUpperCase()) ?? "•" }) }),
|
|
1362
|
+
/* @__PURE__ */ S("div", { className: h.variantInfo, children: [
|
|
1363
|
+
/* @__PURE__ */ s("div", { className: h.variantName, children: v }),
|
|
1364
|
+
N ? /* @__PURE__ */ s("div", { className: h.variantMeta, children: N }) : null,
|
|
1365
|
+
/* @__PURE__ */ S("div", { className: h.variantPriceRow, children: [
|
|
1366
|
+
$ ? /* @__PURE__ */ s("span", { className: h.variantCompareAt, children: E(Number.isFinite(M) ? M.toFixed(2) : l.price) }) : null,
|
|
1367
|
+
/* @__PURE__ */ s("span", { className: h.variantPrice, children: E(
|
|
1368
|
+
ce != null ? ce.toFixed(2) : Number.isFinite(M) ? M.toFixed(2) : l.price
|
|
1342
1369
|
) })
|
|
1343
1370
|
] })
|
|
1344
1371
|
] })
|
|
1345
1372
|
] }),
|
|
1346
|
-
|
|
1373
|
+
l.availableForSale === !1 ? /* @__PURE__ */ s("div", { className: h.soldOutContainer, children: /* @__PURE__ */ S("span", { className: h.soldOut, "aria-label": `${C} is sold out`, children: [
|
|
1347
1374
|
"Sold",
|
|
1348
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ s("br", {}),
|
|
1349
1376
|
"Out"
|
|
1350
|
-
] }) }) :
|
|
1377
|
+
] }) }) : u <= 0 ? /* @__PURE__ */ s(
|
|
1351
1378
|
"button",
|
|
1352
1379
|
{
|
|
1353
1380
|
type: "button",
|
|
1354
|
-
onClick: () =>
|
|
1355
|
-
disabled:
|
|
1356
|
-
className:
|
|
1357
|
-
"aria-label": `Add ${
|
|
1381
|
+
onClick: () => A(l.id, 1),
|
|
1382
|
+
disabled: i || be,
|
|
1383
|
+
className: h.addToBundleButton,
|
|
1384
|
+
"aria-label": `Add ${C} to bundle`,
|
|
1358
1385
|
children: "Add"
|
|
1359
1386
|
}
|
|
1360
|
-
) : /* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1387
|
+
) : /* @__PURE__ */ S("div", { className: h.qtyControls, children: [
|
|
1388
|
+
/* @__PURE__ */ s(
|
|
1362
1389
|
"button",
|
|
1363
1390
|
{
|
|
1364
1391
|
type: "button",
|
|
1365
|
-
onClick: () =>
|
|
1366
|
-
disabled:
|
|
1367
|
-
className:
|
|
1368
|
-
"aria-label": `Decrease ${
|
|
1392
|
+
onClick: () => A(l.id, u - 1),
|
|
1393
|
+
disabled: i || u <= 0,
|
|
1394
|
+
className: h.qtyButton,
|
|
1395
|
+
"aria-label": `Decrease ${C}`,
|
|
1369
1396
|
children: "−"
|
|
1370
1397
|
}
|
|
1371
1398
|
),
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ s("span", { className: h.qtyValue, "aria-label": `Quantity ${u}`, children: u }),
|
|
1400
|
+
/* @__PURE__ */ s(
|
|
1374
1401
|
"button",
|
|
1375
1402
|
{
|
|
1376
1403
|
type: "button",
|
|
1377
|
-
onClick: () =>
|
|
1378
|
-
disabled:
|
|
1379
|
-
className:
|
|
1380
|
-
"aria-label": `Increase ${
|
|
1404
|
+
onClick: () => A(l.id, u + 1),
|
|
1405
|
+
disabled: i || be,
|
|
1406
|
+
className: h.qtyButton,
|
|
1407
|
+
"aria-label": `Increase ${C}`,
|
|
1381
1408
|
children: "+"
|
|
1382
1409
|
}
|
|
1383
1410
|
)
|
|
1384
1411
|
] })
|
|
1385
1412
|
]
|
|
1386
1413
|
},
|
|
1387
|
-
|
|
1414
|
+
l.id
|
|
1388
1415
|
);
|
|
1389
1416
|
}) }) })
|
|
1390
1417
|
] }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
var
|
|
1394
|
-
const
|
|
1395
|
-
return /* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ S("footer", { className: h.footer, ref: D, children: [
|
|
1419
|
+
/* @__PURE__ */ s("div", { className: h.boxSummaryWindow, ref: ot, children: /* @__PURE__ */ s("div", { className: h.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Nt }).map((l, u) => {
|
|
1420
|
+
var ve, Ie, Pe, Ae;
|
|
1421
|
+
const v = We[u], N = Ct.get(u), C = !!v, F = !!N, M = F && !C, $ = N ? `${N.discountPercent}% off` : null, ce = C ? v.displayName : `Slot ${u + 1}`;
|
|
1422
|
+
return /* @__PURE__ */ S("div", { "data-box-slot": u, className: h.boxSlot, children: [
|
|
1423
|
+
/* @__PURE__ */ s(
|
|
1397
1424
|
"div",
|
|
1398
1425
|
{
|
|
1399
1426
|
className: [
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1427
|
+
h.boxItem,
|
|
1428
|
+
C ? h.boxItemFilled : h.boxItemPlaceholder,
|
|
1429
|
+
F ? h.boxItemThreshold : null,
|
|
1430
|
+
C ? h.boxItemClickable : null
|
|
1404
1431
|
].filter(Boolean).join(" "),
|
|
1405
|
-
role:
|
|
1406
|
-
tabIndex:
|
|
1407
|
-
onClick:
|
|
1408
|
-
onKeyDown:
|
|
1409
|
-
(
|
|
1432
|
+
role: C ? "button" : void 0,
|
|
1433
|
+
tabIndex: C ? 0 : void 0,
|
|
1434
|
+
onClick: C ? () => lt(v.id) : void 0,
|
|
1435
|
+
onKeyDown: C ? (Ge) => {
|
|
1436
|
+
(Ge.key === "Enter" || Ge.key === " ") && (Ge.preventDefault(), lt(v.id));
|
|
1410
1437
|
} : void 0,
|
|
1411
|
-
"aria-label":
|
|
1412
|
-
title:
|
|
1413
|
-
children:
|
|
1438
|
+
"aria-label": M && $ ? `${ce}. Unlocks ${$}.` : ce,
|
|
1439
|
+
title: M && $ ? `${ce} • Unlocks ${$}` : ce,
|
|
1440
|
+
children: C ? (ve = v.image) != null && ve.url ? /* @__PURE__ */ s(
|
|
1414
1441
|
"img",
|
|
1415
1442
|
{
|
|
1416
|
-
className:
|
|
1417
|
-
src:
|
|
1418
|
-
alt:
|
|
1443
|
+
className: h.boxItemImage,
|
|
1444
|
+
src: v.image.url,
|
|
1445
|
+
alt: v.image.altText ?? v.displayName,
|
|
1419
1446
|
loading: "lazy"
|
|
1420
1447
|
}
|
|
1421
|
-
) : /* @__PURE__ */
|
|
1448
|
+
) : /* @__PURE__ */ s("div", { className: h.boxItemFallback, "aria-hidden": "true", children: ((Ae = (Pe = (Ie = v.product) == null ? void 0 : Ie.title) == null ? void 0 : Pe.slice(0, 1)) == null ? void 0 : Ae.toUpperCase()) ?? "•" }) : M && $ ? /* @__PURE__ */ s("div", { className: h.boxItemDiscountText, children: $ }) : /* @__PURE__ */ s("div", { className: h.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1422
1449
|
}
|
|
1423
1450
|
),
|
|
1424
|
-
|
|
1425
|
-
] },
|
|
1451
|
+
F ? /* @__PURE__ */ s("div", { className: h.boxThresholdLabel, children: N.label }) : null
|
|
1452
|
+
] }, u);
|
|
1426
1453
|
}) }) }),
|
|
1427
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ s(
|
|
1428
1455
|
"div",
|
|
1429
1456
|
{
|
|
1430
|
-
className: [
|
|
1431
|
-
"aria-hidden":
|
|
1432
|
-
children: /* @__PURE__ */
|
|
1433
|
-
|
|
1434
|
-
|
|
1457
|
+
className: [h.ctaTotalsWrap, Me ? h.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
1458
|
+
"aria-hidden": !Me,
|
|
1459
|
+
children: /* @__PURE__ */ S("div", { className: h.ctaTotals, "aria-label": "Totals", children: [
|
|
1460
|
+
Z ? /* @__PURE__ */ S("span", { className: h.ctaDiscountBadge, children: [
|
|
1461
|
+
Z,
|
|
1435
1462
|
"% Discount"
|
|
1436
|
-
] }) : /* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1438
|
-
/* @__PURE__ */
|
|
1463
|
+
] }) : /* @__PURE__ */ s("span", {}),
|
|
1464
|
+
/* @__PURE__ */ s("span", { children: Z ? /* @__PURE__ */ S(Xe, { children: [
|
|
1465
|
+
/* @__PURE__ */ s("span", { className: h.ctaTotalsStrike, children: E(Be.toFixed(2)) }),
|
|
1439
1466
|
" ",
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
] }) : /* @__PURE__ */
|
|
1467
|
+
/* @__PURE__ */ s("span", { className: h.ctaTotalsPrice, children: E(It.toFixed(2)) })
|
|
1468
|
+
] }) : /* @__PURE__ */ s("span", { className: h.ctaTotalsPrice, children: E(Be.toFixed(2)) }) })
|
|
1442
1469
|
] })
|
|
1443
1470
|
}
|
|
1444
1471
|
),
|
|
1445
1472
|
(() => {
|
|
1446
|
-
const
|
|
1447
|
-
return
|
|
1448
|
-
/* @__PURE__ */
|
|
1473
|
+
const l = (c == null ? void 0 : c.ctaButtonMode) || "add_to_cart";
|
|
1474
|
+
return l === "add_to_cart_checkout" ? q > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: i ? "Adding…" : `Add ${q} more product${q === 1 ? "" : "s"}` }) : /* @__PURE__ */ S("div", { className: `${h.ctaButtonGroup} ${Ue ? h.ctaButtonGroupAnimating : ""}`, children: [
|
|
1475
|
+
/* @__PURE__ */ s(
|
|
1449
1476
|
"button",
|
|
1450
1477
|
{
|
|
1451
1478
|
type: "button",
|
|
1452
|
-
onClick:
|
|
1453
|
-
disabled: !
|
|
1454
|
-
className: `${
|
|
1455
|
-
children: /* @__PURE__ */
|
|
1479
|
+
onClick: te,
|
|
1480
|
+
disabled: !H,
|
|
1481
|
+
className: `${h.ctaDualLeft} ${Ue ? h.ctaDualLeftAnimating : ""}`,
|
|
1482
|
+
children: /* @__PURE__ */ s("span", { children: i ? "Adding…" : "Add to Basket" })
|
|
1456
1483
|
}
|
|
1457
1484
|
),
|
|
1458
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ s(
|
|
1459
1486
|
"button",
|
|
1460
1487
|
{
|
|
1461
1488
|
type: "button",
|
|
1462
|
-
onClick:
|
|
1463
|
-
disabled: !
|
|
1464
|
-
className: `${
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1489
|
+
onClick: ne,
|
|
1490
|
+
disabled: !H,
|
|
1491
|
+
className: `${h.ctaDualRight} ${Ue ? h.ctaDualRightAnimating : ""}`,
|
|
1492
|
+
children: /* @__PURE__ */ s("span", { children: i ? "Processing…" : "Checkout" })
|
|
1466
1493
|
}
|
|
1467
1494
|
)
|
|
1468
|
-
] }) :
|
|
1495
|
+
] }) : l === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: ne, disabled: !H, className: h.cta, children: i ? "Processing…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: i ? "Adding…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Add to Basket" });
|
|
1469
1496
|
})(),
|
|
1470
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ S("div", { className: h.poweredBy, children: [
|
|
1471
1498
|
"powered by ",
|
|
1472
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
|
|
1473
1500
|
] })
|
|
1474
1501
|
] })
|
|
1475
1502
|
] })
|
|
@@ -1477,18 +1504,388 @@ function yr(o) {
|
|
|
1477
1504
|
}
|
|
1478
1505
|
) : null;
|
|
1479
1506
|
}
|
|
1480
|
-
|
|
1507
|
+
const yi = "_panel_1n9m6_2", vi = "_header_1n9m6_20", wi = "_title_1n9m6_24", gi = "_status_1n9m6_32", xi = "_error_1n9m6_37", Ii = "_inactive_1n9m6_43", Ci = "_section_1n9m6_49", Ni = "_sectionTitle_1n9m6_54", Si = "_rulesVisual_1n9m6_107", Bi = "_rulesLabelsRow_1n9m6_114", Ti = "_rulesLinesRow_1n9m6_121", Ri = "_rulesLineLabelCell_1n9m6_128", ki = "_rulesLineLabel_1n9m6_128", Pi = "_rulesLine_1n9m6_121", Oi = "_rulesLineEmpty_1n9m6_162", Mi = "_rulesLineFilled_1n9m6_166", Fi = "_variants_1n9m6_170", Ai = "_variantList_1n9m6_178", Li = "_variantRow_1n9m6_186", Di = "_variantRowInteractive_1n9m6_198", $i = "_variantRowSelected_1n9m6_202", Ei = "_variantRowSoldOut_1n9m6_207", qi = "_variantMedia_1n9m6_211", Vi = "_variantContent_1n9m6_219", zi = "_variantHeader_1n9m6_227", Wi = "_variantTitle_1n9m6_233", Ui = "_variantImage_1n9m6_247", ji = "_variantImageFallback_1n9m6_255", Gi = "_variantMeta_1n9m6_268", Hi = "_variantPrice_1n9m6_273", Qi = "_variantFooterRow_1n9m6_279", Ki = "_variantActions_1n9m6_286", Yi = "_qtyActions_1n9m6_292", Xi = "_soldOut_1n9m6_343", Zi = "_qtyChip_1n9m6_351", Ji = "_qtyChipInteractive_1n9m6_366", er = "_qtyChipValue_1n9m6_370", tr = "_qtyChipPlus_1n9m6_376", nr = "_qtyChipClear_1n9m6_381", ir = "_qtyTrash_1n9m6_400", rr = "_footer_1n9m6_412", ar = "_boxSummaryWindow_1n9m6_417", or = "_boxSummaryRow_1n9m6_431", sr = "_boxSlot_1n9m6_439", lr = "_boxItem_1n9m6_448", cr = "_boxItemFilled_1n9m6_465", ur = "_boxItemPlaceholder_1n9m6_471", dr = "_boxItemThreshold_1n9m6_477", hr = "_boxItemClickable_1n9m6_485", mr = "_boxItemImage_1n9m6_494", fr = "_boxItemFallback_1n9m6_505", pr = "_boxItemPlus_1n9m6_518", _r = "_boxItemDiscountText_1n9m6_530", br = "_boxThresholdLabel_1n9m6_543", yr = "_totalsReveal_1n9m6_554", vr = "_totalsRevealOpen_1n9m6_562", wr = "_ctaTotalsWrap_1n9m6_567", gr = "_ctaTotalsWrapVisible_1n9m6_572", xr = "_ctaTotals_1n9m6_567", Ir = "_ctaDiscountBadge_1n9m6_587", Cr = "_ctaTotalsStrike_1n9m6_598", Nr = "_ctaTotalsPrice_1n9m6_604", Sr = "_cta_1n9m6_567", Br = "_ctaButtonGroup_1n9m6_636", Tr = "_ctaDualLeft_1n9m6_642", Rr = "_ctaDualRight_1n9m6_643", kr = "_poweredBy_1n9m6_670", f = {
|
|
1508
|
+
panel: yi,
|
|
1509
|
+
header: vi,
|
|
1510
|
+
title: wi,
|
|
1511
|
+
status: gi,
|
|
1512
|
+
error: xi,
|
|
1513
|
+
inactive: Ii,
|
|
1514
|
+
section: Ci,
|
|
1515
|
+
sectionTitle: Ni,
|
|
1516
|
+
rulesVisual: Si,
|
|
1517
|
+
rulesLabelsRow: Bi,
|
|
1518
|
+
rulesLinesRow: Ti,
|
|
1519
|
+
rulesLineLabelCell: Ri,
|
|
1520
|
+
rulesLineLabel: ki,
|
|
1521
|
+
rulesLine: Pi,
|
|
1522
|
+
rulesLineEmpty: Oi,
|
|
1523
|
+
rulesLineFilled: Mi,
|
|
1524
|
+
variants: Fi,
|
|
1525
|
+
variantList: Ai,
|
|
1526
|
+
variantRow: Li,
|
|
1527
|
+
variantRowInteractive: Di,
|
|
1528
|
+
variantRowSelected: $i,
|
|
1529
|
+
variantRowSoldOut: Ei,
|
|
1530
|
+
variantMedia: qi,
|
|
1531
|
+
variantContent: Vi,
|
|
1532
|
+
variantHeader: zi,
|
|
1533
|
+
variantTitle: Wi,
|
|
1534
|
+
variantImage: Ui,
|
|
1535
|
+
variantImageFallback: ji,
|
|
1536
|
+
variantMeta: Gi,
|
|
1537
|
+
variantPrice: Hi,
|
|
1538
|
+
variantFooterRow: Qi,
|
|
1539
|
+
variantActions: Ki,
|
|
1540
|
+
qtyActions: Yi,
|
|
1541
|
+
soldOut: Xi,
|
|
1542
|
+
qtyChip: Zi,
|
|
1543
|
+
qtyChipInteractive: Ji,
|
|
1544
|
+
qtyChipValue: er,
|
|
1545
|
+
qtyChipPlus: tr,
|
|
1546
|
+
qtyChipClear: nr,
|
|
1547
|
+
qtyTrash: ir,
|
|
1548
|
+
footer: rr,
|
|
1549
|
+
boxSummaryWindow: ar,
|
|
1550
|
+
boxSummaryRow: or,
|
|
1551
|
+
boxSlot: sr,
|
|
1552
|
+
boxItem: lr,
|
|
1553
|
+
boxItemFilled: cr,
|
|
1554
|
+
boxItemPlaceholder: ur,
|
|
1555
|
+
boxItemThreshold: dr,
|
|
1556
|
+
boxItemClickable: hr,
|
|
1557
|
+
boxItemImage: mr,
|
|
1558
|
+
boxItemFallback: fr,
|
|
1559
|
+
boxItemPlus: pr,
|
|
1560
|
+
boxItemDiscountText: _r,
|
|
1561
|
+
boxThresholdLabel: br,
|
|
1562
|
+
totalsReveal: yr,
|
|
1563
|
+
totalsRevealOpen: vr,
|
|
1564
|
+
ctaTotalsWrap: wr,
|
|
1565
|
+
ctaTotalsWrapVisible: gr,
|
|
1566
|
+
ctaTotals: xr,
|
|
1567
|
+
ctaDiscountBadge: Ir,
|
|
1568
|
+
ctaTotalsStrike: Cr,
|
|
1569
|
+
ctaTotalsPrice: Nr,
|
|
1570
|
+
cta: Sr,
|
|
1571
|
+
ctaButtonGroup: Br,
|
|
1572
|
+
ctaDualLeft: Tr,
|
|
1573
|
+
ctaDualRight: Rr,
|
|
1574
|
+
poweredBy: kr
|
|
1575
|
+
};
|
|
1576
|
+
function $r(o) {
|
|
1577
|
+
var le;
|
|
1578
|
+
const {
|
|
1579
|
+
loading: e,
|
|
1580
|
+
submitting: t,
|
|
1581
|
+
error: r,
|
|
1582
|
+
currencyCode: i,
|
|
1583
|
+
config: n,
|
|
1584
|
+
eligibleVariants: d,
|
|
1585
|
+
selections: c,
|
|
1586
|
+
selectionOrder: I,
|
|
1587
|
+
setQuantity: G,
|
|
1588
|
+
bundleSize: x,
|
|
1589
|
+
minRequired: A,
|
|
1590
|
+
canSubmit: P,
|
|
1591
|
+
submit: z,
|
|
1592
|
+
submitAndCheckout: H
|
|
1593
|
+
} = ze(), {
|
|
1594
|
+
className: te,
|
|
1595
|
+
showRules: ne = !0,
|
|
1596
|
+
showVariants: L = !0
|
|
1597
|
+
} = o, Q = (m) => {
|
|
1598
|
+
const p = Number.parseFloat(m);
|
|
1599
|
+
return Number.isFinite(p) ? String(Math.round(p)) : m;
|
|
1600
|
+
}, ee = (m) => {
|
|
1601
|
+
const p = (m ?? []).filter((a) => {
|
|
1602
|
+
var b, y;
|
|
1603
|
+
const _ = (b = a == null ? void 0 : a.name) == null ? void 0 : b.trim(), g = (y = a == null ? void 0 : a.value) == null ? void 0 : y.trim();
|
|
1604
|
+
return !(!_ || !g || _.toLowerCase() === "title");
|
|
1605
|
+
});
|
|
1606
|
+
return p.length ? p.map((a) => `${a.name}: ${a.value}`).join(" • ") : null;
|
|
1607
|
+
}, ue = (m) => {
|
|
1608
|
+
const p = Number(m);
|
|
1609
|
+
if (!Number.isFinite(p)) return m;
|
|
1610
|
+
if (i)
|
|
1611
|
+
try {
|
|
1612
|
+
return new Intl.NumberFormat(void 0, { style: "currency", currency: i }).format(p);
|
|
1613
|
+
} catch {
|
|
1614
|
+
}
|
|
1615
|
+
return `$${p.toFixed(2)}`;
|
|
1616
|
+
}, w = k(() => [...d].sort((m, p) => m.displayName.localeCompare(p.displayName)), [d]), D = k(() => [...(n == null ? void 0 : n.rules) ?? []].sort((m, p) => m.minBundleSize - p.minBundleSize), [n == null ? void 0 : n.rules]), W = k(() => Math.max(0, A - x), [x, A]), Y = k(() => {
|
|
1617
|
+
let m = null;
|
|
1618
|
+
for (const p of D)
|
|
1619
|
+
x >= p.minBundleSize && (m = p);
|
|
1620
|
+
return m;
|
|
1621
|
+
}, [x, D]), de = k(() => {
|
|
1622
|
+
if (!Y) return null;
|
|
1623
|
+
const m = Number.parseFloat(Y.discountPercent);
|
|
1624
|
+
return !Number.isFinite(m) || m <= 0 ? null : m;
|
|
1625
|
+
}, [Y]), Ce = D[0], Ne = !!(Ce && x >= Ce.minBundleSize), ie = k(() => {
|
|
1626
|
+
const m = new Map(d.map((a) => [a.id, a]));
|
|
1627
|
+
let p = 0;
|
|
1628
|
+
for (const [a, _] of Object.entries(c)) {
|
|
1629
|
+
const g = _ ?? 0;
|
|
1630
|
+
if (g <= 0) continue;
|
|
1631
|
+
const b = m.get(a), y = Number(b == null ? void 0 : b.price);
|
|
1632
|
+
Number.isFinite(y) && (p += y * g);
|
|
1633
|
+
}
|
|
1634
|
+
return Math.round(p * 100) / 100;
|
|
1635
|
+
}, [d, c]), oe = k(() => {
|
|
1636
|
+
if (!de) return ie;
|
|
1637
|
+
const m = ie * (1 - de / 100);
|
|
1638
|
+
return Math.round(m * 100) / 100;
|
|
1639
|
+
}, [de, ie]), we = k(() => D.length ? Math.max(...D.map((m) => m.minBundleSize)) : 0, [D]), ge = k(() => {
|
|
1640
|
+
const m = new Map(d.map((p) => [p.id, p]));
|
|
1641
|
+
return I.map((p) => m.get(p)).filter((p) => !!p);
|
|
1642
|
+
}, [d, I]), X = k(() => {
|
|
1643
|
+
var p;
|
|
1644
|
+
const m = /* @__PURE__ */ new Map();
|
|
1645
|
+
for (const a of D) {
|
|
1646
|
+
const _ = Math.max(0, a.minBundleSize - 1);
|
|
1647
|
+
m.set(_, {
|
|
1648
|
+
discountPercent: a.discountPercent,
|
|
1649
|
+
minBundleSize: a.minBundleSize,
|
|
1650
|
+
label: ((p = a.label) == null ? void 0 : p.trim()) || `Buy ${a.minBundleSize}+`
|
|
1651
|
+
});
|
|
1652
|
+
}
|
|
1653
|
+
return m;
|
|
1654
|
+
}, [D]), se = k(() => {
|
|
1655
|
+
const m = Number((n == null ? void 0 : n.maxBundleSize) ?? NaN), p = Number.isFinite(m) ? Math.floor(m) : 100;
|
|
1656
|
+
return Math.max(2, Math.min(100, p));
|
|
1657
|
+
}, [n == null ? void 0 : n.maxBundleSize]), ke = ((le = n == null ? void 0 : n.title) == null ? void 0 : le.trim()) || "Build your bundle", xe = k(() => Math.max(we || A, ge.length), [ge.length, we, A]), he = x >= se, ye = J(null), me = J(null), fe = J(x);
|
|
1658
|
+
V(() => {
|
|
1659
|
+
const m = fe.current;
|
|
1660
|
+
if (fe.current = x, x <= m) return;
|
|
1661
|
+
const p = me.current;
|
|
1662
|
+
if (!p) return;
|
|
1663
|
+
const a = D.some((y) => y.minBundleSize === x), _ = D.find((y) => y.minBundleSize > x), g = _ && a ? _.minBundleSize - 1 : _ ? null : x - 1;
|
|
1664
|
+
if (g == null || g < 0) return;
|
|
1665
|
+
const b = requestAnimationFrame(() => {
|
|
1666
|
+
const y = p.querySelector(`[data-box-slot="${g}"]`);
|
|
1667
|
+
if (!y) return;
|
|
1668
|
+
const R = p.getBoundingClientRect(), B = y.getBoundingClientRect().right - R.right;
|
|
1669
|
+
if (B <= 1) return;
|
|
1670
|
+
const E = Math.max(0, p.scrollWidth - p.clientWidth), K = Math.min(E, Math.max(0, p.scrollLeft + B));
|
|
1671
|
+
p.scrollTo({ left: K, behavior: "smooth" });
|
|
1672
|
+
});
|
|
1673
|
+
return () => cancelAnimationFrame(b);
|
|
1674
|
+
}, [x, D]);
|
|
1675
|
+
const pe = (m) => {
|
|
1676
|
+
const p = ye.current;
|
|
1677
|
+
if (!p) return;
|
|
1678
|
+
const a = p.querySelector(`[data-variant-row="${m}"]`);
|
|
1679
|
+
a && a.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1680
|
+
};
|
|
1681
|
+
return /* @__PURE__ */ S("section", { className: [f.panel, te].filter(Boolean).join(" "), "aria-busy": e, children: [
|
|
1682
|
+
/* @__PURE__ */ s("header", { className: f.header, children: /* @__PURE__ */ s("h2", { className: f.title, children: ke }) }),
|
|
1683
|
+
e ? /* @__PURE__ */ s("div", { className: f.status, children: "Loading…" }) : null,
|
|
1684
|
+
r ? /* @__PURE__ */ s("div", { className: f.error, children: r }) : null,
|
|
1685
|
+
!e && n && !n.isActive ? /* @__PURE__ */ s("div", { className: f.inactive, children: "Bundles are not active." }) : null,
|
|
1686
|
+
ne && D.length ? /* @__PURE__ */ s("div", { className: f.section, children: /* @__PURE__ */ S("div", { className: f.rulesVisual, children: [
|
|
1687
|
+
/* @__PURE__ */ s("div", { className: f.rulesLabelsRow, children: Array.from({ length: we }).map((m, p) => {
|
|
1688
|
+
const a = p + 1, _ = D.find((b) => b.minBundleSize === a), g = _ ? `${Q(_.discountPercent)}% off` : null;
|
|
1689
|
+
return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children: g ? /* @__PURE__ */ s("span", { className: f.rulesLineLabel, children: g }) : null }, a);
|
|
1690
|
+
}) }),
|
|
1691
|
+
/* @__PURE__ */ s("div", { className: f.rulesLinesRow, children: Array.from({ length: we }).map((m, p) => {
|
|
1692
|
+
const a = p + 1, _ = x >= a;
|
|
1693
|
+
return /* @__PURE__ */ s(
|
|
1694
|
+
"div",
|
|
1695
|
+
{
|
|
1696
|
+
className: [
|
|
1697
|
+
f.rulesLine,
|
|
1698
|
+
_ ? f.rulesLineFilled : f.rulesLineEmpty
|
|
1699
|
+
].filter(Boolean).join(" ")
|
|
1700
|
+
},
|
|
1701
|
+
a
|
|
1702
|
+
);
|
|
1703
|
+
}) })
|
|
1704
|
+
] }) }) : null,
|
|
1705
|
+
L ? /* @__PURE__ */ S("div", { className: f.section, ref: ye, children: [
|
|
1706
|
+
/* @__PURE__ */ s("div", { className: f.sectionTitle, children: "Select items" }),
|
|
1707
|
+
/* @__PURE__ */ s("div", { className: f.variants, children: /* @__PURE__ */ s("ul", { className: f.variantList, children: w.map((m) => {
|
|
1708
|
+
var b;
|
|
1709
|
+
const p = c[m.id] ?? 0, a = ee(m.selectedOptions), _ = m.availableForSale === !1, g = !_ && !he;
|
|
1710
|
+
return /* @__PURE__ */ S(
|
|
1711
|
+
"li",
|
|
1712
|
+
{
|
|
1713
|
+
className: [
|
|
1714
|
+
f.variantRow,
|
|
1715
|
+
g ? f.variantRowInteractive : null,
|
|
1716
|
+
p > 0 ? f.variantRowSelected : null,
|
|
1717
|
+
_ ? f.variantRowSoldOut : null
|
|
1718
|
+
].filter(Boolean).join(" "),
|
|
1719
|
+
"data-variant-row": m.id,
|
|
1720
|
+
role: g ? "button" : void 0,
|
|
1721
|
+
tabIndex: g ? 0 : void 0,
|
|
1722
|
+
onClick: g ? () => {
|
|
1723
|
+
G(m.id, p + 1);
|
|
1724
|
+
} : void 0,
|
|
1725
|
+
onKeyDown: g ? (y) => {
|
|
1726
|
+
(y.key === "Enter" || y.key === " ") && (y.preventDefault(), G(m.id, p + 1), pe(m.id));
|
|
1727
|
+
} : void 0,
|
|
1728
|
+
"aria-label": _ ? `${m.displayName} is sold out` : `Add ${m.displayName} to bundle`,
|
|
1729
|
+
children: [
|
|
1730
|
+
/* @__PURE__ */ s("div", { className: f.variantMedia, children: (b = m.image) != null && b.url ? /* @__PURE__ */ s(
|
|
1731
|
+
"img",
|
|
1732
|
+
{
|
|
1733
|
+
src: m.image.url,
|
|
1734
|
+
alt: m.image.altText ?? m.displayName,
|
|
1735
|
+
width: m.image.width ?? 64,
|
|
1736
|
+
height: m.image.height ?? 64,
|
|
1737
|
+
className: f.variantImage,
|
|
1738
|
+
loading: "lazy"
|
|
1739
|
+
}
|
|
1740
|
+
) : /* @__PURE__ */ s("div", { className: f.variantImageFallback, children: "Item" }) }),
|
|
1741
|
+
/* @__PURE__ */ S("div", { className: f.variantContent, children: [
|
|
1742
|
+
/* @__PURE__ */ S("div", { className: f.variantHeader, children: [
|
|
1743
|
+
/* @__PURE__ */ s("div", { className: f.variantTitle, children: m.displayName }),
|
|
1744
|
+
a ? /* @__PURE__ */ s("div", { className: f.variantMeta, children: a }) : null
|
|
1745
|
+
] }),
|
|
1746
|
+
/* @__PURE__ */ S("div", { className: f.variantFooterRow, children: [
|
|
1747
|
+
/* @__PURE__ */ s("div", { className: f.variantPrice, children: ue(m.price) }),
|
|
1748
|
+
/* @__PURE__ */ s("div", { className: f.variantActions, children: _ ? /* @__PURE__ */ s("div", { className: f.soldOut, "aria-label": `${m.displayName} is sold out`, children: "Sold Out" }) : /* @__PURE__ */ S("div", { className: f.qtyActions, children: [
|
|
1749
|
+
p > 0 ? /* @__PURE__ */ s(
|
|
1750
|
+
"button",
|
|
1751
|
+
{
|
|
1752
|
+
type: "button",
|
|
1753
|
+
className: f.qtyTrash,
|
|
1754
|
+
"aria-label": `Remove ${m.displayName} from bundle`,
|
|
1755
|
+
onClick: (y) => {
|
|
1756
|
+
y.stopPropagation(), G(m.id, 0);
|
|
1757
|
+
},
|
|
1758
|
+
onKeyDown: (y) => {
|
|
1759
|
+
y.stopPropagation();
|
|
1760
|
+
},
|
|
1761
|
+
children: /* @__PURE__ */ s(en, { size: 14 })
|
|
1762
|
+
}
|
|
1763
|
+
) : null,
|
|
1764
|
+
/* @__PURE__ */ s(
|
|
1765
|
+
"div",
|
|
1766
|
+
{
|
|
1767
|
+
className: [f.qtyChip, p > 0 ? f.qtyChipInteractive : null].filter(Boolean).join(" "),
|
|
1768
|
+
"aria-label": `${m.displayName} quantity ${p}`,
|
|
1769
|
+
onClick: (y) => {
|
|
1770
|
+
y.stopPropagation(), G(m.id, p + 1);
|
|
1771
|
+
},
|
|
1772
|
+
onKeyDown: (y) => {
|
|
1773
|
+
y.stopPropagation();
|
|
1774
|
+
},
|
|
1775
|
+
role: "button",
|
|
1776
|
+
tabIndex: 0,
|
|
1777
|
+
children: p <= 0 ? /* @__PURE__ */ s("span", { className: f.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ s(yt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ S(Xe, { children: [
|
|
1778
|
+
/* @__PURE__ */ s("span", { className: f.qtyChipValue, children: p }),
|
|
1779
|
+
/* @__PURE__ */ s(
|
|
1780
|
+
"button",
|
|
1781
|
+
{
|
|
1782
|
+
type: "button",
|
|
1783
|
+
className: f.qtyChipClear,
|
|
1784
|
+
"aria-label": `Add ${m.displayName}`,
|
|
1785
|
+
onClick: (y) => {
|
|
1786
|
+
y.stopPropagation(), G(m.id, p + 1);
|
|
1787
|
+
},
|
|
1788
|
+
onKeyDown: (y) => {
|
|
1789
|
+
y.stopPropagation();
|
|
1790
|
+
},
|
|
1791
|
+
children: /* @__PURE__ */ s(yt, { size: 12, strokeWidth: 2 })
|
|
1792
|
+
}
|
|
1793
|
+
)
|
|
1794
|
+
] })
|
|
1795
|
+
}
|
|
1796
|
+
)
|
|
1797
|
+
] }) })
|
|
1798
|
+
] })
|
|
1799
|
+
] })
|
|
1800
|
+
]
|
|
1801
|
+
},
|
|
1802
|
+
m.id
|
|
1803
|
+
);
|
|
1804
|
+
}) }) })
|
|
1805
|
+
] }) : null,
|
|
1806
|
+
/* @__PURE__ */ S("footer", { className: f.footer, children: [
|
|
1807
|
+
/* @__PURE__ */ s("div", { className: f.boxSummaryWindow, ref: me, children: /* @__PURE__ */ s("div", { className: f.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: xe }).map((m, p) => {
|
|
1808
|
+
var B, E, K, _e;
|
|
1809
|
+
const a = ge[p], _ = X.get(p), g = !!a, b = !!_, y = b && !g, R = _ ? `${_.discountPercent}% off` : null, U = g ? a.displayName : `Slot ${p + 1}`;
|
|
1810
|
+
return /* @__PURE__ */ S("div", { "data-box-slot": p, className: f.boxSlot, children: [
|
|
1811
|
+
/* @__PURE__ */ s(
|
|
1812
|
+
"div",
|
|
1813
|
+
{
|
|
1814
|
+
className: [
|
|
1815
|
+
f.boxItem,
|
|
1816
|
+
g ? f.boxItemFilled : f.boxItemPlaceholder,
|
|
1817
|
+
b ? f.boxItemThreshold : null,
|
|
1818
|
+
g ? f.boxItemClickable : null
|
|
1819
|
+
].filter(Boolean).join(" "),
|
|
1820
|
+
role: g ? "button" : void 0,
|
|
1821
|
+
tabIndex: g ? 0 : void 0,
|
|
1822
|
+
onClick: g ? () => pe(a.id) : void 0,
|
|
1823
|
+
onKeyDown: g ? (be) => {
|
|
1824
|
+
(be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(a.id));
|
|
1825
|
+
} : void 0,
|
|
1826
|
+
"aria-label": y && R ? `${U}. Unlocks ${R}.` : U,
|
|
1827
|
+
title: y && R ? `${U} • Unlocks ${R}` : U,
|
|
1828
|
+
children: g ? (B = a.image) != null && B.url ? /* @__PURE__ */ s(
|
|
1829
|
+
"img",
|
|
1830
|
+
{
|
|
1831
|
+
className: f.boxItemImage,
|
|
1832
|
+
src: a.image.url,
|
|
1833
|
+
alt: a.image.altText ?? a.displayName,
|
|
1834
|
+
width: 1,
|
|
1835
|
+
height: 1,
|
|
1836
|
+
loading: "lazy"
|
|
1837
|
+
}
|
|
1838
|
+
) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E = a.product) == null ? void 0 : E.title) == null ? void 0 : K.slice(0, 1)) == null ? void 0 : _e.toUpperCase()) ?? "•" }) : y && R ? /* @__PURE__ */ s("div", { className: f.boxItemDiscountText, children: R }) : /* @__PURE__ */ s("div", { className: f.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1839
|
+
}
|
|
1840
|
+
),
|
|
1841
|
+
b ? /* @__PURE__ */ s("div", { className: f.boxThresholdLabel, children: _.label }) : null
|
|
1842
|
+
] }, p);
|
|
1843
|
+
}) }) }),
|
|
1844
|
+
/* @__PURE__ */ s("div", { className: [f.totalsReveal, Ne ? f.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ s(
|
|
1845
|
+
"div",
|
|
1846
|
+
{
|
|
1847
|
+
className: [f.ctaTotalsWrap, Ne ? f.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
1848
|
+
"aria-hidden": !Ne,
|
|
1849
|
+
children: /* @__PURE__ */ S("div", { className: f.ctaTotals, "aria-label": "Totals", children: [
|
|
1850
|
+
de ? /* @__PURE__ */ S("span", { className: f.ctaDiscountBadge, children: [
|
|
1851
|
+
de,
|
|
1852
|
+
"% Discount"
|
|
1853
|
+
] }) : /* @__PURE__ */ s("span", {}),
|
|
1854
|
+
/* @__PURE__ */ s("span", { children: de ? /* @__PURE__ */ S(Xe, { children: [
|
|
1855
|
+
/* @__PURE__ */ s("span", { className: f.ctaTotalsStrike, children: ue(ie.toFixed(2)) }),
|
|
1856
|
+
" ",
|
|
1857
|
+
/* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(oe.toFixed(2)) })
|
|
1858
|
+
] }) : /* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(ie.toFixed(2)) }) })
|
|
1859
|
+
] })
|
|
1860
|
+
}
|
|
1861
|
+
) }),
|
|
1862
|
+
(() => {
|
|
1863
|
+
const m = (n == null ? void 0 : n.ctaButtonMode) || "add_to_cart";
|
|
1864
|
+
return m === "add_to_cart_checkout" ? W > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.cta, children: t ? "Adding…" : `Add ${W} more product${W === 1 ? "" : "s"}` }) : /* @__PURE__ */ S("div", { className: f.ctaButtonGroup, children: [
|
|
1865
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.ctaDualLeft, children: /* @__PURE__ */ s("span", { children: t ? "Adding…" : "Add to Basket" }) }),
|
|
1866
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: H, disabled: !P, className: f.ctaDualRight, children: /* @__PURE__ */ s("span", { children: t ? "Processing…" : "Checkout" }) })
|
|
1867
|
+
] }) : m === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: H, disabled: !P, className: f.cta, children: t ? "Processing…" : W > 0 ? `Add ${W} more product${W === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ s("button", { type: "button", onClick: z, disabled: !P, className: f.cta, children: t ? "Adding…" : W > 0 ? `Add ${W} more product${W === 1 ? "" : "s"}` : "Add to Basket" });
|
|
1868
|
+
})(),
|
|
1869
|
+
/* @__PURE__ */ S("div", { className: f.poweredBy, children: [
|
|
1870
|
+
"powered by",
|
|
1871
|
+
" ",
|
|
1872
|
+
/* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
|
|
1873
|
+
] })
|
|
1874
|
+
] })
|
|
1875
|
+
] });
|
|
1876
|
+
}
|
|
1877
|
+
function Ye(o) {
|
|
1481
1878
|
if (o != null && o.length)
|
|
1482
1879
|
return o.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
|
|
1483
1880
|
}
|
|
1484
|
-
function
|
|
1881
|
+
function vt(o) {
|
|
1485
1882
|
const e = /\/(\d+)$/.exec(o);
|
|
1486
1883
|
return e ? e[1] : o;
|
|
1487
1884
|
}
|
|
1488
|
-
function
|
|
1885
|
+
function Pr() {
|
|
1489
1886
|
window.location.reload();
|
|
1490
1887
|
}
|
|
1491
|
-
async function
|
|
1888
|
+
async function Ee(o, e) {
|
|
1492
1889
|
const t = await fetch(o, {
|
|
1493
1890
|
method: "POST",
|
|
1494
1891
|
headers: {
|
|
@@ -1498,43 +1895,43 @@ async function Fe(o, e) {
|
|
|
1498
1895
|
body: JSON.stringify(e)
|
|
1499
1896
|
});
|
|
1500
1897
|
if (!t.ok) {
|
|
1501
|
-
const
|
|
1502
|
-
throw new Error(
|
|
1898
|
+
const r = await t.text().catch(() => "");
|
|
1899
|
+
throw new Error(r || `Cart request failed: ${t.status}`);
|
|
1503
1900
|
}
|
|
1504
1901
|
return t.json().catch(() => null);
|
|
1505
1902
|
}
|
|
1506
|
-
function
|
|
1903
|
+
function Er() {
|
|
1507
1904
|
return {
|
|
1508
1905
|
async linesAdd(o) {
|
|
1509
1906
|
const e = o.map((t) => ({
|
|
1510
|
-
id:
|
|
1907
|
+
id: vt(t.merchandiseId),
|
|
1511
1908
|
quantity: t.quantity,
|
|
1512
|
-
properties:
|
|
1909
|
+
properties: Ye(t.attributes)
|
|
1513
1910
|
}));
|
|
1514
|
-
await
|
|
1911
|
+
await Ee("/cart/add.js", { items: e });
|
|
1515
1912
|
},
|
|
1516
1913
|
async linesAddForCheckout(o) {
|
|
1517
1914
|
const e = o.map((t) => ({
|
|
1518
|
-
id:
|
|
1915
|
+
id: vt(t.merchandiseId),
|
|
1519
1916
|
quantity: t.quantity,
|
|
1520
|
-
properties:
|
|
1917
|
+
properties: Ye(t.attributes)
|
|
1521
1918
|
}));
|
|
1522
|
-
await
|
|
1919
|
+
await Ee("/cart/add.js", { items: e });
|
|
1523
1920
|
},
|
|
1524
1921
|
async linesUpdate(o) {
|
|
1525
1922
|
for (const e of o)
|
|
1526
|
-
await
|
|
1923
|
+
await Ee("/cart/change.js", {
|
|
1527
1924
|
id: e.id,
|
|
1528
1925
|
quantity: e.quantity,
|
|
1529
|
-
properties:
|
|
1926
|
+
properties: Ye(e.attributes)
|
|
1530
1927
|
});
|
|
1531
1928
|
},
|
|
1532
1929
|
async linesRemove(o) {
|
|
1533
1930
|
for (const e of o)
|
|
1534
|
-
await
|
|
1931
|
+
await Ee("/cart/change.js", { id: e, quantity: 0 });
|
|
1535
1932
|
},
|
|
1536
1933
|
openCartUI() {
|
|
1537
|
-
window.setTimeout(() =>
|
|
1934
|
+
window.setTimeout(() => Pr(), 0);
|
|
1538
1935
|
},
|
|
1539
1936
|
navigateToCheckout() {
|
|
1540
1937
|
window.location.href = "/checkout";
|
|
@@ -1542,12 +1939,13 @@ function gr() {
|
|
|
1542
1939
|
};
|
|
1543
1940
|
}
|
|
1544
1941
|
export {
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1942
|
+
Dr as BundleBuilderDrawer,
|
|
1943
|
+
$r as BundleBuilderPanel,
|
|
1944
|
+
Lr as BundleButton,
|
|
1945
|
+
$e as BundleLineAttributeKeys,
|
|
1946
|
+
Fr as BundleProvider,
|
|
1947
|
+
Er as createLiquidCartAdapter,
|
|
1948
|
+
ze as useBundleBuilder,
|
|
1949
|
+
Ar as useBundleBuilderDrawer
|
|
1552
1950
|
};
|
|
1553
1951
|
//# sourceMappingURL=index.js.map
|