@best-bundles/bundle-ui 0.0.45 → 0.0.46

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/index.js CHANGED
@@ -1,56 +1,56 @@
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}}._panel_mo8go_1{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, 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}._title_mo8go_12{margin:0;font-size:22px;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, sans-serif);color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_mo8go_19{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65))}._error_mo8go_24{font-size:13px;font-weight:600;color:#b91c1c}._rules_mo8go_30{display:grid;gap:10px}._rule_mo8go_30{width:100%;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .12));border-radius:14px;background:#fff;padding:0;overflow:hidden}._ruleInput_mo8go_44{position:absolute;opacity:0;pointer-events:none}._ruleLabel_mo8go_50{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;padding:14px 16px!important;cursor:pointer!important}._ruleLabelContent_mo8go_59{display:flex;flex-direction:column;justify-content:flex-start;gap:4px}._ruleSelected_mo8go_66{border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08))}._ruleTitle_mo8go_71{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}._ruleSubtitle_mo8go_77{font-size:13px;color:var(--bb-tier-text, rgba(29, 78, 216, .95));font-weight:600}._priceRow_mo8go_83{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap}._oldPrice_mo8go_90{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65));text-decoration:line-through}._newPrice_mo8go_96{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { jsx as s, jsxs as T, Fragment as Nt } from "react/jsx-runtime";
3
- import It, { useCallback as re, useState as W, useRef as Y, useEffect as D, useMemo as P, createContext as Kt, useContext as Xt, forwardRef as Ht, createElement as Rt } from "react";
4
- const wt = {
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_9u5ly_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_9u5ly_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_9u5ly_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_9u5ly_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_9u5ly_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_9u5ly_74{opacity:1}._backdropClosed_9u5ly_78{opacity:0}._panel_9u5ly_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_9u5ly_103{animation:_bbSlideInFromRight_9u5ly_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_9u5ly_107{animation:_bbSlideOutToRight_9u5ly_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_9u5ly_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_9u5ly_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_9u5ly_1{transition:none}._celebrationChip_9u5ly_23,._panelOpen_9u5ly_103,._panelClosed_9u5ly_107{animation:none}}._header_9u5ly_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_9u5ly_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_9u5ly_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_9u5ly_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_9u5ly_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_9u5ly_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_9u5ly_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_9u5ly_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_9u5ly_211 ._headerTitleWrap_9u5ly_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_9u5ly_211 ._headerSearchWrap_9u5ly_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_9u5ly_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_9u5ly_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_9u5ly_235::-webkit-search-cancel-button,._searchInput_9u5ly_235::-webkit-search-decoration,._searchInput_9u5ly_235::-webkit-search-results-button,._searchInput_9u5ly_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_9u5ly_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_9u5ly_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_9u5ly_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_9u5ly_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_9u5ly_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_9u5ly_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_9u5ly_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_9u5ly_195,._headerSearchWrap_9u5ly_199{transition:none}}._body_9u5ly_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_9u5ly_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_9u5ly_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_9u5ly_327{margin-top:4px}._variantList_9u5ly_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_9u5ly_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_9u5ly_351{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_9u5ly_359{opacity:.65}._variantLeft_9u5ly_363{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_9u5ly_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_9u5ly_370:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_9u5ly_370:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_9u5ly_370:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_9u5ly_398{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_9u5ly_406{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_9u5ly_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_9u5ly_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_9u5ly_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_9u5ly_443{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_9u5ly_450{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_9u5ly_460{min-width:0}._variantName_9u5ly_464{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_9u5ly_473{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_9u5ly_481{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_9u5ly_488{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_9u5ly_481{font-size:13px;font-weight:800}._qtyControls_9u5ly_499{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_9u5ly_505{display:grid;justify-items:center;gap:4px}._qtyButton_9u5ly_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_9u5ly_511:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_9u5ly_511:disabled{opacity:.6;cursor:not-allowed}._qtyButton_9u5ly_511:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_9u5ly_537{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_9u5ly_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_9u5ly_552{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_9u5ly_552 a{color:inherit;text-decoration:none}._boxSummaryWindow_9u5ly_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_9u5ly_564::-webkit-scrollbar{display:none}._boxSummaryRow_9u5ly_582{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_9u5ly_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_9u5ly_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_9u5ly_611{cursor:pointer}._boxItemClickable_9u5ly_611:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_9u5ly_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_9u5ly_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_9u5ly_637{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_9u5ly_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_9u5ly_651{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_9u5ly_659{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_9u5ly_666{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_9u5ly_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_9u5ly_684{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_9u5ly_691{gap:0}._cta_9u5ly_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_9u5ly_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_9u5ly_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_9u5ly_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_9u5ly_737>span{opacity:0}._ctaDualRight_9u5ly_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_9u5ly_766{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_9u5ly_766>span{opacity:0}._ctaTotals_9u5ly_777{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_9u5ly_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_9u5ly_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_9u5ly_812{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_9u5ly_819{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_9u5ly_826{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_9u5ly_799{transition:none}}._cta_9u5ly_684:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_9u5ly_684:disabled{opacity:.6;cursor:not-allowed}._cta_9u5ly_684:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_9u5ly_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_9u5ly_707:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_9u5ly_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_9u5ly_719:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_9u5ly_719:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_9u5ly_719:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_9u5ly_750:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_9u5ly_750:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_9u5ly_750:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_9u5ly_895{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}._productGroup_9u5ly_904{display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._productGroupHeader_9u5ly_913{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px 8px 8px}._productGroupThumbWrap_9u5ly_921{width:52px;height:52px;flex-shrink:0;border-radius:10px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._productGroupThumb_9u5ly_921{width:100%;height:100%;object-fit:cover;display:block}._productGroupThumbFallback_9u5ly_937{width:100%;height:100%;background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:16px;font-weight:700;text-transform:uppercase}._productGroupInfo_9u5ly_949{display:flex;flex-direction:column;gap:5px;min-width:0}._productGroupTitle_9u5ly_956{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._productGroupActions_9u5ly_965{display:grid;align-items:center;justify-items:end;flex-shrink:0}._variantSelect_9u5ly_972{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;width:100%;padding:4px 6px;border-radius:6px;border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .15));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-size:12px;font-family:inherit;cursor:pointer;outline:none}._variantSelect_9u5ly_972:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:1px}._variantSelectUnavailable_9u5ly_991{opacity:.6}._qtyActions_9u5ly_995{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_9u5ly_1001{display:grid;justify-items:end;gap:4px}._qtyChip_9u5ly_1007{min-width:44px;height:30px;padding:0 2px;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_9u5ly_1022{cursor:pointer}._qtyChipValue_9u5ly_1026{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_9u5ly_1032{margin-bottom:-3px;font-weight:500}._qtyChipClear_9u5ly_1037{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_9u5ly_1007:hover ._qtyChipClear_9u5ly_1037{background:#0f172a;color:#fff}._qtyChipClear_9u5ly_1037:disabled{cursor:not-allowed;opacity:.45}._qtyTrash_9u5ly_1061{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._drawerProductGroup_9u5ly_1075{display:flex;flex-direction:column}._selectButton_9u5ly_1081{display:inline-flex!important;align-items:center;gap:5px}._selectButtonChevron_9u5ly_1087{flex-shrink:0;transition:transform .2s ease}._selectButtonChevronOpen_9u5ly_1092{transform:rotate(180deg)}._variantPicker_9u5ly_1097{display:flex;flex-direction:column;background:#f8fafce6;border-top:1px solid var(--bb-border-color, rgba(15, 23, 42, .07))}._variantPickerRow_9u5ly_1104{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;border:none;border-bottom:1px solid var(--bb-border-color, rgba(15, 23, 42, .06));background:none;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:background .12s ease}._variantPickerRow_9u5ly_1104:last-child{border-bottom:none}._variantPickerRow_9u5ly_1104:hover:not(:disabled){background:var( --bb-cta-bg-hover-subtle, color-mix(in srgb, var(--bb-cta-bg-hover, var(--bb-cta-bg, #2563eb)) 8%, transparent) )}._variantPickerRow_9u5ly_1104:disabled{opacity:.4;cursor:not-allowed}._variantPickerRowSelected_9u5ly_1137{background:var( --bb-cta-bg-selected-subtle, color-mix(in srgb, var(--bb-cta-bg-hover, var(--bb-cta-bg, #2563eb)) 6%, transparent) )}._variantPickerLabel_9u5ly_1144{font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPickerPriceGroup_9u5ly_1153{display:flex;align-items:baseline;gap:5px;flex-shrink:0}._variantPickerPrice_9u5ly_1153{font-weight:700;color:var(--bb-text-color, #111827)}._variantPickerCompareAt_9u5ly_1165{font-size:11px;text-decoration:line-through;color:var(--bb-muted-color, rgba(15, 23, 42, .45))}._variantPickerSoldOut_9u5ly_1171{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .45))}._variantPickerCheck_9u5ly_1176{font-size:12px;font-weight:800;color:var(--bb-cta-bg, #2563eb);flex-shrink:0}._drawerSelectedList_9u5ly_1184{display:flex;flex-direction:column;border-top:1px solid var(--bb-border-color, rgba(15, 23, 42, .07))}._drawerSubRow_9u5ly_1190{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px 8px 60px;border-bottom:1px solid var(--bb-border-color, rgba(15, 23, 42, .05))}._drawerSubRow_9u5ly_1190:last-child{border-bottom:none}._drawerSubRowInfo_9u5ly_1203{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}._drawerSubRowName_9u5ly_1211{font-size:13px;font-weight:600;color:var(--bb-text-color, #111827);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:767px){._backdrop_9u5ly_1{padding:0;justify-content:stretch}._panel_9u5ly_82{width:100%;height:100%;border-radius:0}}._panel_o9snd_2 button,._panel_o9snd_2 input,._panel_o9snd_2 [role=button]{box-sizing:border-box;margin:0}._panel_o9snd_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_o9snd_20{text-align:start}._title_o9snd_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_o9snd_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_o9snd_37{font-size:13px;color:#b91c1c;font-weight:600}._section_o9snd_43{display:grid;gap:6px}._sectionTitle_o9snd_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_o9snd_57{display:flex;justify-content:center;gap:6px}._rulesList_o9snd_63{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_o9snd_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_o9snd_86{font-weight:600;font-size:13px}._ruleDiscount_o9snd_91{font-weight:700;font-size:13px}._ruleLabel_o9snd_96{font-size:12px;opacity:.7}._rulesVisual_o9snd_101{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_o9snd_108,._rulesLinesRow_o9snd_115{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_o9snd_122{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_o9snd_122:empty{display:flex!important}._rulesLineLabel_o9snd_122{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_o9snd_139{height:1em}._rulesLine_o9snd_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_o9snd_115:empty{display:block!important}._rulesLineEmpty_o9snd_156{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_o9snd_160{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_o9snd_164{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_o9snd_172{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_o9snd_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_o9snd_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_o9snd_204{cursor:pointer}._variantRowSelected_o9snd_208{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_o9snd_213{opacity:.65}._variantMedia_o9snd_217{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_o9snd_225{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_o9snd_233{display:flex;flex-direction:column;gap:4px}._variantTitle_o9snd_239{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_o9snd_245{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_o9snd_253{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_o9snd_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_o9snd_274{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_o9snd_279{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_o9snd_285{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_o9snd_292{display:grid;align-items:end;justify-items:end}._qtyActions_o9snd_298{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_o9snd_304{display:grid;justify-items:end;gap:4px}._variantUnavailable_o9snd_310{display:none}._qtyControls_o9snd_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_o9snd_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_o9snd_324:disabled{cursor:not-allowed;opacity:.4}._qtyButton_o9snd_324:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_o9snd_348{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_o9snd_355{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_o9snd_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_o9snd_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_o9snd_387{cursor:pointer}._qtyChipValue_o9snd_391{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_o9snd_397{margin-bottom:-3px;font-weight:500}._qtyChipClear_o9snd_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_o9snd_372:hover ._qtyChipClear_o9snd_402{background:#0f172a;color:#fff}._qtyChipClear_o9snd_402:disabled{cursor:not-allowed;opacity:.45}._qtyChip_o9snd_372:hover ._qtyChipClear_o9snd_402:disabled{background:#fff;color:#0f172a}._qtyTrash_o9snd_431{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_o9snd_443{display:grid;padding-top:6px}._boxSummaryWindow_o9snd_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_o9snd_448::-webkit-scrollbar{display:none}._boxSummaryRow_o9snd_462{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_o9snd_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_o9snd_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_o9snd_479:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_o9snd_496{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_o9snd_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_o9snd_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_o9snd_516{cursor:pointer}._boxItemClickable_o9snd_516:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_o9snd_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_o9snd_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_o9snd_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_o9snd_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_o9snd_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_o9snd_585{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_o9snd_593{max-height:80px;opacity:1}._ctaTotalsWrap_o9snd_598{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_o9snd_603{opacity:1}._ctaTotals_o9snd_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_o9snd_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_o9snd_629{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_o9snd_635{font-weight:700;color:#0f172a}._cta_o9snd_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_o9snd_598:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_o9snd_598:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_o9snd_667{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_o9snd_673,._ctaDualRight_o9snd_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_o9snd_673{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_o9snd_674{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_o9snd_673:disabled,._ctaDualRight_o9snd_674:disabled{cursor:not-allowed;opacity:.6}._poweredBy_o9snd_701{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_o9snd_701 a{color:inherit;text-decoration:none;font-weight:700}._productGroup_o9snd_716{display:flex;flex-direction:column;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));background:#fff;overflow:hidden}._productGroupHeader_o9snd_725{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 10px 8px 8px}._productGroupThumbWrap_o9snd_733{width:56px;height:56px;flex-shrink:0;border-radius:calc(var(--bb-border-radius, 12px) - 2px);overflow:hidden}._productGroupThumb_o9snd_733{width:100%;height:100%;object-fit:cover;display:block}._productGroupThumbFallback_o9snd_748{width:100%;height:100%;background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:16px;font-weight:700;text-transform:uppercase}._productGroupInfo_o9snd_760{display:flex;flex-direction:column;gap:5px;min-width:0}._productGroupTitle_o9snd_767{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._productGroupActions_o9snd_776{display:grid;align-items:center;justify-items:end;flex-shrink:0}._selectButton_o9snd_783{display:inline-flex;align-items:center;gap:5px;padding:7px 10px 7px 13px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .18));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .14s ease,border-color .14s ease}._selectButton_o9snd_783:hover{background:#0f172a0a}._selectButtonOpen_o9snd_804{border-color:var(--bb-focus-ring, #2563eb);color:var(--bb-cta-bg, #2563eb)}._selectButtonChevron_o9snd_809{flex-shrink:0;transition:transform .2s ease}._selectButtonOpen_o9snd_804 ._selectButtonChevron_o9snd_809{transform:rotate(180deg)}._variantPicker_o9snd_818{border-top:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));display:flex;flex-direction:column}._variantPickerRow_o9snd_824{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:none;border-bottom:1px solid var(--bb-border-color, rgba(15, 23, 42, .06));background:#f8fafccc;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:background .12s ease}._variantPickerRow_o9snd_824:last-child{border-bottom:none}._variantPickerRow_o9snd_824:hover:not(:disabled){background:#2563eb0d}._variantPickerRow_o9snd_824:disabled{opacity:.45;cursor:not-allowed}._variantPickerRowSelected_o9snd_854{background:#2563eb0a}._variantPickerLabel_o9snd_858{font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPickerPrice_o9snd_867{font-weight:700;flex-shrink:0;color:var(--bb-text-color, #111827)}._variantPickerCheck_o9snd_873{font-size:12px;font-weight:800;color:var(--bb-cta-bg, #2563eb);flex-shrink:0}._selectedVariantsList_o9snd_880{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border-top:1px solid var(--bb-border-color, rgba(15, 23, 42, .08))}._selectedVariantRow_o9snd_889{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid var(--bb-border-color, rgba(15, 23, 42, .06))}._selectedVariantRow_o9snd_889:last-child{border-bottom:none}._selectedVariantInfo_o9snd_902{display:flex;flex-direction:column;gap:2px;min-width:0}._selectedVariantName_o9snd_909{font-size:13px;font-weight:600;color:var(--bb-text-color, #111827);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._selectedVariantPrice_o9snd_918{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .55));font-weight:500}@media(max-width:640px){._panel_o9snd_2{padding:16px}._variantRow_o9snd_192{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_o9snd_314{justify-self:start}._variantDetailsRow_o9snd_245{grid-template-columns:1fr}._productGroupHeader_o9snd_725{grid-template-columns:48px minmax(0,1fr) auto}._productGroupThumbWrap_o9snd_733{width:48px;height:48px}}._panel_mo8go_1{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, 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}._title_mo8go_12{margin:0;font-size:22px;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, sans-serif);color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_mo8go_19{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65))}._error_mo8go_24{font-size:13px;font-weight:600;color:#b91c1c}._rules_mo8go_30{display:grid;gap:10px}._rule_mo8go_30{width:100%;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .12));border-radius:14px;background:#fff;padding:0;overflow:hidden}._ruleInput_mo8go_44{position:absolute;opacity:0;pointer-events:none}._ruleLabel_mo8go_50{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;padding:14px 16px!important;cursor:pointer!important}._ruleLabelContent_mo8go_59{display:flex;flex-direction:column;justify-content:flex-start;gap:4px}._ruleSelected_mo8go_66{border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08))}._ruleTitle_mo8go_71{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}._ruleSubtitle_mo8go_77{font-size:13px;color:var(--bb-tier-text, rgba(29, 78, 216, .95));font-weight:600}._priceRow_mo8go_83{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap}._oldPrice_mo8go_90{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65));text-decoration:line-through}._newPrice_mo8go_96{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { jsx as n, jsxs as I, Fragment as ct } from "react/jsx-runtime";
3
+ import It, { useCallback as _e, useState as ne, useRef as ie, useEffect as U, useMemo as $, createContext as en, useContext as tn, forwardRef as Yt, createElement as At } from "react";
4
+ const Nt = {
5
5
  bundleId: "_bundle_id",
6
6
  bundleConfig: "_bundle_config",
7
7
  bundleSource: "_bundle_source",
8
8
  bundleTitle: "_bundle_title"
9
9
  };
10
- async function Zt(n) {
11
- const e = new URL("/api/public/bundle-configs-active", n.apiBaseUrl);
12
- e.searchParams.set("shop", n.shop);
13
- const i = await (await fetch(e, {
10
+ async function nn(a) {
11
+ const e = new URL("/api/public/bundle-configs-active", a.apiBaseUrl);
12
+ e.searchParams.set("shop", a.shop);
13
+ const l = await (await fetch(e, {
14
14
  method: "GET",
15
- signal: n.signal,
15
+ signal: a.signal,
16
16
  headers: { "Content-Type": "application/json" }
17
17
  })).json().catch(() => null);
18
- return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
18
+ return !l || typeof l != "object" ? { ok: !1, error: "Invalid response." } : l;
19
19
  }
20
- async function Jt(n) {
21
- const e = new URL("/api/public/bundle-config", n.apiBaseUrl);
22
- e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle), n.fresh && e.searchParams.set("fresh", "1");
23
- const i = await (await fetch(e, {
20
+ async function an(a) {
21
+ const e = new URL("/api/public/bundle-config", a.apiBaseUrl);
22
+ e.searchParams.set("shop", a.shop), a.configHandle && e.searchParams.set("handle", a.configHandle), a.fresh && e.searchParams.set("fresh", "1");
23
+ const l = await (await fetch(e, {
24
24
  method: "GET",
25
- signal: n.signal,
25
+ signal: a.signal,
26
26
  headers: { "Content-Type": "application/json" }
27
27
  })).json().catch(() => null);
28
- return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
28
+ return !l || typeof l != "object" ? { ok: !1, error: "Invalid response." } : l;
29
29
  }
30
- async function en(n) {
31
- const e = new URL("/api/public/bundle-config-status", n.apiBaseUrl);
32
- e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle);
33
- const i = await (await fetch(e, {
30
+ async function rn(a) {
31
+ const e = new URL("/api/public/bundle-config-status", a.apiBaseUrl);
32
+ e.searchParams.set("shop", a.shop), a.configHandle && e.searchParams.set("handle", a.configHandle);
33
+ const l = await (await fetch(e, {
34
34
  method: "GET",
35
- signal: n.signal,
35
+ signal: a.signal,
36
36
  headers: { "Content-Type": "application/json" }
37
37
  })).json().catch(() => null);
38
- return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
38
+ return !l || typeof l != "object" ? { ok: !1, error: "Invalid response." } : l;
39
39
  }
40
- function St(n) {
41
- if (!n || n.availableForSale === !1) return 0;
42
- if (n.inventoryPolicy === "CONTINUE" || n.sellableOnlineQuantity == null) return Number.POSITIVE_INFINITY;
43
- const e = Number(n.sellableOnlineQuantity);
44
- return !Number.isFinite(e) || e <= 0 && n.availableForSale === !0 ? Number.POSITIVE_INFINITY : Math.max(0, Math.floor(e));
40
+ function Bt(a) {
41
+ if (!a || a.availableForSale === !1) return 0;
42
+ if (a.inventoryPolicy === "CONTINUE" || a.sellableOnlineQuantity == null) return Number.POSITIVE_INFINITY;
43
+ const e = Number(a.sellableOnlineQuantity);
44
+ return !Number.isFinite(e) || e <= 0 && a.availableForSale === !0 ? Number.POSITIVE_INFINITY : Math.max(0, Math.floor(e));
45
45
  }
46
- const At = "bb_anonymous_user_id";
47
- function yt() {
46
+ const Dt = "bb_anonymous_user_id";
47
+ function kt() {
48
48
  if (typeof window > "u" || typeof localStorage > "u")
49
49
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
50
50
  try {
51
- const n = localStorage.getItem(At);
52
- if (n && typeof n == "string" && n.length > 0)
53
- return n;
51
+ const a = localStorage.getItem(Dt);
52
+ if (a && typeof a == "string" && a.length > 0)
53
+ return a;
54
54
  let e;
55
55
  try {
56
56
  const t = globalThis.crypto;
@@ -61,17 +61,17 @@ function yt() {
61
61
  } catch {
62
62
  e = `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
63
63
  }
64
- return localStorage.setItem(At, e), e;
64
+ return localStorage.setItem(Dt, e), e;
65
65
  } catch {
66
66
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
67
67
  }
68
68
  }
69
- async function ct(n, e, t) {
69
+ async function st(a, e, t) {
70
70
  if (!(typeof window > "u"))
71
71
  try {
72
- const i = new URL(n, window.location.origin);
73
- i.searchParams.set("shop", e);
74
- const r = await fetch(i, {
72
+ const l = new URL(a, window.location.origin);
73
+ l.searchParams.set("shop", e);
74
+ const o = await fetch(l, {
75
75
  method: "POST",
76
76
  headers: {
77
77
  "Content-Type": "application/json"
@@ -80,12 +80,12 @@ async function ct(n, e, t) {
80
80
  // Don't wait for response - fire and forget
81
81
  keepalive: !0
82
82
  });
83
- r.ok || console.warn(
84
- `[Bundle Analytics] Event tracking failed with status ${r.status}:`,
85
- await r.text().catch(() => "Unable to read response")
83
+ o.ok || console.warn(
84
+ `[Bundle Analytics] Event tracking failed with status ${o.status}:`,
85
+ await o.text().catch(() => "Unable to read response")
86
86
  );
87
- } catch (i) {
88
- console.warn("[Bundle Analytics] Failed to track event:", i);
87
+ } catch (l) {
88
+ console.warn("[Bundle Analytics] Failed to track event:", l);
89
89
  }
90
90
  }
91
91
  const _t = {
@@ -131,8 +131,10 @@ const _t = {
131
131
  "bundle.a11y.sold_out": "{{name}} is sold out",
132
132
  "bundle.a11y.max_available_selected": "{{name}} max available selected",
133
133
  "bundle.a11y.increase": "Increase {{name}}",
134
- "bundle.a11y.decrease": "Decrease {{name}}"
135
- }, tn = {
134
+ "bundle.a11y.decrease": "Decrease {{name}}",
135
+ "bundle.select.variant": "Select",
136
+ "bundle.stock.sold_out_suffix": "— Sold Out"
137
+ }, on = {
136
138
  ..._t,
137
139
  "bundle.title.default": "Creez votre bundle",
138
140
  "bundle.loading": "Chargement...",
@@ -159,8 +161,17 @@ const _t = {
159
161
  "bundle.cta.add_to_basket": "Ajouter au panier",
160
162
  "bundle.cta.add_more": "Ajoutez encore {{count}} {{productWord}}",
161
163
  "bundle.powered_by": "propulse par",
162
- "bundle.button.default": "Creer un bundle"
163
- }, nn = {
164
+ "bundle.button.default": "Creer un bundle",
165
+ "bundle.a11y.add_to_bundle": "Ajouter {{name}} au bundle",
166
+ "bundle.a11y.remove_from_bundle": "Retirer {{name}} du bundle",
167
+ "bundle.a11y.quantity": "Quantite de {{name}} : {{qty}}",
168
+ "bundle.a11y.sold_out": "{{name}} est en rupture de stock",
169
+ "bundle.a11y.max_available_selected": "{{name}} quantite maximale deja selectionnee",
170
+ "bundle.a11y.increase": "Augmenter {{name}}",
171
+ "bundle.a11y.decrease": "Diminuer {{name}}",
172
+ "bundle.select.variant": "Sélectionner",
173
+ "bundle.stock.sold_out_suffix": "— Rupture de stock"
174
+ }, ln = {
164
175
  ..._t,
165
176
  "bundle.title.default": "Bundle erstellen",
166
177
  "bundle.loading": "Wird geladen...",
@@ -187,8 +198,17 @@ const _t = {
187
198
  "bundle.cta.add_to_basket": "In den Warenkorb",
188
199
  "bundle.cta.add_more": "Fuge noch {{count}} {{productWord}} hinzu",
189
200
  "bundle.powered_by": "powered by",
190
- "bundle.button.default": "Bundle erstellen"
191
- }, an = {
201
+ "bundle.button.default": "Bundle erstellen",
202
+ "bundle.a11y.add_to_bundle": "{{name}} zum Bundle hinzufügen",
203
+ "bundle.a11y.remove_from_bundle": "{{name}} aus dem Bundle entfernen",
204
+ "bundle.a11y.quantity": "{{name}} Menge {{qty}}",
205
+ "bundle.a11y.sold_out": "{{name}} ist ausverkauft",
206
+ "bundle.a11y.max_available_selected": "{{name}} maximale verfugbare Menge bereits ausgewahlt",
207
+ "bundle.a11y.increase": "{{name}} erhöhen",
208
+ "bundle.a11y.decrease": "{{name}} verringern",
209
+ "bundle.select.variant": "Auswählen",
210
+ "bundle.stock.sold_out_suffix": "— Ausverkauft"
211
+ }, sn = {
192
212
  ..._t,
193
213
  "bundle.title.default": "Crea tu bundle",
194
214
  "bundle.loading": "Cargando...",
@@ -215,51 +235,60 @@ const _t = {
215
235
  "bundle.cta.add_to_basket": "Agregar al carrito",
216
236
  "bundle.cta.add_more": "Agrega {{count}} {{productWord}} mas",
217
237
  "bundle.powered_by": "impulsado por",
218
- "bundle.button.default": "Crear bundle"
219
- }, rn = {
238
+ "bundle.button.default": "Crear bundle",
239
+ "bundle.a11y.add_to_bundle": "Agregar {{name}} al bundle",
240
+ "bundle.a11y.remove_from_bundle": "Quitar {{name}} del bundle",
241
+ "bundle.a11y.quantity": "Cantidad de {{name}}: {{qty}}",
242
+ "bundle.a11y.sold_out": "{{name}} esta agotado",
243
+ "bundle.a11y.max_available_selected": "{{name}} cantidad maxima disponible ya seleccionada",
244
+ "bundle.a11y.increase": "Aumentar {{name}}",
245
+ "bundle.a11y.decrease": "Disminuir {{name}}",
246
+ "bundle.select.variant": "Seleccionar",
247
+ "bundle.stock.sold_out_suffix": "— Agotado"
248
+ }, cn = {
220
249
  en: _t,
221
- fr: tn,
222
- de: nn,
223
- es: an
250
+ fr: on,
251
+ de: ln,
252
+ es: sn
224
253
  };
225
- function on(n) {
226
- const e = String(n ?? "").trim().toLowerCase();
254
+ function un(a) {
255
+ const e = String(a ?? "").trim().toLowerCase();
227
256
  if (!e) return "en";
228
257
  const t = e.split("-")[0] ?? "en";
229
258
  return t === "fr" || t === "de" || t === "en" || t === "es" ? t : "en";
230
259
  }
231
- function sn(n, e, t, i) {
232
- var a;
233
- const r = (i == null ? void 0 : i[e]) ?? ((a = rn[n]) == null ? void 0 : a[e]) ?? _t[e] ?? e;
234
- return t ? Object.entries(t).reduce((h, [u, S]) => h.replaceAll(`{{${u}}}`, String(S)), r) : r;
260
+ function dn(a, e, t, l) {
261
+ var r;
262
+ const o = (l == null ? void 0 : l[e]) ?? ((r = cn[a]) == null ? void 0 : r[e]) ?? _t[e] ?? e;
263
+ return t ? Object.entries(t).reduce((p, [b, F]) => p.replaceAll(`{{${b}}}`, String(F)), o) : o;
235
264
  }
236
- function ft(n, e, t) {
237
- const i = Number(n);
238
- if (!Number.isFinite(i)) return String(n);
265
+ function ft(a, e, t) {
266
+ const l = Number(a);
267
+ if (!Number.isFinite(l)) return String(a);
239
268
  if (e)
240
269
  try {
241
- return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(i);
270
+ return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(l);
242
271
  } catch {
243
272
  }
244
- return `$${i.toFixed(2)}`;
273
+ return `$${l.toFixed(2)}`;
245
274
  }
246
- function ut(n, e) {
275
+ function ut(a, e) {
247
276
  const t = e === 1 ? "one" : "many";
248
- return n === "fr" ? t === "one" ? "produit" : "produits" : n === "de" ? t === "one" ? "Produkt" : "Produkte" : n === "es" ? t === "one" ? "producto" : "productos" : t === "one" ? "product" : "products";
277
+ return a === "fr" ? t === "one" ? "produit" : "produits" : a === "de" ? t === "one" ? "Produkt" : "Produkte" : a === "es" ? t === "one" ? "producto" : "productos" : t === "one" ? "product" : "products";
249
278
  }
250
- const Qt = Kt(null), dt = "#best-bundles", ln = [];
251
- function Ge(n) {
252
- const e = String(n ?? "").trim().toLowerCase();
279
+ const Kt = en(null), dt = "#best-bundles", mn = [];
280
+ function Je(a) {
281
+ const e = String(a ?? "").trim().toLowerCase();
253
282
  return e && e.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
254
283
  }
255
- function Et(n) {
256
- const e = String(n ?? "").trim().toLowerCase();
284
+ function $t(a) {
285
+ const e = String(a ?? "").trim().toLowerCase();
257
286
  if (!e.startsWith(dt)) return null;
258
287
  if (e === dt) return "default";
259
288
  const t = `${dt}:`;
260
- return e.startsWith(t) ? Ge(e.slice(t.length)) : null;
289
+ return e.startsWith(t) ? Je(e.slice(t.length)) : null;
261
290
  }
262
- const cn = {
291
+ const hn = {
263
292
  primaryColor: "--bb-cta-bg",
264
293
  primaryHoverColor: "--bb-cta-bg-hover",
265
294
  primaryTextColor: "--bb-cta-text",
@@ -281,753 +310,753 @@ const cn = {
281
310
  celebrationBorderColor: "--bb-celebration-border",
282
311
  fontFamilyBody: "--bb-font-family-body",
283
312
  fontFamilyTitle: "--bb-font-family-title"
284
- }, Ct = "bb-google-fonts";
285
- function Dt(n) {
286
- const e = (n ?? "").trim().replace(/^["']|["']$/g, "");
313
+ }, Tt = "bb-google-fonts";
314
+ function zt(a) {
315
+ const e = (a ?? "").trim().replace(/^["']|["']$/g, "");
287
316
  return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
288
317
  }
289
- function un(n) {
290
- var u;
318
+ function bn(a) {
319
+ var b;
291
320
  if (typeof document > "u" || !document.head) return;
292
- if (!n) {
293
- (u = document.getElementById(Ct)) == null || u.remove();
321
+ if (!a) {
322
+ (b = document.getElementById(Tt)) == null || b.remove();
294
323
  return;
295
324
  }
296
- const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), i = [];
297
- e && i.push("family=" + Dt(e)), t && t !== e && i.push("family=" + Dt(t));
298
- const r = document.getElementById(Ct);
299
- if (i.length === 0) {
300
- r == null || r.remove();
325
+ const e = (a.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (a.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), l = [];
326
+ e && l.push("family=" + zt(e)), t && t !== e && l.push("family=" + zt(t));
327
+ const o = document.getElementById(Tt);
328
+ if (l.length === 0) {
329
+ o == null || o.remove();
301
330
  return;
302
331
  }
303
- const a = `https://fonts.googleapis.com/css2?${i.join("&")}&display=swap`;
304
- if (r) {
305
- r.getAttribute("href") !== a && r.setAttribute("href", a);
332
+ const r = `https://fonts.googleapis.com/css2?${l.join("&")}&display=swap`;
333
+ if (o) {
334
+ o.getAttribute("href") !== r && o.setAttribute("href", r);
306
335
  return;
307
336
  }
308
- const h = document.createElement("link");
309
- h.id = Ct, h.rel = "stylesheet", h.href = a, document.head.appendChild(h);
337
+ const p = document.createElement("link");
338
+ p.id = Tt, p.rel = "stylesheet", p.href = r, document.head.appendChild(p);
310
339
  }
311
- function qt(n) {
312
- if (!n) return;
313
- un(n);
340
+ function Wt(a) {
341
+ if (!a) return;
342
+ bn(a);
314
343
  const e = document.documentElement;
315
- Object.entries(cn).forEach(([t, i]) => {
316
- let r = n[t];
317
- r && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(r) && !/^["']/.test(r.trim()) && (r = `"${r.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(i, r));
344
+ Object.entries(hn).forEach(([t, l]) => {
345
+ let o = a[t];
346
+ o && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(o) && !/^["']/.test(o.trim()) && (o = `"${o.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(l, o));
318
347
  });
319
348
  }
320
- function $t(n) {
321
- if (typeof window > "u") return n;
349
+ function jt(a) {
350
+ if (typeof window > "u") return a;
322
351
  const e = window.__BUNDLE_PREVIEW_STYLES__;
323
- return e && typeof e == "object" ? e : n;
352
+ return e && typeof e == "object" ? e : a;
324
353
  }
325
- function dn() {
354
+ function fn() {
326
355
  try {
327
- const n = globalThis.crypto;
328
- if (n != null && n.randomUUID) return n.randomUUID();
356
+ const a = globalThis.crypto;
357
+ if (a != null && a.randomUUID) return a.randomUUID();
329
358
  } catch {
330
359
  }
331
360
  return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
332
361
  }
333
- function xt(n) {
334
- return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0;
362
+ function xt(a) {
363
+ return Number.isFinite(a) ? Math.max(0, Math.floor(a)) : 0;
335
364
  }
336
- function Bt(n, e) {
337
- const t = xt(n);
365
+ function Lt(a, e) {
366
+ const t = xt(a);
338
367
  return Number.isFinite(e) ? Math.min(t, Math.max(0, Math.floor(e))) : t;
339
368
  }
340
- function hn(n, e) {
341
- return !n && !e;
369
+ function pn(a, e) {
370
+ return !a && !e;
342
371
  }
343
- function Wi(n) {
372
+ function Fo(a) {
344
373
  const {
345
374
  apiBaseUrl: e,
346
375
  shop: t,
347
- cartAdapter: i,
348
- configHandle: r = "default",
349
- initialData: a,
350
- configFetcher: h,
351
- activeConfigsFetcher: u,
352
- configStatusFetcher: S,
353
- analyticsEndpoint: ce,
376
+ cartAdapter: l,
377
+ configHandle: o = "default",
378
+ initialData: r,
379
+ configFetcher: p,
380
+ activeConfigsFetcher: b,
381
+ configStatusFetcher: F,
382
+ analyticsEndpoint: se,
354
383
  allowDrawerWhenInactive: q = !1,
355
- locale: $,
356
- messages: me,
357
- children: M
358
- } = n, ie = on($), F = re((o, l) => sn(ie, o, l, me), [ie, me]), K = Ge(r), g = ce ?? `${e}/api/public/bundle-analytics`, j = hn(q, a), [N, se] = W(!1), [L, O] = W(!1), [X, Z] = W(null), [V, ne] = W(!1), [ue, xe] = W({}), [de, Be] = W(K), [ge, Ee] = W(() => a ? { [K]: a } : {}), [Ne, Pe] = W(j), [ke, De] = W(
359
- !j && !a ? K : null
360
- ), [at, We] = W(null), [je, Me] = W(null), [Ke, Te] = W(
384
+ locale: Y,
385
+ messages: de,
386
+ children: W
387
+ } = a, ye = un(Y), H = _e((h, w) => dn(ye, h, w, de), [ye, de]), ue = Je(o), v = se ?? `${e}/api/public/bundle-analytics`, ae = pn(q, r), [k, ge] = ne(!1), [z, E] = ne(!1), [me, ce] = ne(null), [xe, Se] = ne(!1), [be, Ve] = ne({}), [Ne, Fe] = ne(ue), [Me, Oe] = ne(() => r ? { [ue]: r } : {}), [he, ke] = ne(ae), [Pe, Ie] = ne(
388
+ !ae && !r ? ue : null
389
+ ), [tt, Ee] = ne(null), [Le, je] = ne(null), [Ge, Re] = ne(
361
390
  () => ({ selections: {}, order: [] })
362
- ), qe = Y(null), Ie = Y(null), f = Y(null), _ = Y(0), x = Y(de), R = Y(ge), A = Y(Ne), U = Y(null), Q = h ?? Jt, ae = u ?? Zt, le = S ?? en, J = re(async () => {
363
- if (typeof i.getLineQuantitiesByMerchandiseId != "function") return null;
364
- const o = await i.getLineQuantitiesByMerchandiseId();
365
- return Object.entries(o ?? {}).reduce((l, [m, w]) => {
366
- const y = xt(w);
367
- return y > 0 && (l[m] = y), l;
391
+ ), nt = ie(null), Ae = ie(null), it = ie(null), Ke = ie(0), ve = ie(Ne), De = ie(Me), $e = ie(he), qe = ie(null), ze = p ?? an, Ue = b ?? nn, m = F ?? rn, f = _e(async () => {
392
+ if (typeof l.getLineQuantitiesByMerchandiseId != "function") return null;
393
+ const h = await l.getLineQuantitiesByMerchandiseId();
394
+ return Object.entries(h ?? {}).reduce((w, [S, i]) => {
395
+ const s = xt(i);
396
+ return s > 0 && (w[S] = s), w;
368
397
  }, {});
369
- }, [i]), z = re(async () => {
370
- const o = ++_.current;
371
- ne(!0);
398
+ }, [l]), g = _e(async () => {
399
+ const h = ++Ke.current;
400
+ Se(!0);
372
401
  try {
373
- const l = await J();
374
- return l && o === _.current && xe(l), l;
402
+ const w = await f();
403
+ return w && h === Ke.current && Ve(w), w;
375
404
  } catch {
376
405
  return null;
377
406
  } finally {
378
- o === _.current && ne(!1);
407
+ h === Ke.current && Se(!1);
379
408
  }
380
- }, [J]);
381
- D(() => {
382
- x.current = de;
383
- }, [de]), D(() => {
384
- R.current = ge;
385
- }, [ge]), D(() => {
386
- A.current = Ne;
387
- }, [Ne]), D(() => {
388
- z();
389
- }, [z]);
390
- const H = re((o) => {
391
- Be(Ge(o));
392
- }, []), Le = re(() => {
393
- if (g)
409
+ }, [f]);
410
+ U(() => {
411
+ ve.current = Ne;
412
+ }, [Ne]), U(() => {
413
+ De.current = Me;
414
+ }, [Me]), U(() => {
415
+ $e.current = he;
416
+ }, [he]), U(() => {
417
+ g();
418
+ }, [g]);
419
+ const B = _e((h) => {
420
+ Fe(Je(h));
421
+ }, []), T = _e(() => {
422
+ if (v)
394
423
  try {
395
- const o = yt();
396
- ct(g, t, {
424
+ const h = kt();
425
+ st(v, t, {
397
426
  eventType: "DRAWER_CLOSED",
398
427
  shop: t,
399
- anonymousUserId: o,
428
+ anonymousUserId: h,
400
429
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
401
430
  mixpanelEvent: "bundle_closed"
402
- }).catch((l) => {
403
- console.warn("[Bundle Analytics] Failed to track drawer closed:", l);
431
+ }).catch((w) => {
432
+ console.warn("[Bundle Analytics] Failed to track drawer closed:", w);
404
433
  });
405
- } catch (o) {
406
- console.warn("[Bundle Analytics] Error in close() callback:", o);
434
+ } catch (h) {
435
+ console.warn("[Bundle Analytics] Error in close() callback:", h);
407
436
  }
408
- se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
409
- }, [g, t]), Fe = re(() => {
410
- se((o) => {
411
- if (o) return o;
412
- if (g)
437
+ ge(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
438
+ }, [v, t]), j = _e(() => {
439
+ ge((h) => {
440
+ if (h) return h;
441
+ if (v)
413
442
  try {
414
- const l = yt();
415
- ct(g, t, {
443
+ const w = kt();
444
+ st(v, t, {
416
445
  eventType: "DRAWER_OPENED",
417
446
  shop: t,
418
- anonymousUserId: l,
447
+ anonymousUserId: w,
419
448
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
420
449
  mixpanelEvent: "bundle_opened"
421
- }).catch((m) => {
422
- console.warn("[Bundle Analytics] Failed to track drawer opened:", m);
450
+ }).catch((S) => {
451
+ console.warn("[Bundle Analytics] Failed to track drawer opened:", S);
423
452
  });
424
- } catch (l) {
425
- console.warn("[Bundle Analytics] Error in open() callback:", l);
453
+ } catch (w) {
454
+ console.warn("[Bundle Analytics] Error in open() callback:", w);
426
455
  }
427
456
  return !0;
428
457
  });
429
- }, [g, t]), rt = re((o, l) => l.ok ? l.config.isActive === !1 && !q ? (Ee((m) => {
430
- if (!m[o]) return m;
431
- const w = { ...m };
432
- return delete w[o], w;
433
- }), x.current === o && (Z(F("bundle.provider.inactive_error")), se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1) : (Ee((m) => ({
434
- ...m,
435
- [o]: {
436
- currencyCode: l.currencyCode ?? null,
437
- config: l.config,
438
- eligibleVariants: l.eligibleVariants ?? []
458
+ }, [v, t]), K = _e((h, w) => w.ok ? w.config.isActive === !1 && !q ? (Oe((S) => {
459
+ if (!S[h]) return S;
460
+ const i = { ...S };
461
+ return delete i[h], i;
462
+ }), ve.current === h && (ce(H("bundle.provider.inactive_error")), ge(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1) : (Oe((S) => ({
463
+ ...S,
464
+ [h]: {
465
+ currencyCode: w.currencyCode ?? null,
466
+ config: w.config,
467
+ eligibleVariants: w.eligibleVariants ?? []
439
468
  }
440
- })), x.current === o && Z(null), !0) : (Ee((m) => {
441
- if (!m[o]) return m;
442
- const w = { ...m };
443
- return delete w[o], w;
444
- }), !q && x.current === o && (Z(l.ok ? F("bundle.provider.inactive_error") : l.error || F("bundle.provider.load_error")), se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1), [q, F]), Oe = re((o, l) => {
445
- var y;
446
- const m = Ge(o);
447
- (y = Ie.current) == null || y.abort();
448
- const w = new AbortController();
449
- Ie.current = w, l != null && l.blocking && De(m), Z(null), Q({
469
+ })), ve.current === h && ce(null), !0) : (Oe((S) => {
470
+ if (!S[h]) return S;
471
+ const i = { ...S };
472
+ return delete i[h], i;
473
+ }), !q && ve.current === h && (ce(w.ok ? H("bundle.provider.inactive_error") : w.error || H("bundle.provider.load_error")), ge(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1), [q, H]), N = _e((h, w) => {
474
+ var s;
475
+ const S = Je(h);
476
+ (s = Ae.current) == null || s.abort();
477
+ const i = new AbortController();
478
+ Ae.current = i, w != null && w.blocking && Ie(S), ce(null), ze({
450
479
  apiBaseUrl: e,
451
480
  shop: t,
452
- configHandle: m,
453
- fresh: (l == null ? void 0 : l.blocking) === !0 && !R.current[m],
454
- signal: w.signal
455
- }).then((I) => {
456
- w.signal.aborted || rt(m, I);
457
- }).catch((I) => {
458
- if (w.signal.aborted) return;
459
- const B = I instanceof Error ? I.message : F("bundle.provider.load_error");
460
- x.current === m && Z(B);
481
+ configHandle: S,
482
+ fresh: (w == null ? void 0 : w.blocking) === !0 && !De.current[S],
483
+ signal: i.signal
484
+ }).then((d) => {
485
+ i.signal.aborted || K(S, d);
486
+ }).catch((d) => {
487
+ if (i.signal.aborted) return;
488
+ const y = d instanceof Error ? d.message : H("bundle.provider.load_error");
489
+ ve.current === S && ce(y);
461
490
  }).finally(() => {
462
- w.signal.aborted || De((I) => I === m ? null : I);
491
+ i.signal.aborted || Ie((d) => d === S ? null : d);
463
492
  });
464
- }, [e, rt, Q, t, F]), he = re((o) => {
465
- const l = Ge(o), m = R.current[l];
466
- Be(l), Z(null), Oe(l, { blocking: !m });
467
- }, [Oe]), G = re((o, l = "api") => {
468
- var I, B;
469
- const m = Ge(o), w = R.current[m];
470
- if (j && A.current && !w) {
471
- Me({ handle: m, source: l });
493
+ }, [e, K, ze, t, H]), A = _e((h) => {
494
+ const w = Je(h), S = De.current[w];
495
+ Fe(w), ce(null), N(w, { blocking: !S });
496
+ }, [N]), V = _e((h, w = "api") => {
497
+ var d, y;
498
+ const S = Je(h), i = De.current[S];
499
+ if (ae && $e.current && !i) {
500
+ je({ handle: S, source: w });
472
501
  return;
473
502
  }
474
- if (Be(m), q) {
475
- Fe(), Oe(m, { blocking: !w });
503
+ if (Fe(S), q) {
504
+ j(), N(S, { blocking: !i });
476
505
  return;
477
506
  }
478
- if ((I = w == null ? void 0 : w.config) != null && I.isActive) {
479
- Z(null), Fe(), Oe(m, { blocking: !1 });
507
+ if ((d = i == null ? void 0 : i.config) != null && d.isActive) {
508
+ ce(null), j(), N(S, { blocking: !1 });
480
509
  return;
481
510
  }
482
- We(m), (B = f.current) == null || B.abort();
483
- const y = new AbortController();
484
- f.current = y, le({
511
+ Ee(S), (y = it.current) == null || y.abort();
512
+ const s = new AbortController();
513
+ it.current = s, m({
485
514
  apiBaseUrl: e,
486
515
  shop: t,
487
- configHandle: m,
488
- signal: y.signal
489
- }).then((E) => {
490
- if (!y.signal.aborted) {
491
- if (We((ee) => ee === m ? null : ee), !E.ok || E.isActive !== !0) {
492
- l === "hash" && typeof window < "u" && Et(window.location.hash) === m && window.history.replaceState(null, "", window.location.pathname + window.location.search);
516
+ configHandle: S,
517
+ signal: s.signal
518
+ }).then((C) => {
519
+ if (!s.signal.aborted) {
520
+ if (Ee((M) => M === S ? null : M), !C.ok || C.isActive !== !0) {
521
+ w === "hash" && typeof window < "u" && $t(window.location.hash) === S && window.history.replaceState(null, "", window.location.pathname + window.location.search);
493
522
  return;
494
523
  }
495
- Z(null), Be(m), Fe(), Oe(m, { blocking: !0 });
524
+ ce(null), Fe(S), j(), N(S, { blocking: !0 });
496
525
  }
497
526
  }).catch(() => {
498
- y.signal.aborted || We((E) => E === m ? null : E);
527
+ s.signal.aborted || Ee((C) => C === S ? null : C);
499
528
  });
500
529
  }, [
501
530
  q,
502
531
  e,
503
- Fe,
504
- Oe,
532
+ j,
533
+ N,
505
534
  t,
506
- le,
507
- j
508
- ]), it = re(() => {
509
- z(), G(x.current, "api");
510
- }, [G, z]);
511
- D(() => {
512
- U.current = G;
513
- }, [G]);
514
- const Ae = re(() => {
515
- if (N) {
516
- Le();
535
+ m,
536
+ ae
537
+ ]), oe = _e(() => {
538
+ g(), V(ve.current, "api");
539
+ }, [V, g]);
540
+ U(() => {
541
+ qe.current = V;
542
+ }, [V]);
543
+ const re = _e(() => {
544
+ if (k) {
545
+ T();
517
546
  return;
518
547
  }
519
- z(), G(x.current, "api");
520
- }, [Le, N, G, z]);
521
- D(() => {
522
- Be(Ge(r));
523
- }, [r]), D(() => {
524
- var l;
525
- if (!j) {
526
- Pe(!1), a || Oe(K, { blocking: !0 });
548
+ g(), V(ve.current, "api");
549
+ }, [T, k, V, g]);
550
+ U(() => {
551
+ Fe(Je(o));
552
+ }, [o]), U(() => {
553
+ var w;
554
+ if (!ae) {
555
+ ke(!1), r || N(ue, { blocking: !0 });
527
556
  return;
528
557
  }
529
- (l = qe.current) == null || l.abort();
530
- const o = new AbortController();
531
- return qe.current = o, Pe(!0), ae({ apiBaseUrl: e, shop: t, signal: o.signal }).then((m) => {
532
- o.signal.aborted || m.ok && Ee((w) => {
533
- const y = { ...w };
534
- for (const [I, B] of Object.entries(m.configs ?? {}))
535
- y[Ge(I)] = {
536
- currencyCode: B.currencyCode ?? null,
537
- config: B.config,
538
- eligibleVariants: B.eligibleVariants ?? []
558
+ (w = nt.current) == null || w.abort();
559
+ const h = new AbortController();
560
+ return nt.current = h, ke(!0), Ue({ apiBaseUrl: e, shop: t, signal: h.signal }).then((S) => {
561
+ h.signal.aborted || S.ok && Oe((i) => {
562
+ const s = { ...i };
563
+ for (const [d, y] of Object.entries(S.configs ?? {}))
564
+ s[Je(d)] = {
565
+ currencyCode: y.currencyCode ?? null,
566
+ config: y.config,
567
+ eligibleVariants: y.eligibleVariants ?? []
539
568
  };
540
- return y;
569
+ return s;
541
570
  });
542
571
  }).catch(() => {
543
572
  }).finally(() => {
544
- o.signal.aborted || Pe(!1);
545
- }), () => o.abort();
546
- }, [ae, e, a, K, Oe, t, j]), D(() => {
547
- Ne || !je || (G(je.handle, je.source), Me(null));
548
- }, [Ne, G, je]), D(() => {
573
+ h.signal.aborted || ke(!1);
574
+ }), () => h.abort();
575
+ }, [Ue, e, r, ue, N, t, ae]), U(() => {
576
+ he || !Le || (V(Le.handle, Le.source), je(null));
577
+ }, [he, V, Le]), U(() => {
549
578
  if (typeof window > "u") return;
550
- const o = () => {
551
- var m;
552
- const l = Et(window.location.hash);
553
- l && ((m = U.current) == null || m.call(U, l, "hash"));
579
+ const h = () => {
580
+ var S;
581
+ const w = $t(window.location.hash);
582
+ w && ((S = qe.current) == null || S.call(qe, w, "hash"));
554
583
  };
555
- return o(), window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
584
+ return h(), window.addEventListener("hashchange", h), () => window.removeEventListener("hashchange", h);
556
585
  }, []);
557
- const Se = ge[de] ?? null, C = (Se == null ? void 0 : Se.config) ?? null, be = (Se == null ? void 0 : Se.eligibleVariants) ?? ln, Ue = (Se == null ? void 0 : Se.currencyCode) ?? null, Ce = !C && (ke === de || at === de) || q && !C && ke != null;
558
- D(() => {
559
- const o = $t(C == null ? void 0 : C.styleSettings);
560
- o && qt(o);
561
- }, [C == null ? void 0 : C.styleSettings]), D(() => {
586
+ const G = Me[Ne] ?? null, x = (G == null ? void 0 : G.config) ?? null, D = (G == null ? void 0 : G.eligibleVariants) ?? mn, ee = (G == null ? void 0 : G.currencyCode) ?? null, Ce = !x && (Pe === Ne || tt === Ne) || q && !x && Pe != null;
587
+ U(() => {
588
+ const h = jt(x == null ? void 0 : x.styleSettings);
589
+ h && Wt(h);
590
+ }, [x == null ? void 0 : x.styleSettings]), U(() => {
562
591
  if (typeof window > "u") return;
563
- const o = () => {
564
- const l = $t(void 0);
565
- l && qt(l);
592
+ const h = () => {
593
+ const w = jt(void 0);
594
+ w && Wt(w);
566
595
  };
567
- return window.addEventListener("bundle-preview-styles-updated", o), () => window.removeEventListener("bundle-preview-styles-updated", o);
568
- }, []), D(() => {
596
+ return window.addEventListener("bundle-preview-styles-updated", h), () => window.removeEventListener("bundle-preview-styles-updated", h);
597
+ }, []), U(() => {
569
598
  if (typeof window > "u") return;
570
- const o = window, l = () => {
571
- const m = o.__BUNDLE_PREVIEW_CONFIG__;
572
- if (!m) return;
573
- const w = Array.isArray(o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__) ? o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__ : [], y = o.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
574
- Ee((I) => {
575
- var B;
599
+ const h = window, w = () => {
600
+ const S = h.__BUNDLE_PREVIEW_CONFIG__;
601
+ if (!S) return;
602
+ const i = Array.isArray(h.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__) ? h.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__ : [], s = h.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
603
+ Oe((d) => {
604
+ var y;
576
605
  return {
577
- ...I,
578
- [x.current]: {
579
- currencyCode: Ue ?? null,
580
- config: m,
581
- eligibleVariants: y ? ((B = I[x.current]) == null ? void 0 : B.eligibleVariants) ?? [] : w
606
+ ...d,
607
+ [ve.current]: {
608
+ currencyCode: ee ?? null,
609
+ config: S,
610
+ eligibleVariants: s ? ((y = d[ve.current]) == null ? void 0 : y.eligibleVariants) ?? [] : i
582
611
  }
583
612
  };
584
- }), De(y ? x.current : (I) => I === x.current ? null : I);
613
+ }), Ie(s ? ve.current : (d) => d === ve.current ? null : d);
585
614
  };
586
- return o.__BUNDLE_PREVIEW_CONFIG__ && l(), window.addEventListener("bundle-preview-config-updated", l), () => window.removeEventListener("bundle-preview-config-updated", l);
587
- }, [Ue]);
588
- const ot = P(() => {
589
- const o = Number((C == null ? void 0 : C.maxBundleSize) ?? Number.NaN), l = Number.isFinite(o) ? Math.floor(o) : 100;
590
- return Math.max(2, Math.min(100, l));
591
- }, [C == null ? void 0 : C.maxBundleSize]), He = P(() => new Map(
592
- be.map((o) => {
593
- const l = St(o);
594
- if (!Number.isFinite(l)) return [o.id, l];
595
- const m = xt(ue[o.id] ?? 0);
596
- return [o.id, Math.max(0, Math.floor(l) - m)];
615
+ return h.__BUNDLE_PREVIEW_CONFIG__ && w(), window.addEventListener("bundle-preview-config-updated", w), () => window.removeEventListener("bundle-preview-config-updated", w);
616
+ }, [ee]);
617
+ const X = $(() => {
618
+ const h = Number((x == null ? void 0 : x.maxBundleSize) ?? Number.NaN), w = Number.isFinite(h) ? Math.floor(h) : 100;
619
+ return Math.max(2, Math.min(100, w));
620
+ }, [x == null ? void 0 : x.maxBundleSize]), He = $(() => new Map(
621
+ D.map((h) => {
622
+ const w = Bt(h);
623
+ if (!Number.isFinite(w)) return [h.id, w];
624
+ const S = xt(be[h.id] ?? 0);
625
+ return [h.id, Math.max(0, Math.floor(w) - S)];
597
626
  })
598
- ), [be, ue]), Qe = P(() => new Set(
599
- be.filter((o) => St(o) > 0).map((o) => o.id)
600
- ), [be]), Re = P(() => {
601
- const o = (C == null ? void 0 : C.rules) ?? [], l = o.length ? Math.min(...o.map((I) => I.minBundleSize)) : 2, m = Number.isFinite(l) && l > 0 ? l : 2, w = Number((C == null ? void 0 : C.minBundleSize) ?? Number.NaN), y = Number.isFinite(w) && Number.isInteger(w) ? Math.max(2, Math.min(100, w)) : null;
602
- return y == null ? m : Math.min(m, y);
603
- }, [C == null ? void 0 : C.minBundleSize, C == null ? void 0 : C.rules]), ht = re((o, l) => {
604
- if (V || !Qe.has(o) && !Ce)
627
+ ), [D, be]), Qe = $(() => new Set(
628
+ D.filter((h) => Bt(h) > 0).map((h) => h.id)
629
+ ), [D]), Be = $(() => {
630
+ const h = (x == null ? void 0 : x.rules) ?? [], w = h.length ? Math.min(...h.map((d) => d.minBundleSize)) : 2, S = Number.isFinite(w) && w > 0 ? w : 2, i = Number((x == null ? void 0 : x.minBundleSize) ?? Number.NaN), s = Number.isFinite(i) && Number.isInteger(i) ? Math.max(2, Math.min(100, i)) : null;
631
+ return s == null ? S : Math.min(S, s);
632
+ }, [x == null ? void 0 : x.minBundleSize, x == null ? void 0 : x.rules]), vt = _e((h, w) => {
633
+ if (xe || !Qe.has(h) && !Ce)
605
634
  return;
606
- const m = He.get(o) ?? (Ce ? Number.POSITIVE_INFINITY : 0), w = Bt(l, m);
607
- Te((y) => {
608
- const I = y.selections[o] ?? 0, B = w - I, E = Object.values(y.selections).reduce((ye, _e) => ye + (_e || 0), 0), ee = Number.isFinite(m) ? Math.max(0, Math.floor(m) - I) : B, te = B > 0 ? Math.min(
609
- B,
610
- Math.max(0, ot - E),
611
- ee
612
- ) : B, pe = I + te;
613
- let we;
614
- if (pe <= 0) {
615
- const ye = { ...y.selections };
616
- delete ye[o], we = ye;
617
- } else I === pe ? we = y.selections : we = { ...y.selections, [o]: pe };
618
- let ze = y.order;
619
- if (te > 0)
620
- ze = [...y.order, ...Array.from({ length: te }, () => o)];
621
- else if (te < 0) {
622
- let ye = -te;
623
- const _e = [];
624
- for (let lt = y.order.length - 1; lt >= 0; lt--) {
625
- const k = y.order[lt];
626
- if (k === o && ye > 0) {
627
- ye--;
635
+ const S = He.get(h) ?? (Ce ? Number.POSITIVE_INFINITY : 0), i = Lt(w, S);
636
+ Re((s) => {
637
+ const d = s.selections[h] ?? 0, y = i - d, C = Object.values(s.selections).reduce((te, J) => te + (J || 0), 0), M = Number.isFinite(S) ? Math.max(0, Math.floor(S) - d) : y, P = y > 0 ? Math.min(
638
+ y,
639
+ Math.max(0, X - C),
640
+ M
641
+ ) : y, _ = d + P;
642
+ let R;
643
+ if (_ <= 0) {
644
+ const te = { ...s.selections };
645
+ delete te[h], R = te;
646
+ } else d === _ ? R = s.selections : R = { ...s.selections, [h]: _ };
647
+ let O = s.order;
648
+ if (P > 0)
649
+ O = [...s.order, ...Array.from({ length: P }, () => h)];
650
+ else if (P < 0) {
651
+ let te = -P;
652
+ const J = [];
653
+ for (let fe = s.order.length - 1; fe >= 0; fe--) {
654
+ const L = s.order[fe];
655
+ if (L === h && te > 0) {
656
+ te--;
628
657
  continue;
629
658
  }
630
- _e.push(k);
659
+ J.push(L);
631
660
  }
632
- _e.reverse(), ze = _e;
661
+ J.reverse(), O = J;
633
662
  }
634
- if (we === y.selections && ze === y.order) return y;
635
- const et = E, tt = Object.values(we).reduce((ye, _e) => ye + (_e || 0), 0);
636
- if (g)
663
+ if (R === s.selections && O === s.order) return s;
664
+ const Z = C, le = Object.values(R).reduce((te, J) => te + (J || 0), 0);
665
+ if (v)
637
666
  try {
638
- const ye = yt(), _e = {
667
+ const te = kt(), J = {
639
668
  eventType: "VARIANT_SELECTION_CHANGED",
640
669
  shop: t,
641
- anonymousUserId: ye,
642
- before: { ...y.selections },
643
- after: { ...we },
670
+ anonymousUserId: te,
671
+ before: { ...s.selections },
672
+ after: { ...R },
644
673
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
645
674
  };
646
- ct(g, t, _e), et === 0 && tt >= 1 && ct(g, t, {
647
- ..._e,
675
+ st(v, t, J), Z === 0 && le >= 1 && st(v, t, {
676
+ ...J,
648
677
  mixpanelEvent: "bundle_started"
649
- }), et < Re && tt >= Re && ct(g, t, {
650
- ..._e,
678
+ }), Z < Be && le >= Be && st(v, t, {
679
+ ...J,
651
680
  mixpanelEvent: "bundle_completed"
652
681
  });
653
682
  } catch {
654
683
  }
655
- return { selections: we, order: ze };
684
+ return { selections: R, order: O };
656
685
  });
657
- }, [g, V, Qe, Ce, ot, Re, t, He]);
658
- D(() => {
659
- Ce || Te((o) => {
660
- const l = Object.entries(o.selections).map(([I, B]) => {
661
- if (!Qe.has(I)) return null;
662
- const E = He.get(I) ?? 0, ee = Bt(B, E);
663
- return ee <= 0 ? null : [I, ee];
664
- }).filter(Boolean), m = Object.fromEntries(l), w = new Map(l), y = o.order.filter((I) => {
665
- const B = w.get(I) ?? 0;
666
- return B <= 0 ? !1 : (w.set(I, B - 1), !0);
686
+ }, [v, xe, Qe, Ce, X, Be, t, He]);
687
+ U(() => {
688
+ Ce || Re((h) => {
689
+ const w = Object.entries(h.selections).map(([d, y]) => {
690
+ if (!Qe.has(d)) return null;
691
+ const C = He.get(d) ?? 0, M = Lt(y, C);
692
+ return M <= 0 ? null : [d, M];
693
+ }).filter(Boolean), S = Object.fromEntries(w), i = new Map(w), s = h.order.filter((d) => {
694
+ const y = i.get(d) ?? 0;
695
+ return y <= 0 ? !1 : (i.set(d, y - 1), !0);
667
696
  });
668
- return y.length === o.order.length && l.length === Object.keys(o.selections).length && l.every(([I, B]) => o.selections[I] === B) ? o : { selections: m, order: y };
697
+ return s.length === h.order.length && w.length === Object.keys(h.selections).length && w.every(([d, y]) => h.selections[d] === y) ? h : { selections: S, order: s };
669
698
  });
670
- }, [Qe, Ce, He]), D(() => {
671
- Te({ selections: {}, order: [] });
672
- }, [de]);
673
- const Xe = re(() => Te({ selections: {}, order: [] }), []), st = re(async () => {
674
- await z();
675
- }, [z]), mt = re((o) => {
676
- const l = He.get(o);
677
- return l == null || !Number.isFinite(l) ? null : Math.max(0, Math.floor(l));
678
- }, [He]), $e = Ke.selections, bt = Ke.order, Ve = P(() => Object.values($e).reduce((o, l) => o + (l || 0), 0), [$e]), Ze = P(() => !(Ce || V || L || X || !(C != null && C.isActive) || Ve < Re), [Ve, V, C == null ? void 0 : C.isActive, X, Ce, Re, L]), Je = re(async (o) => {
679
- var _e, lt;
680
- if (!Ze || !C) return;
681
- const l = dn(), m = (C.title ?? "").trim().slice(0, 255), w = await z(), y = new Map(
682
- be.map((k) => {
683
- const fe = St(k);
684
- if (!Number.isFinite(fe)) return [k.id, fe];
685
- const nt = xt((w ?? ue)[k.id] ?? 0);
686
- return [k.id, Math.max(0, Math.floor(fe) - nt)];
699
+ }, [Qe, Ce, He]), U(() => {
700
+ Re({ selections: {}, order: [] });
701
+ }, [Ne]);
702
+ const at = _e(() => Re({ selections: {}, order: [] }), []), ot = _e(async () => {
703
+ await g();
704
+ }, [g]), wt = _e((h) => {
705
+ const w = He.get(h);
706
+ return w == null || !Number.isFinite(w) ? null : Math.max(0, Math.floor(w));
707
+ }, [He]), Xe = Ge.selections, lt = Ge.order, Ye = $(() => Object.values(Xe).reduce((h, w) => h + (w || 0), 0), [Xe]), rt = $(() => !(Ce || xe || z || me || !(x != null && x.isActive) || Ye < Be), [Ye, xe, x == null ? void 0 : x.isActive, me, Ce, Be, z]), Ze = _e(async (h) => {
708
+ var J, fe;
709
+ if (!rt || !x) return;
710
+ const w = fn(), S = (x.title ?? "").trim().slice(0, 255), i = await g(), s = new Map(
711
+ D.map((L) => {
712
+ const Q = Bt(L);
713
+ if (!Number.isFinite(Q)) return [L.id, Q];
714
+ const pe = xt((i ?? be)[L.id] ?? 0);
715
+ return [L.id, Math.max(0, Math.floor(Q) - pe)];
687
716
  })
688
- ), I = Object.entries($e).map(([k, fe]) => ({
689
- merchandiseId: k,
690
- quantity: Bt(fe, y.get(k) ?? 0)
691
- })).filter((k) => k.quantity > 0).filter((k) => Qe.has(k.merchandiseId)).map((k) => ({
692
- merchandiseId: k.merchandiseId,
693
- quantity: k.quantity,
717
+ ), d = Object.entries(Xe).map(([L, Q]) => ({
718
+ merchandiseId: L,
719
+ quantity: Lt(Q, s.get(L) ?? 0)
720
+ })).filter((L) => L.quantity > 0).filter((L) => Qe.has(L.merchandiseId)).map((L) => ({
721
+ merchandiseId: L.merchandiseId,
722
+ quantity: L.quantity,
694
723
  attributes: [
695
- { key: wt.bundleId, value: l },
696
- { key: wt.bundleConfig, value: de },
697
- { key: wt.bundleSource, value: "bundle_builder" },
698
- ...m ? [{ key: wt.bundleTitle, value: m }] : []
724
+ { key: Nt.bundleId, value: w },
725
+ { key: Nt.bundleConfig, value: Ne },
726
+ { key: Nt.bundleSource, value: "bundle_builder" },
727
+ ...S ? [{ key: Nt.bundleTitle, value: S }] : []
699
728
  ]
700
729
  }));
701
- if (!I.length) return;
702
- const B = new Map(be.map((k) => [k.id, k]));
703
- let E = 0;
704
- for (const k of I) {
705
- const fe = k.quantity ?? 0;
706
- if (fe <= 0) continue;
707
- const nt = B.get(k.merchandiseId), Ot = Number(nt == null ? void 0 : nt.price);
708
- Number.isFinite(Ot) && (E += Ot * fe);
730
+ if (!d.length) return;
731
+ const y = new Map(D.map((L) => [L.id, L]));
732
+ let C = 0;
733
+ for (const L of d) {
734
+ const Q = L.quantity ?? 0;
735
+ if (Q <= 0) continue;
736
+ const pe = y.get(L.merchandiseId), We = Number(pe == null ? void 0 : pe.price);
737
+ Number.isFinite(We) && (C += We * Q);
709
738
  }
710
- E = Math.round(E * 100) / 100;
711
- const ee = [...C.rules ?? []].sort((k, fe) => k.minBundleSize - fe.minBundleSize);
712
- let te = null;
713
- for (const k of ee)
714
- Ve >= k.minBundleSize && (te = k);
715
- const pe = te ? (() => {
716
- const k = Number.parseFloat(te.discountPercent);
717
- return Number.isFinite(k) && k > 0 ? k : null;
718
- })() : null, we = pe ? Math.round(E * (1 - pe / 100) * 100) / 100 : E, ze = E - we, et = I.map((k) => k.merchandiseId), tt = (te == null ? void 0 : te.handle) ?? "", ye = ((_e = te == null ? void 0 : te.label) == null ? void 0 : _e.trim()) || "";
719
- O(!0);
739
+ C = Math.round(C * 100) / 100;
740
+ const M = [...x.rules ?? []].sort((L, Q) => L.minBundleSize - Q.minBundleSize);
741
+ let P = null;
742
+ for (const L of M)
743
+ Ye >= L.minBundleSize && (P = L);
744
+ const _ = P ? (() => {
745
+ const L = Number.parseFloat(P.discountPercent);
746
+ return Number.isFinite(L) && L > 0 ? L : null;
747
+ })() : null, R = _ ? Math.round(C * (1 - _ / 100) * 100) / 100 : C, O = C - R, Z = d.map((L) => L.merchandiseId), le = (P == null ? void 0 : P.handle) ?? "", te = ((J = P == null ? void 0 : P.label) == null ? void 0 : J.trim()) || "";
748
+ E(!0);
720
749
  try {
721
- if (o != null && o.checkout ? await i.linesAddForCheckout(I) : await i.linesAdd(I), g)
750
+ if (h != null && h.checkout ? await l.linesAddForCheckout(d) : await l.linesAdd(d), v)
722
751
  try {
723
- const k = yt(), fe = !!(o != null && o.checkout);
724
- ct(g, t, {
752
+ const L = kt(), Q = !!(h != null && h.checkout);
753
+ st(v, t, {
725
754
  eventType: "BUNDLE_ADDED_TO_BASKET",
726
755
  shop: t,
727
- anonymousUserId: k,
728
- bundleId: l,
729
- productVariantIds: et,
730
- grossPrice: E,
731
- discountedPrice: we,
732
- currency: Ue ?? void 0,
733
- discountThresholdIdentifier: tt,
734
- discountLabel: ye,
735
- discountPercentage: pe,
736
- discountedAmount: ze,
756
+ anonymousUserId: L,
757
+ bundleId: w,
758
+ productVariantIds: Z,
759
+ grossPrice: C,
760
+ discountedPrice: R,
761
+ currency: ee ?? void 0,
762
+ discountThresholdIdentifier: le,
763
+ discountLabel: te,
764
+ discountPercentage: _,
765
+ discountedAmount: O,
737
766
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
738
- checkout: fe,
739
- mixpanelEvent: fe ? "checkout_started_with_bundle" : "bundle_added_to_cart"
767
+ checkout: Q,
768
+ mixpanelEvent: Q ? "checkout_started_with_bundle" : "bundle_added_to_cart"
740
769
  });
741
770
  } catch {
742
771
  }
743
- Xe(), Le(), z(), (lt = o == null ? void 0 : o.onComplete) == null || lt.call(o), Z(null);
744
- } catch (k) {
745
- const fe = k instanceof Error ? k.message : "", nt = /stock|sold out|inventory|insufficient|available|422/i.test(fe);
746
- Z(
747
- F(nt ? "bundle.provider.stock_error" : "bundle.provider.add_error")
748
- ), z();
772
+ at(), T(), g(), (fe = h == null ? void 0 : h.onComplete) == null || fe.call(h), ce(null);
773
+ } catch (L) {
774
+ const Q = L instanceof Error ? L.message : "", pe = /stock|sold out|inventory|insufficient|available|422/i.test(Q);
775
+ ce(
776
+ H(pe ? "bundle.provider.stock_error" : "bundle.provider.add_error")
777
+ ), g();
749
778
  } finally {
750
- O(!1);
779
+ E(!1);
751
780
  }
752
781
  }, [
782
+ v,
783
+ Ye,
784
+ rt,
785
+ l,
786
+ at,
787
+ T,
788
+ x,
789
+ ee,
790
+ be,
791
+ Ne,
792
+ Qe,
793
+ D,
753
794
  g,
754
- Ve,
755
- Ze,
756
- i,
757
795
  Xe,
758
- Le,
759
- C,
760
- Ue,
761
- ue,
762
- de,
763
- Qe,
764
- be,
765
- z,
766
- $e,
767
796
  t,
768
- F
769
- ]), c = re(async () => {
770
- await Je({
797
+ H
798
+ ]), mt = _e(async () => {
799
+ await Ze({
771
800
  onComplete: () => {
772
- var o;
773
- (o = i.openCartUI) == null || o.call(i);
801
+ var h;
802
+ (h = l.openCartUI) == null || h.call(l);
774
803
  }
775
804
  });
776
- }, [i, Je]), d = re(async () => {
777
- await Je({
805
+ }, [l, Ze]), ht = _e(async () => {
806
+ await Ze({
778
807
  checkout: !0,
779
808
  onComplete: () => {
780
- var o;
781
- (o = i.navigateToCheckout) == null || o.call(i);
809
+ var h;
810
+ (h = l.navigateToCheckout) == null || h.call(l);
782
811
  }
783
812
  });
784
- }, [i, Je]), v = P(() => ({
785
- isOpen: N,
786
- open: it,
787
- openForHandle: G,
788
- close: Le,
789
- toggle: Ae,
790
- currentHandle: de,
791
- setConfigHandle: H,
792
- loadHandle: he,
793
- syncCartQuantities: st,
813
+ }, [l, Ze]), gt = $(() => ({
814
+ isOpen: k,
815
+ open: oe,
816
+ openForHandle: V,
817
+ close: T,
818
+ toggle: re,
819
+ currentHandle: Ne,
820
+ setConfigHandle: B,
821
+ loadHandle: A,
822
+ syncCartQuantities: ot,
794
823
  loading: Ce,
795
- submitting: L,
796
- error: X,
797
- currencyCode: Ue,
798
- config: C,
799
- eligibleVariants: be,
800
- selections: $e,
801
- selectionOrder: bt,
802
- getVariantMaxSelectableQuantity: mt,
803
- setQuantity: ht,
804
- clearSelections: Xe,
805
- bundleSize: Ve,
806
- minRequired: Re,
807
- canSubmit: Ze,
808
- submit: c,
809
- submitAndCheckout: d,
810
- locale: ie,
811
- t: F
824
+ submitting: z,
825
+ error: me,
826
+ currencyCode: ee,
827
+ config: x,
828
+ eligibleVariants: D,
829
+ selections: Xe,
830
+ selectionOrder: lt,
831
+ getVariantMaxSelectableQuantity: wt,
832
+ setQuantity: vt,
833
+ clearSelections: at,
834
+ bundleSize: Ye,
835
+ minRequired: Be,
836
+ canSubmit: rt,
837
+ submit: mt,
838
+ submitAndCheckout: ht,
839
+ locale: ye,
840
+ t: H
812
841
  }), [
813
- Ve,
814
- Ze,
815
- Xe,
816
- Le,
817
- C,
818
- Ue,
819
- de,
820
- be,
821
- X,
822
- N,
842
+ Ye,
843
+ rt,
844
+ at,
845
+ T,
846
+ x,
847
+ ee,
848
+ Ne,
849
+ D,
850
+ me,
851
+ k,
823
852
  Ce,
824
- Re,
825
- it,
826
- G,
827
- bt,
828
- $e,
829
- H,
830
- he,
831
- st,
853
+ Be,
854
+ oe,
855
+ V,
856
+ lt,
857
+ Xe,
858
+ B,
859
+ A,
860
+ ot,
861
+ wt,
862
+ vt,
832
863
  mt,
833
864
  ht,
834
- c,
835
- d,
836
- L,
837
- Ae,
838
- ie,
839
- F
865
+ z,
866
+ re,
867
+ ye,
868
+ H
840
869
  ]);
841
- return /* @__PURE__ */ s(Qt.Provider, { value: v, children: M });
870
+ return /* @__PURE__ */ n(Kt.Provider, { value: gt, children: W });
842
871
  }
843
- function gt() {
844
- const n = Xt(Qt);
845
- if (!n)
872
+ function yt() {
873
+ const a = tn(Kt);
874
+ if (!a)
846
875
  throw new Error("useBundleBuilder must be used within <BundleProvider />");
847
- return n;
876
+ return a;
848
877
  }
849
- function ji() {
850
- const { isOpen: n, open: e, close: t, toggle: i } = gt();
851
- return { isOpen: n, open: e, close: t, toggle: i };
878
+ function Mo() {
879
+ const { isOpen: a, open: e, close: t, toggle: l } = yt();
880
+ return { isOpen: a, open: e, close: t, toggle: l };
852
881
  }
853
- const mn = "_button_18rtl_1", bn = {
854
- button: mn
882
+ const _n = "_button_18rtl_1", yn = {
883
+ button: _n
855
884
  };
856
- function Ui(n) {
857
- const { toggle: e, t } = gt();
858
- return /* @__PURE__ */ s(
885
+ function Oo(a) {
886
+ const { toggle: e, t } = yt();
887
+ return /* @__PURE__ */ n(
859
888
  "button",
860
889
  {
861
890
  type: "button",
862
891
  onClick: e,
863
- className: [bn.button, n.className].filter(Boolean).join(" "),
864
- children: n.children ?? t("bundle.button.default")
892
+ className: [yn.button, a.className].filter(Boolean).join(" "),
893
+ children: a.children ?? t("bundle.button.default")
865
894
  }
866
895
  );
867
896
  }
868
- var kt, Vt;
869
- function fn() {
870
- if (Vt) return kt;
871
- Vt = 1;
872
- var n = {
873
- linear: function(e, t, i, r) {
874
- var a = i - t;
875
- return a * e / r + t;
897
+ var Rt, Gt;
898
+ function vn() {
899
+ if (Gt) return Rt;
900
+ Gt = 1;
901
+ var a = {
902
+ linear: function(e, t, l, o) {
903
+ var r = l - t;
904
+ return r * e / o + t;
876
905
  },
877
- easeInQuad: function(e, t, i, r) {
878
- var a = i - t;
879
- return a * (e /= r) * e + t;
906
+ easeInQuad: function(e, t, l, o) {
907
+ var r = l - t;
908
+ return r * (e /= o) * e + t;
880
909
  },
881
- easeOutQuad: function(e, t, i, r) {
882
- var a = i - t;
883
- return -a * (e /= r) * (e - 2) + t;
910
+ easeOutQuad: function(e, t, l, o) {
911
+ var r = l - t;
912
+ return -r * (e /= o) * (e - 2) + t;
884
913
  },
885
- easeInOutQuad: function(e, t, i, r) {
886
- var a = i - t;
887
- return (e /= r / 2) < 1 ? a / 2 * e * e + t : -a / 2 * (--e * (e - 2) - 1) + t;
914
+ easeInOutQuad: function(e, t, l, o) {
915
+ var r = l - t;
916
+ return (e /= o / 2) < 1 ? r / 2 * e * e + t : -r / 2 * (--e * (e - 2) - 1) + t;
888
917
  },
889
- easeInCubic: function(e, t, i, r) {
890
- var a = i - t;
891
- return a * (e /= r) * e * e + t;
918
+ easeInCubic: function(e, t, l, o) {
919
+ var r = l - t;
920
+ return r * (e /= o) * e * e + t;
892
921
  },
893
- easeOutCubic: function(e, t, i, r) {
894
- var a = i - t;
895
- return a * ((e = e / r - 1) * e * e + 1) + t;
922
+ easeOutCubic: function(e, t, l, o) {
923
+ var r = l - t;
924
+ return r * ((e = e / o - 1) * e * e + 1) + t;
896
925
  },
897
- easeInOutCubic: function(e, t, i, r) {
898
- var a = i - t;
899
- return (e /= r / 2) < 1 ? a / 2 * e * e * e + t : a / 2 * ((e -= 2) * e * e + 2) + t;
926
+ easeInOutCubic: function(e, t, l, o) {
927
+ var r = l - t;
928
+ return (e /= o / 2) < 1 ? r / 2 * e * e * e + t : r / 2 * ((e -= 2) * e * e + 2) + t;
900
929
  },
901
- easeInQuart: function(e, t, i, r) {
902
- var a = i - t;
903
- return a * (e /= r) * e * e * e + t;
930
+ easeInQuart: function(e, t, l, o) {
931
+ var r = l - t;
932
+ return r * (e /= o) * e * e * e + t;
904
933
  },
905
- easeOutQuart: function(e, t, i, r) {
906
- var a = i - t;
907
- return -a * ((e = e / r - 1) * e * e * e - 1) + t;
934
+ easeOutQuart: function(e, t, l, o) {
935
+ var r = l - t;
936
+ return -r * ((e = e / o - 1) * e * e * e - 1) + t;
908
937
  },
909
- easeInOutQuart: function(e, t, i, r) {
910
- var a = i - t;
911
- return (e /= r / 2) < 1 ? a / 2 * e * e * e * e + t : -a / 2 * ((e -= 2) * e * e * e - 2) + t;
938
+ easeInOutQuart: function(e, t, l, o) {
939
+ var r = l - t;
940
+ return (e /= o / 2) < 1 ? r / 2 * e * e * e * e + t : -r / 2 * ((e -= 2) * e * e * e - 2) + t;
912
941
  },
913
- easeInQuint: function(e, t, i, r) {
914
- var a = i - t;
915
- return a * (e /= r) * e * e * e * e + t;
942
+ easeInQuint: function(e, t, l, o) {
943
+ var r = l - t;
944
+ return r * (e /= o) * e * e * e * e + t;
916
945
  },
917
- easeOutQuint: function(e, t, i, r) {
918
- var a = i - t;
919
- return a * ((e = e / r - 1) * e * e * e * e + 1) + t;
946
+ easeOutQuint: function(e, t, l, o) {
947
+ var r = l - t;
948
+ return r * ((e = e / o - 1) * e * e * e * e + 1) + t;
920
949
  },
921
- easeInOutQuint: function(e, t, i, r) {
922
- var a = i - t;
923
- return (e /= r / 2) < 1 ? a / 2 * e * e * e * e * e + t : a / 2 * ((e -= 2) * e * e * e * e + 2) + t;
950
+ easeInOutQuint: function(e, t, l, o) {
951
+ var r = l - t;
952
+ return (e /= o / 2) < 1 ? r / 2 * e * e * e * e * e + t : r / 2 * ((e -= 2) * e * e * e * e + 2) + t;
924
953
  },
925
- easeInSine: function(e, t, i, r) {
926
- var a = i - t;
927
- return -a * Math.cos(e / r * (Math.PI / 2)) + a + t;
954
+ easeInSine: function(e, t, l, o) {
955
+ var r = l - t;
956
+ return -r * Math.cos(e / o * (Math.PI / 2)) + r + t;
928
957
  },
929
- easeOutSine: function(e, t, i, r) {
930
- var a = i - t;
931
- return a * Math.sin(e / r * (Math.PI / 2)) + t;
958
+ easeOutSine: function(e, t, l, o) {
959
+ var r = l - t;
960
+ return r * Math.sin(e / o * (Math.PI / 2)) + t;
932
961
  },
933
- easeInOutSine: function(e, t, i, r) {
934
- var a = i - t;
935
- return -a / 2 * (Math.cos(Math.PI * e / r) - 1) + t;
962
+ easeInOutSine: function(e, t, l, o) {
963
+ var r = l - t;
964
+ return -r / 2 * (Math.cos(Math.PI * e / o) - 1) + t;
936
965
  },
937
- easeInExpo: function(e, t, i, r) {
938
- var a = i - t;
939
- return e == 0 ? t : a * Math.pow(2, 10 * (e / r - 1)) + t;
966
+ easeInExpo: function(e, t, l, o) {
967
+ var r = l - t;
968
+ return e == 0 ? t : r * Math.pow(2, 10 * (e / o - 1)) + t;
940
969
  },
941
- easeOutExpo: function(e, t, i, r) {
942
- var a = i - t;
943
- return e == r ? t + a : a * (-Math.pow(2, -10 * e / r) + 1) + t;
970
+ easeOutExpo: function(e, t, l, o) {
971
+ var r = l - t;
972
+ return e == o ? t + r : r * (-Math.pow(2, -10 * e / o) + 1) + t;
944
973
  },
945
- easeInOutExpo: function(e, t, i, r) {
946
- var a = i - t;
947
- return e === 0 ? t : e === r ? t + a : (e /= r / 2) < 1 ? a / 2 * Math.pow(2, 10 * (e - 1)) + t : a / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
974
+ easeInOutExpo: function(e, t, l, o) {
975
+ var r = l - t;
976
+ return e === 0 ? t : e === o ? t + r : (e /= o / 2) < 1 ? r / 2 * Math.pow(2, 10 * (e - 1)) + t : r / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
948
977
  },
949
- easeInCirc: function(e, t, i, r) {
950
- var a = i - t;
951
- return -a * (Math.sqrt(1 - (e /= r) * e) - 1) + t;
978
+ easeInCirc: function(e, t, l, o) {
979
+ var r = l - t;
980
+ return -r * (Math.sqrt(1 - (e /= o) * e) - 1) + t;
952
981
  },
953
- easeOutCirc: function(e, t, i, r) {
954
- var a = i - t;
955
- return a * Math.sqrt(1 - (e = e / r - 1) * e) + t;
982
+ easeOutCirc: function(e, t, l, o) {
983
+ var r = l - t;
984
+ return r * Math.sqrt(1 - (e = e / o - 1) * e) + t;
956
985
  },
957
- easeInOutCirc: function(e, t, i, r) {
958
- var a = i - t;
959
- return (e /= r / 2) < 1 ? -a / 2 * (Math.sqrt(1 - e * e) - 1) + t : a / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
986
+ easeInOutCirc: function(e, t, l, o) {
987
+ var r = l - t;
988
+ return (e /= o / 2) < 1 ? -r / 2 * (Math.sqrt(1 - e * e) - 1) + t : r / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
960
989
  },
961
- easeInElastic: function(e, t, i, r) {
962
- var a = i - t, h, u, S;
963
- return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r) === 1 ? t + a : (u || (u = r * 0.3), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), -(h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u)) + t);
990
+ easeInElastic: function(e, t, l, o) {
991
+ var r = l - t, p, b, F;
992
+ return F = 1.70158, b = 0, p = r, e === 0 ? t : (e /= o) === 1 ? t + r : (b || (b = o * 0.3), p < Math.abs(r) ? (p = r, F = b / 4) : F = b / (2 * Math.PI) * Math.asin(r / p), -(p * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * o - F) * (2 * Math.PI) / b)) + t);
964
993
  },
965
- easeOutElastic: function(e, t, i, r) {
966
- var a = i - t, h, u, S;
967
- return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r) === 1 ? t + a : (u || (u = r * 0.3), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), h * Math.pow(2, -10 * e) * Math.sin((e * r - S) * (2 * Math.PI) / u) + a + t);
994
+ easeOutElastic: function(e, t, l, o) {
995
+ var r = l - t, p, b, F;
996
+ return F = 1.70158, b = 0, p = r, e === 0 ? t : (e /= o) === 1 ? t + r : (b || (b = o * 0.3), p < Math.abs(r) ? (p = r, F = b / 4) : F = b / (2 * Math.PI) * Math.asin(r / p), p * Math.pow(2, -10 * e) * Math.sin((e * o - F) * (2 * Math.PI) / b) + r + t);
968
997
  },
969
- easeInOutElastic: function(e, t, i, r) {
970
- var a = i - t, h, u, S;
971
- return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r / 2) === 2 ? t + a : (u || (u = r * (0.3 * 1.5)), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), e < 1 ? -0.5 * (h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u)) + t : h * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u) * 0.5 + a + t);
998
+ easeInOutElastic: function(e, t, l, o) {
999
+ var r = l - t, p, b, F;
1000
+ return F = 1.70158, b = 0, p = r, e === 0 ? t : (e /= o / 2) === 2 ? t + r : (b || (b = o * (0.3 * 1.5)), p < Math.abs(r) ? (p = r, F = b / 4) : F = b / (2 * Math.PI) * Math.asin(r / p), e < 1 ? -0.5 * (p * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * o - F) * (2 * Math.PI) / b)) + t : p * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * o - F) * (2 * Math.PI) / b) * 0.5 + r + t);
972
1001
  },
973
- easeInBack: function(e, t, i, r, a) {
974
- var h = i - t;
975
- return a === void 0 && (a = 1.70158), h * (e /= r) * e * ((a + 1) * e - a) + t;
1002
+ easeInBack: function(e, t, l, o, r) {
1003
+ var p = l - t;
1004
+ return r === void 0 && (r = 1.70158), p * (e /= o) * e * ((r + 1) * e - r) + t;
976
1005
  },
977
- easeOutBack: function(e, t, i, r, a) {
978
- var h = i - t;
979
- return a === void 0 && (a = 1.70158), h * ((e = e / r - 1) * e * ((a + 1) * e + a) + 1) + t;
1006
+ easeOutBack: function(e, t, l, o, r) {
1007
+ var p = l - t;
1008
+ return r === void 0 && (r = 1.70158), p * ((e = e / o - 1) * e * ((r + 1) * e + r) + 1) + t;
980
1009
  },
981
- easeInOutBack: function(e, t, i, r, a) {
982
- var h = i - t;
983
- return a === void 0 && (a = 1.70158), (e /= r / 2) < 1 ? h / 2 * (e * e * (((a *= 1.525) + 1) * e - a)) + t : h / 2 * ((e -= 2) * e * (((a *= 1.525) + 1) * e + a) + 2) + t;
1010
+ easeInOutBack: function(e, t, l, o, r) {
1011
+ var p = l - t;
1012
+ return r === void 0 && (r = 1.70158), (e /= o / 2) < 1 ? p / 2 * (e * e * (((r *= 1.525) + 1) * e - r)) + t : p / 2 * ((e -= 2) * e * (((r *= 1.525) + 1) * e + r) + 2) + t;
984
1013
  },
985
- easeInBounce: function(e, t, i, r) {
986
- var a = i - t, h;
987
- return h = n.easeOutBounce(r - e, 0, a, r), a - h + t;
1014
+ easeInBounce: function(e, t, l, o) {
1015
+ var r = l - t, p;
1016
+ return p = a.easeOutBounce(o - e, 0, r, o), r - p + t;
988
1017
  },
989
- easeOutBounce: function(e, t, i, r) {
990
- var a = i - t;
991
- return (e /= r) < 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;
1018
+ easeOutBounce: function(e, t, l, o) {
1019
+ var r = l - t;
1020
+ return (e /= o) < 1 / 2.75 ? r * (7.5625 * e * e) + t : e < 2 / 2.75 ? r * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? r * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : r * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
992
1021
  },
993
- easeInOutBounce: function(e, t, i, r) {
994
- var a = i - t, h;
995
- return e < r / 2 ? (h = n.easeInBounce(e * 2, 0, a, r), h * 0.5 + t) : (h = n.easeOutBounce(e * 2 - r, 0, a, r), h * 0.5 + a * 0.5 + t);
1022
+ easeInOutBounce: function(e, t, l, o) {
1023
+ var r = l - t, p;
1024
+ return e < o / 2 ? (p = a.easeInBounce(e * 2, 0, r, o), p * 0.5 + t) : (p = a.easeOutBounce(e * 2 - o, 0, r, o), p * 0.5 + r * 0.5 + t);
996
1025
  }
997
1026
  };
998
- return kt = n, kt;
1027
+ return Rt = a, Rt;
999
1028
  }
1000
- var pn = fn();
1001
- function _n(n) {
1002
- return n * Math.PI / 180;
1029
+ var wn = vn();
1030
+ function gn(a) {
1031
+ return a * Math.PI / 180;
1003
1032
  }
1004
- function ve(n, e) {
1005
- return n + Math.random() * (e - n);
1033
+ function Te(a, e) {
1034
+ return a + Math.random() * (e - a);
1006
1035
  }
1007
- function gn(n, e) {
1008
- return Math.floor(n + Math.random() * (e - n + 1));
1036
+ function Nn(a, e) {
1037
+ return Math.floor(a + Math.random() * (e - a + 1));
1009
1038
  }
1010
1039
  var pt;
1011
- (function(n) {
1012
- n[n.Circle = 0] = "Circle", n[n.Square = 1] = "Square", n[n.Strip = 2] = "Strip";
1040
+ (function(a) {
1041
+ a[a.Circle = 0] = "Circle", a[a.Square = 1] = "Square", a[a.Strip = 2] = "Strip";
1013
1042
  })(pt || (pt = {}));
1014
- var Ye;
1015
- (function(n) {
1016
- n[n.Positive = 1] = "Positive", n[n.Negative = -1] = "Negative";
1017
- })(Ye || (Ye = {}));
1018
- const wn = 1e3 / 60;
1019
- class yn {
1020
- constructor(e, t, i, r) {
1043
+ var et;
1044
+ (function(a) {
1045
+ a[a.Positive = 1] = "Positive", a[a.Negative = -1] = "Negative";
1046
+ })(et || (et = {}));
1047
+ const kn = 1e3 / 60;
1048
+ class Cn {
1049
+ constructor(e, t, l, o) {
1021
1050
  this.getOptions = t;
1022
- const { colors: a, initialVelocityX: h, initialVelocityY: u } = this.getOptions();
1023
- this.context = e, this.x = i, this.y = r, this.w = ve(5, 20), this.h = ve(5, 20), this.radius = ve(5, 10), this.vx = typeof h == "number" ? ve(-h, h) : ve(h.min, h.max), this.vy = typeof u == "number" ? ve(-u, 0) : ve(u.min, u.max), this.shape = gn(0, 2), this.angle = _n(ve(0, 360)), this.angularSpin = ve(-0.2, 0.2), this.color = a[Math.floor(Math.random() * a.length)], this.rotateY = ve(0, 1), this.rotationDirection = ve(0, 1) ? Ye.Positive : Ye.Negative;
1051
+ const { colors: r, initialVelocityX: p, initialVelocityY: b } = this.getOptions();
1052
+ this.context = e, this.x = l, this.y = o, this.w = Te(5, 20), this.h = Te(5, 20), this.radius = Te(5, 10), this.vx = typeof p == "number" ? Te(-p, p) : Te(p.min, p.max), this.vy = typeof b == "number" ? Te(-b, 0) : Te(b.min, b.max), this.shape = Nn(0, 2), this.angle = gn(Te(0, 360)), this.angularSpin = Te(-0.2, 0.2), this.color = r[Math.floor(Math.random() * r.length)], this.rotateY = Te(0, 1), this.rotationDirection = Te(0, 1) ? et.Positive : et.Negative;
1024
1053
  }
1025
1054
  update(e) {
1026
- const { gravity: t, wind: i, friction: r, opacity: a, drawShape: h } = this.getOptions(), u = e / wn;
1027
- this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx += i * u, this.vx *= r ** u, this.vy *= r ** u, this.rotateY >= 1 && this.rotationDirection === Ye.Positive ? this.rotationDirection = Ye.Negative : this.rotateY <= -1 && this.rotationDirection === Ye.Negative && (this.rotationDirection = Ye.Positive);
1028
- const S = 0.1 * this.rotationDirection * u;
1029
- if (this.rotateY += S, 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, h && typeof h == "function")
1030
- h.call(this, this.context);
1055
+ const { gravity: t, wind: l, friction: o, opacity: r, drawShape: p } = this.getOptions(), b = e / kn;
1056
+ this.x += this.vx * b, this.y += this.vy * b, this.vy += t * b, this.vx += l * b, this.vx *= o ** b, this.vy *= o ** b, this.rotateY >= 1 && this.rotationDirection === et.Positive ? this.rotationDirection = et.Negative : this.rotateY <= -1 && this.rotationDirection === et.Negative && (this.rotationDirection = et.Positive);
1057
+ const F = 0.1 * this.rotationDirection * b;
1058
+ if (this.rotateY += F, this.angle += this.angularSpin, this.context.save(), this.context.translate(this.x, this.y), this.context.rotate(this.angle), this.context.scale(1, this.rotateY), this.context.rotate(this.angle), this.context.beginPath(), this.context.fillStyle = this.color, this.context.strokeStyle = this.color, this.context.globalAlpha = r, this.context.lineCap = "round", this.context.lineWidth = 2, p && typeof p == "function")
1059
+ p.call(this, this.context);
1031
1060
  else
1032
1061
  switch (this.shape) {
1033
1062
  case pt.Circle: {
@@ -1046,39 +1075,39 @@ class yn {
1046
1075
  this.context.closePath(), this.context.restore();
1047
1076
  }
1048
1077
  }
1049
- class vn {
1078
+ class xn {
1050
1079
  constructor(e, t) {
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 = (r) => {
1052
- this.particles.splice(r, 1);
1080
+ 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 = (o) => {
1081
+ this.particles.splice(o, 1);
1053
1082
  }, this.getParticle = () => {
1054
- const r = ve(this.x, this.w + this.x), a = ve(this.y, this.h + this.y);
1055
- return new yn(this.context, this.getOptions, r, a);
1056
- }, this.animate = (r) => {
1057
- const { canvas: a, context: h, particlesGenerated: u, lastNumberOfPieces: S } = this, { run: ce, recycle: q, numberOfPieces: $, debug: me, tweenFunction: M, tweenDuration: ie } = this.getOptions();
1058
- if (!ce)
1083
+ const o = Te(this.x, this.w + this.x), r = Te(this.y, this.h + this.y);
1084
+ return new Cn(this.context, this.getOptions, o, r);
1085
+ }, this.animate = (o) => {
1086
+ const { canvas: r, context: p, particlesGenerated: b, lastNumberOfPieces: F } = this, { run: se, recycle: q, numberOfPieces: Y, debug: de, tweenFunction: W, tweenDuration: ye } = this.getOptions();
1087
+ if (!se)
1059
1088
  return !1;
1060
- const F = this.particles.length, K = q ? F : u;
1061
- if (K < $) {
1062
- S !== $ && (this.tweenProgress = 0, this.tweenFrom = K, this.lastNumberOfPieces = $), this.tweenProgress = Math.min(ie, Math.max(0, this.tweenProgress + r));
1063
- const g = M(this.tweenProgress, this.tweenFrom, $, ie), j = Math.round(g - K);
1064
- for (let N = 0; N < j; N++)
1089
+ const H = this.particles.length, ue = q ? H : b;
1090
+ if (ue < Y) {
1091
+ F !== Y && (this.tweenProgress = 0, this.tweenFrom = ue, this.lastNumberOfPieces = Y), this.tweenProgress = Math.min(ye, Math.max(0, this.tweenProgress + o));
1092
+ const v = W(this.tweenProgress, this.tweenFrom, Y, ye), ae = Math.round(v - ue);
1093
+ for (let k = 0; k < ae; k++)
1065
1094
  this.particles.push(this.getParticle());
1066
- this.particlesGenerated += j;
1095
+ this.particlesGenerated += ae;
1067
1096
  }
1068
- me && (h.font = "12px sans-serif", h.fillStyle = "#333", h.textAlign = "right", h.fillText(`Particles: ${F}`, a.width - 10, a.height - 20));
1069
- for (let g = this.particles.length - 1; g >= 0; g--) {
1070
- const j = this.particles[g];
1071
- j.update(r), (j.y > a.height || j.y < -100 || j.x > a.width + 100 || j.x < -100) && (q && K <= $ ? this.particles[g] = this.getParticle() : this.removeParticleAt(g));
1097
+ de && (p.font = "12px sans-serif", p.fillStyle = "#333", p.textAlign = "right", p.fillText(`Particles: ${H}`, r.width - 10, r.height - 20));
1098
+ for (let v = this.particles.length - 1; v >= 0; v--) {
1099
+ const ae = this.particles[v];
1100
+ ae.update(o), (ae.y > r.height || ae.y < -100 || ae.x > r.width + 100 || ae.x < -100) && (q && ue <= Y ? this.particles[v] = this.getParticle() : this.removeParticleAt(v));
1072
1101
  }
1073
- return F > 0 || K < $;
1102
+ return H > 0 || ue < Y;
1074
1103
  }, this.canvas = e;
1075
- const i = this.canvas.getContext("2d");
1076
- if (!i)
1104
+ const l = this.canvas.getContext("2d");
1105
+ if (!l)
1077
1106
  throw new Error("Could not get canvas context");
1078
- this.context = i, this.getOptions = t;
1107
+ this.context = l, this.getOptions = t;
1079
1108
  }
1080
1109
  }
1081
- const Pt = {
1110
+ const qt = {
1082
1111
  width: typeof window < "u" ? window.innerWidth : 300,
1083
1112
  height: typeof window < "u" ? window.innerHeight : 200,
1084
1113
  numberOfPieces: 200,
@@ -1108,15 +1137,15 @@ const Pt = {
1108
1137
  ],
1109
1138
  opacity: 1,
1110
1139
  debug: !1,
1111
- tweenFunction: pn.easeInOutQuad,
1140
+ tweenFunction: wn.easeInOutQuad,
1112
1141
  tweenDuration: 5e3,
1113
1142
  recycle: !0,
1114
1143
  run: !0
1115
1144
  };
1116
- class xn {
1145
+ class In {
1117
1146
  constructor(e, t) {
1118
- this.lastFrameTime = 0, this.setOptionsWithDefaults = (r) => {
1119
- const a = {
1147
+ this.lastFrameTime = 0, this.setOptionsWithDefaults = (o) => {
1148
+ const r = {
1120
1149
  confettiSource: {
1121
1150
  x: 0,
1122
1151
  y: 0,
@@ -1125,56 +1154,56 @@ class xn {
1125
1154
  }
1126
1155
  };
1127
1156
  this._options = {
1128
- ...a,
1129
- ...Pt,
1130
- ...r
1131
- }, Object.assign(this, r.confettiSource);
1132
- }, this.update = (r = 0) => {
1133
- const { options: { run: a, onConfettiComplete: h, frameRate: u }, canvas: S, context: ce } = this, q = Math.min(r - this.lastFrameTime, 50);
1134
- if (u && q < 1e3 / u) {
1157
+ ...r,
1158
+ ...qt,
1159
+ ...o
1160
+ }, Object.assign(this, o.confettiSource);
1161
+ }, this.update = (o = 0) => {
1162
+ const { options: { run: r, onConfettiComplete: p, frameRate: b }, canvas: F, context: se } = this, q = Math.min(o - this.lastFrameTime, 50);
1163
+ if (b && q < 1e3 / b) {
1135
1164
  this.rafId = requestAnimationFrame(this.update);
1136
1165
  return;
1137
1166
  }
1138
- this.lastFrameTime = r - (u ? q % u : 0), a && (ce.fillStyle = "white", ce.clearRect(0, 0, S.width, S.height)), this.generator.animate(q) ? this.rafId = requestAnimationFrame(this.update) : (h && typeof h == "function" && this.generator.particlesGenerated > 0 && h.call(this, this), this._options.run = !1);
1167
+ this.lastFrameTime = o - (b ? q % b : 0), r && (se.fillStyle = "white", se.clearRect(0, 0, F.width, F.height)), this.generator.animate(q) ? this.rafId = requestAnimationFrame(this.update) : (p && typeof p == "function" && this.generator.particlesGenerated > 0 && p.call(this, this), this._options.run = !1);
1139
1168
  }, this.reset = () => {
1140
1169
  this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
1141
1170
  }, this.stop = () => {
1142
1171
  this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
1143
1172
  }, this.canvas = e;
1144
- const i = this.canvas.getContext("2d");
1145
- if (!i)
1173
+ const l = this.canvas.getContext("2d");
1174
+ if (!l)
1146
1175
  throw new Error("Could not get canvas context");
1147
- this.context = i, this.generator = new vn(this.canvas, () => this.options), this.options = t, this.update();
1176
+ this.context = l, this.generator = new xn(this.canvas, () => this.options), this.options = t, this.update();
1148
1177
  }
1149
1178
  get options() {
1150
1179
  return this._options;
1151
1180
  }
1152
1181
  set options(e) {
1153
- var r, a;
1154
- const t = (r = this._options) == null ? void 0 : r.run, i = (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 && i === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
1182
+ var o, r;
1183
+ const t = (o = this._options) == null ? void 0 : o.run, l = (r = this._options) == null ? void 0 : r.recycle;
1184
+ this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && l === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
1156
1185
  }
1157
1186
  }
1158
- const Nn = It.createRef();
1159
- class Mt extends It.Component {
1187
+ const Sn = It.createRef();
1188
+ class Vt extends It.Component {
1160
1189
  constructor(e) {
1161
- super(e), this.canvas = It.createRef(), this.canvas = e.canvasRef || Nn;
1190
+ super(e), this.canvas = It.createRef(), this.canvas = e.canvasRef || Sn;
1162
1191
  }
1163
1192
  componentDidMount() {
1164
1193
  if (this.canvas.current) {
1165
- const e = Tt(this.props)[0];
1166
- this.confetti = new xn(this.canvas.current, e);
1194
+ const e = Ft(this.props)[0];
1195
+ this.confetti = new In(this.canvas.current, e);
1167
1196
  }
1168
1197
  }
1169
1198
  componentDidUpdate() {
1170
- const e = Tt(this.props)[0];
1199
+ const e = Ft(this.props)[0];
1171
1200
  this.confetti && (this.confetti.options = e);
1172
1201
  }
1173
1202
  componentWillUnmount() {
1174
1203
  this.confetti && this.confetti.stop(), this.confetti = void 0;
1175
1204
  }
1176
1205
  render() {
1177
- const [e, t] = Tt(this.props), i = {
1206
+ const [e, t] = Ft(this.props), l = {
1178
1207
  zIndex: 2,
1179
1208
  position: "absolute",
1180
1209
  pointerEvents: "none",
@@ -1184,42 +1213,42 @@ class Mt extends It.Component {
1184
1213
  right: 0,
1185
1214
  ...t.style
1186
1215
  };
1187
- return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: i });
1216
+ return n("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: l });
1188
1217
  }
1189
1218
  }
1190
- Mt.defaultProps = {
1191
- ...Pt
1219
+ Vt.defaultProps = {
1220
+ ...qt
1192
1221
  };
1193
- Mt.displayName = "ReactConfetti";
1194
- function Tt(n) {
1195
- const e = {}, t = {}, i = {}, r = [
1196
- ...Object.keys(Pt),
1222
+ Vt.displayName = "ReactConfetti";
1223
+ function Ft(a) {
1224
+ const e = {}, t = {}, l = {}, o = [
1225
+ ...Object.keys(qt),
1197
1226
  "confettiSource",
1198
1227
  "drawShape",
1199
1228
  "onConfettiComplete",
1200
1229
  "frameRate"
1201
- ], a = ["canvasRef"];
1202
- for (const h in n) {
1203
- const u = n[h];
1204
- r.includes(h) ? e[h] = u : a.includes(h) ? a[h] = u : i[h] = u;
1230
+ ], r = ["canvasRef"];
1231
+ for (const p in a) {
1232
+ const b = a[p];
1233
+ o.includes(p) ? e[p] = b : r.includes(p) ? r[p] = b : l[p] = b;
1205
1234
  }
1206
- return [e, i, t];
1235
+ return [e, l, t];
1207
1236
  }
1208
- const In = It.forwardRef((n, e) => s(Mt, { canvasRef: e, ...n }));
1237
+ const Pn = It.forwardRef((a, e) => n(Vt, { canvasRef: e, ...a }));
1209
1238
  /**
1210
1239
  * @license lucide-react v0.515.0 - ISC
1211
1240
  *
1212
1241
  * This source code is licensed under the ISC license.
1213
1242
  * See the LICENSE file in the root directory of this source tree.
1214
1243
  */
1215
- const Sn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (n) => n.replace(
1244
+ const Bn = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Tn = (a) => a.replace(
1216
1245
  /^([A-Z])|[\s-_]+(\w)/g,
1217
- (e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
1218
- ), zt = (n) => {
1219
- const e = Cn(n);
1246
+ (e, t, l) => l ? l.toUpperCase() : t.toLowerCase()
1247
+ ), Ut = (a) => {
1248
+ const e = Tn(a);
1220
1249
  return e.charAt(0).toUpperCase() + e.slice(1);
1221
- }, Gt = (...n) => n.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Bn = (n) => {
1222
- for (const e in n)
1250
+ }, Xt = (...a) => a.filter((e, t, l) => !!e && e.trim() !== "" && l.indexOf(e) === t).join(" ").trim(), Ln = (a) => {
1251
+ for (const e in a)
1223
1252
  if (e.startsWith("aria-") || e === "role" || e === "title")
1224
1253
  return !0;
1225
1254
  };
@@ -1229,7 +1258,7 @@ const Sn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (
1229
1258
  * This source code is licensed under the ISC license.
1230
1259
  * See the LICENSE file in the root directory of this source tree.
1231
1260
  */
1232
- var kn = {
1261
+ var Rn = {
1233
1262
  xmlns: "http://www.w3.org/2000/svg",
1234
1263
  width: 24,
1235
1264
  height: 24,
@@ -1246,32 +1275,32 @@ var kn = {
1246
1275
  * This source code is licensed under the ISC license.
1247
1276
  * See the LICENSE file in the root directory of this source tree.
1248
1277
  */
1249
- const Tn = Ht(
1278
+ const Fn = Yt(
1250
1279
  ({
1251
- color: n = "currentColor",
1280
+ color: a = "currentColor",
1252
1281
  size: e = 24,
1253
1282
  strokeWidth: t = 2,
1254
- absoluteStrokeWidth: i,
1255
- className: r = "",
1256
- children: a,
1257
- iconNode: h,
1258
- ...u
1259
- }, S) => Rt(
1283
+ absoluteStrokeWidth: l,
1284
+ className: o = "",
1285
+ children: r,
1286
+ iconNode: p,
1287
+ ...b
1288
+ }, F) => At(
1260
1289
  "svg",
1261
1290
  {
1262
- ref: S,
1263
- ...kn,
1291
+ ref: F,
1292
+ ...Rn,
1264
1293
  width: e,
1265
1294
  height: e,
1266
- stroke: n,
1267
- strokeWidth: i ? Number(t) * 24 / Number(e) : t,
1268
- className: Gt("lucide", r),
1269
- ...!a && !Bn(u) && { "aria-hidden": "true" },
1270
- ...u
1295
+ stroke: a,
1296
+ strokeWidth: l ? Number(t) * 24 / Number(e) : t,
1297
+ className: Xt("lucide", o),
1298
+ ...!r && !Ln(b) && { "aria-hidden": "true" },
1299
+ ...b
1271
1300
  },
1272
1301
  [
1273
- ...h.map(([ce, q]) => Rt(ce, q)),
1274
- ...Array.isArray(a) ? a : [a]
1302
+ ...p.map(([se, q]) => At(se, q)),
1303
+ ...Array.isArray(r) ? r : [r]
1275
1304
  ]
1276
1305
  )
1277
1306
  );
@@ -1281,20 +1310,20 @@ const Tn = Ht(
1281
1310
  * This source code is licensed under the ISC license.
1282
1311
  * See the LICENSE file in the root directory of this source tree.
1283
1312
  */
1284
- const Ft = (n, e) => {
1285
- const t = Ht(
1286
- ({ className: i, ...r }, a) => Rt(Tn, {
1287
- ref: a,
1313
+ const St = (a, e) => {
1314
+ const t = Yt(
1315
+ ({ className: l, ...o }, r) => At(Fn, {
1316
+ ref: r,
1288
1317
  iconNode: e,
1289
- className: Gt(
1290
- `lucide-${Sn(zt(n))}`,
1291
- `lucide-${n}`,
1292
- i
1318
+ className: Xt(
1319
+ `lucide-${Bn(Ut(a))}`,
1320
+ `lucide-${a}`,
1321
+ l
1293
1322
  ),
1294
- ...r
1323
+ ...o
1295
1324
  })
1296
1325
  );
1297
- return t.displayName = zt(n), t;
1326
+ return t.displayName = Ut(a), t;
1298
1327
  };
1299
1328
  /**
1300
1329
  * @license lucide-react v0.515.0 - ISC
@@ -1302,329 +1331,392 @@ const Ft = (n, e) => {
1302
1331
  * This source code is licensed under the ISC license.
1303
1332
  * See the LICENSE file in the root directory of this source tree.
1304
1333
  */
1305
- const Ln = [
1334
+ const Mn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zt = St("chevron-down", Mn);
1335
+ /**
1336
+ * @license lucide-react v0.515.0 - ISC
1337
+ *
1338
+ * This source code is licensed under the ISC license.
1339
+ * See the LICENSE file in the root directory of this source tree.
1340
+ */
1341
+ const On = [
1306
1342
  ["path", { d: "M5 12h14", key: "1ays0h" }],
1307
1343
  ["path", { d: "M12 5v14", key: "s699le" }]
1308
- ], Wt = Ft("plus", Ln);
1344
+ ], bt = St("plus", On);
1309
1345
  /**
1310
1346
  * @license lucide-react v0.515.0 - ISC
1311
1347
  *
1312
1348
  * This source code is licensed under the ISC license.
1313
1349
  * See the LICENSE file in the root directory of this source tree.
1314
1350
  */
1315
- const Rn = [
1351
+ const An = [
1316
1352
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
1317
1353
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
1318
- ], Pn = Ft("search", Rn);
1354
+ ], qn = St("search", An);
1319
1355
  /**
1320
1356
  * @license lucide-react v0.515.0 - ISC
1321
1357
  *
1322
1358
  * This source code is licensed under the ISC license.
1323
1359
  * See the LICENSE file in the root directory of this source tree.
1324
1360
  */
1325
- const Mn = [
1361
+ const Vn = [
1326
1362
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
1327
1363
  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
1328
1364
  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
1329
1365
  ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
1330
1366
  ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
1331
- ], Fn = Ft("trash-2", Mn), On = "_backdrop_p0w0a_1", An = "_celebrationOverlay_p0w0a_14", En = "_celebrationChip_p0w0a_23", Dn = "_backdropOpen_p0w0a_74", qn = "_backdropClosed_p0w0a_78", $n = "_panel_p0w0a_82", Vn = "_panelOpen_p0w0a_103", zn = "_panelClosed_p0w0a_107", Wn = "_header_p0w0a_146", jn = "_headerCenter_p0w0a_155", Un = "_title_p0w0a_163", Hn = "_searchIconButton_p0w0a_172", Qn = "_headerTitleWrap_p0w0a_195", Gn = "_headerSearchWrap_p0w0a_199", Yn = "_headerSearchOpen_p0w0a_211", Kn = "_searchBar_p0w0a_223", Xn = "_searchInput_p0w0a_235", Zn = "_searchClearButton_p0w0a_256", Jn = "_closeButton_p0w0a_278", ea = "_body_p0w0a_312", ta = "_muted_p0w0a_317", na = "_error_p0w0a_322", aa = "_variants_p0w0a_327", ra = "_variantList_p0w0a_331", ia = "_emptyState_p0w0a_339", oa = "_variantRow_p0w0a_351", sa = "_variantRowSoldOut_p0w0a_359", la = "_variantLeft_p0w0a_363", ca = "_addToBundleButton_p0w0a_370", ua = "_soldOutContainer_p0w0a_398", da = "_stockLimitContainer_p0w0a_406", ha = "_soldOut_p0w0a_398", ma = "_stockLimitNotice_p0w0a_424", ba = "_variantThumb_p0w0a_433", fa = "_variantThumbImg_p0w0a_443", pa = "_variantThumbFallback_p0w0a_450", _a = "_variantInfo_p0w0a_460", ga = "_variantName_p0w0a_464", wa = "_variantMeta_p0w0a_473", ya = "_variantPriceRow_p0w0a_481", va = "_variantCompareAt_p0w0a_488", xa = "_variantPrice_p0w0a_481", Na = "_qtyControls_p0w0a_499", Ia = "_qtyControlsWrap_p0w0a_505", Sa = "_qtyButton_p0w0a_511", Ca = "_qtyValue_p0w0a_537", Ba = "_footer_p0w0a_544", ka = "_poweredBy_p0w0a_552", Ta = "_boxSummaryWindow_p0w0a_564", La = "_boxSummaryRow_p0w0a_582", Ra = "_boxSlot_p0w0a_590", Pa = "_boxItem_p0w0a_599", Ma = "_boxItemClickable_p0w0a_611", Fa = "_boxThresholdLabel_p0w0a_620", Oa = "_boxItemPlaceholder_p0w0a_631", Aa = "_boxItemFilled_p0w0a_637", Ea = "_boxItemThreshold_p0w0a_643", Da = "_boxItemDiscountText_p0w0a_651", qa = "_boxItemPlus_p0w0a_659", $a = "_boxItemImage_p0w0a_666", Va = "_boxItemFallback_p0w0a_673", za = "_ctaButtonGroup_p0w0a_684", Wa = "_ctaButtonGroupAnimating_p0w0a_691", ja = "_cta_p0w0a_684", Ua = "_ctaDualLeft_p0w0a_719", Ha = "_ctaDualLeftAnimating_p0w0a_737", Qa = "_ctaDualRight_p0w0a_750", Ga = "_ctaDualRightAnimating_p0w0a_766", Ya = "_ctaTotals_p0w0a_777", Ka = "_ctaDiscountBadge_p0w0a_785", Xa = "_ctaTotalsWrap_p0w0a_799", Za = "_ctaTotalsWrapVisible_p0w0a_812", Ja = "_ctaTotalsStrike_p0w0a_819", er = "_ctaTotalsPrice_p0w0a_826", b = {
1332
- backdrop: On,
1333
- celebrationOverlay: An,
1334
- celebrationChip: En,
1335
- backdropOpen: Dn,
1336
- backdropClosed: qn,
1337
- panel: $n,
1338
- panelOpen: Vn,
1339
- panelClosed: zn,
1340
- header: Wn,
1341
- headerCenter: jn,
1342
- title: Un,
1343
- searchIconButton: Hn,
1344
- headerTitleWrap: Qn,
1345
- headerSearchWrap: Gn,
1346
- headerSearchOpen: Yn,
1347
- searchBar: Kn,
1348
- searchInput: Xn,
1349
- searchClearButton: Zn,
1350
- closeButton: Jn,
1351
- body: ea,
1352
- muted: ta,
1353
- error: na,
1354
- variants: aa,
1355
- variantList: ra,
1356
- emptyState: ia,
1357
- variantRow: oa,
1358
- variantRowSoldOut: sa,
1359
- variantLeft: la,
1360
- addToBundleButton: ca,
1361
- soldOutContainer: ua,
1362
- stockLimitContainer: da,
1363
- soldOut: ha,
1364
- stockLimitNotice: ma,
1365
- variantThumb: ba,
1366
- variantThumbImg: fa,
1367
- variantThumbFallback: pa,
1368
- variantInfo: _a,
1369
- variantName: ga,
1370
- variantMeta: wa,
1371
- variantPriceRow: ya,
1372
- variantCompareAt: va,
1373
- variantPrice: xa,
1374
- qtyControls: Na,
1375
- qtyControlsWrap: Ia,
1376
- qtyButton: Sa,
1377
- qtyValue: Ca,
1378
- footer: Ba,
1379
- poweredBy: ka,
1380
- boxSummaryWindow: Ta,
1381
- boxSummaryRow: La,
1382
- boxSlot: Ra,
1383
- boxItem: Pa,
1384
- boxItemClickable: Ma,
1385
- boxThresholdLabel: Fa,
1386
- boxItemPlaceholder: Oa,
1387
- boxItemFilled: Aa,
1388
- boxItemThreshold: Ea,
1389
- boxItemDiscountText: Da,
1390
- boxItemPlus: qa,
1391
- boxItemImage: $a,
1392
- boxItemFallback: Va,
1393
- ctaButtonGroup: za,
1394
- ctaButtonGroupAnimating: Wa,
1395
- cta: ja,
1396
- ctaDualLeft: Ua,
1397
- ctaDualLeftAnimating: Ha,
1398
- ctaDualRight: Qa,
1399
- ctaDualRightAnimating: Ga,
1400
- ctaTotals: Ya,
1401
- ctaDiscountBadge: Ka,
1402
- ctaTotalsWrap: Xa,
1403
- ctaTotalsWrapVisible: Za,
1404
- ctaTotalsStrike: Ja,
1405
- ctaTotalsPrice: er
1367
+ ], Mt = St("trash-2", Vn), En = "_backdrop_9u5ly_1", Dn = "_celebrationOverlay_9u5ly_14", $n = "_celebrationChip_9u5ly_23", zn = "_backdropOpen_9u5ly_74", Wn = "_backdropClosed_9u5ly_78", jn = "_panel_9u5ly_82", Gn = "_panelOpen_9u5ly_103", Un = "_panelClosed_9u5ly_107", Hn = "_header_9u5ly_146", Qn = "_headerCenter_9u5ly_155", Yn = "_title_9u5ly_163", Kn = "_searchIconButton_9u5ly_172", Xn = "_headerTitleWrap_9u5ly_195", Zn = "_headerSearchWrap_9u5ly_199", Jn = "_headerSearchOpen_9u5ly_211", ea = "_searchBar_9u5ly_223", ta = "_searchInput_9u5ly_235", na = "_searchClearButton_9u5ly_256", aa = "_closeButton_9u5ly_278", ra = "_body_9u5ly_312", ia = "_muted_9u5ly_317", oa = "_error_9u5ly_322", la = "_variants_9u5ly_327", sa = "_variantList_9u5ly_331", ca = "_emptyState_9u5ly_339", ua = "_variantRow_9u5ly_351", da = "_variantRowSoldOut_9u5ly_359", ma = "_variantLeft_9u5ly_363", ha = "_addToBundleButton_9u5ly_370", ba = "_soldOutContainer_9u5ly_398", fa = "_stockLimitContainer_9u5ly_406", pa = "_soldOut_9u5ly_398", _a = "_stockLimitNotice_9u5ly_424", ya = "_variantThumb_9u5ly_433", va = "_variantThumbImg_9u5ly_443", wa = "_variantThumbFallback_9u5ly_450", ga = "_variantInfo_9u5ly_460", Na = "_variantName_9u5ly_464", ka = "_variantMeta_9u5ly_473", Ca = "_variantPriceRow_9u5ly_481", xa = "_variantCompareAt_9u5ly_488", Ia = "_variantPrice_9u5ly_481", Sa = "_qtyControls_9u5ly_499", Pa = "_qtyControlsWrap_9u5ly_505", Ba = "_qtyButton_9u5ly_511", Ta = "_qtyValue_9u5ly_537", La = "_footer_9u5ly_544", Ra = "_poweredBy_9u5ly_552", Fa = "_boxSummaryWindow_9u5ly_564", Ma = "_boxSummaryRow_9u5ly_582", Oa = "_boxSlot_9u5ly_590", Aa = "_boxItem_9u5ly_599", qa = "_boxItemClickable_9u5ly_611", Va = "_boxThresholdLabel_9u5ly_620", Ea = "_boxItemPlaceholder_9u5ly_631", Da = "_boxItemFilled_9u5ly_637", $a = "_boxItemThreshold_9u5ly_643", za = "_boxItemDiscountText_9u5ly_651", Wa = "_boxItemPlus_9u5ly_659", ja = "_boxItemImage_9u5ly_666", Ga = "_boxItemFallback_9u5ly_673", Ua = "_ctaButtonGroup_9u5ly_684", Ha = "_ctaButtonGroupAnimating_9u5ly_691", Qa = "_cta_9u5ly_684", Ya = "_ctaDualLeft_9u5ly_719", Ka = "_ctaDualLeftAnimating_9u5ly_737", Xa = "_ctaDualRight_9u5ly_750", Za = "_ctaDualRightAnimating_9u5ly_766", Ja = "_ctaTotals_9u5ly_777", er = "_ctaDiscountBadge_9u5ly_785", tr = "_ctaTotalsWrap_9u5ly_799", nr = "_ctaTotalsWrapVisible_9u5ly_812", ar = "_ctaTotalsStrike_9u5ly_819", rr = "_ctaTotalsPrice_9u5ly_826", ir = "_drawerProductGroup_9u5ly_1075", or = "_selectButton_9u5ly_1081", lr = "_selectButtonChevron_9u5ly_1087", sr = "_selectButtonChevronOpen_9u5ly_1092", cr = "_variantPicker_9u5ly_1097", ur = "_variantPickerRow_9u5ly_1104", dr = "_variantPickerRowSelected_9u5ly_1137", mr = "_variantPickerLabel_9u5ly_1144", hr = "_variantPickerPriceGroup_9u5ly_1153", br = "_variantPickerPrice_9u5ly_1153", fr = "_variantPickerCompareAt_9u5ly_1165", pr = "_variantPickerSoldOut_9u5ly_1171", _r = "_variantPickerCheck_9u5ly_1176", yr = "_drawerSelectedList_9u5ly_1184", vr = "_drawerSubRow_9u5ly_1190", wr = "_drawerSubRowInfo_9u5ly_1203", gr = "_drawerSubRowName_9u5ly_1211", c = {
1368
+ backdrop: En,
1369
+ celebrationOverlay: Dn,
1370
+ celebrationChip: $n,
1371
+ backdropOpen: zn,
1372
+ backdropClosed: Wn,
1373
+ panel: jn,
1374
+ panelOpen: Gn,
1375
+ panelClosed: Un,
1376
+ header: Hn,
1377
+ headerCenter: Qn,
1378
+ title: Yn,
1379
+ searchIconButton: Kn,
1380
+ headerTitleWrap: Xn,
1381
+ headerSearchWrap: Zn,
1382
+ headerSearchOpen: Jn,
1383
+ searchBar: ea,
1384
+ searchInput: ta,
1385
+ searchClearButton: na,
1386
+ closeButton: aa,
1387
+ body: ra,
1388
+ muted: ia,
1389
+ error: oa,
1390
+ variants: la,
1391
+ variantList: sa,
1392
+ emptyState: ca,
1393
+ variantRow: ua,
1394
+ variantRowSoldOut: da,
1395
+ variantLeft: ma,
1396
+ addToBundleButton: ha,
1397
+ soldOutContainer: ba,
1398
+ stockLimitContainer: fa,
1399
+ soldOut: pa,
1400
+ stockLimitNotice: _a,
1401
+ variantThumb: ya,
1402
+ variantThumbImg: va,
1403
+ variantThumbFallback: wa,
1404
+ variantInfo: ga,
1405
+ variantName: Na,
1406
+ variantMeta: ka,
1407
+ variantPriceRow: Ca,
1408
+ variantCompareAt: xa,
1409
+ variantPrice: Ia,
1410
+ qtyControls: Sa,
1411
+ qtyControlsWrap: Pa,
1412
+ qtyButton: Ba,
1413
+ qtyValue: Ta,
1414
+ footer: La,
1415
+ poweredBy: Ra,
1416
+ boxSummaryWindow: Fa,
1417
+ boxSummaryRow: Ma,
1418
+ boxSlot: Oa,
1419
+ boxItem: Aa,
1420
+ boxItemClickable: qa,
1421
+ boxThresholdLabel: Va,
1422
+ boxItemPlaceholder: Ea,
1423
+ boxItemFilled: Da,
1424
+ boxItemThreshold: $a,
1425
+ boxItemDiscountText: za,
1426
+ boxItemPlus: Wa,
1427
+ boxItemImage: ja,
1428
+ boxItemFallback: Ga,
1429
+ ctaButtonGroup: Ua,
1430
+ ctaButtonGroupAnimating: Ha,
1431
+ cta: Qa,
1432
+ ctaDualLeft: Ya,
1433
+ ctaDualLeftAnimating: Ka,
1434
+ ctaDualRight: Xa,
1435
+ ctaDualRightAnimating: Za,
1436
+ ctaTotals: Ja,
1437
+ ctaDiscountBadge: er,
1438
+ ctaTotalsWrap: tr,
1439
+ ctaTotalsWrapVisible: nr,
1440
+ ctaTotalsStrike: ar,
1441
+ ctaTotalsPrice: rr,
1442
+ drawerProductGroup: ir,
1443
+ selectButton: or,
1444
+ selectButtonChevron: lr,
1445
+ selectButtonChevronOpen: sr,
1446
+ variantPicker: cr,
1447
+ variantPickerRow: ur,
1448
+ variantPickerRowSelected: dr,
1449
+ variantPickerLabel: mr,
1450
+ variantPickerPriceGroup: hr,
1451
+ variantPickerPrice: br,
1452
+ variantPickerCompareAt: fr,
1453
+ variantPickerSoldOut: pr,
1454
+ variantPickerCheck: _r,
1455
+ drawerSelectedList: yr,
1456
+ drawerSubRow: vr,
1457
+ drawerSubRowInfo: wr,
1458
+ drawerSubRowName: gr
1406
1459
  };
1407
- function Hi(n) {
1408
- var Ze, Je;
1460
+ function Ao(a) {
1461
+ var w, S;
1409
1462
  const {
1410
1463
  isOpen: e,
1411
1464
  close: t,
1412
- loading: i,
1413
- submitting: r,
1414
- error: a,
1415
- currencyCode: h,
1416
- config: u,
1417
- eligibleVariants: S,
1418
- selections: ce,
1465
+ loading: l,
1466
+ submitting: o,
1467
+ error: r,
1468
+ currencyCode: p,
1469
+ config: b,
1470
+ eligibleVariants: F,
1471
+ selections: se,
1419
1472
  selectionOrder: q,
1420
- getVariantMaxSelectableQuantity: $,
1421
- setQuantity: me,
1422
- bundleSize: M,
1423
- minRequired: ie,
1424
- canSubmit: F,
1425
- submit: K,
1426
- submitAndCheckout: g,
1427
- locale: j,
1428
- t: N
1429
- } = gt(), [se, L] = W(!1), [O, X] = W(""), Z = Y(null), V = Y(null), ne = Y(null), [ue, xe] = W(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [de, Be] = W(0), [ge, Ee] = W(null), [Ne, Pe] = W(!1), ke = Y(null), De = Y(M), at = 7e3, [We, je] = W(0), [Me, Ke] = W(null), [Te, qe] = W(!1), Ie = Y(null), f = 2800, _ = [
1473
+ getVariantMaxSelectableQuantity: Y,
1474
+ setQuantity: de,
1475
+ bundleSize: W,
1476
+ minRequired: ye,
1477
+ canSubmit: H,
1478
+ submit: ue,
1479
+ submitAndCheckout: v,
1480
+ locale: ae,
1481
+ t: k
1482
+ } = yt(), [ge, z] = ne(!1), [E, me] = ne(""), ce = ie(null), xe = ie(null), Se = ie(null), [be, Ve] = ne(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ne, Fe] = ne(0), [Me, Oe] = ne(null), [he, ke] = ne(!1), Pe = ie(null), Ie = ie(W), tt = 7e3, [Ee, Le] = ne(0), [je, Ge] = ne(null), [Re, nt] = ne(!1), Ae = ie(null), it = 2800, Ke = [
1430
1483
  "#2563eb",
1431
1484
  "#3b82f6",
1432
1485
  "#60a5fa",
1433
1486
  "#93c5fd",
1434
1487
  "#bae6fd",
1435
1488
  "#e0f2fe"
1436
- ], x = P(() => {
1437
- var d;
1438
- const c = (d = u == null ? void 0 : u.styleSettings) == null ? void 0 : d.confettiColors;
1439
- return Array.isArray(c) && c.length >= 6 ? c.slice(0, 6).map(
1440
- (v, o) => typeof v == "string" && v.trim() ? v : _[o]
1441
- ) : [..._];
1442
- }, [(Ze = u == null ? void 0 : u.styleSettings) == null ? void 0 : Ze.confettiColors]), R = (c) => {
1443
- const d = Number.parseFloat(c);
1444
- return Number.isFinite(d) ? String(Math.round(d)) : c;
1445
- }, A = (c) => {
1446
- const d = (c ?? []).filter((v) => {
1447
- var m, w;
1448
- const o = (m = v == null ? void 0 : v.name) == null ? void 0 : m.trim(), l = (w = v == null ? void 0 : v.value) == null ? void 0 : w.trim();
1449
- return !(!o || !l || o.toLowerCase() === "title");
1489
+ ], ve = $(() => {
1490
+ var s;
1491
+ const i = (s = b == null ? void 0 : b.styleSettings) == null ? void 0 : s.confettiColors;
1492
+ return Array.isArray(i) && i.length >= 6 ? i.slice(0, 6).map(
1493
+ (d, y) => typeof d == "string" && d.trim() ? d : Ke[y]
1494
+ ) : [...Ke];
1495
+ }, [(w = b == null ? void 0 : b.styleSettings) == null ? void 0 : w.confettiColors]), De = (i) => {
1496
+ const s = Number.parseFloat(i);
1497
+ return Number.isFinite(s) ? String(Math.round(s)) : i;
1498
+ }, $e = (i) => {
1499
+ const s = (i ?? []).filter((d) => {
1500
+ var M, P;
1501
+ const y = (M = d == null ? void 0 : d.name) == null ? void 0 : M.trim(), C = (P = d == null ? void 0 : d.value) == null ? void 0 : P.trim();
1502
+ return !(!y || !C || y.toLowerCase() === "title" || C.toLowerCase() === "default title");
1450
1503
  });
1451
- return d.length ? d.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
1452
- }, U = (c) => {
1453
- var d;
1454
- return ((d = c.product) == null ? void 0 : d.title) ?? c.displayName ?? c.title;
1455
- }, Q = (c) => {
1456
- const d = U(c), v = A(c.selectedOptions);
1457
- return [d, v].filter(Boolean).join(" ");
1458
- }, [ae, le] = W(e), J = Y(null), z = (c) => {
1459
- const d = Number(c);
1460
- return Number.isFinite(d) ? ft(d, h, j) : c;
1461
- }, H = ((Je = u == null ? void 0 : u.title) == null ? void 0 : Je.trim()) || N("bundle.title.default"), Le = P(() => {
1462
- const c = Number((u == null ? void 0 : u.maxBundleSize) ?? NaN), d = Number.isFinite(c) ? Math.floor(c) : 100;
1463
- return Math.max(2, Math.min(100, d));
1464
- }, [u == null ? void 0 : u.maxBundleSize]), Fe = M >= Le, rt = P(() => [...S].sort((c, d) => c.displayName.localeCompare(d.displayName)), [S]), Oe = P(() => {
1465
- const c = O.trim().toLowerCase();
1466
- if (!c) return rt;
1467
- const d = c.split(/\s+/).filter(Boolean), v = (o) => {
1468
- var w;
1469
- const l = [];
1470
- l.push(o.displayName), (w = o.product) != null && w.title && l.push(o.product.title);
1471
- for (const y of o.selectedOptions ?? [])
1472
- l.push(y.name), l.push(y.value);
1473
- const m = l.join(" ").toLowerCase();
1474
- return d.every((y) => m.includes(y));
1504
+ return s.length ? s.map((d) => `${d.name}: ${d.value}`).join(" · ") : null;
1505
+ }, qe = (i) => (i == null ? void 0 : i.trim().toLowerCase()) === "default title", ze = (i) => {
1506
+ var C, M, P, _;
1507
+ const s = (C = i.displayName) == null ? void 0 : C.trim();
1508
+ if (s && !qe(s)) return s;
1509
+ const d = (P = (M = i.product) == null ? void 0 : M.title) == null ? void 0 : P.trim();
1510
+ if (d) return d;
1511
+ const y = (_ = i.title) == null ? void 0 : _.trim();
1512
+ return y && !qe(y) ? y : s || y || d || "";
1513
+ }, Ue = (i) => {
1514
+ const s = ze(i), d = $e(i.selectedOptions);
1515
+ return [s, d].filter(Boolean).join(" ");
1516
+ }, m = (i) => {
1517
+ var y;
1518
+ const s = $e(i.selectedOptions);
1519
+ if (s) return s;
1520
+ const d = (y = i.title) == null ? void 0 : y.trim();
1521
+ return d && !qe(d) ? d : ze(i);
1522
+ }, [f, g] = ne(e), B = ie(null), T = (i) => {
1523
+ const s = Number(i);
1524
+ return Number.isFinite(s) ? ft(s, p, ae) : i;
1525
+ }, j = ((S = b == null ? void 0 : b.title) == null ? void 0 : S.trim()) || k("bundle.title.default"), K = $(() => {
1526
+ const i = Number((b == null ? void 0 : b.maxBundleSize) ?? NaN), s = Number.isFinite(i) ? Math.floor(i) : 100;
1527
+ return Math.max(2, Math.min(100, s));
1528
+ }, [b == null ? void 0 : b.maxBundleSize]), N = W >= K, A = $(() => [...F], [F]), V = $(() => {
1529
+ const i = E.trim().toLowerCase();
1530
+ if (!i) return A;
1531
+ const s = i.split(/\s+/).filter(Boolean), d = (y) => {
1532
+ var P;
1533
+ const C = [];
1534
+ C.push(y.displayName), (P = y.product) != null && P.title && C.push(y.product.title);
1535
+ for (const _ of y.selectedOptions ?? [])
1536
+ C.push(_.name), C.push(_.value);
1537
+ const M = C.join(" ").toLowerCase();
1538
+ return s.every((_) => M.includes(_));
1475
1539
  };
1476
- return rt.filter(v);
1477
- }, [O, rt]), he = P(() => [...(u == null ? void 0 : u.rules) ?? []].sort((c, d) => c.minBundleSize - d.minBundleSize), [u == null ? void 0 : u.rules]), G = P(() => Math.max(0, ie - M), [M, ie]), it = P(() => {
1478
- let c = null;
1479
- for (const d of he)
1480
- M >= d.minBundleSize && (c = d);
1481
- return c;
1482
- }, [M, he]), Ae = P(() => {
1483
- if (!it) return null;
1484
- const c = Number.parseFloat(it.discountPercent);
1485
- return !Number.isFinite(c) || c <= 0 ? null : c;
1486
- }, [it]), Se = he[0], C = !!(Se && M >= Se.minBundleSize), be = P(() => {
1487
- const c = new Map(S.map((v) => [v.id, v]));
1488
- let d = 0;
1489
- for (const [v, o] of Object.entries(ce)) {
1490
- const l = o ?? 0;
1491
- if (l <= 0) continue;
1492
- const m = c.get(v), w = Number(m == null ? void 0 : m.price);
1493
- Number.isFinite(w) && (d += w * l);
1540
+ return A.filter(d);
1541
+ }, [E, A]), oe = $(() => {
1542
+ var C, M;
1543
+ if (!(b != null && b.groupVariantsByProduct)) return null;
1544
+ const i = E.trim().toLowerCase(), s = i ? i.split(/\s+/).filter(Boolean) : [], d = (P) => {
1545
+ var O;
1546
+ if (!s.length) return !0;
1547
+ const _ = [P.displayName];
1548
+ (O = P.product) != null && O.title && _.push(P.product.title);
1549
+ for (const Z of P.selectedOptions ?? [])
1550
+ _.push(Z.name), _.push(Z.value);
1551
+ const R = _.join(" ").toLowerCase();
1552
+ return s.every((Z) => R.includes(Z));
1553
+ }, y = /* @__PURE__ */ new Map();
1554
+ for (const P of A) {
1555
+ const _ = ((C = P.product) == null ? void 0 : C.id) ?? "unknown";
1556
+ y.has(_) || y.set(_, { productId: _, productTitle: ((M = P.product) == null ? void 0 : M.title) ?? "", variants: [], filteredVariants: [] });
1557
+ const R = y.get(_);
1558
+ R.variants.push(P), d(P) && R.filteredVariants.push(P);
1494
1559
  }
1495
- return Math.round(d * 100) / 100;
1496
- }, [S, ce]), Ue = P(() => {
1497
- if (!Ae) return be;
1498
- const c = be * (1 - Ae / 100);
1499
- return Math.round(c * 100) / 100;
1500
- }, [Ae, be]), Ce = P(() => he.length ? Math.max(...he.map((c) => c.minBundleSize)) : 0, [he]), ot = P(() => {
1501
- const c = new Map(S.map((d) => [d.id, d]));
1502
- return q.map((d) => c.get(d)).filter((d) => !!d);
1503
- }, [S, q]), He = P(() => {
1504
- var d;
1505
- const c = /* @__PURE__ */ new Map();
1506
- for (const v of he) {
1507
- const o = Math.max(0, v.minBundleSize - 1);
1508
- c.set(o, {
1509
- discountPercent: v.discountPercent,
1510
- minBundleSize: v.minBundleSize,
1511
- label: ((d = v.label) == null ? void 0 : d.trim()) || `Buy ${v.minBundleSize}+`
1560
+ return Array.from(y.values()).filter((P) => P.filteredVariants.length > 0);
1561
+ }, [b == null ? void 0 : b.groupVariantsByProduct, A, E]), [re, G] = ne(null), x = ie(null);
1562
+ U(() => {
1563
+ if (!re) return;
1564
+ const i = (s) => {
1565
+ x.current && !x.current.contains(s.target) && G(null);
1566
+ };
1567
+ return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
1568
+ }, [re]);
1569
+ const D = $(() => [...(b == null ? void 0 : b.rules) ?? []].sort((i, s) => i.minBundleSize - s.minBundleSize), [b == null ? void 0 : b.rules]), ee = $(() => Math.max(0, ye - W), [W, ye]), Ce = $(() => {
1570
+ let i = null;
1571
+ for (const s of D)
1572
+ W >= s.minBundleSize && (i = s);
1573
+ return i;
1574
+ }, [W, D]), X = $(() => {
1575
+ if (!Ce) return null;
1576
+ const i = Number.parseFloat(Ce.discountPercent);
1577
+ return !Number.isFinite(i) || i <= 0 ? null : i;
1578
+ }, [Ce]), He = D[0], Qe = !!(He && W >= He.minBundleSize), Be = $(() => {
1579
+ const i = new Map(F.map((d) => [d.id, d]));
1580
+ let s = 0;
1581
+ for (const [d, y] of Object.entries(se)) {
1582
+ const C = y ?? 0;
1583
+ if (C <= 0) continue;
1584
+ const M = i.get(d), P = Number(M == null ? void 0 : M.price);
1585
+ Number.isFinite(P) && (s += P * C);
1586
+ }
1587
+ return Math.round(s * 100) / 100;
1588
+ }, [F, se]), vt = $(() => {
1589
+ if (!X) return Be;
1590
+ const i = Be * (1 - X / 100);
1591
+ return Math.round(i * 100) / 100;
1592
+ }, [X, Be]), at = $(() => D.length ? Math.max(...D.map((i) => i.minBundleSize)) : 0, [D]), ot = $(() => {
1593
+ const i = new Map(F.map((s) => [s.id, s]));
1594
+ return q.map((s) => i.get(s)).filter((s) => !!s);
1595
+ }, [F, q]), wt = $(() => {
1596
+ var s;
1597
+ const i = /* @__PURE__ */ new Map();
1598
+ for (const d of D) {
1599
+ const y = Math.max(0, d.minBundleSize - 1);
1600
+ i.set(y, {
1601
+ discountPercent: d.discountPercent,
1602
+ minBundleSize: d.minBundleSize,
1603
+ label: ((s = d.label) == null ? void 0 : s.trim()) || `Buy ${d.minBundleSize}+`
1512
1604
  });
1513
1605
  }
1514
- return c;
1515
- }, [he]), Qe = P(() => Math.max(Ce || ie, ot.length), [ot.length, Ce, ie]), [Re, ht] = W(!0), Xe = Y(G);
1516
- D(() => {
1517
- if (((u == null ? void 0 : u.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
1518
- const d = Xe.current > 0;
1519
- ht(!(d && G === 0));
1606
+ return i;
1607
+ }, [D]), Xe = $(() => Math.max(at || ye, ot.length), [ot.length, at, ye]), [lt, Ye] = ne(!0), rt = ie(ee);
1608
+ U(() => {
1609
+ if (((b == null ? void 0 : b.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
1610
+ const s = rt.current > 0;
1611
+ Ye(!(s && ee === 0));
1520
1612
  }
1521
- Xe.current = G;
1522
- }, [G, u == null ? void 0 : u.ctaButtonMode]);
1523
- const st = Y(null), mt = Y(null), $e = Y(null), bt = Y(M), Ve = (c) => {
1524
- const d = mt.current;
1613
+ rt.current = ee;
1614
+ }, [ee, b == null ? void 0 : b.ctaButtonMode]);
1615
+ const Ze = ie(null), mt = ie(null), ht = ie(null), gt = ie(W), h = (i) => {
1616
+ const s = mt.current;
1617
+ if (!s) return;
1618
+ const d = s.querySelector(`[data-variant-row="${i}"]`);
1525
1619
  if (!d) return;
1526
- const v = d.querySelector(`[data-variant-row="${c}"]`);
1527
- if (!v) return;
1528
- const o = d.getBoundingClientRect(), l = v.getBoundingClientRect(), m = 8;
1529
- if (l.top >= o.top + m && l.bottom <= o.bottom - m) return;
1530
- const y = Math.max(0, d.scrollHeight - d.clientHeight), I = l.top - o.top + l.height / 2, B = d.scrollTop + I - d.clientHeight / 2, E = Math.min(y, Math.max(0, B));
1531
- d.scrollTo({ top: E, behavior: "smooth" });
1620
+ const y = s.getBoundingClientRect(), C = d.getBoundingClientRect(), M = 8;
1621
+ if (C.top >= y.top + M && C.bottom <= y.bottom - M) return;
1622
+ const _ = Math.max(0, s.scrollHeight - s.clientHeight), R = C.top - y.top + C.height / 2, O = s.scrollTop + R - s.clientHeight / 2, Z = Math.min(_, Math.max(0, O));
1623
+ s.scrollTo({ top: Z, behavior: "smooth" });
1532
1624
  };
1533
- return D(() => {
1625
+ return U(() => {
1534
1626
  if (!e) return;
1535
- const c = (d) => {
1536
- d.key === "Escape" && t();
1627
+ const i = (s) => {
1628
+ s.key === "Escape" && t();
1537
1629
  };
1538
- return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
1539
- }, [t, e]), D(() => {
1630
+ return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
1631
+ }, [t, e]), U(() => {
1540
1632
  if (typeof window > "u") return;
1541
- const c = () => xe({ width: window.innerWidth, height: window.innerHeight });
1542
- return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
1543
- }, []), D(() => {
1544
- if (J.current != null && (window.clearTimeout(J.current), J.current = null), e) {
1545
- le(!0);
1633
+ const i = () => Ve({ width: window.innerWidth, height: window.innerHeight });
1634
+ return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
1635
+ }, []), U(() => {
1636
+ if (B.current != null && (window.clearTimeout(B.current), B.current = null), e) {
1637
+ g(!0);
1546
1638
  return;
1547
1639
  }
1548
- J.current = window.setTimeout(() => {
1549
- le(!1), J.current = null;
1640
+ B.current = window.setTimeout(() => {
1641
+ g(!1), B.current = null;
1550
1642
  }, 220);
1551
- }, [e]), D(() => () => {
1552
- J.current != null && window.clearTimeout(J.current);
1553
- }, []), D(() => () => {
1554
- ke.current != null && window.clearTimeout(ke.current);
1555
- }, []), D(() => () => {
1556
- Ie.current != null && window.clearTimeout(Ie.current);
1557
- }, []), D(() => {
1558
- if (!e || !se) return;
1559
- const c = requestAnimationFrame(() => {
1560
- var d;
1561
- return (d = Z.current) == null ? void 0 : d.focus();
1643
+ }, [e]), U(() => () => {
1644
+ B.current != null && window.clearTimeout(B.current);
1645
+ }, []), U(() => () => {
1646
+ Pe.current != null && window.clearTimeout(Pe.current);
1647
+ }, []), U(() => () => {
1648
+ Ae.current != null && window.clearTimeout(Ae.current);
1649
+ }, []), U(() => {
1650
+ if (!e || !ge) return;
1651
+ const i = requestAnimationFrame(() => {
1652
+ var s;
1653
+ return (s = ce.current) == null ? void 0 : s.focus();
1562
1654
  });
1563
- return () => cancelAnimationFrame(c);
1564
- }, [e, se]), D(() => {
1565
- const c = bt.current;
1566
- if (bt.current = M, M <= c) return;
1567
- const d = $e.current;
1568
- if (!d) return;
1569
- const v = he.some((w) => w.minBundleSize === M), o = he.find((w) => w.minBundleSize > M), l = o && v ? o.minBundleSize - 1 : o ? null : M - 1;
1570
- if (l == null || l < 0) return;
1571
- const m = requestAnimationFrame(() => {
1572
- const w = d.querySelector(`[data-box-slot="${l}"]`);
1573
- if (!w) return;
1574
- const y = d.getBoundingClientRect(), B = w.getBoundingClientRect().right - y.right;
1575
- if (B <= 1) return;
1576
- const E = Math.max(0, d.scrollWidth - d.clientWidth), ee = Math.min(E, Math.max(0, d.scrollLeft + B));
1577
- d.scrollTo({ left: ee, behavior: "smooth" });
1655
+ return () => cancelAnimationFrame(i);
1656
+ }, [e, ge]), U(() => {
1657
+ const i = gt.current;
1658
+ if (gt.current = W, W <= i) return;
1659
+ const s = ht.current;
1660
+ if (!s) return;
1661
+ const d = D.some((P) => P.minBundleSize === W), y = D.find((P) => P.minBundleSize > W), C = y && d ? y.minBundleSize - 1 : y ? null : W - 1;
1662
+ if (C == null || C < 0) return;
1663
+ const M = requestAnimationFrame(() => {
1664
+ const P = s.querySelector(`[data-box-slot="${C}"]`);
1665
+ if (!P) return;
1666
+ const _ = s.getBoundingClientRect(), O = P.getBoundingClientRect().right - _.right;
1667
+ if (O <= 1) return;
1668
+ const Z = Math.max(0, s.scrollWidth - s.clientWidth), le = Math.min(Z, Math.max(0, s.scrollLeft + O));
1669
+ s.scrollTo({ left: le, behavior: "smooth" });
1578
1670
  });
1579
- return () => cancelAnimationFrame(m);
1580
- }, [M, he]), D(() => {
1671
+ return () => cancelAnimationFrame(M);
1672
+ }, [W, D]), U(() => {
1581
1673
  if (!e) return;
1582
- const c = De.current;
1583
- if (De.current = M, M <= c) return;
1584
- const d = he.find((v) => v.minBundleSize === M);
1585
- d && (Ke(
1586
- N("bundle.celebration.received_discount", {
1587
- discount: R(d.discountPercent)
1674
+ const i = Ie.current;
1675
+ if (Ie.current = W, W <= i) return;
1676
+ const s = D.find((d) => d.minBundleSize === W);
1677
+ s && (Ge(
1678
+ k("bundle.celebration.received_discount", {
1679
+ discount: De(s.discountPercent)
1588
1680
  })
1589
- ), je((v) => v + 1), qe(!0), Ie.current != null && window.clearTimeout(Ie.current), Ie.current = window.setTimeout(() => {
1590
- qe(!1), Ie.current = null;
1591
- }, f));
1592
- }, [M, e, he]), D(() => {
1593
- if (!e || !Te || !Me) return;
1594
- const c = requestAnimationFrame(() => {
1595
- var y;
1596
- const d = ne.current, v = d == null ? void 0 : d.getBoundingClientRect(), o = (y = st.current) == null ? void 0 : y.getBoundingClientRect(), l = v ? v.left + v.width / 2 : o ? o.left + o.width / 2 : window.innerWidth / 2, m = v ? v.top + v.height / 2 : o ? o.top + o.height / 2 : window.innerHeight / 2, w = {
1597
- x: l - 2,
1598
- y: m - 2,
1681
+ ), Le((d) => d + 1), nt(!0), Ae.current != null && window.clearTimeout(Ae.current), Ae.current = window.setTimeout(() => {
1682
+ nt(!1), Ae.current = null;
1683
+ }, it));
1684
+ }, [W, e, D]), U(() => {
1685
+ if (!e || !Re || !je) return;
1686
+ const i = requestAnimationFrame(() => {
1687
+ var _;
1688
+ const s = Se.current, d = s == null ? void 0 : s.getBoundingClientRect(), y = (_ = Ze.current) == null ? void 0 : _.getBoundingClientRect(), C = d ? d.left + d.width / 2 : y ? y.left + y.width / 2 : window.innerWidth / 2, M = d ? d.top + d.height / 2 : y ? y.top + y.height / 2 : window.innerHeight / 2, P = {
1689
+ x: C - 2,
1690
+ y: M - 2,
1599
1691
  w: 4,
1600
1692
  h: 4
1601
1693
  };
1602
- Ee(w), Be((I) => I + 1), Pe(!0), ke.current != null && window.clearTimeout(ke.current), ke.current = window.setTimeout(() => {
1603
- Pe(!1), ke.current = null;
1604
- }, at);
1694
+ Oe(P), Fe((R) => R + 1), ke(!0), Pe.current != null && window.clearTimeout(Pe.current), Pe.current = window.setTimeout(() => {
1695
+ ke(!1), Pe.current = null;
1696
+ }, tt);
1605
1697
  });
1606
- return () => cancelAnimationFrame(c);
1607
- }, [We, Me, at, Te, e]), D(() => {
1608
- var c;
1609
- e && ((c = st.current) == null || c.focus());
1610
- }, [e]), ae ? /* @__PURE__ */ T(
1698
+ return () => cancelAnimationFrame(i);
1699
+ }, [Ee, je, tt, Re, e]), U(() => {
1700
+ var i;
1701
+ e && ((i = Ze.current) == null || i.focus());
1702
+ }, [e]), f ? /* @__PURE__ */ I(
1611
1703
  "div",
1612
1704
  {
1613
1705
  role: "dialog",
1614
1706
  "aria-modal": "true",
1615
- "aria-label": N("bundle.drawer.aria"),
1616
- className: [b.backdrop, e ? b.backdropOpen : b.backdropClosed, n.className].filter(Boolean).join(" "),
1617
- onMouseDown: (c) => {
1618
- c.target === c.currentTarget && t();
1707
+ "aria-label": k("bundle.drawer.aria"),
1708
+ className: [c.backdrop, e ? c.backdropOpen : c.backdropClosed, a.className].filter(Boolean).join(" "),
1709
+ onMouseDown: (i) => {
1710
+ i.target === i.currentTarget && t();
1619
1711
  },
1620
1712
  children: [
1621
- Ne && ge && ue.width > 0 && ue.height > 0 ? /* @__PURE__ */ s(
1622
- In,
1713
+ he && Me && be.width > 0 && be.height > 0 ? /* @__PURE__ */ n(
1714
+ Pn,
1623
1715
  {
1624
- width: ue.width,
1625
- height: ue.height,
1626
- confettiSource: ge,
1627
- colors: x,
1716
+ width: be.width,
1717
+ height: be.height,
1718
+ confettiSource: Me,
1719
+ colors: ve,
1628
1720
  recycle: !1,
1629
1721
  numberOfPieces: 70,
1630
1722
  tweenDuration: 100,
@@ -1633,218 +1725,316 @@ function Hi(n) {
1633
1725
  initialVelocityX: { min: -6, max: 6 },
1634
1726
  style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
1635
1727
  },
1636
- de
1728
+ Ne
1637
1729
  ) : null,
1638
- /* @__PURE__ */ T("aside", { ref: st, className: [b.panel, e ? b.panelOpen : b.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
1639
- Te && Me ? /* @__PURE__ */ s("div", { className: b.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: ne, className: b.celebrationChip, children: Me }, We) }) : null,
1640
- /* @__PURE__ */ T("header", { className: [b.header, se ? b.headerSearchOpen : null].filter(Boolean).join(" "), children: [
1641
- /* @__PURE__ */ s(
1730
+ /* @__PURE__ */ I("aside", { ref: Ze, className: [c.panel, e ? c.panelOpen : c.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
1731
+ Re && je ? /* @__PURE__ */ n("div", { className: c.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ n("div", { ref: Se, className: c.celebrationChip, children: je }, Ee) }) : null,
1732
+ /* @__PURE__ */ I("header", { className: [c.header, ge ? c.headerSearchOpen : null].filter(Boolean).join(" "), children: [
1733
+ /* @__PURE__ */ n(
1642
1734
  "button",
1643
1735
  {
1644
1736
  type: "button",
1645
- className: b.searchIconButton,
1646
- "aria-label": N(se ? "bundle.search.expanded" : "bundle.search"),
1647
- "aria-expanded": se,
1737
+ className: c.searchIconButton,
1738
+ "aria-label": k(ge ? "bundle.search.expanded" : "bundle.search"),
1739
+ "aria-expanded": ge,
1648
1740
  onClick: () => {
1649
- L(!0);
1741
+ z(!0);
1650
1742
  },
1651
- children: /* @__PURE__ */ s(Pn, { size: 18, "aria-hidden": "true" })
1743
+ children: /* @__PURE__ */ n(qn, { size: 18, "aria-hidden": "true" })
1652
1744
  }
1653
1745
  ),
1654
- /* @__PURE__ */ T("div", { className: b.headerCenter, children: [
1655
- /* @__PURE__ */ s("div", { className: b.headerTitleWrap, "aria-hidden": se, children: /* @__PURE__ */ s("h2", { className: b.title, children: H }) }),
1656
- /* @__PURE__ */ s("div", { className: b.headerSearchWrap, "aria-hidden": !se, children: /* @__PURE__ */ T("div", { className: b.searchBar, children: [
1657
- /* @__PURE__ */ s(
1746
+ /* @__PURE__ */ I("div", { className: c.headerCenter, children: [
1747
+ /* @__PURE__ */ n("div", { className: c.headerTitleWrap, "aria-hidden": ge, children: /* @__PURE__ */ n("h2", { className: c.title, children: j }) }),
1748
+ /* @__PURE__ */ n("div", { className: c.headerSearchWrap, "aria-hidden": !ge, children: /* @__PURE__ */ I("div", { className: c.searchBar, children: [
1749
+ /* @__PURE__ */ n(
1658
1750
  "input",
1659
1751
  {
1660
- ref: Z,
1661
- className: b.searchInput,
1752
+ ref: ce,
1753
+ className: c.searchInput,
1662
1754
  type: "search",
1663
- value: O,
1664
- placeholder: N("bundle.search.placeholder"),
1665
- onChange: (c) => X(c.target.value),
1755
+ value: E,
1756
+ placeholder: k("bundle.search.placeholder"),
1757
+ onChange: (i) => me(i.target.value),
1666
1758
  onBlur: () => {
1667
- O.trim() === "" && L(!1);
1759
+ E.trim() === "" && z(!1);
1668
1760
  }
1669
1761
  }
1670
1762
  ),
1671
- O.trim() ? /* @__PURE__ */ s(
1763
+ E.trim() ? /* @__PURE__ */ n(
1672
1764
  "button",
1673
1765
  {
1674
1766
  type: "button",
1675
- className: b.searchClearButton,
1676
- onMouseDown: (c) => {
1677
- c.preventDefault();
1767
+ className: c.searchClearButton,
1768
+ onMouseDown: (i) => {
1769
+ i.preventDefault();
1678
1770
  },
1679
1771
  onClick: () => {
1680
- var c;
1681
- X(""), (c = Z.current) == null || c.focus();
1772
+ var i;
1773
+ me(""), (i = ce.current) == null || i.focus();
1682
1774
  },
1683
- "aria-label": N("bundle.search.clear"),
1684
- children: N("bundle.search.clear")
1775
+ "aria-label": k("bundle.search.clear"),
1776
+ children: k("bundle.search.clear")
1685
1777
  }
1686
1778
  ) : null
1687
1779
  ] }) })
1688
1780
  ] }),
1689
- /* @__PURE__ */ s("button", { type: "button", onClick: t, disabled: r, className: b.closeButton, "aria-label": N("bundle.close"), children: "×" })
1781
+ /* @__PURE__ */ n("button", { type: "button", onClick: t, disabled: o, className: c.closeButton, "aria-label": k("bundle.close"), children: "×" })
1690
1782
  ] }),
1691
- /* @__PURE__ */ T("div", { className: b.body, ref: mt, children: [
1692
- i ? /* @__PURE__ */ s("p", { className: b.muted, children: N("bundle.loading") }) : null,
1693
- a ? /* @__PURE__ */ s("p", { className: b.error, children: a }) : null,
1694
- /* @__PURE__ */ s("div", { className: b.variants, children: !i && !a && S.length === 0 ? /* @__PURE__ */ s("p", { className: b.emptyState, children: N("bundle.empty") }) : /* @__PURE__ */ s("ul", { className: b.variantList, children: Oe.map((c) => {
1695
- var we, ze, et, tt;
1696
- const d = ce[c.id] ?? 0, v = U(c), o = A(c.selectedOptions), l = Q(c), m = $(c.id), w = m ?? Number.POSITIVE_INFINITY, y = d >= w, I = c.availableForSale !== !1 && !Fe && !y, B = c.availableForSale === !1 ? null : y ? N("bundle.stock.max_reached") : null, E = Ae, ee = Number(c.price), te = E != null && Number.isFinite(E) && E > 0 && Number.isFinite(ee), pe = te ? Math.round(ee * (1 - E / 100) * 100) / 100 : null;
1697
- return /* @__PURE__ */ T(
1783
+ /* @__PURE__ */ I("div", { className: c.body, ref: mt, children: [
1784
+ l ? /* @__PURE__ */ n("p", { className: c.muted, children: k("bundle.loading") }) : null,
1785
+ r ? /* @__PURE__ */ n("p", { className: c.error, children: r }) : null,
1786
+ /* @__PURE__ */ n("div", { className: c.variants, children: !l && !r && F.length === 0 ? /* @__PURE__ */ n("p", { className: c.emptyState, children: k("bundle.empty") }) : oe ? /* @__PURE__ */ n("ul", { className: c.variantList, children: oe.map((i) => {
1787
+ var M, P;
1788
+ const s = ((M = i.variants.find((_) => {
1789
+ var R;
1790
+ return (R = _.image) == null ? void 0 : R.url;
1791
+ })) == null ? void 0 : M.image) ?? null, d = i.variants.length > 1, y = re === i.productId, C = i.variants.filter((_) => (se[_.id] ?? 0) > 0);
1792
+ if (!d) {
1793
+ const _ = i.variants[0];
1794
+ if (!_) return null;
1795
+ const R = se[_.id] ?? 0, O = Ue(_), Z = Y(_.id), le = Z ?? Number.POSITIVE_INFINITY, te = R >= le, J = _.availableForSale === !1, fe = !J && !N && !te, L = !J && te ? k("bundle.stock.max_reached") : null, Q = Number(_.price), pe = X != null && Number.isFinite(X) && X > 0 && Number.isFinite(Q), We = pe ? Math.round(Q * (1 - X / 100) * 100) / 100 : null, Pt = (P = _.title) == null ? void 0 : P.trim(), Et = $e(_.selectedOptions) ?? (Pt && Pt.toLowerCase() !== "default title" ? Pt : null);
1796
+ return /* @__PURE__ */ I("li", { className: [c.variantRow, J ? c.variantRowSoldOut : null].filter(Boolean).join(" "), "data-variant-row": _.id, children: [
1797
+ /* @__PURE__ */ I("div", { className: c.variantLeft, children: [
1798
+ /* @__PURE__ */ n("div", { className: c.variantThumb, "aria-hidden": "true", children: s != null && s.url ? /* @__PURE__ */ n("img", { className: c.variantThumbImg, src: s.url, alt: s.altText ?? i.productTitle, loading: "lazy" }) : /* @__PURE__ */ n("div", { className: c.variantThumbFallback, children: i.productTitle.slice(0, 1).toUpperCase() || "•" }) }),
1799
+ /* @__PURE__ */ I("div", { className: c.variantInfo, children: [
1800
+ /* @__PURE__ */ n("div", { className: c.variantName, children: i.productTitle }),
1801
+ Et ? /* @__PURE__ */ n("div", { className: c.variantMeta, children: Et }) : null,
1802
+ /* @__PURE__ */ I("div", { className: c.variantPriceRow, children: [
1803
+ pe ? /* @__PURE__ */ n("span", { className: c.variantCompareAt, children: T(Q.toFixed(2)) }) : null,
1804
+ /* @__PURE__ */ n("span", { className: c.variantPrice, children: T(We != null ? We.toFixed(2) : Q.toFixed(2)) })
1805
+ ] })
1806
+ ] })
1807
+ ] }),
1808
+ J ? /* @__PURE__ */ n("div", { className: c.soldOutContainer, children: /* @__PURE__ */ n("span", { className: c.soldOut, "aria-label": k("bundle.a11y.sold_out", { name: O }), children: k("bundle.stock.sold_out") }) }) : R <= 0 && le <= 0 ? /* @__PURE__ */ n("div", { className: c.stockLimitContainer, children: /* @__PURE__ */ n("span", { className: c.stockLimitNotice, children: k("bundle.stock.max_added") }) }) : R <= 0 ? /* @__PURE__ */ n("button", { type: "button", onClick: () => de(_.id, 1), disabled: o || !fe, className: c.addToBundleButton, "aria-label": k("bundle.a11y.add_to_bundle", { name: O }), children: k("bundle.cta.add_to_bundle") }) : /* @__PURE__ */ I("div", { className: c.qtyControlsWrap, children: [
1809
+ /* @__PURE__ */ I("div", { className: c.qtyControls, children: [
1810
+ /* @__PURE__ */ n("button", { type: "button", onClick: () => de(_.id, R - 1), disabled: o || R <= 0, className: c.qtyButton, "aria-label": k("bundle.a11y.decrease", { name: O }), children: "−" }),
1811
+ /* @__PURE__ */ n("span", { className: c.qtyValue, "aria-label": k("bundle.a11y.quantity", { name: O, qty: R }), children: R }),
1812
+ /* @__PURE__ */ n("button", { type: "button", onClick: () => de(_.id, R + 1), disabled: o || !fe, className: c.qtyButton, "aria-label": L ? `${O} ${L.toLowerCase()}` : k("bundle.a11y.increase", { name: O }), children: "+" })
1813
+ ] }),
1814
+ L ? /* @__PURE__ */ n("div", { className: c.stockLimitNotice, children: L }) : null
1815
+ ] })
1816
+ ] }, i.productId);
1817
+ }
1818
+ return /* @__PURE__ */ I("li", { ref: y ? x : null, className: c.drawerProductGroup, children: [
1819
+ /* @__PURE__ */ I("div", { className: c.variantRow, "data-variant-row": i.productId, children: [
1820
+ /* @__PURE__ */ I("div", { className: c.variantLeft, children: [
1821
+ /* @__PURE__ */ n("div", { className: c.variantThumb, "aria-hidden": "true", children: s != null && s.url ? /* @__PURE__ */ n("img", { className: c.variantThumbImg, src: s.url, alt: s.altText ?? i.productTitle, loading: "lazy" }) : /* @__PURE__ */ n("div", { className: c.variantThumbFallback, children: i.productTitle.slice(0, 1).toUpperCase() || "•" }) }),
1822
+ /* @__PURE__ */ n("div", { className: c.variantInfo, children: /* @__PURE__ */ n("div", { className: c.variantName, children: i.productTitle }) })
1823
+ ] }),
1824
+ /* @__PURE__ */ I(
1825
+ "button",
1826
+ {
1827
+ type: "button",
1828
+ className: [c.addToBundleButton, c.selectButton].filter(Boolean).join(" "),
1829
+ "aria-expanded": y,
1830
+ disabled: o,
1831
+ onMouseDown: (_) => _.stopPropagation(),
1832
+ onClick: () => G((_) => _ === i.productId ? null : i.productId),
1833
+ children: [
1834
+ k("bundle.select.variant"),
1835
+ /* @__PURE__ */ n(Zt, { size: 13, strokeWidth: 2.5, className: [c.selectButtonChevron, y ? c.selectButtonChevronOpen : null].filter(Boolean).join(" ") })
1836
+ ]
1837
+ }
1838
+ )
1839
+ ] }),
1840
+ y && /* @__PURE__ */ n("div", { className: c.variantPicker, children: i.filteredVariants.map((_) => {
1841
+ const R = Y(_.id), O = (se[_.id] ?? 0) > 0, Z = _.availableForSale === !1, le = R != null && R <= 0, te = !O && N, J = o || Z || le || te, fe = Z ? k("bundle.stock.sold_out") : le ? k("bundle.stock.max_added") : te ? k("bundle.stock.max_reached") : null, L = m(_), Q = Number(_.price), pe = X != null && Number.isFinite(X) && X > 0 && Number.isFinite(Q), We = pe ? Math.round(Q * (1 - X / 100) * 100) / 100 : null;
1842
+ return /* @__PURE__ */ I(
1843
+ "button",
1844
+ {
1845
+ type: "button",
1846
+ disabled: J,
1847
+ className: [c.variantPickerRow, O ? c.variantPickerRowSelected : null].filter(Boolean).join(" "),
1848
+ onClick: () => {
1849
+ O || de(_.id, 1), G(null);
1850
+ },
1851
+ children: [
1852
+ /* @__PURE__ */ n("span", { className: c.variantPickerLabel, children: L }),
1853
+ /* @__PURE__ */ n("span", { className: c.variantPickerPriceGroup, children: fe ? /* @__PURE__ */ n("span", { className: c.variantPickerSoldOut, children: fe }) : /* @__PURE__ */ I(ct, { children: [
1854
+ pe ? /* @__PURE__ */ n("span", { className: c.variantPickerCompareAt, children: T(Q.toFixed(2)) }) : null,
1855
+ /* @__PURE__ */ n("span", { className: c.variantPickerPrice, children: T(We != null ? We.toFixed(2) : Q.toFixed(2)) })
1856
+ ] }) }),
1857
+ O ? /* @__PURE__ */ n("span", { className: c.variantPickerCheck, "aria-hidden": "true", children: "✓" }) : null
1858
+ ]
1859
+ },
1860
+ _.id
1861
+ );
1862
+ }) }),
1863
+ C.length > 0 && /* @__PURE__ */ n("div", { className: c.drawerSelectedList, children: C.map((_) => {
1864
+ const R = se[_.id] ?? 0, O = Ue(_), Z = Y(_.id), le = Z ?? Number.POSITIVE_INFINITY, te = R >= le, J = _.availableForSale !== !1 && !N && !te, fe = _.availableForSale !== !1 && te ? k("bundle.stock.max_reached") : null, L = Number(_.price), Q = X != null && Number.isFinite(X) && X > 0 && Number.isFinite(L), pe = Q ? Math.round(L * (1 - X / 100) * 100) / 100 : null, We = m(_);
1865
+ return /* @__PURE__ */ I("div", { className: c.drawerSubRow, "data-variant-row": _.id, children: [
1866
+ /* @__PURE__ */ I("div", { className: c.drawerSubRowInfo, children: [
1867
+ /* @__PURE__ */ n("span", { className: c.drawerSubRowName, children: We }),
1868
+ /* @__PURE__ */ I("div", { className: c.variantPriceRow, children: [
1869
+ Q ? /* @__PURE__ */ n("span", { className: c.variantCompareAt, children: T(L.toFixed(2)) }) : null,
1870
+ /* @__PURE__ */ n("span", { className: c.variantPrice, children: T(pe != null ? pe.toFixed(2) : L.toFixed(2)) })
1871
+ ] })
1872
+ ] }),
1873
+ /* @__PURE__ */ I("div", { className: c.qtyControlsWrap, children: [
1874
+ /* @__PURE__ */ I("div", { className: c.qtyControls, children: [
1875
+ /* @__PURE__ */ n("button", { type: "button", onClick: () => de(_.id, R - 1), disabled: o || R <= 0, className: c.qtyButton, "aria-label": k("bundle.a11y.decrease", { name: O }), children: "−" }),
1876
+ /* @__PURE__ */ n("span", { className: c.qtyValue, "aria-label": k("bundle.a11y.quantity", { name: O, qty: R }), children: R }),
1877
+ /* @__PURE__ */ n("button", { type: "button", onClick: () => de(_.id, R + 1), disabled: o || !J, className: c.qtyButton, "aria-label": fe ? `${O} ${fe.toLowerCase()}` : k("bundle.a11y.increase", { name: O }), children: "+" })
1878
+ ] }),
1879
+ fe ? /* @__PURE__ */ n("div", { className: c.stockLimitNotice, children: fe }) : null
1880
+ ] })
1881
+ ] }, _.id);
1882
+ }) })
1883
+ ] }, i.productId);
1884
+ }) }) : /* @__PURE__ */ n("ul", { className: c.variantList, children: V.map((i) => {
1885
+ var fe, L, Q, pe;
1886
+ const s = se[i.id] ?? 0, d = ze(i), y = $e(i.selectedOptions), C = Ue(i), M = Y(i.id), P = M ?? Number.POSITIVE_INFINITY, _ = s >= P, R = i.availableForSale !== !1 && !N && !_, O = i.availableForSale === !1 ? null : _ ? k("bundle.stock.max_reached") : null, Z = X, le = Number(i.price), te = Z != null && Number.isFinite(Z) && Z > 0 && Number.isFinite(le), J = te ? Math.round(le * (1 - Z / 100) * 100) / 100 : null;
1887
+ return /* @__PURE__ */ I(
1698
1888
  "li",
1699
1889
  {
1700
- className: [b.variantRow, c.availableForSale === !1 && b.variantRowSoldOut].filter(Boolean).join(" "),
1701
- "data-variant-row": c.id,
1890
+ className: [c.variantRow, i.availableForSale === !1 && c.variantRowSoldOut].filter(Boolean).join(" "),
1891
+ "data-variant-row": i.id,
1702
1892
  children: [
1703
- /* @__PURE__ */ T("div", { className: b.variantLeft, children: [
1704
- /* @__PURE__ */ s("div", { className: b.variantThumb, "aria-hidden": "true", children: (we = c.image) != null && we.url ? /* @__PURE__ */ s(
1893
+ /* @__PURE__ */ I("div", { className: c.variantLeft, children: [
1894
+ /* @__PURE__ */ n("div", { className: c.variantThumb, "aria-hidden": "true", children: (fe = i.image) != null && fe.url ? /* @__PURE__ */ n(
1705
1895
  "img",
1706
1896
  {
1707
- className: b.variantThumbImg,
1708
- src: c.image.url,
1709
- alt: c.image.altText ?? l,
1897
+ className: c.variantThumbImg,
1898
+ src: i.image.url,
1899
+ alt: i.image.altText ?? C,
1710
1900
  loading: "lazy"
1711
1901
  }
1712
- ) : /* @__PURE__ */ s("div", { className: b.variantThumbFallback, children: ((tt = (et = (ze = c.product) == null ? void 0 : ze.title) == null ? void 0 : et.slice(0, 1)) == null ? void 0 : tt.toUpperCase()) ?? "•" }) }),
1713
- /* @__PURE__ */ T("div", { className: b.variantInfo, children: [
1714
- /* @__PURE__ */ s("div", { className: b.variantName, children: v }),
1715
- o ? /* @__PURE__ */ s("div", { className: b.variantMeta, children: o }) : null,
1716
- /* @__PURE__ */ T("div", { className: b.variantPriceRow, children: [
1717
- te ? /* @__PURE__ */ s("span", { className: b.variantCompareAt, children: z(Number.isFinite(ee) ? ee.toFixed(2) : c.price) }) : null,
1718
- /* @__PURE__ */ s("span", { className: b.variantPrice, children: z(
1719
- pe != null ? pe.toFixed(2) : Number.isFinite(ee) ? ee.toFixed(2) : c.price
1902
+ ) : /* @__PURE__ */ n("div", { className: c.variantThumbFallback, children: ((pe = (Q = (L = i.product) == null ? void 0 : L.title) == null ? void 0 : Q.slice(0, 1)) == null ? void 0 : pe.toUpperCase()) ?? "•" }) }),
1903
+ /* @__PURE__ */ I("div", { className: c.variantInfo, children: [
1904
+ /* @__PURE__ */ n("div", { className: c.variantName, children: d }),
1905
+ y ? /* @__PURE__ */ n("div", { className: c.variantMeta, children: y }) : null,
1906
+ /* @__PURE__ */ I("div", { className: c.variantPriceRow, children: [
1907
+ te ? /* @__PURE__ */ n("span", { className: c.variantCompareAt, children: T(Number.isFinite(le) ? le.toFixed(2) : i.price) }) : null,
1908
+ /* @__PURE__ */ n("span", { className: c.variantPrice, children: T(
1909
+ J != null ? J.toFixed(2) : Number.isFinite(le) ? le.toFixed(2) : i.price
1720
1910
  ) })
1721
1911
  ] })
1722
1912
  ] })
1723
1913
  ] }),
1724
- c.availableForSale === !1 ? /* @__PURE__ */ s("div", { className: b.soldOutContainer, children: /* @__PURE__ */ s("span", { className: b.soldOut, "aria-label": N("bundle.a11y.sold_out", { name: l }), children: N("bundle.stock.sold_out") }) }) : d <= 0 && w <= 0 ? /* @__PURE__ */ s("div", { className: b.stockLimitContainer, children: /* @__PURE__ */ s("span", { className: b.stockLimitNotice, "aria-label": N("bundle.a11y.max_available_selected", { name: l }), children: N("bundle.stock.max_added") }) }) : d <= 0 ? /* @__PURE__ */ s(
1914
+ i.availableForSale === !1 ? /* @__PURE__ */ n("div", { className: c.soldOutContainer, children: /* @__PURE__ */ n("span", { className: c.soldOut, "aria-label": k("bundle.a11y.sold_out", { name: C }), children: k("bundle.stock.sold_out") }) }) : s <= 0 && P <= 0 ? /* @__PURE__ */ n("div", { className: c.stockLimitContainer, children: /* @__PURE__ */ n("span", { className: c.stockLimitNotice, "aria-label": k("bundle.a11y.max_available_selected", { name: C }), children: k("bundle.stock.max_added") }) }) : s <= 0 ? /* @__PURE__ */ n(
1725
1915
  "button",
1726
1916
  {
1727
1917
  type: "button",
1728
- onClick: () => me(c.id, 1),
1729
- disabled: r || !I,
1730
- className: b.addToBundleButton,
1731
- "aria-label": B ? `${l} ${B.toLowerCase()}` : N("bundle.a11y.add_to_bundle", { name: l }),
1732
- children: N("bundle.cta.add_to_bundle")
1918
+ onClick: () => de(i.id, 1),
1919
+ disabled: o || !R,
1920
+ className: c.addToBundleButton,
1921
+ "aria-label": O ? `${C} ${O.toLowerCase()}` : k("bundle.a11y.add_to_bundle", { name: C }),
1922
+ children: k("bundle.cta.add_to_bundle")
1733
1923
  }
1734
- ) : /* @__PURE__ */ T("div", { className: b.qtyControlsWrap, children: [
1735
- /* @__PURE__ */ T("div", { className: b.qtyControls, children: [
1736
- /* @__PURE__ */ s(
1924
+ ) : /* @__PURE__ */ I("div", { className: c.qtyControlsWrap, children: [
1925
+ /* @__PURE__ */ I("div", { className: c.qtyControls, children: [
1926
+ /* @__PURE__ */ n(
1737
1927
  "button",
1738
1928
  {
1739
1929
  type: "button",
1740
- onClick: () => me(c.id, d - 1),
1741
- disabled: r || d <= 0,
1742
- className: b.qtyButton,
1743
- "aria-label": N("bundle.a11y.decrease", { name: l }),
1930
+ onClick: () => de(i.id, s - 1),
1931
+ disabled: o || s <= 0,
1932
+ className: c.qtyButton,
1933
+ "aria-label": k("bundle.a11y.decrease", { name: C }),
1744
1934
  children: "−"
1745
1935
  }
1746
1936
  ),
1747
- /* @__PURE__ */ s("span", { className: b.qtyValue, "aria-label": N("bundle.a11y.quantity", { name: l, qty: d }), children: d }),
1748
- /* @__PURE__ */ s(
1937
+ /* @__PURE__ */ n("span", { className: c.qtyValue, "aria-label": k("bundle.a11y.quantity", { name: C, qty: s }), children: s }),
1938
+ /* @__PURE__ */ n(
1749
1939
  "button",
1750
1940
  {
1751
1941
  type: "button",
1752
- onClick: () => me(c.id, d + 1),
1753
- disabled: r || !I,
1754
- className: b.qtyButton,
1755
- "aria-label": B ? `${l} ${B.toLowerCase()}` : N("bundle.a11y.increase", { name: l }),
1942
+ onClick: () => de(i.id, s + 1),
1943
+ disabled: o || !R,
1944
+ className: c.qtyButton,
1945
+ "aria-label": O ? `${C} ${O.toLowerCase()}` : k("bundle.a11y.increase", { name: C }),
1756
1946
  children: "+"
1757
1947
  }
1758
1948
  )
1759
1949
  ] }),
1760
- B ? /* @__PURE__ */ s("div", { className: b.stockLimitNotice, children: B }) : null
1950
+ O ? /* @__PURE__ */ n("div", { className: c.stockLimitNotice, children: O }) : null
1761
1951
  ] })
1762
1952
  ]
1763
1953
  },
1764
- c.id
1954
+ i.id
1765
1955
  );
1766
1956
  }) }) })
1767
1957
  ] }),
1768
- /* @__PURE__ */ T("footer", { className: b.footer, ref: V, children: [
1769
- /* @__PURE__ */ s("div", { className: b.boxSummaryWindow, ref: $e, children: /* @__PURE__ */ s("div", { className: b.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Qe }).map((c, d) => {
1770
- var B, E, ee, te;
1771
- const v = ot[d], o = He.get(d), l = !!v, m = !!o, w = m && !l, y = o ? N("bundle.discount.off_label", { discount: R(o.discountPercent) }) : null, I = l ? v.displayName : N("bundle.slot", { slot: d + 1 });
1772
- return /* @__PURE__ */ T("div", { "data-box-slot": d, className: b.boxSlot, children: [
1773
- /* @__PURE__ */ s(
1958
+ /* @__PURE__ */ I("footer", { className: c.footer, ref: xe, children: [
1959
+ /* @__PURE__ */ n("div", { className: c.boxSummaryWindow, ref: ht, children: /* @__PURE__ */ n("div", { className: c.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Xe }).map((i, s) => {
1960
+ var O, Z, le, te;
1961
+ const d = ot[s], y = wt.get(s), C = !!d, M = !!y, P = M && !C, _ = y ? k("bundle.discount.off_label", { discount: De(y.discountPercent) }) : null, R = C ? d.displayName : k("bundle.slot", { slot: s + 1 });
1962
+ return /* @__PURE__ */ I("div", { "data-box-slot": s, className: c.boxSlot, children: [
1963
+ /* @__PURE__ */ n(
1774
1964
  "div",
1775
1965
  {
1776
1966
  className: [
1777
- b.boxItem,
1778
- l ? b.boxItemFilled : b.boxItemPlaceholder,
1779
- m ? b.boxItemThreshold : null,
1780
- l ? b.boxItemClickable : null
1967
+ c.boxItem,
1968
+ C ? c.boxItemFilled : c.boxItemPlaceholder,
1969
+ M ? c.boxItemThreshold : null,
1970
+ C ? c.boxItemClickable : null
1781
1971
  ].filter(Boolean).join(" "),
1782
- role: l ? "button" : void 0,
1783
- tabIndex: l ? 0 : void 0,
1784
- onClick: l ? () => Ve(v.id) : void 0,
1785
- onKeyDown: l ? (pe) => {
1786
- (pe.key === "Enter" || pe.key === " ") && (pe.preventDefault(), Ve(v.id));
1972
+ role: C ? "button" : void 0,
1973
+ tabIndex: C ? 0 : void 0,
1974
+ onClick: C ? () => h(d.id) : void 0,
1975
+ onKeyDown: C ? (J) => {
1976
+ (J.key === "Enter" || J.key === " ") && (J.preventDefault(), h(d.id));
1787
1977
  } : void 0,
1788
- "aria-label": w && y ? `${I}. ${N("bundle.unlocks", { discount: y })}.` : I,
1789
- title: w && y ? `${I} • ${N("bundle.unlocks", { discount: y })}` : I,
1790
- children: l ? (B = v.image) != null && B.url ? /* @__PURE__ */ s(
1978
+ "aria-label": P && _ ? `${R}. ${k("bundle.unlocks", { discount: _ })}.` : R,
1979
+ title: P && _ ? `${R} • ${k("bundle.unlocks", { discount: _ })}` : R,
1980
+ children: C ? (O = d.image) != null && O.url ? /* @__PURE__ */ n(
1791
1981
  "img",
1792
1982
  {
1793
- className: b.boxItemImage,
1794
- src: v.image.url,
1795
- alt: v.image.altText ?? v.displayName,
1983
+ className: c.boxItemImage,
1984
+ src: d.image.url,
1985
+ alt: d.image.altText ?? d.displayName,
1796
1986
  loading: "lazy"
1797
1987
  }
1798
- ) : /* @__PURE__ */ s("div", { className: b.boxItemFallback, "aria-hidden": "true", children: ((te = (ee = (E = v.product) == null ? void 0 : E.title) == null ? void 0 : ee.slice(0, 1)) == null ? void 0 : te.toUpperCase()) ?? "•" }) : w && y ? /* @__PURE__ */ s("div", { className: b.boxItemDiscountText, children: y }) : /* @__PURE__ */ s("div", { className: b.boxItemPlus, "aria-hidden": "true", children: "+" })
1988
+ ) : /* @__PURE__ */ n("div", { className: c.boxItemFallback, "aria-hidden": "true", children: ((te = (le = (Z = d.product) == null ? void 0 : Z.title) == null ? void 0 : le.slice(0, 1)) == null ? void 0 : te.toUpperCase()) ?? "•" }) : P && _ ? /* @__PURE__ */ n("div", { className: c.boxItemDiscountText, children: _ }) : /* @__PURE__ */ n("div", { className: c.boxItemPlus, "aria-hidden": "true", children: "+" })
1799
1989
  }
1800
1990
  ),
1801
- m ? /* @__PURE__ */ s("div", { className: b.boxThresholdLabel, children: o.label }) : null
1802
- ] }, d);
1991
+ M ? /* @__PURE__ */ n("div", { className: c.boxThresholdLabel, children: y.label }) : null
1992
+ ] }, s);
1803
1993
  }) }) }),
1804
- /* @__PURE__ */ s(
1994
+ /* @__PURE__ */ n(
1805
1995
  "div",
1806
1996
  {
1807
- className: [b.ctaTotalsWrap, C ? b.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
1808
- "aria-hidden": !C,
1809
- children: /* @__PURE__ */ T("div", { className: b.ctaTotals, "aria-label": N("bundle.totals"), children: [
1810
- Ae ? /* @__PURE__ */ s("span", { className: b.ctaDiscountBadge, children: N("bundle.discount.badge", { discount: Ae }) }) : /* @__PURE__ */ s("span", {}),
1811
- /* @__PURE__ */ s("span", { children: Ae ? /* @__PURE__ */ T(Nt, { children: [
1812
- /* @__PURE__ */ s("span", { className: b.ctaTotalsStrike, children: z(be.toFixed(2)) }),
1997
+ className: [c.ctaTotalsWrap, Qe ? c.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
1998
+ "aria-hidden": !Qe,
1999
+ children: /* @__PURE__ */ I("div", { className: c.ctaTotals, "aria-label": k("bundle.totals"), children: [
2000
+ X ? /* @__PURE__ */ n("span", { className: c.ctaDiscountBadge, children: k("bundle.discount.badge", { discount: X }) }) : /* @__PURE__ */ n("span", {}),
2001
+ /* @__PURE__ */ n("span", { children: X ? /* @__PURE__ */ I(ct, { children: [
2002
+ /* @__PURE__ */ n("span", { className: c.ctaTotalsStrike, children: T(Be.toFixed(2)) }),
1813
2003
  " ",
1814
- /* @__PURE__ */ s("span", { className: b.ctaTotalsPrice, children: z(Ue.toFixed(2)) })
1815
- ] }) : /* @__PURE__ */ s("span", { className: b.ctaTotalsPrice, children: z(be.toFixed(2)) }) })
2004
+ /* @__PURE__ */ n("span", { className: c.ctaTotalsPrice, children: T(vt.toFixed(2)) })
2005
+ ] }) : /* @__PURE__ */ n("span", { className: c.ctaTotalsPrice, children: T(Be.toFixed(2)) }) })
1816
2006
  ] })
1817
2007
  }
1818
2008
  ),
1819
2009
  (() => {
1820
- const c = (u == null ? void 0 : u.ctaButtonMode) || "add_to_cart";
1821
- return c === "add_to_cart_checkout" ? G > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: K, disabled: !F, className: b.cta, children: r ? N("bundle.cta.adding") : N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) }) : /* @__PURE__ */ T("div", { className: `${b.ctaButtonGroup} ${Re ? b.ctaButtonGroupAnimating : ""}`, children: [
1822
- /* @__PURE__ */ s(
2010
+ const i = (b == null ? void 0 : b.ctaButtonMode) || "add_to_cart";
2011
+ return i === "add_to_cart_checkout" ? ee > 0 ? /* @__PURE__ */ n("button", { type: "button", onClick: ue, disabled: !H, className: c.cta, children: o ? k("bundle.cta.adding") : k("bundle.cta.add_more", { count: ee, productWord: ut(ae, ee) }) }) : /* @__PURE__ */ I("div", { className: `${c.ctaButtonGroup} ${lt ? c.ctaButtonGroupAnimating : ""}`, children: [
2012
+ /* @__PURE__ */ n(
1823
2013
  "button",
1824
2014
  {
1825
2015
  type: "button",
1826
- onClick: K,
1827
- disabled: !F,
1828
- className: `${b.ctaDualLeft} ${Re ? b.ctaDualLeftAnimating : ""}`,
1829
- children: /* @__PURE__ */ s("span", { children: N(r ? "bundle.cta.adding" : "bundle.cta.add_to_basket") })
2016
+ onClick: ue,
2017
+ disabled: !H,
2018
+ className: `${c.ctaDualLeft} ${lt ? c.ctaDualLeftAnimating : ""}`,
2019
+ children: /* @__PURE__ */ n("span", { children: k(o ? "bundle.cta.adding" : "bundle.cta.add_to_basket") })
1830
2020
  }
1831
2021
  ),
1832
- /* @__PURE__ */ s(
2022
+ /* @__PURE__ */ n(
1833
2023
  "button",
1834
2024
  {
1835
2025
  type: "button",
1836
- onClick: g,
1837
- disabled: !F,
1838
- className: `${b.ctaDualRight} ${Re ? b.ctaDualRightAnimating : ""}`,
1839
- children: /* @__PURE__ */ s("span", { children: N(r ? "bundle.cta.processing" : "bundle.cta.checkout") })
2026
+ onClick: v,
2027
+ disabled: !H,
2028
+ className: `${c.ctaDualRight} ${lt ? c.ctaDualRightAnimating : ""}`,
2029
+ children: /* @__PURE__ */ n("span", { children: k(o ? "bundle.cta.processing" : "bundle.cta.checkout") })
1840
2030
  }
1841
2031
  )
1842
- ] }) : c === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: g, disabled: !F, className: b.cta, children: r ? N("bundle.cta.processing") : G > 0 ? N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) : N("bundle.cta.checkout") }) : /* @__PURE__ */ s("button", { type: "button", onClick: K, disabled: !F, className: b.cta, children: r ? N("bundle.cta.adding") : G > 0 ? N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) : N("bundle.cta.add_to_basket") });
2032
+ ] }) : i === "checkout" ? /* @__PURE__ */ n("button", { type: "button", onClick: v, disabled: !H, className: c.cta, children: o ? k("bundle.cta.processing") : ee > 0 ? k("bundle.cta.add_more", { count: ee, productWord: ut(ae, ee) }) : k("bundle.cta.checkout") }) : /* @__PURE__ */ n("button", { type: "button", onClick: ue, disabled: !H, className: c.cta, children: o ? k("bundle.cta.adding") : ee > 0 ? k("bundle.cta.add_more", { count: ee, productWord: ut(ae, ee) }) : k("bundle.cta.add_to_basket") });
1843
2033
  })(),
1844
- /* @__PURE__ */ T("div", { className: b.poweredBy, children: [
1845
- N("bundle.powered_by"),
2034
+ /* @__PURE__ */ I("div", { className: c.poweredBy, children: [
2035
+ k("bundle.powered_by"),
1846
2036
  " ",
1847
- /* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
2037
+ /* @__PURE__ */ n("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
1848
2038
  ] })
1849
2039
  ] })
1850
2040
  ] })
@@ -1852,542 +2042,714 @@ function Hi(n) {
1852
2042
  }
1853
2043
  ) : null;
1854
2044
  }
1855
- const tr = "_panel_gafs6_2", nr = "_header_gafs6_20", ar = "_title_gafs6_24", rr = "_status_gafs6_32", ir = "_error_gafs6_37", or = "_section_gafs6_43", sr = "_sectionTitle_gafs6_48", lr = "_rulesVisual_gafs6_101", cr = "_rulesLabelsRow_gafs6_108", ur = "_rulesLinesRow_gafs6_115", dr = "_rulesLineLabelCell_gafs6_122", hr = "_rulesLineLabel_gafs6_122", mr = "_rulesLine_gafs6_115", br = "_rulesLineEmpty_gafs6_156", fr = "_rulesLineFilled_gafs6_160", pr = "_variants_gafs6_164", _r = "_variantList_gafs6_172", gr = "_emptyState_gafs6_180", wr = "_variantRow_gafs6_192", yr = "_variantRowInteractive_gafs6_204", vr = "_variantRowSelected_gafs6_208", xr = "_variantRowSoldOut_gafs6_213", Nr = "_variantMedia_gafs6_217", Ir = "_variantContent_gafs6_225", Sr = "_variantHeader_gafs6_233", Cr = "_variantTitle_gafs6_239", Br = "_variantImage_gafs6_253", kr = "_variantImageFallback_gafs6_261", Tr = "_variantMeta_gafs6_274", Lr = "_variantPrice_gafs6_279", Rr = "_variantFooterRow_gafs6_285", Pr = "_variantActions_gafs6_292", Mr = "_qtyActions_gafs6_298", Fr = "_qtyActionsWrap_gafs6_304", Or = "_soldOut_gafs6_355", Ar = "_stockLimitNotice_gafs6_363", Er = "_qtyChip_gafs6_372", Dr = "_qtyChipInteractive_gafs6_387", qr = "_qtyChipValue_gafs6_391", $r = "_qtyChipPlus_gafs6_397", Vr = "_qtyChipClear_gafs6_402", zr = "_qtyTrash_gafs6_431", Wr = "_footer_gafs6_443", jr = "_boxSummaryWindow_gafs6_448", Ur = "_boxSummaryRow_gafs6_462", Hr = "_boxSlot_gafs6_470", Qr = "_boxItem_gafs6_479", Gr = "_boxItemFilled_gafs6_496", Yr = "_boxItemPlaceholder_gafs6_502", Kr = "_boxItemThreshold_gafs6_508", Xr = "_boxItemClickable_gafs6_516", Zr = "_boxItemImage_gafs6_525", Jr = "_boxItemFallback_gafs6_536", ei = "_boxItemPlus_gafs6_549", ti = "_boxItemDiscountText_gafs6_561", ni = "_boxThresholdLabel_gafs6_574", ai = "_totalsReveal_gafs6_585", ri = "_totalsRevealOpen_gafs6_593", ii = "_ctaTotalsWrap_gafs6_598", oi = "_ctaTotalsWrapVisible_gafs6_603", si = "_ctaTotals_gafs6_598", li = "_ctaDiscountBadge_gafs6_618", ci = "_ctaTotalsStrike_gafs6_629", ui = "_ctaTotalsPrice_gafs6_635", di = "_cta_gafs6_598", hi = "_ctaButtonGroup_gafs6_667", mi = "_ctaDualLeft_gafs6_673", bi = "_ctaDualRight_gafs6_674", fi = "_poweredBy_gafs6_701", p = {
1856
- panel: tr,
1857
- header: nr,
1858
- title: ar,
1859
- status: rr,
1860
- error: ir,
1861
- section: or,
1862
- sectionTitle: sr,
1863
- rulesVisual: lr,
1864
- rulesLabelsRow: cr,
1865
- rulesLinesRow: ur,
1866
- rulesLineLabelCell: dr,
1867
- rulesLineLabel: hr,
1868
- rulesLine: mr,
1869
- rulesLineEmpty: br,
1870
- rulesLineFilled: fr,
1871
- variants: pr,
1872
- variantList: _r,
1873
- emptyState: gr,
1874
- variantRow: wr,
1875
- variantRowInteractive: yr,
1876
- variantRowSelected: vr,
1877
- variantRowSoldOut: xr,
1878
- variantMedia: Nr,
1879
- variantContent: Ir,
1880
- variantHeader: Sr,
1881
- variantTitle: Cr,
1882
- variantImage: Br,
1883
- variantImageFallback: kr,
1884
- variantMeta: Tr,
1885
- variantPrice: Lr,
1886
- variantFooterRow: Rr,
1887
- variantActions: Pr,
1888
- qtyActions: Mr,
1889
- qtyActionsWrap: Fr,
1890
- soldOut: Or,
1891
- stockLimitNotice: Ar,
1892
- qtyChip: Er,
1893
- qtyChipInteractive: Dr,
1894
- qtyChipValue: qr,
1895
- qtyChipPlus: $r,
1896
- qtyChipClear: Vr,
1897
- qtyTrash: zr,
1898
- footer: Wr,
1899
- boxSummaryWindow: jr,
1900
- boxSummaryRow: Ur,
1901
- boxSlot: Hr,
1902
- boxItem: Qr,
1903
- boxItemFilled: Gr,
1904
- boxItemPlaceholder: Yr,
1905
- boxItemThreshold: Kr,
1906
- boxItemClickable: Xr,
1907
- boxItemImage: Zr,
1908
- boxItemFallback: Jr,
1909
- boxItemPlus: ei,
1910
- boxItemDiscountText: ti,
1911
- boxThresholdLabel: ni,
1912
- totalsReveal: ai,
1913
- totalsRevealOpen: ri,
1914
- ctaTotalsWrap: ii,
1915
- ctaTotalsWrapVisible: oi,
1916
- ctaTotals: si,
1917
- ctaDiscountBadge: li,
1918
- ctaTotalsStrike: ci,
1919
- ctaTotalsPrice: ui,
1920
- cta: di,
1921
- ctaButtonGroup: hi,
1922
- ctaDualLeft: mi,
1923
- ctaDualRight: bi,
1924
- poweredBy: fi
2045
+ const Nr = "_panel_o9snd_2", kr = "_header_o9snd_20", Cr = "_title_o9snd_24", xr = "_status_o9snd_32", Ir = "_error_o9snd_37", Sr = "_section_o9snd_43", Pr = "_sectionTitle_o9snd_48", Br = "_rulesVisual_o9snd_101", Tr = "_rulesLabelsRow_o9snd_108", Lr = "_rulesLinesRow_o9snd_115", Rr = "_rulesLineLabelCell_o9snd_122", Fr = "_rulesLineLabel_o9snd_122", Mr = "_rulesLine_o9snd_115", Or = "_rulesLineEmpty_o9snd_156", Ar = "_rulesLineFilled_o9snd_160", qr = "_variants_o9snd_164", Vr = "_variantList_o9snd_172", Er = "_emptyState_o9snd_180", Dr = "_variantRow_o9snd_192", $r = "_variantRowInteractive_o9snd_204", zr = "_variantRowSelected_o9snd_208", Wr = "_variantRowSoldOut_o9snd_213", jr = "_variantMedia_o9snd_217", Gr = "_variantContent_o9snd_225", Ur = "_variantHeader_o9snd_233", Hr = "_variantTitle_o9snd_239", Qr = "_variantImage_o9snd_253", Yr = "_variantImageFallback_o9snd_261", Kr = "_variantMeta_o9snd_274", Xr = "_variantPrice_o9snd_279", Zr = "_variantFooterRow_o9snd_285", Jr = "_variantActions_o9snd_292", ei = "_qtyActions_o9snd_298", ti = "_qtyActionsWrap_o9snd_304", ni = "_soldOut_o9snd_355", ai = "_stockLimitNotice_o9snd_363", ri = "_qtyChip_o9snd_372", ii = "_qtyChipInteractive_o9snd_387", oi = "_qtyChipValue_o9snd_391", li = "_qtyChipPlus_o9snd_397", si = "_qtyChipClear_o9snd_402", ci = "_qtyTrash_o9snd_431", ui = "_footer_o9snd_443", di = "_boxSummaryWindow_o9snd_448", mi = "_boxSummaryRow_o9snd_462", hi = "_boxSlot_o9snd_470", bi = "_boxItem_o9snd_479", fi = "_boxItemFilled_o9snd_496", pi = "_boxItemPlaceholder_o9snd_502", _i = "_boxItemThreshold_o9snd_508", yi = "_boxItemClickable_o9snd_516", vi = "_boxItemImage_o9snd_525", wi = "_boxItemFallback_o9snd_536", gi = "_boxItemPlus_o9snd_549", Ni = "_boxItemDiscountText_o9snd_561", ki = "_boxThresholdLabel_o9snd_574", Ci = "_totalsReveal_o9snd_585", xi = "_totalsRevealOpen_o9snd_593", Ii = "_ctaTotalsWrap_o9snd_598", Si = "_ctaTotalsWrapVisible_o9snd_603", Pi = "_ctaTotals_o9snd_598", Bi = "_ctaDiscountBadge_o9snd_618", Ti = "_ctaTotalsStrike_o9snd_629", Li = "_ctaTotalsPrice_o9snd_635", Ri = "_cta_o9snd_598", Fi = "_ctaButtonGroup_o9snd_667", Mi = "_ctaDualLeft_o9snd_673", Oi = "_ctaDualRight_o9snd_674", Ai = "_poweredBy_o9snd_701", qi = "_productGroup_o9snd_716", Vi = "_productGroupHeader_o9snd_725", Ei = "_productGroupThumbWrap_o9snd_733", Di = "_productGroupThumb_o9snd_733", $i = "_productGroupThumbFallback_o9snd_748", zi = "_productGroupInfo_o9snd_760", Wi = "_productGroupTitle_o9snd_767", ji = "_productGroupActions_o9snd_776", Gi = "_selectButton_o9snd_783", Ui = "_selectButtonOpen_o9snd_804", Hi = "_selectButtonChevron_o9snd_809", Qi = "_variantPicker_o9snd_818", Yi = "_variantPickerRow_o9snd_824", Ki = "_variantPickerRowSelected_o9snd_854", Xi = "_variantPickerLabel_o9snd_858", Zi = "_variantPickerPrice_o9snd_867", Ji = "_variantPickerCheck_o9snd_873", eo = "_selectedVariantsList_o9snd_880", to = "_selectedVariantRow_o9snd_889", no = "_selectedVariantInfo_o9snd_902", ao = "_selectedVariantName_o9snd_909", ro = "_selectedVariantPrice_o9snd_918", u = {
2046
+ panel: Nr,
2047
+ header: kr,
2048
+ title: Cr,
2049
+ status: xr,
2050
+ error: Ir,
2051
+ section: Sr,
2052
+ sectionTitle: Pr,
2053
+ rulesVisual: Br,
2054
+ rulesLabelsRow: Tr,
2055
+ rulesLinesRow: Lr,
2056
+ rulesLineLabelCell: Rr,
2057
+ rulesLineLabel: Fr,
2058
+ rulesLine: Mr,
2059
+ rulesLineEmpty: Or,
2060
+ rulesLineFilled: Ar,
2061
+ variants: qr,
2062
+ variantList: Vr,
2063
+ emptyState: Er,
2064
+ variantRow: Dr,
2065
+ variantRowInteractive: $r,
2066
+ variantRowSelected: zr,
2067
+ variantRowSoldOut: Wr,
2068
+ variantMedia: jr,
2069
+ variantContent: Gr,
2070
+ variantHeader: Ur,
2071
+ variantTitle: Hr,
2072
+ variantImage: Qr,
2073
+ variantImageFallback: Yr,
2074
+ variantMeta: Kr,
2075
+ variantPrice: Xr,
2076
+ variantFooterRow: Zr,
2077
+ variantActions: Jr,
2078
+ qtyActions: ei,
2079
+ qtyActionsWrap: ti,
2080
+ soldOut: ni,
2081
+ stockLimitNotice: ai,
2082
+ qtyChip: ri,
2083
+ qtyChipInteractive: ii,
2084
+ qtyChipValue: oi,
2085
+ qtyChipPlus: li,
2086
+ qtyChipClear: si,
2087
+ qtyTrash: ci,
2088
+ footer: ui,
2089
+ boxSummaryWindow: di,
2090
+ boxSummaryRow: mi,
2091
+ boxSlot: hi,
2092
+ boxItem: bi,
2093
+ boxItemFilled: fi,
2094
+ boxItemPlaceholder: pi,
2095
+ boxItemThreshold: _i,
2096
+ boxItemClickable: yi,
2097
+ boxItemImage: vi,
2098
+ boxItemFallback: wi,
2099
+ boxItemPlus: gi,
2100
+ boxItemDiscountText: Ni,
2101
+ boxThresholdLabel: ki,
2102
+ totalsReveal: Ci,
2103
+ totalsRevealOpen: xi,
2104
+ ctaTotalsWrap: Ii,
2105
+ ctaTotalsWrapVisible: Si,
2106
+ ctaTotals: Pi,
2107
+ ctaDiscountBadge: Bi,
2108
+ ctaTotalsStrike: Ti,
2109
+ ctaTotalsPrice: Li,
2110
+ cta: Ri,
2111
+ ctaButtonGroup: Fi,
2112
+ ctaDualLeft: Mi,
2113
+ ctaDualRight: Oi,
2114
+ poweredBy: Ai,
2115
+ productGroup: qi,
2116
+ productGroupHeader: Vi,
2117
+ productGroupThumbWrap: Ei,
2118
+ productGroupThumb: Di,
2119
+ productGroupThumbFallback: $i,
2120
+ productGroupInfo: zi,
2121
+ productGroupTitle: Wi,
2122
+ productGroupActions: ji,
2123
+ selectButton: Gi,
2124
+ selectButtonOpen: Ui,
2125
+ selectButtonChevron: Hi,
2126
+ variantPicker: Qi,
2127
+ variantPickerRow: Yi,
2128
+ variantPickerRowSelected: Ki,
2129
+ variantPickerLabel: Xi,
2130
+ variantPickerPrice: Zi,
2131
+ variantPickerCheck: Ji,
2132
+ selectedVariantsList: eo,
2133
+ selectedVariantRow: to,
2134
+ selectedVariantInfo: no,
2135
+ selectedVariantName: ao,
2136
+ selectedVariantPrice: ro
1925
2137
  };
1926
- function Qi(n) {
1927
- var Ie;
2138
+ function qo(a) {
2139
+ var Ue;
1928
2140
  const {
1929
2141
  loading: e,
1930
2142
  submitting: t,
1931
- error: i,
1932
- currencyCode: r,
1933
- config: a,
1934
- eligibleVariants: h,
1935
- selections: u,
1936
- selectionOrder: S,
1937
- getVariantMaxSelectableQuantity: ce,
2143
+ error: l,
2144
+ currencyCode: o,
2145
+ config: r,
2146
+ eligibleVariants: p,
2147
+ selections: b,
2148
+ selectionOrder: F,
2149
+ getVariantMaxSelectableQuantity: se,
1938
2150
  setQuantity: q,
1939
- bundleSize: $,
1940
- minRequired: me,
1941
- canSubmit: M,
1942
- submit: ie,
1943
- submitAndCheckout: F,
1944
- locale: K,
1945
- t: g
1946
- } = gt(), {
1947
- className: j,
1948
- showRules: N = !0,
1949
- showVariants: se = !0
1950
- } = n, L = (f) => {
1951
- const _ = Number.parseFloat(f);
1952
- return Number.isFinite(_) ? String(Math.round(_)) : f;
1953
- }, O = (f) => {
1954
- const _ = (f ?? []).filter((x) => {
1955
- var U, Q;
1956
- const R = (U = x == null ? void 0 : x.name) == null ? void 0 : U.trim(), A = (Q = x == null ? void 0 : x.value) == null ? void 0 : Q.trim();
1957
- return !(!R || !A || R.toLowerCase() === "title");
2151
+ bundleSize: Y,
2152
+ minRequired: de,
2153
+ canSubmit: W,
2154
+ submit: ye,
2155
+ submitAndCheckout: H,
2156
+ locale: ue,
2157
+ t: v
2158
+ } = yt(), {
2159
+ className: ae,
2160
+ showRules: k = !0,
2161
+ showVariants: ge = !0
2162
+ } = a, z = (m) => {
2163
+ const f = Number.parseFloat(m);
2164
+ return Number.isFinite(f) ? String(Math.round(f)) : m;
2165
+ }, E = (m) => {
2166
+ const f = (m ?? []).filter((g) => {
2167
+ var j, K;
2168
+ const B = (j = g == null ? void 0 : g.name) == null ? void 0 : j.trim(), T = (K = g == null ? void 0 : g.value) == null ? void 0 : K.trim();
2169
+ return !(!B || !T || B.toLowerCase() === "title" || T.toLowerCase() === "default title");
1958
2170
  });
1959
- return _.length ? _.map((x) => `${x.name}: ${x.value}`).join(" • ") : null;
1960
- }, X = (f) => {
1961
- const _ = Number(f);
1962
- return Number.isFinite(_) ? ft(_, r, K) : f;
1963
- }, Z = P(() => [...h].sort((f, _) => f.displayName.localeCompare(_.displayName)), [h]), V = P(() => [...(a == null ? void 0 : a.rules) ?? []].sort((f, _) => f.minBundleSize - _.minBundleSize), [a == null ? void 0 : a.rules]), ne = P(() => Math.max(0, me - $), [$, me]), ue = P(() => {
1964
- let f = null;
1965
- for (const _ of V)
1966
- $ >= _.minBundleSize && (f = _);
1967
- return f;
1968
- }, [$, V]), xe = P(() => {
1969
- if (!ue) return null;
1970
- const f = Number.parseFloat(ue.discountPercent);
1971
- return !Number.isFinite(f) || f <= 0 ? null : f;
1972
- }, [ue]), de = V[0], Be = !!(de && $ >= de.minBundleSize), ge = P(() => {
1973
- const f = new Map(h.map((x) => [x.id, x]));
1974
- let _ = 0;
1975
- for (const [x, R] of Object.entries(u)) {
1976
- const A = R ?? 0;
1977
- if (A <= 0) continue;
1978
- const U = f.get(x), Q = Number(U == null ? void 0 : U.price);
1979
- Number.isFinite(Q) && (_ += Q * A);
2171
+ return f.length ? f.map((g) => `${g.name}: ${g.value}`).join(" • ") : null;
2172
+ }, me = (m) => (m == null ? void 0 : m.trim().toLowerCase()) === "default title", ce = (m) => {
2173
+ var T, j, K, N;
2174
+ const f = (T = m.displayName) == null ? void 0 : T.trim();
2175
+ if (f && !me(f)) return f;
2176
+ const g = (K = (j = m.product) == null ? void 0 : j.title) == null ? void 0 : K.trim();
2177
+ if (g) return g;
2178
+ const B = (N = m.title) == null ? void 0 : N.trim();
2179
+ return B && !me(B) ? B : f || B || g || "";
2180
+ }, xe = (m) => {
2181
+ const f = ce(m), g = E(m.selectedOptions);
2182
+ return [f, g].filter(Boolean).join(" — ");
2183
+ }, Se = (m) => {
2184
+ var B;
2185
+ const f = E(m.selectedOptions);
2186
+ if (f) return f;
2187
+ const g = (B = m.title) == null ? void 0 : B.trim();
2188
+ return g && !me(g) ? g : ce(m);
2189
+ }, be = (m) => {
2190
+ const f = Number(m);
2191
+ return Number.isFinite(f) ? ft(f, o, ue) : m;
2192
+ }, Ve = $(() => [...p], [p]), Ne = $(() => {
2193
+ var f, g;
2194
+ if (!(r != null && r.groupVariantsByProduct)) return null;
2195
+ const m = /* @__PURE__ */ new Map();
2196
+ for (const B of Ve) {
2197
+ const T = ((f = B.product) == null ? void 0 : f.id) ?? "unknown";
2198
+ m.has(T) || m.set(T, { productId: T, productTitle: ((g = B.product) == null ? void 0 : g.title) ?? "", variants: [] }), m.get(T).variants.push(B);
2199
+ }
2200
+ return Array.from(m.values());
2201
+ }, [r == null ? void 0 : r.groupVariantsByProduct, Ve]), [Fe, Me] = ne(null), Oe = ie(null);
2202
+ U(() => {
2203
+ if (!Fe) return;
2204
+ const m = (f) => {
2205
+ Oe.current && !Oe.current.contains(f.target) && Me(null);
2206
+ };
2207
+ return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
2208
+ }, [Fe]);
2209
+ const he = $(() => [...(r == null ? void 0 : r.rules) ?? []].sort((m, f) => m.minBundleSize - f.minBundleSize), [r == null ? void 0 : r.rules]), ke = $(() => Math.max(0, de - Y), [Y, de]), Pe = $(() => {
2210
+ let m = null;
2211
+ for (const f of he)
2212
+ Y >= f.minBundleSize && (m = f);
2213
+ return m;
2214
+ }, [Y, he]), Ie = $(() => {
2215
+ if (!Pe) return null;
2216
+ const m = Number.parseFloat(Pe.discountPercent);
2217
+ return !Number.isFinite(m) || m <= 0 ? null : m;
2218
+ }, [Pe]), tt = he[0], Ee = !!(tt && Y >= tt.minBundleSize), Le = $(() => {
2219
+ const m = new Map(p.map((g) => [g.id, g]));
2220
+ let f = 0;
2221
+ for (const [g, B] of Object.entries(b)) {
2222
+ const T = B ?? 0;
2223
+ if (T <= 0) continue;
2224
+ const j = m.get(g), K = Number(j == null ? void 0 : j.price);
2225
+ Number.isFinite(K) && (f += K * T);
1980
2226
  }
1981
- return Math.round(_ * 100) / 100;
1982
- }, [h, u]), Ee = P(() => {
1983
- if (!xe) return ge;
1984
- const f = ge * (1 - xe / 100);
1985
2227
  return Math.round(f * 100) / 100;
1986
- }, [xe, ge]), Ne = P(() => V.length ? Math.max(...V.map((f) => f.minBundleSize)) : 0, [V]), Pe = P(() => {
1987
- const f = new Map(h.map((_) => [_.id, _]));
1988
- return S.map((_) => f.get(_)).filter((_) => !!_);
1989
- }, [h, S]), ke = P(() => {
1990
- var _;
1991
- const f = /* @__PURE__ */ new Map();
1992
- for (const x of V) {
1993
- const R = Math.max(0, x.minBundleSize - 1);
1994
- f.set(R, {
1995
- discountPercent: x.discountPercent,
1996
- minBundleSize: x.minBundleSize,
1997
- label: ((_ = x.label) == null ? void 0 : _.trim()) || `Buy ${x.minBundleSize}+`
2228
+ }, [p, b]), je = $(() => {
2229
+ if (!Ie) return Le;
2230
+ const m = Le * (1 - Ie / 100);
2231
+ return Math.round(m * 100) / 100;
2232
+ }, [Ie, Le]), Ge = $(() => he.length ? Math.max(...he.map((m) => m.minBundleSize)) : 0, [he]), Re = $(() => {
2233
+ const m = new Map(p.map((f) => [f.id, f]));
2234
+ return F.map((f) => m.get(f)).filter((f) => !!f);
2235
+ }, [p, F]), nt = $(() => {
2236
+ var f;
2237
+ const m = /* @__PURE__ */ new Map();
2238
+ for (const g of he) {
2239
+ const B = Math.max(0, g.minBundleSize - 1);
2240
+ m.set(B, {
2241
+ discountPercent: g.discountPercent,
2242
+ minBundleSize: g.minBundleSize,
2243
+ label: ((f = g.label) == null ? void 0 : f.trim()) || `Buy ${g.minBundleSize}+`
1998
2244
  });
1999
2245
  }
2000
- return f;
2001
- }, [V]), De = P(() => {
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]), at = ((Ie = a == null ? void 0 : a.title) == null ? void 0 : Ie.trim()) || g("bundle.title.default"), We = P(() => Math.max(Ne || me, Pe.length), [Pe.length, Ne, me]), je = $ >= De, Me = Y(null), Ke = Y(null), Te = Y($);
2005
- D(() => {
2006
- const f = Te.current;
2007
- if (Te.current = $, $ <= f) return;
2008
- const _ = Ke.current;
2009
- if (!_) return;
2010
- const x = V.some((Q) => Q.minBundleSize === $), R = V.find((Q) => Q.minBundleSize > $), A = R && x ? R.minBundleSize - 1 : R ? null : $ - 1;
2011
- if (A == null || A < 0) return;
2012
- const U = requestAnimationFrame(() => {
2013
- const Q = _.querySelector(`[data-box-slot="${A}"]`);
2014
- if (!Q) return;
2015
- const ae = _.getBoundingClientRect(), J = Q.getBoundingClientRect().right - ae.right;
2016
- if (J <= 1) return;
2017
- const z = Math.max(0, _.scrollWidth - _.clientWidth), H = Math.min(z, Math.max(0, _.scrollLeft + J));
2018
- _.scrollTo({ left: H, behavior: "smooth" });
2246
+ return m;
2247
+ }, [he]), Ae = $(() => {
2248
+ const m = Number((r == null ? void 0 : r.maxBundleSize) ?? NaN), f = Number.isFinite(m) ? Math.floor(m) : 100;
2249
+ return Math.max(2, Math.min(100, f));
2250
+ }, [r == null ? void 0 : r.maxBundleSize]), it = ((Ue = r == null ? void 0 : r.title) == null ? void 0 : Ue.trim()) || v("bundle.title.default"), Ke = $(() => Math.max(Ge || de, Re.length), [Re.length, Ge, de]), ve = Y >= Ae, De = ie(null), $e = ie(null), qe = ie(Y);
2251
+ U(() => {
2252
+ const m = qe.current;
2253
+ if (qe.current = Y, Y <= m) return;
2254
+ const f = $e.current;
2255
+ if (!f) return;
2256
+ const g = he.some((K) => K.minBundleSize === Y), B = he.find((K) => K.minBundleSize > Y), T = B && g ? B.minBundleSize - 1 : B ? null : Y - 1;
2257
+ if (T == null || T < 0) return;
2258
+ const j = requestAnimationFrame(() => {
2259
+ const K = f.querySelector(`[data-box-slot="${T}"]`);
2260
+ if (!K) return;
2261
+ const N = f.getBoundingClientRect(), V = K.getBoundingClientRect().right - N.right;
2262
+ if (V <= 1) return;
2263
+ const oe = Math.max(0, f.scrollWidth - f.clientWidth), re = Math.min(oe, Math.max(0, f.scrollLeft + V));
2264
+ f.scrollTo({ left: re, behavior: "smooth" });
2019
2265
  });
2020
- return () => cancelAnimationFrame(U);
2021
- }, [$, V]);
2022
- const qe = (f) => {
2023
- const _ = Me.current;
2024
- if (!_) return;
2025
- const x = _.querySelector(`[data-variant-row="${f}"]`);
2026
- x && x.scrollIntoView({ behavior: "smooth", block: "nearest" });
2266
+ return () => cancelAnimationFrame(j);
2267
+ }, [Y, he]);
2268
+ const ze = (m) => {
2269
+ const f = De.current;
2270
+ if (!f) return;
2271
+ const g = f.querySelector(`[data-variant-row="${m}"]`);
2272
+ g && g.scrollIntoView({ behavior: "smooth", block: "nearest" });
2027
2273
  };
2028
- return /* @__PURE__ */ T("section", { className: [p.panel, j].filter(Boolean).join(" "), "aria-busy": e, children: [
2029
- /* @__PURE__ */ s("header", { className: p.header, children: /* @__PURE__ */ s("h2", { className: p.title, children: at }) }),
2030
- e ? /* @__PURE__ */ s("div", { className: p.status, children: g("bundle.loading") }) : null,
2031
- i ? /* @__PURE__ */ s("div", { className: p.error, children: i }) : null,
2032
- N && V.length ? /* @__PURE__ */ s("div", { className: p.section, children: /* @__PURE__ */ T("div", { className: p.rulesVisual, children: [
2033
- /* @__PURE__ */ s("div", { className: p.rulesLabelsRow, children: Array.from({ length: Ne }).map((f, _) => {
2034
- const x = _ + 1, R = V.find((U) => U.minBundleSize === x), A = R ? g("bundle.discount.off_label", { discount: L(R.discountPercent) }) : null;
2035
- return /* @__PURE__ */ s("div", { className: p.rulesLineLabelCell, children: A ? /* @__PURE__ */ s("span", { className: p.rulesLineLabel, children: A }) : null }, x);
2274
+ return /* @__PURE__ */ I("section", { className: [u.panel, ae].filter(Boolean).join(" "), "aria-busy": e, children: [
2275
+ /* @__PURE__ */ n("header", { className: u.header, children: /* @__PURE__ */ n("h2", { className: u.title, children: it }) }),
2276
+ e ? /* @__PURE__ */ n("div", { className: u.status, children: v("bundle.loading") }) : null,
2277
+ l ? /* @__PURE__ */ n("div", { className: u.error, children: l }) : null,
2278
+ k && he.length ? /* @__PURE__ */ n("div", { className: u.section, children: /* @__PURE__ */ I("div", { className: u.rulesVisual, children: [
2279
+ /* @__PURE__ */ n("div", { className: u.rulesLabelsRow, children: Array.from({ length: Ge }).map((m, f) => {
2280
+ const g = f + 1, B = he.find((j) => j.minBundleSize === g), T = B ? v("bundle.discount.off_label", { discount: z(B.discountPercent) }) : null;
2281
+ return /* @__PURE__ */ n("div", { className: u.rulesLineLabelCell, children: T ? /* @__PURE__ */ n("span", { className: u.rulesLineLabel, children: T }) : null }, g);
2036
2282
  }) }),
2037
- /* @__PURE__ */ s("div", { className: p.rulesLinesRow, children: Array.from({ length: Ne }).map((f, _) => {
2038
- const x = _ + 1, R = $ >= x;
2039
- return /* @__PURE__ */ s(
2283
+ /* @__PURE__ */ n("div", { className: u.rulesLinesRow, children: Array.from({ length: Ge }).map((m, f) => {
2284
+ const g = f + 1, B = Y >= g;
2285
+ return /* @__PURE__ */ n(
2040
2286
  "div",
2041
2287
  {
2042
2288
  className: [
2043
- p.rulesLine,
2044
- R ? p.rulesLineFilled : p.rulesLineEmpty
2289
+ u.rulesLine,
2290
+ B ? u.rulesLineFilled : u.rulesLineEmpty
2045
2291
  ].filter(Boolean).join(" ")
2046
2292
  },
2047
- x
2293
+ g
2048
2294
  );
2049
2295
  }) })
2050
2296
  ] }) }) : null,
2051
- se ? /* @__PURE__ */ T("div", { className: p.section, ref: Me, children: [
2052
- /* @__PURE__ */ s("div", { className: p.sectionTitle, children: g("bundle.select.items") }),
2053
- /* @__PURE__ */ s("div", { className: p.variants, children: !e && !i && Z.length === 0 ? /* @__PURE__ */ s("div", { className: p.emptyState, children: g("bundle.empty") }) : /* @__PURE__ */ s("ul", { className: p.variantList, children: Z.map((f) => {
2054
- var z;
2055
- const _ = u[f.id] ?? 0, x = O(f.selectedOptions), R = f.availableForSale === !1, A = ce(f.id), U = A ?? Number.POSITIVE_INFINITY, Q = _ >= U, ae = !R && !je && !Q, le = ae, J = !R && Q ? g("bundle.stock.max_reached") : null;
2056
- return /* @__PURE__ */ T(
2297
+ ge ? /* @__PURE__ */ I("div", { className: u.section, ref: De, children: [
2298
+ /* @__PURE__ */ n("div", { className: u.sectionTitle, children: v("bundle.select.items") }),
2299
+ /* @__PURE__ */ n("div", { className: u.variants, children: !e && !l && Ve.length === 0 ? /* @__PURE__ */ n("div", { className: u.emptyState, children: v("bundle.empty") }) : Ne ? /* @__PURE__ */ n("ul", { className: u.variantList, children: Ne.map((m) => {
2300
+ var j, K;
2301
+ const f = ((j = m.variants.find((N) => {
2302
+ var A;
2303
+ return (A = N.image) == null ? void 0 : A.url;
2304
+ })) == null ? void 0 : j.image) ?? null, g = m.variants.length > 1, B = Fe === m.productId, T = m.variants.filter((N) => (b[N.id] ?? 0) > 0);
2305
+ if (!g) {
2306
+ const N = m.variants[0];
2307
+ if (!N) return null;
2308
+ const A = b[N.id] ?? 0, V = (K = N.title) == null ? void 0 : K.trim(), oe = E(N.selectedOptions) ?? (V && V.toLowerCase() !== "default title" ? V : null), re = N.availableForSale === !1, G = se(N.id), x = G ?? Number.POSITIVE_INFINITY, D = A >= x, ee = !t && !re && !ve && !D, Ce = !re && D ? v("bundle.stock.max_reached") : null;
2309
+ return /* @__PURE__ */ n("li", { className: u.productGroup, children: /* @__PURE__ */ I("div", { className: u.productGroupHeader, children: [
2310
+ /* @__PURE__ */ n("div", { className: u.productGroupThumbWrap, children: f != null && f.url ? /* @__PURE__ */ n("img", { src: f.url, alt: f.altText ?? m.productTitle, width: f.width ?? 56, height: f.height ?? 56, className: u.productGroupThumb, loading: "lazy" }) : /* @__PURE__ */ n("div", { className: u.productGroupThumbFallback, children: m.productTitle.slice(0, 1).toUpperCase() || "•" }) }),
2311
+ /* @__PURE__ */ I("div", { className: u.productGroupInfo, children: [
2312
+ /* @__PURE__ */ n("div", { className: u.productGroupTitle, children: m.productTitle }),
2313
+ oe ? /* @__PURE__ */ n("div", { className: u.variantMeta, children: oe }) : null,
2314
+ /* @__PURE__ */ n("div", { className: u.variantPrice, children: be(N.price) })
2315
+ ] }),
2316
+ /* @__PURE__ */ n("div", { className: u.productGroupActions, children: re ? /* @__PURE__ */ n("div", { className: u.soldOut, children: v("bundle.stock.sold_out") }) : A <= 0 && x <= 0 ? /* @__PURE__ */ n("div", { className: u.stockLimitNotice, children: v("bundle.stock.max_added") }) : /* @__PURE__ */ I("div", { className: u.qtyActionsWrap, children: [
2317
+ Ce ? /* @__PURE__ */ n("div", { className: u.stockLimitNotice, children: Ce }) : null,
2318
+ /* @__PURE__ */ I("div", { className: u.qtyActions, children: [
2319
+ A > 0 ? /* @__PURE__ */ n("button", { type: "button", className: u.qtyTrash, "aria-label": v("bundle.a11y.remove_from_bundle", { name: N.displayName }), disabled: t, onClick: () => q(N.id, 0), children: /* @__PURE__ */ n(Mt, { size: 14 }) }) : null,
2320
+ /* @__PURE__ */ n(
2321
+ "div",
2322
+ {
2323
+ className: [u.qtyChip, ee ? u.qtyChipInteractive : null].filter(Boolean).join(" "),
2324
+ role: ee ? "button" : void 0,
2325
+ tabIndex: ee ? 0 : void 0,
2326
+ "aria-label": v("bundle.a11y.quantity", { name: N.displayName, qty: A }),
2327
+ onClick: ee ? () => q(N.id, A + 1) : void 0,
2328
+ onKeyDown: ee ? (X) => {
2329
+ (X.key === "Enter" || X.key === " ") && (X.preventDefault(), q(N.id, A + 1));
2330
+ } : void 0,
2331
+ children: A <= 0 ? /* @__PURE__ */ n("span", { className: u.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ n(bt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ I(ct, { children: [
2332
+ /* @__PURE__ */ n("span", { className: u.qtyChipValue, children: A }),
2333
+ /* @__PURE__ */ n("button", { type: "button", className: u.qtyChipClear, "aria-label": v("bundle.a11y.increase", { name: N.displayName }), disabled: !ee, onClick: (X) => {
2334
+ X.stopPropagation(), q(N.id, A + 1);
2335
+ }, onKeyDown: (X) => X.stopPropagation(), children: /* @__PURE__ */ n(bt, { size: 12, strokeWidth: 2 }) })
2336
+ ] })
2337
+ }
2338
+ )
2339
+ ] })
2340
+ ] }) })
2341
+ ] }) }, m.productId);
2342
+ }
2343
+ return /* @__PURE__ */ I("li", { ref: B ? Oe : null, className: [u.productGroup, B ? u.productGroupPickerOpen : null].filter(Boolean).join(" "), children: [
2344
+ /* @__PURE__ */ I("div", { className: u.productGroupHeader, children: [
2345
+ /* @__PURE__ */ n("div", { className: u.productGroupThumbWrap, children: f != null && f.url ? /* @__PURE__ */ n("img", { src: f.url, alt: f.altText ?? m.productTitle, width: f.width ?? 56, height: f.height ?? 56, className: u.productGroupThumb, loading: "lazy" }) : /* @__PURE__ */ n("div", { className: u.productGroupThumbFallback, children: m.productTitle.slice(0, 1).toUpperCase() || "•" }) }),
2346
+ /* @__PURE__ */ n("div", { className: u.productGroupInfo, children: /* @__PURE__ */ n("div", { className: u.productGroupTitle, children: m.productTitle }) }),
2347
+ /* @__PURE__ */ n("div", { className: u.productGroupActions, children: /* @__PURE__ */ I(
2348
+ "button",
2349
+ {
2350
+ type: "button",
2351
+ className: [u.selectButton, B ? u.selectButtonOpen : null].filter(Boolean).join(" "),
2352
+ "aria-expanded": B,
2353
+ disabled: t,
2354
+ onMouseDown: (N) => N.stopPropagation(),
2355
+ onClick: () => Me((N) => N === m.productId ? null : m.productId),
2356
+ children: [
2357
+ v("bundle.select.variant"),
2358
+ /* @__PURE__ */ n(Zt, { size: 13, strokeWidth: 2.5, className: u.selectButtonChevron })
2359
+ ]
2360
+ }
2361
+ ) })
2362
+ ] }),
2363
+ B && /* @__PURE__ */ n("div", { className: u.variantPicker, children: m.variants.map((N) => {
2364
+ const A = se(N.id), V = (b[N.id] ?? 0) > 0, oe = N.availableForSale === !1, re = A != null && A <= 0, G = !V && ve, x = t || oe || re || G, D = oe ? v("bundle.stock.sold_out") : re ? v("bundle.stock.max_added") : G ? v("bundle.stock.max_reached") : null, ee = Se(N);
2365
+ return /* @__PURE__ */ I(
2366
+ "button",
2367
+ {
2368
+ type: "button",
2369
+ disabled: x,
2370
+ className: [u.variantPickerRow, V ? u.variantPickerRowSelected : null].filter(Boolean).join(" "),
2371
+ onClick: () => {
2372
+ V || q(N.id, 1), Me(null);
2373
+ },
2374
+ children: [
2375
+ /* @__PURE__ */ n("span", { className: u.variantPickerLabel, children: ee }),
2376
+ /* @__PURE__ */ n("span", { className: u.variantPickerPrice, children: D ?? be(N.price) }),
2377
+ V ? /* @__PURE__ */ n("span", { className: u.variantPickerCheck, "aria-hidden": "true", children: "✓" }) : null
2378
+ ]
2379
+ },
2380
+ N.id
2381
+ );
2382
+ }) }),
2383
+ T.length > 0 && /* @__PURE__ */ n("ul", { className: u.selectedVariantsList, children: T.map((N) => {
2384
+ const A = b[N.id] ?? 0, V = se(N.id), oe = V ?? Number.POSITIVE_INFINITY, re = A >= oe, G = !t && N.availableForSale !== !1 && !ve && !re, x = Se(N);
2385
+ return /* @__PURE__ */ I("li", { className: u.selectedVariantRow, "data-variant-row": N.id, children: [
2386
+ /* @__PURE__ */ I("div", { className: u.selectedVariantInfo, children: [
2387
+ /* @__PURE__ */ n("span", { className: u.selectedVariantName, children: x }),
2388
+ /* @__PURE__ */ n("span", { className: u.selectedVariantPrice, children: be(N.price) })
2389
+ ] }),
2390
+ /* @__PURE__ */ I("div", { className: u.qtyActions, children: [
2391
+ /* @__PURE__ */ n("button", { type: "button", className: u.qtyTrash, "aria-label": v("bundle.a11y.remove_from_bundle", { name: N.displayName }), disabled: t, onClick: () => q(N.id, 0), children: /* @__PURE__ */ n(Mt, { size: 14 }) }),
2392
+ /* @__PURE__ */ I(
2393
+ "div",
2394
+ {
2395
+ className: [u.qtyChip, G ? u.qtyChipInteractive : null].filter(Boolean).join(" "),
2396
+ role: G ? "button" : void 0,
2397
+ tabIndex: G ? 0 : void 0,
2398
+ "aria-label": v("bundle.a11y.quantity", { name: N.displayName, qty: A }),
2399
+ onClick: G ? () => q(N.id, A + 1) : void 0,
2400
+ onKeyDown: G ? (D) => {
2401
+ (D.key === "Enter" || D.key === " ") && (D.preventDefault(), q(N.id, A + 1));
2402
+ } : void 0,
2403
+ children: [
2404
+ /* @__PURE__ */ n("span", { className: u.qtyChipValue, children: A }),
2405
+ /* @__PURE__ */ n("button", { type: "button", className: u.qtyChipClear, "aria-label": v("bundle.a11y.increase", { name: N.displayName }), disabled: !G, onClick: (D) => {
2406
+ D.stopPropagation(), q(N.id, A + 1);
2407
+ }, onKeyDown: (D) => D.stopPropagation(), children: /* @__PURE__ */ n(bt, { size: 12, strokeWidth: 2 }) })
2408
+ ]
2409
+ }
2410
+ )
2411
+ ] })
2412
+ ] }, N.id);
2413
+ }) })
2414
+ ] }, m.productId);
2415
+ }) }) : /* @__PURE__ */ n("ul", { className: u.variantList, children: Ve.map((m) => {
2416
+ var G;
2417
+ const f = b[m.id] ?? 0, g = ce(m), B = xe(m), T = E(m.selectedOptions), j = m.availableForSale === !1, K = se(m.id), N = K ?? Number.POSITIVE_INFINITY, A = f >= N, V = !j && !ve && !A, oe = V, re = !j && A ? v("bundle.stock.max_reached") : null;
2418
+ return /* @__PURE__ */ I(
2057
2419
  "li",
2058
2420
  {
2059
2421
  className: [
2060
- p.variantRow,
2061
- le ? p.variantRowInteractive : null,
2062
- _ > 0 ? p.variantRowSelected : null,
2063
- R ? p.variantRowSoldOut : null
2422
+ u.variantRow,
2423
+ oe ? u.variantRowInteractive : null,
2424
+ f > 0 ? u.variantRowSelected : null,
2425
+ j ? u.variantRowSoldOut : null
2064
2426
  ].filter(Boolean).join(" "),
2065
- "data-variant-row": f.id,
2066
- role: le ? "button" : void 0,
2067
- tabIndex: le ? 0 : void 0,
2068
- onClick: le ? () => {
2069
- q(f.id, _ + 1);
2427
+ "data-variant-row": m.id,
2428
+ role: oe ? "button" : void 0,
2429
+ tabIndex: oe ? 0 : void 0,
2430
+ onClick: oe ? () => {
2431
+ q(m.id, f + 1);
2070
2432
  } : void 0,
2071
- onKeyDown: le ? (H) => {
2072
- (H.key === "Enter" || H.key === " ") && (H.preventDefault(), q(f.id, _ + 1), qe(f.id));
2433
+ onKeyDown: oe ? (x) => {
2434
+ (x.key === "Enter" || x.key === " ") && (x.preventDefault(), q(m.id, f + 1), ze(m.id));
2073
2435
  } : void 0,
2074
- "aria-label": R ? g("bundle.a11y.sold_out", { name: f.displayName }) : J ? `${f.displayName} ${J.toLowerCase()}` : g("bundle.a11y.add_to_bundle", { name: f.displayName }),
2436
+ "aria-label": j ? v("bundle.a11y.sold_out", { name: B }) : re ? `${B} ${re.toLowerCase()}` : v("bundle.a11y.add_to_bundle", { name: B }),
2075
2437
  children: [
2076
- /* @__PURE__ */ s("div", { className: p.variantMedia, children: (z = f.image) != null && z.url ? /* @__PURE__ */ s(
2438
+ /* @__PURE__ */ n("div", { className: u.variantMedia, children: (G = m.image) != null && G.url ? /* @__PURE__ */ n(
2077
2439
  "img",
2078
2440
  {
2079
- src: f.image.url,
2080
- alt: f.image.altText ?? f.displayName,
2081
- width: f.image.width ?? 64,
2082
- height: f.image.height ?? 64,
2083
- className: p.variantImage,
2441
+ src: m.image.url,
2442
+ alt: m.image.altText ?? B,
2443
+ width: m.image.width ?? 64,
2444
+ height: m.image.height ?? 64,
2445
+ className: u.variantImage,
2084
2446
  loading: "lazy"
2085
2447
  }
2086
- ) : /* @__PURE__ */ s("div", { className: p.variantImageFallback, children: g("bundle.item.generic") }) }),
2087
- /* @__PURE__ */ T("div", { className: p.variantContent, children: [
2088
- /* @__PURE__ */ T("div", { className: p.variantHeader, children: [
2089
- /* @__PURE__ */ s("div", { className: p.variantTitle, children: f.displayName }),
2090
- x ? /* @__PURE__ */ s("div", { className: p.variantMeta, children: x }) : null
2448
+ ) : /* @__PURE__ */ n("div", { className: u.variantImageFallback, children: v("bundle.item.generic") }) }),
2449
+ /* @__PURE__ */ I("div", { className: u.variantContent, children: [
2450
+ /* @__PURE__ */ I("div", { className: u.variantHeader, children: [
2451
+ /* @__PURE__ */ n("div", { className: u.variantTitle, children: g }),
2452
+ T ? /* @__PURE__ */ n("div", { className: u.variantMeta, children: T }) : null
2091
2453
  ] }),
2092
- /* @__PURE__ */ T("div", { className: p.variantFooterRow, children: [
2093
- /* @__PURE__ */ s("div", { className: p.variantPrice, children: X(f.price) }),
2094
- /* @__PURE__ */ s("div", { className: p.variantActions, children: R ? /* @__PURE__ */ s("div", { className: p.soldOut, "aria-label": g("bundle.a11y.sold_out", { name: f.displayName }), children: g("bundle.stock.sold_out") }) : _ <= 0 && U <= 0 ? /* @__PURE__ */ s("div", { className: p.stockLimitNotice, "aria-label": g("bundle.a11y.max_available_selected", { name: f.displayName }), children: g("bundle.stock.max_added") }) : /* @__PURE__ */ T("div", { className: p.qtyActionsWrap, children: [
2095
- /* @__PURE__ */ T("div", { className: p.qtyActions, children: [
2096
- _ > 0 ? /* @__PURE__ */ s(
2454
+ /* @__PURE__ */ I("div", { className: u.variantFooterRow, children: [
2455
+ /* @__PURE__ */ n("div", { className: u.variantPrice, children: be(m.price) }),
2456
+ /* @__PURE__ */ n("div", { className: u.variantActions, children: j ? /* @__PURE__ */ n("div", { className: u.soldOut, "aria-label": v("bundle.a11y.sold_out", { name: B }), children: v("bundle.stock.sold_out") }) : f <= 0 && N <= 0 ? /* @__PURE__ */ n("div", { className: u.stockLimitNotice, "aria-label": v("bundle.a11y.max_available_selected", { name: B }), children: v("bundle.stock.max_added") }) : /* @__PURE__ */ I("div", { className: u.qtyActionsWrap, children: [
2457
+ /* @__PURE__ */ I("div", { className: u.qtyActions, children: [
2458
+ f > 0 ? /* @__PURE__ */ n(
2097
2459
  "button",
2098
2460
  {
2099
2461
  type: "button",
2100
- className: p.qtyTrash,
2101
- "aria-label": g("bundle.a11y.remove_from_bundle", { name: f.displayName }),
2102
- onClick: (H) => {
2103
- H.stopPropagation(), q(f.id, 0);
2462
+ className: u.qtyTrash,
2463
+ "aria-label": v("bundle.a11y.remove_from_bundle", { name: B }),
2464
+ onClick: (x) => {
2465
+ x.stopPropagation(), q(m.id, 0);
2104
2466
  },
2105
- onKeyDown: (H) => {
2106
- H.stopPropagation();
2467
+ onKeyDown: (x) => {
2468
+ x.stopPropagation();
2107
2469
  },
2108
- children: /* @__PURE__ */ s(Fn, { size: 14 })
2470
+ children: /* @__PURE__ */ n(Mt, { size: 14 })
2109
2471
  }
2110
2472
  ) : null,
2111
- /* @__PURE__ */ s(
2473
+ /* @__PURE__ */ n(
2112
2474
  "div",
2113
2475
  {
2114
- className: [p.qtyChip, ae ? p.qtyChipInteractive : null].filter(Boolean).join(" "),
2115
- "aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty: _ }),
2116
- onClick: ae ? (H) => {
2117
- H.stopPropagation(), q(f.id, _ + 1);
2476
+ className: [u.qtyChip, V ? u.qtyChipInteractive : null].filter(Boolean).join(" "),
2477
+ "aria-label": v("bundle.a11y.quantity", { name: B, qty: f }),
2478
+ onClick: V ? (x) => {
2479
+ x.stopPropagation(), q(m.id, f + 1);
2118
2480
  } : void 0,
2119
- onKeyDown: (H) => {
2120
- H.stopPropagation();
2481
+ onKeyDown: (x) => {
2482
+ x.stopPropagation();
2121
2483
  },
2122
- role: ae ? "button" : void 0,
2123
- tabIndex: ae ? 0 : void 0,
2124
- children: _ <= 0 ? /* @__PURE__ */ s("span", { className: p.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ s(Wt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ T(Nt, { children: [
2125
- /* @__PURE__ */ s("span", { className: p.qtyChipValue, children: _ }),
2126
- /* @__PURE__ */ s(
2484
+ role: V ? "button" : void 0,
2485
+ tabIndex: V ? 0 : void 0,
2486
+ children: f <= 0 ? /* @__PURE__ */ n("span", { className: u.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ n(bt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ I(ct, { children: [
2487
+ /* @__PURE__ */ n("span", { className: u.qtyChipValue, children: f }),
2488
+ /* @__PURE__ */ n(
2127
2489
  "button",
2128
2490
  {
2129
2491
  type: "button",
2130
- className: p.qtyChipClear,
2131
- "aria-label": g("bundle.a11y.increase", { name: f.displayName }),
2132
- onClick: (H) => {
2133
- H.stopPropagation(), q(f.id, _ + 1);
2492
+ className: u.qtyChipClear,
2493
+ "aria-label": v("bundle.a11y.increase", { name: B }),
2494
+ onClick: (x) => {
2495
+ x.stopPropagation(), q(m.id, f + 1);
2134
2496
  },
2135
- onKeyDown: (H) => {
2136
- H.stopPropagation();
2497
+ onKeyDown: (x) => {
2498
+ x.stopPropagation();
2137
2499
  },
2138
- disabled: !ae,
2139
- children: /* @__PURE__ */ s(Wt, { size: 12, strokeWidth: 2 })
2500
+ disabled: !V,
2501
+ children: /* @__PURE__ */ n(bt, { size: 12, strokeWidth: 2 })
2140
2502
  }
2141
2503
  )
2142
2504
  ] })
2143
2505
  }
2144
2506
  )
2145
2507
  ] }),
2146
- J ? /* @__PURE__ */ s("div", { className: p.stockLimitNotice, children: J }) : null
2508
+ re ? /* @__PURE__ */ n("div", { className: u.stockLimitNotice, children: re }) : null
2147
2509
  ] }) })
2148
2510
  ] })
2149
2511
  ] })
2150
2512
  ]
2151
2513
  },
2152
- f.id
2514
+ m.id
2153
2515
  );
2154
2516
  }) }) })
2155
2517
  ] }) : null,
2156
- /* @__PURE__ */ T("footer", { className: p.footer, children: [
2157
- /* @__PURE__ */ s("div", { className: p.boxSummaryWindow, ref: Ke, children: /* @__PURE__ */ s("div", { className: p.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: We }).map((f, _) => {
2158
- var J, z, H, Le;
2159
- const x = Pe[_], R = ke.get(_), A = !!x, U = !!R, Q = U && !A, ae = R ? g("bundle.discount.off_label", { discount: L(R.discountPercent) }) : null, le = A ? x.displayName : g("bundle.slot", { slot: _ + 1 });
2160
- return /* @__PURE__ */ T("div", { "data-box-slot": _, className: p.boxSlot, children: [
2161
- /* @__PURE__ */ s(
2518
+ /* @__PURE__ */ I("footer", { className: u.footer, children: [
2519
+ /* @__PURE__ */ n("div", { className: u.boxSummaryWindow, ref: $e, children: /* @__PURE__ */ n("div", { className: u.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Ke }).map((m, f) => {
2520
+ var V, oe, re, G;
2521
+ const g = Re[f], B = nt.get(f), T = !!g, j = !!B, K = j && !T, N = B ? v("bundle.discount.off_label", { discount: z(B.discountPercent) }) : null, A = T ? g.displayName : v("bundle.slot", { slot: f + 1 });
2522
+ return /* @__PURE__ */ I("div", { "data-box-slot": f, className: u.boxSlot, children: [
2523
+ /* @__PURE__ */ n(
2162
2524
  "div",
2163
2525
  {
2164
2526
  className: [
2165
- p.boxItem,
2166
- A ? p.boxItemFilled : p.boxItemPlaceholder,
2167
- U ? p.boxItemThreshold : null,
2168
- A ? p.boxItemClickable : null
2527
+ u.boxItem,
2528
+ T ? u.boxItemFilled : u.boxItemPlaceholder,
2529
+ j ? u.boxItemThreshold : null,
2530
+ T ? u.boxItemClickable : null
2169
2531
  ].filter(Boolean).join(" "),
2170
- role: A ? "button" : void 0,
2171
- tabIndex: A ? 0 : void 0,
2172
- onClick: A ? () => qe(x.id) : void 0,
2173
- onKeyDown: A ? (Fe) => {
2174
- (Fe.key === "Enter" || Fe.key === " ") && (Fe.preventDefault(), qe(x.id));
2532
+ role: T ? "button" : void 0,
2533
+ tabIndex: T ? 0 : void 0,
2534
+ onClick: T ? () => ze(g.id) : void 0,
2535
+ onKeyDown: T ? (x) => {
2536
+ (x.key === "Enter" || x.key === " ") && (x.preventDefault(), ze(g.id));
2175
2537
  } : void 0,
2176
- "aria-label": Q && ae ? `${le}. ${g("bundle.unlocks", { discount: ae })}.` : le,
2177
- title: Q && ae ? `${le} • ${g("bundle.unlocks", { discount: ae })}` : le,
2178
- children: A ? (J = x.image) != null && J.url ? /* @__PURE__ */ s(
2538
+ "aria-label": K && N ? `${A}. ${v("bundle.unlocks", { discount: N })}.` : A,
2539
+ title: K && N ? `${A} • ${v("bundle.unlocks", { discount: N })}` : A,
2540
+ children: T ? (V = g.image) != null && V.url ? /* @__PURE__ */ n(
2179
2541
  "img",
2180
2542
  {
2181
- className: p.boxItemImage,
2182
- src: x.image.url,
2183
- alt: x.image.altText ?? x.displayName,
2543
+ className: u.boxItemImage,
2544
+ src: g.image.url,
2545
+ alt: g.image.altText ?? g.displayName,
2184
2546
  width: 1,
2185
2547
  height: 1,
2186
2548
  loading: "lazy"
2187
2549
  }
2188
- ) : /* @__PURE__ */ s("div", { className: p.boxItemFallback, "aria-hidden": "true", children: ((Le = (H = (z = x.product) == null ? void 0 : z.title) == null ? void 0 : H.slice(0, 1)) == null ? void 0 : Le.toUpperCase()) ?? "•" }) : Q && ae ? /* @__PURE__ */ s("div", { className: p.boxItemDiscountText, children: ae }) : /* @__PURE__ */ s("div", { className: p.boxItemPlus, "aria-hidden": "true", children: "+" })
2550
+ ) : /* @__PURE__ */ n("div", { className: u.boxItemFallback, "aria-hidden": "true", children: ((G = (re = (oe = g.product) == null ? void 0 : oe.title) == null ? void 0 : re.slice(0, 1)) == null ? void 0 : G.toUpperCase()) ?? "•" }) : K && N ? /* @__PURE__ */ n("div", { className: u.boxItemDiscountText, children: N }) : /* @__PURE__ */ n("div", { className: u.boxItemPlus, "aria-hidden": "true", children: "+" })
2189
2551
  }
2190
2552
  ),
2191
- U ? /* @__PURE__ */ s("div", { className: p.boxThresholdLabel, children: R.label }) : null
2192
- ] }, _);
2553
+ j ? /* @__PURE__ */ n("div", { className: u.boxThresholdLabel, children: B.label }) : null
2554
+ ] }, f);
2193
2555
  }) }) }),
2194
- /* @__PURE__ */ s("div", { className: [p.totalsReveal, Be ? p.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ s(
2556
+ /* @__PURE__ */ n("div", { className: [u.totalsReveal, Ee ? u.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ n(
2195
2557
  "div",
2196
2558
  {
2197
- className: [p.ctaTotalsWrap, Be ? p.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
2198
- "aria-hidden": !Be,
2199
- children: /* @__PURE__ */ T("div", { className: p.ctaTotals, "aria-label": g("bundle.totals"), children: [
2200
- xe ? /* @__PURE__ */ s("span", { className: p.ctaDiscountBadge, children: g("bundle.discount.badge", { discount: xe }) }) : /* @__PURE__ */ s("span", {}),
2201
- /* @__PURE__ */ s("span", { children: xe ? /* @__PURE__ */ T(Nt, { children: [
2202
- /* @__PURE__ */ s("span", { className: p.ctaTotalsStrike, children: X(ge.toFixed(2)) }),
2559
+ className: [u.ctaTotalsWrap, Ee ? u.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
2560
+ "aria-hidden": !Ee,
2561
+ children: /* @__PURE__ */ I("div", { className: u.ctaTotals, "aria-label": v("bundle.totals"), children: [
2562
+ Ie ? /* @__PURE__ */ n("span", { className: u.ctaDiscountBadge, children: v("bundle.discount.badge", { discount: Ie }) }) : /* @__PURE__ */ n("span", {}),
2563
+ /* @__PURE__ */ n("span", { children: Ie ? /* @__PURE__ */ I(ct, { children: [
2564
+ /* @__PURE__ */ n("span", { className: u.ctaTotalsStrike, children: be(Le.toFixed(2)) }),
2203
2565
  " ",
2204
- /* @__PURE__ */ s("span", { className: p.ctaTotalsPrice, children: X(Ee.toFixed(2)) })
2205
- ] }) : /* @__PURE__ */ s("span", { className: p.ctaTotalsPrice, children: X(ge.toFixed(2)) }) })
2566
+ /* @__PURE__ */ n("span", { className: u.ctaTotalsPrice, children: be(je.toFixed(2)) })
2567
+ ] }) : /* @__PURE__ */ n("span", { className: u.ctaTotalsPrice, children: be(Le.toFixed(2)) }) })
2206
2568
  ] })
2207
2569
  }
2208
2570
  ) }),
2209
2571
  (() => {
2210
- const f = (a == null ? void 0 : a.ctaButtonMode) || "add_to_cart";
2211
- return f === "add_to_cart_checkout" ? ne > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.cta, children: t ? g("bundle.cta.adding") : g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) }) : /* @__PURE__ */ T("div", { className: p.ctaButtonGroup, children: [
2212
- /* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.ctaDualLeft, children: /* @__PURE__ */ s("span", { children: g(t ? "bundle.cta.adding" : "bundle.cta.add_to_basket") }) }),
2213
- /* @__PURE__ */ s("button", { type: "button", onClick: F, disabled: !M, className: p.ctaDualRight, children: /* @__PURE__ */ s("span", { children: g(t ? "bundle.cta.processing" : "bundle.cta.checkout") }) })
2214
- ] }) : f === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: F, disabled: !M, className: p.cta, children: t ? g("bundle.cta.processing") : ne > 0 ? g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) : g("bundle.cta.checkout") }) : /* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.cta, children: t ? g("bundle.cta.adding") : ne > 0 ? g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) : g("bundle.cta.add_to_basket") });
2572
+ const m = (r == null ? void 0 : r.ctaButtonMode) || "add_to_cart";
2573
+ return m === "add_to_cart_checkout" ? ke > 0 ? /* @__PURE__ */ n("button", { type: "button", onClick: ye, disabled: !W, className: u.cta, children: t ? v("bundle.cta.adding") : v("bundle.cta.add_more", { count: ke, productWord: ut(ue, ke) }) }) : /* @__PURE__ */ I("div", { className: u.ctaButtonGroup, children: [
2574
+ /* @__PURE__ */ n("button", { type: "button", onClick: ye, disabled: !W, className: u.ctaDualLeft, children: /* @__PURE__ */ n("span", { children: v(t ? "bundle.cta.adding" : "bundle.cta.add_to_basket") }) }),
2575
+ /* @__PURE__ */ n("button", { type: "button", onClick: H, disabled: !W, className: u.ctaDualRight, children: /* @__PURE__ */ n("span", { children: v(t ? "bundle.cta.processing" : "bundle.cta.checkout") }) })
2576
+ ] }) : m === "checkout" ? /* @__PURE__ */ n("button", { type: "button", onClick: H, disabled: !W, className: u.cta, children: t ? v("bundle.cta.processing") : ke > 0 ? v("bundle.cta.add_more", { count: ke, productWord: ut(ue, ke) }) : v("bundle.cta.checkout") }) : /* @__PURE__ */ n("button", { type: "button", onClick: ye, disabled: !W, className: u.cta, children: t ? v("bundle.cta.adding") : ke > 0 ? v("bundle.cta.add_more", { count: ke, productWord: ut(ue, ke) }) : v("bundle.cta.add_to_basket") });
2215
2577
  })(),
2216
- /* @__PURE__ */ T("div", { className: p.poweredBy, children: [
2217
- g("bundle.powered_by"),
2578
+ /* @__PURE__ */ I("div", { className: u.poweredBy, children: [
2579
+ v("bundle.powered_by"),
2218
2580
  " ",
2219
- /* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
2581
+ /* @__PURE__ */ n("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
2220
2582
  ] })
2221
2583
  ] })
2222
2584
  ] });
2223
2585
  }
2224
- const pi = "_panel_mo8go_1", _i = "_title_mo8go_12", gi = "_status_mo8go_19", wi = "_error_mo8go_24", yi = "_rules_mo8go_30", vi = "_rule_mo8go_30", xi = "_ruleInput_mo8go_44", Ni = "_ruleLabel_mo8go_50", Ii = "_ruleLabelContent_mo8go_59", Si = "_ruleSelected_mo8go_66", Ci = "_ruleTitle_mo8go_71", Bi = "_ruleSubtitle_mo8go_77", ki = "_priceRow_mo8go_83", Ti = "_oldPrice_mo8go_90", Li = "_newPrice_mo8go_96", oe = {
2225
- panel: pi,
2226
- title: _i,
2227
- status: gi,
2228
- error: wi,
2229
- rules: yi,
2230
- rule: vi,
2231
- ruleInput: xi,
2232
- ruleLabel: Ni,
2233
- ruleLabelContent: Ii,
2234
- ruleSelected: Si,
2235
- ruleTitle: Ci,
2236
- ruleSubtitle: Bi,
2237
- priceRow: ki,
2238
- oldPrice: Ti,
2239
- newPrice: Li
2586
+ const io = "_panel_mo8go_1", oo = "_title_mo8go_12", lo = "_status_mo8go_19", so = "_error_mo8go_24", co = "_rules_mo8go_30", uo = "_rule_mo8go_30", mo = "_ruleInput_mo8go_44", ho = "_ruleLabel_mo8go_50", bo = "_ruleLabelContent_mo8go_59", fo = "_ruleSelected_mo8go_66", po = "_ruleTitle_mo8go_71", _o = "_ruleSubtitle_mo8go_77", yo = "_priceRow_mo8go_83", vo = "_oldPrice_mo8go_90", wo = "_newPrice_mo8go_96", we = {
2587
+ panel: io,
2588
+ title: oo,
2589
+ status: lo,
2590
+ error: so,
2591
+ rules: co,
2592
+ rule: uo,
2593
+ ruleInput: mo,
2594
+ ruleLabel: ho,
2595
+ ruleLabelContent: bo,
2596
+ ruleSelected: fo,
2597
+ ruleTitle: po,
2598
+ ruleSubtitle: _o,
2599
+ priceRow: yo,
2600
+ oldPrice: vo,
2601
+ newPrice: wo
2240
2602
  };
2241
- function jt(n) {
2242
- const e = String(n ?? "").trim();
2603
+ function Ht(a) {
2604
+ const e = String(a ?? "").trim();
2243
2605
  if (!e) return "";
2244
2606
  if (e.startsWith("gid://shopify/ProductVariant/")) return e;
2245
2607
  const t = e.replace(/\D/g, "");
2246
2608
  return t ? `gid://shopify/ProductVariant/${t}` : "";
2247
2609
  }
2248
- function Ri() {
2610
+ function go() {
2249
2611
  if (typeof window > "u") return "";
2250
- const n = new URLSearchParams(window.location.search).get("variant");
2251
- if (n) return jt(n);
2612
+ const a = new URLSearchParams(window.location.search).get("variant");
2613
+ if (a) return Ht(a);
2252
2614
  const e = document.querySelector('form[action*="/cart/add"]'), t = e == null ? void 0 : e.querySelector('input[name="id"], select[name="id"]');
2253
- return jt((t == null ? void 0 : t.value) ?? "");
2615
+ return Ht((t == null ? void 0 : t.value) ?? "");
2254
2616
  }
2255
- function Yt() {
2617
+ function Jt() {
2256
2618
  if (typeof document > "u") return null;
2257
- const n = document.querySelector('form[action*="/cart/add"]');
2258
- return (n == null ? void 0 : n.querySelector('input[name="quantity"]')) ?? null;
2619
+ const a = document.querySelector('form[action*="/cart/add"]');
2620
+ return (a == null ? void 0 : a.querySelector('input[name="quantity"]')) ?? null;
2259
2621
  }
2260
- function Pi() {
2261
- const n = Yt();
2262
- if (!n) return null;
2263
- const e = Number(n.value ?? NaN);
2622
+ function No() {
2623
+ const a = Jt();
2624
+ if (!a) return null;
2625
+ const e = Number(a.value ?? NaN);
2264
2626
  return !Number.isFinite(e) || e <= 0 ? null : Math.floor(e);
2265
2627
  }
2266
- function Mi(n) {
2267
- const e = Yt();
2268
- return e ? (e.value = String(n), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })), !0) : !1;
2628
+ function ko(a) {
2629
+ const e = Jt();
2630
+ return e ? (e.value = String(a), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })), !0) : !1;
2269
2631
  }
2270
- function Gi({ className: n, preferFirstEligibleVariant: e = !1 }) {
2271
- var j, N, se;
2272
- const { loading: t, error: i, config: r, eligibleVariants: a, currencyCode: h, locale: u } = gt(), [S, ce] = W(""), [q, $] = W(null), [me, M] = W(null), ie = e || typeof window < "u" && !!window.__BUNDLE_PREVIEW_CONFIG__;
2273
- D(() => {
2274
- const L = () => ce(Ri());
2275
- L(), document.addEventListener("variant:change", L);
2276
- const O = window.setInterval(L, 500);
2632
+ function Vo({ className: a, preferFirstEligibleVariant: e = !1 }) {
2633
+ var ae, k, ge;
2634
+ const { loading: t, error: l, config: o, eligibleVariants: r, currencyCode: p, locale: b } = yt(), [F, se] = ne(""), [q, Y] = ne(null), [de, W] = ne(null), ye = e || typeof window < "u" && !!window.__BUNDLE_PREVIEW_CONFIG__;
2635
+ U(() => {
2636
+ const z = () => se(go());
2637
+ z(), document.addEventListener("variant:change", z);
2638
+ const E = window.setInterval(z, 500);
2277
2639
  return () => {
2278
- document.removeEventListener("variant:change", L), window.clearInterval(O);
2640
+ document.removeEventListener("variant:change", z), window.clearInterval(E);
2279
2641
  };
2280
- }, []), D(() => {
2281
- const L = () => $(Pi()), O = (Z) => {
2282
- const V = Z.target;
2283
- V instanceof HTMLInputElement && V.name === "quantity" && L();
2642
+ }, []), U(() => {
2643
+ const z = () => Y(No()), E = (ce) => {
2644
+ const xe = ce.target;
2645
+ xe instanceof HTMLInputElement && xe.name === "quantity" && z();
2284
2646
  };
2285
- L(), document.addEventListener("input", O, !0), document.addEventListener("change", O, !0);
2286
- const X = window.setInterval(L, 500);
2647
+ z(), document.addEventListener("input", E, !0), document.addEventListener("change", E, !0);
2648
+ const me = window.setInterval(z, 500);
2287
2649
  return () => {
2288
- document.removeEventListener("input", O, !0), document.removeEventListener("change", O, !0), window.clearInterval(X);
2650
+ document.removeEventListener("input", E, !0), document.removeEventListener("change", E, !0), window.clearInterval(me);
2289
2651
  };
2290
2652
  }, []);
2291
- const F = P(
2292
- () => [...(r == null ? void 0 : r.rules) ?? []].sort((L, O) => L.minBundleSize - O.minBundleSize),
2293
- [r == null ? void 0 : r.rules]
2294
- ), K = ie ? ((j = a[0]) == null ? void 0 : j.id) || "" : S || ((N = a[0]) == null ? void 0 : N.id) || "", g = a.find((L) => L.id === K) ?? null;
2295
- return D(() => {
2296
- var L;
2297
- if (!F.length) {
2298
- M(null);
2653
+ const H = $(
2654
+ () => [...(o == null ? void 0 : o.rules) ?? []].sort((z, E) => z.minBundleSize - E.minBundleSize),
2655
+ [o == null ? void 0 : o.rules]
2656
+ ), ue = ye ? ((ae = r[0]) == null ? void 0 : ae.id) || "" : F || ((k = r[0]) == null ? void 0 : k.id) || "", v = r.find((z) => z.id === ue) ?? null;
2657
+ return U(() => {
2658
+ var z;
2659
+ if (!H.length) {
2660
+ W(null);
2299
2661
  return;
2300
2662
  }
2301
2663
  if (q != null) {
2302
- let O = null;
2303
- for (const X of F)
2304
- X.minBundleSize <= q && (O = X.handle);
2305
- M(O ?? ((L = F[0]) == null ? void 0 : L.handle) ?? null);
2664
+ let E = null;
2665
+ for (const me of H)
2666
+ me.minBundleSize <= q && (E = me.handle);
2667
+ W(E ?? ((z = H[0]) == null ? void 0 : z.handle) ?? null);
2306
2668
  return;
2307
2669
  }
2308
- M((O) => {
2309
- var X;
2310
- return O ?? ((X = F[0]) == null ? void 0 : X.handle) ?? null;
2670
+ W((E) => {
2671
+ var me;
2672
+ return E ?? ((me = H[0]) == null ? void 0 : me.handle) ?? null;
2311
2673
  });
2312
- }, [q, F]), (r == null ? void 0 : r.bundleType) !== "volume_discount" ? null : /* @__PURE__ */ T("section", { className: [oe.panel, n].filter(Boolean).join(" "), "aria-busy": t, children: [
2313
- /* @__PURE__ */ s("h2", { className: oe.title, children: ((se = r == null ? void 0 : r.title) == null ? void 0 : se.trim()) || "Volume discount" }),
2314
- t ? /* @__PURE__ */ s("div", { className: oe.status, children: "Loading volume discounts…" }) : null,
2315
- i ? /* @__PURE__ */ s("div", { className: oe.error, children: i }) : null,
2316
- !t && !i && !g ? /* @__PURE__ */ s("div", { className: oe.status, children: "Select an eligible variant to view volume discounts." }) : null,
2317
- !t && !i && g ? /* @__PURE__ */ s(Nt, { children: /* @__PURE__ */ s("div", { className: oe.rules, children: F.map((L) => {
2318
- const O = Number.parseFloat(L.discountPercent), X = Number.isFinite(O) && O > 0 ? `Save ${Math.round(O)}%` : "Standard", Z = me === L.handle;
2319
- return /* @__PURE__ */ s(
2674
+ }, [q, H]), (o == null ? void 0 : o.bundleType) !== "volume_discount" ? null : /* @__PURE__ */ I("section", { className: [we.panel, a].filter(Boolean).join(" "), "aria-busy": t, children: [
2675
+ /* @__PURE__ */ n("h2", { className: we.title, children: ((ge = o == null ? void 0 : o.title) == null ? void 0 : ge.trim()) || "Volume discount" }),
2676
+ t ? /* @__PURE__ */ n("div", { className: we.status, children: "Loading volume discounts…" }) : null,
2677
+ l ? /* @__PURE__ */ n("div", { className: we.error, children: l }) : null,
2678
+ !t && !l && !v ? /* @__PURE__ */ n("div", { className: we.status, children: "Select an eligible variant to view volume discounts." }) : null,
2679
+ !t && !l && v ? /* @__PURE__ */ n(ct, { children: /* @__PURE__ */ n("div", { className: we.rules, children: H.map((z) => {
2680
+ const E = Number.parseFloat(z.discountPercent), me = Number.isFinite(E) && E > 0 ? `Save ${Math.round(E)}%` : "Standard", ce = de === z.handle;
2681
+ return /* @__PURE__ */ n(
2320
2682
  "div",
2321
2683
  {
2322
- className: [oe.rule, Z ? oe.ruleSelected : ""].filter(Boolean).join(" "),
2323
- children: /* @__PURE__ */ T("label", { className: oe.ruleLabel, children: [
2324
- /* @__PURE__ */ T("div", { className: oe.ruleLabelContent, children: [
2325
- /* @__PURE__ */ s(
2684
+ className: [we.rule, ce ? we.ruleSelected : ""].filter(Boolean).join(" "),
2685
+ children: /* @__PURE__ */ I("label", { className: we.ruleLabel, children: [
2686
+ /* @__PURE__ */ I("div", { className: we.ruleLabelContent, children: [
2687
+ /* @__PURE__ */ n(
2326
2688
  "input",
2327
2689
  {
2328
- className: oe.ruleInput,
2690
+ className: we.ruleInput,
2329
2691
  type: "radio",
2330
- checked: Z,
2692
+ checked: ce,
2331
2693
  name: "bb-volume-discount-rule",
2332
2694
  onChange: () => {
2333
- M(L.handle), Mi(L.minBundleSize);
2695
+ W(z.handle), ko(z.minBundleSize);
2334
2696
  }
2335
2697
  }
2336
2698
  ),
2337
- /* @__PURE__ */ s("span", { className: oe.ruleTitle, children: `Buy ${L.minBundleSize}` }),
2338
- /* @__PURE__ */ s("span", { className: oe.ruleSubtitle, children: X })
2699
+ /* @__PURE__ */ n("span", { className: we.ruleTitle, children: `Buy ${z.minBundleSize}` }),
2700
+ /* @__PURE__ */ n("span", { className: we.ruleSubtitle, children: me })
2339
2701
  ] }),
2340
- /* @__PURE__ */ s("div", { children: (() => {
2341
- const V = Number(g.price ?? NaN);
2342
- if (!Number.isFinite(V)) return null;
2343
- const ne = V * L.minBundleSize, ue = Number.isFinite(O) && O > 0, xe = ue ? ne * (1 - O / 100) : ne;
2344
- return ue ? /* @__PURE__ */ T("span", { className: oe.priceRow, children: [
2345
- /* @__PURE__ */ s("span", { className: oe.oldPrice, children: ft(ne, h, u) }),
2346
- /* @__PURE__ */ s("span", { className: oe.newPrice, children: ft(xe, h, u) })
2347
- ] }) : /* @__PURE__ */ s("span", { className: oe.priceRow, children: /* @__PURE__ */ s("span", { className: oe.newPrice, children: ft(ne, h, u) }) });
2702
+ /* @__PURE__ */ n("div", { children: (() => {
2703
+ const xe = Number(v.price ?? NaN);
2704
+ if (!Number.isFinite(xe)) return null;
2705
+ const Se = xe * z.minBundleSize, be = Number.isFinite(E) && E > 0, Ve = be ? Se * (1 - E / 100) : Se;
2706
+ return be ? /* @__PURE__ */ I("span", { className: we.priceRow, children: [
2707
+ /* @__PURE__ */ n("span", { className: we.oldPrice, children: ft(Se, p, b) }),
2708
+ /* @__PURE__ */ n("span", { className: we.newPrice, children: ft(Ve, p, b) })
2709
+ ] }) : /* @__PURE__ */ n("span", { className: we.priceRow, children: /* @__PURE__ */ n("span", { className: we.newPrice, children: ft(Se, p, b) }) });
2348
2710
  })() })
2349
2711
  ] })
2350
2712
  },
2351
- L.handle
2713
+ z.handle
2352
2714
  );
2353
2715
  }) }) }) : null
2354
2716
  ] });
2355
2717
  }
2356
- function Lt(n) {
2357
- if (n != null && n.length)
2358
- return n.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
2718
+ function Ot(a) {
2719
+ if (a != null && a.length)
2720
+ return a.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
2359
2721
  }
2360
- function Ut(n) {
2361
- const e = /\/(\d+)$/.exec(n);
2362
- return e ? e[1] : n;
2722
+ function Qt(a) {
2723
+ const e = /\/(\d+)$/.exec(a);
2724
+ return e ? e[1] : a;
2363
2725
  }
2364
- function Fi(n) {
2365
- if (n == null) return null;
2366
- const e = String(n).trim();
2726
+ function Co(a) {
2727
+ if (a == null) return null;
2728
+ const e = String(a).trim();
2367
2729
  return e ? e.startsWith("gid://shopify/ProductVariant/") ? e : `gid://shopify/ProductVariant/${e}` : null;
2368
2730
  }
2369
- function Oi() {
2370
- var n;
2371
- return typeof window > "u" ? null : ((n = window.Shopify) == null ? void 0 : n.theme) ?? null;
2731
+ function xo() {
2732
+ var a;
2733
+ return typeof window > "u" ? null : ((a = window.Shopify) == null ? void 0 : a.theme) ?? null;
2372
2734
  }
2373
- function Ai() {
2374
- const n = Oi();
2375
- return n ? n.schema_name === "Sleek" ? !0 : /sleek/i.test(n.name ?? "") : !1;
2735
+ function Io() {
2736
+ const a = xo();
2737
+ return a ? a.schema_name === "Sleek" ? !0 : /sleek/i.test(a.name ?? "") : !1;
2376
2738
  }
2377
- function Ei() {
2739
+ function So() {
2378
2740
  return typeof document > "u" ? !1 : !!document.querySelector("cart-drawer");
2379
2741
  }
2380
- function Di() {
2381
- return !Ai() || !Ei() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
2742
+ function Po() {
2743
+ return !Io() || !So() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
2382
2744
  bubbles: !0,
2383
2745
  detail: { open: !0 }
2384
2746
  })), !0);
2385
2747
  }
2386
- function qi() {
2748
+ function Bo() {
2387
2749
  window.location.reload();
2388
2750
  }
2389
- async function vt(n, e) {
2390
- const t = await fetch(n, {
2751
+ async function Ct(a, e) {
2752
+ const t = await fetch(a, {
2391
2753
  method: "POST",
2392
2754
  headers: {
2393
2755
  Accept: "application/json",
@@ -2396,13 +2758,13 @@ async function vt(n, e) {
2396
2758
  body: JSON.stringify(e)
2397
2759
  });
2398
2760
  if (!t.ok) {
2399
- const i = await t.text().catch(() => "");
2400
- throw new Error(i || `Cart request failed: ${t.status}`);
2761
+ const l = await t.text().catch(() => "");
2762
+ throw new Error(l || `Cart request failed: ${t.status}`);
2401
2763
  }
2402
2764
  return t.json().catch(() => null);
2403
2765
  }
2404
- async function $i() {
2405
- const n = await fetch("/cart.js", {
2766
+ async function To() {
2767
+ const a = await fetch("/cart.js", {
2406
2768
  method: "GET",
2407
2769
  cache: "no-store",
2408
2770
  headers: {
@@ -2410,52 +2772,52 @@ async function $i() {
2410
2772
  "Content-Type": "application/json"
2411
2773
  }
2412
2774
  });
2413
- if (!n.ok)
2414
- throw new Error(`Cart request failed: ${n.status}`);
2415
- return n.json();
2775
+ if (!a.ok)
2776
+ throw new Error(`Cart request failed: ${a.status}`);
2777
+ return a.json();
2416
2778
  }
2417
- function Yi() {
2779
+ function Eo() {
2418
2780
  return {
2419
- async linesAdd(n) {
2420
- const e = n.map((t) => ({
2421
- id: Ut(t.merchandiseId),
2781
+ async linesAdd(a) {
2782
+ const e = a.map((t) => ({
2783
+ id: Qt(t.merchandiseId),
2422
2784
  quantity: t.quantity,
2423
- properties: Lt(t.attributes)
2785
+ properties: Ot(t.attributes)
2424
2786
  }));
2425
- await vt("/cart/add.js", { items: e });
2787
+ await Ct("/cart/add.js", { items: e });
2426
2788
  },
2427
- async linesAddForCheckout(n) {
2428
- const e = n.map((t) => ({
2429
- id: Ut(t.merchandiseId),
2789
+ async linesAddForCheckout(a) {
2790
+ const e = a.map((t) => ({
2791
+ id: Qt(t.merchandiseId),
2430
2792
  quantity: t.quantity,
2431
- properties: Lt(t.attributes)
2793
+ properties: Ot(t.attributes)
2432
2794
  }));
2433
- await vt("/cart/add.js", { items: e });
2795
+ await Ct("/cart/add.js", { items: e });
2434
2796
  },
2435
- async linesUpdate(n) {
2436
- for (const e of n)
2437
- await vt("/cart/change.js", {
2797
+ async linesUpdate(a) {
2798
+ for (const e of a)
2799
+ await Ct("/cart/change.js", {
2438
2800
  id: e.id,
2439
2801
  quantity: e.quantity,
2440
- properties: Lt(e.attributes)
2802
+ properties: Ot(e.attributes)
2441
2803
  });
2442
2804
  },
2443
- async linesRemove(n) {
2444
- for (const e of n)
2445
- await vt("/cart/change.js", { id: e, quantity: 0 });
2805
+ async linesRemove(a) {
2806
+ for (const e of a)
2807
+ await Ct("/cart/change.js", { id: e, quantity: 0 });
2446
2808
  },
2447
2809
  async getLineQuantitiesByMerchandiseId() {
2448
- const n = await $i(), e = {};
2449
- for (const t of n.items ?? []) {
2450
- const i = Fi(t.id);
2451
- if (!i) continue;
2452
- const r = Number(t.quantity ?? 0);
2453
- !Number.isFinite(r) || r <= 0 || (e[i] = (e[i] ?? 0) + Math.floor(r));
2810
+ const a = await To(), e = {};
2811
+ for (const t of a.items ?? []) {
2812
+ const l = Co(t.id);
2813
+ if (!l) continue;
2814
+ const o = Number(t.quantity ?? 0);
2815
+ !Number.isFinite(o) || o <= 0 || (e[l] = (e[l] ?? 0) + Math.floor(o));
2454
2816
  }
2455
2817
  return e;
2456
2818
  },
2457
2819
  openCartUI() {
2458
- Di() || window.setTimeout(() => qi(), 0);
2820
+ Po() || window.setTimeout(() => Bo(), 0);
2459
2821
  },
2460
2822
  navigateToCheckout() {
2461
2823
  window.location.href = "/checkout";
@@ -2463,14 +2825,14 @@ function Yi() {
2463
2825
  };
2464
2826
  }
2465
2827
  export {
2466
- Hi as BundleBuilderDrawer,
2467
- Qi as BundleBuilderPanel,
2468
- Ui as BundleButton,
2469
- wt as BundleLineAttributeKeys,
2470
- Wi as BundleProvider,
2471
- Gi as VolumeDiscountPanel,
2472
- Yi as createLiquidCartAdapter,
2473
- gt as useBundleBuilder,
2474
- ji as useBundleBuilderDrawer
2828
+ Ao as BundleBuilderDrawer,
2829
+ qo as BundleBuilderPanel,
2830
+ Oo as BundleButton,
2831
+ Nt as BundleLineAttributeKeys,
2832
+ Fo as BundleProvider,
2833
+ Vo as VolumeDiscountPanel,
2834
+ Eo as createLiquidCartAdapter,
2835
+ yt as useBundleBuilder,
2836
+ Mo as useBundleBuilderDrawer
2475
2837
  };
2476
2838
  //# sourceMappingURL=index.js.map