@best-bundles/bundle-ui 0.0.36 → 0.0.37
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 +471 -471
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.css +1 -1
- package/dist/liquid/bundle-ui.iife.js +19 -19
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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_i1rsh_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_i1rsh_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_i1rsh_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_i1rsh_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_i1rsh_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_i1rsh_74{opacity:1}._backdropClosed_i1rsh_78{opacity:0}._panel_i1rsh_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_i1rsh_103{animation:_bbSlideInFromRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_i1rsh_107{animation:_bbSlideOutToRight_i1rsh_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_i1rsh_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_i1rsh_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_i1rsh_1{transition:none}._celebrationChip_i1rsh_23,._panelOpen_i1rsh_103,._panelClosed_i1rsh_107{animation:none}}._header_i1rsh_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_i1rsh_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_i1rsh_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_i1rsh_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}._searchIconButton_i1rsh_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_i1rsh_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_i1rsh_194{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_i1rsh_198{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_i1rsh_210 ._headerTitleWrap_i1rsh_194{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_i1rsh_210 ._headerSearchWrap_i1rsh_198{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_i1rsh_222{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_i1rsh_234{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_i1rsh_234::-webkit-search-cancel-button,._searchInput_i1rsh_234::-webkit-search-decoration,._searchInput_i1rsh_234::-webkit-search-results-button,._searchInput_i1rsh_234::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_i1rsh_255{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_i1rsh_255:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_i1rsh_255:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_i1rsh_277{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}._closeButton_i1rsh_277:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_i1rsh_277:disabled{opacity:.6;cursor:not-allowed}._closeButton_i1rsh_277:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_i1rsh_194,._headerSearchWrap_i1rsh_198{transition:none}}._body_i1rsh_310{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_i1rsh_315{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_i1rsh_320{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_i1rsh_325{margin-top:4px}._variantList_i1rsh_329{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_i1rsh_337{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_i1rsh_345{opacity:.65}._variantLeft_i1rsh_349{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_i1rsh_356{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_i1rsh_356:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_i1rsh_356:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_i1rsh_356:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_i1rsh_384{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_i1rsh_384{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._variantThumb_i1rsh_401{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_i1rsh_411{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_i1rsh_418{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_i1rsh_428{min-width:0}._variantName_i1rsh_432{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_i1rsh_441{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_i1rsh_449{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_i1rsh_456{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_i1rsh_449{font-size:13px;font-weight:800}._qtyControls_i1rsh_467{display:inline-flex;align-items:center;gap:6px}._qtyButton_i1rsh_473{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_i1rsh_473:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_i1rsh_473:disabled{opacity:.6;cursor:not-allowed}._qtyButton_i1rsh_473:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_i1rsh_498{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_i1rsh_505{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_i1rsh_513{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_i1rsh_513 a{color:inherit;text-decoration:none}._boxSummaryWindow_i1rsh_525{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_i1rsh_525::-webkit-scrollbar{display:none}._boxSummaryRow_i1rsh_543{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_i1rsh_551{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_i1rsh_560{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_i1rsh_572{cursor:pointer}._boxItemClickable_i1rsh_572:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_i1rsh_581{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_i1rsh_592{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_i1rsh_598{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_i1rsh_604{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_i1rsh_612{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_i1rsh_620{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_i1rsh_627{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_i1rsh_634{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_i1rsh_645{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_i1rsh_652{gap:0}._cta_i1rsh_645{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_i1rsh_668{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_i1rsh_680{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_i1rsh_698{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_i1rsh_698>span{opacity:0}._ctaDualRight_i1rsh_711{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_i1rsh_727{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_i1rsh_727>span{opacity:0}._ctaTotals_i1rsh_738{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_i1rsh_746{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_i1rsh_760{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_i1rsh_773{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_i1rsh_780{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_i1rsh_787{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_i1rsh_760{transition:none}}._cta_i1rsh_645:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_i1rsh_645:disabled{opacity:.6;cursor:not-allowed}._cta_i1rsh_645:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_i1rsh_668:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_i1rsh_668:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_i1rsh_668:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_i1rsh_680:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_i1rsh_680:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_i1rsh_680:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_i1rsh_711:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_i1rsh_711:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_i1rsh_711:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_i1rsh_856{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_i1rsh_1{padding:0;justify-content:stretch}._panel_i1rsh_82{width:100%;height:100%;border-radius:0}}._panel_1n9m6_2 button,._panel_1n9m6_2 input,._panel_1n9m6_2 [role=button]{box-sizing:border-box;margin:0}._panel_1n9m6_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_1n9m6_20{text-align:start}._title_1n9m6_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_1n9m6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_1n9m6_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_1n9m6_43{font-size:13px;color:#b45309;font-weight:600}._section_1n9m6_49{display:grid;gap:6px}._sectionTitle_1n9m6_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_1n9m6_63{display:flex;justify-content:center;gap:6px}._rulesList_1n9m6_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_1n9m6_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_1n9m6_92{font-weight:600;font-size:13px}._ruleDiscount_1n9m6_97{font-weight:700;font-size:13px}._ruleLabel_1n9m6_102{font-size:12px;opacity:.7}._rulesVisual_1n9m6_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_1n9m6_114,._rulesLinesRow_1n9m6_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_1n9m6_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_1n9m6_128:empty{display:flex!important}._rulesLineLabel_1n9m6_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_1n9m6_145{height:1em}._rulesLine_1n9m6_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_1n9m6_121:empty{display:block!important}._rulesLineEmpty_1n9m6_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_1n9m6_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_1n9m6_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_1n9m6_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1n9m6_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_1n9m6_198{cursor:pointer}._variantRowSelected_1n9m6_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_1n9m6_207{opacity:.65}._variantMedia_1n9m6_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_1n9m6_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_1n9m6_227{display:flex;flex-direction:column;gap:4px}._variantTitle_1n9m6_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_1n9m6_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_1n9m6_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_1n9m6_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_1n9m6_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_1n9m6_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_1n9m6_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_1n9m6_286{display:grid;align-items:end;justify-items:end}._qtyActions_1n9m6_292{display:inline-flex;align-items:center;gap:6px}._variantUnavailable_1n9m6_298{display:none}._qtyControls_1n9m6_302{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_1n9m6_312{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_1n9m6_312:disabled{cursor:not-allowed;opacity:.4}._qtyButton_1n9m6_312:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1n9m6_336{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_1n9m6_343{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._qtyChip_1n9m6_351{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_1n9m6_366{cursor:pointer}._qtyChipValue_1n9m6_370{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_1n9m6_376{margin-bottom:-3px;font-weight:500}._qtyChipClear_1n9m6_381{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_1n9m6_351:hover ._qtyChipClear_1n9m6_381{background:#0f172a;color:#fff}._qtyTrash_1n9m6_400{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_1n9m6_412{display:grid;padding-top:6px}._boxSummaryWindow_1n9m6_417{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_1n9m6_417::-webkit-scrollbar{display:none}._boxSummaryRow_1n9m6_431{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1n9m6_439{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_1n9m6_448{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_1n9m6_448:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_1n9m6_465{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_1n9m6_471{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_1n9m6_477{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_1n9m6_485{cursor:pointer}._boxItemClickable_1n9m6_485:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_1n9m6_494{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_1n9m6_505{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_1n9m6_518{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_1n9m6_530{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_1n9m6_543{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_1n9m6_554{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_1n9m6_562{max-height:80px;opacity:1}._ctaTotalsWrap_1n9m6_567{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_1n9m6_572{opacity:1}._ctaTotals_1n9m6_567{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_1n9m6_587{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_1n9m6_598{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_1n9m6_604{font-weight:700;color:#0f172a}._cta_1n9m6_567{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_1n9m6_567:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_1n9m6_567:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_1n9m6_636{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_1n9m6_642,._ctaDualRight_1n9m6_643{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_1n9m6_642{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_1n9m6_643{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1n9m6_642:disabled,._ctaDualRight_1n9m6_643:disabled{cursor:not-allowed;opacity:.6}._poweredBy_1n9m6_670{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_1n9m6_670 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_1n9m6_2{padding:16px}._variantRow_1n9m6_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_1n9m6_302{justify-self:start}._variantDetailsRow_1n9m6_239{grid-template-columns:1fr}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_18x6y_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_18x6y_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_18x6y_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_18x6y_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_18x6y_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_18x6y_74{opacity:1}._backdropClosed_18x6y_78{opacity:0}._panel_18x6y_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_18x6y_103{animation:_bbSlideInFromRight_18x6y_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_18x6y_107{animation:_bbSlideOutToRight_18x6y_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_18x6y_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_18x6y_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_18x6y_1{transition:none}._celebrationChip_18x6y_23,._panelOpen_18x6y_103,._panelClosed_18x6y_107{animation:none}}._header_18x6y_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_18x6y_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_18x6y_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_18x6y_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_18x6y_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_18x6y_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_18x6y_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_18x6y_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_18x6y_211 ._headerTitleWrap_18x6y_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_18x6y_211 ._headerSearchWrap_18x6y_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_18x6y_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_18x6y_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_18x6y_235::-webkit-search-cancel-button,._searchInput_18x6y_235::-webkit-search-decoration,._searchInput_18x6y_235::-webkit-search-results-button,._searchInput_18x6y_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_18x6y_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_18x6y_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_18x6y_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_18x6y_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_18x6y_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_18x6y_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_18x6y_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_18x6y_195,._headerSearchWrap_18x6y_199{transition:none}}._body_18x6y_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_18x6y_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_18x6y_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_18x6y_327{margin-top:4px}._variantList_18x6y_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_18x6y_339{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_18x6y_347{opacity:.65}._variantLeft_18x6y_351{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_18x6y_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_18x6y_358:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_18x6y_358:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_18x6y_358:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_18x6y_386{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._soldOut_18x6y_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}._variantThumb_18x6y_403{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_18x6y_413{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_18x6y_420{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_18x6y_430{min-width:0}._variantName_18x6y_434{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_18x6y_443{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_18x6y_451{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_18x6y_458{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_18x6y_451{font-size:13px;font-weight:800}._qtyControls_18x6y_469{display:inline-flex;align-items:center;gap:6px}._qtyButton_18x6y_475{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_18x6y_475:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_18x6y_475:disabled{opacity:.6;cursor:not-allowed}._qtyButton_18x6y_475:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_18x6y_501{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_18x6y_508{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_18x6y_516{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_18x6y_516 a{color:inherit;text-decoration:none}._boxSummaryWindow_18x6y_528{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_18x6y_528::-webkit-scrollbar{display:none}._boxSummaryRow_18x6y_546{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_18x6y_554{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_18x6y_563{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_18x6y_575{cursor:pointer}._boxItemClickable_18x6y_575:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_18x6y_584{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_18x6y_595{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_18x6y_601{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_18x6y_607{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_18x6y_615{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_18x6y_623{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_18x6y_630{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_18x6y_637{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_18x6y_648{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_18x6y_655{gap:0}._cta_18x6y_648{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_18x6y_671{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_18x6y_683{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_18x6y_701{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_18x6y_701>span{opacity:0}._ctaDualRight_18x6y_714{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_18x6y_730{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_18x6y_730>span{opacity:0}._ctaTotals_18x6y_741{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_18x6y_749{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_18x6y_763{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_18x6y_776{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_18x6y_783{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_18x6y_790{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_18x6y_763{transition:none}}._cta_18x6y_648:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_18x6y_648:disabled{opacity:.6;cursor:not-allowed}._cta_18x6y_648:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_18x6y_671:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_18x6y_671:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_18x6y_671:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_18x6y_683:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_18x6y_683:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_18x6y_683:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_18x6y_714:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_18x6y_714:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_18x6y_714:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_18x6y_859{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_18x6y_1{padding:0;justify-content:stretch}._panel_18x6y_82{width:100%;height:100%;border-radius:0}}._panel_1n9m6_2 button,._panel_1n9m6_2 input,._panel_1n9m6_2 [role=button]{box-sizing:border-box;margin:0}._panel_1n9m6_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_1n9m6_20{text-align:start}._title_1n9m6_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_1n9m6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_1n9m6_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_1n9m6_43{font-size:13px;color:#b45309;font-weight:600}._section_1n9m6_49{display:grid;gap:6px}._sectionTitle_1n9m6_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_1n9m6_63{display:flex;justify-content:center;gap:6px}._rulesList_1n9m6_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_1n9m6_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_1n9m6_92{font-weight:600;font-size:13px}._ruleDiscount_1n9m6_97{font-weight:700;font-size:13px}._ruleLabel_1n9m6_102{font-size:12px;opacity:.7}._rulesVisual_1n9m6_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_1n9m6_114,._rulesLinesRow_1n9m6_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_1n9m6_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_1n9m6_128:empty{display:flex!important}._rulesLineLabel_1n9m6_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_1n9m6_145{height:1em}._rulesLine_1n9m6_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_1n9m6_121:empty{display:block!important}._rulesLineEmpty_1n9m6_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_1n9m6_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_1n9m6_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_1n9m6_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1n9m6_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_1n9m6_198{cursor:pointer}._variantRowSelected_1n9m6_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_1n9m6_207{opacity:.65}._variantMedia_1n9m6_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_1n9m6_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_1n9m6_227{display:flex;flex-direction:column;gap:4px}._variantTitle_1n9m6_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_1n9m6_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_1n9m6_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_1n9m6_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_1n9m6_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_1n9m6_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_1n9m6_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_1n9m6_286{display:grid;align-items:end;justify-items:end}._qtyActions_1n9m6_292{display:inline-flex;align-items:center;gap:6px}._variantUnavailable_1n9m6_298{display:none}._qtyControls_1n9m6_302{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_1n9m6_312{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_1n9m6_312:disabled{cursor:not-allowed;opacity:.4}._qtyButton_1n9m6_312:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1n9m6_336{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_1n9m6_343{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._qtyChip_1n9m6_351{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_1n9m6_366{cursor:pointer}._qtyChipValue_1n9m6_370{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_1n9m6_376{margin-bottom:-3px;font-weight:500}._qtyChipClear_1n9m6_381{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_1n9m6_351:hover ._qtyChipClear_1n9m6_381{background:#0f172a;color:#fff}._qtyTrash_1n9m6_400{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_1n9m6_412{display:grid;padding-top:6px}._boxSummaryWindow_1n9m6_417{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_1n9m6_417::-webkit-scrollbar{display:none}._boxSummaryRow_1n9m6_431{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1n9m6_439{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_1n9m6_448{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_1n9m6_448:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_1n9m6_465{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_1n9m6_471{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_1n9m6_477{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_1n9m6_485{cursor:pointer}._boxItemClickable_1n9m6_485:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_1n9m6_494{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_1n9m6_505{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_1n9m6_518{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_1n9m6_530{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_1n9m6_543{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_1n9m6_554{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_1n9m6_562{max-height:80px;opacity:1}._ctaTotalsWrap_1n9m6_567{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_1n9m6_572{opacity:1}._ctaTotals_1n9m6_567{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_1n9m6_587{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_1n9m6_598{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_1n9m6_604{font-weight:700;color:#0f172a}._cta_1n9m6_567{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_1n9m6_567:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_1n9m6_567:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_1n9m6_636{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_1n9m6_642,._ctaDualRight_1n9m6_643{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_1n9m6_642{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_1n9m6_643{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1n9m6_642:disabled,._ctaDualRight_1n9m6_643:disabled{cursor:not-allowed;opacity:.6}._poweredBy_1n9m6_670{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_1n9m6_670 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_1n9m6_2{padding:16px}._variantRow_1n9m6_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_1n9m6_302{justify-self:start}._variantDetailsRow_1n9m6_239{grid-template-columns:1fr}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
import { jsx as s, jsxs as S, Fragment as Xe } from "react/jsx-runtime";
|
|
3
3
|
import Ve, { useState as j, useRef as J, useEffect as V, useCallback as Te, useMemo as k, createContext as St, useContext as Bt, forwardRef as wt, createElement as Ze } from "react";
|
|
4
4
|
const $e = {
|
|
@@ -10,12 +10,12 @@ const $e = {
|
|
|
10
10
|
async function Tt(o) {
|
|
11
11
|
const e = new URL("/api/public/bundle-config", o.apiBaseUrl);
|
|
12
12
|
e.searchParams.set("shop", o.shop), o.configHandle && e.searchParams.set("handle", o.configHandle);
|
|
13
|
-
const
|
|
13
|
+
const i = await (await fetch(e, {
|
|
14
14
|
method: "GET",
|
|
15
15
|
signal: o.signal,
|
|
16
16
|
headers: { "Content-Type": "application/json" }
|
|
17
17
|
})).json().catch(() => null);
|
|
18
|
-
return !
|
|
18
|
+
return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
|
|
19
19
|
}
|
|
20
20
|
const dt = "bb_anonymous_user_id";
|
|
21
21
|
function Le() {
|
|
@@ -43,9 +43,9 @@ function Le() {
|
|
|
43
43
|
async function Oe(o, e, t) {
|
|
44
44
|
if (!(typeof window > "u"))
|
|
45
45
|
try {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
46
|
+
const i = new URL(o, window.location.origin);
|
|
47
|
+
i.searchParams.set("shop", e);
|
|
48
|
+
const a = await fetch(i, {
|
|
49
49
|
method: "POST",
|
|
50
50
|
headers: {
|
|
51
51
|
"Content-Type": "application/json"
|
|
@@ -54,23 +54,23 @@ async function Oe(o, e, t) {
|
|
|
54
54
|
// Don't wait for response - fire and forget
|
|
55
55
|
keepalive: !0
|
|
56
56
|
});
|
|
57
|
-
|
|
58
|
-
`[Bundle Analytics] Event tracking failed with status ${
|
|
59
|
-
await
|
|
57
|
+
a.ok || console.warn(
|
|
58
|
+
`[Bundle Analytics] Event tracking failed with status ${a.status}:`,
|
|
59
|
+
await a.text().catch(() => "Unable to read response")
|
|
60
60
|
);
|
|
61
|
-
} catch (
|
|
62
|
-
console.warn("[Bundle Analytics] Failed to track event:",
|
|
61
|
+
} catch (i) {
|
|
62
|
+
console.warn("[Bundle Analytics] Failed to track event:", i);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const xt = St(null), qe = "#best-bundles";
|
|
66
66
|
function Rt(o) {
|
|
67
67
|
const e = String(o ?? "").trim().toLowerCase();
|
|
68
68
|
if (!e.startsWith(qe)) return null;
|
|
69
69
|
if (e === qe) return "default";
|
|
70
70
|
const t = `${qe}:`;
|
|
71
71
|
if (!e.startsWith(t)) return null;
|
|
72
|
-
const
|
|
73
|
-
return
|
|
72
|
+
const i = e.slice(t.length).trim();
|
|
73
|
+
return i && i.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
|
|
74
74
|
}
|
|
75
75
|
const kt = {
|
|
76
76
|
primaryColor: "--bb-cta-bg",
|
|
@@ -106,16 +106,16 @@ function Pt(o) {
|
|
|
106
106
|
(c = document.getElementById(He)) == null || c.remove();
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""),
|
|
110
|
-
e &&
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
|
|
109
|
+
const e = (o.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (o.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), i = [];
|
|
110
|
+
e && i.push("family=" + ht(e)), t && t !== e && i.push("family=" + ht(t));
|
|
111
|
+
const a = document.getElementById(He);
|
|
112
|
+
if (i.length === 0) {
|
|
113
|
+
a == null || a.remove();
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
const n = `https://fonts.googleapis.com/css2?${
|
|
117
|
-
if (
|
|
118
|
-
|
|
116
|
+
const n = `https://fonts.googleapis.com/css2?${i.join("&")}&display=swap`;
|
|
117
|
+
if (a) {
|
|
118
|
+
a.getAttribute("href") !== n && a.setAttribute("href", n);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
const d = document.createElement("link");
|
|
@@ -125,9 +125,9 @@ function mt(o) {
|
|
|
125
125
|
if (!o) return;
|
|
126
126
|
Pt(o);
|
|
127
127
|
const e = document.documentElement;
|
|
128
|
-
Object.entries(kt).forEach(([t,
|
|
129
|
-
let
|
|
130
|
-
|
|
128
|
+
Object.entries(kt).forEach(([t, i]) => {
|
|
129
|
+
let a = o[t];
|
|
130
|
+
a && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(a) && !/^["']/.test(a.trim()) && (a = `"${a.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(i, a));
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
function ft(o) {
|
|
@@ -146,30 +146,30 @@ function Ot() {
|
|
|
146
146
|
function pt(o) {
|
|
147
147
|
return Number.isFinite(o) ? Math.max(0, Math.floor(o)) : 0;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Fi(o) {
|
|
150
150
|
const {
|
|
151
151
|
apiBaseUrl: e,
|
|
152
152
|
shop: t,
|
|
153
|
-
cartAdapter:
|
|
154
|
-
configHandle:
|
|
153
|
+
cartAdapter: i,
|
|
154
|
+
configHandle: a = "default",
|
|
155
155
|
initialData: n,
|
|
156
156
|
configFetcher: d,
|
|
157
157
|
analyticsEndpoint: c,
|
|
158
158
|
allowDrawerWhenInactive: I = !1,
|
|
159
159
|
children: G
|
|
160
|
-
} = o,
|
|
160
|
+
} = o, g = c ?? `${e}/api/public/bundle-analytics`, [A, P] = j(!1), [z, H] = j(!n), [te, ne] = j(!1), [L, Q] = j(null), [ee, ue] = j((n == null ? void 0 : n.currencyCode) ?? null), [w, D] = j((n == null ? void 0 : n.config) ?? null), [W, Y] = j(
|
|
161
161
|
(n == null ? void 0 : n.eligibleVariants) ?? []
|
|
162
162
|
), [de, Ce] = j(
|
|
163
163
|
() => ({ selections: {}, order: [] })
|
|
164
164
|
), Ne = J(null);
|
|
165
165
|
V(() => {
|
|
166
|
-
var
|
|
166
|
+
var x;
|
|
167
167
|
if (n) return;
|
|
168
|
-
(
|
|
169
|
-
const
|
|
170
|
-
Ne.current =
|
|
168
|
+
(x = Ne.current) == null || x.abort();
|
|
169
|
+
const r = new AbortController();
|
|
170
|
+
Ne.current = r;
|
|
171
171
|
const _ = d ?? Tt;
|
|
172
|
-
return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle:
|
|
172
|
+
return H(!0), Q(null), _({ apiBaseUrl: e, shop: t, configHandle: a, signal: r.signal }).then((b) => {
|
|
173
173
|
if (!b.ok) {
|
|
174
174
|
Q(b.error || "Failed to load bundle config."), D(null), Y([]), ue(null);
|
|
175
175
|
return;
|
|
@@ -196,128 +196,128 @@ function Fr(o) {
|
|
|
196
196
|
}).finally(() => {
|
|
197
197
|
const b = typeof window < "u" ? window : null;
|
|
198
198
|
b != null && b.__BUNDLE_PREVIEW_CONFIG__ || H(!1);
|
|
199
|
-
}), () =>
|
|
200
|
-
}, [e, t,
|
|
201
|
-
const
|
|
202
|
-
|
|
199
|
+
}), () => r.abort();
|
|
200
|
+
}, [e, t, a, n, d]), V(() => {
|
|
201
|
+
const r = ft(w == null ? void 0 : w.styleSettings);
|
|
202
|
+
r && mt(r);
|
|
203
203
|
}, [w == null ? void 0 : w.styleSettings]), V(() => {
|
|
204
204
|
if (typeof window > "u") return;
|
|
205
|
-
const
|
|
205
|
+
const r = () => {
|
|
206
206
|
const _ = ft(void 0);
|
|
207
207
|
_ && mt(_);
|
|
208
208
|
};
|
|
209
|
-
return window.addEventListener("bundle-preview-styles-updated",
|
|
209
|
+
return window.addEventListener("bundle-preview-styles-updated", r), () => window.removeEventListener("bundle-preview-styles-updated", r);
|
|
210
210
|
}, []), V(() => {
|
|
211
211
|
if (typeof window > "u") return;
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
if (!
|
|
215
|
-
const b =
|
|
216
|
-
H(b), D(
|
|
217
|
-
const y =
|
|
212
|
+
const r = window, _ = () => {
|
|
213
|
+
const x = r.__BUNDLE_PREVIEW_CONFIG__;
|
|
214
|
+
if (!x) return;
|
|
215
|
+
const b = r.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
|
|
216
|
+
H(b), D(x);
|
|
217
|
+
const y = r.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__;
|
|
218
218
|
y ? Y(y) : b || Y((R) => {
|
|
219
|
-
const U = new Set(
|
|
219
|
+
const U = new Set(x.eligibleVariantIds ?? []);
|
|
220
220
|
return U.size === 0 || R.length === 0 ? R : R.filter((B) => U.has(B.id));
|
|
221
221
|
});
|
|
222
222
|
};
|
|
223
|
-
return
|
|
223
|
+
return r.__BUNDLE_PREVIEW_CONFIG__ && _(), window.addEventListener("bundle-preview-config-updated", _), () => window.removeEventListener("bundle-preview-config-updated", _);
|
|
224
224
|
}, []);
|
|
225
|
-
const
|
|
226
|
-
if (!(!I && w != null && !w.isActive) && (P(!0),
|
|
225
|
+
const ae = Te(() => {
|
|
226
|
+
if (!(!I && w != null && !w.isActive) && (P(!0), g))
|
|
227
227
|
try {
|
|
228
|
-
const
|
|
229
|
-
Oe(
|
|
228
|
+
const r = Le();
|
|
229
|
+
Oe(g, t, {
|
|
230
230
|
eventType: "DRAWER_OPENED",
|
|
231
231
|
shop: t,
|
|
232
|
-
anonymousUserId:
|
|
232
|
+
anonymousUserId: r,
|
|
233
233
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
234
234
|
mixpanelEvent: "bundle_opened"
|
|
235
235
|
}).catch((_) => {
|
|
236
236
|
console.warn("[Bundle Analytics] Failed to track drawer opened:", _);
|
|
237
237
|
});
|
|
238
|
-
} catch (
|
|
239
|
-
console.warn("[Bundle Analytics] Error in open() callback:",
|
|
238
|
+
} catch (r) {
|
|
239
|
+
console.warn("[Bundle Analytics] Error in open() callback:", r);
|
|
240
240
|
}
|
|
241
|
-
}, [
|
|
242
|
-
if (
|
|
241
|
+
}, [g, t, w, I]), oe = Te(() => {
|
|
242
|
+
if (g)
|
|
243
243
|
try {
|
|
244
|
-
const
|
|
245
|
-
Oe(
|
|
244
|
+
const r = Le();
|
|
245
|
+
Oe(g, t, {
|
|
246
246
|
eventType: "DRAWER_CLOSED",
|
|
247
247
|
shop: t,
|
|
248
|
-
anonymousUserId:
|
|
248
|
+
anonymousUserId: r,
|
|
249
249
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
250
250
|
mixpanelEvent: "bundle_closed"
|
|
251
251
|
}).catch((_) => {
|
|
252
252
|
console.warn("[Bundle Analytics] Failed to track drawer closed:", _);
|
|
253
253
|
});
|
|
254
|
-
} catch (
|
|
255
|
-
console.warn("[Bundle Analytics] Error in close() callback:",
|
|
254
|
+
} catch (r) {
|
|
255
|
+
console.warn("[Bundle Analytics] Error in close() callback:", r);
|
|
256
256
|
}
|
|
257
257
|
P(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(qe) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
258
|
-
}, [
|
|
258
|
+
}, [g, t]);
|
|
259
259
|
V(() => {
|
|
260
260
|
if (typeof window > "u") return;
|
|
261
|
-
const
|
|
261
|
+
const r = () => {
|
|
262
262
|
const _ = Rt(window.location.hash);
|
|
263
|
-
_ && (_ === "default" || _ ===
|
|
263
|
+
_ && (_ === "default" || _ === a) && ae();
|
|
264
264
|
};
|
|
265
|
-
return
|
|
266
|
-
}, [
|
|
265
|
+
return r(), window.addEventListener("hashchange", r), () => window.removeEventListener("hashchange", r);
|
|
266
|
+
}, [ae, a]);
|
|
267
267
|
const we = Te(() => {
|
|
268
|
-
!I && !A && w != null && !w.isActive || P((
|
|
269
|
-
if (
|
|
268
|
+
!I && !A && w != null && !w.isActive || P((r) => {
|
|
269
|
+
if (r)
|
|
270
270
|
oe();
|
|
271
|
-
else if (
|
|
271
|
+
else if (g)
|
|
272
272
|
try {
|
|
273
273
|
const _ = Le();
|
|
274
|
-
Oe(
|
|
274
|
+
Oe(g, t, {
|
|
275
275
|
eventType: "DRAWER_OPENED",
|
|
276
276
|
shop: t,
|
|
277
277
|
anonymousUserId: _,
|
|
278
278
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
279
279
|
mixpanelEvent: "bundle_opened"
|
|
280
|
-
}).catch((
|
|
281
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
280
|
+
}).catch((x) => {
|
|
281
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", x);
|
|
282
282
|
});
|
|
283
283
|
} catch (_) {
|
|
284
284
|
console.warn("[Bundle Analytics] Error in toggle() callback:", _);
|
|
285
285
|
}
|
|
286
|
-
return !
|
|
286
|
+
return !r;
|
|
287
287
|
});
|
|
288
|
-
}, [
|
|
288
|
+
}, [g, t, oe, w, A, I]);
|
|
289
289
|
V(() => {
|
|
290
290
|
!I && (w == null ? void 0 : w.isActive) === !1 && A && oe();
|
|
291
291
|
}, [I, w == null ? void 0 : w.isActive, A, oe]);
|
|
292
|
-
const
|
|
293
|
-
const
|
|
292
|
+
const xe = k(() => {
|
|
293
|
+
const r = Number((w == null ? void 0 : w.maxBundleSize) ?? NaN), _ = Number.isFinite(r) ? Math.floor(r) : 100;
|
|
294
294
|
return Math.max(2, Math.min(100, _));
|
|
295
295
|
}, [w == null ? void 0 : w.maxBundleSize]), X = k(() => new Set(
|
|
296
|
-
W.filter((
|
|
296
|
+
W.filter((r) => r.availableForSale !== !1).map((r) => r.id)
|
|
297
297
|
), [W]), se = k(() => {
|
|
298
|
-
const
|
|
299
|
-
return y == null ?
|
|
300
|
-
}, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), ke = Te((
|
|
301
|
-
if (!X.has(
|
|
298
|
+
const r = (w == null ? void 0 : w.rules) ?? [], _ = r.length ? Math.min(...r.map((R) => R.minBundleSize)) : 2, x = Number.isFinite(_) && _ > 0 ? _ : 2, b = Number((w == null ? void 0 : w.minBundleSize) ?? NaN), y = Number.isFinite(b) && Number.isInteger(b) ? Math.max(2, Math.min(100, b)) : null;
|
|
299
|
+
return y == null ? x : Math.min(x, y);
|
|
300
|
+
}, [w == null ? void 0 : w.minBundleSize, w == null ? void 0 : w.rules]), ke = Te((r, _) => {
|
|
301
|
+
if (!X.has(r) && !z)
|
|
302
302
|
return;
|
|
303
|
-
const
|
|
303
|
+
const x = pt(_);
|
|
304
304
|
Ce((b) => {
|
|
305
|
-
const y = b.selections[
|
|
305
|
+
const y = b.selections[r] ?? 0, R = x - y, U = Object.values(b.selections).reduce((ie, O) => ie + (O || 0), 0), B = R > 0 ? Math.min(R, Math.max(0, xe - U)) : R, E = y + B;
|
|
306
306
|
let K;
|
|
307
307
|
if (E <= 0) {
|
|
308
|
-
const { [
|
|
308
|
+
const { [r]: ie, ...O } = b.selections;
|
|
309
309
|
K = O;
|
|
310
|
-
} else y === E ? K = b.selections : K = { ...b.selections, [
|
|
310
|
+
} else y === E ? K = b.selections : K = { ...b.selections, [r]: E };
|
|
311
311
|
let _e = b.order;
|
|
312
312
|
if (B > 0)
|
|
313
|
-
_e = [...b.order, ...Array.from({ length: B }, () =>
|
|
313
|
+
_e = [...b.order, ...Array.from({ length: B }, () => r)];
|
|
314
314
|
else if (B < 0) {
|
|
315
|
-
let
|
|
315
|
+
let ie = -B;
|
|
316
316
|
const O = [];
|
|
317
317
|
for (let q = b.order.length - 1; q >= 0; q--) {
|
|
318
318
|
const T = b.order[q];
|
|
319
|
-
if (T ===
|
|
320
|
-
|
|
319
|
+
if (T === r && ie > 0) {
|
|
320
|
+
ie--;
|
|
321
321
|
continue;
|
|
322
322
|
}
|
|
323
323
|
O.push(T);
|
|
@@ -325,21 +325,21 @@ function Fr(o) {
|
|
|
325
325
|
O.reverse(), _e = O;
|
|
326
326
|
}
|
|
327
327
|
if (K === b.selections && _e === b.order) return b;
|
|
328
|
-
const be = U, Se = Object.values(K).reduce((
|
|
329
|
-
if (
|
|
328
|
+
const be = U, Se = Object.values(K).reduce((ie, O) => ie + (O || 0), 0);
|
|
329
|
+
if (g)
|
|
330
330
|
try {
|
|
331
|
-
const
|
|
331
|
+
const ie = Le(), O = {
|
|
332
332
|
eventType: "VARIANT_SELECTION_CHANGED",
|
|
333
333
|
shop: t,
|
|
334
|
-
anonymousUserId:
|
|
334
|
+
anonymousUserId: ie,
|
|
335
335
|
before: { ...b.selections },
|
|
336
336
|
after: { ...K },
|
|
337
337
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
338
338
|
};
|
|
339
|
-
Oe(
|
|
339
|
+
Oe(g, t, O), be === 0 && Se >= 1 && Oe(g, t, {
|
|
340
340
|
...O,
|
|
341
341
|
mixpanelEvent: "bundle_started"
|
|
342
|
-
}), be < se && Se >= se && Oe(
|
|
342
|
+
}), be < se && Se >= se && Oe(g, t, {
|
|
343
343
|
...O,
|
|
344
344
|
mixpanelEvent: "bundle_completed"
|
|
345
345
|
});
|
|
@@ -347,26 +347,26 @@ function Fr(o) {
|
|
|
347
347
|
}
|
|
348
348
|
return { selections: K, order: _e };
|
|
349
349
|
});
|
|
350
|
-
}, [
|
|
350
|
+
}, [xe, se, X, g, t, z]);
|
|
351
351
|
V(() => {
|
|
352
|
-
z || Ce((
|
|
353
|
-
const _ = Object.entries(
|
|
352
|
+
z || Ce((r) => {
|
|
353
|
+
const _ = Object.entries(r.selections).filter(
|
|
354
354
|
([y]) => X.has(y)
|
|
355
|
-
),
|
|
356
|
-
return b.length ===
|
|
355
|
+
), x = Object.fromEntries(_), b = r.order.filter((y) => X.has(y));
|
|
356
|
+
return b.length === r.order.length && _.length === Object.keys(r.selections).length ? r : { selections: x, order: b };
|
|
357
357
|
});
|
|
358
358
|
}, [z, X]);
|
|
359
|
-
const
|
|
359
|
+
const ge = Te(() => Ce({ selections: {}, order: [] }), []), he = de.selections, ye = de.order, me = k(() => Object.values(he).reduce((r, _) => r + (_ || 0), 0), [he]), fe = k(() => !(z || te || L || !(w != null && w.isActive) || me < se), [me, w == null ? void 0 : w.isActive, L, z, se, te]), pe = Te(async (r) => {
|
|
360
360
|
var O, q;
|
|
361
361
|
if (!fe || !w) return;
|
|
362
|
-
const _ = Ot(),
|
|
362
|
+
const _ = Ot(), x = (w.title ?? "").trim().slice(0, 255), b = Object.entries(he).map(([T, Z]) => ({ merchandiseId: T, quantity: pt(Z) })).filter((T) => T.quantity > 0).filter((T) => X.has(T.merchandiseId)).map((T) => ({
|
|
363
363
|
merchandiseId: T.merchandiseId,
|
|
364
364
|
quantity: T.quantity,
|
|
365
365
|
attributes: [
|
|
366
366
|
{ key: $e.bundleId, value: _ },
|
|
367
|
-
{ key: $e.bundleConfig, value:
|
|
367
|
+
{ key: $e.bundleConfig, value: a },
|
|
368
368
|
{ key: $e.bundleSource, value: "bundle_builder" },
|
|
369
|
-
...
|
|
369
|
+
...x ? [{ key: $e.bundleTitle, value: x }] : []
|
|
370
370
|
]
|
|
371
371
|
}));
|
|
372
372
|
if (!b.length) return;
|
|
@@ -386,13 +386,13 @@ function Fr(o) {
|
|
|
386
386
|
const E = B ? (() => {
|
|
387
387
|
const T = Number.parseFloat(B.discountPercent);
|
|
388
388
|
return Number.isFinite(T) && T > 0 ? T : null;
|
|
389
|
-
})() : null, K = E ? Math.round(R * (1 - E / 100) * 100) / 100 : R, _e = R - K, be = b.map((T) => T.merchandiseId), Se = (B == null ? void 0 : B.handle) ?? "",
|
|
389
|
+
})() : null, K = E ? Math.round(R * (1 - E / 100) * 100) / 100 : R, _e = R - K, be = b.map((T) => T.merchandiseId), Se = (B == null ? void 0 : B.handle) ?? "", ie = ((O = B == null ? void 0 : B.label) == null ? void 0 : O.trim()) || "";
|
|
390
390
|
ne(!0);
|
|
391
391
|
try {
|
|
392
|
-
if (
|
|
392
|
+
if (r != null && r.checkout ? await i.linesAddForCheckout(b) : await i.linesAdd(b), g)
|
|
393
393
|
try {
|
|
394
|
-
const T = Le(), Z = !!(
|
|
395
|
-
Oe(
|
|
394
|
+
const T = Le(), Z = !!(r != null && r.checkout);
|
|
395
|
+
Oe(g, t, {
|
|
396
396
|
eventType: "BUNDLE_ADDED_TO_BASKET",
|
|
397
397
|
shop: t,
|
|
398
398
|
anonymousUserId: T,
|
|
@@ -402,7 +402,7 @@ function Fr(o) {
|
|
|
402
402
|
discountedPrice: K,
|
|
403
403
|
currency: ee ?? void 0,
|
|
404
404
|
discountThresholdIdentifier: Se,
|
|
405
|
-
discountLabel:
|
|
405
|
+
discountLabel: ie,
|
|
406
406
|
discountPercentage: E,
|
|
407
407
|
discountedAmount: _e,
|
|
408
408
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -411,47 +411,47 @@ function Fr(o) {
|
|
|
411
411
|
});
|
|
412
412
|
} catch {
|
|
413
413
|
}
|
|
414
|
-
|
|
414
|
+
ge(), oe(), (q = r == null ? void 0 : r.onComplete) == null || q.call(r);
|
|
415
415
|
} finally {
|
|
416
416
|
ne(!1);
|
|
417
417
|
}
|
|
418
418
|
}, [
|
|
419
419
|
fe,
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
i,
|
|
421
|
+
ge,
|
|
422
422
|
oe,
|
|
423
423
|
w,
|
|
424
|
-
|
|
424
|
+
a,
|
|
425
425
|
ee,
|
|
426
426
|
he,
|
|
427
427
|
X,
|
|
428
428
|
W,
|
|
429
429
|
me,
|
|
430
|
-
|
|
430
|
+
g,
|
|
431
431
|
t
|
|
432
432
|
]), le = Te(async () => {
|
|
433
433
|
await pe(
|
|
434
434
|
{
|
|
435
435
|
onComplete: () => {
|
|
436
|
-
var
|
|
437
|
-
(
|
|
436
|
+
var r;
|
|
437
|
+
(r = i.openCartUI) == null || r.call(i);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
);
|
|
441
|
-
}, [pe,
|
|
441
|
+
}, [pe, i]), m = Te(async () => {
|
|
442
442
|
await pe(
|
|
443
443
|
{
|
|
444
444
|
checkout: !0,
|
|
445
445
|
onComplete: () => {
|
|
446
|
-
var
|
|
447
|
-
(
|
|
446
|
+
var r;
|
|
447
|
+
(r = i.navigateToCheckout) == null || r.call(i);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
);
|
|
451
|
-
}, [pe,
|
|
451
|
+
}, [pe, i]), p = k(
|
|
452
452
|
() => ({
|
|
453
453
|
isOpen: A,
|
|
454
|
-
open:
|
|
454
|
+
open: ae,
|
|
455
455
|
close: oe,
|
|
456
456
|
toggle: we,
|
|
457
457
|
loading: z,
|
|
@@ -463,7 +463,7 @@ function Fr(o) {
|
|
|
463
463
|
selections: he,
|
|
464
464
|
selectionOrder: ye,
|
|
465
465
|
setQuantity: ke,
|
|
466
|
-
clearSelections:
|
|
466
|
+
clearSelections: ge,
|
|
467
467
|
bundleSize: me,
|
|
468
468
|
minRequired: se,
|
|
469
469
|
canSubmit: fe,
|
|
@@ -472,7 +472,7 @@ function Fr(o) {
|
|
|
472
472
|
}),
|
|
473
473
|
[
|
|
474
474
|
A,
|
|
475
|
-
|
|
475
|
+
ae,
|
|
476
476
|
oe,
|
|
477
477
|
we,
|
|
478
478
|
z,
|
|
@@ -484,7 +484,7 @@ function Fr(o) {
|
|
|
484
484
|
he,
|
|
485
485
|
ye,
|
|
486
486
|
ke,
|
|
487
|
-
|
|
487
|
+
ge,
|
|
488
488
|
me,
|
|
489
489
|
se,
|
|
490
490
|
fe,
|
|
@@ -492,22 +492,22 @@ function Fr(o) {
|
|
|
492
492
|
m
|
|
493
493
|
]
|
|
494
494
|
);
|
|
495
|
-
return /* @__PURE__ */ s(
|
|
495
|
+
return /* @__PURE__ */ s(xt.Provider, { value: p, children: G });
|
|
496
496
|
}
|
|
497
497
|
function ze() {
|
|
498
|
-
const o = Bt(
|
|
498
|
+
const o = Bt(xt);
|
|
499
499
|
if (!o)
|
|
500
500
|
throw new Error("useBundleBuilder must be used within <BundleProvider />");
|
|
501
501
|
return o;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
504
|
-
const { isOpen: o, open: e, close: t, toggle:
|
|
505
|
-
return { isOpen: o, open: e, close: t, toggle:
|
|
503
|
+
function Ai() {
|
|
504
|
+
const { isOpen: o, open: e, close: t, toggle: i } = ze();
|
|
505
|
+
return { isOpen: o, open: e, close: t, toggle: i };
|
|
506
506
|
}
|
|
507
507
|
const Mt = "_button_18rtl_1", Ft = {
|
|
508
508
|
button: Mt
|
|
509
509
|
};
|
|
510
|
-
function
|
|
510
|
+
function Li(o) {
|
|
511
511
|
const { toggle: e } = ze();
|
|
512
512
|
return /* @__PURE__ */ s(
|
|
513
513
|
"button",
|
|
@@ -524,129 +524,129 @@ function At() {
|
|
|
524
524
|
if (_t) return Qe;
|
|
525
525
|
_t = 1;
|
|
526
526
|
var o = {
|
|
527
|
-
linear: function(e, t,
|
|
528
|
-
var n =
|
|
529
|
-
return n * e /
|
|
527
|
+
linear: function(e, t, i, a) {
|
|
528
|
+
var n = i - t;
|
|
529
|
+
return n * e / a + t;
|
|
530
530
|
},
|
|
531
|
-
easeInQuad: function(e, t,
|
|
532
|
-
var n =
|
|
533
|
-
return n * (e /=
|
|
531
|
+
easeInQuad: function(e, t, i, a) {
|
|
532
|
+
var n = i - t;
|
|
533
|
+
return n * (e /= a) * e + t;
|
|
534
534
|
},
|
|
535
|
-
easeOutQuad: function(e, t,
|
|
536
|
-
var n =
|
|
537
|
-
return -n * (e /=
|
|
535
|
+
easeOutQuad: function(e, t, i, a) {
|
|
536
|
+
var n = i - t;
|
|
537
|
+
return -n * (e /= a) * (e - 2) + t;
|
|
538
538
|
},
|
|
539
|
-
easeInOutQuad: function(e, t,
|
|
540
|
-
var n =
|
|
541
|
-
return (e /=
|
|
539
|
+
easeInOutQuad: function(e, t, i, a) {
|
|
540
|
+
var n = i - t;
|
|
541
|
+
return (e /= a / 2) < 1 ? n / 2 * e * e + t : -n / 2 * (--e * (e - 2) - 1) + t;
|
|
542
542
|
},
|
|
543
|
-
easeInCubic: function(e, t,
|
|
544
|
-
var n =
|
|
545
|
-
return n * (e /=
|
|
543
|
+
easeInCubic: function(e, t, i, a) {
|
|
544
|
+
var n = i - t;
|
|
545
|
+
return n * (e /= a) * e * e + t;
|
|
546
546
|
},
|
|
547
|
-
easeOutCubic: function(e, t,
|
|
548
|
-
var n =
|
|
549
|
-
return n * ((e = e /
|
|
547
|
+
easeOutCubic: function(e, t, i, a) {
|
|
548
|
+
var n = i - t;
|
|
549
|
+
return n * ((e = e / a - 1) * e * e + 1) + t;
|
|
550
550
|
},
|
|
551
|
-
easeInOutCubic: function(e, t,
|
|
552
|
-
var n =
|
|
553
|
-
return (e /=
|
|
551
|
+
easeInOutCubic: function(e, t, i, a) {
|
|
552
|
+
var n = i - t;
|
|
553
|
+
return (e /= a / 2) < 1 ? n / 2 * e * e * e + t : n / 2 * ((e -= 2) * e * e + 2) + t;
|
|
554
554
|
},
|
|
555
|
-
easeInQuart: function(e, t,
|
|
556
|
-
var n =
|
|
557
|
-
return n * (e /=
|
|
555
|
+
easeInQuart: function(e, t, i, a) {
|
|
556
|
+
var n = i - t;
|
|
557
|
+
return n * (e /= a) * e * e * e + t;
|
|
558
558
|
},
|
|
559
|
-
easeOutQuart: function(e, t,
|
|
560
|
-
var n =
|
|
561
|
-
return -n * ((e = e /
|
|
559
|
+
easeOutQuart: function(e, t, i, a) {
|
|
560
|
+
var n = i - t;
|
|
561
|
+
return -n * ((e = e / a - 1) * e * e * e - 1) + t;
|
|
562
562
|
},
|
|
563
|
-
easeInOutQuart: function(e, t,
|
|
564
|
-
var n =
|
|
565
|
-
return (e /=
|
|
563
|
+
easeInOutQuart: function(e, t, i, a) {
|
|
564
|
+
var n = i - t;
|
|
565
|
+
return (e /= a / 2) < 1 ? n / 2 * e * e * e * e + t : -n / 2 * ((e -= 2) * e * e * e - 2) + t;
|
|
566
566
|
},
|
|
567
|
-
easeInQuint: function(e, t,
|
|
568
|
-
var n =
|
|
569
|
-
return n * (e /=
|
|
567
|
+
easeInQuint: function(e, t, i, a) {
|
|
568
|
+
var n = i - t;
|
|
569
|
+
return n * (e /= a) * e * e * e * e + t;
|
|
570
570
|
},
|
|
571
|
-
easeOutQuint: function(e, t,
|
|
572
|
-
var n =
|
|
573
|
-
return n * ((e = e /
|
|
571
|
+
easeOutQuint: function(e, t, i, a) {
|
|
572
|
+
var n = i - t;
|
|
573
|
+
return n * ((e = e / a - 1) * e * e * e * e + 1) + t;
|
|
574
574
|
},
|
|
575
|
-
easeInOutQuint: function(e, t,
|
|
576
|
-
var n =
|
|
577
|
-
return (e /=
|
|
575
|
+
easeInOutQuint: function(e, t, i, a) {
|
|
576
|
+
var n = i - t;
|
|
577
|
+
return (e /= a / 2) < 1 ? n / 2 * e * e * e * e * e + t : n / 2 * ((e -= 2) * e * e * e * e + 2) + t;
|
|
578
578
|
},
|
|
579
|
-
easeInSine: function(e, t,
|
|
580
|
-
var n =
|
|
581
|
-
return -n * Math.cos(e /
|
|
579
|
+
easeInSine: function(e, t, i, a) {
|
|
580
|
+
var n = i - t;
|
|
581
|
+
return -n * Math.cos(e / a * (Math.PI / 2)) + n + t;
|
|
582
582
|
},
|
|
583
|
-
easeOutSine: function(e, t,
|
|
584
|
-
var n =
|
|
585
|
-
return n * Math.sin(e /
|
|
583
|
+
easeOutSine: function(e, t, i, a) {
|
|
584
|
+
var n = i - t;
|
|
585
|
+
return n * Math.sin(e / a * (Math.PI / 2)) + t;
|
|
586
586
|
},
|
|
587
|
-
easeInOutSine: function(e, t,
|
|
588
|
-
var n =
|
|
589
|
-
return -n / 2 * (Math.cos(Math.PI * e /
|
|
587
|
+
easeInOutSine: function(e, t, i, a) {
|
|
588
|
+
var n = i - t;
|
|
589
|
+
return -n / 2 * (Math.cos(Math.PI * e / a) - 1) + t;
|
|
590
590
|
},
|
|
591
|
-
easeInExpo: function(e, t,
|
|
592
|
-
var n =
|
|
593
|
-
return e == 0 ? t : n * Math.pow(2, 10 * (e /
|
|
591
|
+
easeInExpo: function(e, t, i, a) {
|
|
592
|
+
var n = i - t;
|
|
593
|
+
return e == 0 ? t : n * Math.pow(2, 10 * (e / a - 1)) + t;
|
|
594
594
|
},
|
|
595
|
-
easeOutExpo: function(e, t,
|
|
596
|
-
var n =
|
|
597
|
-
return e ==
|
|
595
|
+
easeOutExpo: function(e, t, i, a) {
|
|
596
|
+
var n = i - t;
|
|
597
|
+
return e == a ? t + n : n * (-Math.pow(2, -10 * e / a) + 1) + t;
|
|
598
598
|
},
|
|
599
|
-
easeInOutExpo: function(e, t,
|
|
600
|
-
var n =
|
|
601
|
-
return e === 0 ? t : e ===
|
|
599
|
+
easeInOutExpo: function(e, t, i, a) {
|
|
600
|
+
var n = i - t;
|
|
601
|
+
return e === 0 ? t : e === a ? t + n : (e /= a / 2) < 1 ? n / 2 * Math.pow(2, 10 * (e - 1)) + t : n / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
|
|
602
602
|
},
|
|
603
|
-
easeInCirc: function(e, t,
|
|
604
|
-
var n =
|
|
605
|
-
return -n * (Math.sqrt(1 - (e /=
|
|
603
|
+
easeInCirc: function(e, t, i, a) {
|
|
604
|
+
var n = i - t;
|
|
605
|
+
return -n * (Math.sqrt(1 - (e /= a) * e) - 1) + t;
|
|
606
606
|
},
|
|
607
|
-
easeOutCirc: function(e, t,
|
|
608
|
-
var n =
|
|
609
|
-
return n * Math.sqrt(1 - (e = e /
|
|
607
|
+
easeOutCirc: function(e, t, i, a) {
|
|
608
|
+
var n = i - t;
|
|
609
|
+
return n * Math.sqrt(1 - (e = e / a - 1) * e) + t;
|
|
610
610
|
},
|
|
611
|
-
easeInOutCirc: function(e, t,
|
|
612
|
-
var n =
|
|
613
|
-
return (e /=
|
|
611
|
+
easeInOutCirc: function(e, t, i, a) {
|
|
612
|
+
var n = i - t;
|
|
613
|
+
return (e /= a / 2) < 1 ? -n / 2 * (Math.sqrt(1 - e * e) - 1) + t : n / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
|
|
614
614
|
},
|
|
615
|
-
easeInElastic: function(e, t,
|
|
616
|
-
var n =
|
|
617
|
-
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /=
|
|
615
|
+
easeInElastic: function(e, t, i, a) {
|
|
616
|
+
var n = i - t, d, c, I;
|
|
617
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= a) === 1 ? t + n : (c || (c = a * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), -(d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * a - I) * (2 * Math.PI) / c)) + t);
|
|
618
618
|
},
|
|
619
|
-
easeOutElastic: function(e, t,
|
|
620
|
-
var n =
|
|
621
|
-
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /=
|
|
619
|
+
easeOutElastic: function(e, t, i, a) {
|
|
620
|
+
var n = i - t, d, c, I;
|
|
621
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= a) === 1 ? t + n : (c || (c = a * 0.3), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), d * Math.pow(2, -10 * e) * Math.sin((e * a - I) * (2 * Math.PI) / c) + n + t);
|
|
622
622
|
},
|
|
623
|
-
easeInOutElastic: function(e, t,
|
|
624
|
-
var n =
|
|
625
|
-
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /=
|
|
623
|
+
easeInOutElastic: function(e, t, i, a) {
|
|
624
|
+
var n = i - t, d, c, I;
|
|
625
|
+
return I = 1.70158, c = 0, d = n, e === 0 ? t : (e /= a / 2) === 2 ? t + n : (c || (c = a * (0.3 * 1.5)), d < Math.abs(n) ? (d = n, I = c / 4) : I = c / (2 * Math.PI) * Math.asin(n / d), e < 1 ? -0.5 * (d * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * a - I) * (2 * Math.PI) / c)) + t : d * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * a - I) * (2 * Math.PI) / c) * 0.5 + n + t);
|
|
626
626
|
},
|
|
627
|
-
easeInBack: function(e, t,
|
|
628
|
-
var d =
|
|
629
|
-
return n === void 0 && (n = 1.70158), d * (e /=
|
|
627
|
+
easeInBack: function(e, t, i, a, n) {
|
|
628
|
+
var d = i - t;
|
|
629
|
+
return n === void 0 && (n = 1.70158), d * (e /= a) * e * ((n + 1) * e - n) + t;
|
|
630
630
|
},
|
|
631
|
-
easeOutBack: function(e, t,
|
|
632
|
-
var d =
|
|
633
|
-
return n === void 0 && (n = 1.70158), d * ((e = e /
|
|
631
|
+
easeOutBack: function(e, t, i, a, n) {
|
|
632
|
+
var d = i - t;
|
|
633
|
+
return n === void 0 && (n = 1.70158), d * ((e = e / a - 1) * e * ((n + 1) * e + n) + 1) + t;
|
|
634
634
|
},
|
|
635
|
-
easeInOutBack: function(e, t,
|
|
636
|
-
var d =
|
|
637
|
-
return n === void 0 && (n = 1.70158), (e /=
|
|
635
|
+
easeInOutBack: function(e, t, i, a, n) {
|
|
636
|
+
var d = i - t;
|
|
637
|
+
return n === void 0 && (n = 1.70158), (e /= a / 2) < 1 ? d / 2 * (e * e * (((n *= 1.525) + 1) * e - n)) + t : d / 2 * ((e -= 2) * e * (((n *= 1.525) + 1) * e + n) + 2) + t;
|
|
638
638
|
},
|
|
639
|
-
easeInBounce: function(e, t,
|
|
640
|
-
var n =
|
|
641
|
-
return d = o.easeOutBounce(
|
|
639
|
+
easeInBounce: function(e, t, i, a) {
|
|
640
|
+
var n = i - t, d;
|
|
641
|
+
return d = o.easeOutBounce(a - e, 0, n, a), n - d + t;
|
|
642
642
|
},
|
|
643
|
-
easeOutBounce: function(e, t,
|
|
644
|
-
var n =
|
|
645
|
-
return (e /=
|
|
643
|
+
easeOutBounce: function(e, t, i, a) {
|
|
644
|
+
var n = i - t;
|
|
645
|
+
return (e /= a) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
|
|
646
646
|
},
|
|
647
|
-
easeInOutBounce: function(e, t,
|
|
648
|
-
var n =
|
|
649
|
-
return e <
|
|
647
|
+
easeInOutBounce: function(e, t, i, a) {
|
|
648
|
+
var n = i - t, d;
|
|
649
|
+
return e < a / 2 ? (d = o.easeInBounce(e * 2, 0, n, a), d * 0.5 + t) : (d = o.easeOutBounce(e * 2 - a, 0, n, a), d * 0.5 + n * 0.5 + t);
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
652
|
return Qe = o, Qe;
|
|
@@ -655,7 +655,7 @@ var Lt = At();
|
|
|
655
655
|
function Dt(o) {
|
|
656
656
|
return o * Math.PI / 180;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function re(o, e) {
|
|
659
659
|
return o + Math.random() * (e - o);
|
|
660
660
|
}
|
|
661
661
|
function $t(o, e) {
|
|
@@ -671,14 +671,14 @@ var Re;
|
|
|
671
671
|
})(Re || (Re = {}));
|
|
672
672
|
const Et = 1e3 / 60;
|
|
673
673
|
class qt {
|
|
674
|
-
constructor(e, t,
|
|
674
|
+
constructor(e, t, i, a) {
|
|
675
675
|
this.getOptions = t;
|
|
676
676
|
const { colors: n, initialVelocityX: d, initialVelocityY: c } = this.getOptions();
|
|
677
|
-
this.context = e, this.x =
|
|
677
|
+
this.context = e, this.x = i, this.y = a, this.w = re(5, 20), this.h = re(5, 20), this.radius = re(5, 10), this.vx = typeof d == "number" ? re(-d, d) : re(d.min, d.max), this.vy = typeof c == "number" ? re(-c, 0) : re(c.min, c.max), this.shape = $t(0, 2), this.angle = Dt(re(0, 360)), this.angularSpin = re(-0.2, 0.2), this.color = n[Math.floor(Math.random() * n.length)], this.rotateY = re(0, 1), this.rotationDirection = re(0, 1) ? Re.Positive : Re.Negative;
|
|
678
678
|
}
|
|
679
679
|
update(e) {
|
|
680
|
-
const { gravity: t, wind:
|
|
681
|
-
this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx +=
|
|
680
|
+
const { gravity: t, wind: i, friction: a, opacity: n, drawShape: d } = this.getOptions(), c = e / Et;
|
|
681
|
+
this.x += this.vx * c, this.y += this.vy * c, this.vy += t * c, this.vx += i * c, this.vx *= a ** c, this.vy *= a ** c, this.rotateY >= 1 && this.rotationDirection === Re.Positive ? this.rotationDirection = Re.Negative : this.rotateY <= -1 && this.rotationDirection === Re.Negative && (this.rotationDirection = Re.Positive);
|
|
682
682
|
const I = 0.1 * this.rotationDirection * c;
|
|
683
683
|
if (this.rotateY += I, 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 = n, this.context.lineCap = "round", this.context.lineWidth = 2, d && typeof d == "function")
|
|
684
684
|
d.call(this, this.context);
|
|
@@ -702,18 +702,18 @@ class qt {
|
|
|
702
702
|
}
|
|
703
703
|
class Vt {
|
|
704
704
|
constructor(e, t) {
|
|
705
|
-
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 = (
|
|
706
|
-
this.particles.splice(
|
|
705
|
+
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 = (a) => {
|
|
706
|
+
this.particles.splice(a, 1);
|
|
707
707
|
}, this.getParticle = () => {
|
|
708
|
-
const
|
|
709
|
-
return new qt(this.context, this.getOptions,
|
|
710
|
-
}, this.animate = (
|
|
711
|
-
const { canvas: n, context: d, particlesGenerated: c, lastNumberOfPieces: I } = this, { run: G, recycle:
|
|
708
|
+
const a = re(this.x, this.w + this.x), n = re(this.y, this.h + this.y);
|
|
709
|
+
return new qt(this.context, this.getOptions, a, n);
|
|
710
|
+
}, this.animate = (a) => {
|
|
711
|
+
const { canvas: n, context: d, particlesGenerated: c, lastNumberOfPieces: I } = this, { run: G, recycle: g, numberOfPieces: A, debug: P, tweenFunction: z, tweenDuration: H } = this.getOptions();
|
|
712
712
|
if (!G)
|
|
713
713
|
return !1;
|
|
714
|
-
const te = this.particles.length, ne =
|
|
714
|
+
const te = this.particles.length, ne = g ? te : c;
|
|
715
715
|
if (ne < A) {
|
|
716
|
-
I !== A && (this.tweenProgress = 0, this.tweenFrom = ne, this.lastNumberOfPieces = A), this.tweenProgress = Math.min(H, Math.max(0, this.tweenProgress +
|
|
716
|
+
I !== A && (this.tweenProgress = 0, this.tweenFrom = ne, this.lastNumberOfPieces = A), this.tweenProgress = Math.min(H, Math.max(0, this.tweenProgress + a));
|
|
717
717
|
const L = z(this.tweenProgress, this.tweenFrom, A, H), Q = Math.round(L - ne);
|
|
718
718
|
for (let ee = 0; ee < Q; ee++)
|
|
719
719
|
this.particles.push(this.getParticle());
|
|
@@ -722,14 +722,14 @@ class Vt {
|
|
|
722
722
|
P && (d.font = "12px sans-serif", d.fillStyle = "#333", d.textAlign = "right", d.fillText(`Particles: ${te}`, n.width - 10, n.height - 20));
|
|
723
723
|
for (let L = this.particles.length - 1; L >= 0; L--) {
|
|
724
724
|
const Q = this.particles[L];
|
|
725
|
-
Q.update(
|
|
725
|
+
Q.update(a), (Q.y > n.height || Q.y < -100 || Q.x > n.width + 100 || Q.x < -100) && (g && ne <= A ? this.particles[L] = this.getParticle() : this.removeParticleAt(L));
|
|
726
726
|
}
|
|
727
727
|
return te > 0 || ne < A;
|
|
728
728
|
}, this.canvas = e;
|
|
729
|
-
const
|
|
730
|
-
if (!
|
|
729
|
+
const i = this.canvas.getContext("2d");
|
|
730
|
+
if (!i)
|
|
731
731
|
throw new Error("Could not get canvas context");
|
|
732
|
-
this.context =
|
|
732
|
+
this.context = i, this.getOptions = t;
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
const Je = {
|
|
@@ -769,7 +769,7 @@ const Je = {
|
|
|
769
769
|
};
|
|
770
770
|
class zt {
|
|
771
771
|
constructor(e, t) {
|
|
772
|
-
this.lastFrameTime = 0, this.setOptionsWithDefaults = (
|
|
772
|
+
this.lastFrameTime = 0, this.setOptionsWithDefaults = (a) => {
|
|
773
773
|
const n = {
|
|
774
774
|
confettiSource: {
|
|
775
775
|
x: 0,
|
|
@@ -781,32 +781,32 @@ class zt {
|
|
|
781
781
|
this._options = {
|
|
782
782
|
...n,
|
|
783
783
|
...Je,
|
|
784
|
-
...
|
|
785
|
-
}, Object.assign(this,
|
|
786
|
-
}, this.update = (
|
|
787
|
-
const { options: { run: n, onConfettiComplete: d, frameRate: c }, canvas: I, context: G } = this,
|
|
788
|
-
if (c &&
|
|
784
|
+
...a
|
|
785
|
+
}, Object.assign(this, a.confettiSource);
|
|
786
|
+
}, this.update = (a = 0) => {
|
|
787
|
+
const { options: { run: n, onConfettiComplete: d, frameRate: c }, canvas: I, context: G } = this, g = Math.min(a - this.lastFrameTime, 50);
|
|
788
|
+
if (c && g < 1e3 / c) {
|
|
789
789
|
this.rafId = requestAnimationFrame(this.update);
|
|
790
790
|
return;
|
|
791
791
|
}
|
|
792
|
-
this.lastFrameTime =
|
|
792
|
+
this.lastFrameTime = a - (c ? g % c : 0), n && (G.fillStyle = "white", G.clearRect(0, 0, I.width, I.height)), this.generator.animate(g) ? this.rafId = requestAnimationFrame(this.update) : (d && typeof d == "function" && this.generator.particlesGenerated > 0 && d.call(this, this), this._options.run = !1);
|
|
793
793
|
}, this.reset = () => {
|
|
794
794
|
this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
|
|
795
795
|
}, this.stop = () => {
|
|
796
796
|
this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
|
|
797
797
|
}, this.canvas = e;
|
|
798
|
-
const
|
|
799
|
-
if (!
|
|
798
|
+
const i = this.canvas.getContext("2d");
|
|
799
|
+
if (!i)
|
|
800
800
|
throw new Error("Could not get canvas context");
|
|
801
|
-
this.context =
|
|
801
|
+
this.context = i, this.generator = new Vt(this.canvas, () => this.options), this.options = t, this.update();
|
|
802
802
|
}
|
|
803
803
|
get options() {
|
|
804
804
|
return this._options;
|
|
805
805
|
}
|
|
806
806
|
set options(e) {
|
|
807
|
-
var
|
|
808
|
-
const t = (
|
|
809
|
-
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle &&
|
|
807
|
+
var a, n;
|
|
808
|
+
const t = (a = this._options) == null ? void 0 : a.run, i = (n = this._options) == null ? void 0 : n.recycle;
|
|
809
|
+
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();
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
812
|
const Wt = Ve.createRef();
|
|
@@ -828,7 +828,7 @@ class et extends Ve.Component {
|
|
|
828
828
|
this.confetti && this.confetti.stop(), this.confetti = void 0;
|
|
829
829
|
}
|
|
830
830
|
render() {
|
|
831
|
-
const [e, t] = Ke(this.props),
|
|
831
|
+
const [e, t] = Ke(this.props), i = {
|
|
832
832
|
zIndex: 2,
|
|
833
833
|
position: "absolute",
|
|
834
834
|
pointerEvents: "none",
|
|
@@ -838,7 +838,7 @@ class et extends Ve.Component {
|
|
|
838
838
|
right: 0,
|
|
839
839
|
...t.style
|
|
840
840
|
};
|
|
841
|
-
return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style:
|
|
841
|
+
return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: i });
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
844
|
et.defaultProps = {
|
|
@@ -846,7 +846,7 @@ et.defaultProps = {
|
|
|
846
846
|
};
|
|
847
847
|
et.displayName = "ReactConfetti";
|
|
848
848
|
function Ke(o) {
|
|
849
|
-
const e = {}, t = {},
|
|
849
|
+
const e = {}, t = {}, i = {}, a = [
|
|
850
850
|
...Object.keys(Je),
|
|
851
851
|
"confettiSource",
|
|
852
852
|
"drawShape",
|
|
@@ -855,9 +855,9 @@ function Ke(o) {
|
|
|
855
855
|
], n = ["canvasRef"];
|
|
856
856
|
for (const d in o) {
|
|
857
857
|
const c = o[d];
|
|
858
|
-
|
|
858
|
+
a.includes(d) ? e[d] = c : n.includes(d) ? n[d] = c : i[d] = c;
|
|
859
859
|
}
|
|
860
|
-
return [e,
|
|
860
|
+
return [e, i, t];
|
|
861
861
|
}
|
|
862
862
|
const Ut = Ve.forwardRef((o, e) => s(et, { canvasRef: e, ...o }));
|
|
863
863
|
/**
|
|
@@ -868,11 +868,11 @@ const Ut = Ve.forwardRef((o, e) => s(et, { canvasRef: e, ...o }));
|
|
|
868
868
|
*/
|
|
869
869
|
const jt = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Gt = (o) => o.replace(
|
|
870
870
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
871
|
-
(e, t,
|
|
871
|
+
(e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
|
|
872
872
|
), bt = (o) => {
|
|
873
873
|
const e = Gt(o);
|
|
874
874
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
875
|
-
},
|
|
875
|
+
}, gt = (...o) => o.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Ht = (o) => {
|
|
876
876
|
for (const e in o)
|
|
877
877
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
878
878
|
return !0;
|
|
@@ -905,8 +905,8 @@ const Kt = wt(
|
|
|
905
905
|
color: o = "currentColor",
|
|
906
906
|
size: e = 24,
|
|
907
907
|
strokeWidth: t = 2,
|
|
908
|
-
absoluteStrokeWidth:
|
|
909
|
-
className:
|
|
908
|
+
absoluteStrokeWidth: i,
|
|
909
|
+
className: a = "",
|
|
910
910
|
children: n,
|
|
911
911
|
iconNode: d,
|
|
912
912
|
...c
|
|
@@ -918,13 +918,13 @@ const Kt = wt(
|
|
|
918
918
|
width: e,
|
|
919
919
|
height: e,
|
|
920
920
|
stroke: o,
|
|
921
|
-
strokeWidth:
|
|
922
|
-
className:
|
|
921
|
+
strokeWidth: i ? Number(t) * 24 / Number(e) : t,
|
|
922
|
+
className: gt("lucide", a),
|
|
923
923
|
...!n && !Ht(c) && { "aria-hidden": "true" },
|
|
924
924
|
...c
|
|
925
925
|
},
|
|
926
926
|
[
|
|
927
|
-
...d.map(([G,
|
|
927
|
+
...d.map(([G, g]) => Ze(G, g)),
|
|
928
928
|
...Array.isArray(n) ? n : [n]
|
|
929
929
|
]
|
|
930
930
|
)
|
|
@@ -937,15 +937,15 @@ const Kt = wt(
|
|
|
937
937
|
*/
|
|
938
938
|
const tt = (o, e) => {
|
|
939
939
|
const t = wt(
|
|
940
|
-
({ className:
|
|
940
|
+
({ className: i, ...a }, n) => Ze(Kt, {
|
|
941
941
|
ref: n,
|
|
942
942
|
iconNode: e,
|
|
943
|
-
className:
|
|
943
|
+
className: gt(
|
|
944
944
|
`lucide-${jt(bt(o))}`,
|
|
945
945
|
`lucide-${o}`,
|
|
946
|
-
|
|
946
|
+
i
|
|
947
947
|
),
|
|
948
|
-
...
|
|
948
|
+
...a
|
|
949
949
|
})
|
|
950
950
|
);
|
|
951
951
|
return t.displayName = bt(o), t;
|
|
@@ -982,11 +982,11 @@ const Jt = [
|
|
|
982
982
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
983
983
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
984
984
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
985
|
-
], en = tt("trash-2", Jt), tn = "
|
|
985
|
+
], en = tt("trash-2", Jt), tn = "_backdrop_18x6y_1", nn = "_celebrationOverlay_18x6y_14", an = "_celebrationChip_18x6y_23", rn = "_backdropOpen_18x6y_74", on = "_backdropClosed_18x6y_78", sn = "_panel_18x6y_82", ln = "_panelOpen_18x6y_103", cn = "_panelClosed_18x6y_107", un = "_header_18x6y_146", dn = "_headerCenter_18x6y_155", hn = "_title_18x6y_163", mn = "_searchIconButton_18x6y_172", fn = "_headerTitleWrap_18x6y_195", pn = "_headerSearchWrap_18x6y_199", _n = "_headerSearchOpen_18x6y_211", bn = "_searchBar_18x6y_223", yn = "_searchInput_18x6y_235", vn = "_searchClearButton_18x6y_256", wn = "_closeButton_18x6y_278", xn = "_body_18x6y_312", gn = "_muted_18x6y_317", In = "_error_18x6y_322", Cn = "_variants_18x6y_327", Nn = "_variantList_18x6y_331", Sn = "_variantRow_18x6y_339", Bn = "_variantRowSoldOut_18x6y_347", Tn = "_variantLeft_18x6y_351", Rn = "_addToBundleButton_18x6y_358", kn = "_soldOutContainer_18x6y_386", Pn = "_soldOut_18x6y_386", On = "_variantThumb_18x6y_403", Mn = "_variantThumbImg_18x6y_413", Fn = "_variantThumbFallback_18x6y_420", An = "_variantInfo_18x6y_430", Ln = "_variantName_18x6y_434", Dn = "_variantMeta_18x6y_443", $n = "_variantPriceRow_18x6y_451", En = "_variantCompareAt_18x6y_458", qn = "_variantPrice_18x6y_451", Vn = "_qtyControls_18x6y_469", zn = "_qtyButton_18x6y_475", Wn = "_qtyValue_18x6y_501", Un = "_footer_18x6y_508", jn = "_poweredBy_18x6y_516", Gn = "_boxSummaryWindow_18x6y_528", Hn = "_boxSummaryRow_18x6y_546", Qn = "_boxSlot_18x6y_554", Kn = "_boxItem_18x6y_563", Yn = "_boxItemClickable_18x6y_575", Xn = "_boxThresholdLabel_18x6y_584", Zn = "_boxItemPlaceholder_18x6y_595", Jn = "_boxItemFilled_18x6y_601", ea = "_boxItemThreshold_18x6y_607", ta = "_boxItemDiscountText_18x6y_615", na = "_boxItemPlus_18x6y_623", aa = "_boxItemImage_18x6y_630", ia = "_boxItemFallback_18x6y_637", ra = "_ctaButtonGroup_18x6y_648", oa = "_ctaButtonGroupAnimating_18x6y_655", sa = "_cta_18x6y_648", la = "_ctaDualLeft_18x6y_683", ca = "_ctaDualLeftAnimating_18x6y_701", ua = "_ctaDualRight_18x6y_714", da = "_ctaDualRightAnimating_18x6y_730", ha = "_ctaTotals_18x6y_741", ma = "_ctaDiscountBadge_18x6y_749", fa = "_ctaTotalsWrap_18x6y_763", pa = "_ctaTotalsWrapVisible_18x6y_776", _a = "_ctaTotalsStrike_18x6y_783", ba = "_ctaTotalsPrice_18x6y_790", h = {
|
|
986
986
|
backdrop: tn,
|
|
987
987
|
celebrationOverlay: nn,
|
|
988
|
-
celebrationChip:
|
|
989
|
-
backdropOpen:
|
|
988
|
+
celebrationChip: an,
|
|
989
|
+
backdropOpen: rn,
|
|
990
990
|
backdropClosed: on,
|
|
991
991
|
panel: sn,
|
|
992
992
|
panelOpen: ln,
|
|
@@ -1002,8 +1002,8 @@ const Jt = [
|
|
|
1002
1002
|
searchInput: yn,
|
|
1003
1003
|
searchClearButton: vn,
|
|
1004
1004
|
closeButton: wn,
|
|
1005
|
-
body:
|
|
1006
|
-
muted:
|
|
1005
|
+
body: xn,
|
|
1006
|
+
muted: gn,
|
|
1007
1007
|
error: In,
|
|
1008
1008
|
variants: Cn,
|
|
1009
1009
|
variantList: Nn,
|
|
@@ -1035,52 +1035,52 @@ const Jt = [
|
|
|
1035
1035
|
boxThresholdLabel: Xn,
|
|
1036
1036
|
boxItemPlaceholder: Zn,
|
|
1037
1037
|
boxItemFilled: Jn,
|
|
1038
|
-
boxItemThreshold:
|
|
1039
|
-
boxItemDiscountText:
|
|
1040
|
-
boxItemPlus:
|
|
1041
|
-
boxItemImage:
|
|
1042
|
-
boxItemFallback:
|
|
1043
|
-
ctaButtonGroup:
|
|
1044
|
-
ctaButtonGroupAnimating:
|
|
1045
|
-
cta:
|
|
1046
|
-
ctaDualLeft:
|
|
1047
|
-
ctaDualLeftAnimating:
|
|
1048
|
-
ctaDualRight:
|
|
1049
|
-
ctaDualRightAnimating:
|
|
1050
|
-
ctaTotals:
|
|
1051
|
-
ctaDiscountBadge:
|
|
1052
|
-
ctaTotalsWrap:
|
|
1053
|
-
ctaTotalsWrapVisible:
|
|
1054
|
-
ctaTotalsStrike:
|
|
1055
|
-
ctaTotalsPrice:
|
|
1038
|
+
boxItemThreshold: ea,
|
|
1039
|
+
boxItemDiscountText: ta,
|
|
1040
|
+
boxItemPlus: na,
|
|
1041
|
+
boxItemImage: aa,
|
|
1042
|
+
boxItemFallback: ia,
|
|
1043
|
+
ctaButtonGroup: ra,
|
|
1044
|
+
ctaButtonGroupAnimating: oa,
|
|
1045
|
+
cta: sa,
|
|
1046
|
+
ctaDualLeft: la,
|
|
1047
|
+
ctaDualLeftAnimating: ca,
|
|
1048
|
+
ctaDualRight: ua,
|
|
1049
|
+
ctaDualRightAnimating: da,
|
|
1050
|
+
ctaTotals: ha,
|
|
1051
|
+
ctaDiscountBadge: ma,
|
|
1052
|
+
ctaTotalsWrap: fa,
|
|
1053
|
+
ctaTotalsWrapVisible: pa,
|
|
1054
|
+
ctaTotalsStrike: _a,
|
|
1055
|
+
ctaTotalsPrice: ba
|
|
1056
1056
|
};
|
|
1057
|
-
function
|
|
1057
|
+
function Di(o) {
|
|
1058
1058
|
var ct, ut;
|
|
1059
1059
|
const {
|
|
1060
1060
|
isOpen: e,
|
|
1061
1061
|
close: t,
|
|
1062
|
-
loading:
|
|
1063
|
-
submitting:
|
|
1062
|
+
loading: i,
|
|
1063
|
+
submitting: a,
|
|
1064
1064
|
error: n,
|
|
1065
1065
|
currencyCode: d,
|
|
1066
1066
|
config: c,
|
|
1067
1067
|
eligibleVariants: I,
|
|
1068
1068
|
selections: G,
|
|
1069
|
-
selectionOrder:
|
|
1069
|
+
selectionOrder: g,
|
|
1070
1070
|
setQuantity: A,
|
|
1071
1071
|
bundleSize: P,
|
|
1072
1072
|
minRequired: z,
|
|
1073
1073
|
canSubmit: H,
|
|
1074
1074
|
submit: te,
|
|
1075
1075
|
submitAndCheckout: ne
|
|
1076
|
-
} = ze(), [L, Q] = j(!1), [ee, ue] = j(""), w = J(null), D = J(null), W = J(null), [Y, de] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ce, Ne] = j(0), [
|
|
1076
|
+
} = ze(), [L, Q] = j(!1), [ee, ue] = j(""), w = J(null), D = J(null), W = J(null), [Y, de] = j(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [Ce, Ne] = j(0), [ae, oe] = j(null), [we, xe] = j(!1), X = J(null), se = J(P), ke = 7e3, [ge, he] = j(0), [ye, me] = j(null), [fe, pe] = j(!1), le = J(null), m = 2800, p = [
|
|
1077
1077
|
"#2563eb",
|
|
1078
1078
|
"#3b82f6",
|
|
1079
1079
|
"#60a5fa",
|
|
1080
1080
|
"#93c5fd",
|
|
1081
1081
|
"#bae6fd",
|
|
1082
1082
|
"#e0f2fe"
|
|
1083
|
-
],
|
|
1083
|
+
], r = k(() => {
|
|
1084
1084
|
var u;
|
|
1085
1085
|
const l = (u = c == null ? void 0 : c.styleSettings) == null ? void 0 : u.confettiColors;
|
|
1086
1086
|
return Array.isArray(l) && l.length >= 6 ? l.slice(0, 6).map(
|
|
@@ -1089,7 +1089,7 @@ function Dr(o) {
|
|
|
1089
1089
|
}, [(ct = c == null ? void 0 : c.styleSettings) == null ? void 0 : ct.confettiColors]), _ = (l) => {
|
|
1090
1090
|
const u = Number.parseFloat(l);
|
|
1091
1091
|
return Number.isFinite(u) ? String(Math.round(u)) : l;
|
|
1092
|
-
},
|
|
1092
|
+
}, x = (l) => {
|
|
1093
1093
|
const u = (l ?? []).filter((v) => {
|
|
1094
1094
|
var F, M;
|
|
1095
1095
|
const N = (F = v == null ? void 0 : v.name) == null ? void 0 : F.trim(), C = (M = v == null ? void 0 : v.value) == null ? void 0 : M.trim();
|
|
@@ -1100,7 +1100,7 @@ function Dr(o) {
|
|
|
1100
1100
|
var u;
|
|
1101
1101
|
return ((u = l.product) == null ? void 0 : u.title) ?? l.displayName ?? l.title;
|
|
1102
1102
|
}, y = (l) => {
|
|
1103
|
-
const u = b(l), v =
|
|
1103
|
+
const u = b(l), v = x(l.selectedOptions);
|
|
1104
1104
|
return [u, v].filter(Boolean).join(" — ");
|
|
1105
1105
|
}, [R, U] = j(e), B = J(null), E = (l) => {
|
|
1106
1106
|
const u = Number(l);
|
|
@@ -1114,7 +1114,7 @@ function Dr(o) {
|
|
|
1114
1114
|
}, K = ((ut = c == null ? void 0 : c.title) == null ? void 0 : ut.trim()) || "Build your bundle", _e = k(() => {
|
|
1115
1115
|
const l = Number((c == null ? void 0 : c.maxBundleSize) ?? NaN), u = Number.isFinite(l) ? Math.floor(l) : 100;
|
|
1116
1116
|
return Math.max(2, Math.min(100, u));
|
|
1117
|
-
}, [c == null ? void 0 : c.maxBundleSize]), be = P >= _e, Se = k(() => [...I].sort((l, u) => l.displayName.localeCompare(u.displayName)), [I]),
|
|
1117
|
+
}, [c == null ? void 0 : c.maxBundleSize]), be = P >= _e, Se = k(() => [...I].sort((l, u) => l.displayName.localeCompare(u.displayName)), [I]), ie = k(() => {
|
|
1118
1118
|
const l = ee.trim().toLowerCase();
|
|
1119
1119
|
if (!l) return Se;
|
|
1120
1120
|
const u = l.split(/\s+/).filter(Boolean), v = (N) => {
|
|
@@ -1152,8 +1152,8 @@ function Dr(o) {
|
|
|
1152
1152
|
return Math.round(l * 100) / 100;
|
|
1153
1153
|
}, [Z, Be]), nt = k(() => O.length ? Math.max(...O.map((l) => l.minBundleSize)) : 0, [O]), We = k(() => {
|
|
1154
1154
|
const l = new Map(I.map((u) => [u.id, u]));
|
|
1155
|
-
return
|
|
1156
|
-
}, [I,
|
|
1155
|
+
return g.map((u) => l.get(u)).filter((u) => !!u);
|
|
1156
|
+
}, [I, g]), Ct = k(() => {
|
|
1157
1157
|
var u;
|
|
1158
1158
|
const l = /* @__PURE__ */ new Map();
|
|
1159
1159
|
for (const v of O) {
|
|
@@ -1165,16 +1165,16 @@ function Dr(o) {
|
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
1167
1167
|
return l;
|
|
1168
|
-
}, [O]), Nt = k(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue,
|
|
1168
|
+
}, [O]), Nt = k(() => Math.max(nt || z, We.length), [We.length, nt, z]), [Ue, at] = j(!0), it = J(q);
|
|
1169
1169
|
V(() => {
|
|
1170
1170
|
if (((c == null ? void 0 : c.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
|
|
1171
|
-
const u =
|
|
1172
|
-
|
|
1171
|
+
const u = it.current > 0;
|
|
1172
|
+
at(!(u && q === 0));
|
|
1173
1173
|
}
|
|
1174
|
-
|
|
1174
|
+
it.current = q;
|
|
1175
1175
|
}, [q, c == null ? void 0 : c.ctaButtonMode]);
|
|
1176
|
-
const je = J(null),
|
|
1177
|
-
const u =
|
|
1176
|
+
const je = J(null), rt = J(null), ot = J(null), st = J(P), lt = (l) => {
|
|
1177
|
+
const u = rt.current;
|
|
1178
1178
|
if (!u) return;
|
|
1179
1179
|
const v = u.querySelector(`[data-variant-row="${l}"]`);
|
|
1180
1180
|
if (!v) return;
|
|
@@ -1248,12 +1248,12 @@ function Dr(o) {
|
|
|
1248
1248
|
w: 4,
|
|
1249
1249
|
h: 4
|
|
1250
1250
|
};
|
|
1251
|
-
oe(M), Ne((ce) => ce + 1),
|
|
1252
|
-
|
|
1251
|
+
oe(M), Ne((ce) => ce + 1), xe(!0), X.current != null && window.clearTimeout(X.current), X.current = window.setTimeout(() => {
|
|
1252
|
+
xe(!1), X.current = null;
|
|
1253
1253
|
}, ke);
|
|
1254
1254
|
});
|
|
1255
1255
|
return () => cancelAnimationFrame(l);
|
|
1256
|
-
}, [
|
|
1256
|
+
}, [ge, ye, ke, fe, e]), V(() => {
|
|
1257
1257
|
var l;
|
|
1258
1258
|
e && ((l = je.current) == null || l.focus());
|
|
1259
1259
|
}, [e]), R ? /* @__PURE__ */ S(
|
|
@@ -1267,13 +1267,13 @@ function Dr(o) {
|
|
|
1267
1267
|
l.target === l.currentTarget && t();
|
|
1268
1268
|
},
|
|
1269
1269
|
children: [
|
|
1270
|
-
we &&
|
|
1270
|
+
we && ae && Y.width > 0 && Y.height > 0 ? /* @__PURE__ */ s(
|
|
1271
1271
|
Ut,
|
|
1272
1272
|
{
|
|
1273
1273
|
width: Y.width,
|
|
1274
1274
|
height: Y.height,
|
|
1275
|
-
confettiSource:
|
|
1276
|
-
colors:
|
|
1275
|
+
confettiSource: ae,
|
|
1276
|
+
colors: r,
|
|
1277
1277
|
recycle: !1,
|
|
1278
1278
|
numberOfPieces: 70,
|
|
1279
1279
|
tweenDuration: 100,
|
|
@@ -1285,7 +1285,7 @@ function Dr(o) {
|
|
|
1285
1285
|
Ce
|
|
1286
1286
|
) : null,
|
|
1287
1287
|
/* @__PURE__ */ S("aside", { ref: je, className: [h.panel, e ? h.panelOpen : h.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
|
|
1288
|
-
fe && ye ? /* @__PURE__ */ s("div", { className: h.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: W, className: h.celebrationChip, children: ye },
|
|
1288
|
+
fe && ye ? /* @__PURE__ */ s("div", { className: h.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: W, className: h.celebrationChip, children: ye }, ge) }) : null,
|
|
1289
1289
|
/* @__PURE__ */ S("header", { className: [h.header, L ? h.headerSearchOpen : null].filter(Boolean).join(" "), children: [
|
|
1290
1290
|
/* @__PURE__ */ s(
|
|
1291
1291
|
"button",
|
|
@@ -1335,14 +1335,14 @@ function Dr(o) {
|
|
|
1335
1335
|
) : null
|
|
1336
1336
|
] }) })
|
|
1337
1337
|
] }),
|
|
1338
|
-
/* @__PURE__ */ s("button", { type: "button", onClick: t, disabled:
|
|
1338
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: t, disabled: a, className: h.closeButton, "aria-label": "Close", children: "×" })
|
|
1339
1339
|
] }),
|
|
1340
|
-
/* @__PURE__ */ S("div", { className: h.body, ref:
|
|
1341
|
-
|
|
1340
|
+
/* @__PURE__ */ S("div", { className: h.body, ref: rt, children: [
|
|
1341
|
+
i ? /* @__PURE__ */ s("p", { className: h.muted, children: "Loading…" }) : null,
|
|
1342
1342
|
n ? /* @__PURE__ */ s("p", { className: h.error, children: n }) : null,
|
|
1343
|
-
/* @__PURE__ */ s("div", { className: h.variants, children: /* @__PURE__ */ s("ul", { className: h.variantList, children:
|
|
1343
|
+
/* @__PURE__ */ s("div", { className: h.variants, children: /* @__PURE__ */ s("ul", { className: h.variantList, children: ie.map((l) => {
|
|
1344
1344
|
var ve, Ie, Pe, Ae;
|
|
1345
|
-
const u = G[l.id] ?? 0, v = b(l), N =
|
|
1345
|
+
const u = G[l.id] ?? 0, v = b(l), N = x(l.selectedOptions), C = y(l), F = Z, M = Number(l.price), $ = F != null && Number.isFinite(F) && F > 0 && Number.isFinite(M), ce = $ ? Math.round(M * (1 - F / 100) * 100) / 100 : null;
|
|
1346
1346
|
return /* @__PURE__ */ S(
|
|
1347
1347
|
"li",
|
|
1348
1348
|
{
|
|
@@ -1379,7 +1379,7 @@ function Dr(o) {
|
|
|
1379
1379
|
{
|
|
1380
1380
|
type: "button",
|
|
1381
1381
|
onClick: () => A(l.id, 1),
|
|
1382
|
-
disabled:
|
|
1382
|
+
disabled: a || be,
|
|
1383
1383
|
className: h.addToBundleButton,
|
|
1384
1384
|
"aria-label": `Add ${C} to bundle`,
|
|
1385
1385
|
children: "Add"
|
|
@@ -1390,7 +1390,7 @@ function Dr(o) {
|
|
|
1390
1390
|
{
|
|
1391
1391
|
type: "button",
|
|
1392
1392
|
onClick: () => A(l.id, u - 1),
|
|
1393
|
-
disabled:
|
|
1393
|
+
disabled: a || u <= 0,
|
|
1394
1394
|
className: h.qtyButton,
|
|
1395
1395
|
"aria-label": `Decrease ${C}`,
|
|
1396
1396
|
children: "−"
|
|
@@ -1402,7 +1402,7 @@ function Dr(o) {
|
|
|
1402
1402
|
{
|
|
1403
1403
|
type: "button",
|
|
1404
1404
|
onClick: () => A(l.id, u + 1),
|
|
1405
|
-
disabled:
|
|
1405
|
+
disabled: a || be,
|
|
1406
1406
|
className: h.qtyButton,
|
|
1407
1407
|
"aria-label": `Increase ${C}`,
|
|
1408
1408
|
children: "+"
|
|
@@ -1471,7 +1471,7 @@ function Dr(o) {
|
|
|
1471
1471
|
),
|
|
1472
1472
|
(() => {
|
|
1473
1473
|
const l = (c == null ? void 0 : c.ctaButtonMode) || "add_to_cart";
|
|
1474
|
-
return l === "add_to_cart_checkout" ? q > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children:
|
|
1474
|
+
return l === "add_to_cart_checkout" ? q > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: a ? "Adding…" : `Add ${q} more product${q === 1 ? "" : "s"}` }) : /* @__PURE__ */ S("div", { className: `${h.ctaButtonGroup} ${Ue ? h.ctaButtonGroupAnimating : ""}`, children: [
|
|
1475
1475
|
/* @__PURE__ */ s(
|
|
1476
1476
|
"button",
|
|
1477
1477
|
{
|
|
@@ -1479,7 +1479,7 @@ function Dr(o) {
|
|
|
1479
1479
|
onClick: te,
|
|
1480
1480
|
disabled: !H,
|
|
1481
1481
|
className: `${h.ctaDualLeft} ${Ue ? h.ctaDualLeftAnimating : ""}`,
|
|
1482
|
-
children: /* @__PURE__ */ s("span", { children:
|
|
1482
|
+
children: /* @__PURE__ */ s("span", { children: a ? "Adding…" : "Add to Basket" })
|
|
1483
1483
|
}
|
|
1484
1484
|
),
|
|
1485
1485
|
/* @__PURE__ */ s(
|
|
@@ -1489,10 +1489,10 @@ function Dr(o) {
|
|
|
1489
1489
|
onClick: ne,
|
|
1490
1490
|
disabled: !H,
|
|
1491
1491
|
className: `${h.ctaDualRight} ${Ue ? h.ctaDualRightAnimating : ""}`,
|
|
1492
|
-
children: /* @__PURE__ */ s("span", { children:
|
|
1492
|
+
children: /* @__PURE__ */ s("span", { children: a ? "Processing…" : "Checkout" })
|
|
1493
1493
|
}
|
|
1494
1494
|
)
|
|
1495
|
-
] }) : l === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: ne, disabled: !H, className: h.cta, children:
|
|
1495
|
+
] }) : l === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: ne, disabled: !H, className: h.cta, children: a ? "Processing…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Checkout" }) : /* @__PURE__ */ s("button", { type: "button", onClick: te, disabled: !H, className: h.cta, children: a ? "Adding…" : q > 0 ? `Add ${q} more product${q === 1 ? "" : "s"}` : "Add to Basket" });
|
|
1496
1496
|
})(),
|
|
1497
1497
|
/* @__PURE__ */ S("div", { className: h.poweredBy, children: [
|
|
1498
1498
|
"powered by ",
|
|
@@ -1504,88 +1504,88 @@ function Dr(o) {
|
|
|
1504
1504
|
}
|
|
1505
1505
|
) : null;
|
|
1506
1506
|
}
|
|
1507
|
-
const
|
|
1508
|
-
panel:
|
|
1509
|
-
header:
|
|
1510
|
-
title:
|
|
1511
|
-
status:
|
|
1512
|
-
error:
|
|
1513
|
-
inactive:
|
|
1514
|
-
section:
|
|
1515
|
-
sectionTitle:
|
|
1516
|
-
rulesVisual:
|
|
1517
|
-
rulesLabelsRow:
|
|
1518
|
-
rulesLinesRow:
|
|
1519
|
-
rulesLineLabelCell:
|
|
1520
|
-
rulesLineLabel:
|
|
1521
|
-
rulesLine:
|
|
1522
|
-
rulesLineEmpty:
|
|
1523
|
-
rulesLineFilled:
|
|
1524
|
-
variants:
|
|
1525
|
-
variantList:
|
|
1526
|
-
variantRow:
|
|
1527
|
-
variantRowInteractive:
|
|
1528
|
-
variantRowSelected: $
|
|
1529
|
-
variantRowSoldOut:
|
|
1530
|
-
variantMedia:
|
|
1531
|
-
variantContent:
|
|
1532
|
-
variantHeader:
|
|
1533
|
-
variantTitle:
|
|
1534
|
-
variantImage:
|
|
1535
|
-
variantImageFallback:
|
|
1536
|
-
variantMeta:
|
|
1537
|
-
variantPrice:
|
|
1538
|
-
variantFooterRow:
|
|
1539
|
-
variantActions:
|
|
1540
|
-
qtyActions:
|
|
1541
|
-
soldOut:
|
|
1542
|
-
qtyChip:
|
|
1543
|
-
qtyChipInteractive:
|
|
1544
|
-
qtyChipValue:
|
|
1545
|
-
qtyChipPlus:
|
|
1546
|
-
qtyChipClear:
|
|
1547
|
-
qtyTrash:
|
|
1548
|
-
footer:
|
|
1549
|
-
boxSummaryWindow:
|
|
1550
|
-
boxSummaryRow:
|
|
1551
|
-
boxSlot:
|
|
1552
|
-
boxItem:
|
|
1553
|
-
boxItemFilled:
|
|
1554
|
-
boxItemPlaceholder:
|
|
1555
|
-
boxItemThreshold:
|
|
1556
|
-
boxItemClickable:
|
|
1557
|
-
boxItemImage:
|
|
1558
|
-
boxItemFallback:
|
|
1559
|
-
boxItemPlus:
|
|
1560
|
-
boxItemDiscountText:
|
|
1561
|
-
boxThresholdLabel:
|
|
1562
|
-
totalsReveal:
|
|
1563
|
-
totalsRevealOpen:
|
|
1564
|
-
ctaTotalsWrap:
|
|
1565
|
-
ctaTotalsWrapVisible:
|
|
1566
|
-
ctaTotals:
|
|
1567
|
-
ctaDiscountBadge:
|
|
1568
|
-
ctaTotalsStrike:
|
|
1569
|
-
ctaTotalsPrice:
|
|
1570
|
-
cta:
|
|
1571
|
-
ctaButtonGroup:
|
|
1572
|
-
ctaDualLeft:
|
|
1573
|
-
ctaDualRight:
|
|
1574
|
-
poweredBy:
|
|
1507
|
+
const ya = "_panel_1n9m6_2", va = "_header_1n9m6_20", wa = "_title_1n9m6_24", xa = "_status_1n9m6_32", ga = "_error_1n9m6_37", Ia = "_inactive_1n9m6_43", Ca = "_section_1n9m6_49", Na = "_sectionTitle_1n9m6_54", Sa = "_rulesVisual_1n9m6_107", Ba = "_rulesLabelsRow_1n9m6_114", Ta = "_rulesLinesRow_1n9m6_121", Ra = "_rulesLineLabelCell_1n9m6_128", ka = "_rulesLineLabel_1n9m6_128", Pa = "_rulesLine_1n9m6_121", Oa = "_rulesLineEmpty_1n9m6_162", Ma = "_rulesLineFilled_1n9m6_166", Fa = "_variants_1n9m6_170", Aa = "_variantList_1n9m6_178", La = "_variantRow_1n9m6_186", Da = "_variantRowInteractive_1n9m6_198", $a = "_variantRowSelected_1n9m6_202", Ea = "_variantRowSoldOut_1n9m6_207", qa = "_variantMedia_1n9m6_211", Va = "_variantContent_1n9m6_219", za = "_variantHeader_1n9m6_227", Wa = "_variantTitle_1n9m6_233", Ua = "_variantImage_1n9m6_247", ja = "_variantImageFallback_1n9m6_255", Ga = "_variantMeta_1n9m6_268", Ha = "_variantPrice_1n9m6_273", Qa = "_variantFooterRow_1n9m6_279", Ka = "_variantActions_1n9m6_286", Ya = "_qtyActions_1n9m6_292", Xa = "_soldOut_1n9m6_343", Za = "_qtyChip_1n9m6_351", Ja = "_qtyChipInteractive_1n9m6_366", ei = "_qtyChipValue_1n9m6_370", ti = "_qtyChipPlus_1n9m6_376", ni = "_qtyChipClear_1n9m6_381", ai = "_qtyTrash_1n9m6_400", ii = "_footer_1n9m6_412", ri = "_boxSummaryWindow_1n9m6_417", oi = "_boxSummaryRow_1n9m6_431", si = "_boxSlot_1n9m6_439", li = "_boxItem_1n9m6_448", ci = "_boxItemFilled_1n9m6_465", ui = "_boxItemPlaceholder_1n9m6_471", di = "_boxItemThreshold_1n9m6_477", hi = "_boxItemClickable_1n9m6_485", mi = "_boxItemImage_1n9m6_494", fi = "_boxItemFallback_1n9m6_505", pi = "_boxItemPlus_1n9m6_518", _i = "_boxItemDiscountText_1n9m6_530", bi = "_boxThresholdLabel_1n9m6_543", yi = "_totalsReveal_1n9m6_554", vi = "_totalsRevealOpen_1n9m6_562", wi = "_ctaTotalsWrap_1n9m6_567", xi = "_ctaTotalsWrapVisible_1n9m6_572", gi = "_ctaTotals_1n9m6_567", Ii = "_ctaDiscountBadge_1n9m6_587", Ci = "_ctaTotalsStrike_1n9m6_598", Ni = "_ctaTotalsPrice_1n9m6_604", Si = "_cta_1n9m6_567", Bi = "_ctaButtonGroup_1n9m6_636", Ti = "_ctaDualLeft_1n9m6_642", Ri = "_ctaDualRight_1n9m6_643", ki = "_poweredBy_1n9m6_670", f = {
|
|
1508
|
+
panel: ya,
|
|
1509
|
+
header: va,
|
|
1510
|
+
title: wa,
|
|
1511
|
+
status: xa,
|
|
1512
|
+
error: ga,
|
|
1513
|
+
inactive: Ia,
|
|
1514
|
+
section: Ca,
|
|
1515
|
+
sectionTitle: Na,
|
|
1516
|
+
rulesVisual: Sa,
|
|
1517
|
+
rulesLabelsRow: Ba,
|
|
1518
|
+
rulesLinesRow: Ta,
|
|
1519
|
+
rulesLineLabelCell: Ra,
|
|
1520
|
+
rulesLineLabel: ka,
|
|
1521
|
+
rulesLine: Pa,
|
|
1522
|
+
rulesLineEmpty: Oa,
|
|
1523
|
+
rulesLineFilled: Ma,
|
|
1524
|
+
variants: Fa,
|
|
1525
|
+
variantList: Aa,
|
|
1526
|
+
variantRow: La,
|
|
1527
|
+
variantRowInteractive: Da,
|
|
1528
|
+
variantRowSelected: $a,
|
|
1529
|
+
variantRowSoldOut: Ea,
|
|
1530
|
+
variantMedia: qa,
|
|
1531
|
+
variantContent: Va,
|
|
1532
|
+
variantHeader: za,
|
|
1533
|
+
variantTitle: Wa,
|
|
1534
|
+
variantImage: Ua,
|
|
1535
|
+
variantImageFallback: ja,
|
|
1536
|
+
variantMeta: Ga,
|
|
1537
|
+
variantPrice: Ha,
|
|
1538
|
+
variantFooterRow: Qa,
|
|
1539
|
+
variantActions: Ka,
|
|
1540
|
+
qtyActions: Ya,
|
|
1541
|
+
soldOut: Xa,
|
|
1542
|
+
qtyChip: Za,
|
|
1543
|
+
qtyChipInteractive: Ja,
|
|
1544
|
+
qtyChipValue: ei,
|
|
1545
|
+
qtyChipPlus: ti,
|
|
1546
|
+
qtyChipClear: ni,
|
|
1547
|
+
qtyTrash: ai,
|
|
1548
|
+
footer: ii,
|
|
1549
|
+
boxSummaryWindow: ri,
|
|
1550
|
+
boxSummaryRow: oi,
|
|
1551
|
+
boxSlot: si,
|
|
1552
|
+
boxItem: li,
|
|
1553
|
+
boxItemFilled: ci,
|
|
1554
|
+
boxItemPlaceholder: ui,
|
|
1555
|
+
boxItemThreshold: di,
|
|
1556
|
+
boxItemClickable: hi,
|
|
1557
|
+
boxItemImage: mi,
|
|
1558
|
+
boxItemFallback: fi,
|
|
1559
|
+
boxItemPlus: pi,
|
|
1560
|
+
boxItemDiscountText: _i,
|
|
1561
|
+
boxThresholdLabel: bi,
|
|
1562
|
+
totalsReveal: yi,
|
|
1563
|
+
totalsRevealOpen: vi,
|
|
1564
|
+
ctaTotalsWrap: wi,
|
|
1565
|
+
ctaTotalsWrapVisible: xi,
|
|
1566
|
+
ctaTotals: gi,
|
|
1567
|
+
ctaDiscountBadge: Ii,
|
|
1568
|
+
ctaTotalsStrike: Ci,
|
|
1569
|
+
ctaTotalsPrice: Ni,
|
|
1570
|
+
cta: Si,
|
|
1571
|
+
ctaButtonGroup: Bi,
|
|
1572
|
+
ctaDualLeft: Ti,
|
|
1573
|
+
ctaDualRight: Ri,
|
|
1574
|
+
poweredBy: ki
|
|
1575
1575
|
};
|
|
1576
|
-
function $
|
|
1576
|
+
function $i(o) {
|
|
1577
1577
|
var le;
|
|
1578
1578
|
const {
|
|
1579
1579
|
loading: e,
|
|
1580
1580
|
submitting: t,
|
|
1581
|
-
error:
|
|
1582
|
-
currencyCode:
|
|
1581
|
+
error: i,
|
|
1582
|
+
currencyCode: a,
|
|
1583
1583
|
config: n,
|
|
1584
1584
|
eligibleVariants: d,
|
|
1585
1585
|
selections: c,
|
|
1586
1586
|
selectionOrder: I,
|
|
1587
1587
|
setQuantity: G,
|
|
1588
|
-
bundleSize:
|
|
1588
|
+
bundleSize: g,
|
|
1589
1589
|
minRequired: A,
|
|
1590
1590
|
canSubmit: P,
|
|
1591
1591
|
submit: z,
|
|
@@ -1598,72 +1598,72 @@ function $r(o) {
|
|
|
1598
1598
|
const p = Number.parseFloat(m);
|
|
1599
1599
|
return Number.isFinite(p) ? String(Math.round(p)) : m;
|
|
1600
1600
|
}, ee = (m) => {
|
|
1601
|
-
const p = (m ?? []).filter((
|
|
1601
|
+
const p = (m ?? []).filter((r) => {
|
|
1602
1602
|
var b, y;
|
|
1603
|
-
const _ = (b =
|
|
1604
|
-
return !(!_ || !
|
|
1603
|
+
const _ = (b = r == null ? void 0 : r.name) == null ? void 0 : b.trim(), x = (y = r == null ? void 0 : r.value) == null ? void 0 : y.trim();
|
|
1604
|
+
return !(!_ || !x || _.toLowerCase() === "title");
|
|
1605
1605
|
});
|
|
1606
|
-
return p.length ? p.map((
|
|
1606
|
+
return p.length ? p.map((r) => `${r.name}: ${r.value}`).join(" • ") : null;
|
|
1607
1607
|
}, ue = (m) => {
|
|
1608
1608
|
const p = Number(m);
|
|
1609
1609
|
if (!Number.isFinite(p)) return m;
|
|
1610
|
-
if (
|
|
1610
|
+
if (a)
|
|
1611
1611
|
try {
|
|
1612
|
-
return new Intl.NumberFormat(void 0, { style: "currency", currency:
|
|
1612
|
+
return new Intl.NumberFormat(void 0, { style: "currency", currency: a }).format(p);
|
|
1613
1613
|
} catch {
|
|
1614
1614
|
}
|
|
1615
1615
|
return `$${p.toFixed(2)}`;
|
|
1616
|
-
}, w = k(() => [...d].sort((m, p) => m.displayName.localeCompare(p.displayName)), [d]), D = k(() => [...(n == null ? void 0 : n.rules) ?? []].sort((m, p) => m.minBundleSize - p.minBundleSize), [n == null ? void 0 : n.rules]), W = k(() => Math.max(0, A -
|
|
1616
|
+
}, w = k(() => [...d].sort((m, p) => m.displayName.localeCompare(p.displayName)), [d]), D = k(() => [...(n == null ? void 0 : n.rules) ?? []].sort((m, p) => m.minBundleSize - p.minBundleSize), [n == null ? void 0 : n.rules]), W = k(() => Math.max(0, A - g), [g, A]), Y = k(() => {
|
|
1617
1617
|
let m = null;
|
|
1618
1618
|
for (const p of D)
|
|
1619
|
-
|
|
1619
|
+
g >= p.minBundleSize && (m = p);
|
|
1620
1620
|
return m;
|
|
1621
|
-
}, [
|
|
1621
|
+
}, [g, D]), de = k(() => {
|
|
1622
1622
|
if (!Y) return null;
|
|
1623
1623
|
const m = Number.parseFloat(Y.discountPercent);
|
|
1624
1624
|
return !Number.isFinite(m) || m <= 0 ? null : m;
|
|
1625
|
-
}, [Y]), Ce = D[0], Ne = !!(Ce &&
|
|
1626
|
-
const m = new Map(d.map((
|
|
1625
|
+
}, [Y]), Ce = D[0], Ne = !!(Ce && g >= Ce.minBundleSize), ae = k(() => {
|
|
1626
|
+
const m = new Map(d.map((r) => [r.id, r]));
|
|
1627
1627
|
let p = 0;
|
|
1628
|
-
for (const [
|
|
1629
|
-
const
|
|
1630
|
-
if (
|
|
1631
|
-
const b = m.get(
|
|
1632
|
-
Number.isFinite(y) && (p += y *
|
|
1628
|
+
for (const [r, _] of Object.entries(c)) {
|
|
1629
|
+
const x = _ ?? 0;
|
|
1630
|
+
if (x <= 0) continue;
|
|
1631
|
+
const b = m.get(r), y = Number(b == null ? void 0 : b.price);
|
|
1632
|
+
Number.isFinite(y) && (p += y * x);
|
|
1633
1633
|
}
|
|
1634
1634
|
return Math.round(p * 100) / 100;
|
|
1635
1635
|
}, [d, c]), oe = k(() => {
|
|
1636
|
-
if (!de) return
|
|
1637
|
-
const m =
|
|
1636
|
+
if (!de) return ae;
|
|
1637
|
+
const m = ae * (1 - de / 100);
|
|
1638
1638
|
return Math.round(m * 100) / 100;
|
|
1639
|
-
}, [de,
|
|
1639
|
+
}, [de, ae]), we = k(() => D.length ? Math.max(...D.map((m) => m.minBundleSize)) : 0, [D]), xe = k(() => {
|
|
1640
1640
|
const m = new Map(d.map((p) => [p.id, p]));
|
|
1641
1641
|
return I.map((p) => m.get(p)).filter((p) => !!p);
|
|
1642
1642
|
}, [d, I]), X = k(() => {
|
|
1643
1643
|
var p;
|
|
1644
1644
|
const m = /* @__PURE__ */ new Map();
|
|
1645
|
-
for (const
|
|
1646
|
-
const _ = Math.max(0,
|
|
1645
|
+
for (const r of D) {
|
|
1646
|
+
const _ = Math.max(0, r.minBundleSize - 1);
|
|
1647
1647
|
m.set(_, {
|
|
1648
|
-
discountPercent:
|
|
1649
|
-
minBundleSize:
|
|
1650
|
-
label: ((p =
|
|
1648
|
+
discountPercent: r.discountPercent,
|
|
1649
|
+
minBundleSize: r.minBundleSize,
|
|
1650
|
+
label: ((p = r.label) == null ? void 0 : p.trim()) || `Buy ${r.minBundleSize}+`
|
|
1651
1651
|
});
|
|
1652
1652
|
}
|
|
1653
1653
|
return m;
|
|
1654
1654
|
}, [D]), se = k(() => {
|
|
1655
1655
|
const m = Number((n == null ? void 0 : n.maxBundleSize) ?? NaN), p = Number.isFinite(m) ? Math.floor(m) : 100;
|
|
1656
1656
|
return Math.max(2, Math.min(100, p));
|
|
1657
|
-
}, [n == null ? void 0 : n.maxBundleSize]), ke = ((le = n == null ? void 0 : n.title) == null ? void 0 : le.trim()) || "Build your bundle",
|
|
1657
|
+
}, [n == null ? void 0 : n.maxBundleSize]), ke = ((le = n == null ? void 0 : n.title) == null ? void 0 : le.trim()) || "Build your bundle", ge = k(() => Math.max(we || A, xe.length), [xe.length, we, A]), he = g >= se, ye = J(null), me = J(null), fe = J(g);
|
|
1658
1658
|
V(() => {
|
|
1659
1659
|
const m = fe.current;
|
|
1660
|
-
if (fe.current =
|
|
1660
|
+
if (fe.current = g, g <= m) return;
|
|
1661
1661
|
const p = me.current;
|
|
1662
1662
|
if (!p) return;
|
|
1663
|
-
const
|
|
1664
|
-
if (
|
|
1663
|
+
const r = D.some((y) => y.minBundleSize === g), _ = D.find((y) => y.minBundleSize > g), x = _ && r ? _.minBundleSize - 1 : _ ? null : g - 1;
|
|
1664
|
+
if (x == null || x < 0) return;
|
|
1665
1665
|
const b = requestAnimationFrame(() => {
|
|
1666
|
-
const y = p.querySelector(`[data-box-slot="${
|
|
1666
|
+
const y = p.querySelector(`[data-box-slot="${x}"]`);
|
|
1667
1667
|
if (!y) return;
|
|
1668
1668
|
const R = p.getBoundingClientRect(), B = y.getBoundingClientRect().right - R.right;
|
|
1669
1669
|
if (B <= 1) return;
|
|
@@ -1671,25 +1671,25 @@ function $r(o) {
|
|
|
1671
1671
|
p.scrollTo({ left: K, behavior: "smooth" });
|
|
1672
1672
|
});
|
|
1673
1673
|
return () => cancelAnimationFrame(b);
|
|
1674
|
-
}, [
|
|
1674
|
+
}, [g, D]);
|
|
1675
1675
|
const pe = (m) => {
|
|
1676
1676
|
const p = ye.current;
|
|
1677
1677
|
if (!p) return;
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1678
|
+
const r = p.querySelector(`[data-variant-row="${m}"]`);
|
|
1679
|
+
r && r.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1680
1680
|
};
|
|
1681
1681
|
return /* @__PURE__ */ S("section", { className: [f.panel, te].filter(Boolean).join(" "), "aria-busy": e, children: [
|
|
1682
1682
|
/* @__PURE__ */ s("header", { className: f.header, children: /* @__PURE__ */ s("h2", { className: f.title, children: ke }) }),
|
|
1683
1683
|
e ? /* @__PURE__ */ s("div", { className: f.status, children: "Loading…" }) : null,
|
|
1684
|
-
|
|
1684
|
+
i ? /* @__PURE__ */ s("div", { className: f.error, children: i }) : null,
|
|
1685
1685
|
!e && n && !n.isActive ? /* @__PURE__ */ s("div", { className: f.inactive, children: "Bundles are not active." }) : null,
|
|
1686
1686
|
ne && D.length ? /* @__PURE__ */ s("div", { className: f.section, children: /* @__PURE__ */ S("div", { className: f.rulesVisual, children: [
|
|
1687
1687
|
/* @__PURE__ */ s("div", { className: f.rulesLabelsRow, children: Array.from({ length: we }).map((m, p) => {
|
|
1688
|
-
const
|
|
1689
|
-
return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children:
|
|
1688
|
+
const r = p + 1, _ = D.find((b) => b.minBundleSize === r), x = _ ? `${Q(_.discountPercent)}% off` : null;
|
|
1689
|
+
return /* @__PURE__ */ s("div", { className: f.rulesLineLabelCell, children: x ? /* @__PURE__ */ s("span", { className: f.rulesLineLabel, children: x }) : null }, r);
|
|
1690
1690
|
}) }),
|
|
1691
1691
|
/* @__PURE__ */ s("div", { className: f.rulesLinesRow, children: Array.from({ length: we }).map((m, p) => {
|
|
1692
|
-
const
|
|
1692
|
+
const r = p + 1, _ = g >= r;
|
|
1693
1693
|
return /* @__PURE__ */ s(
|
|
1694
1694
|
"div",
|
|
1695
1695
|
{
|
|
@@ -1698,7 +1698,7 @@ function $r(o) {
|
|
|
1698
1698
|
_ ? f.rulesLineFilled : f.rulesLineEmpty
|
|
1699
1699
|
].filter(Boolean).join(" ")
|
|
1700
1700
|
},
|
|
1701
|
-
|
|
1701
|
+
r
|
|
1702
1702
|
);
|
|
1703
1703
|
}) })
|
|
1704
1704
|
] }) }) : null,
|
|
@@ -1706,23 +1706,23 @@ function $r(o) {
|
|
|
1706
1706
|
/* @__PURE__ */ s("div", { className: f.sectionTitle, children: "Select items" }),
|
|
1707
1707
|
/* @__PURE__ */ s("div", { className: f.variants, children: /* @__PURE__ */ s("ul", { className: f.variantList, children: w.map((m) => {
|
|
1708
1708
|
var b;
|
|
1709
|
-
const p = c[m.id] ?? 0,
|
|
1709
|
+
const p = c[m.id] ?? 0, r = ee(m.selectedOptions), _ = m.availableForSale === !1, x = !_ && !he;
|
|
1710
1710
|
return /* @__PURE__ */ S(
|
|
1711
1711
|
"li",
|
|
1712
1712
|
{
|
|
1713
1713
|
className: [
|
|
1714
1714
|
f.variantRow,
|
|
1715
|
-
|
|
1715
|
+
x ? f.variantRowInteractive : null,
|
|
1716
1716
|
p > 0 ? f.variantRowSelected : null,
|
|
1717
1717
|
_ ? f.variantRowSoldOut : null
|
|
1718
1718
|
].filter(Boolean).join(" "),
|
|
1719
1719
|
"data-variant-row": m.id,
|
|
1720
|
-
role:
|
|
1721
|
-
tabIndex:
|
|
1722
|
-
onClick:
|
|
1720
|
+
role: x ? "button" : void 0,
|
|
1721
|
+
tabIndex: x ? 0 : void 0,
|
|
1722
|
+
onClick: x ? () => {
|
|
1723
1723
|
G(m.id, p + 1);
|
|
1724
1724
|
} : void 0,
|
|
1725
|
-
onKeyDown:
|
|
1725
|
+
onKeyDown: x ? (y) => {
|
|
1726
1726
|
(y.key === "Enter" || y.key === " ") && (y.preventDefault(), G(m.id, p + 1), pe(m.id));
|
|
1727
1727
|
} : void 0,
|
|
1728
1728
|
"aria-label": _ ? `${m.displayName} is sold out` : `Add ${m.displayName} to bundle`,
|
|
@@ -1741,7 +1741,7 @@ function $r(o) {
|
|
|
1741
1741
|
/* @__PURE__ */ S("div", { className: f.variantContent, children: [
|
|
1742
1742
|
/* @__PURE__ */ S("div", { className: f.variantHeader, children: [
|
|
1743
1743
|
/* @__PURE__ */ s("div", { className: f.variantTitle, children: m.displayName }),
|
|
1744
|
-
|
|
1744
|
+
r ? /* @__PURE__ */ s("div", { className: f.variantMeta, children: r }) : null
|
|
1745
1745
|
] }),
|
|
1746
1746
|
/* @__PURE__ */ S("div", { className: f.variantFooterRow, children: [
|
|
1747
1747
|
/* @__PURE__ */ s("div", { className: f.variantPrice, children: ue(m.price) }),
|
|
@@ -1804,38 +1804,38 @@ function $r(o) {
|
|
|
1804
1804
|
}) }) })
|
|
1805
1805
|
] }) : null,
|
|
1806
1806
|
/* @__PURE__ */ S("footer", { className: f.footer, children: [
|
|
1807
|
-
/* @__PURE__ */ s("div", { className: f.boxSummaryWindow, ref: me, children: /* @__PURE__ */ s("div", { className: f.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length:
|
|
1807
|
+
/* @__PURE__ */ s("div", { className: f.boxSummaryWindow, ref: me, children: /* @__PURE__ */ s("div", { className: f.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: ge }).map((m, p) => {
|
|
1808
1808
|
var B, E, K, _e;
|
|
1809
|
-
const
|
|
1809
|
+
const r = xe[p], _ = X.get(p), x = !!r, b = !!_, y = b && !x, R = _ ? `${_.discountPercent}% off` : null, U = x ? r.displayName : `Slot ${p + 1}`;
|
|
1810
1810
|
return /* @__PURE__ */ S("div", { "data-box-slot": p, className: f.boxSlot, children: [
|
|
1811
1811
|
/* @__PURE__ */ s(
|
|
1812
1812
|
"div",
|
|
1813
1813
|
{
|
|
1814
1814
|
className: [
|
|
1815
1815
|
f.boxItem,
|
|
1816
|
-
|
|
1816
|
+
x ? f.boxItemFilled : f.boxItemPlaceholder,
|
|
1817
1817
|
b ? f.boxItemThreshold : null,
|
|
1818
|
-
|
|
1818
|
+
x ? f.boxItemClickable : null
|
|
1819
1819
|
].filter(Boolean).join(" "),
|
|
1820
|
-
role:
|
|
1821
|
-
tabIndex:
|
|
1822
|
-
onClick:
|
|
1823
|
-
onKeyDown:
|
|
1824
|
-
(be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(
|
|
1820
|
+
role: x ? "button" : void 0,
|
|
1821
|
+
tabIndex: x ? 0 : void 0,
|
|
1822
|
+
onClick: x ? () => pe(r.id) : void 0,
|
|
1823
|
+
onKeyDown: x ? (be) => {
|
|
1824
|
+
(be.key === "Enter" || be.key === " ") && (be.preventDefault(), pe(r.id));
|
|
1825
1825
|
} : void 0,
|
|
1826
1826
|
"aria-label": y && R ? `${U}. Unlocks ${R}.` : U,
|
|
1827
1827
|
title: y && R ? `${U} • Unlocks ${R}` : U,
|
|
1828
|
-
children:
|
|
1828
|
+
children: x ? (B = r.image) != null && B.url ? /* @__PURE__ */ s(
|
|
1829
1829
|
"img",
|
|
1830
1830
|
{
|
|
1831
1831
|
className: f.boxItemImage,
|
|
1832
|
-
src:
|
|
1833
|
-
alt:
|
|
1832
|
+
src: r.image.url,
|
|
1833
|
+
alt: r.image.altText ?? r.displayName,
|
|
1834
1834
|
width: 1,
|
|
1835
1835
|
height: 1,
|
|
1836
1836
|
loading: "lazy"
|
|
1837
1837
|
}
|
|
1838
|
-
) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E =
|
|
1838
|
+
) : /* @__PURE__ */ s("div", { className: f.boxItemFallback, "aria-hidden": "true", children: ((_e = (K = (E = r.product) == null ? void 0 : E.title) == null ? void 0 : K.slice(0, 1)) == null ? void 0 : _e.toUpperCase()) ?? "•" }) : y && R ? /* @__PURE__ */ s("div", { className: f.boxItemDiscountText, children: R }) : /* @__PURE__ */ s("div", { className: f.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1839
1839
|
}
|
|
1840
1840
|
),
|
|
1841
1841
|
b ? /* @__PURE__ */ s("div", { className: f.boxThresholdLabel, children: _.label }) : null
|
|
@@ -1852,10 +1852,10 @@ function $r(o) {
|
|
|
1852
1852
|
"% Discount"
|
|
1853
1853
|
] }) : /* @__PURE__ */ s("span", {}),
|
|
1854
1854
|
/* @__PURE__ */ s("span", { children: de ? /* @__PURE__ */ S(Xe, { children: [
|
|
1855
|
-
/* @__PURE__ */ s("span", { className: f.ctaTotalsStrike, children: ue(
|
|
1855
|
+
/* @__PURE__ */ s("span", { className: f.ctaTotalsStrike, children: ue(ae.toFixed(2)) }),
|
|
1856
1856
|
" ",
|
|
1857
1857
|
/* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(oe.toFixed(2)) })
|
|
1858
|
-
] }) : /* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(
|
|
1858
|
+
] }) : /* @__PURE__ */ s("span", { className: f.ctaTotalsPrice, children: ue(ae.toFixed(2)) }) })
|
|
1859
1859
|
] })
|
|
1860
1860
|
}
|
|
1861
1861
|
) }),
|
|
@@ -1882,7 +1882,7 @@ function vt(o) {
|
|
|
1882
1882
|
const e = /\/(\d+)$/.exec(o);
|
|
1883
1883
|
return e ? e[1] : o;
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Pi() {
|
|
1886
1886
|
window.location.reload();
|
|
1887
1887
|
}
|
|
1888
1888
|
async function Ee(o, e) {
|
|
@@ -1895,12 +1895,12 @@ async function Ee(o, e) {
|
|
|
1895
1895
|
body: JSON.stringify(e)
|
|
1896
1896
|
});
|
|
1897
1897
|
if (!t.ok) {
|
|
1898
|
-
const
|
|
1899
|
-
throw new Error(
|
|
1898
|
+
const i = await t.text().catch(() => "");
|
|
1899
|
+
throw new Error(i || `Cart request failed: ${t.status}`);
|
|
1900
1900
|
}
|
|
1901
1901
|
return t.json().catch(() => null);
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function Ei() {
|
|
1904
1904
|
return {
|
|
1905
1905
|
async linesAdd(o) {
|
|
1906
1906
|
const e = o.map((t) => ({
|
|
@@ -1931,7 +1931,7 @@ function Er() {
|
|
|
1931
1931
|
await Ee("/cart/change.js", { id: e, quantity: 0 });
|
|
1932
1932
|
},
|
|
1933
1933
|
openCartUI() {
|
|
1934
|
-
window.setTimeout(() =>
|
|
1934
|
+
window.setTimeout(() => Pi(), 0);
|
|
1935
1935
|
},
|
|
1936
1936
|
navigateToCheckout() {
|
|
1937
1937
|
window.location.href = "/checkout";
|
|
@@ -1939,13 +1939,13 @@ function Er() {
|
|
|
1939
1939
|
};
|
|
1940
1940
|
}
|
|
1941
1941
|
export {
|
|
1942
|
-
|
|
1943
|
-
$
|
|
1944
|
-
|
|
1942
|
+
Di as BundleBuilderDrawer,
|
|
1943
|
+
$i as BundleBuilderPanel,
|
|
1944
|
+
Li as BundleButton,
|
|
1945
1945
|
$e as BundleLineAttributeKeys,
|
|
1946
|
-
|
|
1947
|
-
|
|
1946
|
+
Fi as BundleProvider,
|
|
1947
|
+
Ei as createLiquidCartAdapter,
|
|
1948
1948
|
ze as useBundleBuilder,
|
|
1949
|
-
|
|
1949
|
+
Ai as useBundleBuilderDrawer
|
|
1950
1950
|
};
|
|
1951
1951
|
//# sourceMappingURL=index.js.map
|