@best-bundles/bundle-ui 0.0.42 → 0.0.44
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.map +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/index.js +870 -863
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.css +1 -1
- package/dist/liquid/bundle-ui.iife.js +18 -18
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.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_p0w0a_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_p0w0a_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_p0w0a_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_p0w0a_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_p0w0a_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_p0w0a_74{opacity:1}._backdropClosed_p0w0a_78{opacity:0}._panel_p0w0a_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_p0w0a_103{animation:_bbSlideInFromRight_p0w0a_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_p0w0a_107{animation:_bbSlideOutToRight_p0w0a_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_p0w0a_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_p0w0a_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_p0w0a_1{transition:none}._celebrationChip_p0w0a_23,._panelOpen_p0w0a_103,._panelClosed_p0w0a_107{animation:none}}._header_p0w0a_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_p0w0a_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_p0w0a_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_p0w0a_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_p0w0a_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_p0w0a_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_p0w0a_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_p0w0a_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_p0w0a_211 ._headerTitleWrap_p0w0a_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_p0w0a_211 ._headerSearchWrap_p0w0a_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_p0w0a_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_p0w0a_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_p0w0a_235::-webkit-search-cancel-button,._searchInput_p0w0a_235::-webkit-search-decoration,._searchInput_p0w0a_235::-webkit-search-results-button,._searchInput_p0w0a_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_p0w0a_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_p0w0a_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_p0w0a_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_p0w0a_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_p0w0a_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_p0w0a_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_p0w0a_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_p0w0a_195,._headerSearchWrap_p0w0a_199{transition:none}}._body_p0w0a_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_p0w0a_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_p0w0a_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_p0w0a_327{margin-top:4px}._variantList_p0w0a_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_p0w0a_339{margin:0;padding:20px 16px;border-radius:var(--bb-border-radius, 12px);border:1px dashed var(--bb-border-color, rgba(17, 24, 39, .12));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));font-size:13px;line-height:1.5;text-align:center}._variantRow_p0w0a_351{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_p0w0a_359{opacity:.65}._variantLeft_p0w0a_363{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_p0w0a_370{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_p0w0a_370:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_p0w0a_370:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_p0w0a_370:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_p0w0a_398{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_p0w0a_406{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_p0w0a_398{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_p0w0a_424{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_p0w0a_433{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_p0w0a_443{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_p0w0a_450{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_p0w0a_460{min-width:0}._variantName_p0w0a_464{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_p0w0a_473{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_p0w0a_481{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_p0w0a_488{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_p0w0a_481{font-size:13px;font-weight:800}._qtyControls_p0w0a_499{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_p0w0a_505{display:grid;justify-items:center;gap:4px}._qtyButton_p0w0a_511{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_p0w0a_511:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_p0w0a_511:disabled{opacity:.6;cursor:not-allowed}._qtyButton_p0w0a_511:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_p0w0a_537{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_p0w0a_544{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_p0w0a_552{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_p0w0a_552 a{color:inherit;text-decoration:none}._boxSummaryWindow_p0w0a_564{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_p0w0a_564::-webkit-scrollbar{display:none}._boxSummaryRow_p0w0a_582{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_p0w0a_590{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_p0w0a_599{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_p0w0a_611{cursor:pointer}._boxItemClickable_p0w0a_611:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_p0w0a_620{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_p0w0a_631{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_p0w0a_637{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_p0w0a_643{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_p0w0a_651{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_p0w0a_659{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_p0w0a_666{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_p0w0a_673{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_p0w0a_684{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_p0w0a_691{gap:0}._cta_p0w0a_684{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_p0w0a_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}._ctaDualLeft_p0w0a_719{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_p0w0a_737{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_p0w0a_737>span{opacity:0}._ctaDualRight_p0w0a_750{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_p0w0a_766{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_p0w0a_766>span{opacity:0}._ctaTotals_p0w0a_777{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_p0w0a_785{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_p0w0a_799{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_p0w0a_812{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_p0w0a_819{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_p0w0a_826{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_p0w0a_799{transition:none}}._cta_p0w0a_684:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_p0w0a_684:disabled{opacity:.6;cursor:not-allowed}._cta_p0w0a_684:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_p0w0a_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_p0w0a_707:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_p0w0a_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_p0w0a_719:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_p0w0a_719:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_p0w0a_719:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_p0w0a_750:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_p0w0a_750:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_p0w0a_750:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_p0w0a_895{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_p0w0a_1{padding:0;justify-content:stretch}._panel_p0w0a_82{width:100%;height:100%;border-radius:0}}._panel_gafs6_2 button,._panel_gafs6_2 input,._panel_gafs6_2 [role=button]{box-sizing:border-box;margin:0}._panel_gafs6_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_gafs6_20{text-align:start}._title_gafs6_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_gafs6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_gafs6_37{font-size:13px;color:#b91c1c;font-weight:600}._section_gafs6_43{display:grid;gap:6px}._sectionTitle_gafs6_48{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_gafs6_57{display:flex;justify-content:center;gap:6px}._rulesList_gafs6_63{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_gafs6_74{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_gafs6_86{font-weight:600;font-size:13px}._ruleDiscount_gafs6_91{font-weight:700;font-size:13px}._ruleLabel_gafs6_96{font-size:12px;opacity:.7}._rulesVisual_gafs6_101{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_gafs6_108,._rulesLinesRow_gafs6_115{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_gafs6_122{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_gafs6_122:empty{display:flex!important}._rulesLineLabel_gafs6_122{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_gafs6_139{height:1em}._rulesLine_gafs6_115{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_gafs6_115:empty{display:block!important}._rulesLineEmpty_gafs6_156{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_gafs6_160{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_gafs6_164{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_gafs6_172{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_gafs6_180{margin:0;padding:20px 16px;border-radius:var(--bb-border-radius, 12px);border:1px dashed var(--bb-border-color, rgba(15, 23, 42, .12));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));font-size:13px;line-height:1.5;text-align:center}._variantRow_gafs6_192{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_gafs6_204{cursor:pointer}._variantRowSelected_gafs6_208{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_gafs6_213{opacity:.65}._variantMedia_gafs6_217{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_gafs6_225{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_gafs6_233{display:flex;flex-direction:column;gap:4px}._variantTitle_gafs6_239{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_gafs6_245{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_gafs6_253{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_gafs6_261{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_gafs6_274{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_gafs6_279{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_gafs6_285{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_gafs6_292{display:grid;align-items:end;justify-items:end}._qtyActions_gafs6_298{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_gafs6_304{display:grid;justify-items:end;gap:4px}._variantUnavailable_gafs6_310{display:none}._qtyControls_gafs6_314{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_gafs6_324{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_gafs6_324:disabled{cursor:not-allowed;opacity:.4}._qtyButton_gafs6_324:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_gafs6_348{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_gafs6_355{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_gafs6_363{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_gafs6_372{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_gafs6_387{cursor:pointer}._qtyChipValue_gafs6_391{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_gafs6_397{margin-bottom:-3px;font-weight:500}._qtyChipClear_gafs6_402{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_gafs6_372:hover ._qtyChipClear_gafs6_402{background:#0f172a;color:#fff}._qtyChipClear_gafs6_402:disabled{cursor:not-allowed;opacity:.45}._qtyChip_gafs6_372:hover ._qtyChipClear_gafs6_402:disabled{background:#fff;color:#0f172a}._qtyTrash_gafs6_431{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_gafs6_443{display:grid;padding-top:6px}._boxSummaryWindow_gafs6_448{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_gafs6_448::-webkit-scrollbar{display:none}._boxSummaryRow_gafs6_462{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_gafs6_470{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_gafs6_479{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_gafs6_479:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_gafs6_496{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_gafs6_502{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_gafs6_508{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_gafs6_516{cursor:pointer}._boxItemClickable_gafs6_516:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_gafs6_525{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_gafs6_536{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_gafs6_549{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_gafs6_561{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_gafs6_574{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_gafs6_585{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_gafs6_593{max-height:80px;opacity:1}._ctaTotalsWrap_gafs6_598{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_gafs6_603{opacity:1}._ctaTotals_gafs6_598{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_gafs6_618{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_gafs6_629{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_gafs6_635{font-weight:700;color:#0f172a}._cta_gafs6_598{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_gafs6_598:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_gafs6_598:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_gafs6_667{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_gafs6_673,._ctaDualRight_gafs6_674{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_gafs6_673{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_gafs6_674{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_gafs6_673:disabled,._ctaDualRight_gafs6_674:disabled{cursor:not-allowed;opacity:.6}._poweredBy_gafs6_701{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_gafs6_701 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_gafs6_2{padding:16px}._variantRow_gafs6_192{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_gafs6_314{justify-self:start}._variantDetailsRow_gafs6_245{grid-template-columns:1fr}}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
import { jsx as l, jsxs as R, Fragment as kt } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import yt, { useCallback as J, useState as j, useRef as U, useEffect as O, useMemo as L, createContext as Gt, useContext as Qt, forwardRef as zt, createElement as Tt } from "react";
|
|
4
|
+
const pt = {
|
|
5
5
|
bundleId: "_bundle_id",
|
|
6
6
|
bundleConfig: "_bundle_config",
|
|
7
7
|
bundleSource: "_bundle_source",
|
|
@@ -10,32 +10,32 @@ const _t = {
|
|
|
10
10
|
async function Yt(n) {
|
|
11
11
|
const e = new URL("/api/public/bundle-configs-active", n.apiBaseUrl);
|
|
12
12
|
e.searchParams.set("shop", n.shop);
|
|
13
|
-
const
|
|
13
|
+
const r = await (await fetch(e, {
|
|
14
14
|
method: "GET",
|
|
15
15
|
signal: n.signal,
|
|
16
16
|
headers: { "Content-Type": "application/json" }
|
|
17
17
|
})).json().catch(() => null);
|
|
18
|
-
return !
|
|
18
|
+
return !r || typeof r != "object" ? { ok: !1, error: "Invalid response." } : r;
|
|
19
19
|
}
|
|
20
20
|
async function Kt(n) {
|
|
21
21
|
const e = new URL("/api/public/bundle-config", n.apiBaseUrl);
|
|
22
22
|
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle), n.fresh && e.searchParams.set("fresh", "1");
|
|
23
|
-
const
|
|
23
|
+
const r = await (await fetch(e, {
|
|
24
24
|
method: "GET",
|
|
25
25
|
signal: n.signal,
|
|
26
26
|
headers: { "Content-Type": "application/json" }
|
|
27
27
|
})).json().catch(() => null);
|
|
28
|
-
return !
|
|
28
|
+
return !r || typeof r != "object" ? { ok: !1, error: "Invalid response." } : r;
|
|
29
29
|
}
|
|
30
30
|
async function Xt(n) {
|
|
31
31
|
const e = new URL("/api/public/bundle-config-status", n.apiBaseUrl);
|
|
32
32
|
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle);
|
|
33
|
-
const
|
|
33
|
+
const r = await (await fetch(e, {
|
|
34
34
|
method: "GET",
|
|
35
35
|
signal: n.signal,
|
|
36
36
|
headers: { "Content-Type": "application/json" }
|
|
37
37
|
})).json().catch(() => null);
|
|
38
|
-
return !
|
|
38
|
+
return !r || typeof r != "object" ? { ok: !1, error: "Invalid response." } : r;
|
|
39
39
|
}
|
|
40
40
|
function xt(n) {
|
|
41
41
|
if (!n || n.availableForSale === !1) return 0;
|
|
@@ -44,7 +44,7 @@ function xt(n) {
|
|
|
44
44
|
return !Number.isFinite(e) || e <= 0 && n.availableForSale === !0 ? Number.POSITIVE_INFINITY : Math.max(0, Math.floor(e));
|
|
45
45
|
}
|
|
46
46
|
const Ft = "bb_anonymous_user_id";
|
|
47
|
-
function
|
|
47
|
+
function _t() {
|
|
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 {
|
|
@@ -69,9 +69,9 @@ function pt() {
|
|
|
69
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 r = new URL(n, window.location.origin);
|
|
73
|
+
r.searchParams.set("shop", e);
|
|
74
|
+
const i = await fetch(r, {
|
|
75
75
|
method: "POST",
|
|
76
76
|
headers: {
|
|
77
77
|
"Content-Type": "application/json"
|
|
@@ -84,14 +84,14 @@ async function lt(n, e, t) {
|
|
|
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 (r) {
|
|
88
|
+
console.warn("[Bundle Analytics] Failed to track event:", r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
const ft = {
|
|
92
92
|
"bundle.title.default": "Build your bundle",
|
|
93
93
|
"bundle.loading": "Loading...",
|
|
94
|
-
"bundle.
|
|
94
|
+
"bundle.empty": "Your selected eligible products for bundling will show here",
|
|
95
95
|
"bundle.drawer.aria": "Bundle builder",
|
|
96
96
|
"bundle.search": "Search",
|
|
97
97
|
"bundle.search.expanded": "Search (expanded)",
|
|
@@ -136,7 +136,7 @@ const ft = {
|
|
|
136
136
|
...ft,
|
|
137
137
|
"bundle.title.default": "Creez votre bundle",
|
|
138
138
|
"bundle.loading": "Chargement...",
|
|
139
|
-
"bundle.
|
|
139
|
+
"bundle.empty": "Vos produits eligibles selectionnes pour le bundle apparaitront ici",
|
|
140
140
|
"bundle.drawer.aria": "Constructeur de bundle",
|
|
141
141
|
"bundle.search": "Rechercher",
|
|
142
142
|
"bundle.search.expanded": "Rechercher (deplie)",
|
|
@@ -157,13 +157,14 @@ const ft = {
|
|
|
157
157
|
"bundle.cta.checkout": "Paiement",
|
|
158
158
|
"bundle.cta.add_to_bundle": "Ajouter",
|
|
159
159
|
"bundle.cta.add_to_basket": "Ajouter au panier",
|
|
160
|
+
"bundle.cta.add_more": "Ajoutez encore {{count}} {{productWord}}",
|
|
160
161
|
"bundle.powered_by": "propulse par",
|
|
161
162
|
"bundle.button.default": "Creer un bundle"
|
|
162
163
|
}, Jt = {
|
|
163
164
|
...ft,
|
|
164
165
|
"bundle.title.default": "Bundle erstellen",
|
|
165
166
|
"bundle.loading": "Wird geladen...",
|
|
166
|
-
"bundle.
|
|
167
|
+
"bundle.empty": "Ihre ausgewahlten bundelbaren Produkte werden hier angezeigt",
|
|
167
168
|
"bundle.drawer.aria": "Bundle-Builder",
|
|
168
169
|
"bundle.search": "Suchen",
|
|
169
170
|
"bundle.search.expanded": "Suche (erweitert)",
|
|
@@ -184,13 +185,14 @@ const ft = {
|
|
|
184
185
|
"bundle.cta.checkout": "Zur Kasse",
|
|
185
186
|
"bundle.cta.add_to_bundle": "Hinzufügen",
|
|
186
187
|
"bundle.cta.add_to_basket": "In den Warenkorb",
|
|
188
|
+
"bundle.cta.add_more": "Fuge noch {{count}} {{productWord}} hinzu",
|
|
187
189
|
"bundle.powered_by": "powered by",
|
|
188
190
|
"bundle.button.default": "Bundle erstellen"
|
|
189
191
|
}, en = {
|
|
190
192
|
...ft,
|
|
191
193
|
"bundle.title.default": "Crea tu bundle",
|
|
192
194
|
"bundle.loading": "Cargando...",
|
|
193
|
-
"bundle.
|
|
195
|
+
"bundle.empty": "Tus productos elegibles seleccionados para el bundle se mostraran aqui",
|
|
194
196
|
"bundle.drawer.aria": "Constructor de bundles",
|
|
195
197
|
"bundle.search": "Buscar",
|
|
196
198
|
"bundle.search.expanded": "Buscar (expandido)",
|
|
@@ -211,6 +213,7 @@ const ft = {
|
|
|
211
213
|
"bundle.cta.checkout": "Pagar",
|
|
212
214
|
"bundle.cta.add_to_bundle": "Agregar",
|
|
213
215
|
"bundle.cta.add_to_basket": "Agregar al carrito",
|
|
216
|
+
"bundle.cta.add_more": "Agrega {{count}} {{productWord}} mas",
|
|
214
217
|
"bundle.powered_by": "impulsado por",
|
|
215
218
|
"bundle.button.default": "Crear bundle"
|
|
216
219
|
}, tn = {
|
|
@@ -225,36 +228,36 @@ function nn(n) {
|
|
|
225
228
|
const t = e.split("-")[0] ?? "en";
|
|
226
229
|
return t === "fr" || t === "de" || t === "en" || t === "es" ? t : "en";
|
|
227
230
|
}
|
|
228
|
-
function
|
|
229
|
-
var
|
|
230
|
-
const i = (
|
|
231
|
-
return t ? Object.entries(t).reduce((
|
|
231
|
+
function an(n, e, t, r) {
|
|
232
|
+
var a;
|
|
233
|
+
const i = (r == null ? void 0 : r[e]) ?? ((a = tn[n]) == null ? void 0 : a[e]) ?? ft[e] ?? e;
|
|
234
|
+
return t ? Object.entries(t).reduce((m, [u, B]) => m.replaceAll(`{{${u}}}`, String(B)), i) : i;
|
|
232
235
|
}
|
|
233
236
|
function jt(n, e, t) {
|
|
234
|
-
const
|
|
235
|
-
if (!Number.isFinite(
|
|
237
|
+
const r = Number(n);
|
|
238
|
+
if (!Number.isFinite(r)) return String(n);
|
|
236
239
|
if (e)
|
|
237
240
|
try {
|
|
238
|
-
return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(
|
|
241
|
+
return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(r);
|
|
239
242
|
} catch {
|
|
240
243
|
}
|
|
241
|
-
return `$${
|
|
244
|
+
return `$${r.toFixed(2)}`;
|
|
242
245
|
}
|
|
243
246
|
function ct(n, e) {
|
|
244
247
|
const t = e === 1 ? "one" : "many";
|
|
245
248
|
return n === "fr" ? t === "one" ? "produit" : "produits" : n === "de" ? t === "one" ? "Produkt" : "Produkte" : n === "es" ? t === "one" ? "producto" : "productos" : t === "one" ? "product" : "products";
|
|
246
249
|
}
|
|
247
|
-
const Ut =
|
|
248
|
-
function
|
|
250
|
+
const Ut = Gt(null), ut = "#best-bundles", rn = [];
|
|
251
|
+
function Ge(n) {
|
|
249
252
|
const e = String(n ?? "").trim().toLowerCase();
|
|
250
253
|
return e && e.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
|
|
251
254
|
}
|
|
252
255
|
function Ot(n) {
|
|
253
256
|
const e = String(n ?? "").trim().toLowerCase();
|
|
254
|
-
if (!e.startsWith(
|
|
255
|
-
if (e ===
|
|
256
|
-
const t = `${
|
|
257
|
-
return e.startsWith(t) ?
|
|
257
|
+
if (!e.startsWith(ut)) return null;
|
|
258
|
+
if (e === ut) return "default";
|
|
259
|
+
const t = `${ut}:`;
|
|
260
|
+
return e.startsWith(t) ? Ge(e.slice(t.length)) : null;
|
|
258
261
|
}
|
|
259
262
|
const on = {
|
|
260
263
|
primaryColor: "--bb-cta-bg",
|
|
@@ -290,28 +293,28 @@ function sn(n) {
|
|
|
290
293
|
(u = document.getElementById(Ct)) == null || u.remove();
|
|
291
294
|
return;
|
|
292
295
|
}
|
|
293
|
-
const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""),
|
|
294
|
-
e &&
|
|
296
|
+
const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), r = [];
|
|
297
|
+
e && r.push("family=" + At(e)), t && t !== e && r.push("family=" + At(t));
|
|
295
298
|
const i = document.getElementById(Ct);
|
|
296
|
-
if (
|
|
299
|
+
if (r.length === 0) {
|
|
297
300
|
i == null || i.remove();
|
|
298
301
|
return;
|
|
299
302
|
}
|
|
300
|
-
const
|
|
303
|
+
const a = `https://fonts.googleapis.com/css2?${r.join("&")}&display=swap`;
|
|
301
304
|
if (i) {
|
|
302
|
-
i.getAttribute("href") !==
|
|
305
|
+
i.getAttribute("href") !== a && i.setAttribute("href", a);
|
|
303
306
|
return;
|
|
304
307
|
}
|
|
305
|
-
const
|
|
306
|
-
|
|
308
|
+
const m = document.createElement("link");
|
|
309
|
+
m.id = Ct, m.rel = "stylesheet", m.href = a, document.head.appendChild(m);
|
|
307
310
|
}
|
|
308
311
|
function Dt(n) {
|
|
309
312
|
if (!n) return;
|
|
310
313
|
sn(n);
|
|
311
314
|
const e = document.documentElement;
|
|
312
|
-
Object.entries(on).forEach(([t,
|
|
315
|
+
Object.entries(on).forEach(([t, r]) => {
|
|
313
316
|
let i = n[t];
|
|
314
|
-
i && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(i) && !/^["']/.test(i.trim()) && (i = `"${i.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(
|
|
317
|
+
i && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(i) && !/^["']/.test(i.trim()) && (i = `"${i.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(r, i));
|
|
315
318
|
});
|
|
316
319
|
}
|
|
317
320
|
function Et(n) {
|
|
@@ -327,69 +330,69 @@ function ln() {
|
|
|
327
330
|
}
|
|
328
331
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
329
332
|
}
|
|
330
|
-
function
|
|
333
|
+
function wt(n) {
|
|
331
334
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0;
|
|
332
335
|
}
|
|
333
336
|
function It(n, e) {
|
|
334
|
-
const t =
|
|
337
|
+
const t = wt(n);
|
|
335
338
|
return Number.isFinite(e) ? Math.min(t, Math.max(0, Math.floor(e))) : t;
|
|
336
339
|
}
|
|
337
340
|
function cn(n, e) {
|
|
338
341
|
return !n && !e;
|
|
339
342
|
}
|
|
340
|
-
function
|
|
343
|
+
function xi(n) {
|
|
341
344
|
const {
|
|
342
345
|
apiBaseUrl: e,
|
|
343
346
|
shop: t,
|
|
344
|
-
cartAdapter:
|
|
347
|
+
cartAdapter: r,
|
|
345
348
|
configHandle: i = "default",
|
|
346
|
-
initialData:
|
|
347
|
-
configFetcher:
|
|
349
|
+
initialData: a,
|
|
350
|
+
configFetcher: m,
|
|
348
351
|
activeConfigsFetcher: u,
|
|
349
352
|
configStatusFetcher: B,
|
|
350
353
|
analyticsEndpoint: le,
|
|
351
|
-
allowDrawerWhenInactive:
|
|
352
|
-
locale:
|
|
353
|
-
messages:
|
|
354
|
+
allowDrawerWhenInactive: D = !1,
|
|
355
|
+
locale: E,
|
|
356
|
+
messages: he,
|
|
354
357
|
children: F
|
|
355
|
-
} = n,
|
|
356
|
-
!H && !
|
|
357
|
-
), [nt,
|
|
358
|
+
} = n, ne = nn(E), V = J((o, s) => an(ne, o, s, he), [ne, he]), K = Ge(i), g = le ?? `${e}/api/public/bundle-analytics`, H = cn(D, a), [I, ce] = j(!1), [ke, Te] = j(!1), [ge, ee] = j(null), [X, ie] = j(!1), [me, Re] = j({}), [ae, Ce] = j(K), [be, Ae] = j(() => a ? { [K]: a } : {}), [we, Le] = j(H), [Ie, De] = j(
|
|
359
|
+
!H && !a ? K : null
|
|
360
|
+
), [nt, We] = j(null), [ze, Me] = j(null), [Ye, Ne] = j(
|
|
358
361
|
() => ({ selections: {}, order: [] })
|
|
359
|
-
),
|
|
360
|
-
if (typeof
|
|
361
|
-
const o = await
|
|
362
|
-
return Object.entries(o ?? {}).reduce((s, [
|
|
363
|
-
const y =
|
|
364
|
-
return y > 0 && (s[
|
|
362
|
+
), Ee = U(null), ye = U(null), f = U(null), _ = U(0), x = U(ae), T = U(be), M = U(we), q = U(null), W = m ?? Kt, Z = u ?? Yt, te = B ?? Xt, G = J(async () => {
|
|
363
|
+
if (typeof r.getLineQuantitiesByMerchandiseId != "function") return null;
|
|
364
|
+
const o = await r.getLineQuantitiesByMerchandiseId();
|
|
365
|
+
return Object.entries(o ?? {}).reduce((s, [h, w]) => {
|
|
366
|
+
const y = wt(w);
|
|
367
|
+
return y > 0 && (s[h] = y), s;
|
|
365
368
|
}, {});
|
|
366
|
-
}, [
|
|
367
|
-
const o = ++
|
|
369
|
+
}, [r]), A = J(async () => {
|
|
370
|
+
const o = ++_.current;
|
|
368
371
|
ie(!0);
|
|
369
372
|
try {
|
|
370
|
-
const s = await
|
|
371
|
-
return s && o ===
|
|
373
|
+
const s = await G();
|
|
374
|
+
return s && o === _.current && Re(s), s;
|
|
372
375
|
} catch {
|
|
373
376
|
return null;
|
|
374
377
|
} finally {
|
|
375
|
-
o ===
|
|
378
|
+
o === _.current && ie(!1);
|
|
376
379
|
}
|
|
377
|
-
}, [
|
|
380
|
+
}, [G]);
|
|
378
381
|
O(() => {
|
|
379
|
-
x.current =
|
|
380
|
-
}, [
|
|
382
|
+
x.current = ae;
|
|
383
|
+
}, [ae]), O(() => {
|
|
381
384
|
T.current = be;
|
|
382
385
|
}, [be]), O(() => {
|
|
383
|
-
M.current =
|
|
384
|
-
}, [
|
|
386
|
+
M.current = we;
|
|
387
|
+
}, [we]), O(() => {
|
|
385
388
|
A();
|
|
386
389
|
}, [A]);
|
|
387
|
-
const
|
|
388
|
-
Ce(
|
|
390
|
+
const $ = J((o) => {
|
|
391
|
+
Ce(Ge(o));
|
|
389
392
|
}, []), Se = J(() => {
|
|
390
393
|
if (g)
|
|
391
394
|
try {
|
|
392
|
-
const o =
|
|
395
|
+
const o = _t();
|
|
393
396
|
lt(g, t, {
|
|
394
397
|
eventType: "DRAWER_CLOSED",
|
|
395
398
|
shop: t,
|
|
@@ -402,107 +405,111 @@ function wi(n) {
|
|
|
402
405
|
} catch (o) {
|
|
403
406
|
console.warn("[Bundle Analytics] Error in close() callback:", o);
|
|
404
407
|
}
|
|
405
|
-
|
|
408
|
+
ce(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(ut) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
406
409
|
}, [g, t]), Pe = J(() => {
|
|
407
|
-
|
|
410
|
+
ce((o) => {
|
|
408
411
|
if (o) return o;
|
|
409
412
|
if (g)
|
|
410
413
|
try {
|
|
411
|
-
const s =
|
|
414
|
+
const s = _t();
|
|
412
415
|
lt(g, t, {
|
|
413
416
|
eventType: "DRAWER_OPENED",
|
|
414
417
|
shop: t,
|
|
415
418
|
anonymousUserId: s,
|
|
416
419
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
417
420
|
mixpanelEvent: "bundle_opened"
|
|
418
|
-
}).catch((
|
|
419
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
421
|
+
}).catch((h) => {
|
|
422
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", h);
|
|
420
423
|
});
|
|
421
424
|
} catch (s) {
|
|
422
425
|
console.warn("[Bundle Analytics] Error in open() callback:", s);
|
|
423
426
|
}
|
|
424
427
|
return !0;
|
|
425
428
|
});
|
|
426
|
-
}, [g, t]),
|
|
427
|
-
if (!
|
|
428
|
-
const w = { ...
|
|
429
|
+
}, [g, t]), at = J((o, s) => s.ok ? s.config.isActive === !1 && !D ? (Ae((h) => {
|
|
430
|
+
if (!h[o]) return h;
|
|
431
|
+
const w = { ...h };
|
|
429
432
|
return delete w[o], w;
|
|
430
|
-
}),
|
|
431
|
-
...
|
|
433
|
+
}), x.current === o && (ee(V("bundle.provider.inactive_error")), ce(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(ut) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1) : (Ae((h) => ({
|
|
434
|
+
...h,
|
|
432
435
|
[o]: {
|
|
433
436
|
currencyCode: s.currencyCode ?? null,
|
|
434
437
|
config: s.config,
|
|
435
438
|
eligibleVariants: s.eligibleVariants ?? []
|
|
436
439
|
}
|
|
437
|
-
})), x.current === o &&
|
|
440
|
+
})), x.current === o && ee(null), !0) : (Ae((h) => {
|
|
441
|
+
if (!h[o]) return h;
|
|
442
|
+
const w = { ...h };
|
|
443
|
+
return delete w[o], w;
|
|
444
|
+
}), !D && x.current === o && (ee(s.ok ? V("bundle.provider.inactive_error") : s.error || V("bundle.provider.load_error")), ce(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(ut) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1), [D, V]), Fe = J((o, s) => {
|
|
438
445
|
var y;
|
|
439
|
-
const
|
|
440
|
-
(y =
|
|
446
|
+
const h = Ge(o);
|
|
447
|
+
(y = ye.current) == null || y.abort();
|
|
441
448
|
const w = new AbortController();
|
|
442
|
-
|
|
449
|
+
ye.current = w, s != null && s.blocking && De(h), ee(null), W({
|
|
443
450
|
apiBaseUrl: e,
|
|
444
451
|
shop: t,
|
|
445
|
-
configHandle:
|
|
446
|
-
fresh: (s == null ? void 0 : s.blocking) === !0 && !T.current[
|
|
452
|
+
configHandle: h,
|
|
453
|
+
fresh: (s == null ? void 0 : s.blocking) === !0 && !T.current[h],
|
|
447
454
|
signal: w.signal
|
|
448
455
|
}).then((C) => {
|
|
449
|
-
w.signal.aborted ||
|
|
456
|
+
w.signal.aborted || at(h, C);
|
|
450
457
|
}).catch((C) => {
|
|
451
458
|
if (w.signal.aborted) return;
|
|
452
|
-
const
|
|
453
|
-
x.current ===
|
|
459
|
+
const S = C instanceof Error ? C.message : V("bundle.provider.load_error");
|
|
460
|
+
x.current === h && ee(S);
|
|
454
461
|
}).finally(() => {
|
|
455
|
-
w.signal.aborted ||
|
|
462
|
+
w.signal.aborted || De((C) => C === h ? null : C);
|
|
456
463
|
});
|
|
457
|
-
}, [e,
|
|
458
|
-
const s =
|
|
459
|
-
Ce(s),
|
|
464
|
+
}, [e, at, W, t, V]), re = J((o) => {
|
|
465
|
+
const s = Ge(o), h = T.current[s];
|
|
466
|
+
Ce(s), ee(null), Fe(s, { blocking: !h });
|
|
460
467
|
}, [Fe]), z = J((o, s = "api") => {
|
|
461
|
-
var C,
|
|
462
|
-
const
|
|
468
|
+
var C, S;
|
|
469
|
+
const h = Ge(o), w = T.current[h];
|
|
463
470
|
if (H && M.current && !w) {
|
|
464
|
-
Me({ handle:
|
|
471
|
+
Me({ handle: h, source: s });
|
|
465
472
|
return;
|
|
466
473
|
}
|
|
467
|
-
if (Ce(
|
|
468
|
-
Pe(), Fe(
|
|
474
|
+
if (Ce(h), D) {
|
|
475
|
+
Pe(), Fe(h, { blocking: !w });
|
|
469
476
|
return;
|
|
470
477
|
}
|
|
471
478
|
if ((C = w == null ? void 0 : w.config) != null && C.isActive) {
|
|
472
|
-
|
|
479
|
+
ee(null), Pe(), Fe(h, { blocking: !1 });
|
|
473
480
|
return;
|
|
474
481
|
}
|
|
475
|
-
|
|
482
|
+
We(h), (S = f.current) == null || S.abort();
|
|
476
483
|
const y = new AbortController();
|
|
477
|
-
f.current = y,
|
|
484
|
+
f.current = y, te({
|
|
478
485
|
apiBaseUrl: e,
|
|
479
486
|
shop: t,
|
|
480
|
-
configHandle:
|
|
487
|
+
configHandle: h,
|
|
481
488
|
signal: y.signal
|
|
482
489
|
}).then((P) => {
|
|
483
490
|
if (!y.signal.aborted) {
|
|
484
|
-
if (
|
|
485
|
-
s === "hash" && typeof window < "u" && Ot(window.location.hash) ===
|
|
491
|
+
if (We((Q) => Q === h ? null : Q), !P.ok || P.isActive !== !0) {
|
|
492
|
+
s === "hash" && typeof window < "u" && Ot(window.location.hash) === h && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
486
493
|
return;
|
|
487
494
|
}
|
|
488
|
-
|
|
495
|
+
ee(null), Ce(h), Pe(), Fe(h, { blocking: !0 });
|
|
489
496
|
}
|
|
490
497
|
}).catch(() => {
|
|
491
|
-
y.signal.aborted ||
|
|
498
|
+
y.signal.aborted || We((P) => P === h ? null : P);
|
|
492
499
|
});
|
|
493
500
|
}, [
|
|
494
|
-
|
|
501
|
+
D,
|
|
495
502
|
e,
|
|
496
503
|
Pe,
|
|
497
504
|
Fe,
|
|
498
505
|
t,
|
|
499
|
-
|
|
506
|
+
te,
|
|
500
507
|
H
|
|
501
|
-
]),
|
|
508
|
+
]), rt = J(() => {
|
|
502
509
|
A(), z(x.current, "api");
|
|
503
510
|
}, [z, A]);
|
|
504
511
|
O(() => {
|
|
505
|
-
|
|
512
|
+
q.current = z;
|
|
506
513
|
}, [z]);
|
|
507
514
|
const Oe = J(() => {
|
|
508
515
|
if (I) {
|
|
@@ -512,23 +519,23 @@ function wi(n) {
|
|
|
512
519
|
A(), z(x.current, "api");
|
|
513
520
|
}, [Se, I, z, A]);
|
|
514
521
|
O(() => {
|
|
515
|
-
Ce(
|
|
522
|
+
Ce(Ge(i));
|
|
516
523
|
}, [i]), O(() => {
|
|
517
524
|
var s;
|
|
518
525
|
if (!H) {
|
|
519
|
-
Le(!1),
|
|
526
|
+
Le(!1), a || Fe(K, { blocking: !0 });
|
|
520
527
|
return;
|
|
521
528
|
}
|
|
522
|
-
(s =
|
|
529
|
+
(s = Ee.current) == null || s.abort();
|
|
523
530
|
const o = new AbortController();
|
|
524
|
-
return
|
|
525
|
-
o.signal.aborted ||
|
|
531
|
+
return Ee.current = o, Le(!0), Z({ apiBaseUrl: e, shop: t, signal: o.signal }).then((h) => {
|
|
532
|
+
o.signal.aborted || h.ok && Ae((w) => {
|
|
526
533
|
const y = { ...w };
|
|
527
|
-
for (const [C,
|
|
528
|
-
y[
|
|
529
|
-
currencyCode:
|
|
530
|
-
config:
|
|
531
|
-
eligibleVariants:
|
|
534
|
+
for (const [C, S] of Object.entries(h.configs ?? {}))
|
|
535
|
+
y[Ge(C)] = {
|
|
536
|
+
currencyCode: S.currencyCode ?? null,
|
|
537
|
+
config: S.config,
|
|
538
|
+
eligibleVariants: S.eligibleVariants ?? []
|
|
532
539
|
};
|
|
533
540
|
return y;
|
|
534
541
|
});
|
|
@@ -536,18 +543,18 @@ function wi(n) {
|
|
|
536
543
|
}).finally(() => {
|
|
537
544
|
o.signal.aborted || Le(!1);
|
|
538
545
|
}), () => o.abort();
|
|
539
|
-
}, [Z, e,
|
|
540
|
-
|
|
541
|
-
}, [
|
|
546
|
+
}, [Z, e, a, K, Fe, t, H]), O(() => {
|
|
547
|
+
we || !ze || (z(ze.handle, ze.source), Me(null));
|
|
548
|
+
}, [we, z, ze]), O(() => {
|
|
542
549
|
if (typeof window > "u") return;
|
|
543
550
|
const o = () => {
|
|
544
|
-
var
|
|
551
|
+
var h;
|
|
545
552
|
const s = Ot(window.location.hash);
|
|
546
|
-
s && ((
|
|
553
|
+
s && ((h = q.current) == null || h.call(q, s, "hash"));
|
|
547
554
|
};
|
|
548
555
|
return o(), window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
|
|
549
556
|
}, []);
|
|
550
|
-
const
|
|
557
|
+
const ve = be[ae] ?? null, N = (ve == null ? void 0 : ve.config) ?? null, oe = (ve == null ? void 0 : ve.eligibleVariants) ?? rn, je = (ve == null ? void 0 : ve.currencyCode) ?? null, xe = !N && (Ie === ae || nt === ae) || D && !N && Ie != null;
|
|
551
558
|
O(() => {
|
|
552
559
|
const o = Et(N == null ? void 0 : N.styleSettings);
|
|
553
560
|
o && Dt(o);
|
|
@@ -561,20 +568,20 @@ function wi(n) {
|
|
|
561
568
|
}, []), O(() => {
|
|
562
569
|
if (typeof window > "u") return;
|
|
563
570
|
const o = window, s = () => {
|
|
564
|
-
const
|
|
565
|
-
if (!
|
|
566
|
-
const w = o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__
|
|
567
|
-
|
|
568
|
-
var
|
|
571
|
+
const h = o.__BUNDLE_PREVIEW_CONFIG__;
|
|
572
|
+
if (!h) return;
|
|
573
|
+
const w = Array.isArray(o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__) ? o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__ : [], y = o.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
|
|
574
|
+
Ae((C) => {
|
|
575
|
+
var S;
|
|
569
576
|
return {
|
|
570
|
-
...
|
|
577
|
+
...C,
|
|
571
578
|
[x.current]: {
|
|
572
579
|
currencyCode: je ?? null,
|
|
573
|
-
config:
|
|
574
|
-
eligibleVariants:
|
|
580
|
+
config: h,
|
|
581
|
+
eligibleVariants: y ? ((S = C[x.current]) == null ? void 0 : S.eligibleVariants) ?? [] : w
|
|
575
582
|
}
|
|
576
583
|
};
|
|
577
|
-
}),
|
|
584
|
+
}), De(y ? x.current : (C) => C === x.current ? null : C);
|
|
578
585
|
};
|
|
579
586
|
return o.__BUNDLE_PREVIEW_CONFIG__ && s(), window.addEventListener("bundle-preview-config-updated", s), () => window.removeEventListener("bundle-preview-config-updated", s);
|
|
580
587
|
}, [je]);
|
|
@@ -585,269 +592,269 @@ function wi(n) {
|
|
|
585
592
|
oe.map((o) => {
|
|
586
593
|
const s = xt(o);
|
|
587
594
|
if (!Number.isFinite(s)) return [o.id, s];
|
|
588
|
-
const
|
|
589
|
-
return [o.id, Math.max(0, Math.floor(s) -
|
|
595
|
+
const h = wt(me[o.id] ?? 0);
|
|
596
|
+
return [o.id, Math.max(0, Math.floor(s) - h)];
|
|
590
597
|
})
|
|
591
598
|
), [oe, me]), He = L(() => new Set(
|
|
592
599
|
oe.filter((o) => xt(o) > 0).map((o) => o.id)
|
|
593
600
|
), [oe]), Be = L(() => {
|
|
594
|
-
const o = (N == null ? void 0 : N.rules) ?? [], s = o.length ? Math.min(...o.map((C) => C.minBundleSize)) : 2,
|
|
595
|
-
return y == null ?
|
|
596
|
-
}, [N == null ? void 0 : N.minBundleSize, N == null ? void 0 : N.rules]),
|
|
601
|
+
const o = (N == null ? void 0 : N.rules) ?? [], s = o.length ? Math.min(...o.map((C) => C.minBundleSize)) : 2, h = 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;
|
|
602
|
+
return y == null ? h : Math.min(h, y);
|
|
603
|
+
}, [N == null ? void 0 : N.minBundleSize, N == null ? void 0 : N.rules]), dt = J((o, s) => {
|
|
597
604
|
if (X || !He.has(o) && !xe)
|
|
598
605
|
return;
|
|
599
|
-
const
|
|
606
|
+
const h = Ue.get(o) ?? (xe ? Number.POSITIVE_INFINITY : 0), w = It(s, h);
|
|
600
607
|
Ne((y) => {
|
|
601
|
-
const C = y.selections[o] ?? 0,
|
|
602
|
-
|
|
608
|
+
const C = y.selections[o] ?? 0, S = w - C, P = Object.values(y.selections).reduce((pe, de) => pe + (de || 0), 0), Q = Number.isFinite(h) ? Math.max(0, Math.floor(h) - C) : S, Y = S > 0 ? Math.min(
|
|
609
|
+
S,
|
|
603
610
|
Math.max(0, it - P),
|
|
604
|
-
|
|
605
|
-
) :
|
|
611
|
+
Q
|
|
612
|
+
) : S, ue = C + Y;
|
|
606
613
|
let fe;
|
|
607
|
-
if (
|
|
608
|
-
const
|
|
609
|
-
delete
|
|
610
|
-
} else C ===
|
|
611
|
-
let
|
|
614
|
+
if (ue <= 0) {
|
|
615
|
+
const pe = { ...y.selections };
|
|
616
|
+
delete pe[o], fe = pe;
|
|
617
|
+
} else C === ue ? fe = y.selections : fe = { ...y.selections, [o]: ue };
|
|
618
|
+
let Ve = y.order;
|
|
612
619
|
if (Y > 0)
|
|
613
|
-
|
|
620
|
+
Ve = [...y.order, ...Array.from({ length: Y }, () => o)];
|
|
614
621
|
else if (Y < 0) {
|
|
615
|
-
let
|
|
616
|
-
const
|
|
622
|
+
let pe = -Y;
|
|
623
|
+
const de = [];
|
|
617
624
|
for (let st = y.order.length - 1; st >= 0; st--) {
|
|
618
|
-
const
|
|
619
|
-
if (
|
|
620
|
-
|
|
625
|
+
const k = y.order[st];
|
|
626
|
+
if (k === o && pe > 0) {
|
|
627
|
+
pe--;
|
|
621
628
|
continue;
|
|
622
629
|
}
|
|
623
|
-
|
|
630
|
+
de.push(k);
|
|
624
631
|
}
|
|
625
|
-
|
|
632
|
+
de.reverse(), Ve = de;
|
|
626
633
|
}
|
|
627
|
-
if (fe === y.selections &&
|
|
628
|
-
const Je = P, et = Object.values(fe).reduce((
|
|
634
|
+
if (fe === y.selections && Ve === y.order) return y;
|
|
635
|
+
const Je = P, et = Object.values(fe).reduce((pe, de) => pe + (de || 0), 0);
|
|
629
636
|
if (g)
|
|
630
637
|
try {
|
|
631
|
-
const
|
|
638
|
+
const pe = _t(), de = {
|
|
632
639
|
eventType: "VARIANT_SELECTION_CHANGED",
|
|
633
640
|
shop: t,
|
|
634
|
-
anonymousUserId:
|
|
641
|
+
anonymousUserId: pe,
|
|
635
642
|
before: { ...y.selections },
|
|
636
643
|
after: { ...fe },
|
|
637
644
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
638
645
|
};
|
|
639
|
-
lt(g, t,
|
|
640
|
-
...
|
|
646
|
+
lt(g, t, de), Je === 0 && et >= 1 && lt(g, t, {
|
|
647
|
+
...de,
|
|
641
648
|
mixpanelEvent: "bundle_started"
|
|
642
649
|
}), Je < Be && et >= Be && lt(g, t, {
|
|
643
|
-
...
|
|
650
|
+
...de,
|
|
644
651
|
mixpanelEvent: "bundle_completed"
|
|
645
652
|
});
|
|
646
653
|
} catch {
|
|
647
654
|
}
|
|
648
|
-
return { selections: fe, order:
|
|
655
|
+
return { selections: fe, order: Ve };
|
|
649
656
|
});
|
|
650
657
|
}, [g, X, He, xe, it, Be, t, Ue]);
|
|
651
658
|
O(() => {
|
|
652
659
|
xe || Ne((o) => {
|
|
653
|
-
const s = Object.entries(o.selections).map(([C,
|
|
660
|
+
const s = Object.entries(o.selections).map(([C, S]) => {
|
|
654
661
|
if (!He.has(C)) return null;
|
|
655
|
-
const P = Ue.get(C) ?? 0,
|
|
656
|
-
return
|
|
657
|
-
}).filter(Boolean),
|
|
658
|
-
const
|
|
659
|
-
return
|
|
662
|
+
const P = Ue.get(C) ?? 0, Q = It(S, P);
|
|
663
|
+
return Q <= 0 ? null : [C, Q];
|
|
664
|
+
}).filter(Boolean), h = Object.fromEntries(s), w = new Map(s), y = o.order.filter((C) => {
|
|
665
|
+
const S = w.get(C) ?? 0;
|
|
666
|
+
return S <= 0 ? !1 : (w.set(C, S - 1), !0);
|
|
660
667
|
});
|
|
661
|
-
return y.length === o.order.length && s.length === Object.keys(o.selections).length && s.every(([C,
|
|
668
|
+
return y.length === o.order.length && s.length === Object.keys(o.selections).length && s.every(([C, S]) => o.selections[C] === S) ? o : { selections: h, order: y };
|
|
662
669
|
});
|
|
663
670
|
}, [He, xe, Ue]), O(() => {
|
|
664
671
|
Ne({ selections: {}, order: [] });
|
|
665
|
-
}, [
|
|
672
|
+
}, [ae]);
|
|
666
673
|
const Ke = J(() => Ne({ selections: {}, order: [] }), []), ot = J(async () => {
|
|
667
674
|
await A();
|
|
668
|
-
}, [A]),
|
|
675
|
+
}, [A]), ht = J((o) => {
|
|
669
676
|
const s = Ue.get(o);
|
|
670
677
|
return s == null || !Number.isFinite(s) ? null : Math.max(0, Math.floor(s));
|
|
671
|
-
}, [Ue]),
|
|
672
|
-
var
|
|
678
|
+
}, [Ue]), qe = Ye.selections, mt = Ye.order, $e = L(() => Object.values(qe).reduce((o, s) => o + (s || 0), 0), [qe]), Xe = L(() => !(xe || X || ke || ge || !(N != null && N.isActive) || $e < Be), [$e, X, N == null ? void 0 : N.isActive, ge, xe, Be, ke]), Ze = J(async (o) => {
|
|
679
|
+
var de, st;
|
|
673
680
|
if (!Xe || !N) return;
|
|
674
|
-
const s = ln(),
|
|
675
|
-
oe.map((
|
|
676
|
-
const se = xt(
|
|
677
|
-
if (!Number.isFinite(se)) return [
|
|
678
|
-
const tt =
|
|
679
|
-
return [
|
|
681
|
+
const s = ln(), h = (N.title ?? "").trim().slice(0, 255), w = await A(), y = new Map(
|
|
682
|
+
oe.map((k) => {
|
|
683
|
+
const se = xt(k);
|
|
684
|
+
if (!Number.isFinite(se)) return [k.id, se];
|
|
685
|
+
const tt = wt((w ?? me)[k.id] ?? 0);
|
|
686
|
+
return [k.id, Math.max(0, Math.floor(se) - tt)];
|
|
680
687
|
})
|
|
681
|
-
), C = Object.entries(
|
|
682
|
-
merchandiseId:
|
|
683
|
-
quantity: It(se, y.get(
|
|
684
|
-
})).filter((
|
|
685
|
-
merchandiseId:
|
|
686
|
-
quantity:
|
|
688
|
+
), C = Object.entries(qe).map(([k, se]) => ({
|
|
689
|
+
merchandiseId: k,
|
|
690
|
+
quantity: It(se, y.get(k) ?? 0)
|
|
691
|
+
})).filter((k) => k.quantity > 0).filter((k) => He.has(k.merchandiseId)).map((k) => ({
|
|
692
|
+
merchandiseId: k.merchandiseId,
|
|
693
|
+
quantity: k.quantity,
|
|
687
694
|
attributes: [
|
|
688
|
-
{ key:
|
|
689
|
-
{ key:
|
|
690
|
-
{ key:
|
|
691
|
-
...
|
|
695
|
+
{ key: pt.bundleId, value: s },
|
|
696
|
+
{ key: pt.bundleConfig, value: ae },
|
|
697
|
+
{ key: pt.bundleSource, value: "bundle_builder" },
|
|
698
|
+
...h ? [{ key: pt.bundleTitle, value: h }] : []
|
|
692
699
|
]
|
|
693
700
|
}));
|
|
694
701
|
if (!C.length) return;
|
|
695
|
-
const
|
|
702
|
+
const S = new Map(oe.map((k) => [k.id, k]));
|
|
696
703
|
let P = 0;
|
|
697
|
-
for (const
|
|
698
|
-
const se =
|
|
704
|
+
for (const k of C) {
|
|
705
|
+
const se = k.quantity ?? 0;
|
|
699
706
|
if (se <= 0) continue;
|
|
700
|
-
const tt =
|
|
707
|
+
const tt = S.get(k.merchandiseId), Pt = Number(tt == null ? void 0 : tt.price);
|
|
701
708
|
Number.isFinite(Pt) && (P += Pt * se);
|
|
702
709
|
}
|
|
703
710
|
P = Math.round(P * 100) / 100;
|
|
704
|
-
const
|
|
711
|
+
const Q = [...N.rules ?? []].sort((k, se) => k.minBundleSize - se.minBundleSize);
|
|
705
712
|
let Y = null;
|
|
706
|
-
for (const
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
const
|
|
710
|
-
return Number.isFinite(
|
|
711
|
-
})() : null, fe =
|
|
713
|
+
for (const k of Q)
|
|
714
|
+
$e >= k.minBundleSize && (Y = k);
|
|
715
|
+
const ue = Y ? (() => {
|
|
716
|
+
const k = Number.parseFloat(Y.discountPercent);
|
|
717
|
+
return Number.isFinite(k) && k > 0 ? k : null;
|
|
718
|
+
})() : null, fe = ue ? Math.round(P * (1 - ue / 100) * 100) / 100 : P, Ve = P - fe, Je = C.map((k) => k.merchandiseId), et = (Y == null ? void 0 : Y.handle) ?? "", pe = ((de = Y == null ? void 0 : Y.label) == null ? void 0 : de.trim()) || "";
|
|
712
719
|
Te(!0);
|
|
713
720
|
try {
|
|
714
|
-
if (o != null && o.checkout ? await
|
|
721
|
+
if (o != null && o.checkout ? await r.linesAddForCheckout(C) : await r.linesAdd(C), g)
|
|
715
722
|
try {
|
|
716
|
-
const
|
|
723
|
+
const k = _t(), se = !!(o != null && o.checkout);
|
|
717
724
|
lt(g, t, {
|
|
718
725
|
eventType: "BUNDLE_ADDED_TO_BASKET",
|
|
719
726
|
shop: t,
|
|
720
|
-
anonymousUserId:
|
|
727
|
+
anonymousUserId: k,
|
|
721
728
|
bundleId: s,
|
|
722
729
|
productVariantIds: Je,
|
|
723
730
|
grossPrice: P,
|
|
724
731
|
discountedPrice: fe,
|
|
725
732
|
currency: je ?? void 0,
|
|
726
733
|
discountThresholdIdentifier: et,
|
|
727
|
-
discountLabel:
|
|
728
|
-
discountPercentage:
|
|
729
|
-
discountedAmount:
|
|
734
|
+
discountLabel: pe,
|
|
735
|
+
discountPercentage: ue,
|
|
736
|
+
discountedAmount: Ve,
|
|
730
737
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
731
738
|
checkout: se,
|
|
732
739
|
mixpanelEvent: se ? "checkout_started_with_bundle" : "bundle_added_to_cart"
|
|
733
740
|
});
|
|
734
741
|
} catch {
|
|
735
742
|
}
|
|
736
|
-
Ke(), Se(), A(), (st = o == null ? void 0 : o.onComplete) == null || st.call(o),
|
|
737
|
-
} catch (
|
|
738
|
-
const se =
|
|
739
|
-
|
|
740
|
-
|
|
743
|
+
Ke(), Se(), A(), (st = o == null ? void 0 : o.onComplete) == null || st.call(o), ee(null);
|
|
744
|
+
} catch (k) {
|
|
745
|
+
const se = k instanceof Error ? k.message : "", tt = /stock|sold out|inventory|insufficient|available|422/i.test(se);
|
|
746
|
+
ee(
|
|
747
|
+
V(tt ? "bundle.provider.stock_error" : "bundle.provider.add_error")
|
|
741
748
|
), A();
|
|
742
749
|
} finally {
|
|
743
750
|
Te(!1);
|
|
744
751
|
}
|
|
745
752
|
}, [
|
|
746
753
|
g,
|
|
747
|
-
|
|
754
|
+
$e,
|
|
748
755
|
Xe,
|
|
749
|
-
|
|
756
|
+
r,
|
|
750
757
|
Ke,
|
|
751
758
|
Se,
|
|
752
759
|
N,
|
|
753
760
|
je,
|
|
754
761
|
me,
|
|
755
|
-
|
|
762
|
+
ae,
|
|
756
763
|
He,
|
|
757
764
|
oe,
|
|
758
765
|
A,
|
|
759
|
-
|
|
766
|
+
qe,
|
|
760
767
|
t,
|
|
761
|
-
|
|
768
|
+
V
|
|
762
769
|
]), c = J(async () => {
|
|
763
770
|
await Ze({
|
|
764
771
|
onComplete: () => {
|
|
765
772
|
var o;
|
|
766
|
-
(o =
|
|
773
|
+
(o = r.openCartUI) == null || o.call(r);
|
|
767
774
|
}
|
|
768
775
|
});
|
|
769
|
-
}, [
|
|
776
|
+
}, [r, Ze]), d = J(async () => {
|
|
770
777
|
await Ze({
|
|
771
778
|
checkout: !0,
|
|
772
779
|
onComplete: () => {
|
|
773
780
|
var o;
|
|
774
|
-
(o =
|
|
781
|
+
(o = r.navigateToCheckout) == null || o.call(r);
|
|
775
782
|
}
|
|
776
783
|
});
|
|
777
|
-
}, [
|
|
784
|
+
}, [r, Ze]), v = L(() => ({
|
|
778
785
|
isOpen: I,
|
|
779
|
-
open:
|
|
786
|
+
open: rt,
|
|
780
787
|
openForHandle: z,
|
|
781
788
|
close: Se,
|
|
782
789
|
toggle: Oe,
|
|
783
|
-
currentHandle:
|
|
784
|
-
setConfigHandle:
|
|
790
|
+
currentHandle: ae,
|
|
791
|
+
setConfigHandle: $,
|
|
785
792
|
loadHandle: re,
|
|
786
793
|
syncCartQuantities: ot,
|
|
787
794
|
loading: xe,
|
|
788
795
|
submitting: ke,
|
|
789
|
-
error:
|
|
796
|
+
error: ge,
|
|
790
797
|
currencyCode: je,
|
|
791
798
|
config: N,
|
|
792
799
|
eligibleVariants: oe,
|
|
793
|
-
selections:
|
|
794
|
-
selectionOrder:
|
|
795
|
-
getVariantMaxSelectableQuantity:
|
|
796
|
-
setQuantity:
|
|
800
|
+
selections: qe,
|
|
801
|
+
selectionOrder: mt,
|
|
802
|
+
getVariantMaxSelectableQuantity: ht,
|
|
803
|
+
setQuantity: dt,
|
|
797
804
|
clearSelections: Ke,
|
|
798
|
-
bundleSize:
|
|
805
|
+
bundleSize: $e,
|
|
799
806
|
minRequired: Be,
|
|
800
807
|
canSubmit: Xe,
|
|
801
808
|
submit: c,
|
|
802
809
|
submitAndCheckout: d,
|
|
803
|
-
locale:
|
|
804
|
-
t:
|
|
810
|
+
locale: ne,
|
|
811
|
+
t: V
|
|
805
812
|
}), [
|
|
806
|
-
|
|
813
|
+
$e,
|
|
807
814
|
Xe,
|
|
808
815
|
Ke,
|
|
809
816
|
Se,
|
|
810
817
|
N,
|
|
811
818
|
je,
|
|
812
|
-
|
|
819
|
+
ae,
|
|
813
820
|
oe,
|
|
814
|
-
|
|
821
|
+
ge,
|
|
815
822
|
I,
|
|
816
823
|
xe,
|
|
817
824
|
Be,
|
|
818
|
-
|
|
825
|
+
rt,
|
|
819
826
|
z,
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
827
|
+
mt,
|
|
828
|
+
qe,
|
|
829
|
+
$,
|
|
823
830
|
re,
|
|
824
831
|
ot,
|
|
832
|
+
ht,
|
|
825
833
|
dt,
|
|
826
|
-
ut,
|
|
827
834
|
c,
|
|
828
835
|
d,
|
|
829
836
|
ke,
|
|
830
837
|
Oe,
|
|
831
|
-
|
|
832
|
-
|
|
838
|
+
ne,
|
|
839
|
+
V
|
|
833
840
|
]);
|
|
834
841
|
return /* @__PURE__ */ l(Ut.Provider, { value: v, children: F });
|
|
835
842
|
}
|
|
836
|
-
function
|
|
837
|
-
const n =
|
|
843
|
+
function vt() {
|
|
844
|
+
const n = Qt(Ut);
|
|
838
845
|
if (!n)
|
|
839
846
|
throw new Error("useBundleBuilder must be used within <BundleProvider />");
|
|
840
847
|
return n;
|
|
841
848
|
}
|
|
842
|
-
function
|
|
843
|
-
const { isOpen: n, open: e, close: t, toggle:
|
|
844
|
-
return { isOpen: n, open: e, close: t, toggle:
|
|
849
|
+
function Ci() {
|
|
850
|
+
const { isOpen: n, open: e, close: t, toggle: r } = vt();
|
|
851
|
+
return { isOpen: n, open: e, close: t, toggle: r };
|
|
845
852
|
}
|
|
846
853
|
const un = "_button_18rtl_1", dn = {
|
|
847
854
|
button: un
|
|
848
855
|
};
|
|
849
|
-
function
|
|
850
|
-
const { toggle: e, t } =
|
|
856
|
+
function Ii(n) {
|
|
857
|
+
const { toggle: e, t } = vt();
|
|
851
858
|
return /* @__PURE__ */ l(
|
|
852
859
|
"button",
|
|
853
860
|
{
|
|
@@ -863,129 +870,129 @@ function hn() {
|
|
|
863
870
|
if (qt) return Nt;
|
|
864
871
|
qt = 1;
|
|
865
872
|
var n = {
|
|
866
|
-
linear: function(e, t,
|
|
867
|
-
var
|
|
868
|
-
return
|
|
873
|
+
linear: function(e, t, r, i) {
|
|
874
|
+
var a = r - t;
|
|
875
|
+
return a * e / i + t;
|
|
869
876
|
},
|
|
870
|
-
easeInQuad: function(e, t,
|
|
871
|
-
var
|
|
872
|
-
return
|
|
877
|
+
easeInQuad: function(e, t, r, i) {
|
|
878
|
+
var a = r - t;
|
|
879
|
+
return a * (e /= i) * e + t;
|
|
873
880
|
},
|
|
874
|
-
easeOutQuad: function(e, t,
|
|
875
|
-
var
|
|
876
|
-
return -
|
|
881
|
+
easeOutQuad: function(e, t, r, i) {
|
|
882
|
+
var a = r - t;
|
|
883
|
+
return -a * (e /= i) * (e - 2) + t;
|
|
877
884
|
},
|
|
878
|
-
easeInOutQuad: function(e, t,
|
|
879
|
-
var
|
|
880
|
-
return (e /= i / 2) < 1 ?
|
|
885
|
+
easeInOutQuad: function(e, t, r, i) {
|
|
886
|
+
var a = r - t;
|
|
887
|
+
return (e /= i / 2) < 1 ? a / 2 * e * e + t : -a / 2 * (--e * (e - 2) - 1) + t;
|
|
881
888
|
},
|
|
882
|
-
easeInCubic: function(e, t,
|
|
883
|
-
var
|
|
884
|
-
return
|
|
889
|
+
easeInCubic: function(e, t, r, i) {
|
|
890
|
+
var a = r - t;
|
|
891
|
+
return a * (e /= i) * e * e + t;
|
|
885
892
|
},
|
|
886
|
-
easeOutCubic: function(e, t,
|
|
887
|
-
var
|
|
888
|
-
return
|
|
893
|
+
easeOutCubic: function(e, t, r, i) {
|
|
894
|
+
var a = r - t;
|
|
895
|
+
return a * ((e = e / i - 1) * e * e + 1) + t;
|
|
889
896
|
},
|
|
890
|
-
easeInOutCubic: function(e, t,
|
|
891
|
-
var
|
|
892
|
-
return (e /= i / 2) < 1 ?
|
|
897
|
+
easeInOutCubic: function(e, t, r, i) {
|
|
898
|
+
var a = r - t;
|
|
899
|
+
return (e /= i / 2) < 1 ? a / 2 * e * e * e + t : a / 2 * ((e -= 2) * e * e + 2) + t;
|
|
893
900
|
},
|
|
894
|
-
easeInQuart: function(e, t,
|
|
895
|
-
var
|
|
896
|
-
return
|
|
901
|
+
easeInQuart: function(e, t, r, i) {
|
|
902
|
+
var a = r - t;
|
|
903
|
+
return a * (e /= i) * e * e * e + t;
|
|
897
904
|
},
|
|
898
|
-
easeOutQuart: function(e, t,
|
|
899
|
-
var
|
|
900
|
-
return -
|
|
905
|
+
easeOutQuart: function(e, t, r, i) {
|
|
906
|
+
var a = r - t;
|
|
907
|
+
return -a * ((e = e / i - 1) * e * e * e - 1) + t;
|
|
901
908
|
},
|
|
902
|
-
easeInOutQuart: function(e, t,
|
|
903
|
-
var
|
|
904
|
-
return (e /= i / 2) < 1 ?
|
|
909
|
+
easeInOutQuart: function(e, t, r, i) {
|
|
910
|
+
var a = r - t;
|
|
911
|
+
return (e /= i / 2) < 1 ? a / 2 * e * e * e * e + t : -a / 2 * ((e -= 2) * e * e * e - 2) + t;
|
|
905
912
|
},
|
|
906
|
-
easeInQuint: function(e, t,
|
|
907
|
-
var
|
|
908
|
-
return
|
|
913
|
+
easeInQuint: function(e, t, r, i) {
|
|
914
|
+
var a = r - t;
|
|
915
|
+
return a * (e /= i) * e * e * e * e + t;
|
|
909
916
|
},
|
|
910
|
-
easeOutQuint: function(e, t,
|
|
911
|
-
var
|
|
912
|
-
return
|
|
917
|
+
easeOutQuint: function(e, t, r, i) {
|
|
918
|
+
var a = r - t;
|
|
919
|
+
return a * ((e = e / i - 1) * e * e * e * e + 1) + t;
|
|
913
920
|
},
|
|
914
|
-
easeInOutQuint: function(e, t,
|
|
915
|
-
var
|
|
916
|
-
return (e /= i / 2) < 1 ?
|
|
921
|
+
easeInOutQuint: function(e, t, r, i) {
|
|
922
|
+
var a = r - t;
|
|
923
|
+
return (e /= i / 2) < 1 ? a / 2 * e * e * e * e * e + t : a / 2 * ((e -= 2) * e * e * e * e + 2) + t;
|
|
917
924
|
},
|
|
918
|
-
easeInSine: function(e, t,
|
|
919
|
-
var
|
|
920
|
-
return -
|
|
925
|
+
easeInSine: function(e, t, r, i) {
|
|
926
|
+
var a = r - t;
|
|
927
|
+
return -a * Math.cos(e / i * (Math.PI / 2)) + a + t;
|
|
921
928
|
},
|
|
922
|
-
easeOutSine: function(e, t,
|
|
923
|
-
var
|
|
924
|
-
return
|
|
929
|
+
easeOutSine: function(e, t, r, i) {
|
|
930
|
+
var a = r - t;
|
|
931
|
+
return a * Math.sin(e / i * (Math.PI / 2)) + t;
|
|
925
932
|
},
|
|
926
|
-
easeInOutSine: function(e, t,
|
|
927
|
-
var
|
|
928
|
-
return -
|
|
933
|
+
easeInOutSine: function(e, t, r, i) {
|
|
934
|
+
var a = r - t;
|
|
935
|
+
return -a / 2 * (Math.cos(Math.PI * e / i) - 1) + t;
|
|
929
936
|
},
|
|
930
|
-
easeInExpo: function(e, t,
|
|
931
|
-
var
|
|
932
|
-
return e == 0 ? t :
|
|
937
|
+
easeInExpo: function(e, t, r, i) {
|
|
938
|
+
var a = r - t;
|
|
939
|
+
return e == 0 ? t : a * Math.pow(2, 10 * (e / i - 1)) + t;
|
|
933
940
|
},
|
|
934
|
-
easeOutExpo: function(e, t,
|
|
935
|
-
var
|
|
936
|
-
return e == i ? t +
|
|
941
|
+
easeOutExpo: function(e, t, r, i) {
|
|
942
|
+
var a = r - t;
|
|
943
|
+
return e == i ? t + a : a * (-Math.pow(2, -10 * e / i) + 1) + t;
|
|
937
944
|
},
|
|
938
|
-
easeInOutExpo: function(e, t,
|
|
939
|
-
var
|
|
940
|
-
return e === 0 ? t : e === i ? t +
|
|
945
|
+
easeInOutExpo: function(e, t, r, i) {
|
|
946
|
+
var a = r - t;
|
|
947
|
+
return e === 0 ? t : e === i ? t + a : (e /= i / 2) < 1 ? a / 2 * Math.pow(2, 10 * (e - 1)) + t : a / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
|
|
941
948
|
},
|
|
942
|
-
easeInCirc: function(e, t,
|
|
943
|
-
var
|
|
944
|
-
return -
|
|
949
|
+
easeInCirc: function(e, t, r, i) {
|
|
950
|
+
var a = r - t;
|
|
951
|
+
return -a * (Math.sqrt(1 - (e /= i) * e) - 1) + t;
|
|
945
952
|
},
|
|
946
|
-
easeOutCirc: function(e, t,
|
|
947
|
-
var
|
|
948
|
-
return
|
|
953
|
+
easeOutCirc: function(e, t, r, i) {
|
|
954
|
+
var a = r - t;
|
|
955
|
+
return a * Math.sqrt(1 - (e = e / i - 1) * e) + t;
|
|
949
956
|
},
|
|
950
|
-
easeInOutCirc: function(e, t,
|
|
951
|
-
var
|
|
952
|
-
return (e /= i / 2) < 1 ? -
|
|
957
|
+
easeInOutCirc: function(e, t, r, i) {
|
|
958
|
+
var a = r - t;
|
|
959
|
+
return (e /= i / 2) < 1 ? -a / 2 * (Math.sqrt(1 - e * e) - 1) + t : a / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
|
|
953
960
|
},
|
|
954
|
-
easeInElastic: function(e, t,
|
|
955
|
-
var
|
|
956
|
-
return B = 1.70158, u = 0,
|
|
961
|
+
easeInElastic: function(e, t, r, i) {
|
|
962
|
+
var a = r - t, m, u, B;
|
|
963
|
+
return B = 1.70158, u = 0, m = a, e === 0 ? t : (e /= i) === 1 ? t + a : (u || (u = i * 0.3), m < Math.abs(a) ? (m = a, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(a / m), -(m * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u)) + t);
|
|
957
964
|
},
|
|
958
|
-
easeOutElastic: function(e, t,
|
|
959
|
-
var
|
|
960
|
-
return B = 1.70158, u = 0,
|
|
965
|
+
easeOutElastic: function(e, t, r, i) {
|
|
966
|
+
var a = r - t, m, u, B;
|
|
967
|
+
return B = 1.70158, u = 0, m = a, e === 0 ? t : (e /= i) === 1 ? t + a : (u || (u = i * 0.3), m < Math.abs(a) ? (m = a, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(a / m), m * Math.pow(2, -10 * e) * Math.sin((e * i - B) * (2 * Math.PI) / u) + a + t);
|
|
961
968
|
},
|
|
962
|
-
easeInOutElastic: function(e, t,
|
|
963
|
-
var
|
|
964
|
-
return B = 1.70158, u = 0,
|
|
969
|
+
easeInOutElastic: function(e, t, r, i) {
|
|
970
|
+
var a = r - t, m, u, B;
|
|
971
|
+
return B = 1.70158, u = 0, m = a, e === 0 ? t : (e /= i / 2) === 2 ? t + a : (u || (u = i * (0.3 * 1.5)), m < Math.abs(a) ? (m = a, B = u / 4) : B = u / (2 * Math.PI) * Math.asin(a / m), e < 1 ? -0.5 * (m * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u)) + t : m * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * i - B) * (2 * Math.PI) / u) * 0.5 + a + t);
|
|
965
972
|
},
|
|
966
|
-
easeInBack: function(e, t,
|
|
967
|
-
var
|
|
968
|
-
return
|
|
973
|
+
easeInBack: function(e, t, r, i, a) {
|
|
974
|
+
var m = r - t;
|
|
975
|
+
return a === void 0 && (a = 1.70158), m * (e /= i) * e * ((a + 1) * e - a) + t;
|
|
969
976
|
},
|
|
970
|
-
easeOutBack: function(e, t,
|
|
971
|
-
var
|
|
972
|
-
return
|
|
977
|
+
easeOutBack: function(e, t, r, i, a) {
|
|
978
|
+
var m = r - t;
|
|
979
|
+
return a === void 0 && (a = 1.70158), m * ((e = e / i - 1) * e * ((a + 1) * e + a) + 1) + t;
|
|
973
980
|
},
|
|
974
|
-
easeInOutBack: function(e, t,
|
|
975
|
-
var
|
|
976
|
-
return
|
|
981
|
+
easeInOutBack: function(e, t, r, i, a) {
|
|
982
|
+
var m = r - t;
|
|
983
|
+
return a === void 0 && (a = 1.70158), (e /= i / 2) < 1 ? m / 2 * (e * e * (((a *= 1.525) + 1) * e - a)) + t : m / 2 * ((e -= 2) * e * (((a *= 1.525) + 1) * e + a) + 2) + t;
|
|
977
984
|
},
|
|
978
|
-
easeInBounce: function(e, t,
|
|
979
|
-
var
|
|
980
|
-
return
|
|
985
|
+
easeInBounce: function(e, t, r, i) {
|
|
986
|
+
var a = r - t, m;
|
|
987
|
+
return m = n.easeOutBounce(i - e, 0, a, i), a - m + t;
|
|
981
988
|
},
|
|
982
|
-
easeOutBounce: function(e, t,
|
|
983
|
-
var
|
|
984
|
-
return (e /= i) < 1 / 2.75 ?
|
|
989
|
+
easeOutBounce: function(e, t, r, i) {
|
|
990
|
+
var a = r - t;
|
|
991
|
+
return (e /= i) < 1 / 2.75 ? a * (7.5625 * e * e) + t : e < 2 / 2.75 ? a * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? a * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : a * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
|
|
985
992
|
},
|
|
986
|
-
easeInOutBounce: function(e, t,
|
|
987
|
-
var
|
|
988
|
-
return e < i / 2 ? (
|
|
993
|
+
easeInOutBounce: function(e, t, r, i) {
|
|
994
|
+
var a = r - t, m;
|
|
995
|
+
return e < i / 2 ? (m = n.easeInBounce(e * 2, 0, a, i), m * 0.5 + t) : (m = n.easeOutBounce(e * 2 - i, 0, a, i), m * 0.5 + a * 0.5 + t);
|
|
989
996
|
}
|
|
990
997
|
};
|
|
991
998
|
return Nt = n, Nt;
|
|
@@ -994,7 +1001,7 @@ var mn = hn();
|
|
|
994
1001
|
function bn(n) {
|
|
995
1002
|
return n * Math.PI / 180;
|
|
996
1003
|
}
|
|
997
|
-
function
|
|
1004
|
+
function _e(n, e) {
|
|
998
1005
|
return n + Math.random() * (e - n);
|
|
999
1006
|
}
|
|
1000
1007
|
function fn(n, e) {
|
|
@@ -1004,23 +1011,23 @@ var bt;
|
|
|
1004
1011
|
(function(n) {
|
|
1005
1012
|
n[n.Circle = 0] = "Circle", n[n.Square = 1] = "Square", n[n.Strip = 2] = "Strip";
|
|
1006
1013
|
})(bt || (bt = {}));
|
|
1007
|
-
var
|
|
1014
|
+
var Qe;
|
|
1008
1015
|
(function(n) {
|
|
1009
1016
|
n[n.Positive = 1] = "Positive", n[n.Negative = -1] = "Negative";
|
|
1010
|
-
})(
|
|
1011
|
-
const
|
|
1012
|
-
class
|
|
1013
|
-
constructor(e, t,
|
|
1017
|
+
})(Qe || (Qe = {}));
|
|
1018
|
+
const pn = 1e3 / 60;
|
|
1019
|
+
class _n {
|
|
1020
|
+
constructor(e, t, r, i) {
|
|
1014
1021
|
this.getOptions = t;
|
|
1015
|
-
const { colors:
|
|
1016
|
-
this.context = e, this.x =
|
|
1022
|
+
const { colors: a, initialVelocityX: m, initialVelocityY: u } = this.getOptions();
|
|
1023
|
+
this.context = e, this.x = r, this.y = i, this.w = _e(5, 20), this.h = _e(5, 20), this.radius = _e(5, 10), this.vx = typeof m == "number" ? _e(-m, m) : _e(m.min, m.max), this.vy = typeof u == "number" ? _e(-u, 0) : _e(u.min, u.max), this.shape = fn(0, 2), this.angle = bn(_e(0, 360)), this.angularSpin = _e(-0.2, 0.2), this.color = a[Math.floor(Math.random() * a.length)], this.rotateY = _e(0, 1), this.rotationDirection = _e(0, 1) ? Qe.Positive : Qe.Negative;
|
|
1017
1024
|
}
|
|
1018
1025
|
update(e) {
|
|
1019
|
-
const { gravity: t, wind:
|
|
1020
|
-
this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx +=
|
|
1026
|
+
const { gravity: t, wind: r, friction: i, opacity: a, drawShape: m } = this.getOptions(), u = e / pn;
|
|
1027
|
+
this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx += r * u, this.vx *= i ** u, this.vy *= i ** u, this.rotateY >= 1 && this.rotationDirection === Qe.Positive ? this.rotationDirection = Qe.Negative : this.rotateY <= -1 && this.rotationDirection === Qe.Negative && (this.rotationDirection = Qe.Positive);
|
|
1021
1028
|
const B = 0.1 * this.rotationDirection * u;
|
|
1022
|
-
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 =
|
|
1023
|
-
|
|
1029
|
+
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 = a, this.context.lineCap = "round", this.context.lineWidth = 2, m && typeof m == "function")
|
|
1030
|
+
m.call(this, this.context);
|
|
1024
1031
|
else
|
|
1025
1032
|
switch (this.shape) {
|
|
1026
1033
|
case bt.Circle: {
|
|
@@ -1039,36 +1046,36 @@ class pn {
|
|
|
1039
1046
|
this.context.closePath(), this.context.restore();
|
|
1040
1047
|
}
|
|
1041
1048
|
}
|
|
1042
|
-
class
|
|
1049
|
+
class gn {
|
|
1043
1050
|
constructor(e, t) {
|
|
1044
1051
|
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) => {
|
|
1045
1052
|
this.particles.splice(i, 1);
|
|
1046
1053
|
}, this.getParticle = () => {
|
|
1047
|
-
const i =
|
|
1048
|
-
return new
|
|
1054
|
+
const i = _e(this.x, this.w + this.x), a = _e(this.y, this.h + this.y);
|
|
1055
|
+
return new _n(this.context, this.getOptions, i, a);
|
|
1049
1056
|
}, this.animate = (i) => {
|
|
1050
|
-
const { canvas:
|
|
1057
|
+
const { canvas: a, context: m, particlesGenerated: u, lastNumberOfPieces: B } = this, { run: le, recycle: D, numberOfPieces: E, debug: he, tweenFunction: F, tweenDuration: ne } = this.getOptions();
|
|
1051
1058
|
if (!le)
|
|
1052
1059
|
return !1;
|
|
1053
|
-
const
|
|
1054
|
-
if (K <
|
|
1055
|
-
B !==
|
|
1056
|
-
const g = F(this.tweenProgress, this.tweenFrom,
|
|
1060
|
+
const V = this.particles.length, K = D ? V : u;
|
|
1061
|
+
if (K < E) {
|
|
1062
|
+
B !== E && (this.tweenProgress = 0, this.tweenFrom = K, this.lastNumberOfPieces = E), this.tweenProgress = Math.min(ne, Math.max(0, this.tweenProgress + i));
|
|
1063
|
+
const g = F(this.tweenProgress, this.tweenFrom, E, ne), H = Math.round(g - K);
|
|
1057
1064
|
for (let I = 0; I < H; I++)
|
|
1058
1065
|
this.particles.push(this.getParticle());
|
|
1059
1066
|
this.particlesGenerated += H;
|
|
1060
1067
|
}
|
|
1061
|
-
|
|
1068
|
+
he && (m.font = "12px sans-serif", m.fillStyle = "#333", m.textAlign = "right", m.fillText(`Particles: ${V}`, a.width - 10, a.height - 20));
|
|
1062
1069
|
for (let g = this.particles.length - 1; g >= 0; g--) {
|
|
1063
1070
|
const H = this.particles[g];
|
|
1064
|
-
H.update(i), (H.y >
|
|
1071
|
+
H.update(i), (H.y > a.height || H.y < -100 || H.x > a.width + 100 || H.x < -100) && (D && K <= E ? this.particles[g] = this.getParticle() : this.removeParticleAt(g));
|
|
1065
1072
|
}
|
|
1066
|
-
return
|
|
1073
|
+
return V > 0 || K < E;
|
|
1067
1074
|
}, this.canvas = e;
|
|
1068
|
-
const
|
|
1069
|
-
if (!
|
|
1075
|
+
const r = this.canvas.getContext("2d");
|
|
1076
|
+
if (!r)
|
|
1070
1077
|
throw new Error("Could not get canvas context");
|
|
1071
|
-
this.context =
|
|
1078
|
+
this.context = r, this.getOptions = t;
|
|
1072
1079
|
}
|
|
1073
1080
|
}
|
|
1074
1081
|
const Rt = {
|
|
@@ -1106,10 +1113,10 @@ const Rt = {
|
|
|
1106
1113
|
recycle: !0,
|
|
1107
1114
|
run: !0
|
|
1108
1115
|
};
|
|
1109
|
-
class
|
|
1116
|
+
class wn {
|
|
1110
1117
|
constructor(e, t) {
|
|
1111
1118
|
this.lastFrameTime = 0, this.setOptionsWithDefaults = (i) => {
|
|
1112
|
-
const
|
|
1119
|
+
const a = {
|
|
1113
1120
|
confettiSource: {
|
|
1114
1121
|
x: 0,
|
|
1115
1122
|
y: 0,
|
|
@@ -1118,45 +1125,45 @@ class gn {
|
|
|
1118
1125
|
}
|
|
1119
1126
|
};
|
|
1120
1127
|
this._options = {
|
|
1121
|
-
...
|
|
1128
|
+
...a,
|
|
1122
1129
|
...Rt,
|
|
1123
1130
|
...i
|
|
1124
1131
|
}, Object.assign(this, i.confettiSource);
|
|
1125
1132
|
}, this.update = (i = 0) => {
|
|
1126
|
-
const { options: { run:
|
|
1127
|
-
if (u &&
|
|
1133
|
+
const { options: { run: a, onConfettiComplete: m, frameRate: u }, canvas: B, context: le } = this, D = Math.min(i - this.lastFrameTime, 50);
|
|
1134
|
+
if (u && D < 1e3 / u) {
|
|
1128
1135
|
this.rafId = requestAnimationFrame(this.update);
|
|
1129
1136
|
return;
|
|
1130
1137
|
}
|
|
1131
|
-
this.lastFrameTime = i - (u ?
|
|
1138
|
+
this.lastFrameTime = i - (u ? D % u : 0), a && (le.fillStyle = "white", le.clearRect(0, 0, B.width, B.height)), this.generator.animate(D) ? this.rafId = requestAnimationFrame(this.update) : (m && typeof m == "function" && this.generator.particlesGenerated > 0 && m.call(this, this), this._options.run = !1);
|
|
1132
1139
|
}, this.reset = () => {
|
|
1133
1140
|
this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
|
|
1134
1141
|
}, this.stop = () => {
|
|
1135
1142
|
this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
|
|
1136
1143
|
}, this.canvas = e;
|
|
1137
|
-
const
|
|
1138
|
-
if (!
|
|
1144
|
+
const r = this.canvas.getContext("2d");
|
|
1145
|
+
if (!r)
|
|
1139
1146
|
throw new Error("Could not get canvas context");
|
|
1140
|
-
this.context =
|
|
1147
|
+
this.context = r, this.generator = new gn(this.canvas, () => this.options), this.options = t, this.update();
|
|
1141
1148
|
}
|
|
1142
1149
|
get options() {
|
|
1143
1150
|
return this._options;
|
|
1144
1151
|
}
|
|
1145
1152
|
set options(e) {
|
|
1146
|
-
var i,
|
|
1147
|
-
const t = (i = this._options) == null ? void 0 : i.run,
|
|
1148
|
-
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle &&
|
|
1153
|
+
var i, a;
|
|
1154
|
+
const t = (i = this._options) == null ? void 0 : i.run, r = (a = this._options) == null ? void 0 : a.recycle;
|
|
1155
|
+
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && r === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
|
|
1149
1156
|
}
|
|
1150
1157
|
}
|
|
1151
|
-
const
|
|
1152
|
-
class Lt extends
|
|
1158
|
+
const yn = yt.createRef();
|
|
1159
|
+
class Lt extends yt.Component {
|
|
1153
1160
|
constructor(e) {
|
|
1154
|
-
super(e), this.canvas =
|
|
1161
|
+
super(e), this.canvas = yt.createRef(), this.canvas = e.canvasRef || yn;
|
|
1155
1162
|
}
|
|
1156
1163
|
componentDidMount() {
|
|
1157
1164
|
if (this.canvas.current) {
|
|
1158
1165
|
const e = St(this.props)[0];
|
|
1159
|
-
this.confetti = new
|
|
1166
|
+
this.confetti = new wn(this.canvas.current, e);
|
|
1160
1167
|
}
|
|
1161
1168
|
}
|
|
1162
1169
|
componentDidUpdate() {
|
|
@@ -1167,7 +1174,7 @@ class Lt extends vt.Component {
|
|
|
1167
1174
|
this.confetti && this.confetti.stop(), this.confetti = void 0;
|
|
1168
1175
|
}
|
|
1169
1176
|
render() {
|
|
1170
|
-
const [e, t] = St(this.props),
|
|
1177
|
+
const [e, t] = St(this.props), r = {
|
|
1171
1178
|
zIndex: 2,
|
|
1172
1179
|
position: "absolute",
|
|
1173
1180
|
pointerEvents: "none",
|
|
@@ -1177,7 +1184,7 @@ class Lt extends vt.Component {
|
|
|
1177
1184
|
right: 0,
|
|
1178
1185
|
...t.style
|
|
1179
1186
|
};
|
|
1180
|
-
return l("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style:
|
|
1187
|
+
return l("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: r });
|
|
1181
1188
|
}
|
|
1182
1189
|
}
|
|
1183
1190
|
Lt.defaultProps = {
|
|
@@ -1185,20 +1192,20 @@ Lt.defaultProps = {
|
|
|
1185
1192
|
};
|
|
1186
1193
|
Lt.displayName = "ReactConfetti";
|
|
1187
1194
|
function St(n) {
|
|
1188
|
-
const e = {}, t = {},
|
|
1195
|
+
const e = {}, t = {}, r = {}, i = [
|
|
1189
1196
|
...Object.keys(Rt),
|
|
1190
1197
|
"confettiSource",
|
|
1191
1198
|
"drawShape",
|
|
1192
1199
|
"onConfettiComplete",
|
|
1193
1200
|
"frameRate"
|
|
1194
|
-
],
|
|
1195
|
-
for (const
|
|
1196
|
-
const u = n[
|
|
1197
|
-
i.includes(
|
|
1201
|
+
], a = ["canvasRef"];
|
|
1202
|
+
for (const m in n) {
|
|
1203
|
+
const u = n[m];
|
|
1204
|
+
i.includes(m) ? e[m] = u : a.includes(m) ? a[m] = u : r[m] = u;
|
|
1198
1205
|
}
|
|
1199
|
-
return [e,
|
|
1206
|
+
return [e, r, t];
|
|
1200
1207
|
}
|
|
1201
|
-
const
|
|
1208
|
+
const vn = yt.forwardRef((n, e) => l(Lt, { canvasRef: e, ...n }));
|
|
1202
1209
|
/**
|
|
1203
1210
|
* @license lucide-react v0.515.0 - ISC
|
|
1204
1211
|
*
|
|
@@ -1207,11 +1214,11 @@ const wn = vt.forwardRef((n, e) => l(Lt, { canvasRef: e, ...n }));
|
|
|
1207
1214
|
*/
|
|
1208
1215
|
const xn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (n) => n.replace(
|
|
1209
1216
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
1210
|
-
(e, t,
|
|
1217
|
+
(e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
1211
1218
|
), $t = (n) => {
|
|
1212
1219
|
const e = Cn(n);
|
|
1213
1220
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1214
|
-
}, Ht = (...n) => n.filter((e, t,
|
|
1221
|
+
}, Ht = (...n) => n.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim(), In = (n) => {
|
|
1215
1222
|
for (const e in n)
|
|
1216
1223
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
1217
1224
|
return !0;
|
|
@@ -1239,15 +1246,15 @@ var Nn = {
|
|
|
1239
1246
|
* This source code is licensed under the ISC license.
|
|
1240
1247
|
* See the LICENSE file in the root directory of this source tree.
|
|
1241
1248
|
*/
|
|
1242
|
-
const Sn =
|
|
1249
|
+
const Sn = zt(
|
|
1243
1250
|
({
|
|
1244
1251
|
color: n = "currentColor",
|
|
1245
1252
|
size: e = 24,
|
|
1246
1253
|
strokeWidth: t = 2,
|
|
1247
|
-
absoluteStrokeWidth:
|
|
1254
|
+
absoluteStrokeWidth: r,
|
|
1248
1255
|
className: i = "",
|
|
1249
|
-
children:
|
|
1250
|
-
iconNode:
|
|
1256
|
+
children: a,
|
|
1257
|
+
iconNode: m,
|
|
1251
1258
|
...u
|
|
1252
1259
|
}, B) => Tt(
|
|
1253
1260
|
"svg",
|
|
@@ -1257,14 +1264,14 @@ const Sn = Wt(
|
|
|
1257
1264
|
width: e,
|
|
1258
1265
|
height: e,
|
|
1259
1266
|
stroke: n,
|
|
1260
|
-
strokeWidth:
|
|
1267
|
+
strokeWidth: r ? Number(t) * 24 / Number(e) : t,
|
|
1261
1268
|
className: Ht("lucide", i),
|
|
1262
|
-
...!
|
|
1269
|
+
...!a && !In(u) && { "aria-hidden": "true" },
|
|
1263
1270
|
...u
|
|
1264
1271
|
},
|
|
1265
1272
|
[
|
|
1266
|
-
...
|
|
1267
|
-
...Array.isArray(
|
|
1273
|
+
...m.map(([le, D]) => Tt(le, D)),
|
|
1274
|
+
...Array.isArray(a) ? a : [a]
|
|
1268
1275
|
]
|
|
1269
1276
|
)
|
|
1270
1277
|
);
|
|
@@ -1275,14 +1282,14 @@ const Sn = Wt(
|
|
|
1275
1282
|
* See the LICENSE file in the root directory of this source tree.
|
|
1276
1283
|
*/
|
|
1277
1284
|
const Mt = (n, e) => {
|
|
1278
|
-
const t =
|
|
1279
|
-
({ className:
|
|
1280
|
-
ref:
|
|
1285
|
+
const t = zt(
|
|
1286
|
+
({ className: r, ...i }, a) => Tt(Sn, {
|
|
1287
|
+
ref: a,
|
|
1281
1288
|
iconNode: e,
|
|
1282
1289
|
className: Ht(
|
|
1283
1290
|
`lucide-${xn($t(n))}`,
|
|
1284
1291
|
`lucide-${n}`,
|
|
1285
|
-
|
|
1292
|
+
r
|
|
1286
1293
|
),
|
|
1287
1294
|
...i
|
|
1288
1295
|
})
|
|
@@ -1321,7 +1328,7 @@ const Rn = [
|
|
|
1321
1328
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
1322
1329
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
1323
1330
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
1324
|
-
], Ln = Mt("trash-2", Rn), Mn = "
|
|
1331
|
+
], Ln = Mt("trash-2", Rn), Mn = "_backdrop_p0w0a_1", Pn = "_celebrationOverlay_p0w0a_14", Fn = "_celebrationChip_p0w0a_23", On = "_backdropOpen_p0w0a_74", An = "_backdropClosed_p0w0a_78", Dn = "_panel_p0w0a_82", En = "_panelOpen_p0w0a_103", qn = "_panelClosed_p0w0a_107", $n = "_header_p0w0a_146", Vn = "_headerCenter_p0w0a_155", Wn = "_title_p0w0a_163", zn = "_searchIconButton_p0w0a_172", jn = "_headerTitleWrap_p0w0a_195", Un = "_headerSearchWrap_p0w0a_199", Hn = "_headerSearchOpen_p0w0a_211", Gn = "_searchBar_p0w0a_223", Qn = "_searchInput_p0w0a_235", Yn = "_searchClearButton_p0w0a_256", Kn = "_closeButton_p0w0a_278", Xn = "_body_p0w0a_312", Zn = "_muted_p0w0a_317", Jn = "_error_p0w0a_322", ea = "_variants_p0w0a_327", ta = "_variantList_p0w0a_331", na = "_emptyState_p0w0a_339", aa = "_variantRow_p0w0a_351", ra = "_variantRowSoldOut_p0w0a_359", ia = "_variantLeft_p0w0a_363", oa = "_addToBundleButton_p0w0a_370", sa = "_soldOutContainer_p0w0a_398", la = "_stockLimitContainer_p0w0a_406", ca = "_soldOut_p0w0a_398", ua = "_stockLimitNotice_p0w0a_424", da = "_variantThumb_p0w0a_433", ha = "_variantThumbImg_p0w0a_443", ma = "_variantThumbFallback_p0w0a_450", ba = "_variantInfo_p0w0a_460", fa = "_variantName_p0w0a_464", pa = "_variantMeta_p0w0a_473", _a = "_variantPriceRow_p0w0a_481", ga = "_variantCompareAt_p0w0a_488", wa = "_variantPrice_p0w0a_481", ya = "_qtyControls_p0w0a_499", va = "_qtyControlsWrap_p0w0a_505", xa = "_qtyButton_p0w0a_511", Ca = "_qtyValue_p0w0a_537", Ia = "_footer_p0w0a_544", Na = "_poweredBy_p0w0a_552", Sa = "_boxSummaryWindow_p0w0a_564", Ba = "_boxSummaryRow_p0w0a_582", ka = "_boxSlot_p0w0a_590", Ta = "_boxItem_p0w0a_599", Ra = "_boxItemClickable_p0w0a_611", La = "_boxThresholdLabel_p0w0a_620", Ma = "_boxItemPlaceholder_p0w0a_631", Pa = "_boxItemFilled_p0w0a_637", Fa = "_boxItemThreshold_p0w0a_643", Oa = "_boxItemDiscountText_p0w0a_651", Aa = "_boxItemPlus_p0w0a_659", Da = "_boxItemImage_p0w0a_666", Ea = "_boxItemFallback_p0w0a_673", qa = "_ctaButtonGroup_p0w0a_684", $a = "_ctaButtonGroupAnimating_p0w0a_691", Va = "_cta_p0w0a_684", Wa = "_ctaDualLeft_p0w0a_719", za = "_ctaDualLeftAnimating_p0w0a_737", ja = "_ctaDualRight_p0w0a_750", Ua = "_ctaDualRightAnimating_p0w0a_766", Ha = "_ctaTotals_p0w0a_777", Ga = "_ctaDiscountBadge_p0w0a_785", Qa = "_ctaTotalsWrap_p0w0a_799", Ya = "_ctaTotalsWrapVisible_p0w0a_812", Ka = "_ctaTotalsStrike_p0w0a_819", Xa = "_ctaTotalsPrice_p0w0a_826", b = {
|
|
1325
1332
|
backdrop: Mn,
|
|
1326
1333
|
celebrationOverlay: Pn,
|
|
1327
1334
|
celebrationChip: Fn,
|
|
@@ -1332,93 +1339,94 @@ const Rn = [
|
|
|
1332
1339
|
panelClosed: qn,
|
|
1333
1340
|
header: $n,
|
|
1334
1341
|
headerCenter: Vn,
|
|
1335
|
-
title:
|
|
1336
|
-
searchIconButton:
|
|
1342
|
+
title: Wn,
|
|
1343
|
+
searchIconButton: zn,
|
|
1337
1344
|
headerTitleWrap: jn,
|
|
1338
1345
|
headerSearchWrap: Un,
|
|
1339
1346
|
headerSearchOpen: Hn,
|
|
1340
|
-
searchBar:
|
|
1341
|
-
searchInput:
|
|
1347
|
+
searchBar: Gn,
|
|
1348
|
+
searchInput: Qn,
|
|
1342
1349
|
searchClearButton: Yn,
|
|
1343
1350
|
closeButton: Kn,
|
|
1344
1351
|
body: Xn,
|
|
1345
1352
|
muted: Zn,
|
|
1346
1353
|
error: Jn,
|
|
1347
|
-
variants:
|
|
1348
|
-
variantList:
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1354
|
+
variants: ea,
|
|
1355
|
+
variantList: ta,
|
|
1356
|
+
emptyState: na,
|
|
1357
|
+
variantRow: aa,
|
|
1358
|
+
variantRowSoldOut: ra,
|
|
1359
|
+
variantLeft: ia,
|
|
1360
|
+
addToBundleButton: oa,
|
|
1361
|
+
soldOutContainer: sa,
|
|
1362
|
+
stockLimitContainer: la,
|
|
1363
|
+
soldOut: ca,
|
|
1364
|
+
stockLimitNotice: ua,
|
|
1365
|
+
variantThumb: da,
|
|
1366
|
+
variantThumbImg: ha,
|
|
1367
|
+
variantThumbFallback: ma,
|
|
1368
|
+
variantInfo: ba,
|
|
1369
|
+
variantName: fa,
|
|
1370
|
+
variantMeta: pa,
|
|
1371
|
+
variantPriceRow: _a,
|
|
1372
|
+
variantCompareAt: ga,
|
|
1373
|
+
variantPrice: wa,
|
|
1374
|
+
qtyControls: ya,
|
|
1375
|
+
qtyControlsWrap: va,
|
|
1376
|
+
qtyButton: xa,
|
|
1377
|
+
qtyValue: Ca,
|
|
1378
|
+
footer: Ia,
|
|
1379
|
+
poweredBy: Na,
|
|
1380
|
+
boxSummaryWindow: Sa,
|
|
1381
|
+
boxSummaryRow: Ba,
|
|
1382
|
+
boxSlot: ka,
|
|
1383
|
+
boxItem: Ta,
|
|
1384
|
+
boxItemClickable: Ra,
|
|
1385
|
+
boxThresholdLabel: La,
|
|
1386
|
+
boxItemPlaceholder: Ma,
|
|
1387
|
+
boxItemFilled: Pa,
|
|
1388
|
+
boxItemThreshold: Fa,
|
|
1389
|
+
boxItemDiscountText: Oa,
|
|
1390
|
+
boxItemPlus: Aa,
|
|
1391
|
+
boxItemImage: Da,
|
|
1392
|
+
boxItemFallback: Ea,
|
|
1393
|
+
ctaButtonGroup: qa,
|
|
1394
|
+
ctaButtonGroupAnimating: $a,
|
|
1395
|
+
cta: Va,
|
|
1396
|
+
ctaDualLeft: Wa,
|
|
1397
|
+
ctaDualLeftAnimating: za,
|
|
1398
|
+
ctaDualRight: ja,
|
|
1399
|
+
ctaDualRightAnimating: Ua,
|
|
1400
|
+
ctaTotals: Ha,
|
|
1401
|
+
ctaDiscountBadge: Ga,
|
|
1402
|
+
ctaTotalsWrap: Qa,
|
|
1403
|
+
ctaTotalsWrapVisible: Ya,
|
|
1404
|
+
ctaTotalsStrike: Ka,
|
|
1405
|
+
ctaTotalsPrice: Xa
|
|
1398
1406
|
};
|
|
1399
|
-
function
|
|
1407
|
+
function Ni(n) {
|
|
1400
1408
|
var Xe, Ze;
|
|
1401
1409
|
const {
|
|
1402
1410
|
isOpen: e,
|
|
1403
1411
|
close: t,
|
|
1404
|
-
loading:
|
|
1412
|
+
loading: r,
|
|
1405
1413
|
submitting: i,
|
|
1406
|
-
error:
|
|
1407
|
-
currencyCode:
|
|
1414
|
+
error: a,
|
|
1415
|
+
currencyCode: m,
|
|
1408
1416
|
config: u,
|
|
1409
1417
|
eligibleVariants: B,
|
|
1410
1418
|
selections: le,
|
|
1411
|
-
selectionOrder:
|
|
1412
|
-
getVariantMaxSelectableQuantity:
|
|
1413
|
-
setQuantity:
|
|
1419
|
+
selectionOrder: D,
|
|
1420
|
+
getVariantMaxSelectableQuantity: E,
|
|
1421
|
+
setQuantity: he,
|
|
1414
1422
|
bundleSize: F,
|
|
1415
|
-
minRequired:
|
|
1416
|
-
canSubmit:
|
|
1423
|
+
minRequired: ne,
|
|
1424
|
+
canSubmit: V,
|
|
1417
1425
|
submit: K,
|
|
1418
1426
|
submitAndCheckout: g,
|
|
1419
1427
|
locale: H,
|
|
1420
1428
|
t: I
|
|
1421
|
-
} =
|
|
1429
|
+
} = vt(), [ce, ke] = j(!1), [Te, ge] = j(""), ee = U(null), X = U(null), ie = U(null), [me, Re] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [ae, Ce] = j(0), [be, Ae] = j(null), [we, Le] = j(!1), Ie = U(null), De = U(F), nt = 7e3, [We, ze] = j(0), [Me, Ye] = j(null), [Ne, Ee] = j(!1), ye = U(null), f = 2800, _ = [
|
|
1422
1430
|
"#2563eb",
|
|
1423
1431
|
"#3b82f6",
|
|
1424
1432
|
"#60a5fa",
|
|
@@ -1429,59 +1437,59 @@ function Ii(n) {
|
|
|
1429
1437
|
var d;
|
|
1430
1438
|
const c = (d = u == null ? void 0 : u.styleSettings) == null ? void 0 : d.confettiColors;
|
|
1431
1439
|
return Array.isArray(c) && c.length >= 6 ? c.slice(0, 6).map(
|
|
1432
|
-
(v, o) => typeof v == "string" && v.trim() ? v :
|
|
1433
|
-
) : [...
|
|
1440
|
+
(v, o) => typeof v == "string" && v.trim() ? v : _[o]
|
|
1441
|
+
) : [..._];
|
|
1434
1442
|
}, [(Xe = u == null ? void 0 : u.styleSettings) == null ? void 0 : Xe.confettiColors]), T = (c) => {
|
|
1435
1443
|
const d = Number.parseFloat(c);
|
|
1436
1444
|
return Number.isFinite(d) ? String(Math.round(d)) : c;
|
|
1437
1445
|
}, M = (c) => {
|
|
1438
1446
|
const d = (c ?? []).filter((v) => {
|
|
1439
|
-
var
|
|
1440
|
-
const o = (
|
|
1447
|
+
var h, w;
|
|
1448
|
+
const o = (h = v == null ? void 0 : v.name) == null ? void 0 : h.trim(), s = (w = v == null ? void 0 : v.value) == null ? void 0 : w.trim();
|
|
1441
1449
|
return !(!o || !s || o.toLowerCase() === "title");
|
|
1442
1450
|
});
|
|
1443
1451
|
return d.length ? d.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
|
|
1444
|
-
},
|
|
1452
|
+
}, q = (c) => {
|
|
1445
1453
|
var d;
|
|
1446
1454
|
return ((d = c.product) == null ? void 0 : d.title) ?? c.displayName ?? c.title;
|
|
1447
|
-
},
|
|
1448
|
-
const d =
|
|
1455
|
+
}, W = (c) => {
|
|
1456
|
+
const d = q(c), v = M(c.selectedOptions);
|
|
1449
1457
|
return [d, v].filter(Boolean).join(" — ");
|
|
1450
|
-
}, [Z,
|
|
1458
|
+
}, [Z, te] = j(e), G = U(null), A = (c) => {
|
|
1451
1459
|
const d = Number(c);
|
|
1452
|
-
return Number.isFinite(d) ? jt(d,
|
|
1453
|
-
},
|
|
1460
|
+
return Number.isFinite(d) ? jt(d, m, H) : c;
|
|
1461
|
+
}, $ = ((Ze = u == null ? void 0 : u.title) == null ? void 0 : Ze.trim()) || I("bundle.title.default"), Se = L(() => {
|
|
1454
1462
|
const c = Number((u == null ? void 0 : u.maxBundleSize) ?? NaN), d = Number.isFinite(c) ? Math.floor(c) : 100;
|
|
1455
1463
|
return Math.max(2, Math.min(100, d));
|
|
1456
|
-
}, [u == null ? void 0 : u.maxBundleSize]), Pe = F >= Se,
|
|
1464
|
+
}, [u == null ? void 0 : u.maxBundleSize]), Pe = F >= Se, at = L(() => [...B].sort((c, d) => c.displayName.localeCompare(d.displayName)), [B]), Fe = L(() => {
|
|
1457
1465
|
const c = Te.trim().toLowerCase();
|
|
1458
|
-
if (!c) return
|
|
1466
|
+
if (!c) return at;
|
|
1459
1467
|
const d = c.split(/\s+/).filter(Boolean), v = (o) => {
|
|
1460
1468
|
var w;
|
|
1461
1469
|
const s = [];
|
|
1462
1470
|
s.push(o.displayName), (w = o.product) != null && w.title && s.push(o.product.title);
|
|
1463
1471
|
for (const y of o.selectedOptions ?? [])
|
|
1464
1472
|
s.push(y.name), s.push(y.value);
|
|
1465
|
-
const
|
|
1466
|
-
return d.every((y) =>
|
|
1473
|
+
const h = s.join(" ").toLowerCase();
|
|
1474
|
+
return d.every((y) => h.includes(y));
|
|
1467
1475
|
};
|
|
1468
|
-
return
|
|
1469
|
-
}, [Te,
|
|
1476
|
+
return at.filter(v);
|
|
1477
|
+
}, [Te, at]), re = L(() => [...(u == null ? void 0 : u.rules) ?? []].sort((c, d) => c.minBundleSize - d.minBundleSize), [u == null ? void 0 : u.rules]), z = L(() => Math.max(0, ne - F), [F, ne]), rt = L(() => {
|
|
1470
1478
|
let c = null;
|
|
1471
1479
|
for (const d of re)
|
|
1472
1480
|
F >= d.minBundleSize && (c = d);
|
|
1473
1481
|
return c;
|
|
1474
1482
|
}, [F, re]), Oe = L(() => {
|
|
1475
|
-
if (!
|
|
1476
|
-
const c = Number.parseFloat(
|
|
1483
|
+
if (!rt) return null;
|
|
1484
|
+
const c = Number.parseFloat(rt.discountPercent);
|
|
1477
1485
|
return !Number.isFinite(c) || c <= 0 ? null : c;
|
|
1478
|
-
}, [
|
|
1486
|
+
}, [rt]), ve = re[0], N = !!(ve && F >= ve.minBundleSize), oe = L(() => {
|
|
1479
1487
|
const c = new Map(B.map((v) => [v.id, v]));
|
|
1480
1488
|
let d = 0;
|
|
1481
1489
|
for (const [v, o] of Object.entries(le)) {
|
|
1482
1490
|
const s = o ?? 0;
|
|
1483
1491
|
if (s <= 0) continue;
|
|
1484
|
-
const
|
|
1492
|
+
const h = c.get(v), w = Number(h == null ? void 0 : h.price);
|
|
1485
1493
|
Number.isFinite(w) && (d += w * s);
|
|
1486
1494
|
}
|
|
1487
1495
|
return Math.round(d * 100) / 100;
|
|
@@ -1491,8 +1499,8 @@ function Ii(n) {
|
|
|
1491
1499
|
return Math.round(c * 100) / 100;
|
|
1492
1500
|
}, [Oe, oe]), xe = L(() => re.length ? Math.max(...re.map((c) => c.minBundleSize)) : 0, [re]), it = L(() => {
|
|
1493
1501
|
const c = new Map(B.map((d) => [d.id, d]));
|
|
1494
|
-
return
|
|
1495
|
-
}, [B,
|
|
1502
|
+
return D.map((d) => c.get(d)).filter((d) => !!d);
|
|
1503
|
+
}, [B, D]), Ue = L(() => {
|
|
1496
1504
|
var d;
|
|
1497
1505
|
const c = /* @__PURE__ */ new Map();
|
|
1498
1506
|
for (const v of re) {
|
|
@@ -1504,22 +1512,22 @@ function Ii(n) {
|
|
|
1504
1512
|
});
|
|
1505
1513
|
}
|
|
1506
1514
|
return c;
|
|
1507
|
-
}, [re]), He = L(() => Math.max(xe ||
|
|
1515
|
+
}, [re]), He = L(() => Math.max(xe || ne, it.length), [it.length, xe, ne]), [Be, dt] = j(!0), Ke = U(z);
|
|
1508
1516
|
O(() => {
|
|
1509
1517
|
if (((u == null ? void 0 : u.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
|
|
1510
1518
|
const d = Ke.current > 0;
|
|
1511
|
-
|
|
1519
|
+
dt(!(d && z === 0));
|
|
1512
1520
|
}
|
|
1513
1521
|
Ke.current = z;
|
|
1514
1522
|
}, [z, u == null ? void 0 : u.ctaButtonMode]);
|
|
1515
|
-
const ot = U(null),
|
|
1516
|
-
const d =
|
|
1523
|
+
const ot = U(null), ht = U(null), qe = U(null), mt = U(F), $e = (c) => {
|
|
1524
|
+
const d = ht.current;
|
|
1517
1525
|
if (!d) return;
|
|
1518
1526
|
const v = d.querySelector(`[data-variant-row="${c}"]`);
|
|
1519
1527
|
if (!v) return;
|
|
1520
|
-
const o = d.getBoundingClientRect(), s = v.getBoundingClientRect(),
|
|
1521
|
-
if (s.top >= o.top +
|
|
1522
|
-
const y = Math.max(0, d.scrollHeight - d.clientHeight), C = s.top - o.top + s.height / 2,
|
|
1528
|
+
const o = d.getBoundingClientRect(), s = v.getBoundingClientRect(), h = 8;
|
|
1529
|
+
if (s.top >= o.top + h && s.bottom <= o.bottom - h) return;
|
|
1530
|
+
const y = Math.max(0, d.scrollHeight - d.clientHeight), C = s.top - o.top + s.height / 2, S = d.scrollTop + C - d.clientHeight / 2, P = Math.min(y, Math.max(0, S));
|
|
1523
1531
|
d.scrollTo({ top: P, behavior: "smooth" });
|
|
1524
1532
|
};
|
|
1525
1533
|
return O(() => {
|
|
@@ -1533,70 +1541,70 @@ function Ii(n) {
|
|
|
1533
1541
|
const c = () => Re({ width: window.innerWidth, height: window.innerHeight });
|
|
1534
1542
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
1535
1543
|
}, []), O(() => {
|
|
1536
|
-
if (
|
|
1537
|
-
|
|
1544
|
+
if (G.current != null && (window.clearTimeout(G.current), G.current = null), e) {
|
|
1545
|
+
te(!0);
|
|
1538
1546
|
return;
|
|
1539
1547
|
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1548
|
+
G.current = window.setTimeout(() => {
|
|
1549
|
+
te(!1), G.current = null;
|
|
1542
1550
|
}, 220);
|
|
1543
1551
|
}, [e]), O(() => () => {
|
|
1544
|
-
|
|
1552
|
+
G.current != null && window.clearTimeout(G.current);
|
|
1545
1553
|
}, []), O(() => () => {
|
|
1546
1554
|
Ie.current != null && window.clearTimeout(Ie.current);
|
|
1547
1555
|
}, []), O(() => () => {
|
|
1548
|
-
|
|
1556
|
+
ye.current != null && window.clearTimeout(ye.current);
|
|
1549
1557
|
}, []), O(() => {
|
|
1550
|
-
if (!e || !
|
|
1558
|
+
if (!e || !ce) return;
|
|
1551
1559
|
const c = requestAnimationFrame(() => {
|
|
1552
1560
|
var d;
|
|
1553
|
-
return (d =
|
|
1561
|
+
return (d = ee.current) == null ? void 0 : d.focus();
|
|
1554
1562
|
});
|
|
1555
1563
|
return () => cancelAnimationFrame(c);
|
|
1556
|
-
}, [e,
|
|
1557
|
-
const c =
|
|
1558
|
-
if (
|
|
1559
|
-
const d =
|
|
1564
|
+
}, [e, ce]), O(() => {
|
|
1565
|
+
const c = mt.current;
|
|
1566
|
+
if (mt.current = F, F <= c) return;
|
|
1567
|
+
const d = qe.current;
|
|
1560
1568
|
if (!d) return;
|
|
1561
1569
|
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;
|
|
1562
1570
|
if (s == null || s < 0) return;
|
|
1563
|
-
const
|
|
1571
|
+
const h = requestAnimationFrame(() => {
|
|
1564
1572
|
const w = d.querySelector(`[data-box-slot="${s}"]`);
|
|
1565
1573
|
if (!w) return;
|
|
1566
|
-
const y = d.getBoundingClientRect(),
|
|
1567
|
-
if (
|
|
1568
|
-
const P = Math.max(0, d.scrollWidth - d.clientWidth),
|
|
1569
|
-
d.scrollTo({ left:
|
|
1574
|
+
const y = d.getBoundingClientRect(), S = w.getBoundingClientRect().right - y.right;
|
|
1575
|
+
if (S <= 1) return;
|
|
1576
|
+
const P = Math.max(0, d.scrollWidth - d.clientWidth), Q = Math.min(P, Math.max(0, d.scrollLeft + S));
|
|
1577
|
+
d.scrollTo({ left: Q, behavior: "smooth" });
|
|
1570
1578
|
});
|
|
1571
|
-
return () => cancelAnimationFrame(
|
|
1579
|
+
return () => cancelAnimationFrame(h);
|
|
1572
1580
|
}, [F, re]), O(() => {
|
|
1573
1581
|
if (!e) return;
|
|
1574
|
-
const c =
|
|
1575
|
-
if (
|
|
1582
|
+
const c = De.current;
|
|
1583
|
+
if (De.current = F, F <= c) return;
|
|
1576
1584
|
const d = re.find((v) => v.minBundleSize === F);
|
|
1577
1585
|
d && (Ye(
|
|
1578
1586
|
I("bundle.celebration.received_discount", {
|
|
1579
1587
|
discount: T(d.discountPercent)
|
|
1580
1588
|
})
|
|
1581
|
-
),
|
|
1582
|
-
|
|
1589
|
+
), ze((v) => v + 1), Ee(!0), ye.current != null && window.clearTimeout(ye.current), ye.current = window.setTimeout(() => {
|
|
1590
|
+
Ee(!1), ye.current = null;
|
|
1583
1591
|
}, f));
|
|
1584
1592
|
}, [F, e, re]), O(() => {
|
|
1585
1593
|
if (!e || !Ne || !Me) return;
|
|
1586
1594
|
const c = requestAnimationFrame(() => {
|
|
1587
1595
|
var y;
|
|
1588
|
-
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,
|
|
1596
|
+
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, h = v ? v.top + v.height / 2 : o ? o.top + o.height / 2 : window.innerHeight / 2, w = {
|
|
1589
1597
|
x: s - 2,
|
|
1590
|
-
y:
|
|
1598
|
+
y: h - 2,
|
|
1591
1599
|
w: 4,
|
|
1592
1600
|
h: 4
|
|
1593
1601
|
};
|
|
1594
|
-
|
|
1602
|
+
Ae(w), Ce((C) => C + 1), Le(!0), Ie.current != null && window.clearTimeout(Ie.current), Ie.current = window.setTimeout(() => {
|
|
1595
1603
|
Le(!1), Ie.current = null;
|
|
1596
1604
|
}, nt);
|
|
1597
1605
|
});
|
|
1598
1606
|
return () => cancelAnimationFrame(c);
|
|
1599
|
-
}, [
|
|
1607
|
+
}, [We, Me, nt, Ne, e]), O(() => {
|
|
1600
1608
|
var c;
|
|
1601
1609
|
e && ((c = ot.current) == null || c.focus());
|
|
1602
1610
|
}, [e]), Z ? /* @__PURE__ */ R(
|
|
@@ -1605,13 +1613,13 @@ function Ii(n) {
|
|
|
1605
1613
|
role: "dialog",
|
|
1606
1614
|
"aria-modal": "true",
|
|
1607
1615
|
"aria-label": I("bundle.drawer.aria"),
|
|
1608
|
-
className: [
|
|
1616
|
+
className: [b.backdrop, e ? b.backdropOpen : b.backdropClosed, n.className].filter(Boolean).join(" "),
|
|
1609
1617
|
onMouseDown: (c) => {
|
|
1610
1618
|
c.target === c.currentTarget && t();
|
|
1611
1619
|
},
|
|
1612
1620
|
children: [
|
|
1613
|
-
|
|
1614
|
-
|
|
1621
|
+
we && be && me.width > 0 && me.height > 0 ? /* @__PURE__ */ l(
|
|
1622
|
+
vn,
|
|
1615
1623
|
{
|
|
1616
1624
|
width: me.width,
|
|
1617
1625
|
height: me.height,
|
|
@@ -1625,36 +1633,36 @@ function Ii(n) {
|
|
|
1625
1633
|
initialVelocityX: { min: -6, max: 6 },
|
|
1626
1634
|
style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
|
|
1627
1635
|
},
|
|
1628
|
-
|
|
1636
|
+
ae
|
|
1629
1637
|
) : null,
|
|
1630
|
-
/* @__PURE__ */ R("aside", { ref: ot, className: [
|
|
1631
|
-
Ne && Me ? /* @__PURE__ */ l("div", { className:
|
|
1632
|
-
/* @__PURE__ */ R("header", { className: [
|
|
1638
|
+
/* @__PURE__ */ R("aside", { ref: ot, className: [b.panel, e ? b.panelOpen : b.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
|
|
1639
|
+
Ne && Me ? /* @__PURE__ */ l("div", { className: b.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ l("div", { ref: ie, className: b.celebrationChip, children: Me }, We) }) : null,
|
|
1640
|
+
/* @__PURE__ */ R("header", { className: [b.header, ce ? b.headerSearchOpen : null].filter(Boolean).join(" "), children: [
|
|
1633
1641
|
/* @__PURE__ */ l(
|
|
1634
1642
|
"button",
|
|
1635
1643
|
{
|
|
1636
1644
|
type: "button",
|
|
1637
|
-
className:
|
|
1638
|
-
"aria-label": I(
|
|
1639
|
-
"aria-expanded":
|
|
1645
|
+
className: b.searchIconButton,
|
|
1646
|
+
"aria-label": I(ce ? "bundle.search.expanded" : "bundle.search"),
|
|
1647
|
+
"aria-expanded": ce,
|
|
1640
1648
|
onClick: () => {
|
|
1641
1649
|
ke(!0);
|
|
1642
1650
|
},
|
|
1643
1651
|
children: /* @__PURE__ */ l(Tn, { size: 18, "aria-hidden": "true" })
|
|
1644
1652
|
}
|
|
1645
1653
|
),
|
|
1646
|
-
/* @__PURE__ */ R("div", { className:
|
|
1647
|
-
/* @__PURE__ */ l("div", { className:
|
|
1648
|
-
/* @__PURE__ */ l("div", { className:
|
|
1654
|
+
/* @__PURE__ */ R("div", { className: b.headerCenter, children: [
|
|
1655
|
+
/* @__PURE__ */ l("div", { className: b.headerTitleWrap, "aria-hidden": ce, children: /* @__PURE__ */ l("h2", { className: b.title, children: $ }) }),
|
|
1656
|
+
/* @__PURE__ */ l("div", { className: b.headerSearchWrap, "aria-hidden": !ce, children: /* @__PURE__ */ R("div", { className: b.searchBar, children: [
|
|
1649
1657
|
/* @__PURE__ */ l(
|
|
1650
1658
|
"input",
|
|
1651
1659
|
{
|
|
1652
|
-
ref:
|
|
1653
|
-
className:
|
|
1660
|
+
ref: ee,
|
|
1661
|
+
className: b.searchInput,
|
|
1654
1662
|
type: "search",
|
|
1655
1663
|
value: Te,
|
|
1656
1664
|
placeholder: I("bundle.search.placeholder"),
|
|
1657
|
-
onChange: (c) =>
|
|
1665
|
+
onChange: (c) => ge(c.target.value),
|
|
1658
1666
|
onBlur: () => {
|
|
1659
1667
|
Te.trim() === "" && ke(!1);
|
|
1660
1668
|
}
|
|
@@ -1664,13 +1672,13 @@ function Ii(n) {
|
|
|
1664
1672
|
"button",
|
|
1665
1673
|
{
|
|
1666
1674
|
type: "button",
|
|
1667
|
-
className:
|
|
1675
|
+
className: b.searchClearButton,
|
|
1668
1676
|
onMouseDown: (c) => {
|
|
1669
1677
|
c.preventDefault();
|
|
1670
1678
|
},
|
|
1671
1679
|
onClick: () => {
|
|
1672
1680
|
var c;
|
|
1673
|
-
|
|
1681
|
+
ge(""), (c = ee.current) == null || c.focus();
|
|
1674
1682
|
},
|
|
1675
1683
|
"aria-label": I("bundle.search.clear"),
|
|
1676
1684
|
children: I("bundle.search.clear")
|
|
@@ -1678,78 +1686,78 @@ function Ii(n) {
|
|
|
1678
1686
|
) : null
|
|
1679
1687
|
] }) })
|
|
1680
1688
|
] }),
|
|
1681
|
-
/* @__PURE__ */ l("button", { type: "button", onClick: t, disabled: i, className:
|
|
1689
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: t, disabled: i, className: b.closeButton, "aria-label": I("bundle.close"), children: "×" })
|
|
1682
1690
|
] }),
|
|
1683
|
-
/* @__PURE__ */ R("div", { className:
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
/* @__PURE__ */ l("div", { className:
|
|
1687
|
-
var fe,
|
|
1688
|
-
const d = le[c.id] ?? 0, v =
|
|
1691
|
+
/* @__PURE__ */ R("div", { className: b.body, ref: ht, children: [
|
|
1692
|
+
r ? /* @__PURE__ */ l("p", { className: b.muted, children: I("bundle.loading") }) : null,
|
|
1693
|
+
a ? /* @__PURE__ */ l("p", { className: b.error, children: a }) : null,
|
|
1694
|
+
/* @__PURE__ */ l("div", { className: b.variants, children: !r && !a && B.length === 0 ? /* @__PURE__ */ l("p", { className: b.emptyState, children: I("bundle.empty") }) : /* @__PURE__ */ l("ul", { className: b.variantList, children: Fe.map((c) => {
|
|
1695
|
+
var fe, Ve, Je, et;
|
|
1696
|
+
const d = le[c.id] ?? 0, v = q(c), o = M(c.selectedOptions), s = W(c), h = E(c.id), w = h ?? Number.POSITIVE_INFINITY, y = d >= w, C = c.availableForSale !== !1 && !Pe && !y, S = c.availableForSale === !1 ? null : y ? I("bundle.stock.max_reached") : null, P = Oe, Q = Number(c.price), Y = P != null && Number.isFinite(P) && P > 0 && Number.isFinite(Q), ue = Y ? Math.round(Q * (1 - P / 100) * 100) / 100 : null;
|
|
1689
1697
|
return /* @__PURE__ */ R(
|
|
1690
1698
|
"li",
|
|
1691
1699
|
{
|
|
1692
|
-
className: [
|
|
1700
|
+
className: [b.variantRow, c.availableForSale === !1 && b.variantRowSoldOut].filter(Boolean).join(" "),
|
|
1693
1701
|
"data-variant-row": c.id,
|
|
1694
1702
|
children: [
|
|
1695
|
-
/* @__PURE__ */ R("div", { className:
|
|
1696
|
-
/* @__PURE__ */ l("div", { className:
|
|
1703
|
+
/* @__PURE__ */ R("div", { className: b.variantLeft, children: [
|
|
1704
|
+
/* @__PURE__ */ l("div", { className: b.variantThumb, "aria-hidden": "true", children: (fe = c.image) != null && fe.url ? /* @__PURE__ */ l(
|
|
1697
1705
|
"img",
|
|
1698
1706
|
{
|
|
1699
|
-
className:
|
|
1707
|
+
className: b.variantThumbImg,
|
|
1700
1708
|
src: c.image.url,
|
|
1701
1709
|
alt: c.image.altText ?? s,
|
|
1702
1710
|
loading: "lazy"
|
|
1703
1711
|
}
|
|
1704
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
1705
|
-
/* @__PURE__ */ R("div", { className:
|
|
1706
|
-
/* @__PURE__ */ l("div", { className:
|
|
1707
|
-
o ? /* @__PURE__ */ l("div", { className:
|
|
1708
|
-
/* @__PURE__ */ R("div", { className:
|
|
1709
|
-
Y ? /* @__PURE__ */ l("span", { className:
|
|
1710
|
-
/* @__PURE__ */ l("span", { className:
|
|
1711
|
-
|
|
1712
|
+
) : /* @__PURE__ */ l("div", { className: b.variantThumbFallback, children: ((et = (Je = (Ve = c.product) == null ? void 0 : Ve.title) == null ? void 0 : Je.slice(0, 1)) == null ? void 0 : et.toUpperCase()) ?? "•" }) }),
|
|
1713
|
+
/* @__PURE__ */ R("div", { className: b.variantInfo, children: [
|
|
1714
|
+
/* @__PURE__ */ l("div", { className: b.variantName, children: v }),
|
|
1715
|
+
o ? /* @__PURE__ */ l("div", { className: b.variantMeta, children: o }) : null,
|
|
1716
|
+
/* @__PURE__ */ R("div", { className: b.variantPriceRow, children: [
|
|
1717
|
+
Y ? /* @__PURE__ */ l("span", { className: b.variantCompareAt, children: A(Number.isFinite(Q) ? Q.toFixed(2) : c.price) }) : null,
|
|
1718
|
+
/* @__PURE__ */ l("span", { className: b.variantPrice, children: A(
|
|
1719
|
+
ue != null ? ue.toFixed(2) : Number.isFinite(Q) ? Q.toFixed(2) : c.price
|
|
1712
1720
|
) })
|
|
1713
1721
|
] })
|
|
1714
1722
|
] })
|
|
1715
1723
|
] }),
|
|
1716
|
-
c.availableForSale === !1 ? /* @__PURE__ */ l("div", { className:
|
|
1724
|
+
c.availableForSale === !1 ? /* @__PURE__ */ l("div", { className: b.soldOutContainer, children: /* @__PURE__ */ l("span", { className: b.soldOut, "aria-label": I("bundle.a11y.sold_out", { name: s }), children: I("bundle.stock.sold_out") }) }) : d <= 0 && w <= 0 ? /* @__PURE__ */ l("div", { className: b.stockLimitContainer, children: /* @__PURE__ */ l("span", { className: b.stockLimitNotice, "aria-label": I("bundle.a11y.max_available_selected", { name: s }), children: I("bundle.stock.max_added") }) }) : d <= 0 ? /* @__PURE__ */ l(
|
|
1717
1725
|
"button",
|
|
1718
1726
|
{
|
|
1719
1727
|
type: "button",
|
|
1720
|
-
onClick: () =>
|
|
1728
|
+
onClick: () => he(c.id, 1),
|
|
1721
1729
|
disabled: i || !C,
|
|
1722
|
-
className:
|
|
1723
|
-
"aria-label":
|
|
1730
|
+
className: b.addToBundleButton,
|
|
1731
|
+
"aria-label": S ? `${s} ${S.toLowerCase()}` : I("bundle.a11y.add_to_bundle", { name: s }),
|
|
1724
1732
|
children: I("bundle.cta.add_to_bundle")
|
|
1725
1733
|
}
|
|
1726
|
-
) : /* @__PURE__ */ R("div", { className:
|
|
1727
|
-
/* @__PURE__ */ R("div", { className:
|
|
1734
|
+
) : /* @__PURE__ */ R("div", { className: b.qtyControlsWrap, children: [
|
|
1735
|
+
/* @__PURE__ */ R("div", { className: b.qtyControls, children: [
|
|
1728
1736
|
/* @__PURE__ */ l(
|
|
1729
1737
|
"button",
|
|
1730
1738
|
{
|
|
1731
1739
|
type: "button",
|
|
1732
|
-
onClick: () =>
|
|
1740
|
+
onClick: () => he(c.id, d - 1),
|
|
1733
1741
|
disabled: i || d <= 0,
|
|
1734
|
-
className:
|
|
1742
|
+
className: b.qtyButton,
|
|
1735
1743
|
"aria-label": I("bundle.a11y.decrease", { name: s }),
|
|
1736
1744
|
children: "−"
|
|
1737
1745
|
}
|
|
1738
1746
|
),
|
|
1739
|
-
/* @__PURE__ */ l("span", { className:
|
|
1747
|
+
/* @__PURE__ */ l("span", { className: b.qtyValue, "aria-label": I("bundle.a11y.quantity", { name: s, qty: d }), children: d }),
|
|
1740
1748
|
/* @__PURE__ */ l(
|
|
1741
1749
|
"button",
|
|
1742
1750
|
{
|
|
1743
1751
|
type: "button",
|
|
1744
|
-
onClick: () =>
|
|
1752
|
+
onClick: () => he(c.id, d + 1),
|
|
1745
1753
|
disabled: i || !C,
|
|
1746
|
-
className:
|
|
1747
|
-
"aria-label":
|
|
1754
|
+
className: b.qtyButton,
|
|
1755
|
+
"aria-label": S ? `${s} ${S.toLowerCase()}` : I("bundle.a11y.increase", { name: s }),
|
|
1748
1756
|
children: "+"
|
|
1749
1757
|
}
|
|
1750
1758
|
)
|
|
1751
1759
|
] }),
|
|
1752
|
-
|
|
1760
|
+
S ? /* @__PURE__ */ l("div", { className: b.stockLimitNotice, children: S }) : null
|
|
1753
1761
|
] })
|
|
1754
1762
|
]
|
|
1755
1763
|
},
|
|
@@ -1757,67 +1765,67 @@ function Ii(n) {
|
|
|
1757
1765
|
);
|
|
1758
1766
|
}) }) })
|
|
1759
1767
|
] }),
|
|
1760
|
-
/* @__PURE__ */ R("footer", { className:
|
|
1761
|
-
/* @__PURE__ */ l("div", { className:
|
|
1762
|
-
var
|
|
1763
|
-
const v = it[d], o = Ue.get(d), s = !!v,
|
|
1764
|
-
return /* @__PURE__ */ R("div", { "data-box-slot": d, className:
|
|
1768
|
+
/* @__PURE__ */ R("footer", { className: b.footer, ref: X, children: [
|
|
1769
|
+
/* @__PURE__ */ l("div", { className: b.boxSummaryWindow, ref: qe, children: /* @__PURE__ */ l("div", { className: b.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: He }).map((c, d) => {
|
|
1770
|
+
var S, P, Q, Y;
|
|
1771
|
+
const v = it[d], o = Ue.get(d), s = !!v, h = !!o, w = h && !s, y = o ? I("bundle.discount.off_label", { discount: T(o.discountPercent) }) : null, C = s ? v.displayName : I("bundle.slot", { slot: d + 1 });
|
|
1772
|
+
return /* @__PURE__ */ R("div", { "data-box-slot": d, className: b.boxSlot, children: [
|
|
1765
1773
|
/* @__PURE__ */ l(
|
|
1766
1774
|
"div",
|
|
1767
1775
|
{
|
|
1768
1776
|
className: [
|
|
1769
|
-
|
|
1770
|
-
s ?
|
|
1771
|
-
|
|
1772
|
-
s ?
|
|
1777
|
+
b.boxItem,
|
|
1778
|
+
s ? b.boxItemFilled : b.boxItemPlaceholder,
|
|
1779
|
+
h ? b.boxItemThreshold : null,
|
|
1780
|
+
s ? b.boxItemClickable : null
|
|
1773
1781
|
].filter(Boolean).join(" "),
|
|
1774
1782
|
role: s ? "button" : void 0,
|
|
1775
1783
|
tabIndex: s ? 0 : void 0,
|
|
1776
|
-
onClick: s ? () =>
|
|
1777
|
-
onKeyDown: s ? (
|
|
1778
|
-
(
|
|
1784
|
+
onClick: s ? () => $e(v.id) : void 0,
|
|
1785
|
+
onKeyDown: s ? (ue) => {
|
|
1786
|
+
(ue.key === "Enter" || ue.key === " ") && (ue.preventDefault(), $e(v.id));
|
|
1779
1787
|
} : void 0,
|
|
1780
1788
|
"aria-label": w && y ? `${C}. ${I("bundle.unlocks", { discount: y })}.` : C,
|
|
1781
1789
|
title: w && y ? `${C} • ${I("bundle.unlocks", { discount: y })}` : C,
|
|
1782
|
-
children: s ? (
|
|
1790
|
+
children: s ? (S = v.image) != null && S.url ? /* @__PURE__ */ l(
|
|
1783
1791
|
"img",
|
|
1784
1792
|
{
|
|
1785
|
-
className:
|
|
1793
|
+
className: b.boxItemImage,
|
|
1786
1794
|
src: v.image.url,
|
|
1787
1795
|
alt: v.image.altText ?? v.displayName,
|
|
1788
1796
|
loading: "lazy"
|
|
1789
1797
|
}
|
|
1790
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
1798
|
+
) : /* @__PURE__ */ l("div", { className: b.boxItemFallback, "aria-hidden": "true", children: ((Y = (Q = (P = v.product) == null ? void 0 : P.title) == null ? void 0 : Q.slice(0, 1)) == null ? void 0 : Y.toUpperCase()) ?? "•" }) : w && y ? /* @__PURE__ */ l("div", { className: b.boxItemDiscountText, children: y }) : /* @__PURE__ */ l("div", { className: b.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1791
1799
|
}
|
|
1792
1800
|
),
|
|
1793
|
-
|
|
1801
|
+
h ? /* @__PURE__ */ l("div", { className: b.boxThresholdLabel, children: o.label }) : null
|
|
1794
1802
|
] }, d);
|
|
1795
1803
|
}) }) }),
|
|
1796
1804
|
/* @__PURE__ */ l(
|
|
1797
1805
|
"div",
|
|
1798
1806
|
{
|
|
1799
|
-
className: [
|
|
1807
|
+
className: [b.ctaTotalsWrap, N ? b.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
1800
1808
|
"aria-hidden": !N,
|
|
1801
|
-
children: /* @__PURE__ */ R("div", { className:
|
|
1802
|
-
Oe ? /* @__PURE__ */ l("span", { className:
|
|
1809
|
+
children: /* @__PURE__ */ R("div", { className: b.ctaTotals, "aria-label": I("bundle.totals"), children: [
|
|
1810
|
+
Oe ? /* @__PURE__ */ l("span", { className: b.ctaDiscountBadge, children: I("bundle.discount.badge", { discount: Oe }) }) : /* @__PURE__ */ l("span", {}),
|
|
1803
1811
|
/* @__PURE__ */ l("span", { children: Oe ? /* @__PURE__ */ R(kt, { children: [
|
|
1804
|
-
/* @__PURE__ */ l("span", { className:
|
|
1812
|
+
/* @__PURE__ */ l("span", { className: b.ctaTotalsStrike, children: A(oe.toFixed(2)) }),
|
|
1805
1813
|
" ",
|
|
1806
|
-
/* @__PURE__ */ l("span", { className:
|
|
1807
|
-
] }) : /* @__PURE__ */ l("span", { className:
|
|
1814
|
+
/* @__PURE__ */ l("span", { className: b.ctaTotalsPrice, children: A(je.toFixed(2)) })
|
|
1815
|
+
] }) : /* @__PURE__ */ l("span", { className: b.ctaTotalsPrice, children: A(oe.toFixed(2)) }) })
|
|
1808
1816
|
] })
|
|
1809
1817
|
}
|
|
1810
1818
|
),
|
|
1811
1819
|
(() => {
|
|
1812
1820
|
const c = (u == null ? void 0 : u.ctaButtonMode) || "add_to_cart";
|
|
1813
|
-
return c === "add_to_cart_checkout" ? z > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick: K, disabled: !
|
|
1821
|
+
return c === "add_to_cart_checkout" ? z > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick: K, disabled: !V, className: b.cta, children: i ? I("bundle.cta.adding") : I("bundle.cta.add_more", { count: z, productWord: ct(H, z) }) }) : /* @__PURE__ */ R("div", { className: `${b.ctaButtonGroup} ${Be ? b.ctaButtonGroupAnimating : ""}`, children: [
|
|
1814
1822
|
/* @__PURE__ */ l(
|
|
1815
1823
|
"button",
|
|
1816
1824
|
{
|
|
1817
1825
|
type: "button",
|
|
1818
1826
|
onClick: K,
|
|
1819
|
-
disabled: !
|
|
1820
|
-
className: `${
|
|
1827
|
+
disabled: !V,
|
|
1828
|
+
className: `${b.ctaDualLeft} ${Be ? b.ctaDualLeftAnimating : ""}`,
|
|
1821
1829
|
children: /* @__PURE__ */ l("span", { children: I(i ? "bundle.cta.adding" : "bundle.cta.add_to_basket") })
|
|
1822
1830
|
}
|
|
1823
1831
|
),
|
|
@@ -1826,14 +1834,14 @@ function Ii(n) {
|
|
|
1826
1834
|
{
|
|
1827
1835
|
type: "button",
|
|
1828
1836
|
onClick: g,
|
|
1829
|
-
disabled: !
|
|
1830
|
-
className: `${
|
|
1837
|
+
disabled: !V,
|
|
1838
|
+
className: `${b.ctaDualRight} ${Be ? b.ctaDualRightAnimating : ""}`,
|
|
1831
1839
|
children: /* @__PURE__ */ l("span", { children: I(i ? "bundle.cta.processing" : "bundle.cta.checkout") })
|
|
1832
1840
|
}
|
|
1833
1841
|
)
|
|
1834
|
-
] }) : c === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick: g, disabled: !
|
|
1842
|
+
] }) : c === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick: g, disabled: !V, className: b.cta, children: i ? I("bundle.cta.processing") : z > 0 ? I("bundle.cta.add_more", { count: z, productWord: ct(H, z) }) : I("bundle.cta.checkout") }) : /* @__PURE__ */ l("button", { type: "button", onClick: K, disabled: !V, className: b.cta, children: i ? I("bundle.cta.adding") : z > 0 ? I("bundle.cta.add_more", { count: z, productWord: ct(H, z) }) : I("bundle.cta.add_to_basket") });
|
|
1835
1843
|
})(),
|
|
1836
|
-
/* @__PURE__ */ R("div", { className:
|
|
1844
|
+
/* @__PURE__ */ R("div", { className: b.poweredBy, children: [
|
|
1837
1845
|
I("bundle.powered_by"),
|
|
1838
1846
|
" ",
|
|
1839
1847
|
/* @__PURE__ */ l("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
|
|
@@ -1844,259 +1852,258 @@ function Ii(n) {
|
|
|
1844
1852
|
}
|
|
1845
1853
|
) : null;
|
|
1846
1854
|
}
|
|
1847
|
-
const
|
|
1848
|
-
panel:
|
|
1849
|
-
header:
|
|
1850
|
-
title:
|
|
1851
|
-
status:
|
|
1852
|
-
error:
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
variantRow:
|
|
1867
|
-
variantRowInteractive:
|
|
1868
|
-
variantRowSelected:
|
|
1869
|
-
variantRowSoldOut:
|
|
1870
|
-
variantMedia:
|
|
1871
|
-
variantContent:
|
|
1872
|
-
variantHeader:
|
|
1873
|
-
variantTitle:
|
|
1874
|
-
variantImage:
|
|
1875
|
-
variantImageFallback:
|
|
1876
|
-
variantMeta:
|
|
1877
|
-
variantPrice:
|
|
1878
|
-
variantFooterRow:
|
|
1879
|
-
variantActions:
|
|
1880
|
-
qtyActions:
|
|
1881
|
-
qtyActionsWrap:
|
|
1882
|
-
soldOut:
|
|
1883
|
-
stockLimitNotice:
|
|
1884
|
-
qtyChip:
|
|
1885
|
-
qtyChipInteractive:
|
|
1886
|
-
qtyChipValue:
|
|
1887
|
-
qtyChipPlus:
|
|
1888
|
-
qtyChipClear:
|
|
1889
|
-
qtyTrash:
|
|
1890
|
-
footer:
|
|
1891
|
-
boxSummaryWindow:
|
|
1892
|
-
boxSummaryRow:
|
|
1893
|
-
boxSlot:
|
|
1894
|
-
boxItem:
|
|
1895
|
-
boxItemFilled:
|
|
1896
|
-
boxItemPlaceholder:
|
|
1897
|
-
boxItemThreshold:
|
|
1898
|
-
boxItemClickable:
|
|
1899
|
-
boxItemImage:
|
|
1900
|
-
boxItemFallback:
|
|
1901
|
-
boxItemPlus:
|
|
1902
|
-
boxItemDiscountText:
|
|
1903
|
-
boxThresholdLabel:
|
|
1904
|
-
totalsReveal:
|
|
1905
|
-
totalsRevealOpen:
|
|
1906
|
-
ctaTotalsWrap:
|
|
1907
|
-
ctaTotalsWrapVisible:
|
|
1855
|
+
const Za = "_panel_gafs6_2", Ja = "_header_gafs6_20", er = "_title_gafs6_24", tr = "_status_gafs6_32", nr = "_error_gafs6_37", ar = "_section_gafs6_43", rr = "_sectionTitle_gafs6_48", ir = "_rulesVisual_gafs6_101", or = "_rulesLabelsRow_gafs6_108", sr = "_rulesLinesRow_gafs6_115", lr = "_rulesLineLabelCell_gafs6_122", cr = "_rulesLineLabel_gafs6_122", ur = "_rulesLine_gafs6_115", dr = "_rulesLineEmpty_gafs6_156", hr = "_rulesLineFilled_gafs6_160", mr = "_variants_gafs6_164", br = "_variantList_gafs6_172", fr = "_emptyState_gafs6_180", pr = "_variantRow_gafs6_192", _r = "_variantRowInteractive_gafs6_204", gr = "_variantRowSelected_gafs6_208", wr = "_variantRowSoldOut_gafs6_213", yr = "_variantMedia_gafs6_217", vr = "_variantContent_gafs6_225", xr = "_variantHeader_gafs6_233", Cr = "_variantTitle_gafs6_239", Ir = "_variantImage_gafs6_253", Nr = "_variantImageFallback_gafs6_261", Sr = "_variantMeta_gafs6_274", Br = "_variantPrice_gafs6_279", kr = "_variantFooterRow_gafs6_285", Tr = "_variantActions_gafs6_292", Rr = "_qtyActions_gafs6_298", Lr = "_qtyActionsWrap_gafs6_304", Mr = "_soldOut_gafs6_355", Pr = "_stockLimitNotice_gafs6_363", Fr = "_qtyChip_gafs6_372", Or = "_qtyChipInteractive_gafs6_387", Ar = "_qtyChipValue_gafs6_391", Dr = "_qtyChipPlus_gafs6_397", Er = "_qtyChipClear_gafs6_402", qr = "_qtyTrash_gafs6_431", $r = "_footer_gafs6_443", Vr = "_boxSummaryWindow_gafs6_448", Wr = "_boxSummaryRow_gafs6_462", zr = "_boxSlot_gafs6_470", jr = "_boxItem_gafs6_479", Ur = "_boxItemFilled_gafs6_496", Hr = "_boxItemPlaceholder_gafs6_502", Gr = "_boxItemThreshold_gafs6_508", Qr = "_boxItemClickable_gafs6_516", Yr = "_boxItemImage_gafs6_525", Kr = "_boxItemFallback_gafs6_536", Xr = "_boxItemPlus_gafs6_549", Zr = "_boxItemDiscountText_gafs6_561", Jr = "_boxThresholdLabel_gafs6_574", ei = "_totalsReveal_gafs6_585", ti = "_totalsRevealOpen_gafs6_593", ni = "_ctaTotalsWrap_gafs6_598", ai = "_ctaTotalsWrapVisible_gafs6_603", ri = "_ctaTotals_gafs6_598", ii = "_ctaDiscountBadge_gafs6_618", oi = "_ctaTotalsStrike_gafs6_629", si = "_ctaTotalsPrice_gafs6_635", li = "_cta_gafs6_598", ci = "_ctaButtonGroup_gafs6_667", ui = "_ctaDualLeft_gafs6_673", di = "_ctaDualRight_gafs6_674", hi = "_poweredBy_gafs6_701", p = {
|
|
1856
|
+
panel: Za,
|
|
1857
|
+
header: Ja,
|
|
1858
|
+
title: er,
|
|
1859
|
+
status: tr,
|
|
1860
|
+
error: nr,
|
|
1861
|
+
section: ar,
|
|
1862
|
+
sectionTitle: rr,
|
|
1863
|
+
rulesVisual: ir,
|
|
1864
|
+
rulesLabelsRow: or,
|
|
1865
|
+
rulesLinesRow: sr,
|
|
1866
|
+
rulesLineLabelCell: lr,
|
|
1867
|
+
rulesLineLabel: cr,
|
|
1868
|
+
rulesLine: ur,
|
|
1869
|
+
rulesLineEmpty: dr,
|
|
1870
|
+
rulesLineFilled: hr,
|
|
1871
|
+
variants: mr,
|
|
1872
|
+
variantList: br,
|
|
1873
|
+
emptyState: fr,
|
|
1874
|
+
variantRow: pr,
|
|
1875
|
+
variantRowInteractive: _r,
|
|
1876
|
+
variantRowSelected: gr,
|
|
1877
|
+
variantRowSoldOut: wr,
|
|
1878
|
+
variantMedia: yr,
|
|
1879
|
+
variantContent: vr,
|
|
1880
|
+
variantHeader: xr,
|
|
1881
|
+
variantTitle: Cr,
|
|
1882
|
+
variantImage: Ir,
|
|
1883
|
+
variantImageFallback: Nr,
|
|
1884
|
+
variantMeta: Sr,
|
|
1885
|
+
variantPrice: Br,
|
|
1886
|
+
variantFooterRow: kr,
|
|
1887
|
+
variantActions: Tr,
|
|
1888
|
+
qtyActions: Rr,
|
|
1889
|
+
qtyActionsWrap: Lr,
|
|
1890
|
+
soldOut: Mr,
|
|
1891
|
+
stockLimitNotice: Pr,
|
|
1892
|
+
qtyChip: Fr,
|
|
1893
|
+
qtyChipInteractive: Or,
|
|
1894
|
+
qtyChipValue: Ar,
|
|
1895
|
+
qtyChipPlus: Dr,
|
|
1896
|
+
qtyChipClear: Er,
|
|
1897
|
+
qtyTrash: qr,
|
|
1898
|
+
footer: $r,
|
|
1899
|
+
boxSummaryWindow: Vr,
|
|
1900
|
+
boxSummaryRow: Wr,
|
|
1901
|
+
boxSlot: zr,
|
|
1902
|
+
boxItem: jr,
|
|
1903
|
+
boxItemFilled: Ur,
|
|
1904
|
+
boxItemPlaceholder: Hr,
|
|
1905
|
+
boxItemThreshold: Gr,
|
|
1906
|
+
boxItemClickable: Qr,
|
|
1907
|
+
boxItemImage: Yr,
|
|
1908
|
+
boxItemFallback: Kr,
|
|
1909
|
+
boxItemPlus: Xr,
|
|
1910
|
+
boxItemDiscountText: Zr,
|
|
1911
|
+
boxThresholdLabel: Jr,
|
|
1912
|
+
totalsReveal: ei,
|
|
1913
|
+
totalsRevealOpen: ti,
|
|
1914
|
+
ctaTotalsWrap: ni,
|
|
1915
|
+
ctaTotalsWrapVisible: ai,
|
|
1908
1916
|
ctaTotals: ri,
|
|
1909
|
-
ctaDiscountBadge:
|
|
1910
|
-
ctaTotalsStrike:
|
|
1911
|
-
ctaTotalsPrice:
|
|
1912
|
-
cta:
|
|
1913
|
-
ctaButtonGroup:
|
|
1914
|
-
ctaDualLeft:
|
|
1915
|
-
ctaDualRight:
|
|
1916
|
-
poweredBy:
|
|
1917
|
+
ctaDiscountBadge: ii,
|
|
1918
|
+
ctaTotalsStrike: oi,
|
|
1919
|
+
ctaTotalsPrice: si,
|
|
1920
|
+
cta: li,
|
|
1921
|
+
ctaButtonGroup: ci,
|
|
1922
|
+
ctaDualLeft: ui,
|
|
1923
|
+
ctaDualRight: di,
|
|
1924
|
+
poweredBy: hi
|
|
1917
1925
|
};
|
|
1918
|
-
function
|
|
1919
|
-
var
|
|
1926
|
+
function Si(n) {
|
|
1927
|
+
var ye;
|
|
1920
1928
|
const {
|
|
1921
1929
|
loading: e,
|
|
1922
1930
|
submitting: t,
|
|
1923
|
-
error:
|
|
1931
|
+
error: r,
|
|
1924
1932
|
currencyCode: i,
|
|
1925
|
-
config:
|
|
1926
|
-
eligibleVariants:
|
|
1933
|
+
config: a,
|
|
1934
|
+
eligibleVariants: m,
|
|
1927
1935
|
selections: u,
|
|
1928
1936
|
selectionOrder: B,
|
|
1929
1937
|
getVariantMaxSelectableQuantity: le,
|
|
1930
|
-
setQuantity:
|
|
1931
|
-
bundleSize:
|
|
1932
|
-
minRequired:
|
|
1938
|
+
setQuantity: D,
|
|
1939
|
+
bundleSize: E,
|
|
1940
|
+
minRequired: he,
|
|
1933
1941
|
canSubmit: F,
|
|
1934
|
-
submit:
|
|
1935
|
-
submitAndCheckout:
|
|
1942
|
+
submit: ne,
|
|
1943
|
+
submitAndCheckout: V,
|
|
1936
1944
|
locale: K,
|
|
1937
1945
|
t: g
|
|
1938
|
-
} =
|
|
1946
|
+
} = vt(), {
|
|
1939
1947
|
className: H,
|
|
1940
1948
|
showRules: I = !0,
|
|
1941
|
-
showVariants:
|
|
1949
|
+
showVariants: ce = !0
|
|
1942
1950
|
} = n, ke = (f) => {
|
|
1943
|
-
const
|
|
1944
|
-
return Number.isFinite(
|
|
1951
|
+
const _ = Number.parseFloat(f);
|
|
1952
|
+
return Number.isFinite(_) ? String(Math.round(_)) : f;
|
|
1945
1953
|
}, Te = (f) => {
|
|
1946
|
-
const
|
|
1947
|
-
var
|
|
1948
|
-
const T = (
|
|
1954
|
+
const _ = (f ?? []).filter((x) => {
|
|
1955
|
+
var q, W;
|
|
1956
|
+
const T = (q = x == null ? void 0 : x.name) == null ? void 0 : q.trim(), M = (W = x == null ? void 0 : x.value) == null ? void 0 : W.trim();
|
|
1949
1957
|
return !(!T || !M || T.toLowerCase() === "title");
|
|
1950
1958
|
});
|
|
1951
|
-
return
|
|
1952
|
-
},
|
|
1953
|
-
const
|
|
1954
|
-
return Number.isFinite(
|
|
1955
|
-
},
|
|
1959
|
+
return _.length ? _.map((x) => `${x.name}: ${x.value}`).join(" • ") : null;
|
|
1960
|
+
}, ge = (f) => {
|
|
1961
|
+
const _ = Number(f);
|
|
1962
|
+
return Number.isFinite(_) ? jt(_, i, K) : f;
|
|
1963
|
+
}, ee = L(() => [...m].sort((f, _) => f.displayName.localeCompare(_.displayName)), [m]), X = L(() => [...(a == null ? void 0 : a.rules) ?? []].sort((f, _) => f.minBundleSize - _.minBundleSize), [a == null ? void 0 : a.rules]), ie = L(() => Math.max(0, he - E), [E, he]), me = L(() => {
|
|
1956
1964
|
let f = null;
|
|
1957
|
-
for (const
|
|
1958
|
-
|
|
1965
|
+
for (const _ of X)
|
|
1966
|
+
E >= _.minBundleSize && (f = _);
|
|
1959
1967
|
return f;
|
|
1960
|
-
}, [
|
|
1968
|
+
}, [E, X]), Re = L(() => {
|
|
1961
1969
|
if (!me) return null;
|
|
1962
1970
|
const f = Number.parseFloat(me.discountPercent);
|
|
1963
1971
|
return !Number.isFinite(f) || f <= 0 ? null : f;
|
|
1964
|
-
}, [me]),
|
|
1965
|
-
const f = new Map(
|
|
1966
|
-
let
|
|
1972
|
+
}, [me]), ae = X[0], Ce = !!(ae && E >= ae.minBundleSize), be = L(() => {
|
|
1973
|
+
const f = new Map(m.map((x) => [x.id, x]));
|
|
1974
|
+
let _ = 0;
|
|
1967
1975
|
for (const [x, T] of Object.entries(u)) {
|
|
1968
1976
|
const M = T ?? 0;
|
|
1969
1977
|
if (M <= 0) continue;
|
|
1970
|
-
const
|
|
1971
|
-
Number.isFinite(
|
|
1978
|
+
const q = f.get(x), W = Number(q == null ? void 0 : q.price);
|
|
1979
|
+
Number.isFinite(W) && (_ += W * M);
|
|
1972
1980
|
}
|
|
1973
|
-
return Math.round(
|
|
1974
|
-
}, [
|
|
1981
|
+
return Math.round(_ * 100) / 100;
|
|
1982
|
+
}, [m, u]), Ae = L(() => {
|
|
1975
1983
|
if (!Re) return be;
|
|
1976
1984
|
const f = be * (1 - Re / 100);
|
|
1977
1985
|
return Math.round(f * 100) / 100;
|
|
1978
|
-
}, [Re, be]),
|
|
1979
|
-
const f = new Map(
|
|
1980
|
-
return B.map((
|
|
1981
|
-
}, [
|
|
1982
|
-
var
|
|
1986
|
+
}, [Re, be]), we = L(() => X.length ? Math.max(...X.map((f) => f.minBundleSize)) : 0, [X]), Le = L(() => {
|
|
1987
|
+
const f = new Map(m.map((_) => [_.id, _]));
|
|
1988
|
+
return B.map((_) => f.get(_)).filter((_) => !!_);
|
|
1989
|
+
}, [m, B]), Ie = L(() => {
|
|
1990
|
+
var _;
|
|
1983
1991
|
const f = /* @__PURE__ */ new Map();
|
|
1984
1992
|
for (const x of X) {
|
|
1985
1993
|
const T = Math.max(0, x.minBundleSize - 1);
|
|
1986
1994
|
f.set(T, {
|
|
1987
1995
|
discountPercent: x.discountPercent,
|
|
1988
1996
|
minBundleSize: x.minBundleSize,
|
|
1989
|
-
label: ((
|
|
1997
|
+
label: ((_ = x.label) == null ? void 0 : _.trim()) || `Buy ${x.minBundleSize}+`
|
|
1990
1998
|
});
|
|
1991
1999
|
}
|
|
1992
2000
|
return f;
|
|
1993
|
-
}, [X]),
|
|
1994
|
-
const f = Number((
|
|
1995
|
-
return Math.max(2, Math.min(100,
|
|
1996
|
-
}, [
|
|
2001
|
+
}, [X]), De = L(() => {
|
|
2002
|
+
const f = Number((a == null ? void 0 : a.maxBundleSize) ?? NaN), _ = Number.isFinite(f) ? Math.floor(f) : 100;
|
|
2003
|
+
return Math.max(2, Math.min(100, _));
|
|
2004
|
+
}, [a == null ? void 0 : a.maxBundleSize]), nt = ((ye = a == null ? void 0 : a.title) == null ? void 0 : ye.trim()) || g("bundle.title.default"), We = L(() => Math.max(we || he, Le.length), [Le.length, we, he]), ze = E >= De, Me = U(null), Ye = U(null), Ne = U(E);
|
|
1997
2005
|
O(() => {
|
|
1998
2006
|
const f = Ne.current;
|
|
1999
|
-
if (Ne.current =
|
|
2000
|
-
const
|
|
2001
|
-
if (!
|
|
2002
|
-
const x = X.some((
|
|
2007
|
+
if (Ne.current = E, E <= f) return;
|
|
2008
|
+
const _ = Ye.current;
|
|
2009
|
+
if (!_) return;
|
|
2010
|
+
const x = X.some((W) => W.minBundleSize === E), T = X.find((W) => W.minBundleSize > E), M = T && x ? T.minBundleSize - 1 : T ? null : E - 1;
|
|
2003
2011
|
if (M == null || M < 0) return;
|
|
2004
|
-
const
|
|
2005
|
-
const
|
|
2006
|
-
if (!
|
|
2007
|
-
const Z =
|
|
2008
|
-
if (
|
|
2009
|
-
const A = Math.max(0,
|
|
2010
|
-
|
|
2012
|
+
const q = requestAnimationFrame(() => {
|
|
2013
|
+
const W = _.querySelector(`[data-box-slot="${M}"]`);
|
|
2014
|
+
if (!W) return;
|
|
2015
|
+
const Z = _.getBoundingClientRect(), G = W.getBoundingClientRect().right - Z.right;
|
|
2016
|
+
if (G <= 1) return;
|
|
2017
|
+
const A = Math.max(0, _.scrollWidth - _.clientWidth), $ = Math.min(A, Math.max(0, _.scrollLeft + G));
|
|
2018
|
+
_.scrollTo({ left: $, behavior: "smooth" });
|
|
2011
2019
|
});
|
|
2012
|
-
return () => cancelAnimationFrame(
|
|
2013
|
-
}, [
|
|
2014
|
-
const
|
|
2015
|
-
const
|
|
2016
|
-
if (!
|
|
2017
|
-
const x =
|
|
2020
|
+
return () => cancelAnimationFrame(q);
|
|
2021
|
+
}, [E, X]);
|
|
2022
|
+
const Ee = (f) => {
|
|
2023
|
+
const _ = Me.current;
|
|
2024
|
+
if (!_) return;
|
|
2025
|
+
const x = _.querySelector(`[data-variant-row="${f}"]`);
|
|
2018
2026
|
x && x.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
2019
2027
|
};
|
|
2020
|
-
return /* @__PURE__ */ R("section", { className: [
|
|
2021
|
-
/* @__PURE__ */ l("header", { className:
|
|
2022
|
-
e ? /* @__PURE__ */ l("div", { className:
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
return /* @__PURE__ */ l("div", { className: _.rulesLineLabelCell, children: M ? /* @__PURE__ */ l("span", { className: _.rulesLineLabel, children: M }) : null }, x);
|
|
2028
|
+
return /* @__PURE__ */ R("section", { className: [p.panel, H].filter(Boolean).join(" "), "aria-busy": e, children: [
|
|
2029
|
+
/* @__PURE__ */ l("header", { className: p.header, children: /* @__PURE__ */ l("h2", { className: p.title, children: nt }) }),
|
|
2030
|
+
e ? /* @__PURE__ */ l("div", { className: p.status, children: g("bundle.loading") }) : null,
|
|
2031
|
+
r ? /* @__PURE__ */ l("div", { className: p.error, children: r }) : null,
|
|
2032
|
+
I && X.length ? /* @__PURE__ */ l("div", { className: p.section, children: /* @__PURE__ */ R("div", { className: p.rulesVisual, children: [
|
|
2033
|
+
/* @__PURE__ */ l("div", { className: p.rulesLabelsRow, children: Array.from({ length: we }).map((f, _) => {
|
|
2034
|
+
const x = _ + 1, T = X.find((q) => q.minBundleSize === x), M = T ? g("bundle.discount.off_label", { discount: ke(T.discountPercent) }) : null;
|
|
2035
|
+
return /* @__PURE__ */ l("div", { className: p.rulesLineLabelCell, children: M ? /* @__PURE__ */ l("span", { className: p.rulesLineLabel, children: M }) : null }, x);
|
|
2029
2036
|
}) }),
|
|
2030
|
-
/* @__PURE__ */ l("div", { className:
|
|
2031
|
-
const x =
|
|
2037
|
+
/* @__PURE__ */ l("div", { className: p.rulesLinesRow, children: Array.from({ length: we }).map((f, _) => {
|
|
2038
|
+
const x = _ + 1, T = E >= x;
|
|
2032
2039
|
return /* @__PURE__ */ l(
|
|
2033
2040
|
"div",
|
|
2034
2041
|
{
|
|
2035
2042
|
className: [
|
|
2036
|
-
|
|
2037
|
-
T ?
|
|
2043
|
+
p.rulesLine,
|
|
2044
|
+
T ? p.rulesLineFilled : p.rulesLineEmpty
|
|
2038
2045
|
].filter(Boolean).join(" ")
|
|
2039
2046
|
},
|
|
2040
2047
|
x
|
|
2041
2048
|
);
|
|
2042
2049
|
}) })
|
|
2043
2050
|
] }) }) : null,
|
|
2044
|
-
|
|
2045
|
-
/* @__PURE__ */ l("div", { className:
|
|
2046
|
-
/* @__PURE__ */ l("div", { className:
|
|
2051
|
+
ce ? /* @__PURE__ */ R("div", { className: p.section, ref: Me, children: [
|
|
2052
|
+
/* @__PURE__ */ l("div", { className: p.sectionTitle, children: g("bundle.select.items") }),
|
|
2053
|
+
/* @__PURE__ */ l("div", { className: p.variants, children: !e && !r && ee.length === 0 ? /* @__PURE__ */ l("div", { className: p.emptyState, children: g("bundle.empty") }) : /* @__PURE__ */ l("ul", { className: p.variantList, children: ee.map((f) => {
|
|
2047
2054
|
var A;
|
|
2048
|
-
const
|
|
2055
|
+
const _ = u[f.id] ?? 0, x = Te(f.selectedOptions), T = f.availableForSale === !1, M = le(f.id), q = M ?? Number.POSITIVE_INFINITY, W = _ >= q, Z = !T && !ze && !W, te = Z, G = !T && W ? g("bundle.stock.max_reached") : null;
|
|
2049
2056
|
return /* @__PURE__ */ R(
|
|
2050
2057
|
"li",
|
|
2051
2058
|
{
|
|
2052
2059
|
className: [
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
T ?
|
|
2060
|
+
p.variantRow,
|
|
2061
|
+
te ? p.variantRowInteractive : null,
|
|
2062
|
+
_ > 0 ? p.variantRowSelected : null,
|
|
2063
|
+
T ? p.variantRowSoldOut : null
|
|
2057
2064
|
].filter(Boolean).join(" "),
|
|
2058
2065
|
"data-variant-row": f.id,
|
|
2059
|
-
role:
|
|
2060
|
-
tabIndex:
|
|
2061
|
-
onClick:
|
|
2062
|
-
|
|
2066
|
+
role: te ? "button" : void 0,
|
|
2067
|
+
tabIndex: te ? 0 : void 0,
|
|
2068
|
+
onClick: te ? () => {
|
|
2069
|
+
D(f.id, _ + 1);
|
|
2063
2070
|
} : void 0,
|
|
2064
|
-
onKeyDown:
|
|
2065
|
-
(
|
|
2071
|
+
onKeyDown: te ? ($) => {
|
|
2072
|
+
($.key === "Enter" || $.key === " ") && ($.preventDefault(), D(f.id, _ + 1), Ee(f.id));
|
|
2066
2073
|
} : void 0,
|
|
2067
|
-
"aria-label": T ? g("bundle.a11y.sold_out", { name: f.displayName }) :
|
|
2074
|
+
"aria-label": T ? g("bundle.a11y.sold_out", { name: f.displayName }) : G ? `${f.displayName} ${G.toLowerCase()}` : g("bundle.a11y.add_to_bundle", { name: f.displayName }),
|
|
2068
2075
|
children: [
|
|
2069
|
-
/* @__PURE__ */ l("div", { className:
|
|
2076
|
+
/* @__PURE__ */ l("div", { className: p.variantMedia, children: (A = f.image) != null && A.url ? /* @__PURE__ */ l(
|
|
2070
2077
|
"img",
|
|
2071
2078
|
{
|
|
2072
2079
|
src: f.image.url,
|
|
2073
2080
|
alt: f.image.altText ?? f.displayName,
|
|
2074
2081
|
width: f.image.width ?? 64,
|
|
2075
2082
|
height: f.image.height ?? 64,
|
|
2076
|
-
className:
|
|
2083
|
+
className: p.variantImage,
|
|
2077
2084
|
loading: "lazy"
|
|
2078
2085
|
}
|
|
2079
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
2080
|
-
/* @__PURE__ */ R("div", { className:
|
|
2081
|
-
/* @__PURE__ */ R("div", { className:
|
|
2082
|
-
/* @__PURE__ */ l("div", { className:
|
|
2083
|
-
x ? /* @__PURE__ */ l("div", { className:
|
|
2086
|
+
) : /* @__PURE__ */ l("div", { className: p.variantImageFallback, children: g("bundle.item.generic") }) }),
|
|
2087
|
+
/* @__PURE__ */ R("div", { className: p.variantContent, children: [
|
|
2088
|
+
/* @__PURE__ */ R("div", { className: p.variantHeader, children: [
|
|
2089
|
+
/* @__PURE__ */ l("div", { className: p.variantTitle, children: f.displayName }),
|
|
2090
|
+
x ? /* @__PURE__ */ l("div", { className: p.variantMeta, children: x }) : null
|
|
2084
2091
|
] }),
|
|
2085
|
-
/* @__PURE__ */ R("div", { className:
|
|
2086
|
-
/* @__PURE__ */ l("div", { className:
|
|
2087
|
-
/* @__PURE__ */ l("div", { className:
|
|
2088
|
-
/* @__PURE__ */ R("div", { className:
|
|
2089
|
-
|
|
2092
|
+
/* @__PURE__ */ R("div", { className: p.variantFooterRow, children: [
|
|
2093
|
+
/* @__PURE__ */ l("div", { className: p.variantPrice, children: ge(f.price) }),
|
|
2094
|
+
/* @__PURE__ */ l("div", { className: p.variantActions, children: T ? /* @__PURE__ */ l("div", { className: p.soldOut, "aria-label": g("bundle.a11y.sold_out", { name: f.displayName }), children: g("bundle.stock.sold_out") }) : _ <= 0 && q <= 0 ? /* @__PURE__ */ l("div", { className: p.stockLimitNotice, "aria-label": g("bundle.a11y.max_available_selected", { name: f.displayName }), children: g("bundle.stock.max_added") }) : /* @__PURE__ */ R("div", { className: p.qtyActionsWrap, children: [
|
|
2095
|
+
/* @__PURE__ */ R("div", { className: p.qtyActions, children: [
|
|
2096
|
+
_ > 0 ? /* @__PURE__ */ l(
|
|
2090
2097
|
"button",
|
|
2091
2098
|
{
|
|
2092
2099
|
type: "button",
|
|
2093
|
-
className:
|
|
2100
|
+
className: p.qtyTrash,
|
|
2094
2101
|
"aria-label": g("bundle.a11y.remove_from_bundle", { name: f.displayName }),
|
|
2095
|
-
onClick: (
|
|
2096
|
-
|
|
2102
|
+
onClick: ($) => {
|
|
2103
|
+
$.stopPropagation(), D(f.id, 0);
|
|
2097
2104
|
},
|
|
2098
|
-
onKeyDown: (
|
|
2099
|
-
|
|
2105
|
+
onKeyDown: ($) => {
|
|
2106
|
+
$.stopPropagation();
|
|
2100
2107
|
},
|
|
2101
2108
|
children: /* @__PURE__ */ l(Ln, { size: 14 })
|
|
2102
2109
|
}
|
|
@@ -2104,29 +2111,29 @@ function Ni(n) {
|
|
|
2104
2111
|
/* @__PURE__ */ l(
|
|
2105
2112
|
"div",
|
|
2106
2113
|
{
|
|
2107
|
-
className: [
|
|
2108
|
-
"aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty:
|
|
2109
|
-
onClick: Z ? (
|
|
2110
|
-
|
|
2114
|
+
className: [p.qtyChip, Z ? p.qtyChipInteractive : null].filter(Boolean).join(" "),
|
|
2115
|
+
"aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty: _ }),
|
|
2116
|
+
onClick: Z ? ($) => {
|
|
2117
|
+
$.stopPropagation(), D(f.id, _ + 1);
|
|
2111
2118
|
} : void 0,
|
|
2112
|
-
onKeyDown: (
|
|
2113
|
-
|
|
2119
|
+
onKeyDown: ($) => {
|
|
2120
|
+
$.stopPropagation();
|
|
2114
2121
|
},
|
|
2115
2122
|
role: Z ? "button" : void 0,
|
|
2116
2123
|
tabIndex: Z ? 0 : void 0,
|
|
2117
|
-
children:
|
|
2118
|
-
/* @__PURE__ */ l("span", { className:
|
|
2124
|
+
children: _ <= 0 ? /* @__PURE__ */ l("span", { className: p.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ l(Vt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ R(kt, { children: [
|
|
2125
|
+
/* @__PURE__ */ l("span", { className: p.qtyChipValue, children: _ }),
|
|
2119
2126
|
/* @__PURE__ */ l(
|
|
2120
2127
|
"button",
|
|
2121
2128
|
{
|
|
2122
2129
|
type: "button",
|
|
2123
|
-
className:
|
|
2130
|
+
className: p.qtyChipClear,
|
|
2124
2131
|
"aria-label": g("bundle.a11y.increase", { name: f.displayName }),
|
|
2125
|
-
onClick: (
|
|
2126
|
-
|
|
2132
|
+
onClick: ($) => {
|
|
2133
|
+
$.stopPropagation(), D(f.id, _ + 1);
|
|
2127
2134
|
},
|
|
2128
|
-
onKeyDown: (
|
|
2129
|
-
|
|
2135
|
+
onKeyDown: ($) => {
|
|
2136
|
+
$.stopPropagation();
|
|
2130
2137
|
},
|
|
2131
2138
|
disabled: !Z,
|
|
2132
2139
|
children: /* @__PURE__ */ l(Vt, { size: 12, strokeWidth: 2 })
|
|
@@ -2136,7 +2143,7 @@ function Ni(n) {
|
|
|
2136
2143
|
}
|
|
2137
2144
|
)
|
|
2138
2145
|
] }),
|
|
2139
|
-
|
|
2146
|
+
G ? /* @__PURE__ */ l("div", { className: p.stockLimitNotice, children: G }) : null
|
|
2140
2147
|
] }) })
|
|
2141
2148
|
] })
|
|
2142
2149
|
] })
|
|
@@ -2146,67 +2153,67 @@ function Ni(n) {
|
|
|
2146
2153
|
);
|
|
2147
2154
|
}) }) })
|
|
2148
2155
|
] }) : null,
|
|
2149
|
-
/* @__PURE__ */ R("footer", { className:
|
|
2150
|
-
/* @__PURE__ */ l("div", { className:
|
|
2151
|
-
var
|
|
2152
|
-
const x = Le[
|
|
2153
|
-
return /* @__PURE__ */ R("div", { "data-box-slot":
|
|
2156
|
+
/* @__PURE__ */ R("footer", { className: p.footer, children: [
|
|
2157
|
+
/* @__PURE__ */ l("div", { className: p.boxSummaryWindow, ref: Ye, children: /* @__PURE__ */ l("div", { className: p.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: We }).map((f, _) => {
|
|
2158
|
+
var G, A, $, Se;
|
|
2159
|
+
const x = Le[_], T = Ie.get(_), M = !!x, q = !!T, W = q && !M, Z = T ? g("bundle.discount.off_label", { discount: ke(T.discountPercent) }) : null, te = M ? x.displayName : g("bundle.slot", { slot: _ + 1 });
|
|
2160
|
+
return /* @__PURE__ */ R("div", { "data-box-slot": _, className: p.boxSlot, children: [
|
|
2154
2161
|
/* @__PURE__ */ l(
|
|
2155
2162
|
"div",
|
|
2156
2163
|
{
|
|
2157
2164
|
className: [
|
|
2158
|
-
|
|
2159
|
-
M ?
|
|
2160
|
-
|
|
2161
|
-
M ?
|
|
2165
|
+
p.boxItem,
|
|
2166
|
+
M ? p.boxItemFilled : p.boxItemPlaceholder,
|
|
2167
|
+
q ? p.boxItemThreshold : null,
|
|
2168
|
+
M ? p.boxItemClickable : null
|
|
2162
2169
|
].filter(Boolean).join(" "),
|
|
2163
2170
|
role: M ? "button" : void 0,
|
|
2164
2171
|
tabIndex: M ? 0 : void 0,
|
|
2165
|
-
onClick: M ? () =>
|
|
2172
|
+
onClick: M ? () => Ee(x.id) : void 0,
|
|
2166
2173
|
onKeyDown: M ? (Pe) => {
|
|
2167
|
-
(Pe.key === "Enter" || Pe.key === " ") && (Pe.preventDefault(),
|
|
2174
|
+
(Pe.key === "Enter" || Pe.key === " ") && (Pe.preventDefault(), Ee(x.id));
|
|
2168
2175
|
} : void 0,
|
|
2169
|
-
"aria-label":
|
|
2170
|
-
title:
|
|
2171
|
-
children: M ? (
|
|
2176
|
+
"aria-label": W && Z ? `${te}. ${g("bundle.unlocks", { discount: Z })}.` : te,
|
|
2177
|
+
title: W && Z ? `${te} • ${g("bundle.unlocks", { discount: Z })}` : te,
|
|
2178
|
+
children: M ? (G = x.image) != null && G.url ? /* @__PURE__ */ l(
|
|
2172
2179
|
"img",
|
|
2173
2180
|
{
|
|
2174
|
-
className:
|
|
2181
|
+
className: p.boxItemImage,
|
|
2175
2182
|
src: x.image.url,
|
|
2176
2183
|
alt: x.image.altText ?? x.displayName,
|
|
2177
2184
|
width: 1,
|
|
2178
2185
|
height: 1,
|
|
2179
2186
|
loading: "lazy"
|
|
2180
2187
|
}
|
|
2181
|
-
) : /* @__PURE__ */ l("div", { className:
|
|
2188
|
+
) : /* @__PURE__ */ l("div", { className: p.boxItemFallback, "aria-hidden": "true", children: ((Se = ($ = (A = x.product) == null ? void 0 : A.title) == null ? void 0 : $.slice(0, 1)) == null ? void 0 : Se.toUpperCase()) ?? "•" }) : W && Z ? /* @__PURE__ */ l("div", { className: p.boxItemDiscountText, children: Z }) : /* @__PURE__ */ l("div", { className: p.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
2182
2189
|
}
|
|
2183
2190
|
),
|
|
2184
|
-
|
|
2185
|
-
] },
|
|
2191
|
+
q ? /* @__PURE__ */ l("div", { className: p.boxThresholdLabel, children: T.label }) : null
|
|
2192
|
+
] }, _);
|
|
2186
2193
|
}) }) }),
|
|
2187
|
-
/* @__PURE__ */ l("div", { className: [
|
|
2194
|
+
/* @__PURE__ */ l("div", { className: [p.totalsReveal, Ce ? p.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ l(
|
|
2188
2195
|
"div",
|
|
2189
2196
|
{
|
|
2190
|
-
className: [
|
|
2197
|
+
className: [p.ctaTotalsWrap, Ce ? p.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
2191
2198
|
"aria-hidden": !Ce,
|
|
2192
|
-
children: /* @__PURE__ */ R("div", { className:
|
|
2193
|
-
Re ? /* @__PURE__ */ l("span", { className:
|
|
2199
|
+
children: /* @__PURE__ */ R("div", { className: p.ctaTotals, "aria-label": g("bundle.totals"), children: [
|
|
2200
|
+
Re ? /* @__PURE__ */ l("span", { className: p.ctaDiscountBadge, children: g("bundle.discount.badge", { discount: Re }) }) : /* @__PURE__ */ l("span", {}),
|
|
2194
2201
|
/* @__PURE__ */ l("span", { children: Re ? /* @__PURE__ */ R(kt, { children: [
|
|
2195
|
-
/* @__PURE__ */ l("span", { className:
|
|
2202
|
+
/* @__PURE__ */ l("span", { className: p.ctaTotalsStrike, children: ge(be.toFixed(2)) }),
|
|
2196
2203
|
" ",
|
|
2197
|
-
/* @__PURE__ */ l("span", { className:
|
|
2198
|
-
] }) : /* @__PURE__ */ l("span", { className:
|
|
2204
|
+
/* @__PURE__ */ l("span", { className: p.ctaTotalsPrice, children: ge(Ae.toFixed(2)) })
|
|
2205
|
+
] }) : /* @__PURE__ */ l("span", { className: p.ctaTotalsPrice, children: ge(be.toFixed(2)) }) })
|
|
2199
2206
|
] })
|
|
2200
2207
|
}
|
|
2201
2208
|
) }),
|
|
2202
2209
|
(() => {
|
|
2203
|
-
const f = (
|
|
2204
|
-
return f === "add_to_cart_checkout" ? ie > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2205
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2206
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2207
|
-
] }) : f === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick:
|
|
2210
|
+
const f = (a == null ? void 0 : a.ctaButtonMode) || "add_to_cart";
|
|
2211
|
+
return f === "add_to_cart_checkout" ? ie > 0 ? /* @__PURE__ */ l("button", { type: "button", onClick: ne, disabled: !F, className: p.cta, children: t ? g("bundle.cta.adding") : g("bundle.cta.add_more", { count: ie, productWord: ct(K, ie) }) }) : /* @__PURE__ */ R("div", { className: p.ctaButtonGroup, children: [
|
|
2212
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: ne, disabled: !F, className: p.ctaDualLeft, children: /* @__PURE__ */ l("span", { children: g(t ? "bundle.cta.adding" : "bundle.cta.add_to_basket") }) }),
|
|
2213
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: V, disabled: !F, className: p.ctaDualRight, children: /* @__PURE__ */ l("span", { children: g(t ? "bundle.cta.processing" : "bundle.cta.checkout") }) })
|
|
2214
|
+
] }) : f === "checkout" ? /* @__PURE__ */ l("button", { type: "button", onClick: V, disabled: !F, className: p.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: ne, disabled: !F, className: p.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") });
|
|
2208
2215
|
})(),
|
|
2209
|
-
/* @__PURE__ */ R("div", { className:
|
|
2216
|
+
/* @__PURE__ */ R("div", { className: p.poweredBy, children: [
|
|
2210
2217
|
g("bundle.powered_by"),
|
|
2211
2218
|
" ",
|
|
2212
2219
|
/* @__PURE__ */ l("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
|
|
@@ -2218,36 +2225,36 @@ function Bt(n) {
|
|
|
2218
2225
|
if (n != null && n.length)
|
|
2219
2226
|
return n.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
|
|
2220
2227
|
}
|
|
2221
|
-
function
|
|
2228
|
+
function Wt(n) {
|
|
2222
2229
|
const e = /\/(\d+)$/.exec(n);
|
|
2223
2230
|
return e ? e[1] : n;
|
|
2224
2231
|
}
|
|
2225
|
-
function
|
|
2232
|
+
function mi(n) {
|
|
2226
2233
|
if (n == null) return null;
|
|
2227
2234
|
const e = String(n).trim();
|
|
2228
2235
|
return e ? e.startsWith("gid://shopify/ProductVariant/") ? e : `gid://shopify/ProductVariant/${e}` : null;
|
|
2229
2236
|
}
|
|
2230
|
-
function
|
|
2237
|
+
function bi() {
|
|
2231
2238
|
var n;
|
|
2232
2239
|
return typeof window > "u" ? null : ((n = window.Shopify) == null ? void 0 : n.theme) ?? null;
|
|
2233
2240
|
}
|
|
2234
|
-
function
|
|
2235
|
-
const n =
|
|
2241
|
+
function fi() {
|
|
2242
|
+
const n = bi();
|
|
2236
2243
|
return n ? n.schema_name === "Sleek" ? !0 : /sleek/i.test(n.name ?? "") : !1;
|
|
2237
2244
|
}
|
|
2238
|
-
function
|
|
2245
|
+
function pi() {
|
|
2239
2246
|
return typeof document > "u" ? !1 : !!document.querySelector("cart-drawer");
|
|
2240
2247
|
}
|
|
2241
2248
|
function _i() {
|
|
2242
|
-
return !
|
|
2249
|
+
return !fi() || !pi() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
|
|
2243
2250
|
bubbles: !0,
|
|
2244
2251
|
detail: { open: !0 }
|
|
2245
2252
|
})), !0);
|
|
2246
2253
|
}
|
|
2247
|
-
function
|
|
2254
|
+
function gi() {
|
|
2248
2255
|
window.location.reload();
|
|
2249
2256
|
}
|
|
2250
|
-
async function
|
|
2257
|
+
async function gt(n, e) {
|
|
2251
2258
|
const t = await fetch(n, {
|
|
2252
2259
|
method: "POST",
|
|
2253
2260
|
headers: {
|
|
@@ -2257,12 +2264,12 @@ async function yt(n, e) {
|
|
|
2257
2264
|
body: JSON.stringify(e)
|
|
2258
2265
|
});
|
|
2259
2266
|
if (!t.ok) {
|
|
2260
|
-
const
|
|
2261
|
-
throw new Error(
|
|
2267
|
+
const r = await t.text().catch(() => "");
|
|
2268
|
+
throw new Error(r || `Cart request failed: ${t.status}`);
|
|
2262
2269
|
}
|
|
2263
2270
|
return t.json().catch(() => null);
|
|
2264
2271
|
}
|
|
2265
|
-
async function
|
|
2272
|
+
async function wi() {
|
|
2266
2273
|
const n = await fetch("/cart.js", {
|
|
2267
2274
|
method: "GET",
|
|
2268
2275
|
cache: "no-store",
|
|
@@ -2275,27 +2282,27 @@ async function yi() {
|
|
|
2275
2282
|
throw new Error(`Cart request failed: ${n.status}`);
|
|
2276
2283
|
return n.json();
|
|
2277
2284
|
}
|
|
2278
|
-
function
|
|
2285
|
+
function Bi() {
|
|
2279
2286
|
return {
|
|
2280
2287
|
async linesAdd(n) {
|
|
2281
2288
|
const e = n.map((t) => ({
|
|
2282
|
-
id:
|
|
2289
|
+
id: Wt(t.merchandiseId),
|
|
2283
2290
|
quantity: t.quantity,
|
|
2284
2291
|
properties: Bt(t.attributes)
|
|
2285
2292
|
}));
|
|
2286
|
-
await
|
|
2293
|
+
await gt("/cart/add.js", { items: e });
|
|
2287
2294
|
},
|
|
2288
2295
|
async linesAddForCheckout(n) {
|
|
2289
2296
|
const e = n.map((t) => ({
|
|
2290
|
-
id:
|
|
2297
|
+
id: Wt(t.merchandiseId),
|
|
2291
2298
|
quantity: t.quantity,
|
|
2292
2299
|
properties: Bt(t.attributes)
|
|
2293
2300
|
}));
|
|
2294
|
-
await
|
|
2301
|
+
await gt("/cart/add.js", { items: e });
|
|
2295
2302
|
},
|
|
2296
2303
|
async linesUpdate(n) {
|
|
2297
2304
|
for (const e of n)
|
|
2298
|
-
await
|
|
2305
|
+
await gt("/cart/change.js", {
|
|
2299
2306
|
id: e.id,
|
|
2300
2307
|
quantity: e.quantity,
|
|
2301
2308
|
properties: Bt(e.attributes)
|
|
@@ -2303,20 +2310,20 @@ function Si() {
|
|
|
2303
2310
|
},
|
|
2304
2311
|
async linesRemove(n) {
|
|
2305
2312
|
for (const e of n)
|
|
2306
|
-
await
|
|
2313
|
+
await gt("/cart/change.js", { id: e, quantity: 0 });
|
|
2307
2314
|
},
|
|
2308
2315
|
async getLineQuantitiesByMerchandiseId() {
|
|
2309
|
-
const n = await
|
|
2316
|
+
const n = await wi(), e = {};
|
|
2310
2317
|
for (const t of n.items ?? []) {
|
|
2311
|
-
const
|
|
2312
|
-
if (!
|
|
2318
|
+
const r = mi(t.id);
|
|
2319
|
+
if (!r) continue;
|
|
2313
2320
|
const i = Number(t.quantity ?? 0);
|
|
2314
|
-
!Number.isFinite(i) || i <= 0 || (e[
|
|
2321
|
+
!Number.isFinite(i) || i <= 0 || (e[r] = (e[r] ?? 0) + Math.floor(i));
|
|
2315
2322
|
}
|
|
2316
2323
|
return e;
|
|
2317
2324
|
},
|
|
2318
2325
|
openCartUI() {
|
|
2319
|
-
_i() || window.setTimeout(() =>
|
|
2326
|
+
_i() || window.setTimeout(() => gi(), 0);
|
|
2320
2327
|
},
|
|
2321
2328
|
navigateToCheckout() {
|
|
2322
2329
|
window.location.href = "/checkout";
|
|
@@ -2324,13 +2331,13 @@ function Si() {
|
|
|
2324
2331
|
};
|
|
2325
2332
|
}
|
|
2326
2333
|
export {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2334
|
+
Ni as BundleBuilderDrawer,
|
|
2335
|
+
Si as BundleBuilderPanel,
|
|
2336
|
+
Ii as BundleButton,
|
|
2337
|
+
pt as BundleLineAttributeKeys,
|
|
2338
|
+
xi as BundleProvider,
|
|
2339
|
+
Bi as createLiquidCartAdapter,
|
|
2340
|
+
vt as useBundleBuilder,
|
|
2341
|
+
Ci as useBundleBuilderDrawer
|
|
2335
2342
|
};
|
|
2336
2343
|
//# sourceMappingURL=index.js.map
|