@best-bundles/bundle-ui 0.0.41 → 0.0.43
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.map +1 -1
- package/dist/context/BundleProvider.d.ts +5 -0
- package/dist/context/BundleProvider.d.ts.map +1 -1
- package/dist/i18n.d.ts +8 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1565 -1412
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.css +1 -1
- package/dist/liquid/bundle-ui.iife.js +19 -19
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/dist/liquid/iife.d.ts +3 -0
- package/dist/liquid/iife.d.ts.map +1 -1
- package/dist/stories/BundleBuilderPanel.stories.d.ts +6 -2
- package/dist/stories/BundleBuilderPanel.stories.d.ts.map +1 -1
- package/dist/stories/BundleUI.stories.d.ts +11 -6
- package/dist/stories/BundleUI.stories.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
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_ta0om_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_ta0om_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_ta0om_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_ta0om_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_ta0om_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_ta0om_74{opacity:1}._backdropClosed_ta0om_78{opacity:0}._panel_ta0om_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_ta0om_103{animation:_bbSlideInFromRight_ta0om_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_ta0om_107{animation:_bbSlideOutToRight_ta0om_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_ta0om_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_ta0om_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_ta0om_1{transition:none}._celebrationChip_ta0om_23,._panelOpen_ta0om_103,._panelClosed_ta0om_107{animation:none}}._header_ta0om_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_ta0om_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_ta0om_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_ta0om_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;padding:0}._searchIconButton_ta0om_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_ta0om_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_ta0om_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_ta0om_199{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_ta0om_211 ._headerTitleWrap_ta0om_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_ta0om_211 ._headerSearchWrap_ta0om_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_ta0om_223{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_ta0om_235{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_ta0om_235::-webkit-search-cancel-button,._searchInput_ta0om_235::-webkit-search-decoration,._searchInput_ta0om_235::-webkit-search-results-button,._searchInput_ta0om_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_ta0om_256{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_ta0om_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_ta0om_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_ta0om_278{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;padding:0}._closeButton_ta0om_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_ta0om_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_ta0om_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_ta0om_195,._headerSearchWrap_ta0om_199{transition:none}}._body_ta0om_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_ta0om_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_ta0om_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_ta0om_327{margin-top:4px}._variantList_ta0om_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_ta0om_339{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_ta0om_347{opacity:.65}._variantLeft_ta0om_351{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_ta0om_358{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_ta0om_358:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_ta0om_358:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_ta0om_358:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_ta0om_386{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_ta0om_394{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_ta0om_386{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._stockLimitNotice_ta0om_412{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:center}._variantThumb_ta0om_421{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_ta0om_431{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_ta0om_438{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_ta0om_448{min-width:0}._variantName_ta0om_452{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_ta0om_461{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_ta0om_469{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_ta0om_476{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_ta0om_469{font-size:13px;font-weight:800}._qtyControls_ta0om_487{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_ta0om_493{display:grid;justify-items:center;gap:4px}._qtyButton_ta0om_499{padding:0;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_ta0om_499:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_ta0om_499:disabled{opacity:.6;cursor:not-allowed}._qtyButton_ta0om_499:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_ta0om_525{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_ta0om_532{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_ta0om_540{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_ta0om_540 a{color:inherit;text-decoration:none}._boxSummaryWindow_ta0om_552{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_ta0om_552::-webkit-scrollbar{display:none}._boxSummaryRow_ta0om_570{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_ta0om_578{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_ta0om_587{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_ta0om_599{cursor:pointer}._boxItemClickable_ta0om_599:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_ta0om_608{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_ta0om_619{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_ta0om_625{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_ta0om_631{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_ta0om_639{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_ta0om_647{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_ta0om_654{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_ta0om_661{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_ta0om_672{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_ta0om_679{gap:0}._cta_ta0om_672{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_ta0om_695{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_ta0om_707{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_ta0om_725{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_ta0om_725>span{opacity:0}._ctaDualRight_ta0om_738{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_ta0om_754{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_ta0om_754>span{opacity:0}._ctaTotals_ta0om_765{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_ta0om_773{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_ta0om_787{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_ta0om_800{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_ta0om_807{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_ta0om_814{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_ta0om_787{transition:none}}._cta_ta0om_672:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_ta0om_672:disabled{opacity:.6;cursor:not-allowed}._cta_ta0om_672:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_ta0om_695:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_ta0om_695:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_ta0om_695:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_ta0om_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_ta0om_707:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_ta0om_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_ta0om_738:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_ta0om_738:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_ta0om_738:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_ta0om_883{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_ta0om_1{padding:0;justify-content:stretch}._panel_ta0om_82{width:100%;height:100%;border-radius:0}}._panel_96rr4_2 button,._panel_96rr4_2 input,._panel_96rr4_2 [role=button]{box-sizing:border-box;margin:0}._panel_96rr4_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_96rr4_20{text-align:start}._title_96rr4_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_96rr4_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_96rr4_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_96rr4_43{font-size:13px;color:#b45309;font-weight:600}._section_96rr4_49{display:grid;gap:6px}._sectionTitle_96rr4_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_96rr4_63{display:flex;justify-content:center;gap:6px}._rulesList_96rr4_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_96rr4_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_96rr4_92{font-weight:600;font-size:13px}._ruleDiscount_96rr4_97{font-weight:700;font-size:13px}._ruleLabel_96rr4_102{font-size:12px;opacity:.7}._rulesVisual_96rr4_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_96rr4_114,._rulesLinesRow_96rr4_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_96rr4_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_96rr4_128:empty{display:flex!important}._rulesLineLabel_96rr4_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_96rr4_145{height:1em}._rulesLine_96rr4_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_96rr4_121:empty{display:block!important}._rulesLineEmpty_96rr4_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_96rr4_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_96rr4_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_96rr4_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_96rr4_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_96rr4_198{cursor:pointer}._variantRowSelected_96rr4_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_96rr4_207{opacity:.65}._variantMedia_96rr4_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_96rr4_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_96rr4_227{display:flex;flex-direction:column;gap:4px}._variantTitle_96rr4_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_96rr4_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_96rr4_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_96rr4_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_96rr4_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_96rr4_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_96rr4_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_96rr4_286{display:grid;align-items:end;justify-items:end}._qtyActions_96rr4_292{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_96rr4_298{display:grid;justify-items:end;gap:4px}._variantUnavailable_96rr4_304{display:none}._qtyControls_96rr4_308{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_96rr4_318{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_96rr4_318:disabled{cursor:not-allowed;opacity:.4}._qtyButton_96rr4_318:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_96rr4_342{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_96rr4_349{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_96rr4_357{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;text-align:end}._qtyChip_96rr4_366{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_96rr4_381{cursor:pointer}._qtyChipValue_96rr4_385{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_96rr4_391{margin-bottom:-3px;font-weight:500}._qtyChipClear_96rr4_396{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_96rr4_366:hover ._qtyChipClear_96rr4_396{background:#0f172a;color:#fff}._qtyChipClear_96rr4_396:disabled{cursor:not-allowed;opacity:.45}._qtyChip_96rr4_366:hover ._qtyChipClear_96rr4_396:disabled{background:#fff;color:#0f172a}._qtyTrash_96rr4_425{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_96rr4_437{display:grid;padding-top:6px}._boxSummaryWindow_96rr4_442{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_96rr4_442::-webkit-scrollbar{display:none}._boxSummaryRow_96rr4_456{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_96rr4_464{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_96rr4_473{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_96rr4_473:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_96rr4_490{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_96rr4_496{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_96rr4_502{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_96rr4_510{cursor:pointer}._boxItemClickable_96rr4_510:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_96rr4_519{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_96rr4_530{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_96rr4_543{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_96rr4_555{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_96rr4_568{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_96rr4_579{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_96rr4_587{max-height:80px;opacity:1}._ctaTotalsWrap_96rr4_592{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_96rr4_597{opacity:1}._ctaTotals_96rr4_592{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_96rr4_612{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_96rr4_623{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_96rr4_629{font-weight:700;color:#0f172a}._cta_96rr4_592{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_96rr4_592:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_96rr4_592:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_96rr4_661{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_96rr4_667,._ctaDualRight_96rr4_668{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_96rr4_667{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_96rr4_668{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_96rr4_667:disabled,._ctaDualRight_96rr4_668:disabled{cursor:not-allowed;opacity:.6}._poweredBy_96rr4_695{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_96rr4_695 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_96rr4_2{padding:16px}._variantRow_96rr4_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_96rr4_308{justify-self:start}._variantDetailsRow_96rr4_239{grid-template-columns:1fr}}')),document.head.appendChild(r)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { jsx as l, jsxs 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_1i4y2_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_1i4y2_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_1i4y2_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_1i4y2_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_1i4y2_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_1i4y2_74{opacity:1}._backdropClosed_1i4y2_78{opacity:0}._panel_1i4y2_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_1i4y2_103{animation:_bbSlideInFromRight_1i4y2_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_1i4y2_107{animation:_bbSlideOutToRight_1i4y2_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_1i4y2_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_1i4y2_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_1i4y2_1{transition:none}._celebrationChip_1i4y2_23,._panelOpen_1i4y2_103,._panelClosed_1i4y2_107{animation:none}}._header_1i4y2_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_1i4y2_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_1i4y2_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_1i4y2_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;padding:0}._searchIconButton_1i4y2_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_1i4y2_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_1i4y2_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_1i4y2_199{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_1i4y2_211 ._headerTitleWrap_1i4y2_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_1i4y2_211 ._headerSearchWrap_1i4y2_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_1i4y2_223{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_1i4y2_235{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_1i4y2_235::-webkit-search-cancel-button,._searchInput_1i4y2_235::-webkit-search-decoration,._searchInput_1i4y2_235::-webkit-search-results-button,._searchInput_1i4y2_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_1i4y2_256{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_1i4y2_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_1i4y2_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_1i4y2_278{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;padding:0}._closeButton_1i4y2_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_1i4y2_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_1i4y2_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_1i4y2_195,._headerSearchWrap_1i4y2_199{transition:none}}._body_1i4y2_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_1i4y2_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_1i4y2_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_1i4y2_327{margin-top:4px}._variantList_1i4y2_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1i4y2_339{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_1i4y2_347{opacity:.65}._variantLeft_1i4y2_351{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_1i4y2_358{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_1i4y2_358:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_1i4y2_358:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_1i4y2_358:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_1i4y2_386{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_1i4y2_394{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_1i4y2_386{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._stockLimitNotice_1i4y2_412{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:center}._variantThumb_1i4y2_421{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_1i4y2_431{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_1i4y2_438{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_1i4y2_448{min-width:0}._variantName_1i4y2_452{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_1i4y2_461{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_1i4y2_469{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_1i4y2_476{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_1i4y2_469{font-size:13px;font-weight:800}._qtyControls_1i4y2_487{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_1i4y2_493{display:grid;justify-items:center;gap:4px}._qtyButton_1i4y2_499{padding:0;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_1i4y2_499:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_1i4y2_499:disabled{opacity:.6;cursor:not-allowed}._qtyButton_1i4y2_499:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1i4y2_525{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_1i4y2_532{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_1i4y2_540{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_1i4y2_540 a{color:inherit;text-decoration:none}._boxSummaryWindow_1i4y2_552{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_1i4y2_552::-webkit-scrollbar{display:none}._boxSummaryRow_1i4y2_570{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1i4y2_578{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_1i4y2_587{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_1i4y2_599{cursor:pointer}._boxItemClickable_1i4y2_599:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_1i4y2_608{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_1i4y2_619{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_1i4y2_625{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_1i4y2_631{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_1i4y2_639{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_1i4y2_647{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_1i4y2_654{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_1i4y2_661{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_1i4y2_672{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_1i4y2_679{gap:0}._cta_1i4y2_672{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_1i4y2_695{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_1i4y2_707{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_1i4y2_725{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_1i4y2_725>span{opacity:0}._ctaDualRight_1i4y2_738{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_1i4y2_754{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_1i4y2_754>span{opacity:0}._ctaTotals_1i4y2_765{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_1i4y2_773{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_1i4y2_787{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_1i4y2_800{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_1i4y2_807{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_1i4y2_814{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_1i4y2_787{transition:none}}._cta_1i4y2_672:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_1i4y2_672:disabled{opacity:.6;cursor:not-allowed}._cta_1i4y2_672:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_1i4y2_695:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_1i4y2_695:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_1i4y2_695:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_1i4y2_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1i4y2_707:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_1i4y2_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_1i4y2_738:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_1i4y2_738:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_1i4y2_738:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_1i4y2_883{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_1i4y2_1{padding:0;justify-content:stretch}._panel_1i4y2_82{width:100%;height:100%;border-radius:0}}._panel_96rr4_2 button,._panel_96rr4_2 input,._panel_96rr4_2 [role=button]{box-sizing:border-box;margin:0}._panel_96rr4_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_96rr4_20{text-align:start}._title_96rr4_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_96rr4_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_96rr4_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_96rr4_43{font-size:13px;color:#b45309;font-weight:600}._section_96rr4_49{display:grid;gap:6px}._sectionTitle_96rr4_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_96rr4_63{display:flex;justify-content:center;gap:6px}._rulesList_96rr4_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_96rr4_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_96rr4_92{font-weight:600;font-size:13px}._ruleDiscount_96rr4_97{font-weight:700;font-size:13px}._ruleLabel_96rr4_102{font-size:12px;opacity:.7}._rulesVisual_96rr4_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_96rr4_114,._rulesLinesRow_96rr4_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_96rr4_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_96rr4_128:empty{display:flex!important}._rulesLineLabel_96rr4_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_96rr4_145{height:1em}._rulesLine_96rr4_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_96rr4_121:empty{display:block!important}._rulesLineEmpty_96rr4_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_96rr4_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_96rr4_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_96rr4_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_96rr4_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_96rr4_198{cursor:pointer}._variantRowSelected_96rr4_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_96rr4_207{opacity:.65}._variantMedia_96rr4_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_96rr4_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_96rr4_227{display:flex;flex-direction:column;gap:4px}._variantTitle_96rr4_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_96rr4_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_96rr4_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_96rr4_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_96rr4_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_96rr4_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_96rr4_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_96rr4_286{display:grid;align-items:end;justify-items:end}._qtyActions_96rr4_292{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_96rr4_298{display:grid;justify-items:end;gap:4px}._variantUnavailable_96rr4_304{display:none}._qtyControls_96rr4_308{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_96rr4_318{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_96rr4_318:disabled{cursor:not-allowed;opacity:.4}._qtyButton_96rr4_318:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_96rr4_342{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_96rr4_349{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_96rr4_357{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;text-align:end}._qtyChip_96rr4_366{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_96rr4_381{cursor:pointer}._qtyChipValue_96rr4_385{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_96rr4_391{margin-bottom:-3px;font-weight:500}._qtyChipClear_96rr4_396{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_96rr4_366:hover ._qtyChipClear_96rr4_396{background:#0f172a;color:#fff}._qtyChipClear_96rr4_396:disabled{cursor:not-allowed;opacity:.45}._qtyChip_96rr4_366:hover ._qtyChipClear_96rr4_396:disabled{background:#fff;color:#0f172a}._qtyTrash_96rr4_425{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_96rr4_437{display:grid;padding-top:6px}._boxSummaryWindow_96rr4_442{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_96rr4_442::-webkit-scrollbar{display:none}._boxSummaryRow_96rr4_456{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_96rr4_464{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_96rr4_473{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_96rr4_473:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_96rr4_490{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_96rr4_496{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_96rr4_502{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_96rr4_510{cursor:pointer}._boxItemClickable_96rr4_510:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_96rr4_519{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_96rr4_530{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_96rr4_543{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_96rr4_555{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_96rr4_568{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_96rr4_579{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_96rr4_587{max-height:80px;opacity:1}._ctaTotalsWrap_96rr4_592{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_96rr4_597{opacity:1}._ctaTotals_96rr4_592{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_96rr4_612{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_96rr4_623{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_96rr4_629{font-weight:700;color:#0f172a}._cta_96rr4_592{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_96rr4_592:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_96rr4_592:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_96rr4_661{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_96rr4_667,._ctaDualRight_96rr4_668{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_96rr4_667{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_96rr4_668{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_96rr4_667:disabled,._ctaDualRight_96rr4_668:disabled{cursor:not-allowed;opacity:.6}._poweredBy_96rr4_695{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_96rr4_695 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_96rr4_2{padding:16px}._variantRow_96rr4_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_96rr4_308{justify-self:start}._variantDetailsRow_96rr4_239{grid-template-columns:1fr}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { jsx as l, jsxs as R, Fragment as kt } from "react/jsx-runtime";
|
|
3
|
+
import vt, { useCallback as J, useState as j, useRef as U, useEffect as O, useMemo as L, createContext as Qt, useContext as Gt, forwardRef as zt, createElement as Tt } from "react";
|
|
4
|
+
const _t = {
|
|
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
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const
|
|
10
|
+
async function Yt(n) {
|
|
11
|
+
const e = new URL("/api/public/bundle-configs-active", n.apiBaseUrl);
|
|
12
|
+
e.searchParams.set("shop", n.shop);
|
|
13
|
+
const a = await (await fetch(e, {
|
|
14
14
|
method: "GET",
|
|
15
|
-
signal:
|
|
15
|
+
signal: n.signal,
|
|
16
16
|
headers: { "Content-Type": "application/json" }
|
|
17
17
|
})).json().catch(() => null);
|
|
18
|
-
return !
|
|
18
|
+
return !a || typeof a != "object" ? { ok: !1, error: "Invalid response." } : a;
|
|
19
19
|
}
|
|
20
|
-
async function
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const
|
|
20
|
+
async function Kt(n) {
|
|
21
|
+
const e = new URL("/api/public/bundle-config", n.apiBaseUrl);
|
|
22
|
+
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle), n.fresh && e.searchParams.set("fresh", "1");
|
|
23
|
+
const a = await (await fetch(e, {
|
|
24
24
|
method: "GET",
|
|
25
|
-
signal:
|
|
25
|
+
signal: n.signal,
|
|
26
26
|
headers: { "Content-Type": "application/json" }
|
|
27
27
|
})).json().catch(() => null);
|
|
28
|
-
return !
|
|
28
|
+
return !a || typeof a != "object" ? { ok: !1, error: "Invalid response." } : a;
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
30
|
+
async function Xt(n) {
|
|
31
|
+
const e = new URL("/api/public/bundle-config-status", n.apiBaseUrl);
|
|
32
|
+
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle);
|
|
33
|
+
const a = await (await fetch(e, {
|
|
34
34
|
method: "GET",
|
|
35
|
-
signal:
|
|
35
|
+
signal: n.signal,
|
|
36
36
|
headers: { "Content-Type": "application/json" }
|
|
37
37
|
})).json().catch(() => null);
|
|
38
|
-
return !
|
|
38
|
+
return !a || typeof a != "object" ? { ok: !1, error: "Invalid response." } : a;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
if (!
|
|
42
|
-
if (
|
|
43
|
-
const
|
|
44
|
-
return !Number.isFinite(
|
|
40
|
+
function xt(n) {
|
|
41
|
+
if (!n || n.availableForSale === !1) return 0;
|
|
42
|
+
if (n.inventoryPolicy === "CONTINUE" || n.sellableOnlineQuantity == null) return Number.POSITIVE_INFINITY;
|
|
43
|
+
const e = Number(n.sellableOnlineQuantity);
|
|
44
|
+
return !Number.isFinite(e) || e <= 0 && n.availableForSale === !0 ? Number.POSITIVE_INFINITY : Math.max(0, Math.floor(e));
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
46
|
+
const Ft = "bb_anonymous_user_id";
|
|
47
|
+
function pt() {
|
|
48
48
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
49
49
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
50
50
|
try {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
54
|
-
let
|
|
51
|
+
const n = localStorage.getItem(Ft);
|
|
52
|
+
if (n && typeof n == "string" && n.length > 0)
|
|
53
|
+
return n;
|
|
54
|
+
let e;
|
|
55
55
|
try {
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
|
|
56
|
+
const t = globalThis.crypto;
|
|
57
|
+
if (t != null && t.randomUUID)
|
|
58
|
+
e = t.randomUUID();
|
|
59
59
|
else
|
|
60
60
|
throw new Error("crypto.randomUUID not available");
|
|
61
61
|
} catch {
|
|
62
|
-
|
|
62
|
+
e = `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
63
63
|
}
|
|
64
|
-
return localStorage.setItem(
|
|
64
|
+
return localStorage.setItem(Ft, e), e;
|
|
65
65
|
} catch {
|
|
66
66
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
async function
|
|
69
|
+
async function lt(n, e, t) {
|
|
70
70
|
if (!(typeof window > "u"))
|
|
71
71
|
try {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const i = await fetch(
|
|
72
|
+
const a = new URL(n, window.location.origin);
|
|
73
|
+
a.searchParams.set("shop", e);
|
|
74
|
+
const i = await fetch(a, {
|
|
75
75
|
method: "POST",
|
|
76
76
|
headers: {
|
|
77
77
|
"Content-Type": "application/json"
|
|
78
78
|
},
|
|
79
|
-
body: JSON.stringify(
|
|
79
|
+
body: JSON.stringify(t),
|
|
80
80
|
// Don't wait for response - fire and forget
|
|
81
81
|
keepalive: !0
|
|
82
82
|
});
|
|
@@ -84,23 +84,182 @@ async function te(a, t, e) {
|
|
|
84
84
|
`[Bundle Analytics] Event tracking failed with status ${i.status}:`,
|
|
85
85
|
await i.text().catch(() => "Unable to read response")
|
|
86
86
|
);
|
|
87
|
-
} catch (
|
|
88
|
-
console.warn("[Bundle Analytics] Failed to track event:",
|
|
87
|
+
} catch (a) {
|
|
88
|
+
console.warn("[Bundle Analytics] Failed to track event:", a);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
const ft = {
|
|
92
|
+
"bundle.title.default": "Build your bundle",
|
|
93
|
+
"bundle.loading": "Loading...",
|
|
94
|
+
"bundle.inactive": "Bundles are not active.",
|
|
95
|
+
"bundle.drawer.aria": "Bundle builder",
|
|
96
|
+
"bundle.search": "Search",
|
|
97
|
+
"bundle.search.expanded": "Search (expanded)",
|
|
98
|
+
"bundle.search.placeholder": "Search",
|
|
99
|
+
"bundle.search.clear": "Clear search",
|
|
100
|
+
"bundle.close": "Close",
|
|
101
|
+
"bundle.section.discount_tiers": "Discount tiers",
|
|
102
|
+
"bundle.section.your_bundle": "Your bundle",
|
|
103
|
+
"bundle.section.select_items": "Choose items",
|
|
104
|
+
"bundle.select.items": "Select items",
|
|
105
|
+
"bundle.size.min": "(min {{min}})",
|
|
106
|
+
"bundle.stock.max_reached": "Max Reached",
|
|
107
|
+
"bundle.stock.max_added": "Max Added To Cart",
|
|
108
|
+
"bundle.stock.sold_out": "Sold Out",
|
|
109
|
+
"bundle.item.generic": "Item",
|
|
110
|
+
"bundle.slot": "Slot {{slot}}",
|
|
111
|
+
"bundle.unlocks": "Unlocks {{discount}}",
|
|
112
|
+
"bundle.totals": "Totals",
|
|
113
|
+
"bundle.discount.badge": "{{discount}}% Discount",
|
|
114
|
+
"bundle.discount.off_label": "{{discount}}% off",
|
|
115
|
+
"bundle.celebration.received_discount": "You received a {{discount}}% discount!",
|
|
116
|
+
"bundle.cta.adding": "Adding...",
|
|
117
|
+
"bundle.cta.processing": "Processing...",
|
|
118
|
+
"bundle.cta.checkout": "Checkout",
|
|
119
|
+
"bundle.cta.add_to_bundle": "Add",
|
|
120
|
+
"bundle.cta.add_to_basket": "Add to Basket",
|
|
121
|
+
"bundle.cta.add_more": "Add {{count}} more {{productWord}}",
|
|
122
|
+
"bundle.powered_by": "powered by",
|
|
123
|
+
"bundle.button.default": "Build a bundle",
|
|
124
|
+
"bundle.provider.inactive_error": "Bundle is inactive.",
|
|
125
|
+
"bundle.provider.load_error": "Failed to load bundle config.",
|
|
126
|
+
"bundle.provider.stock_error": "Some bundle items are no longer available in the requested quantity. Please review your selection.",
|
|
127
|
+
"bundle.provider.add_error": "We couldn't add this bundle right now. Please try again.",
|
|
128
|
+
"bundle.a11y.add_to_bundle": "Add {{name}} to bundle",
|
|
129
|
+
"bundle.a11y.remove_from_bundle": "Remove {{name}} from bundle",
|
|
130
|
+
"bundle.a11y.quantity": "{{name}} quantity {{qty}}",
|
|
131
|
+
"bundle.a11y.sold_out": "{{name}} is sold out",
|
|
132
|
+
"bundle.a11y.max_available_selected": "{{name}} max available selected",
|
|
133
|
+
"bundle.a11y.increase": "Increase {{name}}",
|
|
134
|
+
"bundle.a11y.decrease": "Decrease {{name}}"
|
|
135
|
+
}, Zt = {
|
|
136
|
+
...ft,
|
|
137
|
+
"bundle.title.default": "Creez votre bundle",
|
|
138
|
+
"bundle.loading": "Chargement...",
|
|
139
|
+
"bundle.inactive": "Les bundles ne sont pas actifs.",
|
|
140
|
+
"bundle.drawer.aria": "Constructeur de bundle",
|
|
141
|
+
"bundle.search": "Rechercher",
|
|
142
|
+
"bundle.search.expanded": "Rechercher (deplie)",
|
|
143
|
+
"bundle.search.placeholder": "Rechercher",
|
|
144
|
+
"bundle.search.clear": "Effacer la recherche",
|
|
145
|
+
"bundle.close": "Fermer",
|
|
146
|
+
"bundle.section.discount_tiers": "Paliers de remise",
|
|
147
|
+
"bundle.section.your_bundle": "Votre bundle",
|
|
148
|
+
"bundle.section.select_items": "Choisir des articles",
|
|
149
|
+
"bundle.select.items": "Selectionner des articles",
|
|
150
|
+
"bundle.stock.max_reached": "Maximum atteint",
|
|
151
|
+
"bundle.stock.max_added": "Maximum deja dans le panier",
|
|
152
|
+
"bundle.stock.sold_out": "Rupture de stock",
|
|
153
|
+
"bundle.totals": "Totaux",
|
|
154
|
+
"bundle.discount.badge": "{{discount}}% de réduction",
|
|
155
|
+
"bundle.discount.off_label": "{{discount}}% de réduction",
|
|
156
|
+
"bundle.celebration.received_discount": "Vous avez recu une reduction de {{discount}}% !",
|
|
157
|
+
"bundle.cta.checkout": "Paiement",
|
|
158
|
+
"bundle.cta.add_to_bundle": "Ajouter",
|
|
159
|
+
"bundle.cta.add_to_basket": "Ajouter au panier",
|
|
160
|
+
"bundle.cta.add_more": "Ajoutez encore {{count}} {{productWord}}",
|
|
161
|
+
"bundle.powered_by": "propulse par",
|
|
162
|
+
"bundle.button.default": "Creer un bundle"
|
|
163
|
+
}, Jt = {
|
|
164
|
+
...ft,
|
|
165
|
+
"bundle.title.default": "Bundle erstellen",
|
|
166
|
+
"bundle.loading": "Wird geladen...",
|
|
167
|
+
"bundle.inactive": "Bundles sind nicht aktiv.",
|
|
168
|
+
"bundle.drawer.aria": "Bundle-Builder",
|
|
169
|
+
"bundle.search": "Suchen",
|
|
170
|
+
"bundle.search.expanded": "Suche (erweitert)",
|
|
171
|
+
"bundle.search.placeholder": "Suchen",
|
|
172
|
+
"bundle.search.clear": "Suche loschen",
|
|
173
|
+
"bundle.close": "Schliessen",
|
|
174
|
+
"bundle.section.discount_tiers": "Rabattstufen",
|
|
175
|
+
"bundle.section.your_bundle": "Ihr Bundle",
|
|
176
|
+
"bundle.section.select_items": "Artikel auswahlen",
|
|
177
|
+
"bundle.select.items": "Artikel auswahlen",
|
|
178
|
+
"bundle.stock.max_reached": "Maximum erreicht",
|
|
179
|
+
"bundle.stock.max_added": "Maximum bereits im Warenkorb",
|
|
180
|
+
"bundle.stock.sold_out": "Ausverkauft",
|
|
181
|
+
"bundle.totals": "Summen",
|
|
182
|
+
"bundle.discount.badge": "{{discount}}% Rabatt",
|
|
183
|
+
"bundle.discount.off_label": "{{discount}}% Rabatt",
|
|
184
|
+
"bundle.celebration.received_discount": "Sie haben {{discount}}% Rabatt erhalten!",
|
|
185
|
+
"bundle.cta.checkout": "Zur Kasse",
|
|
186
|
+
"bundle.cta.add_to_bundle": "Hinzufügen",
|
|
187
|
+
"bundle.cta.add_to_basket": "In den Warenkorb",
|
|
188
|
+
"bundle.cta.add_more": "Fuge noch {{count}} {{productWord}} hinzu",
|
|
189
|
+
"bundle.powered_by": "powered by",
|
|
190
|
+
"bundle.button.default": "Bundle erstellen"
|
|
191
|
+
}, en = {
|
|
192
|
+
...ft,
|
|
193
|
+
"bundle.title.default": "Crea tu bundle",
|
|
194
|
+
"bundle.loading": "Cargando...",
|
|
195
|
+
"bundle.inactive": "Los bundles no estan activos.",
|
|
196
|
+
"bundle.drawer.aria": "Constructor de bundles",
|
|
197
|
+
"bundle.search": "Buscar",
|
|
198
|
+
"bundle.search.expanded": "Buscar (expandido)",
|
|
199
|
+
"bundle.search.placeholder": "Buscar",
|
|
200
|
+
"bundle.search.clear": "Limpiar busqueda",
|
|
201
|
+
"bundle.close": "Cerrar",
|
|
202
|
+
"bundle.section.discount_tiers": "Niveles de descuento",
|
|
203
|
+
"bundle.section.your_bundle": "Tu bundle",
|
|
204
|
+
"bundle.section.select_items": "Elegir articulos",
|
|
205
|
+
"bundle.select.items": "Seleccionar articulos",
|
|
206
|
+
"bundle.stock.max_reached": "Maximo alcanzado",
|
|
207
|
+
"bundle.stock.max_added": "Maximo agregado al carrito",
|
|
208
|
+
"bundle.stock.sold_out": "Agotado",
|
|
209
|
+
"bundle.totals": "Totales",
|
|
210
|
+
"bundle.discount.badge": "{{discount}}% de descuento",
|
|
211
|
+
"bundle.discount.off_label": "{{discount}}% de descuento",
|
|
212
|
+
"bundle.celebration.received_discount": "Has recibido un {{discount}}% de descuento!",
|
|
213
|
+
"bundle.cta.checkout": "Pagar",
|
|
214
|
+
"bundle.cta.add_to_bundle": "Agregar",
|
|
215
|
+
"bundle.cta.add_to_basket": "Agregar al carrito",
|
|
216
|
+
"bundle.cta.add_more": "Agrega {{count}} {{productWord}} mas",
|
|
217
|
+
"bundle.powered_by": "impulsado por",
|
|
218
|
+
"bundle.button.default": "Crear bundle"
|
|
219
|
+
}, tn = {
|
|
220
|
+
en: ft,
|
|
221
|
+
fr: Zt,
|
|
222
|
+
de: Jt,
|
|
223
|
+
es: en
|
|
224
|
+
};
|
|
225
|
+
function nn(n) {
|
|
226
|
+
const e = String(n ?? "").trim().toLowerCase();
|
|
227
|
+
if (!e) return "en";
|
|
228
|
+
const t = e.split("-")[0] ?? "en";
|
|
229
|
+
return t === "fr" || t === "de" || t === "en" || t === "es" ? t : "en";
|
|
230
|
+
}
|
|
231
|
+
function rn(n, e, t, a) {
|
|
232
|
+
var r;
|
|
233
|
+
const i = (a == null ? void 0 : a[e]) ?? ((r = tn[n]) == null ? void 0 : r[e]) ?? ft[e] ?? e;
|
|
234
|
+
return t ? Object.entries(t).reduce((h, [u, B]) => h.replaceAll(`{{${u}}}`, String(B)), i) : i;
|
|
235
|
+
}
|
|
236
|
+
function jt(n, e, t) {
|
|
237
|
+
const a = Number(n);
|
|
238
|
+
if (!Number.isFinite(a)) return String(n);
|
|
239
|
+
if (e)
|
|
240
|
+
try {
|
|
241
|
+
return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(a);
|
|
242
|
+
} catch {
|
|
243
|
+
}
|
|
244
|
+
return `$${a.toFixed(2)}`;
|
|
245
|
+
}
|
|
246
|
+
function ct(n, e) {
|
|
247
|
+
const t = e === 1 ? "one" : "many";
|
|
248
|
+
return n === "fr" ? t === "one" ? "produit" : "produits" : n === "de" ? t === "one" ? "Produkt" : "Produkte" : n === "es" ? t === "one" ? "producto" : "productos" : t === "one" ? "product" : "products";
|
|
249
|
+
}
|
|
250
|
+
const Ut = Qt(null), mt = "#best-bundles", an = [];
|
|
251
|
+
function Qe(n) {
|
|
252
|
+
const e = String(n ?? "").trim().toLowerCase();
|
|
253
|
+
return e && e.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
|
|
95
254
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
if (!
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
101
|
-
return
|
|
255
|
+
function Ot(n) {
|
|
256
|
+
const e = String(n ?? "").trim().toLowerCase();
|
|
257
|
+
if (!e.startsWith(mt)) return null;
|
|
258
|
+
if (e === mt) return "default";
|
|
259
|
+
const t = `${mt}:`;
|
|
260
|
+
return e.startsWith(t) ? Qe(e.slice(t.length)) : null;
|
|
102
261
|
}
|
|
103
|
-
const
|
|
262
|
+
const on = {
|
|
104
263
|
primaryColor: "--bb-cta-bg",
|
|
105
264
|
primaryHoverColor: "--bb-cta-bg-hover",
|
|
106
265
|
primaryTextColor: "--bb-cta-text",
|
|
@@ -122,753 +281,760 @@ const He = {
|
|
|
122
281
|
celebrationBorderColor: "--bb-celebration-border",
|
|
123
282
|
fontFamilyBody: "--bb-font-family-body",
|
|
124
283
|
fontFamilyTitle: "--bb-font-family-title"
|
|
125
|
-
},
|
|
126
|
-
function
|
|
127
|
-
const
|
|
128
|
-
return
|
|
284
|
+
}, Ct = "bb-google-fonts";
|
|
285
|
+
function At(n) {
|
|
286
|
+
const e = (n ?? "").trim().replace(/^["']|["']$/g, "");
|
|
287
|
+
return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
|
|
129
288
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
289
|
+
function sn(n) {
|
|
290
|
+
var u;
|
|
132
291
|
if (typeof document > "u" || !document.head) return;
|
|
133
|
-
if (!
|
|
134
|
-
(
|
|
292
|
+
if (!n) {
|
|
293
|
+
(u = document.getElementById(Ct)) == null || u.remove();
|
|
135
294
|
return;
|
|
136
295
|
}
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
const i = document.getElementById(
|
|
140
|
-
if (
|
|
296
|
+
const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), a = [];
|
|
297
|
+
e && a.push("family=" + At(e)), t && t !== e && a.push("family=" + At(t));
|
|
298
|
+
const i = document.getElementById(Ct);
|
|
299
|
+
if (a.length === 0) {
|
|
141
300
|
i == null || i.remove();
|
|
142
301
|
return;
|
|
143
302
|
}
|
|
144
|
-
const r = `https://fonts.googleapis.com/css2?${
|
|
303
|
+
const r = `https://fonts.googleapis.com/css2?${a.join("&")}&display=swap`;
|
|
145
304
|
if (i) {
|
|
146
305
|
i.getAttribute("href") !== r && i.setAttribute("href", r);
|
|
147
306
|
return;
|
|
148
307
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
308
|
+
const h = document.createElement("link");
|
|
309
|
+
h.id = Ct, h.rel = "stylesheet", h.href = r, document.head.appendChild(h);
|
|
151
310
|
}
|
|
152
|
-
function
|
|
153
|
-
if (!
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
Object.entries(
|
|
157
|
-
let i =
|
|
158
|
-
i && ((
|
|
311
|
+
function Dt(n) {
|
|
312
|
+
if (!n) return;
|
|
313
|
+
sn(n);
|
|
314
|
+
const e = document.documentElement;
|
|
315
|
+
Object.entries(on).forEach(([t, a]) => {
|
|
316
|
+
let i = n[t];
|
|
317
|
+
i && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(i) && !/^["']/.test(i.trim()) && (i = `"${i.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(a, i));
|
|
159
318
|
});
|
|
160
319
|
}
|
|
161
|
-
function
|
|
162
|
-
if (typeof window > "u") return
|
|
163
|
-
const
|
|
164
|
-
return
|
|
320
|
+
function Et(n) {
|
|
321
|
+
if (typeof window > "u") return n;
|
|
322
|
+
const e = window.__BUNDLE_PREVIEW_STYLES__;
|
|
323
|
+
return e && typeof e == "object" ? e : n;
|
|
165
324
|
}
|
|
166
|
-
function
|
|
325
|
+
function ln() {
|
|
167
326
|
try {
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
327
|
+
const n = globalThis.crypto;
|
|
328
|
+
if (n != null && n.randomUUID) return n.randomUUID();
|
|
170
329
|
} catch {
|
|
171
330
|
}
|
|
172
331
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
173
332
|
}
|
|
174
|
-
function
|
|
175
|
-
return Number.isFinite(
|
|
333
|
+
function gt(n) {
|
|
334
|
+
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0;
|
|
176
335
|
}
|
|
177
|
-
function
|
|
178
|
-
const
|
|
179
|
-
return Number.isFinite(
|
|
336
|
+
function It(n, e) {
|
|
337
|
+
const t = gt(n);
|
|
338
|
+
return Number.isFinite(e) ? Math.min(t, Math.max(0, Math.floor(e))) : t;
|
|
180
339
|
}
|
|
181
|
-
function
|
|
182
|
-
return !
|
|
340
|
+
function cn(n, e) {
|
|
341
|
+
return !n && !e;
|
|
183
342
|
}
|
|
184
|
-
function
|
|
343
|
+
function wi(n) {
|
|
185
344
|
const {
|
|
186
|
-
apiBaseUrl:
|
|
187
|
-
shop:
|
|
188
|
-
cartAdapter:
|
|
345
|
+
apiBaseUrl: e,
|
|
346
|
+
shop: t,
|
|
347
|
+
cartAdapter: a,
|
|
189
348
|
configHandle: i = "default",
|
|
190
349
|
initialData: r,
|
|
191
|
-
configFetcher:
|
|
192
|
-
activeConfigsFetcher:
|
|
193
|
-
configStatusFetcher:
|
|
194
|
-
analyticsEndpoint:
|
|
195
|
-
allowDrawerWhenInactive:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
), [
|
|
350
|
+
configFetcher: h,
|
|
351
|
+
activeConfigsFetcher: u,
|
|
352
|
+
configStatusFetcher: B,
|
|
353
|
+
analyticsEndpoint: le,
|
|
354
|
+
allowDrawerWhenInactive: $ = !1,
|
|
355
|
+
locale: D,
|
|
356
|
+
messages: de,
|
|
357
|
+
children: F
|
|
358
|
+
} = n, te = nn(D), z = J((o, s) => rn(te, o, s, de), [te, de]), K = Qe(i), g = le ?? `${e}/api/public/bundle-analytics`, H = cn($, r), [I, he] = j(!1), [ke, Te] = j(!1), [ye, ae] = j(null), [X, ie] = j(!1), [me, Re] = j({}), [ne, Ce] = j(K), [be, Ve] = j(() => r ? { [K]: r } : {}), [ge, Le] = j(H), [Ie, Ae] = j(
|
|
359
|
+
!H && !r ? K : null
|
|
360
|
+
), [nt, We] = j(null), [ze, Me] = j(null), [Ye, Ne] = j(
|
|
200
361
|
() => ({ selections: {}, order: [] })
|
|
201
|
-
),
|
|
202
|
-
if (typeof
|
|
203
|
-
const
|
|
204
|
-
return Object.entries(
|
|
205
|
-
const y =
|
|
206
|
-
return y > 0 && (s[
|
|
362
|
+
), De = U(null), ve = U(null), f = U(null), p = U(0), x = U(ne), T = U(be), M = U(ge), E = U(null), V = h ?? Kt, Z = u ?? Yt, ee = B ?? Xt, Q = J(async () => {
|
|
363
|
+
if (typeof a.getLineQuantitiesByMerchandiseId != "function") return null;
|
|
364
|
+
const o = await a.getLineQuantitiesByMerchandiseId();
|
|
365
|
+
return Object.entries(o ?? {}).reduce((s, [b, w]) => {
|
|
366
|
+
const y = gt(w);
|
|
367
|
+
return y > 0 && (s[b] = y), s;
|
|
207
368
|
}, {});
|
|
208
|
-
}, [
|
|
209
|
-
const
|
|
210
|
-
|
|
369
|
+
}, [a]), A = J(async () => {
|
|
370
|
+
const o = ++p.current;
|
|
371
|
+
ie(!0);
|
|
211
372
|
try {
|
|
212
|
-
const s = await
|
|
213
|
-
return s &&
|
|
373
|
+
const s = await Q();
|
|
374
|
+
return s && o === p.current && Re(s), s;
|
|
214
375
|
} catch {
|
|
215
376
|
return null;
|
|
216
377
|
} finally {
|
|
217
|
-
|
|
378
|
+
o === p.current && ie(!1);
|
|
218
379
|
}
|
|
219
|
-
}, [
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}, [
|
|
223
|
-
|
|
224
|
-
}, [
|
|
225
|
-
|
|
226
|
-
}, [
|
|
227
|
-
|
|
228
|
-
}, [
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
}, []),
|
|
232
|
-
if (
|
|
380
|
+
}, [Q]);
|
|
381
|
+
O(() => {
|
|
382
|
+
x.current = ne;
|
|
383
|
+
}, [ne]), O(() => {
|
|
384
|
+
T.current = be;
|
|
385
|
+
}, [be]), O(() => {
|
|
386
|
+
M.current = ge;
|
|
387
|
+
}, [ge]), O(() => {
|
|
388
|
+
A();
|
|
389
|
+
}, [A]);
|
|
390
|
+
const q = J((o) => {
|
|
391
|
+
Ce(Qe(o));
|
|
392
|
+
}, []), Se = J(() => {
|
|
393
|
+
if (g)
|
|
233
394
|
try {
|
|
234
|
-
const
|
|
235
|
-
|
|
395
|
+
const o = pt();
|
|
396
|
+
lt(g, t, {
|
|
236
397
|
eventType: "DRAWER_CLOSED",
|
|
237
|
-
shop:
|
|
238
|
-
anonymousUserId:
|
|
398
|
+
shop: t,
|
|
399
|
+
anonymousUserId: o,
|
|
239
400
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
240
401
|
mixpanelEvent: "bundle_closed"
|
|
241
402
|
}).catch((s) => {
|
|
242
403
|
console.warn("[Bundle Analytics] Failed to track drawer closed:", s);
|
|
243
404
|
});
|
|
244
|
-
} catch (
|
|
245
|
-
console.warn("[Bundle Analytics] Error in close() callback:",
|
|
405
|
+
} catch (o) {
|
|
406
|
+
console.warn("[Bundle Analytics] Error in close() callback:", o);
|
|
246
407
|
}
|
|
247
|
-
|
|
248
|
-
}, [
|
|
249
|
-
|
|
250
|
-
if (
|
|
251
|
-
if (
|
|
408
|
+
he(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(mt) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
409
|
+
}, [g, t]), Pe = J(() => {
|
|
410
|
+
he((o) => {
|
|
411
|
+
if (o) return o;
|
|
412
|
+
if (g)
|
|
252
413
|
try {
|
|
253
|
-
const s =
|
|
254
|
-
|
|
414
|
+
const s = pt();
|
|
415
|
+
lt(g, t, {
|
|
255
416
|
eventType: "DRAWER_OPENED",
|
|
256
|
-
shop:
|
|
417
|
+
shop: t,
|
|
257
418
|
anonymousUserId: s,
|
|
258
419
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
259
420
|
mixpanelEvent: "bundle_opened"
|
|
260
|
-
}).catch((
|
|
261
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
421
|
+
}).catch((b) => {
|
|
422
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", b);
|
|
262
423
|
});
|
|
263
424
|
} catch (s) {
|
|
264
425
|
console.warn("[Bundle Analytics] Error in open() callback:", s);
|
|
265
426
|
}
|
|
266
427
|
return !0;
|
|
267
428
|
});
|
|
268
|
-
}, [
|
|
269
|
-
if (!
|
|
270
|
-
const
|
|
271
|
-
return delete
|
|
272
|
-
}),
|
|
273
|
-
...
|
|
274
|
-
[
|
|
429
|
+
}, [g, t]), rt = J((o, s) => !s.ok || s.config.isActive === !1 ? (Ve((b) => {
|
|
430
|
+
if (!b[o]) return b;
|
|
431
|
+
const w = { ...b };
|
|
432
|
+
return delete w[o], w;
|
|
433
|
+
}), !$ && x.current === o && (ae(s.ok ? z("bundle.provider.inactive_error") : s.error || z("bundle.provider.load_error")), he(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(mt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1) : (Ve((b) => ({
|
|
434
|
+
...b,
|
|
435
|
+
[o]: {
|
|
275
436
|
currencyCode: s.currencyCode ?? null,
|
|
276
437
|
config: s.config,
|
|
277
438
|
eligibleVariants: s.eligibleVariants ?? []
|
|
278
439
|
}
|
|
279
|
-
})),
|
|
440
|
+
})), x.current === o && ae(null), !0), [$, z]), Fe = J((o, s) => {
|
|
280
441
|
var y;
|
|
281
|
-
const
|
|
282
|
-
(y =
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
apiBaseUrl:
|
|
286
|
-
shop:
|
|
287
|
-
configHandle:
|
|
288
|
-
fresh: (s == null ? void 0 : s.blocking) === !0 && !
|
|
289
|
-
signal:
|
|
290
|
-
}).then((
|
|
291
|
-
|
|
292
|
-
}).catch((
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
|
|
442
|
+
const b = Qe(o);
|
|
443
|
+
(y = ve.current) == null || y.abort();
|
|
444
|
+
const w = new AbortController();
|
|
445
|
+
ve.current = w, s != null && s.blocking && Ae(b), ae(null), V({
|
|
446
|
+
apiBaseUrl: e,
|
|
447
|
+
shop: t,
|
|
448
|
+
configHandle: b,
|
|
449
|
+
fresh: (s == null ? void 0 : s.blocking) === !0 && !T.current[b],
|
|
450
|
+
signal: w.signal
|
|
451
|
+
}).then((C) => {
|
|
452
|
+
w.signal.aborted || rt(b, C);
|
|
453
|
+
}).catch((C) => {
|
|
454
|
+
if (w.signal.aborted) return;
|
|
455
|
+
const k = C instanceof Error ? C.message : z("bundle.provider.load_error");
|
|
456
|
+
x.current === b && ae(k);
|
|
296
457
|
}).finally(() => {
|
|
297
|
-
|
|
458
|
+
w.signal.aborted || Ae((C) => C === b ? null : C);
|
|
298
459
|
});
|
|
299
|
-
}, [
|
|
300
|
-
const s =
|
|
301
|
-
|
|
302
|
-
}, [
|
|
303
|
-
var
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
|
|
460
|
+
}, [e, rt, V, t, z]), re = J((o) => {
|
|
461
|
+
const s = Qe(o), b = T.current[s];
|
|
462
|
+
Ce(s), ae(null), Fe(s, { blocking: !b });
|
|
463
|
+
}, [Fe]), W = J((o, s = "api") => {
|
|
464
|
+
var C, k;
|
|
465
|
+
const b = Qe(o), w = T.current[b];
|
|
466
|
+
if (H && M.current && !w) {
|
|
467
|
+
Me({ handle: b, source: s });
|
|
307
468
|
return;
|
|
308
469
|
}
|
|
309
|
-
if (
|
|
310
|
-
|
|
470
|
+
if (Ce(b), $) {
|
|
471
|
+
Pe(), Fe(b, { blocking: !w });
|
|
311
472
|
return;
|
|
312
473
|
}
|
|
313
|
-
if ((
|
|
314
|
-
|
|
474
|
+
if ((C = w == null ? void 0 : w.config) != null && C.isActive) {
|
|
475
|
+
ae(null), Pe(), Fe(b, { blocking: !1 });
|
|
315
476
|
return;
|
|
316
477
|
}
|
|
317
|
-
|
|
478
|
+
We(b), (k = f.current) == null || k.abort();
|
|
318
479
|
const y = new AbortController();
|
|
319
|
-
|
|
320
|
-
apiBaseUrl:
|
|
321
|
-
shop:
|
|
322
|
-
configHandle:
|
|
480
|
+
f.current = y, ee({
|
|
481
|
+
apiBaseUrl: e,
|
|
482
|
+
shop: t,
|
|
483
|
+
configHandle: b,
|
|
323
484
|
signal: y.signal
|
|
324
|
-
}).then((
|
|
485
|
+
}).then((P) => {
|
|
325
486
|
if (!y.signal.aborted) {
|
|
326
|
-
if (
|
|
327
|
-
s === "hash" && typeof window < "u" &&
|
|
487
|
+
if (We((G) => G === b ? null : G), !P.ok || P.isActive !== !0) {
|
|
488
|
+
s === "hash" && typeof window < "u" && Ot(window.location.hash) === b && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
328
489
|
return;
|
|
329
490
|
}
|
|
330
|
-
|
|
491
|
+
ae(null), Ce(b), Pe(), Fe(b, { blocking: !0 });
|
|
331
492
|
}
|
|
332
493
|
}).catch(() => {
|
|
333
|
-
y.signal.aborted ||
|
|
494
|
+
y.signal.aborted || We((P) => P === b ? null : P);
|
|
334
495
|
});
|
|
335
496
|
}, [
|
|
336
|
-
A,
|
|
337
|
-
t,
|
|
338
|
-
L,
|
|
339
|
-
mt,
|
|
340
|
-
e,
|
|
341
497
|
$,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
498
|
+
e,
|
|
499
|
+
Pe,
|
|
500
|
+
Fe,
|
|
501
|
+
t,
|
|
502
|
+
ee,
|
|
503
|
+
H
|
|
504
|
+
]), at = J(() => {
|
|
505
|
+
A(), W(x.current, "api");
|
|
506
|
+
}, [W, A]);
|
|
507
|
+
O(() => {
|
|
508
|
+
E.current = W;
|
|
509
|
+
}, [W]);
|
|
510
|
+
const Oe = J(() => {
|
|
511
|
+
if (I) {
|
|
512
|
+
Se();
|
|
352
513
|
return;
|
|
353
514
|
}
|
|
354
|
-
|
|
355
|
-
}, [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}, [i]),
|
|
515
|
+
A(), W(x.current, "api");
|
|
516
|
+
}, [Se, I, W, A]);
|
|
517
|
+
O(() => {
|
|
518
|
+
Ce(Qe(i));
|
|
519
|
+
}, [i]), O(() => {
|
|
359
520
|
var s;
|
|
360
|
-
if (!
|
|
361
|
-
|
|
521
|
+
if (!H) {
|
|
522
|
+
Le(!1), r || Fe(K, { blocking: !0 });
|
|
362
523
|
return;
|
|
363
524
|
}
|
|
364
|
-
(s =
|
|
365
|
-
const
|
|
366
|
-
return
|
|
367
|
-
|
|
368
|
-
const y = { ...
|
|
369
|
-
for (const [
|
|
370
|
-
y[
|
|
371
|
-
currencyCode:
|
|
372
|
-
config:
|
|
373
|
-
eligibleVariants:
|
|
525
|
+
(s = De.current) == null || s.abort();
|
|
526
|
+
const o = new AbortController();
|
|
527
|
+
return De.current = o, Le(!0), Z({ apiBaseUrl: e, shop: t, signal: o.signal }).then((b) => {
|
|
528
|
+
o.signal.aborted || b.ok && Ve((w) => {
|
|
529
|
+
const y = { ...w };
|
|
530
|
+
for (const [C, k] of Object.entries(b.configs ?? {}))
|
|
531
|
+
y[Qe(C)] = {
|
|
532
|
+
currencyCode: k.currencyCode ?? null,
|
|
533
|
+
config: k.config,
|
|
534
|
+
eligibleVariants: k.eligibleVariants ?? []
|
|
374
535
|
};
|
|
375
536
|
return y;
|
|
376
537
|
});
|
|
377
538
|
}).catch(() => {
|
|
378
539
|
}).finally(() => {
|
|
379
|
-
|
|
380
|
-
}), () =>
|
|
381
|
-
}, [
|
|
382
|
-
|
|
383
|
-
}, [
|
|
540
|
+
o.signal.aborted || Le(!1);
|
|
541
|
+
}), () => o.abort();
|
|
542
|
+
}, [Z, e, r, K, Fe, t, H]), O(() => {
|
|
543
|
+
ge || !ze || (W(ze.handle, ze.source), Me(null));
|
|
544
|
+
}, [ge, W, ze]), O(() => {
|
|
384
545
|
if (typeof window > "u") return;
|
|
385
|
-
const
|
|
386
|
-
var
|
|
387
|
-
const s =
|
|
388
|
-
s && ((
|
|
546
|
+
const o = () => {
|
|
547
|
+
var b;
|
|
548
|
+
const s = Ot(window.location.hash);
|
|
549
|
+
s && ((b = E.current) == null || b.call(E, s, "hash"));
|
|
389
550
|
};
|
|
390
|
-
return
|
|
551
|
+
return o(), window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
|
|
391
552
|
}, []);
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
}, [
|
|
553
|
+
const we = be[ne] ?? null, N = (we == null ? void 0 : we.config) ?? null, oe = (we == null ? void 0 : we.eligibleVariants) ?? an, je = (we == null ? void 0 : we.currencyCode) ?? null, xe = !N && (Ie === ne || nt === ne) || $ && !N && Ie != null;
|
|
554
|
+
O(() => {
|
|
555
|
+
const o = Et(N == null ? void 0 : N.styleSettings);
|
|
556
|
+
o && Dt(o);
|
|
557
|
+
}, [N == null ? void 0 : N.styleSettings]), O(() => {
|
|
397
558
|
if (typeof window > "u") return;
|
|
398
|
-
const
|
|
399
|
-
const s =
|
|
400
|
-
s &&
|
|
559
|
+
const o = () => {
|
|
560
|
+
const s = Et(void 0);
|
|
561
|
+
s && Dt(s);
|
|
401
562
|
};
|
|
402
|
-
return window.addEventListener("bundle-preview-styles-updated",
|
|
403
|
-
}, []),
|
|
563
|
+
return window.addEventListener("bundle-preview-styles-updated", o), () => window.removeEventListener("bundle-preview-styles-updated", o);
|
|
564
|
+
}, []), O(() => {
|
|
404
565
|
if (typeof window > "u") return;
|
|
405
|
-
const
|
|
406
|
-
const
|
|
407
|
-
if (!
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
var
|
|
566
|
+
const o = window, s = () => {
|
|
567
|
+
const b = o.__BUNDLE_PREVIEW_CONFIG__;
|
|
568
|
+
if (!b) return;
|
|
569
|
+
const w = o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__ ?? [];
|
|
570
|
+
Ve((y) => {
|
|
571
|
+
var C;
|
|
411
572
|
return {
|
|
412
573
|
...y,
|
|
413
|
-
[
|
|
414
|
-
currencyCode:
|
|
415
|
-
config:
|
|
416
|
-
eligibleVariants:
|
|
574
|
+
[x.current]: {
|
|
575
|
+
currencyCode: je ?? null,
|
|
576
|
+
config: b,
|
|
577
|
+
eligibleVariants: w.length ? w : ((C = y[x.current]) == null ? void 0 : C.eligibleVariants) ?? []
|
|
417
578
|
}
|
|
418
579
|
};
|
|
419
|
-
}),
|
|
580
|
+
}), o.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0 ? Ae(x.current) : Ae((y) => y === x.current ? null : y);
|
|
420
581
|
};
|
|
421
|
-
return
|
|
422
|
-
}, [
|
|
423
|
-
const
|
|
424
|
-
const
|
|
582
|
+
return o.__BUNDLE_PREVIEW_CONFIG__ && s(), window.addEventListener("bundle-preview-config-updated", s), () => window.removeEventListener("bundle-preview-config-updated", s);
|
|
583
|
+
}, [je]);
|
|
584
|
+
const it = L(() => {
|
|
585
|
+
const o = Number((N == null ? void 0 : N.maxBundleSize) ?? Number.NaN), s = Number.isFinite(o) ? Math.floor(o) : 100;
|
|
425
586
|
return Math.max(2, Math.min(100, s));
|
|
426
|
-
}, [
|
|
427
|
-
|
|
428
|
-
const s =
|
|
429
|
-
if (!Number.isFinite(s)) return [
|
|
430
|
-
const
|
|
431
|
-
return [
|
|
587
|
+
}, [N == null ? void 0 : N.maxBundleSize]), Ue = L(() => new Map(
|
|
588
|
+
oe.map((o) => {
|
|
589
|
+
const s = xt(o);
|
|
590
|
+
if (!Number.isFinite(s)) return [o.id, s];
|
|
591
|
+
const b = gt(me[o.id] ?? 0);
|
|
592
|
+
return [o.id, Math.max(0, Math.floor(s) - b)];
|
|
432
593
|
})
|
|
433
|
-
), [
|
|
434
|
-
|
|
435
|
-
), [
|
|
436
|
-
const
|
|
437
|
-
return y == null ?
|
|
438
|
-
}, [
|
|
439
|
-
if (
|
|
594
|
+
), [oe, me]), He = L(() => new Set(
|
|
595
|
+
oe.filter((o) => xt(o) > 0).map((o) => o.id)
|
|
596
|
+
), [oe]), Be = L(() => {
|
|
597
|
+
const o = (N == null ? void 0 : N.rules) ?? [], s = o.length ? Math.min(...o.map((C) => C.minBundleSize)) : 2, b = Number.isFinite(s) && s > 0 ? s : 2, w = Number((N == null ? void 0 : N.minBundleSize) ?? Number.NaN), y = Number.isFinite(w) && Number.isInteger(w) ? Math.max(2, Math.min(100, w)) : null;
|
|
598
|
+
return y == null ? b : Math.min(b, y);
|
|
599
|
+
}, [N == null ? void 0 : N.minBundleSize, N == null ? void 0 : N.rules]), ut = J((o, s) => {
|
|
600
|
+
if (X || !He.has(o) && !xe)
|
|
440
601
|
return;
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
Math.max(0,
|
|
446
|
-
|
|
447
|
-
) :
|
|
448
|
-
let
|
|
449
|
-
if (
|
|
450
|
-
const
|
|
451
|
-
delete
|
|
452
|
-
} else
|
|
453
|
-
let
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
else if (
|
|
457
|
-
let
|
|
458
|
-
const
|
|
459
|
-
for (let
|
|
460
|
-
const
|
|
461
|
-
if (
|
|
462
|
-
|
|
602
|
+
const b = Ue.get(o) ?? (xe ? Number.POSITIVE_INFINITY : 0), w = It(s, b);
|
|
603
|
+
Ne((y) => {
|
|
604
|
+
const C = y.selections[o] ?? 0, k = w - C, P = Object.values(y.selections).reduce((_e, ue) => _e + (ue || 0), 0), G = Number.isFinite(b) ? Math.max(0, Math.floor(b) - C) : k, Y = k > 0 ? Math.min(
|
|
605
|
+
k,
|
|
606
|
+
Math.max(0, it - P),
|
|
607
|
+
G
|
|
608
|
+
) : k, ce = C + Y;
|
|
609
|
+
let fe;
|
|
610
|
+
if (ce <= 0) {
|
|
611
|
+
const _e = { ...y.selections };
|
|
612
|
+
delete _e[o], fe = _e;
|
|
613
|
+
} else C === ce ? fe = y.selections : fe = { ...y.selections, [o]: ce };
|
|
614
|
+
let $e = y.order;
|
|
615
|
+
if (Y > 0)
|
|
616
|
+
$e = [...y.order, ...Array.from({ length: Y }, () => o)];
|
|
617
|
+
else if (Y < 0) {
|
|
618
|
+
let _e = -Y;
|
|
619
|
+
const ue = [];
|
|
620
|
+
for (let st = y.order.length - 1; st >= 0; st--) {
|
|
621
|
+
const S = y.order[st];
|
|
622
|
+
if (S === o && _e > 0) {
|
|
623
|
+
_e--;
|
|
463
624
|
continue;
|
|
464
625
|
}
|
|
465
|
-
|
|
626
|
+
ue.push(S);
|
|
466
627
|
}
|
|
467
|
-
|
|
628
|
+
ue.reverse(), $e = ue;
|
|
468
629
|
}
|
|
469
|
-
if (
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
630
|
+
if (fe === y.selections && $e === y.order) return y;
|
|
631
|
+
const Je = P, et = Object.values(fe).reduce((_e, ue) => _e + (ue || 0), 0);
|
|
632
|
+
if (g)
|
|
472
633
|
try {
|
|
473
|
-
const
|
|
634
|
+
const _e = pt(), ue = {
|
|
474
635
|
eventType: "VARIANT_SELECTION_CHANGED",
|
|
475
|
-
shop:
|
|
476
|
-
anonymousUserId:
|
|
636
|
+
shop: t,
|
|
637
|
+
anonymousUserId: _e,
|
|
477
638
|
before: { ...y.selections },
|
|
478
|
-
after: { ...
|
|
639
|
+
after: { ...fe },
|
|
479
640
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
480
641
|
};
|
|
481
|
-
|
|
482
|
-
...
|
|
642
|
+
lt(g, t, ue), Je === 0 && et >= 1 && lt(g, t, {
|
|
643
|
+
...ue,
|
|
483
644
|
mixpanelEvent: "bundle_started"
|
|
484
|
-
}),
|
|
485
|
-
...
|
|
645
|
+
}), Je < Be && et >= Be && lt(g, t, {
|
|
646
|
+
...ue,
|
|
486
647
|
mixpanelEvent: "bundle_completed"
|
|
487
648
|
});
|
|
488
649
|
} catch {
|
|
489
650
|
}
|
|
490
|
-
return { selections:
|
|
651
|
+
return { selections: fe, order: $e };
|
|
491
652
|
});
|
|
492
|
-
}, [
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
const s = Object.entries(
|
|
496
|
-
if (!
|
|
497
|
-
const
|
|
498
|
-
return
|
|
499
|
-
}).filter(Boolean),
|
|
500
|
-
const
|
|
501
|
-
return
|
|
653
|
+
}, [g, X, He, xe, it, Be, t, Ue]);
|
|
654
|
+
O(() => {
|
|
655
|
+
xe || Ne((o) => {
|
|
656
|
+
const s = Object.entries(o.selections).map(([C, k]) => {
|
|
657
|
+
if (!He.has(C)) return null;
|
|
658
|
+
const P = Ue.get(C) ?? 0, G = It(k, P);
|
|
659
|
+
return G <= 0 ? null : [C, G];
|
|
660
|
+
}).filter(Boolean), b = Object.fromEntries(s), w = new Map(s), y = o.order.filter((C) => {
|
|
661
|
+
const k = w.get(C) ?? 0;
|
|
662
|
+
return k <= 0 ? !1 : (w.set(C, k - 1), !0);
|
|
502
663
|
});
|
|
503
|
-
return y.length ===
|
|
664
|
+
return y.length === o.order.length && s.length === Object.keys(o.selections).length && s.every(([C, k]) => o.selections[C] === k) ? o : { selections: b, order: y };
|
|
504
665
|
});
|
|
505
|
-
}, [
|
|
506
|
-
|
|
507
|
-
}, [
|
|
508
|
-
const
|
|
509
|
-
await
|
|
510
|
-
}, [
|
|
511
|
-
const s =
|
|
666
|
+
}, [He, xe, Ue]), O(() => {
|
|
667
|
+
Ne({ selections: {}, order: [] });
|
|
668
|
+
}, [ne]);
|
|
669
|
+
const Ke = J(() => Ne({ selections: {}, order: [] }), []), ot = J(async () => {
|
|
670
|
+
await A();
|
|
671
|
+
}, [A]), dt = J((o) => {
|
|
672
|
+
const s = Ue.get(o);
|
|
512
673
|
return s == null || !Number.isFinite(s) ? null : Math.max(0, Math.floor(s));
|
|
513
|
-
}, [
|
|
514
|
-
var
|
|
515
|
-
if (!
|
|
516
|
-
const s =
|
|
517
|
-
|
|
518
|
-
const
|
|
519
|
-
if (!Number.isFinite(
|
|
520
|
-
const
|
|
521
|
-
return [
|
|
674
|
+
}, [Ue]), Ee = Ye.selections, ht = Ye.order, qe = L(() => Object.values(Ee).reduce((o, s) => o + (s || 0), 0), [Ee]), Xe = L(() => !(xe || X || ke || ye || !(N != null && N.isActive) || qe < Be), [qe, X, N == null ? void 0 : N.isActive, ye, xe, Be, ke]), Ze = J(async (o) => {
|
|
675
|
+
var ue, st;
|
|
676
|
+
if (!Xe || !N) return;
|
|
677
|
+
const s = ln(), b = (N.title ?? "").trim().slice(0, 255), w = await A(), y = new Map(
|
|
678
|
+
oe.map((S) => {
|
|
679
|
+
const se = xt(S);
|
|
680
|
+
if (!Number.isFinite(se)) return [S.id, se];
|
|
681
|
+
const tt = gt((w ?? me)[S.id] ?? 0);
|
|
682
|
+
return [S.id, Math.max(0, Math.floor(se) - tt)];
|
|
522
683
|
})
|
|
523
|
-
),
|
|
524
|
-
merchandiseId:
|
|
525
|
-
quantity:
|
|
526
|
-
})).filter((
|
|
527
|
-
merchandiseId:
|
|
528
|
-
quantity:
|
|
684
|
+
), C = Object.entries(Ee).map(([S, se]) => ({
|
|
685
|
+
merchandiseId: S,
|
|
686
|
+
quantity: It(se, y.get(S) ?? 0)
|
|
687
|
+
})).filter((S) => S.quantity > 0).filter((S) => He.has(S.merchandiseId)).map((S) => ({
|
|
688
|
+
merchandiseId: S.merchandiseId,
|
|
689
|
+
quantity: S.quantity,
|
|
529
690
|
attributes: [
|
|
530
|
-
{ key:
|
|
531
|
-
{ key:
|
|
532
|
-
{ key:
|
|
533
|
-
...
|
|
691
|
+
{ key: _t.bundleId, value: s },
|
|
692
|
+
{ key: _t.bundleConfig, value: ne },
|
|
693
|
+
{ key: _t.bundleSource, value: "bundle_builder" },
|
|
694
|
+
...b ? [{ key: _t.bundleTitle, value: b }] : []
|
|
534
695
|
]
|
|
535
696
|
}));
|
|
536
|
-
if (!
|
|
537
|
-
const
|
|
538
|
-
let
|
|
539
|
-
for (const
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
542
|
-
const
|
|
543
|
-
Number.isFinite(
|
|
697
|
+
if (!C.length) return;
|
|
698
|
+
const k = new Map(oe.map((S) => [S.id, S]));
|
|
699
|
+
let P = 0;
|
|
700
|
+
for (const S of C) {
|
|
701
|
+
const se = S.quantity ?? 0;
|
|
702
|
+
if (se <= 0) continue;
|
|
703
|
+
const tt = k.get(S.merchandiseId), Pt = Number(tt == null ? void 0 : tt.price);
|
|
704
|
+
Number.isFinite(Pt) && (P += Pt * se);
|
|
544
705
|
}
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
let
|
|
548
|
-
for (const
|
|
549
|
-
|
|
550
|
-
const
|
|
551
|
-
const
|
|
552
|
-
return Number.isFinite(
|
|
553
|
-
})() : null,
|
|
554
|
-
|
|
706
|
+
P = Math.round(P * 100) / 100;
|
|
707
|
+
const G = [...N.rules ?? []].sort((S, se) => S.minBundleSize - se.minBundleSize);
|
|
708
|
+
let Y = null;
|
|
709
|
+
for (const S of G)
|
|
710
|
+
qe >= S.minBundleSize && (Y = S);
|
|
711
|
+
const ce = Y ? (() => {
|
|
712
|
+
const S = Number.parseFloat(Y.discountPercent);
|
|
713
|
+
return Number.isFinite(S) && S > 0 ? S : null;
|
|
714
|
+
})() : null, fe = ce ? Math.round(P * (1 - ce / 100) * 100) / 100 : P, $e = P - fe, Je = C.map((S) => S.merchandiseId), et = (Y == null ? void 0 : Y.handle) ?? "", _e = ((ue = Y == null ? void 0 : Y.label) == null ? void 0 : ue.trim()) || "";
|
|
715
|
+
Te(!0);
|
|
555
716
|
try {
|
|
556
|
-
if (
|
|
717
|
+
if (o != null && o.checkout ? await a.linesAddForCheckout(C) : await a.linesAdd(C), g)
|
|
557
718
|
try {
|
|
558
|
-
const
|
|
559
|
-
|
|
719
|
+
const S = pt(), se = !!(o != null && o.checkout);
|
|
720
|
+
lt(g, t, {
|
|
560
721
|
eventType: "BUNDLE_ADDED_TO_BASKET",
|
|
561
|
-
shop:
|
|
562
|
-
anonymousUserId:
|
|
722
|
+
shop: t,
|
|
723
|
+
anonymousUserId: S,
|
|
563
724
|
bundleId: s,
|
|
564
|
-
productVariantIds:
|
|
565
|
-
grossPrice:
|
|
566
|
-
discountedPrice:
|
|
567
|
-
currency:
|
|
568
|
-
discountThresholdIdentifier:
|
|
569
|
-
discountLabel:
|
|
570
|
-
discountPercentage:
|
|
571
|
-
discountedAmount:
|
|
725
|
+
productVariantIds: Je,
|
|
726
|
+
grossPrice: P,
|
|
727
|
+
discountedPrice: fe,
|
|
728
|
+
currency: je ?? void 0,
|
|
729
|
+
discountThresholdIdentifier: et,
|
|
730
|
+
discountLabel: _e,
|
|
731
|
+
discountPercentage: ce,
|
|
732
|
+
discountedAmount: $e,
|
|
572
733
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
573
|
-
checkout:
|
|
574
|
-
mixpanelEvent:
|
|
734
|
+
checkout: se,
|
|
735
|
+
mixpanelEvent: se ? "checkout_started_with_bundle" : "bundle_added_to_cart"
|
|
575
736
|
});
|
|
576
737
|
} catch {
|
|
577
738
|
}
|
|
578
|
-
|
|
579
|
-
} catch (
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
),
|
|
739
|
+
Ke(), Se(), A(), (st = o == null ? void 0 : o.onComplete) == null || st.call(o), ae(null);
|
|
740
|
+
} catch (S) {
|
|
741
|
+
const se = S instanceof Error ? S.message : "", tt = /stock|sold out|inventory|insufficient|available|422/i.test(se);
|
|
742
|
+
ae(
|
|
743
|
+
z(tt ? "bundle.provider.stock_error" : "bundle.provider.add_error")
|
|
744
|
+
), A();
|
|
584
745
|
} finally {
|
|
585
|
-
|
|
746
|
+
Te(!1);
|
|
586
747
|
}
|
|
587
748
|
}, [
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
749
|
+
g,
|
|
750
|
+
qe,
|
|
751
|
+
Xe,
|
|
752
|
+
a,
|
|
753
|
+
Ke,
|
|
754
|
+
Se,
|
|
755
|
+
N,
|
|
756
|
+
je,
|
|
757
|
+
me,
|
|
758
|
+
ne,
|
|
759
|
+
He,
|
|
760
|
+
oe,
|
|
761
|
+
A,
|
|
762
|
+
Ee,
|
|
763
|
+
t,
|
|
764
|
+
z
|
|
765
|
+
]), c = J(async () => {
|
|
766
|
+
await Ze({
|
|
605
767
|
onComplete: () => {
|
|
606
|
-
var
|
|
607
|
-
(
|
|
768
|
+
var o;
|
|
769
|
+
(o = a.openCartUI) == null || o.call(a);
|
|
608
770
|
}
|
|
609
771
|
});
|
|
610
|
-
}, [
|
|
611
|
-
await
|
|
772
|
+
}, [a, Ze]), d = J(async () => {
|
|
773
|
+
await Ze({
|
|
612
774
|
checkout: !0,
|
|
613
775
|
onComplete: () => {
|
|
614
|
-
var
|
|
615
|
-
(
|
|
776
|
+
var o;
|
|
777
|
+
(o = a.navigateToCheckout) == null || o.call(a);
|
|
616
778
|
}
|
|
617
779
|
});
|
|
618
|
-
}, [
|
|
619
|
-
isOpen:
|
|
620
|
-
open:
|
|
621
|
-
openForHandle:
|
|
622
|
-
close:
|
|
623
|
-
toggle:
|
|
624
|
-
currentHandle:
|
|
625
|
-
setConfigHandle:
|
|
626
|
-
loadHandle:
|
|
627
|
-
syncCartQuantities:
|
|
628
|
-
loading:
|
|
629
|
-
submitting:
|
|
630
|
-
error:
|
|
631
|
-
currencyCode:
|
|
632
|
-
config:
|
|
633
|
-
eligibleVariants:
|
|
634
|
-
selections:
|
|
635
|
-
selectionOrder:
|
|
636
|
-
getVariantMaxSelectableQuantity:
|
|
637
|
-
setQuantity:
|
|
638
|
-
clearSelections:
|
|
639
|
-
bundleSize:
|
|
640
|
-
minRequired:
|
|
641
|
-
canSubmit:
|
|
642
|
-
submit:
|
|
643
|
-
submitAndCheckout:
|
|
780
|
+
}, [a, Ze]), v = L(() => ({
|
|
781
|
+
isOpen: I,
|
|
782
|
+
open: at,
|
|
783
|
+
openForHandle: W,
|
|
784
|
+
close: Se,
|
|
785
|
+
toggle: Oe,
|
|
786
|
+
currentHandle: ne,
|
|
787
|
+
setConfigHandle: q,
|
|
788
|
+
loadHandle: re,
|
|
789
|
+
syncCartQuantities: ot,
|
|
790
|
+
loading: xe,
|
|
791
|
+
submitting: ke,
|
|
792
|
+
error: ye,
|
|
793
|
+
currencyCode: je,
|
|
794
|
+
config: N,
|
|
795
|
+
eligibleVariants: oe,
|
|
796
|
+
selections: Ee,
|
|
797
|
+
selectionOrder: ht,
|
|
798
|
+
getVariantMaxSelectableQuantity: dt,
|
|
799
|
+
setQuantity: ut,
|
|
800
|
+
clearSelections: Ke,
|
|
801
|
+
bundleSize: qe,
|
|
802
|
+
minRequired: Be,
|
|
803
|
+
canSubmit: Xe,
|
|
804
|
+
submit: c,
|
|
805
|
+
submitAndCheckout: d,
|
|
806
|
+
locale: te,
|
|
807
|
+
t: z
|
|
644
808
|
}), [
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
U,
|
|
652
|
-
xt,
|
|
653
|
-
yt,
|
|
654
|
-
X,
|
|
655
|
-
st,
|
|
656
|
-
Ot,
|
|
657
|
-
nt,
|
|
658
|
-
vt,
|
|
659
|
-
re,
|
|
660
|
-
Bt,
|
|
661
|
-
W,
|
|
662
|
-
Jt,
|
|
663
|
-
ee,
|
|
809
|
+
qe,
|
|
810
|
+
Xe,
|
|
811
|
+
Ke,
|
|
812
|
+
Se,
|
|
813
|
+
N,
|
|
814
|
+
je,
|
|
664
815
|
ne,
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
816
|
+
oe,
|
|
817
|
+
ye,
|
|
818
|
+
I,
|
|
819
|
+
xe,
|
|
820
|
+
Be,
|
|
821
|
+
at,
|
|
822
|
+
W,
|
|
823
|
+
ht,
|
|
824
|
+
Ee,
|
|
825
|
+
q,
|
|
826
|
+
re,
|
|
827
|
+
ot,
|
|
828
|
+
dt,
|
|
829
|
+
ut,
|
|
830
|
+
c,
|
|
831
|
+
d,
|
|
832
|
+
ke,
|
|
833
|
+
Oe,
|
|
834
|
+
te,
|
|
835
|
+
z
|
|
670
836
|
]);
|
|
671
|
-
return /* @__PURE__ */ l(
|
|
837
|
+
return /* @__PURE__ */ l(Ut.Provider, { value: v, children: F });
|
|
672
838
|
}
|
|
673
|
-
function
|
|
674
|
-
const
|
|
675
|
-
if (!
|
|
839
|
+
function wt() {
|
|
840
|
+
const n = Gt(Ut);
|
|
841
|
+
if (!n)
|
|
676
842
|
throw new Error("useBundleBuilder must be used within <BundleProvider />");
|
|
677
|
-
return
|
|
843
|
+
return n;
|
|
678
844
|
}
|
|
679
|
-
function
|
|
680
|
-
const { isOpen:
|
|
681
|
-
return { isOpen:
|
|
845
|
+
function xi() {
|
|
846
|
+
const { isOpen: n, open: e, close: t, toggle: a } = wt();
|
|
847
|
+
return { isOpen: n, open: e, close: t, toggle: a };
|
|
682
848
|
}
|
|
683
|
-
const
|
|
684
|
-
button:
|
|
849
|
+
const un = "_button_18rtl_1", dn = {
|
|
850
|
+
button: un
|
|
685
851
|
};
|
|
686
|
-
function
|
|
687
|
-
const { toggle: t } =
|
|
852
|
+
function Ci(n) {
|
|
853
|
+
const { toggle: e, t } = wt();
|
|
688
854
|
return /* @__PURE__ */ l(
|
|
689
855
|
"button",
|
|
690
856
|
{
|
|
691
857
|
type: "button",
|
|
692
|
-
onClick:
|
|
693
|
-
className: [
|
|
694
|
-
children:
|
|
858
|
+
onClick: e,
|
|
859
|
+
className: [dn.button, n.className].filter(Boolean).join(" "),
|
|
860
|
+
children: n.children ?? t("bundle.button.default")
|
|
695
861
|
}
|
|
696
862
|
);
|
|
697
863
|
}
|
|
698
|
-
var
|
|
699
|
-
function
|
|
700
|
-
if (
|
|
701
|
-
|
|
702
|
-
var
|
|
703
|
-
linear: function(
|
|
704
|
-
var r =
|
|
705
|
-
return r *
|
|
864
|
+
var Nt, qt;
|
|
865
|
+
function hn() {
|
|
866
|
+
if (qt) return Nt;
|
|
867
|
+
qt = 1;
|
|
868
|
+
var n = {
|
|
869
|
+
linear: function(e, t, a, i) {
|
|
870
|
+
var r = a - t;
|
|
871
|
+
return r * e / i + t;
|
|
706
872
|
},
|
|
707
|
-
easeInQuad: function(
|
|
708
|
-
var r =
|
|
709
|
-
return r * (
|
|
873
|
+
easeInQuad: function(e, t, a, i) {
|
|
874
|
+
var r = a - t;
|
|
875
|
+
return r * (e /= i) * e + t;
|
|
710
876
|
},
|
|
711
|
-
easeOutQuad: function(
|
|
712
|
-
var r =
|
|
713
|
-
return -r * (
|
|
877
|
+
easeOutQuad: function(e, t, a, i) {
|
|
878
|
+
var r = a - t;
|
|
879
|
+
return -r * (e /= i) * (e - 2) + t;
|
|
714
880
|
},
|
|
715
|
-
easeInOutQuad: function(
|
|
716
|
-
var r =
|
|
717
|
-
return (
|
|
881
|
+
easeInOutQuad: function(e, t, a, i) {
|
|
882
|
+
var r = a - t;
|
|
883
|
+
return (e /= i / 2) < 1 ? r / 2 * e * e + t : -r / 2 * (--e * (e - 2) - 1) + t;
|
|
718
884
|
},
|
|
719
|
-
easeInCubic: function(
|
|
720
|
-
var r =
|
|
721
|
-
return r * (
|
|
885
|
+
easeInCubic: function(e, t, a, i) {
|
|
886
|
+
var r = a - t;
|
|
887
|
+
return r * (e /= i) * e * e + t;
|
|
722
888
|
},
|
|
723
|
-
easeOutCubic: function(
|
|
724
|
-
var r =
|
|
725
|
-
return r * ((
|
|
889
|
+
easeOutCubic: function(e, t, a, i) {
|
|
890
|
+
var r = a - t;
|
|
891
|
+
return r * ((e = e / i - 1) * e * e + 1) + t;
|
|
726
892
|
},
|
|
727
|
-
easeInOutCubic: function(
|
|
728
|
-
var r =
|
|
729
|
-
return (
|
|
893
|
+
easeInOutCubic: function(e, t, a, i) {
|
|
894
|
+
var r = a - t;
|
|
895
|
+
return (e /= i / 2) < 1 ? r / 2 * e * e * e + t : r / 2 * ((e -= 2) * e * e + 2) + t;
|
|
730
896
|
},
|
|
731
|
-
easeInQuart: function(
|
|
732
|
-
var r =
|
|
733
|
-
return r * (
|
|
897
|
+
easeInQuart: function(e, t, a, i) {
|
|
898
|
+
var r = a - t;
|
|
899
|
+
return r * (e /= i) * e * e * e + t;
|
|
734
900
|
},
|
|
735
|
-
easeOutQuart: function(
|
|
736
|
-
var r =
|
|
737
|
-
return -r * ((
|
|
901
|
+
easeOutQuart: function(e, t, a, i) {
|
|
902
|
+
var r = a - t;
|
|
903
|
+
return -r * ((e = e / i - 1) * e * e * e - 1) + t;
|
|
738
904
|
},
|
|
739
|
-
easeInOutQuart: function(
|
|
740
|
-
var r =
|
|
741
|
-
return (
|
|
905
|
+
easeInOutQuart: function(e, t, a, i) {
|
|
906
|
+
var r = a - t;
|
|
907
|
+
return (e /= i / 2) < 1 ? r / 2 * e * e * e * e + t : -r / 2 * ((e -= 2) * e * e * e - 2) + t;
|
|
742
908
|
},
|
|
743
|
-
easeInQuint: function(
|
|
744
|
-
var r =
|
|
745
|
-
return r * (
|
|
909
|
+
easeInQuint: function(e, t, a, i) {
|
|
910
|
+
var r = a - t;
|
|
911
|
+
return r * (e /= i) * e * e * e * e + t;
|
|
746
912
|
},
|
|
747
|
-
easeOutQuint: function(
|
|
748
|
-
var r =
|
|
749
|
-
return r * ((
|
|
913
|
+
easeOutQuint: function(e, t, a, i) {
|
|
914
|
+
var r = a - t;
|
|
915
|
+
return r * ((e = e / i - 1) * e * e * e * e + 1) + t;
|
|
750
916
|
},
|
|
751
|
-
easeInOutQuint: function(
|
|
752
|
-
var r =
|
|
753
|
-
return (
|
|
917
|
+
easeInOutQuint: function(e, t, a, i) {
|
|
918
|
+
var r = a - t;
|
|
919
|
+
return (e /= i / 2) < 1 ? r / 2 * e * e * e * e * e + t : r / 2 * ((e -= 2) * e * e * e * e + 2) + t;
|
|
754
920
|
},
|
|
755
|
-
easeInSine: function(
|
|
756
|
-
var r =
|
|
757
|
-
return -r * Math.cos(
|
|
921
|
+
easeInSine: function(e, t, a, i) {
|
|
922
|
+
var r = a - t;
|
|
923
|
+
return -r * Math.cos(e / i * (Math.PI / 2)) + r + t;
|
|
758
924
|
},
|
|
759
|
-
easeOutSine: function(
|
|
760
|
-
var r =
|
|
761
|
-
return r * Math.sin(
|
|
925
|
+
easeOutSine: function(e, t, a, i) {
|
|
926
|
+
var r = a - t;
|
|
927
|
+
return r * Math.sin(e / i * (Math.PI / 2)) + t;
|
|
762
928
|
},
|
|
763
|
-
easeInOutSine: function(
|
|
764
|
-
var r =
|
|
765
|
-
return -r / 2 * (Math.cos(Math.PI *
|
|
929
|
+
easeInOutSine: function(e, t, a, i) {
|
|
930
|
+
var r = a - t;
|
|
931
|
+
return -r / 2 * (Math.cos(Math.PI * e / i) - 1) + t;
|
|
766
932
|
},
|
|
767
|
-
easeInExpo: function(
|
|
768
|
-
var r =
|
|
769
|
-
return
|
|
933
|
+
easeInExpo: function(e, t, a, i) {
|
|
934
|
+
var r = a - t;
|
|
935
|
+
return e == 0 ? t : r * Math.pow(2, 10 * (e / i - 1)) + t;
|
|
770
936
|
},
|
|
771
|
-
easeOutExpo: function(
|
|
772
|
-
var r =
|
|
773
|
-
return
|
|
937
|
+
easeOutExpo: function(e, t, a, i) {
|
|
938
|
+
var r = a - t;
|
|
939
|
+
return e == i ? t + r : r * (-Math.pow(2, -10 * e / i) + 1) + t;
|
|
774
940
|
},
|
|
775
|
-
easeInOutExpo: function(
|
|
776
|
-
var r =
|
|
777
|
-
return
|
|
941
|
+
easeInOutExpo: function(e, t, a, i) {
|
|
942
|
+
var r = a - t;
|
|
943
|
+
return e === 0 ? t : e === i ? t + r : (e /= i / 2) < 1 ? r / 2 * Math.pow(2, 10 * (e - 1)) + t : r / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
|
|
778
944
|
},
|
|
779
|
-
easeInCirc: function(
|
|
780
|
-
var r =
|
|
781
|
-
return -r * (Math.sqrt(1 - (
|
|
945
|
+
easeInCirc: function(e, t, a, i) {
|
|
946
|
+
var r = a - t;
|
|
947
|
+
return -r * (Math.sqrt(1 - (e /= i) * e) - 1) + t;
|
|
782
948
|
},
|
|
783
|
-
easeOutCirc: function(
|
|
784
|
-
var r =
|
|
785
|
-
return r * Math.sqrt(1 - (
|
|
949
|
+
easeOutCirc: function(e, t, a, i) {
|
|
950
|
+
var r = a - t;
|
|
951
|
+
return r * Math.sqrt(1 - (e = e / i - 1) * e) + t;
|
|
786
952
|
},
|
|
787
|
-
easeInOutCirc: function(
|
|
788
|
-
var r =
|
|
789
|
-
return (
|
|
953
|
+
easeInOutCirc: function(e, t, a, i) {
|
|
954
|
+
var r = a - t;
|
|
955
|
+
return (e /= i / 2) < 1 ? -r / 2 * (Math.sqrt(1 - e * e) - 1) + t : r / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
|
|
790
956
|
},
|
|
791
|
-
easeInElastic: function(
|
|
792
|
-
var r =
|
|
793
|
-
return
|
|
957
|
+
easeInElastic: function(e, t, a, i) {
|
|
958
|
+
var r = a - t, h, u, B;
|
|
959
|
+
return B = 1.70158, u = 0, h = r, e === 0 ? t : (e /= i) === 1 ? t + r : (u || (u = i * 0.3), h < Math.abs(r) ? (h = r, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(r / h), -(h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u)) + t);
|
|
794
960
|
},
|
|
795
|
-
easeOutElastic: function(
|
|
796
|
-
var r =
|
|
797
|
-
return
|
|
961
|
+
easeOutElastic: function(e, t, a, i) {
|
|
962
|
+
var r = a - t, h, u, B;
|
|
963
|
+
return B = 1.70158, u = 0, h = r, e === 0 ? t : (e /= i) === 1 ? t + r : (u || (u = i * 0.3), h < Math.abs(r) ? (h = r, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(r / h), h * Math.pow(2, -10 * e) * Math.sin((e * i - B) * (2 * Math.PI) / u) + r + t);
|
|
798
964
|
},
|
|
799
|
-
easeInOutElastic: function(
|
|
800
|
-
var r =
|
|
801
|
-
return
|
|
965
|
+
easeInOutElastic: function(e, t, a, i) {
|
|
966
|
+
var r = a - t, h, u, B;
|
|
967
|
+
return B = 1.70158, u = 0, h = r, e === 0 ? t : (e /= i / 2) === 2 ? t + r : (u || (u = i * (0.3 * 1.5)), h < Math.abs(r) ? (h = r, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(r / h), e < 1 ? -0.5 * (h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u)) + t : h * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u) * 0.5 + r + t);
|
|
802
968
|
},
|
|
803
|
-
easeInBack: function(
|
|
804
|
-
var
|
|
805
|
-
return r === void 0 && (r = 1.70158),
|
|
969
|
+
easeInBack: function(e, t, a, i, r) {
|
|
970
|
+
var h = a - t;
|
|
971
|
+
return r === void 0 && (r = 1.70158), h * (e /= i) * e * ((r + 1) * e - r) + t;
|
|
806
972
|
},
|
|
807
|
-
easeOutBack: function(
|
|
808
|
-
var
|
|
809
|
-
return r === void 0 && (r = 1.70158),
|
|
973
|
+
easeOutBack: function(e, t, a, i, r) {
|
|
974
|
+
var h = a - t;
|
|
975
|
+
return r === void 0 && (r = 1.70158), h * ((e = e / i - 1) * e * ((r + 1) * e + r) + 1) + t;
|
|
810
976
|
},
|
|
811
|
-
easeInOutBack: function(
|
|
812
|
-
var
|
|
813
|
-
return r === void 0 && (r = 1.70158), (
|
|
977
|
+
easeInOutBack: function(e, t, a, i, r) {
|
|
978
|
+
var h = a - t;
|
|
979
|
+
return r === void 0 && (r = 1.70158), (e /= i / 2) < 1 ? h / 2 * (e * e * (((r *= 1.525) + 1) * e - r)) + t : h / 2 * ((e -= 2) * e * (((r *= 1.525) + 1) * e + r) + 2) + t;
|
|
814
980
|
},
|
|
815
|
-
easeInBounce: function(
|
|
816
|
-
var r =
|
|
817
|
-
return
|
|
981
|
+
easeInBounce: function(e, t, a, i) {
|
|
982
|
+
var r = a - t, h;
|
|
983
|
+
return h = n.easeOutBounce(i - e, 0, r, i), r - h + t;
|
|
818
984
|
},
|
|
819
|
-
easeOutBounce: function(
|
|
820
|
-
var r =
|
|
821
|
-
return (
|
|
985
|
+
easeOutBounce: function(e, t, a, i) {
|
|
986
|
+
var r = a - t;
|
|
987
|
+
return (e /= i) < 1 / 2.75 ? r * (7.5625 * e * e) + t : e < 2 / 2.75 ? r * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? r * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : r * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
|
|
822
988
|
},
|
|
823
|
-
easeInOutBounce: function(
|
|
824
|
-
var r =
|
|
825
|
-
return
|
|
989
|
+
easeInOutBounce: function(e, t, a, i) {
|
|
990
|
+
var r = a - t, h;
|
|
991
|
+
return e < i / 2 ? (h = n.easeInBounce(e * 2, 0, r, i), h * 0.5 + t) : (h = n.easeOutBounce(e * 2 - i, 0, r, i), h * 0.5 + r * 0.5 + t);
|
|
826
992
|
}
|
|
827
993
|
};
|
|
828
|
-
return
|
|
994
|
+
return Nt = n, Nt;
|
|
829
995
|
}
|
|
830
|
-
var
|
|
831
|
-
function
|
|
832
|
-
return
|
|
996
|
+
var mn = hn();
|
|
997
|
+
function bn(n) {
|
|
998
|
+
return n * Math.PI / 180;
|
|
833
999
|
}
|
|
834
|
-
function
|
|
835
|
-
return
|
|
1000
|
+
function pe(n, e) {
|
|
1001
|
+
return n + Math.random() * (e - n);
|
|
836
1002
|
}
|
|
837
|
-
function
|
|
838
|
-
return Math.floor(
|
|
1003
|
+
function fn(n, e) {
|
|
1004
|
+
return Math.floor(n + Math.random() * (e - n + 1));
|
|
839
1005
|
}
|
|
840
|
-
var
|
|
841
|
-
(function(
|
|
842
|
-
|
|
843
|
-
})(
|
|
844
|
-
var
|
|
845
|
-
(function(
|
|
846
|
-
|
|
847
|
-
})(
|
|
848
|
-
const
|
|
849
|
-
class
|
|
850
|
-
constructor(
|
|
851
|
-
this.getOptions =
|
|
852
|
-
const { colors: r, initialVelocityX:
|
|
853
|
-
this.context =
|
|
1006
|
+
var bt;
|
|
1007
|
+
(function(n) {
|
|
1008
|
+
n[n.Circle = 0] = "Circle", n[n.Square = 1] = "Square", n[n.Strip = 2] = "Strip";
|
|
1009
|
+
})(bt || (bt = {}));
|
|
1010
|
+
var Ge;
|
|
1011
|
+
(function(n) {
|
|
1012
|
+
n[n.Positive = 1] = "Positive", n[n.Negative = -1] = "Negative";
|
|
1013
|
+
})(Ge || (Ge = {}));
|
|
1014
|
+
const _n = 1e3 / 60;
|
|
1015
|
+
class pn {
|
|
1016
|
+
constructor(e, t, a, i) {
|
|
1017
|
+
this.getOptions = t;
|
|
1018
|
+
const { colors: r, initialVelocityX: h, initialVelocityY: u } = this.getOptions();
|
|
1019
|
+
this.context = e, this.x = a, this.y = i, this.w = pe(5, 20), this.h = pe(5, 20), this.radius = pe(5, 10), this.vx = typeof h == "number" ? pe(-h, h) : pe(h.min, h.max), this.vy = typeof u == "number" ? pe(-u, 0) : pe(u.min, u.max), this.shape = fn(0, 2), this.angle = bn(pe(0, 360)), this.angularSpin = pe(-0.2, 0.2), this.color = r[Math.floor(Math.random() * r.length)], this.rotateY = pe(0, 1), this.rotationDirection = pe(0, 1) ? Ge.Positive : Ge.Negative;
|
|
854
1020
|
}
|
|
855
|
-
update(
|
|
856
|
-
const { gravity:
|
|
857
|
-
this.x += this.vx *
|
|
858
|
-
const
|
|
859
|
-
if (this.rotateY +=
|
|
860
|
-
|
|
1021
|
+
update(e) {
|
|
1022
|
+
const { gravity: t, wind: a, friction: i, opacity: r, drawShape: h } = this.getOptions(), u = e / _n;
|
|
1023
|
+
this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx += a * u, this.vx *= i ** u, this.vy *= i ** u, this.rotateY >= 1 && this.rotationDirection === Ge.Positive ? this.rotationDirection = Ge.Negative : this.rotateY <= -1 && this.rotationDirection === Ge.Negative && (this.rotationDirection = Ge.Positive);
|
|
1024
|
+
const B = 0.1 * this.rotationDirection * u;
|
|
1025
|
+
if (this.rotateY += B, 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 = r, this.context.lineCap = "round", this.context.lineWidth = 2, h && typeof h == "function")
|
|
1026
|
+
h.call(this, this.context);
|
|
861
1027
|
else
|
|
862
1028
|
switch (this.shape) {
|
|
863
|
-
case
|
|
1029
|
+
case bt.Circle: {
|
|
864
1030
|
this.context.beginPath(), this.context.arc(0, 0, this.radius, 0, 2 * Math.PI), this.context.fill();
|
|
865
1031
|
break;
|
|
866
1032
|
}
|
|
867
|
-
case
|
|
1033
|
+
case bt.Square: {
|
|
868
1034
|
this.context.fillRect(-this.w / 2, -this.h / 2, this.w, this.h);
|
|
869
1035
|
break;
|
|
870
1036
|
}
|
|
871
|
-
case
|
|
1037
|
+
case bt.Strip: {
|
|
872
1038
|
this.context.fillRect(-this.w / 6, -this.h / 2, this.w / 3, this.h);
|
|
873
1039
|
break;
|
|
874
1040
|
}
|
|
@@ -876,39 +1042,39 @@ class rn {
|
|
|
876
1042
|
this.context.closePath(), this.context.restore();
|
|
877
1043
|
}
|
|
878
1044
|
}
|
|
879
|
-
class
|
|
880
|
-
constructor(
|
|
1045
|
+
class yn {
|
|
1046
|
+
constructor(e, t) {
|
|
881
1047
|
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) => {
|
|
882
1048
|
this.particles.splice(i, 1);
|
|
883
1049
|
}, this.getParticle = () => {
|
|
884
|
-
const i =
|
|
885
|
-
return new
|
|
1050
|
+
const i = pe(this.x, this.w + this.x), r = pe(this.y, this.h + this.y);
|
|
1051
|
+
return new pn(this.context, this.getOptions, i, r);
|
|
886
1052
|
}, this.animate = (i) => {
|
|
887
|
-
const { canvas: r, context:
|
|
888
|
-
if (!
|
|
1053
|
+
const { canvas: r, context: h, particlesGenerated: u, lastNumberOfPieces: B } = this, { run: le, recycle: $, numberOfPieces: D, debug: de, tweenFunction: F, tweenDuration: te } = this.getOptions();
|
|
1054
|
+
if (!le)
|
|
889
1055
|
return !1;
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
for (let
|
|
1056
|
+
const z = this.particles.length, K = $ ? z : u;
|
|
1057
|
+
if (K < D) {
|
|
1058
|
+
B !== D && (this.tweenProgress = 0, this.tweenFrom = K, this.lastNumberOfPieces = D), this.tweenProgress = Math.min(te, Math.max(0, this.tweenProgress + i));
|
|
1059
|
+
const g = F(this.tweenProgress, this.tweenFrom, D, te), H = Math.round(g - K);
|
|
1060
|
+
for (let I = 0; I < H; I++)
|
|
895
1061
|
this.particles.push(this.getParticle());
|
|
896
|
-
this.particlesGenerated +=
|
|
1062
|
+
this.particlesGenerated += H;
|
|
897
1063
|
}
|
|
898
|
-
|
|
899
|
-
for (let
|
|
900
|
-
const
|
|
901
|
-
|
|
1064
|
+
de && (h.font = "12px sans-serif", h.fillStyle = "#333", h.textAlign = "right", h.fillText(`Particles: ${z}`, r.width - 10, r.height - 20));
|
|
1065
|
+
for (let g = this.particles.length - 1; g >= 0; g--) {
|
|
1066
|
+
const H = this.particles[g];
|
|
1067
|
+
H.update(i), (H.y > r.height || H.y < -100 || H.x > r.width + 100 || H.x < -100) && ($ && K <= D ? this.particles[g] = this.getParticle() : this.removeParticleAt(g));
|
|
902
1068
|
}
|
|
903
|
-
return
|
|
904
|
-
}, this.canvas =
|
|
905
|
-
const
|
|
906
|
-
if (!
|
|
1069
|
+
return z > 0 || K < D;
|
|
1070
|
+
}, this.canvas = e;
|
|
1071
|
+
const a = this.canvas.getContext("2d");
|
|
1072
|
+
if (!a)
|
|
907
1073
|
throw new Error("Could not get canvas context");
|
|
908
|
-
this.context =
|
|
1074
|
+
this.context = a, this.getOptions = t;
|
|
909
1075
|
}
|
|
910
1076
|
}
|
|
911
|
-
const
|
|
1077
|
+
const Rt = {
|
|
912
1078
|
width: typeof window < "u" ? window.innerWidth : 300,
|
|
913
1079
|
height: typeof window < "u" ? window.innerHeight : 200,
|
|
914
1080
|
numberOfPieces: 200,
|
|
@@ -938,13 +1104,13 @@ const Ie = {
|
|
|
938
1104
|
],
|
|
939
1105
|
opacity: 1,
|
|
940
1106
|
debug: !1,
|
|
941
|
-
tweenFunction:
|
|
1107
|
+
tweenFunction: mn.easeInOutQuad,
|
|
942
1108
|
tweenDuration: 5e3,
|
|
943
1109
|
recycle: !0,
|
|
944
1110
|
run: !0
|
|
945
1111
|
};
|
|
946
|
-
class
|
|
947
|
-
constructor(
|
|
1112
|
+
class gn {
|
|
1113
|
+
constructor(e, t) {
|
|
948
1114
|
this.lastFrameTime = 0, this.setOptionsWithDefaults = (i) => {
|
|
949
1115
|
const r = {
|
|
950
1116
|
confettiSource: {
|
|
@@ -956,55 +1122,55 @@ class on {
|
|
|
956
1122
|
};
|
|
957
1123
|
this._options = {
|
|
958
1124
|
...r,
|
|
959
|
-
...
|
|
1125
|
+
...Rt,
|
|
960
1126
|
...i
|
|
961
1127
|
}, Object.assign(this, i.confettiSource);
|
|
962
1128
|
}, this.update = (i = 0) => {
|
|
963
|
-
const { options: { run: r, onConfettiComplete:
|
|
964
|
-
if (
|
|
1129
|
+
const { options: { run: r, onConfettiComplete: h, frameRate: u }, canvas: B, context: le } = this, $ = Math.min(i - this.lastFrameTime, 50);
|
|
1130
|
+
if (u && $ < 1e3 / u) {
|
|
965
1131
|
this.rafId = requestAnimationFrame(this.update);
|
|
966
1132
|
return;
|
|
967
1133
|
}
|
|
968
|
-
this.lastFrameTime = i - (
|
|
1134
|
+
this.lastFrameTime = i - (u ? $ % u : 0), r && (le.fillStyle = "white", le.clearRect(0, 0, B.width, B.height)), this.generator.animate($) ? this.rafId = requestAnimationFrame(this.update) : (h && typeof h == "function" && this.generator.particlesGenerated > 0 && h.call(this, this), this._options.run = !1);
|
|
969
1135
|
}, this.reset = () => {
|
|
970
1136
|
this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
|
|
971
1137
|
}, this.stop = () => {
|
|
972
1138
|
this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
|
|
973
|
-
}, this.canvas =
|
|
974
|
-
const
|
|
975
|
-
if (!
|
|
1139
|
+
}, this.canvas = e;
|
|
1140
|
+
const a = this.canvas.getContext("2d");
|
|
1141
|
+
if (!a)
|
|
976
1142
|
throw new Error("Could not get canvas context");
|
|
977
|
-
this.context =
|
|
1143
|
+
this.context = a, this.generator = new yn(this.canvas, () => this.options), this.options = t, this.update();
|
|
978
1144
|
}
|
|
979
1145
|
get options() {
|
|
980
1146
|
return this._options;
|
|
981
1147
|
}
|
|
982
|
-
set options(
|
|
1148
|
+
set options(e) {
|
|
983
1149
|
var i, r;
|
|
984
|
-
const
|
|
985
|
-
this.setOptionsWithDefaults(
|
|
1150
|
+
const t = (i = this._options) == null ? void 0 : i.run, a = (r = this._options) == null ? void 0 : r.recycle;
|
|
1151
|
+
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && a === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
|
|
986
1152
|
}
|
|
987
1153
|
}
|
|
988
|
-
const
|
|
989
|
-
class
|
|
990
|
-
constructor(
|
|
991
|
-
super(
|
|
1154
|
+
const vn = vt.createRef();
|
|
1155
|
+
class Lt extends vt.Component {
|
|
1156
|
+
constructor(e) {
|
|
1157
|
+
super(e), this.canvas = vt.createRef(), this.canvas = e.canvasRef || vn;
|
|
992
1158
|
}
|
|
993
1159
|
componentDidMount() {
|
|
994
1160
|
if (this.canvas.current) {
|
|
995
|
-
const
|
|
996
|
-
this.confetti = new
|
|
1161
|
+
const e = St(this.props)[0];
|
|
1162
|
+
this.confetti = new gn(this.canvas.current, e);
|
|
997
1163
|
}
|
|
998
1164
|
}
|
|
999
1165
|
componentDidUpdate() {
|
|
1000
|
-
const
|
|
1001
|
-
this.confetti && (this.confetti.options =
|
|
1166
|
+
const e = St(this.props)[0];
|
|
1167
|
+
this.confetti && (this.confetti.options = e);
|
|
1002
1168
|
}
|
|
1003
1169
|
componentWillUnmount() {
|
|
1004
1170
|
this.confetti && this.confetti.stop(), this.confetti = void 0;
|
|
1005
1171
|
}
|
|
1006
1172
|
render() {
|
|
1007
|
-
const [
|
|
1173
|
+
const [e, t] = St(this.props), a = {
|
|
1008
1174
|
zIndex: 2,
|
|
1009
1175
|
position: "absolute",
|
|
1010
1176
|
pointerEvents: "none",
|
|
@@ -1012,45 +1178,45 @@ class Ne extends fe.Component {
|
|
|
1012
1178
|
left: 0,
|
|
1013
1179
|
bottom: 0,
|
|
1014
1180
|
right: 0,
|
|
1015
|
-
...
|
|
1181
|
+
...t.style
|
|
1016
1182
|
};
|
|
1017
|
-
return l("canvas", { width:
|
|
1183
|
+
return l("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: a });
|
|
1018
1184
|
}
|
|
1019
1185
|
}
|
|
1020
|
-
|
|
1021
|
-
...
|
|
1186
|
+
Lt.defaultProps = {
|
|
1187
|
+
...Rt
|
|
1022
1188
|
};
|
|
1023
|
-
|
|
1024
|
-
function
|
|
1025
|
-
const
|
|
1026
|
-
...Object.keys(
|
|
1189
|
+
Lt.displayName = "ReactConfetti";
|
|
1190
|
+
function St(n) {
|
|
1191
|
+
const e = {}, t = {}, a = {}, i = [
|
|
1192
|
+
...Object.keys(Rt),
|
|
1027
1193
|
"confettiSource",
|
|
1028
1194
|
"drawShape",
|
|
1029
1195
|
"onConfettiComplete",
|
|
1030
1196
|
"frameRate"
|
|
1031
1197
|
], r = ["canvasRef"];
|
|
1032
|
-
for (const
|
|
1033
|
-
const
|
|
1034
|
-
i.includes(
|
|
1198
|
+
for (const h in n) {
|
|
1199
|
+
const u = n[h];
|
|
1200
|
+
i.includes(h) ? e[h] = u : r.includes(h) ? r[h] = u : a[h] = u;
|
|
1035
1201
|
}
|
|
1036
|
-
return [
|
|
1202
|
+
return [e, a, t];
|
|
1037
1203
|
}
|
|
1038
|
-
const
|
|
1204
|
+
const wn = vt.forwardRef((n, e) => l(Lt, { canvasRef: e, ...n }));
|
|
1039
1205
|
/**
|
|
1040
1206
|
* @license lucide-react v0.515.0 - ISC
|
|
1041
1207
|
*
|
|
1042
1208
|
* This source code is licensed under the ISC license.
|
|
1043
1209
|
* See the LICENSE file in the root directory of this source tree.
|
|
1044
1210
|
*/
|
|
1045
|
-
const
|
|
1211
|
+
const xn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (n) => n.replace(
|
|
1046
1212
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
1047
|
-
(
|
|
1048
|
-
),
|
|
1049
|
-
const
|
|
1050
|
-
return
|
|
1051
|
-
},
|
|
1052
|
-
for (const
|
|
1053
|
-
if (
|
|
1213
|
+
(e, t, a) => a ? a.toUpperCase() : t.toLowerCase()
|
|
1214
|
+
), $t = (n) => {
|
|
1215
|
+
const e = Cn(n);
|
|
1216
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1217
|
+
}, Ht = (...n) => n.filter((e, t, a) => !!e && e.trim() !== "" && a.indexOf(e) === t).join(" ").trim(), In = (n) => {
|
|
1218
|
+
for (const e in n)
|
|
1219
|
+
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
1054
1220
|
return !0;
|
|
1055
1221
|
};
|
|
1056
1222
|
/**
|
|
@@ -1059,7 +1225,7 @@ const cn = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), un = (
|
|
|
1059
1225
|
* This source code is licensed under the ISC license.
|
|
1060
1226
|
* See the LICENSE file in the root directory of this source tree.
|
|
1061
1227
|
*/
|
|
1062
|
-
var
|
|
1228
|
+
var Nn = {
|
|
1063
1229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1064
1230
|
width: 24,
|
|
1065
1231
|
height: 24,
|
|
@@ -1076,31 +1242,31 @@ var hn = {
|
|
|
1076
1242
|
* This source code is licensed under the ISC license.
|
|
1077
1243
|
* See the LICENSE file in the root directory of this source tree.
|
|
1078
1244
|
*/
|
|
1079
|
-
const
|
|
1245
|
+
const Sn = zt(
|
|
1080
1246
|
({
|
|
1081
|
-
color:
|
|
1082
|
-
size:
|
|
1083
|
-
strokeWidth:
|
|
1084
|
-
absoluteStrokeWidth:
|
|
1247
|
+
color: n = "currentColor",
|
|
1248
|
+
size: e = 24,
|
|
1249
|
+
strokeWidth: t = 2,
|
|
1250
|
+
absoluteStrokeWidth: a,
|
|
1085
1251
|
className: i = "",
|
|
1086
1252
|
children: r,
|
|
1087
|
-
iconNode:
|
|
1088
|
-
...
|
|
1089
|
-
},
|
|
1253
|
+
iconNode: h,
|
|
1254
|
+
...u
|
|
1255
|
+
}, B) => Tt(
|
|
1090
1256
|
"svg",
|
|
1091
1257
|
{
|
|
1092
|
-
ref:
|
|
1093
|
-
...
|
|
1094
|
-
width:
|
|
1095
|
-
height:
|
|
1096
|
-
stroke:
|
|
1097
|
-
strokeWidth:
|
|
1098
|
-
className:
|
|
1099
|
-
...!r && !
|
|
1100
|
-
...
|
|
1258
|
+
ref: B,
|
|
1259
|
+
...Nn,
|
|
1260
|
+
width: e,
|
|
1261
|
+
height: e,
|
|
1262
|
+
stroke: n,
|
|
1263
|
+
strokeWidth: a ? Number(t) * 24 / Number(e) : t,
|
|
1264
|
+
className: Ht("lucide", i),
|
|
1265
|
+
...!r && !In(u) && { "aria-hidden": "true" },
|
|
1266
|
+
...u
|
|
1101
1267
|
},
|
|
1102
1268
|
[
|
|
1103
|
-
...
|
|
1269
|
+
...h.map(([le, $]) => Tt(le, $)),
|
|
1104
1270
|
...Array.isArray(r) ? r : [r]
|
|
1105
1271
|
]
|
|
1106
1272
|
)
|
|
@@ -1111,20 +1277,20 @@ const mn = $e(
|
|
|
1111
1277
|
* This source code is licensed under the ISC license.
|
|
1112
1278
|
* See the LICENSE file in the root directory of this source tree.
|
|
1113
1279
|
*/
|
|
1114
|
-
const
|
|
1115
|
-
const
|
|
1116
|
-
({ className:
|
|
1280
|
+
const Mt = (n, e) => {
|
|
1281
|
+
const t = zt(
|
|
1282
|
+
({ className: a, ...i }, r) => Tt(Sn, {
|
|
1117
1283
|
ref: r,
|
|
1118
|
-
iconNode:
|
|
1119
|
-
className:
|
|
1120
|
-
`lucide-${
|
|
1121
|
-
`lucide-${
|
|
1122
|
-
|
|
1284
|
+
iconNode: e,
|
|
1285
|
+
className: Ht(
|
|
1286
|
+
`lucide-${xn($t(n))}`,
|
|
1287
|
+
`lucide-${n}`,
|
|
1288
|
+
a
|
|
1123
1289
|
),
|
|
1124
1290
|
...i
|
|
1125
1291
|
})
|
|
1126
1292
|
);
|
|
1127
|
-
return
|
|
1293
|
+
return t.displayName = $t(n), t;
|
|
1128
1294
|
};
|
|
1129
1295
|
/**
|
|
1130
1296
|
* @license lucide-react v0.515.0 - ISC
|
|
@@ -1132,328 +1298,328 @@ const Se = (a, t) => {
|
|
|
1132
1298
|
* This source code is licensed under the ISC license.
|
|
1133
1299
|
* See the LICENSE file in the root directory of this source tree.
|
|
1134
1300
|
*/
|
|
1135
|
-
const
|
|
1301
|
+
const Bn = [
|
|
1136
1302
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
1137
1303
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
1138
|
-
],
|
|
1304
|
+
], Vt = Mt("plus", Bn);
|
|
1139
1305
|
/**
|
|
1140
1306
|
* @license lucide-react v0.515.0 - ISC
|
|
1141
1307
|
*
|
|
1142
1308
|
* This source code is licensed under the ISC license.
|
|
1143
1309
|
* See the LICENSE file in the root directory of this source tree.
|
|
1144
1310
|
*/
|
|
1145
|
-
const
|
|
1311
|
+
const kn = [
|
|
1146
1312
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
1147
1313
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
1148
|
-
],
|
|
1314
|
+
], Tn = Mt("search", kn);
|
|
1149
1315
|
/**
|
|
1150
1316
|
* @license lucide-react v0.515.0 - ISC
|
|
1151
1317
|
*
|
|
1152
1318
|
* This source code is licensed under the ISC license.
|
|
1153
1319
|
* See the LICENSE file in the root directory of this source tree.
|
|
1154
1320
|
*/
|
|
1155
|
-
const
|
|
1321
|
+
const Rn = [
|
|
1156
1322
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
1157
1323
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
1158
1324
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
1159
1325
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
1160
1326
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
1161
|
-
],
|
|
1162
|
-
backdrop:
|
|
1163
|
-
celebrationOverlay:
|
|
1164
|
-
celebrationChip:
|
|
1165
|
-
backdropOpen:
|
|
1166
|
-
backdropClosed:
|
|
1167
|
-
panel:
|
|
1168
|
-
panelOpen:
|
|
1169
|
-
panelClosed:
|
|
1170
|
-
header:
|
|
1171
|
-
headerCenter:
|
|
1172
|
-
title:
|
|
1173
|
-
searchIconButton:
|
|
1174
|
-
headerTitleWrap:
|
|
1175
|
-
headerSearchWrap:
|
|
1176
|
-
headerSearchOpen:
|
|
1177
|
-
searchBar:
|
|
1178
|
-
searchInput:
|
|
1179
|
-
searchClearButton:
|
|
1180
|
-
closeButton:
|
|
1181
|
-
body:
|
|
1182
|
-
muted:
|
|
1183
|
-
error:
|
|
1184
|
-
variants:
|
|
1185
|
-
variantList:
|
|
1186
|
-
variantRow:
|
|
1187
|
-
variantRowSoldOut:
|
|
1188
|
-
variantLeft:
|
|
1189
|
-
addToBundleButton:
|
|
1190
|
-
soldOutContainer:
|
|
1191
|
-
stockLimitContainer:
|
|
1192
|
-
soldOut:
|
|
1193
|
-
stockLimitNotice:
|
|
1194
|
-
variantThumb:
|
|
1195
|
-
variantThumbImg:
|
|
1196
|
-
variantThumbFallback:
|
|
1197
|
-
variantInfo:
|
|
1198
|
-
variantName:
|
|
1199
|
-
variantMeta:
|
|
1200
|
-
variantPriceRow:
|
|
1201
|
-
variantCompareAt:
|
|
1202
|
-
variantPrice:
|
|
1203
|
-
qtyControls:
|
|
1204
|
-
qtyControlsWrap:
|
|
1205
|
-
qtyButton:
|
|
1206
|
-
qtyValue:
|
|
1207
|
-
footer:
|
|
1208
|
-
poweredBy:
|
|
1209
|
-
boxSummaryWindow:
|
|
1210
|
-
boxSummaryRow:
|
|
1211
|
-
boxSlot:
|
|
1212
|
-
boxItem:
|
|
1213
|
-
boxItemClickable:
|
|
1214
|
-
boxThresholdLabel:
|
|
1215
|
-
boxItemPlaceholder:
|
|
1216
|
-
boxItemFilled:
|
|
1217
|
-
boxItemThreshold:
|
|
1218
|
-
boxItemDiscountText:
|
|
1219
|
-
boxItemPlus:
|
|
1220
|
-
boxItemImage:
|
|
1221
|
-
boxItemFallback:
|
|
1222
|
-
ctaButtonGroup:
|
|
1223
|
-
ctaButtonGroupAnimating:
|
|
1224
|
-
cta:
|
|
1225
|
-
ctaDualLeft:
|
|
1226
|
-
ctaDualLeftAnimating:
|
|
1227
|
-
ctaDualRight:
|
|
1228
|
-
ctaDualRightAnimating:
|
|
1229
|
-
ctaTotals:
|
|
1230
|
-
ctaDiscountBadge:
|
|
1231
|
-
ctaTotalsWrap:
|
|
1232
|
-
ctaTotalsWrapVisible:
|
|
1233
|
-
ctaTotalsStrike:
|
|
1234
|
-
ctaTotalsPrice:
|
|
1327
|
+
], Ln = Mt("trash-2", Rn), Mn = "_backdrop_1i4y2_1", Pn = "_celebrationOverlay_1i4y2_14", Fn = "_celebrationChip_1i4y2_23", On = "_backdropOpen_1i4y2_74", An = "_backdropClosed_1i4y2_78", Dn = "_panel_1i4y2_82", En = "_panelOpen_1i4y2_103", qn = "_panelClosed_1i4y2_107", $n = "_header_1i4y2_146", Vn = "_headerCenter_1i4y2_155", Wn = "_title_1i4y2_163", zn = "_searchIconButton_1i4y2_172", jn = "_headerTitleWrap_1i4y2_195", Un = "_headerSearchWrap_1i4y2_199", Hn = "_headerSearchOpen_1i4y2_211", Qn = "_searchBar_1i4y2_223", Gn = "_searchInput_1i4y2_235", Yn = "_searchClearButton_1i4y2_256", Kn = "_closeButton_1i4y2_278", Xn = "_body_1i4y2_312", Zn = "_muted_1i4y2_317", Jn = "_error_1i4y2_322", er = "_variants_1i4y2_327", tr = "_variantList_1i4y2_331", nr = "_variantRow_1i4y2_339", rr = "_variantRowSoldOut_1i4y2_347", ar = "_variantLeft_1i4y2_351", ir = "_addToBundleButton_1i4y2_358", or = "_soldOutContainer_1i4y2_386", sr = "_stockLimitContainer_1i4y2_394", lr = "_soldOut_1i4y2_386", cr = "_stockLimitNotice_1i4y2_412", ur = "_variantThumb_1i4y2_421", dr = "_variantThumbImg_1i4y2_431", hr = "_variantThumbFallback_1i4y2_438", mr = "_variantInfo_1i4y2_448", br = "_variantName_1i4y2_452", fr = "_variantMeta_1i4y2_461", _r = "_variantPriceRow_1i4y2_469", pr = "_variantCompareAt_1i4y2_476", yr = "_variantPrice_1i4y2_469", gr = "_qtyControls_1i4y2_487", vr = "_qtyControlsWrap_1i4y2_493", wr = "_qtyButton_1i4y2_499", xr = "_qtyValue_1i4y2_525", Cr = "_footer_1i4y2_532", Ir = "_poweredBy_1i4y2_540", Nr = "_boxSummaryWindow_1i4y2_552", Sr = "_boxSummaryRow_1i4y2_570", Br = "_boxSlot_1i4y2_578", kr = "_boxItem_1i4y2_587", Tr = "_boxItemClickable_1i4y2_599", Rr = "_boxThresholdLabel_1i4y2_608", Lr = "_boxItemPlaceholder_1i4y2_619", Mr = "_boxItemFilled_1i4y2_625", Pr = "_boxItemThreshold_1i4y2_631", Fr = "_boxItemDiscountText_1i4y2_639", Or = "_boxItemPlus_1i4y2_647", Ar = "_boxItemImage_1i4y2_654", Dr = "_boxItemFallback_1i4y2_661", Er = "_ctaButtonGroup_1i4y2_672", qr = "_ctaButtonGroupAnimating_1i4y2_679", $r = "_cta_1i4y2_672", Vr = "_ctaDualLeft_1i4y2_707", Wr = "_ctaDualLeftAnimating_1i4y2_725", zr = "_ctaDualRight_1i4y2_738", jr = "_ctaDualRightAnimating_1i4y2_754", Ur = "_ctaTotals_1i4y2_765", Hr = "_ctaDiscountBadge_1i4y2_773", Qr = "_ctaTotalsWrap_1i4y2_787", Gr = "_ctaTotalsWrapVisible_1i4y2_800", Yr = "_ctaTotalsStrike_1i4y2_807", Kr = "_ctaTotalsPrice_1i4y2_814", m = {
|
|
1328
|
+
backdrop: Mn,
|
|
1329
|
+
celebrationOverlay: Pn,
|
|
1330
|
+
celebrationChip: Fn,
|
|
1331
|
+
backdropOpen: On,
|
|
1332
|
+
backdropClosed: An,
|
|
1333
|
+
panel: Dn,
|
|
1334
|
+
panelOpen: En,
|
|
1335
|
+
panelClosed: qn,
|
|
1336
|
+
header: $n,
|
|
1337
|
+
headerCenter: Vn,
|
|
1338
|
+
title: Wn,
|
|
1339
|
+
searchIconButton: zn,
|
|
1340
|
+
headerTitleWrap: jn,
|
|
1341
|
+
headerSearchWrap: Un,
|
|
1342
|
+
headerSearchOpen: Hn,
|
|
1343
|
+
searchBar: Qn,
|
|
1344
|
+
searchInput: Gn,
|
|
1345
|
+
searchClearButton: Yn,
|
|
1346
|
+
closeButton: Kn,
|
|
1347
|
+
body: Xn,
|
|
1348
|
+
muted: Zn,
|
|
1349
|
+
error: Jn,
|
|
1350
|
+
variants: er,
|
|
1351
|
+
variantList: tr,
|
|
1352
|
+
variantRow: nr,
|
|
1353
|
+
variantRowSoldOut: rr,
|
|
1354
|
+
variantLeft: ar,
|
|
1355
|
+
addToBundleButton: ir,
|
|
1356
|
+
soldOutContainer: or,
|
|
1357
|
+
stockLimitContainer: sr,
|
|
1358
|
+
soldOut: lr,
|
|
1359
|
+
stockLimitNotice: cr,
|
|
1360
|
+
variantThumb: ur,
|
|
1361
|
+
variantThumbImg: dr,
|
|
1362
|
+
variantThumbFallback: hr,
|
|
1363
|
+
variantInfo: mr,
|
|
1364
|
+
variantName: br,
|
|
1365
|
+
variantMeta: fr,
|
|
1366
|
+
variantPriceRow: _r,
|
|
1367
|
+
variantCompareAt: pr,
|
|
1368
|
+
variantPrice: yr,
|
|
1369
|
+
qtyControls: gr,
|
|
1370
|
+
qtyControlsWrap: vr,
|
|
1371
|
+
qtyButton: wr,
|
|
1372
|
+
qtyValue: xr,
|
|
1373
|
+
footer: Cr,
|
|
1374
|
+
poweredBy: Ir,
|
|
1375
|
+
boxSummaryWindow: Nr,
|
|
1376
|
+
boxSummaryRow: Sr,
|
|
1377
|
+
boxSlot: Br,
|
|
1378
|
+
boxItem: kr,
|
|
1379
|
+
boxItemClickable: Tr,
|
|
1380
|
+
boxThresholdLabel: Rr,
|
|
1381
|
+
boxItemPlaceholder: Lr,
|
|
1382
|
+
boxItemFilled: Mr,
|
|
1383
|
+
boxItemThreshold: Pr,
|
|
1384
|
+
boxItemDiscountText: Fr,
|
|
1385
|
+
boxItemPlus: Or,
|
|
1386
|
+
boxItemImage: Ar,
|
|
1387
|
+
boxItemFallback: Dr,
|
|
1388
|
+
ctaButtonGroup: Er,
|
|
1389
|
+
ctaButtonGroupAnimating: qr,
|
|
1390
|
+
cta: $r,
|
|
1391
|
+
ctaDualLeft: Vr,
|
|
1392
|
+
ctaDualLeftAnimating: Wr,
|
|
1393
|
+
ctaDualRight: zr,
|
|
1394
|
+
ctaDualRightAnimating: jr,
|
|
1395
|
+
ctaTotals: Ur,
|
|
1396
|
+
ctaDiscountBadge: Hr,
|
|
1397
|
+
ctaTotalsWrap: Qr,
|
|
1398
|
+
ctaTotalsWrapVisible: Gr,
|
|
1399
|
+
ctaTotalsStrike: Yr,
|
|
1400
|
+
ctaTotalsPrice: Kr
|
|
1235
1401
|
};
|
|
1236
|
-
function
|
|
1237
|
-
var
|
|
1402
|
+
function Ii(n) {
|
|
1403
|
+
var Xe, Ze;
|
|
1238
1404
|
const {
|
|
1239
|
-
isOpen:
|
|
1240
|
-
close:
|
|
1241
|
-
loading:
|
|
1405
|
+
isOpen: e,
|
|
1406
|
+
close: t,
|
|
1407
|
+
loading: a,
|
|
1242
1408
|
submitting: i,
|
|
1243
1409
|
error: r,
|
|
1244
|
-
currencyCode:
|
|
1245
|
-
config:
|
|
1246
|
-
eligibleVariants:
|
|
1247
|
-
selections:
|
|
1248
|
-
selectionOrder:
|
|
1249
|
-
getVariantMaxSelectableQuantity:
|
|
1250
|
-
setQuantity:
|
|
1251
|
-
bundleSize:
|
|
1252
|
-
minRequired:
|
|
1253
|
-
canSubmit:
|
|
1254
|
-
submit:
|
|
1255
|
-
submitAndCheckout:
|
|
1256
|
-
|
|
1410
|
+
currencyCode: h,
|
|
1411
|
+
config: u,
|
|
1412
|
+
eligibleVariants: B,
|
|
1413
|
+
selections: le,
|
|
1414
|
+
selectionOrder: $,
|
|
1415
|
+
getVariantMaxSelectableQuantity: D,
|
|
1416
|
+
setQuantity: de,
|
|
1417
|
+
bundleSize: F,
|
|
1418
|
+
minRequired: te,
|
|
1419
|
+
canSubmit: z,
|
|
1420
|
+
submit: K,
|
|
1421
|
+
submitAndCheckout: g,
|
|
1422
|
+
locale: H,
|
|
1423
|
+
t: I
|
|
1424
|
+
} = wt(), [he, ke] = j(!1), [Te, ye] = j(""), ae = U(null), X = U(null), ie = U(null), [me, Re] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [ne, Ce] = j(0), [be, Ve] = j(null), [ge, Le] = j(!1), Ie = U(null), Ae = U(F), nt = 7e3, [We, ze] = j(0), [Me, Ye] = j(null), [Ne, De] = j(!1), ve = U(null), f = 2800, p = [
|
|
1257
1425
|
"#2563eb",
|
|
1258
1426
|
"#3b82f6",
|
|
1259
1427
|
"#60a5fa",
|
|
1260
1428
|
"#93c5fd",
|
|
1261
1429
|
"#bae6fd",
|
|
1262
1430
|
"#e0f2fe"
|
|
1263
|
-
],
|
|
1264
|
-
var
|
|
1265
|
-
const c = (
|
|
1431
|
+
], x = L(() => {
|
|
1432
|
+
var d;
|
|
1433
|
+
const c = (d = u == null ? void 0 : u.styleSettings) == null ? void 0 : d.confettiColors;
|
|
1266
1434
|
return Array.isArray(c) && c.length >= 6 ? c.slice(0, 6).map(
|
|
1267
|
-
(
|
|
1268
|
-
) : [...
|
|
1269
|
-
}, [(
|
|
1270
|
-
const
|
|
1271
|
-
return Number.isFinite(
|
|
1272
|
-
},
|
|
1273
|
-
const
|
|
1274
|
-
var
|
|
1275
|
-
const
|
|
1276
|
-
return !(!
|
|
1435
|
+
(v, o) => typeof v == "string" && v.trim() ? v : p[o]
|
|
1436
|
+
) : [...p];
|
|
1437
|
+
}, [(Xe = u == null ? void 0 : u.styleSettings) == null ? void 0 : Xe.confettiColors]), T = (c) => {
|
|
1438
|
+
const d = Number.parseFloat(c);
|
|
1439
|
+
return Number.isFinite(d) ? String(Math.round(d)) : c;
|
|
1440
|
+
}, M = (c) => {
|
|
1441
|
+
const d = (c ?? []).filter((v) => {
|
|
1442
|
+
var b, w;
|
|
1443
|
+
const o = (b = v == null ? void 0 : v.name) == null ? void 0 : b.trim(), s = (w = v == null ? void 0 : v.value) == null ? void 0 : w.trim();
|
|
1444
|
+
return !(!o || !s || o.toLowerCase() === "title");
|
|
1277
1445
|
});
|
|
1278
|
-
return
|
|
1446
|
+
return d.length ? d.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
|
|
1279
1447
|
}, E = (c) => {
|
|
1280
|
-
var
|
|
1281
|
-
return ((
|
|
1282
|
-
},
|
|
1283
|
-
const
|
|
1284
|
-
return [
|
|
1285
|
-
}, [
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
const p = [];
|
|
1303
|
-
p.push(u.displayName), (g = u.product) != null && g.title && p.push(u.product.title);
|
|
1304
|
-
for (const x of u.selectedOptions ?? [])
|
|
1305
|
-
p.push(x.name), p.push(x.value);
|
|
1306
|
-
const y = p.join(" ").toLowerCase();
|
|
1307
|
-
return n.every((x) => y.includes(x));
|
|
1448
|
+
var d;
|
|
1449
|
+
return ((d = c.product) == null ? void 0 : d.title) ?? c.displayName ?? c.title;
|
|
1450
|
+
}, V = (c) => {
|
|
1451
|
+
const d = E(c), v = M(c.selectedOptions);
|
|
1452
|
+
return [d, v].filter(Boolean).join(" — ");
|
|
1453
|
+
}, [Z, ee] = j(e), Q = U(null), A = (c) => {
|
|
1454
|
+
const d = Number(c);
|
|
1455
|
+
return Number.isFinite(d) ? jt(d, h, H) : c;
|
|
1456
|
+
}, q = ((Ze = u == null ? void 0 : u.title) == null ? void 0 : Ze.trim()) || I("bundle.title.default"), Se = L(() => {
|
|
1457
|
+
const c = Number((u == null ? void 0 : u.maxBundleSize) ?? NaN), d = Number.isFinite(c) ? Math.floor(c) : 100;
|
|
1458
|
+
return Math.max(2, Math.min(100, d));
|
|
1459
|
+
}, [u == null ? void 0 : u.maxBundleSize]), Pe = F >= Se, rt = L(() => [...B].sort((c, d) => c.displayName.localeCompare(d.displayName)), [B]), Fe = L(() => {
|
|
1460
|
+
const c = Te.trim().toLowerCase();
|
|
1461
|
+
if (!c) return rt;
|
|
1462
|
+
const d = c.split(/\s+/).filter(Boolean), v = (o) => {
|
|
1463
|
+
var w;
|
|
1464
|
+
const s = [];
|
|
1465
|
+
s.push(o.displayName), (w = o.product) != null && w.title && s.push(o.product.title);
|
|
1466
|
+
for (const y of o.selectedOptions ?? [])
|
|
1467
|
+
s.push(y.name), s.push(y.value);
|
|
1468
|
+
const b = s.join(" ").toLowerCase();
|
|
1469
|
+
return d.every((y) => b.includes(y));
|
|
1308
1470
|
};
|
|
1309
|
-
return
|
|
1310
|
-
}, [
|
|
1471
|
+
return rt.filter(v);
|
|
1472
|
+
}, [Te, rt]), re = L(() => [...(u == null ? void 0 : u.rules) ?? []].sort((c, d) => c.minBundleSize - d.minBundleSize), [u == null ? void 0 : u.rules]), W = L(() => Math.max(0, te - F), [F, te]), at = L(() => {
|
|
1311
1473
|
let c = null;
|
|
1312
|
-
for (const
|
|
1313
|
-
|
|
1474
|
+
for (const d of re)
|
|
1475
|
+
F >= d.minBundleSize && (c = d);
|
|
1314
1476
|
return c;
|
|
1315
|
-
}, [
|
|
1316
|
-
if (!
|
|
1317
|
-
const c = Number.parseFloat(
|
|
1477
|
+
}, [F, re]), Oe = L(() => {
|
|
1478
|
+
if (!at) return null;
|
|
1479
|
+
const c = Number.parseFloat(at.discountPercent);
|
|
1318
1480
|
return !Number.isFinite(c) || c <= 0 ? null : c;
|
|
1319
|
-
}, [
|
|
1320
|
-
const c = new Map(
|
|
1321
|
-
let
|
|
1322
|
-
for (const [
|
|
1323
|
-
const
|
|
1324
|
-
if (
|
|
1325
|
-
const
|
|
1326
|
-
Number.isFinite(
|
|
1481
|
+
}, [at]), we = re[0], N = !!(we && F >= we.minBundleSize), oe = L(() => {
|
|
1482
|
+
const c = new Map(B.map((v) => [v.id, v]));
|
|
1483
|
+
let d = 0;
|
|
1484
|
+
for (const [v, o] of Object.entries(le)) {
|
|
1485
|
+
const s = o ?? 0;
|
|
1486
|
+
if (s <= 0) continue;
|
|
1487
|
+
const b = c.get(v), w = Number(b == null ? void 0 : b.price);
|
|
1488
|
+
Number.isFinite(w) && (d += w * s);
|
|
1327
1489
|
}
|
|
1328
|
-
return Math.round(
|
|
1329
|
-
}, [
|
|
1330
|
-
if (!
|
|
1331
|
-
const c =
|
|
1490
|
+
return Math.round(d * 100) / 100;
|
|
1491
|
+
}, [B, le]), je = L(() => {
|
|
1492
|
+
if (!Oe) return oe;
|
|
1493
|
+
const c = oe * (1 - Oe / 100);
|
|
1332
1494
|
return Math.round(c * 100) / 100;
|
|
1333
|
-
}, [
|
|
1334
|
-
const c = new Map(
|
|
1335
|
-
return
|
|
1336
|
-
}, [
|
|
1337
|
-
var
|
|
1495
|
+
}, [Oe, oe]), xe = L(() => re.length ? Math.max(...re.map((c) => c.minBundleSize)) : 0, [re]), it = L(() => {
|
|
1496
|
+
const c = new Map(B.map((d) => [d.id, d]));
|
|
1497
|
+
return $.map((d) => c.get(d)).filter((d) => !!d);
|
|
1498
|
+
}, [B, $]), Ue = L(() => {
|
|
1499
|
+
var d;
|
|
1338
1500
|
const c = /* @__PURE__ */ new Map();
|
|
1339
|
-
for (const
|
|
1340
|
-
const
|
|
1341
|
-
c.set(
|
|
1342
|
-
discountPercent:
|
|
1343
|
-
minBundleSize:
|
|
1344
|
-
label: ((
|
|
1501
|
+
for (const v of re) {
|
|
1502
|
+
const o = Math.max(0, v.minBundleSize - 1);
|
|
1503
|
+
c.set(o, {
|
|
1504
|
+
discountPercent: v.discountPercent,
|
|
1505
|
+
minBundleSize: v.minBundleSize,
|
|
1506
|
+
label: ((d = v.label) == null ? void 0 : d.trim()) || `Buy ${v.minBundleSize}+`
|
|
1345
1507
|
});
|
|
1346
1508
|
}
|
|
1347
1509
|
return c;
|
|
1348
|
-
}, [
|
|
1349
|
-
|
|
1350
|
-
if (((
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1510
|
+
}, [re]), He = L(() => Math.max(xe || te, it.length), [it.length, xe, te]), [Be, ut] = j(!0), Ke = U(W);
|
|
1511
|
+
O(() => {
|
|
1512
|
+
if (((u == null ? void 0 : u.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
|
|
1513
|
+
const d = Ke.current > 0;
|
|
1514
|
+
ut(!(d && W === 0));
|
|
1353
1515
|
}
|
|
1354
|
-
|
|
1355
|
-
}, [
|
|
1356
|
-
const
|
|
1357
|
-
const
|
|
1358
|
-
if (!
|
|
1359
|
-
const
|
|
1360
|
-
if (!
|
|
1361
|
-
const
|
|
1362
|
-
if (
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1516
|
+
Ke.current = W;
|
|
1517
|
+
}, [W, u == null ? void 0 : u.ctaButtonMode]);
|
|
1518
|
+
const ot = U(null), dt = U(null), Ee = U(null), ht = U(F), qe = (c) => {
|
|
1519
|
+
const d = dt.current;
|
|
1520
|
+
if (!d) return;
|
|
1521
|
+
const v = d.querySelector(`[data-variant-row="${c}"]`);
|
|
1522
|
+
if (!v) return;
|
|
1523
|
+
const o = d.getBoundingClientRect(), s = v.getBoundingClientRect(), b = 8;
|
|
1524
|
+
if (s.top >= o.top + b && s.bottom <= o.bottom - b) return;
|
|
1525
|
+
const y = Math.max(0, d.scrollHeight - d.clientHeight), C = s.top - o.top + s.height / 2, k = d.scrollTop + C - d.clientHeight / 2, P = Math.min(y, Math.max(0, k));
|
|
1526
|
+
d.scrollTo({ top: P, behavior: "smooth" });
|
|
1365
1527
|
};
|
|
1366
|
-
return
|
|
1367
|
-
if (!
|
|
1368
|
-
const c = (
|
|
1369
|
-
|
|
1528
|
+
return O(() => {
|
|
1529
|
+
if (!e) return;
|
|
1530
|
+
const c = (d) => {
|
|
1531
|
+
d.key === "Escape" && t();
|
|
1370
1532
|
};
|
|
1371
1533
|
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
1372
|
-
}, [
|
|
1534
|
+
}, [t, e]), O(() => {
|
|
1373
1535
|
if (typeof window > "u") return;
|
|
1374
|
-
const c = () =>
|
|
1536
|
+
const c = () => Re({ width: window.innerWidth, height: window.innerHeight });
|
|
1375
1537
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
1376
|
-
}, []),
|
|
1377
|
-
if (
|
|
1378
|
-
|
|
1538
|
+
}, []), O(() => {
|
|
1539
|
+
if (Q.current != null && (window.clearTimeout(Q.current), Q.current = null), e) {
|
|
1540
|
+
ee(!0);
|
|
1379
1541
|
return;
|
|
1380
1542
|
}
|
|
1381
|
-
|
|
1382
|
-
|
|
1543
|
+
Q.current = window.setTimeout(() => {
|
|
1544
|
+
ee(!1), Q.current = null;
|
|
1383
1545
|
}, 220);
|
|
1384
|
-
}, [
|
|
1385
|
-
|
|
1386
|
-
}, []),
|
|
1387
|
-
|
|
1388
|
-
}, []),
|
|
1389
|
-
|
|
1390
|
-
}, []),
|
|
1391
|
-
if (!
|
|
1546
|
+
}, [e]), O(() => () => {
|
|
1547
|
+
Q.current != null && window.clearTimeout(Q.current);
|
|
1548
|
+
}, []), O(() => () => {
|
|
1549
|
+
Ie.current != null && window.clearTimeout(Ie.current);
|
|
1550
|
+
}, []), O(() => () => {
|
|
1551
|
+
ve.current != null && window.clearTimeout(ve.current);
|
|
1552
|
+
}, []), O(() => {
|
|
1553
|
+
if (!e || !he) return;
|
|
1392
1554
|
const c = requestAnimationFrame(() => {
|
|
1393
|
-
var
|
|
1394
|
-
return (
|
|
1555
|
+
var d;
|
|
1556
|
+
return (d = ae.current) == null ? void 0 : d.focus();
|
|
1395
1557
|
});
|
|
1396
1558
|
return () => cancelAnimationFrame(c);
|
|
1397
|
-
}, [
|
|
1398
|
-
const c =
|
|
1399
|
-
if (
|
|
1400
|
-
const
|
|
1401
|
-
if (!
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
const
|
|
1406
|
-
if (!
|
|
1407
|
-
const
|
|
1408
|
-
if (
|
|
1409
|
-
const P = Math.max(0,
|
|
1410
|
-
|
|
1559
|
+
}, [e, he]), O(() => {
|
|
1560
|
+
const c = ht.current;
|
|
1561
|
+
if (ht.current = F, F <= c) return;
|
|
1562
|
+
const d = Ee.current;
|
|
1563
|
+
if (!d) return;
|
|
1564
|
+
const v = re.some((w) => w.minBundleSize === F), o = re.find((w) => w.minBundleSize > F), s = o && v ? o.minBundleSize - 1 : o ? null : F - 1;
|
|
1565
|
+
if (s == null || s < 0) return;
|
|
1566
|
+
const b = requestAnimationFrame(() => {
|
|
1567
|
+
const w = d.querySelector(`[data-box-slot="${s}"]`);
|
|
1568
|
+
if (!w) return;
|
|
1569
|
+
const y = d.getBoundingClientRect(), k = w.getBoundingClientRect().right - y.right;
|
|
1570
|
+
if (k <= 1) return;
|
|
1571
|
+
const P = Math.max(0, d.scrollWidth - d.clientWidth), G = Math.min(P, Math.max(0, d.scrollLeft + k));
|
|
1572
|
+
d.scrollTo({ left: G, behavior: "smooth" });
|
|
1411
1573
|
});
|
|
1412
|
-
return () => cancelAnimationFrame(
|
|
1413
|
-
}, [
|
|
1414
|
-
if (!
|
|
1415
|
-
const c =
|
|
1416
|
-
if (
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1574
|
+
return () => cancelAnimationFrame(b);
|
|
1575
|
+
}, [F, re]), O(() => {
|
|
1576
|
+
if (!e) return;
|
|
1577
|
+
const c = Ae.current;
|
|
1578
|
+
if (Ae.current = F, F <= c) return;
|
|
1579
|
+
const d = re.find((v) => v.minBundleSize === F);
|
|
1580
|
+
d && (Ye(
|
|
1581
|
+
I("bundle.celebration.received_discount", {
|
|
1582
|
+
discount: T(d.discountPercent)
|
|
1583
|
+
})
|
|
1584
|
+
), ze((v) => v + 1), De(!0), ve.current != null && window.clearTimeout(ve.current), ve.current = window.setTimeout(() => {
|
|
1585
|
+
De(!1), ve.current = null;
|
|
1586
|
+
}, f));
|
|
1587
|
+
}, [F, e, re]), O(() => {
|
|
1588
|
+
if (!e || !Ne || !Me) return;
|
|
1423
1589
|
const c = requestAnimationFrame(() => {
|
|
1424
|
-
var
|
|
1425
|
-
const
|
|
1426
|
-
x:
|
|
1427
|
-
y:
|
|
1590
|
+
var y;
|
|
1591
|
+
const d = ie.current, v = d == null ? void 0 : d.getBoundingClientRect(), o = (y = ot.current) == null ? void 0 : y.getBoundingClientRect(), s = v ? v.left + v.width / 2 : o ? o.left + o.width / 2 : window.innerWidth / 2, b = v ? v.top + v.height / 2 : o ? o.top + o.height / 2 : window.innerHeight / 2, w = {
|
|
1592
|
+
x: s - 2,
|
|
1593
|
+
y: b - 2,
|
|
1428
1594
|
w: 4,
|
|
1429
1595
|
h: 4
|
|
1430
1596
|
};
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
},
|
|
1597
|
+
Ve(w), Ce((C) => C + 1), Le(!0), Ie.current != null && window.clearTimeout(Ie.current), Ie.current = window.setTimeout(() => {
|
|
1598
|
+
Le(!1), Ie.current = null;
|
|
1599
|
+
}, nt);
|
|
1434
1600
|
});
|
|
1435
1601
|
return () => cancelAnimationFrame(c);
|
|
1436
|
-
}, [
|
|
1602
|
+
}, [We, Me, nt, Ne, e]), O(() => {
|
|
1437
1603
|
var c;
|
|
1438
|
-
|
|
1439
|
-
}, [
|
|
1604
|
+
e && ((c = ot.current) == null || c.focus());
|
|
1605
|
+
}, [e]), Z ? /* @__PURE__ */ R(
|
|
1440
1606
|
"div",
|
|
1441
1607
|
{
|
|
1442
1608
|
role: "dialog",
|
|
1443
1609
|
"aria-modal": "true",
|
|
1444
|
-
"aria-label": "
|
|
1445
|
-
className: [
|
|
1610
|
+
"aria-label": I("bundle.drawer.aria"),
|
|
1611
|
+
className: [m.backdrop, e ? m.backdropOpen : m.backdropClosed, n.className].filter(Boolean).join(" "),
|
|
1446
1612
|
onMouseDown: (c) => {
|
|
1447
|
-
c.target === c.currentTarget &&
|
|
1613
|
+
c.target === c.currentTarget && t();
|
|
1448
1614
|
},
|
|
1449
1615
|
children: [
|
|
1450
|
-
|
|
1451
|
-
|
|
1616
|
+
ge && be && me.width > 0 && me.height > 0 ? /* @__PURE__ */ l(
|
|
1617
|
+
wn,
|
|
1452
1618
|
{
|
|
1453
|
-
width:
|
|
1454
|
-
height:
|
|
1455
|
-
confettiSource:
|
|
1456
|
-
colors:
|
|
1619
|
+
width: me.width,
|
|
1620
|
+
height: me.height,
|
|
1621
|
+
confettiSource: be,
|
|
1622
|
+
colors: x,
|
|
1457
1623
|
recycle: !1,
|
|
1458
1624
|
numberOfPieces: 70,
|
|
1459
1625
|
tweenDuration: 100,
|
|
@@ -1462,135 +1628,131 @@ function di(a) {
|
|
|
1462
1628
|
initialVelocityX: { min: -6, max: 6 },
|
|
1463
1629
|
style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
|
|
1464
1630
|
},
|
|
1465
|
-
|
|
1631
|
+
ne
|
|
1466
1632
|
) : null,
|
|
1467
|
-
/* @__PURE__ */
|
|
1468
|
-
|
|
1469
|
-
/* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ R("aside", { ref: ot, className: [m.panel, e ? m.panelOpen : m.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
|
|
1634
|
+
Ne && Me ? /* @__PURE__ */ l("div", { className: m.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ l("div", { ref: ie, className: m.celebrationChip, children: Me }, We) }) : null,
|
|
1635
|
+
/* @__PURE__ */ R("header", { className: [m.header, he ? m.headerSearchOpen : null].filter(Boolean).join(" "), children: [
|
|
1470
1636
|
/* @__PURE__ */ l(
|
|
1471
1637
|
"button",
|
|
1472
1638
|
{
|
|
1473
1639
|
type: "button",
|
|
1474
|
-
className:
|
|
1475
|
-
"aria-label":
|
|
1476
|
-
"aria-expanded":
|
|
1640
|
+
className: m.searchIconButton,
|
|
1641
|
+
"aria-label": I(he ? "bundle.search.expanded" : "bundle.search"),
|
|
1642
|
+
"aria-expanded": he,
|
|
1477
1643
|
onClick: () => {
|
|
1478
|
-
|
|
1644
|
+
ke(!0);
|
|
1479
1645
|
},
|
|
1480
|
-
children: /* @__PURE__ */ l(
|
|
1646
|
+
children: /* @__PURE__ */ l(Tn, { size: 18, "aria-hidden": "true" })
|
|
1481
1647
|
}
|
|
1482
1648
|
),
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */ l("div", { className:
|
|
1485
|
-
/* @__PURE__ */ l("div", { className:
|
|
1649
|
+
/* @__PURE__ */ R("div", { className: m.headerCenter, children: [
|
|
1650
|
+
/* @__PURE__ */ l("div", { className: m.headerTitleWrap, "aria-hidden": he, children: /* @__PURE__ */ l("h2", { className: m.title, children: q }) }),
|
|
1651
|
+
/* @__PURE__ */ l("div", { className: m.headerSearchWrap, "aria-hidden": !he, children: /* @__PURE__ */ R("div", { className: m.searchBar, children: [
|
|
1486
1652
|
/* @__PURE__ */ l(
|
|
1487
1653
|
"input",
|
|
1488
1654
|
{
|
|
1489
|
-
ref:
|
|
1490
|
-
className:
|
|
1655
|
+
ref: ae,
|
|
1656
|
+
className: m.searchInput,
|
|
1491
1657
|
type: "search",
|
|
1492
|
-
value:
|
|
1493
|
-
placeholder: "
|
|
1494
|
-
onChange: (c) =>
|
|
1658
|
+
value: Te,
|
|
1659
|
+
placeholder: I("bundle.search.placeholder"),
|
|
1660
|
+
onChange: (c) => ye(c.target.value),
|
|
1495
1661
|
onBlur: () => {
|
|
1496
|
-
|
|
1662
|
+
Te.trim() === "" && ke(!1);
|
|
1497
1663
|
}
|
|
1498
1664
|
}
|
|
1499
1665
|
),
|
|
1500
|
-
|
|
1666
|
+
Te.trim() ? /* @__PURE__ */ l(
|
|
1501
1667
|
"button",
|
|
1502
1668
|
{
|
|
1503
1669
|
type: "button",
|
|
1504
|
-
className:
|
|
1670
|
+
className: m.searchClearButton,
|
|
1505
1671
|
onMouseDown: (c) => {
|
|
1506
1672
|
c.preventDefault();
|
|
1507
1673
|
},
|
|
1508
1674
|
onClick: () => {
|
|
1509
1675
|
var c;
|
|
1510
|
-
|
|
1676
|
+
ye(""), (c = ae.current) == null || c.focus();
|
|
1511
1677
|
},
|
|
1512
|
-
"aria-label": "
|
|
1513
|
-
children: "
|
|
1678
|
+
"aria-label": I("bundle.search.clear"),
|
|
1679
|
+
children: I("bundle.search.clear")
|
|
1514
1680
|
}
|
|
1515
1681
|
) : null
|
|
1516
1682
|
] }) })
|
|
1517
1683
|
] }),
|
|
1518
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
1684
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: t, disabled: i, className: m.closeButton, "aria-label": I("bundle.close"), children: "×" })
|
|
1519
1685
|
] }),
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
|
|
1522
|
-
r ? /* @__PURE__ */ l("p", { className:
|
|
1523
|
-
/* @__PURE__ */ l("div", { className:
|
|
1524
|
-
var
|
|
1525
|
-
const
|
|
1526
|
-
return /* @__PURE__ */
|
|
1686
|
+
/* @__PURE__ */ R("div", { className: m.body, ref: dt, children: [
|
|
1687
|
+
a ? /* @__PURE__ */ l("p", { className: m.muted, children: I("bundle.loading") }) : null,
|
|
1688
|
+
r ? /* @__PURE__ */ l("p", { className: m.error, children: r }) : null,
|
|
1689
|
+
/* @__PURE__ */ l("div", { className: m.variants, children: /* @__PURE__ */ l("ul", { className: m.variantList, children: Fe.map((c) => {
|
|
1690
|
+
var fe, $e, Je, et;
|
|
1691
|
+
const d = le[c.id] ?? 0, v = E(c), o = M(c.selectedOptions), s = V(c), b = D(c.id), w = b ?? Number.POSITIVE_INFINITY, y = d >= w, C = c.availableForSale !== !1 && !Pe && !y, k = c.availableForSale === !1 ? null : y ? I("bundle.stock.max_reached") : null, P = Oe, G = Number(c.price), Y = P != null && Number.isFinite(P) && P > 0 && Number.isFinite(G), ce = Y ? Math.round(G * (1 - P / 100) * 100) / 100 : null;
|
|
1692
|
+
return /* @__PURE__ */ R(
|
|
1527
1693
|
"li",
|
|
1528
1694
|
{
|
|
1529
|
-
className: [
|
|
1695
|
+
className: [m.variantRow, c.availableForSale === !1 && m.variantRowSoldOut].filter(Boolean).join(" "),
|
|
1530
1696
|
"data-variant-row": c.id,
|
|
1531
1697
|
children: [
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
/* @__PURE__ */ l("div", { className:
|
|
1698
|
+
/* @__PURE__ */ R("div", { className: m.variantLeft, children: [
|
|
1699
|
+
/* @__PURE__ */ l("div", { className: m.variantThumb, "aria-hidden": "true", children: (fe = c.image) != null && fe.url ? /* @__PURE__ */ l(
|
|
1534
1700
|
"img",
|
|
1535
1701
|
{
|
|
1536
|
-
className:
|
|
1702
|
+
className: m.variantThumbImg,
|
|
1537
1703
|
src: c.image.url,
|
|
1538
|
-
alt: c.image.altText ??
|
|
1704
|
+
alt: c.image.altText ?? s,
|
|
1539
1705
|
loading: "lazy"
|
|
1540
1706
|
}
|
|
1541
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */ l("div", { className:
|
|
1544
|
-
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
|
|
1547
|
-
/* @__PURE__ */ l("span", { className:
|
|
1548
|
-
|
|
1707
|
+
) : /* @__PURE__ */ l("div", { className: m.variantThumbFallback, children: ((et = (Je = ($e = c.product) == null ? void 0 : $e.title) == null ? void 0 : Je.slice(0, 1)) == null ? void 0 : et.toUpperCase()) ?? "•" }) }),
|
|
1708
|
+
/* @__PURE__ */ R("div", { className: m.variantInfo, children: [
|
|
1709
|
+
/* @__PURE__ */ l("div", { className: m.variantName, children: v }),
|
|
1710
|
+
o ? /* @__PURE__ */ l("div", { className: m.variantMeta, children: o }) : null,
|
|
1711
|
+
/* @__PURE__ */ R("div", { className: m.variantPriceRow, children: [
|
|
1712
|
+
Y ? /* @__PURE__ */ l("span", { className: m.variantCompareAt, children: A(Number.isFinite(G) ? G.toFixed(2) : c.price) }) : null,
|
|
1713
|
+
/* @__PURE__ */ l("span", { className: m.variantPrice, children: A(
|
|
1714
|
+
ce != null ? ce.toFixed(2) : Number.isFinite(G) ? G.toFixed(2) : c.price
|
|
1549
1715
|
) })
|
|
1550
1716
|
] })
|
|
1551
1717
|
] })
|
|
1552
1718
|
] }),
|
|
1553
|
-
c.availableForSale === !1 ? /* @__PURE__ */ l("div", { className:
|
|
1554
|
-
"Sold",
|
|
1555
|
-
/* @__PURE__ */ l("br", {}),
|
|
1556
|
-
"Out"
|
|
1557
|
-
] }) }) : n <= 0 && g <= 0 ? /* @__PURE__ */ l("div", { className: f.stockLimitContainer, children: /* @__PURE__ */ l("span", { className: f.stockLimitNotice, "aria-label": `${p} max available selected`, children: "Max Added To Cart" }) }) : n <= 0 ? /* @__PURE__ */ l(
|
|
1719
|
+
c.availableForSale === !1 ? /* @__PURE__ */ l("div", { className: m.soldOutContainer, children: /* @__PURE__ */ l("span", { className: m.soldOut, "aria-label": I("bundle.a11y.sold_out", { name: s }), children: I("bundle.stock.sold_out") }) }) : d <= 0 && w <= 0 ? /* @__PURE__ */ l("div", { className: m.stockLimitContainer, children: /* @__PURE__ */ l("span", { className: m.stockLimitNotice, "aria-label": I("bundle.a11y.max_available_selected", { name: s }), children: I("bundle.stock.max_added") }) }) : d <= 0 ? /* @__PURE__ */ l(
|
|
1558
1720
|
"button",
|
|
1559
1721
|
{
|
|
1560
1722
|
type: "button",
|
|
1561
|
-
onClick: () =>
|
|
1562
|
-
disabled: i || !
|
|
1563
|
-
className:
|
|
1564
|
-
"aria-label":
|
|
1565
|
-
children: "
|
|
1723
|
+
onClick: () => de(c.id, 1),
|
|
1724
|
+
disabled: i || !C,
|
|
1725
|
+
className: m.addToBundleButton,
|
|
1726
|
+
"aria-label": k ? `${s} ${k.toLowerCase()}` : I("bundle.a11y.add_to_bundle", { name: s }),
|
|
1727
|
+
children: I("bundle.cta.add_to_bundle")
|
|
1566
1728
|
}
|
|
1567
|
-
) : /* @__PURE__ */
|
|
1568
|
-
/* @__PURE__ */
|
|
1729
|
+
) : /* @__PURE__ */ R("div", { className: m.qtyControlsWrap, children: [
|
|
1730
|
+
/* @__PURE__ */ R("div", { className: m.qtyControls, children: [
|
|
1569
1731
|
/* @__PURE__ */ l(
|
|
1570
1732
|
"button",
|
|
1571
1733
|
{
|
|
1572
1734
|
type: "button",
|
|
1573
|
-
onClick: () =>
|
|
1574
|
-
disabled: i ||
|
|
1575
|
-
className:
|
|
1576
|
-
"aria-label":
|
|
1735
|
+
onClick: () => de(c.id, d - 1),
|
|
1736
|
+
disabled: i || d <= 0,
|
|
1737
|
+
className: m.qtyButton,
|
|
1738
|
+
"aria-label": I("bundle.a11y.decrease", { name: s }),
|
|
1577
1739
|
children: "−"
|
|
1578
1740
|
}
|
|
1579
1741
|
),
|
|
1580
|
-
/* @__PURE__ */ l("span", { className:
|
|
1742
|
+
/* @__PURE__ */ l("span", { className: m.qtyValue, "aria-label": I("bundle.a11y.quantity", { name: s, qty: d }), children: d }),
|
|
1581
1743
|
/* @__PURE__ */ l(
|
|
1582
1744
|
"button",
|
|
1583
1745
|
{
|
|
1584
1746
|
type: "button",
|
|
1585
|
-
onClick: () =>
|
|
1586
|
-
disabled: i || !
|
|
1587
|
-
className:
|
|
1588
|
-
"aria-label":
|
|
1747
|
+
onClick: () => de(c.id, d + 1),
|
|
1748
|
+
disabled: i || !C,
|
|
1749
|
+
className: m.qtyButton,
|
|
1750
|
+
"aria-label": k ? `${s} ${k.toLowerCase()}` : I("bundle.a11y.increase", { name: s }),
|
|
1589
1751
|
children: "+"
|
|
1590
1752
|
}
|
|
1591
1753
|
)
|
|
1592
1754
|
] }),
|
|
1593
|
-
|
|
1755
|
+
k ? /* @__PURE__ */ l("div", { className: m.stockLimitNotice, children: k }) : null
|
|
1594
1756
|
] })
|
|
1595
1757
|
]
|
|
1596
1758
|
},
|
|
@@ -1598,87 +1760,85 @@ function di(a) {
|
|
|
1598
1760
|
);
|
|
1599
1761
|
}) }) })
|
|
1600
1762
|
] }),
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */ l("div", { className:
|
|
1603
|
-
var
|
|
1604
|
-
const
|
|
1605
|
-
return /* @__PURE__ */
|
|
1763
|
+
/* @__PURE__ */ R("footer", { className: m.footer, ref: X, children: [
|
|
1764
|
+
/* @__PURE__ */ l("div", { className: m.boxSummaryWindow, ref: Ee, children: /* @__PURE__ */ l("div", { className: m.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: He }).map((c, d) => {
|
|
1765
|
+
var k, P, G, Y;
|
|
1766
|
+
const v = it[d], o = Ue.get(d), s = !!v, b = !!o, w = b && !s, y = o ? I("bundle.discount.off_label", { discount: T(o.discountPercent) }) : null, C = s ? v.displayName : I("bundle.slot", { slot: d + 1 });
|
|
1767
|
+
return /* @__PURE__ */ R("div", { "data-box-slot": d, className: m.boxSlot, children: [
|
|
1606
1768
|
/* @__PURE__ */ l(
|
|
1607
1769
|
"div",
|
|
1608
1770
|
{
|
|
1609
1771
|
className: [
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1772
|
+
m.boxItem,
|
|
1773
|
+
s ? m.boxItemFilled : m.boxItemPlaceholder,
|
|
1774
|
+
b ? m.boxItemThreshold : null,
|
|
1775
|
+
s ? m.boxItemClickable : null
|
|
1614
1776
|
].filter(Boolean).join(" "),
|
|
1615
|
-
role:
|
|
1616
|
-
tabIndex:
|
|
1617
|
-
onClick:
|
|
1618
|
-
onKeyDown:
|
|
1619
|
-
(
|
|
1777
|
+
role: s ? "button" : void 0,
|
|
1778
|
+
tabIndex: s ? 0 : void 0,
|
|
1779
|
+
onClick: s ? () => qe(v.id) : void 0,
|
|
1780
|
+
onKeyDown: s ? (ce) => {
|
|
1781
|
+
(ce.key === "Enter" || ce.key === " ") && (ce.preventDefault(), qe(v.id));
|
|
1620
1782
|
} : void 0,
|
|
1621
|
-
"aria-label":
|
|
1622
|
-
title:
|
|
1623
|
-
children:
|
|
1783
|
+
"aria-label": w && y ? `${C}. ${I("bundle.unlocks", { discount: y })}.` : C,
|
|
1784
|
+
title: w && y ? `${C} • ${I("bundle.unlocks", { discount: y })}` : C,
|
|
1785
|
+
children: s ? (k = v.image) != null && k.url ? /* @__PURE__ */ l(
|
|
1624
1786
|
"img",
|
|
1625
1787
|
{
|
|
1626
|
-
className:
|
|
1627
|
-
src:
|
|
1628
|
-
alt:
|
|
1788
|
+
className: m.boxItemImage,
|
|
1789
|
+
src: v.image.url,
|
|
1790
|
+
alt: v.image.altText ?? v.displayName,
|
|
1629
1791
|
loading: "lazy"
|
|
1630
1792
|
}
|
|
1631
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
1793
|
+
) : /* @__PURE__ */ l("div", { className: m.boxItemFallback, "aria-hidden": "true", children: ((Y = (G = (P = v.product) == null ? void 0 : P.title) == null ? void 0 : G.slice(0, 1)) == null ? void 0 : Y.toUpperCase()) ?? "•" }) : w && y ? /* @__PURE__ */ l("div", { className: m.boxItemDiscountText, children: y }) : /* @__PURE__ */ l("div", { className: m.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1632
1794
|
}
|
|
1633
1795
|
),
|
|
1634
|
-
|
|
1635
|
-
] },
|
|
1796
|
+
b ? /* @__PURE__ */ l("div", { className: m.boxThresholdLabel, children: o.label }) : null
|
|
1797
|
+
] }, d);
|
|
1636
1798
|
}) }) }),
|
|
1637
1799
|
/* @__PURE__ */ l(
|
|
1638
1800
|
"div",
|
|
1639
1801
|
{
|
|
1640
|
-
className: [
|
|
1641
|
-
"aria-hidden": !
|
|
1642
|
-
children: /* @__PURE__ */
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
"
|
|
1646
|
-
] }) : /* @__PURE__ */ l("span", {}),
|
|
1647
|
-
/* @__PURE__ */ l("span", { children: v ? /* @__PURE__ */ N(xe, { children: [
|
|
1648
|
-
/* @__PURE__ */ l("span", { className: f.ctaTotalsStrike, children: Q(st.toFixed(2)) }),
|
|
1802
|
+
className: [m.ctaTotalsWrap, N ? m.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
1803
|
+
"aria-hidden": !N,
|
|
1804
|
+
children: /* @__PURE__ */ R("div", { className: m.ctaTotals, "aria-label": I("bundle.totals"), children: [
|
|
1805
|
+
Oe ? /* @__PURE__ */ l("span", { className: m.ctaDiscountBadge, children: I("bundle.discount.badge", { discount: Oe }) }) : /* @__PURE__ */ l("span", {}),
|
|
1806
|
+
/* @__PURE__ */ l("span", { children: Oe ? /* @__PURE__ */ R(kt, { children: [
|
|
1807
|
+
/* @__PURE__ */ l("span", { className: m.ctaTotalsStrike, children: A(oe.toFixed(2)) }),
|
|
1649
1808
|
" ",
|
|
1650
|
-
/* @__PURE__ */ l("span", { className:
|
|
1651
|
-
] }) : /* @__PURE__ */ l("span", { className:
|
|
1809
|
+
/* @__PURE__ */ l("span", { className: m.ctaTotalsPrice, children: A(je.toFixed(2)) })
|
|
1810
|
+
] }) : /* @__PURE__ */ l("span", { className: m.ctaTotalsPrice, children: A(oe.toFixed(2)) }) })
|
|
1652
1811
|
] })
|
|
1653
1812
|
}
|
|
1654
1813
|
),
|
|
1655
1814
|
(() => {
|
|
1656
|
-
const c = (
|
|
1657
|
-
return c === "add_to_cart_checkout" ?
|
|
1815
|
+
const c = (u == null ? void 0 : u.ctaButtonMode) || "add_to_cart";
|
|
1816
|
+
return c === "add_to_cart_checkout" ? W > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick: K, disabled: !z, className: m.cta, children: i ? I("bundle.cta.adding") : I("bundle.cta.add_more", { count: W, productWord: ct(H, W) }) }) : /* @__PURE__ */ R("div", { className: `${m.ctaButtonGroup} ${Be ? m.ctaButtonGroupAnimating : ""}`, children: [
|
|
1658
1817
|
/* @__PURE__ */ l(
|
|
1659
1818
|
"button",
|
|
1660
1819
|
{
|
|
1661
1820
|
type: "button",
|
|
1662
|
-
onClick:
|
|
1663
|
-
disabled: !
|
|
1664
|
-
className: `${
|
|
1665
|
-
children: /* @__PURE__ */ l("span", { children: i ? "
|
|
1821
|
+
onClick: K,
|
|
1822
|
+
disabled: !z,
|
|
1823
|
+
className: `${m.ctaDualLeft} ${Be ? m.ctaDualLeftAnimating : ""}`,
|
|
1824
|
+
children: /* @__PURE__ */ l("span", { children: I(i ? "bundle.cta.adding" : "bundle.cta.add_to_basket") })
|
|
1666
1825
|
}
|
|
1667
1826
|
),
|
|
1668
1827
|
/* @__PURE__ */ l(
|
|
1669
1828
|
"button",
|
|
1670
1829
|
{
|
|
1671
1830
|
type: "button",
|
|
1672
|
-
onClick:
|
|
1673
|
-
disabled: !
|
|
1674
|
-
className: `${
|
|
1675
|
-
children: /* @__PURE__ */ l("span", { children: i ? "
|
|
1831
|
+
onClick: g,
|
|
1832
|
+
disabled: !z,
|
|
1833
|
+
className: `${m.ctaDualRight} ${Be ? m.ctaDualRightAnimating : ""}`,
|
|
1834
|
+
children: /* @__PURE__ */ l("span", { children: I(i ? "bundle.cta.processing" : "bundle.cta.checkout") })
|
|
1676
1835
|
}
|
|
1677
1836
|
)
|
|
1678
|
-
] }) : c === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick:
|
|
1837
|
+
] }) : c === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick: g, disabled: !z, className: m.cta, children: i ? I("bundle.cta.processing") : W > 0 ? I("bundle.cta.add_more", { count: W, productWord: ct(H, W) }) : I("bundle.cta.checkout") }) : /* @__PURE__ */ l("button", { type: "button", onClick: K, disabled: !z, className: m.cta, children: i ? I("bundle.cta.adding") : W > 0 ? I("bundle.cta.add_more", { count: W, productWord: ct(H, W) }) : I("bundle.cta.add_to_basket") });
|
|
1679
1838
|
})(),
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
"
|
|
1839
|
+
/* @__PURE__ */ R("div", { className: m.poweredBy, children: [
|
|
1840
|
+
I("bundle.powered_by"),
|
|
1841
|
+
" ",
|
|
1682
1842
|
/* @__PURE__ */ l("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
|
|
1683
1843
|
] })
|
|
1684
1844
|
] })
|
|
@@ -1687,433 +1847,426 @@ function di(a) {
|
|
|
1687
1847
|
}
|
|
1688
1848
|
) : null;
|
|
1689
1849
|
}
|
|
1690
|
-
const
|
|
1691
|
-
panel:
|
|
1692
|
-
header:
|
|
1693
|
-
title:
|
|
1694
|
-
status:
|
|
1695
|
-
error:
|
|
1696
|
-
inactive:
|
|
1697
|
-
section:
|
|
1698
|
-
sectionTitle:
|
|
1699
|
-
rulesVisual:
|
|
1700
|
-
rulesLabelsRow:
|
|
1701
|
-
rulesLinesRow:
|
|
1702
|
-
rulesLineLabelCell:
|
|
1703
|
-
rulesLineLabel:
|
|
1704
|
-
rulesLine:
|
|
1705
|
-
rulesLineEmpty:
|
|
1706
|
-
rulesLineFilled:
|
|
1707
|
-
variants:
|
|
1708
|
-
variantList:
|
|
1709
|
-
variantRow:
|
|
1710
|
-
variantRowInteractive:
|
|
1711
|
-
variantRowSelected:
|
|
1712
|
-
variantRowSoldOut:
|
|
1713
|
-
variantMedia:
|
|
1714
|
-
variantContent:
|
|
1715
|
-
variantHeader:
|
|
1716
|
-
variantTitle:
|
|
1717
|
-
variantImage:
|
|
1718
|
-
variantImageFallback:
|
|
1719
|
-
variantMeta:
|
|
1720
|
-
variantPrice:
|
|
1721
|
-
variantFooterRow:
|
|
1722
|
-
variantActions:
|
|
1723
|
-
qtyActions:
|
|
1724
|
-
qtyActionsWrap:
|
|
1725
|
-
soldOut:
|
|
1726
|
-
stockLimitNotice:
|
|
1727
|
-
qtyChip:
|
|
1728
|
-
qtyChipInteractive:
|
|
1729
|
-
qtyChipValue:
|
|
1730
|
-
qtyChipPlus:
|
|
1731
|
-
qtyChipClear:
|
|
1732
|
-
qtyTrash:
|
|
1733
|
-
footer:
|
|
1734
|
-
boxSummaryWindow:
|
|
1735
|
-
boxSummaryRow:
|
|
1736
|
-
boxSlot:
|
|
1737
|
-
boxItem:
|
|
1738
|
-
boxItemFilled:
|
|
1739
|
-
boxItemPlaceholder:
|
|
1740
|
-
boxItemThreshold:
|
|
1741
|
-
boxItemClickable:
|
|
1742
|
-
boxItemImage:
|
|
1743
|
-
boxItemFallback:
|
|
1744
|
-
boxItemPlus:
|
|
1745
|
-
boxItemDiscountText:
|
|
1746
|
-
boxThresholdLabel:
|
|
1747
|
-
totalsReveal:
|
|
1748
|
-
totalsRevealOpen:
|
|
1749
|
-
ctaTotalsWrap:
|
|
1750
|
-
ctaTotalsWrapVisible:
|
|
1751
|
-
ctaTotals:
|
|
1752
|
-
ctaDiscountBadge:
|
|
1753
|
-
ctaTotalsStrike:
|
|
1754
|
-
ctaTotalsPrice:
|
|
1755
|
-
cta:
|
|
1756
|
-
ctaButtonGroup:
|
|
1757
|
-
ctaDualLeft:
|
|
1758
|
-
ctaDualRight:
|
|
1759
|
-
poweredBy:
|
|
1850
|
+
const Xr = "_panel_96rr4_2", Zr = "_header_96rr4_20", Jr = "_title_96rr4_24", ea = "_status_96rr4_32", ta = "_error_96rr4_37", na = "_inactive_96rr4_43", ra = "_section_96rr4_49", aa = "_sectionTitle_96rr4_54", ia = "_rulesVisual_96rr4_107", oa = "_rulesLabelsRow_96rr4_114", sa = "_rulesLinesRow_96rr4_121", la = "_rulesLineLabelCell_96rr4_128", ca = "_rulesLineLabel_96rr4_128", ua = "_rulesLine_96rr4_121", da = "_rulesLineEmpty_96rr4_162", ha = "_rulesLineFilled_96rr4_166", ma = "_variants_96rr4_170", ba = "_variantList_96rr4_178", fa = "_variantRow_96rr4_186", _a = "_variantRowInteractive_96rr4_198", pa = "_variantRowSelected_96rr4_202", ya = "_variantRowSoldOut_96rr4_207", ga = "_variantMedia_96rr4_211", va = "_variantContent_96rr4_219", wa = "_variantHeader_96rr4_227", xa = "_variantTitle_96rr4_233", Ca = "_variantImage_96rr4_247", Ia = "_variantImageFallback_96rr4_255", Na = "_variantMeta_96rr4_268", Sa = "_variantPrice_96rr4_273", Ba = "_variantFooterRow_96rr4_279", ka = "_variantActions_96rr4_286", Ta = "_qtyActions_96rr4_292", Ra = "_qtyActionsWrap_96rr4_298", La = "_soldOut_96rr4_349", Ma = "_stockLimitNotice_96rr4_357", Pa = "_qtyChip_96rr4_366", Fa = "_qtyChipInteractive_96rr4_381", Oa = "_qtyChipValue_96rr4_385", Aa = "_qtyChipPlus_96rr4_391", Da = "_qtyChipClear_96rr4_396", Ea = "_qtyTrash_96rr4_425", qa = "_footer_96rr4_437", $a = "_boxSummaryWindow_96rr4_442", Va = "_boxSummaryRow_96rr4_456", Wa = "_boxSlot_96rr4_464", za = "_boxItem_96rr4_473", ja = "_boxItemFilled_96rr4_490", Ua = "_boxItemPlaceholder_96rr4_496", Ha = "_boxItemThreshold_96rr4_502", Qa = "_boxItemClickable_96rr4_510", Ga = "_boxItemImage_96rr4_519", Ya = "_boxItemFallback_96rr4_530", Ka = "_boxItemPlus_96rr4_543", Xa = "_boxItemDiscountText_96rr4_555", Za = "_boxThresholdLabel_96rr4_568", Ja = "_totalsReveal_96rr4_579", ei = "_totalsRevealOpen_96rr4_587", ti = "_ctaTotalsWrap_96rr4_592", ni = "_ctaTotalsWrapVisible_96rr4_597", ri = "_ctaTotals_96rr4_592", ai = "_ctaDiscountBadge_96rr4_612", ii = "_ctaTotalsStrike_96rr4_623", oi = "_ctaTotalsPrice_96rr4_629", si = "_cta_96rr4_592", li = "_ctaButtonGroup_96rr4_661", ci = "_ctaDualLeft_96rr4_667", ui = "_ctaDualRight_96rr4_668", di = "_poweredBy_96rr4_695", _ = {
|
|
1851
|
+
panel: Xr,
|
|
1852
|
+
header: Zr,
|
|
1853
|
+
title: Jr,
|
|
1854
|
+
status: ea,
|
|
1855
|
+
error: ta,
|
|
1856
|
+
inactive: na,
|
|
1857
|
+
section: ra,
|
|
1858
|
+
sectionTitle: aa,
|
|
1859
|
+
rulesVisual: ia,
|
|
1860
|
+
rulesLabelsRow: oa,
|
|
1861
|
+
rulesLinesRow: sa,
|
|
1862
|
+
rulesLineLabelCell: la,
|
|
1863
|
+
rulesLineLabel: ca,
|
|
1864
|
+
rulesLine: ua,
|
|
1865
|
+
rulesLineEmpty: da,
|
|
1866
|
+
rulesLineFilled: ha,
|
|
1867
|
+
variants: ma,
|
|
1868
|
+
variantList: ba,
|
|
1869
|
+
variantRow: fa,
|
|
1870
|
+
variantRowInteractive: _a,
|
|
1871
|
+
variantRowSelected: pa,
|
|
1872
|
+
variantRowSoldOut: ya,
|
|
1873
|
+
variantMedia: ga,
|
|
1874
|
+
variantContent: va,
|
|
1875
|
+
variantHeader: wa,
|
|
1876
|
+
variantTitle: xa,
|
|
1877
|
+
variantImage: Ca,
|
|
1878
|
+
variantImageFallback: Ia,
|
|
1879
|
+
variantMeta: Na,
|
|
1880
|
+
variantPrice: Sa,
|
|
1881
|
+
variantFooterRow: Ba,
|
|
1882
|
+
variantActions: ka,
|
|
1883
|
+
qtyActions: Ta,
|
|
1884
|
+
qtyActionsWrap: Ra,
|
|
1885
|
+
soldOut: La,
|
|
1886
|
+
stockLimitNotice: Ma,
|
|
1887
|
+
qtyChip: Pa,
|
|
1888
|
+
qtyChipInteractive: Fa,
|
|
1889
|
+
qtyChipValue: Oa,
|
|
1890
|
+
qtyChipPlus: Aa,
|
|
1891
|
+
qtyChipClear: Da,
|
|
1892
|
+
qtyTrash: Ea,
|
|
1893
|
+
footer: qa,
|
|
1894
|
+
boxSummaryWindow: $a,
|
|
1895
|
+
boxSummaryRow: Va,
|
|
1896
|
+
boxSlot: Wa,
|
|
1897
|
+
boxItem: za,
|
|
1898
|
+
boxItemFilled: ja,
|
|
1899
|
+
boxItemPlaceholder: Ua,
|
|
1900
|
+
boxItemThreshold: Ha,
|
|
1901
|
+
boxItemClickable: Qa,
|
|
1902
|
+
boxItemImage: Ga,
|
|
1903
|
+
boxItemFallback: Ya,
|
|
1904
|
+
boxItemPlus: Ka,
|
|
1905
|
+
boxItemDiscountText: Xa,
|
|
1906
|
+
boxThresholdLabel: Za,
|
|
1907
|
+
totalsReveal: Ja,
|
|
1908
|
+
totalsRevealOpen: ei,
|
|
1909
|
+
ctaTotalsWrap: ti,
|
|
1910
|
+
ctaTotalsWrapVisible: ni,
|
|
1911
|
+
ctaTotals: ri,
|
|
1912
|
+
ctaDiscountBadge: ai,
|
|
1913
|
+
ctaTotalsStrike: ii,
|
|
1914
|
+
ctaTotalsPrice: oi,
|
|
1915
|
+
cta: si,
|
|
1916
|
+
ctaButtonGroup: li,
|
|
1917
|
+
ctaDualLeft: ci,
|
|
1918
|
+
ctaDualRight: ui,
|
|
1919
|
+
poweredBy: di
|
|
1760
1920
|
};
|
|
1761
|
-
function
|
|
1762
|
-
var
|
|
1921
|
+
function Ni(n) {
|
|
1922
|
+
var ve;
|
|
1763
1923
|
const {
|
|
1764
|
-
loading:
|
|
1765
|
-
submitting:
|
|
1766
|
-
error:
|
|
1924
|
+
loading: e,
|
|
1925
|
+
submitting: t,
|
|
1926
|
+
error: a,
|
|
1767
1927
|
currencyCode: i,
|
|
1768
1928
|
config: r,
|
|
1769
|
-
eligibleVariants:
|
|
1770
|
-
selections:
|
|
1771
|
-
selectionOrder:
|
|
1772
|
-
getVariantMaxSelectableQuantity:
|
|
1773
|
-
setQuantity:
|
|
1774
|
-
bundleSize:
|
|
1775
|
-
minRequired:
|
|
1776
|
-
canSubmit:
|
|
1777
|
-
submit:
|
|
1778
|
-
submitAndCheckout:
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1929
|
+
eligibleVariants: h,
|
|
1930
|
+
selections: u,
|
|
1931
|
+
selectionOrder: B,
|
|
1932
|
+
getVariantMaxSelectableQuantity: le,
|
|
1933
|
+
setQuantity: $,
|
|
1934
|
+
bundleSize: D,
|
|
1935
|
+
minRequired: de,
|
|
1936
|
+
canSubmit: F,
|
|
1937
|
+
submit: te,
|
|
1938
|
+
submitAndCheckout: z,
|
|
1939
|
+
locale: K,
|
|
1940
|
+
t: g
|
|
1941
|
+
} = wt(), {
|
|
1942
|
+
className: H,
|
|
1943
|
+
showRules: I = !0,
|
|
1944
|
+
showVariants: he = !0
|
|
1945
|
+
} = n, ke = (f) => {
|
|
1946
|
+
const p = Number.parseFloat(f);
|
|
1947
|
+
return Number.isFinite(p) ? String(Math.round(p)) : f;
|
|
1948
|
+
}, Te = (f) => {
|
|
1949
|
+
const p = (f ?? []).filter((x) => {
|
|
1950
|
+
var E, V;
|
|
1951
|
+
const T = (E = x == null ? void 0 : x.name) == null ? void 0 : E.trim(), M = (V = x == null ? void 0 : x.value) == null ? void 0 : V.trim();
|
|
1952
|
+
return !(!T || !M || T.toLowerCase() === "title");
|
|
1791
1953
|
});
|
|
1792
|
-
return
|
|
1793
|
-
},
|
|
1794
|
-
const
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
let _ = 0;
|
|
1814
|
-
for (const [w, B] of Object.entries(d)) {
|
|
1815
|
-
const R = B ?? 0;
|
|
1816
|
-
if (R <= 0) continue;
|
|
1817
|
-
const E = h.get(w), $ = Number(E == null ? void 0 : E.price);
|
|
1818
|
-
Number.isFinite($) && (_ += $ * R);
|
|
1954
|
+
return p.length ? p.map((x) => `${x.name}: ${x.value}`).join(" • ") : null;
|
|
1955
|
+
}, ye = (f) => {
|
|
1956
|
+
const p = Number(f);
|
|
1957
|
+
return Number.isFinite(p) ? jt(p, i, K) : f;
|
|
1958
|
+
}, ae = L(() => [...h].sort((f, p) => f.displayName.localeCompare(p.displayName)), [h]), X = L(() => [...(r == null ? void 0 : r.rules) ?? []].sort((f, p) => f.minBundleSize - p.minBundleSize), [r == null ? void 0 : r.rules]), ie = L(() => Math.max(0, de - D), [D, de]), me = L(() => {
|
|
1959
|
+
let f = null;
|
|
1960
|
+
for (const p of X)
|
|
1961
|
+
D >= p.minBundleSize && (f = p);
|
|
1962
|
+
return f;
|
|
1963
|
+
}, [D, X]), Re = L(() => {
|
|
1964
|
+
if (!me) return null;
|
|
1965
|
+
const f = Number.parseFloat(me.discountPercent);
|
|
1966
|
+
return !Number.isFinite(f) || f <= 0 ? null : f;
|
|
1967
|
+
}, [me]), ne = X[0], Ce = !!(ne && D >= ne.minBundleSize), be = L(() => {
|
|
1968
|
+
const f = new Map(h.map((x) => [x.id, x]));
|
|
1969
|
+
let p = 0;
|
|
1970
|
+
for (const [x, T] of Object.entries(u)) {
|
|
1971
|
+
const M = T ?? 0;
|
|
1972
|
+
if (M <= 0) continue;
|
|
1973
|
+
const E = f.get(x), V = Number(E == null ? void 0 : E.price);
|
|
1974
|
+
Number.isFinite(V) && (p += V * M);
|
|
1819
1975
|
}
|
|
1820
|
-
return Math.round(
|
|
1821
|
-
}, [
|
|
1822
|
-
if (!
|
|
1823
|
-
const
|
|
1824
|
-
return Math.round(
|
|
1825
|
-
}, [
|
|
1826
|
-
const
|
|
1827
|
-
return
|
|
1828
|
-
}, [
|
|
1829
|
-
var
|
|
1830
|
-
const
|
|
1831
|
-
for (const
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
discountPercent:
|
|
1835
|
-
minBundleSize:
|
|
1836
|
-
label: ((
|
|
1976
|
+
return Math.round(p * 100) / 100;
|
|
1977
|
+
}, [h, u]), Ve = L(() => {
|
|
1978
|
+
if (!Re) return be;
|
|
1979
|
+
const f = be * (1 - Re / 100);
|
|
1980
|
+
return Math.round(f * 100) / 100;
|
|
1981
|
+
}, [Re, be]), ge = L(() => X.length ? Math.max(...X.map((f) => f.minBundleSize)) : 0, [X]), Le = L(() => {
|
|
1982
|
+
const f = new Map(h.map((p) => [p.id, p]));
|
|
1983
|
+
return B.map((p) => f.get(p)).filter((p) => !!p);
|
|
1984
|
+
}, [h, B]), Ie = L(() => {
|
|
1985
|
+
var p;
|
|
1986
|
+
const f = /* @__PURE__ */ new Map();
|
|
1987
|
+
for (const x of X) {
|
|
1988
|
+
const T = Math.max(0, x.minBundleSize - 1);
|
|
1989
|
+
f.set(T, {
|
|
1990
|
+
discountPercent: x.discountPercent,
|
|
1991
|
+
minBundleSize: x.minBundleSize,
|
|
1992
|
+
label: ((p = x.label) == null ? void 0 : p.trim()) || `Buy ${x.minBundleSize}+`
|
|
1837
1993
|
});
|
|
1838
1994
|
}
|
|
1839
|
-
return
|
|
1840
|
-
}, [
|
|
1841
|
-
const
|
|
1842
|
-
return Math.max(2, Math.min(100,
|
|
1843
|
-
}, [r == null ? void 0 : r.maxBundleSize]),
|
|
1844
|
-
|
|
1845
|
-
const
|
|
1846
|
-
if (
|
|
1847
|
-
const
|
|
1848
|
-
if (!
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1995
|
+
return f;
|
|
1996
|
+
}, [X]), Ae = L(() => {
|
|
1997
|
+
const f = Number((r == null ? void 0 : r.maxBundleSize) ?? NaN), p = Number.isFinite(f) ? Math.floor(f) : 100;
|
|
1998
|
+
return Math.max(2, Math.min(100, p));
|
|
1999
|
+
}, [r == null ? void 0 : r.maxBundleSize]), nt = ((ve = r == null ? void 0 : r.title) == null ? void 0 : ve.trim()) || g("bundle.title.default"), We = L(() => Math.max(ge || de, Le.length), [Le.length, ge, de]), ze = D >= Ae, Me = U(null), Ye = U(null), Ne = U(D);
|
|
2000
|
+
O(() => {
|
|
2001
|
+
const f = Ne.current;
|
|
2002
|
+
if (Ne.current = D, D <= f) return;
|
|
2003
|
+
const p = Ye.current;
|
|
2004
|
+
if (!p) return;
|
|
2005
|
+
const x = X.some((V) => V.minBundleSize === D), T = X.find((V) => V.minBundleSize > D), M = T && x ? T.minBundleSize - 1 : T ? null : D - 1;
|
|
2006
|
+
if (M == null || M < 0) return;
|
|
1851
2007
|
const E = requestAnimationFrame(() => {
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
1854
|
-
const
|
|
1855
|
-
if (
|
|
1856
|
-
const
|
|
1857
|
-
|
|
2008
|
+
const V = p.querySelector(`[data-box-slot="${M}"]`);
|
|
2009
|
+
if (!V) return;
|
|
2010
|
+
const Z = p.getBoundingClientRect(), Q = V.getBoundingClientRect().right - Z.right;
|
|
2011
|
+
if (Q <= 1) return;
|
|
2012
|
+
const A = Math.max(0, p.scrollWidth - p.clientWidth), q = Math.min(A, Math.max(0, p.scrollLeft + Q));
|
|
2013
|
+
p.scrollTo({ left: q, behavior: "smooth" });
|
|
1858
2014
|
});
|
|
1859
2015
|
return () => cancelAnimationFrame(E);
|
|
1860
|
-
}, [
|
|
1861
|
-
const
|
|
1862
|
-
const
|
|
1863
|
-
if (!
|
|
1864
|
-
const
|
|
1865
|
-
|
|
2016
|
+
}, [D, X]);
|
|
2017
|
+
const De = (f) => {
|
|
2018
|
+
const p = Me.current;
|
|
2019
|
+
if (!p) return;
|
|
2020
|
+
const x = p.querySelector(`[data-variant-row="${f}"]`);
|
|
2021
|
+
x && x.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1866
2022
|
};
|
|
1867
|
-
return /* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */ l("header", { className:
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
!
|
|
1872
|
-
|
|
1873
|
-
/* @__PURE__ */ l("div", { className:
|
|
1874
|
-
const
|
|
1875
|
-
return /* @__PURE__ */ l("div", { className:
|
|
2023
|
+
return /* @__PURE__ */ R("section", { className: [_.panel, H].filter(Boolean).join(" "), "aria-busy": e, children: [
|
|
2024
|
+
/* @__PURE__ */ l("header", { className: _.header, children: /* @__PURE__ */ l("h2", { className: _.title, children: nt }) }),
|
|
2025
|
+
e ? /* @__PURE__ */ l("div", { className: _.status, children: g("bundle.loading") }) : null,
|
|
2026
|
+
a ? /* @__PURE__ */ l("div", { className: _.error, children: a }) : null,
|
|
2027
|
+
!e && r && !r.isActive ? /* @__PURE__ */ l("div", { className: _.inactive, children: g("bundle.inactive") }) : null,
|
|
2028
|
+
I && X.length ? /* @__PURE__ */ l("div", { className: _.section, children: /* @__PURE__ */ R("div", { className: _.rulesVisual, children: [
|
|
2029
|
+
/* @__PURE__ */ l("div", { className: _.rulesLabelsRow, children: Array.from({ length: ge }).map((f, p) => {
|
|
2030
|
+
const x = p + 1, T = X.find((E) => E.minBundleSize === x), M = T ? g("bundle.discount.off_label", { discount: ke(T.discountPercent) }) : null;
|
|
2031
|
+
return /* @__PURE__ */ l("div", { className: _.rulesLineLabelCell, children: M ? /* @__PURE__ */ l("span", { className: _.rulesLineLabel, children: M }) : null }, x);
|
|
1876
2032
|
}) }),
|
|
1877
|
-
/* @__PURE__ */ l("div", { className:
|
|
1878
|
-
const
|
|
2033
|
+
/* @__PURE__ */ l("div", { className: _.rulesLinesRow, children: Array.from({ length: ge }).map((f, p) => {
|
|
2034
|
+
const x = p + 1, T = D >= x;
|
|
1879
2035
|
return /* @__PURE__ */ l(
|
|
1880
2036
|
"div",
|
|
1881
2037
|
{
|
|
1882
2038
|
className: [
|
|
1883
|
-
|
|
1884
|
-
|
|
2039
|
+
_.rulesLine,
|
|
2040
|
+
T ? _.rulesLineFilled : _.rulesLineEmpty
|
|
1885
2041
|
].filter(Boolean).join(" ")
|
|
1886
2042
|
},
|
|
1887
|
-
|
|
2043
|
+
x
|
|
1888
2044
|
);
|
|
1889
2045
|
}) })
|
|
1890
2046
|
] }) }) : null,
|
|
1891
|
-
|
|
1892
|
-
/* @__PURE__ */ l("div", { className:
|
|
1893
|
-
/* @__PURE__ */ l("div", { className:
|
|
1894
|
-
var
|
|
1895
|
-
const
|
|
1896
|
-
return /* @__PURE__ */
|
|
2047
|
+
he ? /* @__PURE__ */ R("div", { className: _.section, ref: Me, children: [
|
|
2048
|
+
/* @__PURE__ */ l("div", { className: _.sectionTitle, children: g("bundle.select.items") }),
|
|
2049
|
+
/* @__PURE__ */ l("div", { className: _.variants, children: /* @__PURE__ */ l("ul", { className: _.variantList, children: ae.map((f) => {
|
|
2050
|
+
var A;
|
|
2051
|
+
const p = u[f.id] ?? 0, x = Te(f.selectedOptions), T = f.availableForSale === !1, M = le(f.id), E = M ?? Number.POSITIVE_INFINITY, V = p >= E, Z = !T && !ze && !V, ee = Z, Q = !T && V ? g("bundle.stock.max_reached") : null;
|
|
2052
|
+
return /* @__PURE__ */ R(
|
|
1897
2053
|
"li",
|
|
1898
2054
|
{
|
|
1899
2055
|
className: [
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
2056
|
+
_.variantRow,
|
|
2057
|
+
ee ? _.variantRowInteractive : null,
|
|
2058
|
+
p > 0 ? _.variantRowSelected : null,
|
|
2059
|
+
T ? _.variantRowSoldOut : null
|
|
1904
2060
|
].filter(Boolean).join(" "),
|
|
1905
|
-
"data-variant-row":
|
|
1906
|
-
role:
|
|
1907
|
-
tabIndex:
|
|
1908
|
-
onClick:
|
|
1909
|
-
|
|
2061
|
+
"data-variant-row": f.id,
|
|
2062
|
+
role: ee ? "button" : void 0,
|
|
2063
|
+
tabIndex: ee ? 0 : void 0,
|
|
2064
|
+
onClick: ee ? () => {
|
|
2065
|
+
$(f.id, p + 1);
|
|
1910
2066
|
} : void 0,
|
|
1911
|
-
onKeyDown:
|
|
1912
|
-
(
|
|
2067
|
+
onKeyDown: ee ? (q) => {
|
|
2068
|
+
(q.key === "Enter" || q.key === " ") && (q.preventDefault(), $(f.id, p + 1), De(f.id));
|
|
1913
2069
|
} : void 0,
|
|
1914
|
-
"aria-label":
|
|
2070
|
+
"aria-label": T ? g("bundle.a11y.sold_out", { name: f.displayName }) : Q ? `${f.displayName} ${Q.toLowerCase()}` : g("bundle.a11y.add_to_bundle", { name: f.displayName }),
|
|
1915
2071
|
children: [
|
|
1916
|
-
/* @__PURE__ */ l("div", { className:
|
|
2072
|
+
/* @__PURE__ */ l("div", { className: _.variantMedia, children: (A = f.image) != null && A.url ? /* @__PURE__ */ l(
|
|
1917
2073
|
"img",
|
|
1918
2074
|
{
|
|
1919
|
-
src:
|
|
1920
|
-
alt:
|
|
1921
|
-
width:
|
|
1922
|
-
height:
|
|
1923
|
-
className:
|
|
2075
|
+
src: f.image.url,
|
|
2076
|
+
alt: f.image.altText ?? f.displayName,
|
|
2077
|
+
width: f.image.width ?? 64,
|
|
2078
|
+
height: f.image.height ?? 64,
|
|
2079
|
+
className: _.variantImage,
|
|
1924
2080
|
loading: "lazy"
|
|
1925
2081
|
}
|
|
1926
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
1927
|
-
/* @__PURE__ */
|
|
1928
|
-
/* @__PURE__ */
|
|
1929
|
-
/* @__PURE__ */ l("div", { className:
|
|
1930
|
-
|
|
2082
|
+
) : /* @__PURE__ */ l("div", { className: _.variantImageFallback, children: g("bundle.item.generic") }) }),
|
|
2083
|
+
/* @__PURE__ */ R("div", { className: _.variantContent, children: [
|
|
2084
|
+
/* @__PURE__ */ R("div", { className: _.variantHeader, children: [
|
|
2085
|
+
/* @__PURE__ */ l("div", { className: _.variantTitle, children: f.displayName }),
|
|
2086
|
+
x ? /* @__PURE__ */ l("div", { className: _.variantMeta, children: x }) : null
|
|
1931
2087
|
] }),
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */ l("div", { className:
|
|
1934
|
-
/* @__PURE__ */ l("div", { className:
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
2088
|
+
/* @__PURE__ */ R("div", { className: _.variantFooterRow, children: [
|
|
2089
|
+
/* @__PURE__ */ l("div", { className: _.variantPrice, children: ye(f.price) }),
|
|
2090
|
+
/* @__PURE__ */ l("div", { className: _.variantActions, children: T ? /* @__PURE__ */ l("div", { className: _.soldOut, "aria-label": g("bundle.a11y.sold_out", { name: f.displayName }), children: g("bundle.stock.sold_out") }) : p <= 0 && E <= 0 ? /* @__PURE__ */ l("div", { className: _.stockLimitNotice, "aria-label": g("bundle.a11y.max_available_selected", { name: f.displayName }), children: g("bundle.stock.max_added") }) : /* @__PURE__ */ R("div", { className: _.qtyActionsWrap, children: [
|
|
2091
|
+
/* @__PURE__ */ R("div", { className: _.qtyActions, children: [
|
|
2092
|
+
p > 0 ? /* @__PURE__ */ l(
|
|
1937
2093
|
"button",
|
|
1938
2094
|
{
|
|
1939
2095
|
type: "button",
|
|
1940
|
-
className:
|
|
1941
|
-
"aria-label":
|
|
1942
|
-
onClick: (
|
|
1943
|
-
|
|
2096
|
+
className: _.qtyTrash,
|
|
2097
|
+
"aria-label": g("bundle.a11y.remove_from_bundle", { name: f.displayName }),
|
|
2098
|
+
onClick: (q) => {
|
|
2099
|
+
q.stopPropagation(), $(f.id, 0);
|
|
1944
2100
|
},
|
|
1945
|
-
onKeyDown: (
|
|
1946
|
-
|
|
2101
|
+
onKeyDown: (q) => {
|
|
2102
|
+
q.stopPropagation();
|
|
1947
2103
|
},
|
|
1948
|
-
children: /* @__PURE__ */ l(
|
|
2104
|
+
children: /* @__PURE__ */ l(Ln, { size: 14 })
|
|
1949
2105
|
}
|
|
1950
2106
|
) : null,
|
|
1951
2107
|
/* @__PURE__ */ l(
|
|
1952
2108
|
"div",
|
|
1953
2109
|
{
|
|
1954
|
-
className: [
|
|
1955
|
-
"aria-label":
|
|
1956
|
-
onClick:
|
|
1957
|
-
|
|
2110
|
+
className: [_.qtyChip, Z ? _.qtyChipInteractive : null].filter(Boolean).join(" "),
|
|
2111
|
+
"aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty: p }),
|
|
2112
|
+
onClick: Z ? (q) => {
|
|
2113
|
+
q.stopPropagation(), $(f.id, p + 1);
|
|
1958
2114
|
} : void 0,
|
|
1959
|
-
onKeyDown: (
|
|
1960
|
-
|
|
2115
|
+
onKeyDown: (q) => {
|
|
2116
|
+
q.stopPropagation();
|
|
1961
2117
|
},
|
|
1962
|
-
role:
|
|
1963
|
-
tabIndex:
|
|
1964
|
-
children:
|
|
1965
|
-
/* @__PURE__ */ l("span", { className:
|
|
2118
|
+
role: Z ? "button" : void 0,
|
|
2119
|
+
tabIndex: Z ? 0 : void 0,
|
|
2120
|
+
children: p <= 0 ? /* @__PURE__ */ l("span", { className: _.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ l(Vt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ R(kt, { children: [
|
|
2121
|
+
/* @__PURE__ */ l("span", { className: _.qtyChipValue, children: p }),
|
|
1966
2122
|
/* @__PURE__ */ l(
|
|
1967
2123
|
"button",
|
|
1968
2124
|
{
|
|
1969
2125
|
type: "button",
|
|
1970
|
-
className:
|
|
1971
|
-
"aria-label":
|
|
1972
|
-
onClick: (
|
|
1973
|
-
|
|
2126
|
+
className: _.qtyChipClear,
|
|
2127
|
+
"aria-label": g("bundle.a11y.increase", { name: f.displayName }),
|
|
2128
|
+
onClick: (q) => {
|
|
2129
|
+
q.stopPropagation(), $(f.id, p + 1);
|
|
1974
2130
|
},
|
|
1975
|
-
onKeyDown: (
|
|
1976
|
-
|
|
2131
|
+
onKeyDown: (q) => {
|
|
2132
|
+
q.stopPropagation();
|
|
1977
2133
|
},
|
|
1978
|
-
disabled: !
|
|
1979
|
-
children: /* @__PURE__ */ l(
|
|
2134
|
+
disabled: !Z,
|
|
2135
|
+
children: /* @__PURE__ */ l(Vt, { size: 12, strokeWidth: 2 })
|
|
1980
2136
|
}
|
|
1981
2137
|
)
|
|
1982
2138
|
] })
|
|
1983
2139
|
}
|
|
1984
2140
|
)
|
|
1985
2141
|
] }),
|
|
1986
|
-
|
|
2142
|
+
Q ? /* @__PURE__ */ l("div", { className: _.stockLimitNotice, children: Q }) : null
|
|
1987
2143
|
] }) })
|
|
1988
2144
|
] })
|
|
1989
2145
|
] })
|
|
1990
2146
|
]
|
|
1991
2147
|
},
|
|
1992
|
-
|
|
2148
|
+
f.id
|
|
1993
2149
|
);
|
|
1994
2150
|
}) }) })
|
|
1995
2151
|
] }) : null,
|
|
1996
|
-
/* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */ l("div", { className:
|
|
1998
|
-
var
|
|
1999
|
-
const
|
|
2000
|
-
return /* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ R("footer", { className: _.footer, children: [
|
|
2153
|
+
/* @__PURE__ */ l("div", { className: _.boxSummaryWindow, ref: Ye, children: /* @__PURE__ */ l("div", { className: _.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: We }).map((f, p) => {
|
|
2154
|
+
var Q, A, q, Se;
|
|
2155
|
+
const x = Le[p], T = Ie.get(p), M = !!x, E = !!T, V = E && !M, Z = T ? g("bundle.discount.off_label", { discount: ke(T.discountPercent) }) : null, ee = M ? x.displayName : g("bundle.slot", { slot: p + 1 });
|
|
2156
|
+
return /* @__PURE__ */ R("div", { "data-box-slot": p, className: _.boxSlot, children: [
|
|
2001
2157
|
/* @__PURE__ */ l(
|
|
2002
2158
|
"div",
|
|
2003
2159
|
{
|
|
2004
2160
|
className: [
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
E ?
|
|
2008
|
-
|
|
2161
|
+
_.boxItem,
|
|
2162
|
+
M ? _.boxItemFilled : _.boxItemPlaceholder,
|
|
2163
|
+
E ? _.boxItemThreshold : null,
|
|
2164
|
+
M ? _.boxItemClickable : null
|
|
2009
2165
|
].filter(Boolean).join(" "),
|
|
2010
|
-
role:
|
|
2011
|
-
tabIndex:
|
|
2012
|
-
onClick:
|
|
2013
|
-
onKeyDown:
|
|
2014
|
-
(
|
|
2166
|
+
role: M ? "button" : void 0,
|
|
2167
|
+
tabIndex: M ? 0 : void 0,
|
|
2168
|
+
onClick: M ? () => De(x.id) : void 0,
|
|
2169
|
+
onKeyDown: M ? (Pe) => {
|
|
2170
|
+
(Pe.key === "Enter" || Pe.key === " ") && (Pe.preventDefault(), De(x.id));
|
|
2015
2171
|
} : void 0,
|
|
2016
|
-
"aria-label":
|
|
2017
|
-
title:
|
|
2018
|
-
children:
|
|
2172
|
+
"aria-label": V && Z ? `${ee}. ${g("bundle.unlocks", { discount: Z })}.` : ee,
|
|
2173
|
+
title: V && Z ? `${ee} • ${g("bundle.unlocks", { discount: Z })}` : ee,
|
|
2174
|
+
children: M ? (Q = x.image) != null && Q.url ? /* @__PURE__ */ l(
|
|
2019
2175
|
"img",
|
|
2020
2176
|
{
|
|
2021
|
-
className:
|
|
2022
|
-
src:
|
|
2023
|
-
alt:
|
|
2177
|
+
className: _.boxItemImage,
|
|
2178
|
+
src: x.image.url,
|
|
2179
|
+
alt: x.image.altText ?? x.displayName,
|
|
2024
2180
|
width: 1,
|
|
2025
2181
|
height: 1,
|
|
2026
2182
|
loading: "lazy"
|
|
2027
2183
|
}
|
|
2028
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
2184
|
+
) : /* @__PURE__ */ l("div", { className: _.boxItemFallback, "aria-hidden": "true", children: ((Se = (q = (A = x.product) == null ? void 0 : A.title) == null ? void 0 : q.slice(0, 1)) == null ? void 0 : Se.toUpperCase()) ?? "•" }) : V && Z ? /* @__PURE__ */ l("div", { className: _.boxItemDiscountText, children: Z }) : /* @__PURE__ */ l("div", { className: _.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
2029
2185
|
}
|
|
2030
2186
|
),
|
|
2031
|
-
E ? /* @__PURE__ */ l("div", { className:
|
|
2032
|
-
] },
|
|
2187
|
+
E ? /* @__PURE__ */ l("div", { className: _.boxThresholdLabel, children: T.label }) : null
|
|
2188
|
+
] }, p);
|
|
2033
2189
|
}) }) }),
|
|
2034
|
-
/* @__PURE__ */ l("div", { className: [
|
|
2190
|
+
/* @__PURE__ */ l("div", { className: [_.totalsReveal, Ce ? _.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ l(
|
|
2035
2191
|
"div",
|
|
2036
2192
|
{
|
|
2037
|
-
className: [
|
|
2038
|
-
"aria-hidden": !
|
|
2039
|
-
children: /* @__PURE__ */
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
"
|
|
2043
|
-
] }) : /* @__PURE__ */ l("span", {}),
|
|
2044
|
-
/* @__PURE__ */ l("span", { children: dt ? /* @__PURE__ */ N(xe, { children: [
|
|
2045
|
-
/* @__PURE__ */ l("span", { className: b.ctaTotalsStrike, children: gt(ht.toFixed(2)) }),
|
|
2193
|
+
className: [_.ctaTotalsWrap, Ce ? _.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
2194
|
+
"aria-hidden": !Ce,
|
|
2195
|
+
children: /* @__PURE__ */ R("div", { className: _.ctaTotals, "aria-label": g("bundle.totals"), children: [
|
|
2196
|
+
Re ? /* @__PURE__ */ l("span", { className: _.ctaDiscountBadge, children: g("bundle.discount.badge", { discount: Re }) }) : /* @__PURE__ */ l("span", {}),
|
|
2197
|
+
/* @__PURE__ */ l("span", { children: Re ? /* @__PURE__ */ R(kt, { children: [
|
|
2198
|
+
/* @__PURE__ */ l("span", { className: _.ctaTotalsStrike, children: ye(be.toFixed(2)) }),
|
|
2046
2199
|
" ",
|
|
2047
|
-
/* @__PURE__ */ l("span", { className:
|
|
2048
|
-
] }) : /* @__PURE__ */ l("span", { className:
|
|
2200
|
+
/* @__PURE__ */ l("span", { className: _.ctaTotalsPrice, children: ye(Ve.toFixed(2)) })
|
|
2201
|
+
] }) : /* @__PURE__ */ l("span", { className: _.ctaTotalsPrice, children: ye(be.toFixed(2)) }) })
|
|
2049
2202
|
] })
|
|
2050
2203
|
}
|
|
2051
2204
|
) }),
|
|
2052
2205
|
(() => {
|
|
2053
|
-
const
|
|
2054
|
-
return
|
|
2055
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2056
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2057
|
-
] }) :
|
|
2206
|
+
const f = (r == null ? void 0 : r.ctaButtonMode) || "add_to_cart";
|
|
2207
|
+
return f === "add_to_cart_checkout" ? ie > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick: te, disabled: !F, className: _.cta, children: t ? g("bundle.cta.adding") : g("bundle.cta.add_more", { count: ie, productWord: ct(K, ie) }) }) : /* @__PURE__ */ R("div", { className: _.ctaButtonGroup, children: [
|
|
2208
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: te, disabled: !F, className: _.ctaDualLeft, children: /* @__PURE__ */ l("span", { children: g(t ? "bundle.cta.adding" : "bundle.cta.add_to_basket") }) }),
|
|
2209
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: z, disabled: !F, className: _.ctaDualRight, children: /* @__PURE__ */ l("span", { children: g(t ? "bundle.cta.processing" : "bundle.cta.checkout") }) })
|
|
2210
|
+
] }) : f === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick: z, disabled: !F, className: _.cta, children: t ? g("bundle.cta.processing") : ie > 0 ? g("bundle.cta.add_more", { count: ie, productWord: ct(K, ie) }) : g("bundle.cta.checkout") }) : /* @__PURE__ */ l("button", { type: "button", onClick: te, disabled: !F, className: _.cta, children: t ? g("bundle.cta.adding") : ie > 0 ? g("bundle.cta.add_more", { count: ie, productWord: ct(K, ie) }) : g("bundle.cta.add_to_basket") });
|
|
2058
2211
|
})(),
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
"
|
|
2212
|
+
/* @__PURE__ */ R("div", { className: _.poweredBy, children: [
|
|
2213
|
+
g("bundle.powered_by"),
|
|
2061
2214
|
" ",
|
|
2062
2215
|
/* @__PURE__ */ l("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
|
|
2063
2216
|
] })
|
|
2064
2217
|
] })
|
|
2065
2218
|
] });
|
|
2066
2219
|
}
|
|
2067
|
-
function
|
|
2068
|
-
if (
|
|
2069
|
-
return
|
|
2220
|
+
function Bt(n) {
|
|
2221
|
+
if (n != null && n.length)
|
|
2222
|
+
return n.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
|
|
2070
2223
|
}
|
|
2071
|
-
function
|
|
2072
|
-
const
|
|
2073
|
-
return
|
|
2224
|
+
function Wt(n) {
|
|
2225
|
+
const e = /\/(\d+)$/.exec(n);
|
|
2226
|
+
return e ? e[1] : n;
|
|
2074
2227
|
}
|
|
2075
|
-
function
|
|
2076
|
-
if (
|
|
2077
|
-
const
|
|
2078
|
-
return
|
|
2228
|
+
function hi(n) {
|
|
2229
|
+
if (n == null) return null;
|
|
2230
|
+
const e = String(n).trim();
|
|
2231
|
+
return e ? e.startsWith("gid://shopify/ProductVariant/") ? e : `gid://shopify/ProductVariant/${e}` : null;
|
|
2079
2232
|
}
|
|
2080
|
-
function
|
|
2081
|
-
var
|
|
2082
|
-
return typeof window > "u" ? null : ((
|
|
2233
|
+
function mi() {
|
|
2234
|
+
var n;
|
|
2235
|
+
return typeof window > "u" ? null : ((n = window.Shopify) == null ? void 0 : n.theme) ?? null;
|
|
2083
2236
|
}
|
|
2084
|
-
function
|
|
2085
|
-
const
|
|
2086
|
-
return
|
|
2237
|
+
function bi() {
|
|
2238
|
+
const n = mi();
|
|
2239
|
+
return n ? n.schema_name === "Sleek" ? !0 : /sleek/i.test(n.name ?? "") : !1;
|
|
2087
2240
|
}
|
|
2088
|
-
function
|
|
2241
|
+
function fi() {
|
|
2089
2242
|
return typeof document > "u" ? !1 : !!document.querySelector("cart-drawer");
|
|
2090
2243
|
}
|
|
2091
|
-
function
|
|
2092
|
-
return !
|
|
2244
|
+
function _i() {
|
|
2245
|
+
return !bi() || !fi() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
|
|
2093
2246
|
bubbles: !0,
|
|
2094
2247
|
detail: { open: !0 }
|
|
2095
2248
|
})), !0);
|
|
2096
2249
|
}
|
|
2097
|
-
function
|
|
2250
|
+
function pi() {
|
|
2098
2251
|
window.location.reload();
|
|
2099
2252
|
}
|
|
2100
|
-
async function
|
|
2101
|
-
const
|
|
2253
|
+
async function yt(n, e) {
|
|
2254
|
+
const t = await fetch(n, {
|
|
2102
2255
|
method: "POST",
|
|
2103
2256
|
headers: {
|
|
2104
2257
|
Accept: "application/json",
|
|
2105
2258
|
"Content-Type": "application/json"
|
|
2106
2259
|
},
|
|
2107
|
-
body: JSON.stringify(
|
|
2260
|
+
body: JSON.stringify(e)
|
|
2108
2261
|
});
|
|
2109
|
-
if (!
|
|
2110
|
-
const
|
|
2111
|
-
throw new Error(
|
|
2262
|
+
if (!t.ok) {
|
|
2263
|
+
const a = await t.text().catch(() => "");
|
|
2264
|
+
throw new Error(a || `Cart request failed: ${t.status}`);
|
|
2112
2265
|
}
|
|
2113
|
-
return
|
|
2266
|
+
return t.json().catch(() => null);
|
|
2114
2267
|
}
|
|
2115
|
-
async function
|
|
2116
|
-
const
|
|
2268
|
+
async function yi() {
|
|
2269
|
+
const n = await fetch("/cart.js", {
|
|
2117
2270
|
method: "GET",
|
|
2118
2271
|
cache: "no-store",
|
|
2119
2272
|
headers: {
|
|
@@ -2121,52 +2274,52 @@ async function ii() {
|
|
|
2121
2274
|
"Content-Type": "application/json"
|
|
2122
2275
|
}
|
|
2123
2276
|
});
|
|
2124
|
-
if (!
|
|
2125
|
-
throw new Error(`Cart request failed: ${
|
|
2126
|
-
return
|
|
2277
|
+
if (!n.ok)
|
|
2278
|
+
throw new Error(`Cart request failed: ${n.status}`);
|
|
2279
|
+
return n.json();
|
|
2127
2280
|
}
|
|
2128
|
-
function
|
|
2281
|
+
function Si() {
|
|
2129
2282
|
return {
|
|
2130
|
-
async linesAdd(
|
|
2131
|
-
const
|
|
2132
|
-
id:
|
|
2133
|
-
quantity:
|
|
2134
|
-
properties:
|
|
2283
|
+
async linesAdd(n) {
|
|
2284
|
+
const e = n.map((t) => ({
|
|
2285
|
+
id: Wt(t.merchandiseId),
|
|
2286
|
+
quantity: t.quantity,
|
|
2287
|
+
properties: Bt(t.attributes)
|
|
2135
2288
|
}));
|
|
2136
|
-
await
|
|
2289
|
+
await yt("/cart/add.js", { items: e });
|
|
2137
2290
|
},
|
|
2138
|
-
async linesAddForCheckout(
|
|
2139
|
-
const
|
|
2140
|
-
id:
|
|
2141
|
-
quantity:
|
|
2142
|
-
properties:
|
|
2291
|
+
async linesAddForCheckout(n) {
|
|
2292
|
+
const e = n.map((t) => ({
|
|
2293
|
+
id: Wt(t.merchandiseId),
|
|
2294
|
+
quantity: t.quantity,
|
|
2295
|
+
properties: Bt(t.attributes)
|
|
2143
2296
|
}));
|
|
2144
|
-
await
|
|
2297
|
+
await yt("/cart/add.js", { items: e });
|
|
2145
2298
|
},
|
|
2146
|
-
async linesUpdate(
|
|
2147
|
-
for (const
|
|
2148
|
-
await
|
|
2149
|
-
id:
|
|
2150
|
-
quantity:
|
|
2151
|
-
properties:
|
|
2299
|
+
async linesUpdate(n) {
|
|
2300
|
+
for (const e of n)
|
|
2301
|
+
await yt("/cart/change.js", {
|
|
2302
|
+
id: e.id,
|
|
2303
|
+
quantity: e.quantity,
|
|
2304
|
+
properties: Bt(e.attributes)
|
|
2152
2305
|
});
|
|
2153
2306
|
},
|
|
2154
|
-
async linesRemove(
|
|
2155
|
-
for (const
|
|
2156
|
-
await
|
|
2307
|
+
async linesRemove(n) {
|
|
2308
|
+
for (const e of n)
|
|
2309
|
+
await yt("/cart/change.js", { id: e, quantity: 0 });
|
|
2157
2310
|
},
|
|
2158
2311
|
async getLineQuantitiesByMerchandiseId() {
|
|
2159
|
-
const
|
|
2160
|
-
for (const
|
|
2161
|
-
const
|
|
2162
|
-
if (!
|
|
2163
|
-
const i = Number(
|
|
2164
|
-
!Number.isFinite(i) || i <= 0 || (
|
|
2312
|
+
const n = await yi(), e = {};
|
|
2313
|
+
for (const t of n.items ?? []) {
|
|
2314
|
+
const a = hi(t.id);
|
|
2315
|
+
if (!a) continue;
|
|
2316
|
+
const i = Number(t.quantity ?? 0);
|
|
2317
|
+
!Number.isFinite(i) || i <= 0 || (e[a] = (e[a] ?? 0) + Math.floor(i));
|
|
2165
2318
|
}
|
|
2166
|
-
return
|
|
2319
|
+
return e;
|
|
2167
2320
|
},
|
|
2168
2321
|
openCartUI() {
|
|
2169
|
-
|
|
2322
|
+
_i() || window.setTimeout(() => pi(), 0);
|
|
2170
2323
|
},
|
|
2171
2324
|
navigateToCheckout() {
|
|
2172
2325
|
window.location.href = "/checkout";
|
|
@@ -2174,13 +2327,13 @@ function mi() {
|
|
|
2174
2327
|
};
|
|
2175
2328
|
}
|
|
2176
2329
|
export {
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2330
|
+
Ii as BundleBuilderDrawer,
|
|
2331
|
+
Ni as BundleBuilderPanel,
|
|
2332
|
+
Ci as BundleButton,
|
|
2333
|
+
_t as BundleLineAttributeKeys,
|
|
2334
|
+
wi as BundleProvider,
|
|
2335
|
+
Si as createLiquidCartAdapter,
|
|
2336
|
+
wt as useBundleBuilder,
|
|
2337
|
+
xi as useBundleBuilderDrawer
|
|
2185
2338
|
};
|
|
2186
2339
|
//# sourceMappingURL=index.js.map
|