@best-bundles/bundle-ui 0.0.45 → 0.0.47

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