@best-bundles/bundle-ui 0.0.43 → 0.0.45

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