yt-uikit 0.7.344-refactorBundleBuilder.0 → 0.7.344-refactorBundleBuilder.2
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/esm/index.js +129 -299
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2819,177 +2819,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
2819
2819
|
&:hover {
|
|
2820
2820
|
border-color: ${({$themeColor:e})=>e||"#000"};
|
|
2821
2821
|
}
|
|
2822
|
-
`,Kp=n((({removeCartItem:e,addCartItem:n,getProductDetailsByVariantId:r,themeColor:a,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,productClaimCtaButtonText:f,backgroundSubdued:g,primaryTextColor:h},x)=>{const[y,b]=Wt(tn),v=Vt(Ut),w=o(null),[C,k]=c(null),[E,T]=c(!1),[S,B]=c({}),[$,z]=c(y?.variantId),[_,D]=c(y?.quantity||1),[I,N]=c(!1),[P,O]=c(null);l((()=>{const e=localStorage.getItem("yt_variant_options");if(e)try{const t=JSON.parse(e);Array.isArray(t)&&O({options:t})}catch(e){console.error("Failed to parse yt_variant_options from localStorage",e)}}),[]),l((()=>{y?.open?setTimeout((()=>{N(!0)}),10):N(!1)}),[y?.open]);l((()=>{(async()=>{if(!C&&r&&y?.variantId&&y?.handle){const e=await r(y.handle,y.variantId);if(e&&e.variants&&e.options){let t;const n=y.allowedVariantIds;if(t=y.freebieSelection&&Array.isArray(n)&&n.length>0?e.variants.find((e=>e.available&&n.includes(String(e.id)))):e.variants.find((e=>e.available&&String(e.id)===String(y.variantId))),t){z(String(t.id));const n={};e.options.forEach(((e,r)=>{n[e.name]=t[`option${r+1}`]})),B(n)}else z(void 0),B({})}k(e)}})()}),[C,r,y]);const A=(e,t)=>{const n={...S,[e]:t};B(n);const r=C?.variants?.find((e=>C.options.every(((t,r)=>e[`option${r+1}`]===n[t.name]))));r&&(y?.freebieSelection&&Array.isArray(y.allowedVariantIds)&&y.allowedVariantIds.length>0?y.allowedVariantIds.includes(String(r.id))&&z(String(r.id)):z(String(r.id)))},F=C?.variants?.find((e=>String(e.id)===String($))),M=sn(v,v?.currency),R=i((()=>{const e={};if(!C)return e;const t=y?.freebieSelection&&Array.isArray(y?.allowedVariantIds)&&y.allowedVariantIds.length>0,n=y.allowedVariantIds;return C.options.forEach((r=>{e[r.name]=r.values.filter((e=>C.variants.filter((t=>{const n=C.options.indexOf(r);if(t[`option${n+1}`]!==e)return!1;return!!C.options.every(((e,n)=>{if(e.name===r.name)return!0;const o=S[e.name];return!o||t[`option${n+1}`]===o}))&&!!t.available})).some((e=>!t||n?.includes(String(e.id))))))})),e}),[C,S,y]);return C?t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:y?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:I?1:0,transition:"opacity 0.3s ease"},onClick:()=>{N(!1),setTimeout((()=>{b({open:!1,variantId:void 0,handle:void 0,quantity:void 0})}),300)}}),t.createElement(zp,{ref:x,className:"yt-variant-selection-popup"},t.createElement(Dp,{ref:w,style:{backgroundColor:p||"white",opacity:I?1:0,transform:I?"translateY(0)":"translateY(20px)"},$themeColor:a,onClick:e=>e.stopPropagation()},y?.freebieSelection&&t.createElement(_p,null,"Unlocked Freebie"),t.createElement(Np,null,t.createElement(Pp,null,t.createElement(Op,null,t.createElement(Ap,{src:F?.featured_image?.src??C?.featured_image,alt:F?.featured_image?.alt??C?.title})),t.createElement(Fp,null,t.createElement(Mp,{$themeColor:a,$primaryTextColor:h,href:`${C?.url}?variant=${F?.id}`},C?.title),t.createElement(Yp,null,t.createElement(Rp,null,t.createElement(Lp,{$primaryTextColor:h},M,cn(F?.price,v?.currency??"INR")),F?.compare_at_price&&t.createElement(jp,null,M,cn(F?.compare_at_price,v?.currency??"INR"))),!y?.freebieSelection&&t.createElement(aa,{value:_,handleItemQuantityIncrement:async()=>{D((e=>e+1))},handleItemQuantityDecrement:async()=>{_>1&&D((e=>e-1))},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:g})))),C?.options?.map((e=>{const n=P?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()));return t.createElement(Hp,{key:e.name},t.createElement(Up,null,t.createElement("span",null,"Select ",e.name),S[e.name]&&t.createElement(Gp,null,S[e.name])),t.createElement(qp,null,R[e.name]?.map((r=>{const o=S[e.name]===r,i=n?.values?.find((e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()));return"color"===n?.type&&i?.value?t.createElement(Qp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$colorValue:i.value}):"image"===n?.type&&i?.value?t.createElement(Zp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$imageUrl:i.value}):t.createElement(Wp,{$themeColor:a,key:r,$isSelected:o,backgroundColor:o?a:void 0,onClick:()=>A(e.name,r)},r)}))))}))),t.createElement(Vp,{$themeColor:a??"#C33",onClick:y?.productRec?async()=>{if($&&n){T(!0);try{await n($,_,"product-recommendation-variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,productRec:!1})}catch(e){console.error("Error adding item from product recommendation:",e)}T(!1)}}:async()=>{if(!$)return;const t=!!y?.lineItemKey,r=String($)!==String(y?.variantId);if(!t||r){T(!0);try{const t=y?.freebieSelection;t&&u&&y?.lineItemKey?await u(y.lineItemKey):await e(y?.lineItemKey||y?.variantId,"variant-selector",!0),t&&m?await m($,y.allowedVariantIds):n&&$&&await n($,_,"variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})}catch(e){}T(!1)}else b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})},disabled:!$||E},E?t.createElement(Vo,{color:"white",size:13}):y?.productRec?"ADD TO BAG":y?.freebieSelection?f||"CLAIM FREEBIE":"GET IN BAG")))):t.createElement(zp,{ref:x},t.createElement(Dp,{style:{backgroundColor:p||"white"}},t.createElement(Ip,null,t.createElement(Go,{color:a||"#868E96"}))))}));Kp.displayName="DesktopVariantPopup";const Xp=n((({removeCartItem:e,addCartItem:n,getProductDetailsByVariantId:r,themeColor:a,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,productClaimCtaButtonText:f,backgroundSubdued:g,primaryTextColor:h},x)=>{const[y,b]=Wt(tn),v=Vt(Ut),[w,C]=c(null),[k,E]=c(!1),[T,S]=c({}),[B,$]=c(y?.variantId),[z,_]=c(y?.quantity||1),D=o(null),[I,N]=c(null),[P,O]=c(!1);l((()=>{const e=localStorage.getItem("yt_variant_options");if(e)try{const t=JSON.parse(e);Array.isArray(t)&&N({options:t})}catch(e){console.error("Failed to parse yt_variant_options from localStorage",e)}}),[]),l((()=>{y?.open?setTimeout((()=>{O(!0)}),10):O(!1)}),[y?.open]);l((()=>{(async()=>{if(!w&&r&&y?.variantId&&y?.handle)try{const e=await r(y.handle,y.variantId);if(!e)return;if(!e.variants||!Array.isArray(e.variants))return;if(e&&e.variants&&e.options){let t;const n=y.allowedVariantIds;if(t=y.freebieSelection&&Array.isArray(n)&&n.length>0?e.variants.find((e=>e.available&&n.includes(String(e.id)))):e.variants.find((e=>e.available&&String(e.id)===String(y.variantId))),t){$(String(t.id));const n={};e.options.forEach(((e,r)=>{n[e.name]=t[`option${r+1}`]})),S(n)}else $(void 0),S({})}C(e)}catch(e){}})()}),[w,r,y]),l((()=>{}),[p,e,n,r]);const A=(e,t)=>{const n={...T,[e]:t};S(n);const r=w?.variants?.find((e=>w.options.every(((t,r)=>e[`option${r+1}`]===n[t.name]))));r&&$(String(r.id))},F=w?.variants?.find((e=>String(e.id)===String(B))),M=sn(v,v?.currency),R=i((()=>{const e={};if(!w)return e;const t=y?.freebieSelection&&Array.isArray(y?.allowedVariantIds)&&y.allowedVariantIds.length>0,n=y.allowedVariantIds;return w.options.forEach((r=>{e[r.name]=r.values.filter((e=>w.variants.filter((t=>{const n=w.options.indexOf(r);if(t[`option${n+1}`]!==e)return!1;return!!w.options.every(((e,n)=>{if(e.name===r.name)return!0;const o=T[e.name];return!o||t[`option${n+1}`]===o}))&&!!t.available})).some((e=>!t||n?.includes(String(e.id))))))})),e}),[w,T,y]);return w?t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:y?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:P?1:0,transition:"opacity 0.3s ease"},onClick:()=>{O(!1),setTimeout((()=>{b({open:!1,variantId:void 0,handle:void 0,quantity:void 0})}),300)}}),t.createElement(zp,{ref:x,className:"yt-variant-selection-popup"},t.createElement(Dp,{ref:D,style:{backgroundColor:p||"white",opacity:P?1:0,transform:P?"translateY(0)":"translateY(20px)"},$themeColor:a,onClick:e=>e.stopPropagation()},y?.freebieSelection&&t.createElement(_p,null,"Unlocked Freebie"),t.createElement(Np,null,t.createElement(Pp,null,t.createElement(Op,null,t.createElement(Ap,{src:F?.featured_image?.src??w?.featured_image,alt:F?.featured_image?.alt??w?.title})),t.createElement(Fp,null,t.createElement(Mp,{$themeColor:a,$primaryTextColor:h,href:`${w?.url}?variant=${F?.id}`},w?.title),t.createElement(Yp,null,t.createElement(Rp,null,t.createElement(Lp,{$primaryTextColor:h},M,cn(F?.price,v?.currency??"INR")),F?.compare_at_price&&t.createElement(jp,null,M,cn(F?.compare_at_price,v?.currency??"INR"))),!y?.freebieSelection&&t.createElement(aa,{value:z,handleItemQuantityIncrement:async()=>{_((e=>e+1))},handleItemQuantityDecrement:async()=>{z>1&&_((e=>e-1))},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:g})))),w?.options?.map((e=>{const n=I?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()));return t.createElement(Hp,{key:e.name},t.createElement(Up,null,t.createElement("span",null,"Select ",e.name,":"),T[e.name]&&t.createElement(Gp,null,T[e.name])),t.createElement(qp,null,R[e.name]?.map((r=>{const o=T[e.name]===r,i=n?.values?.find((e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()));return"color"===n?.type&&i?.value?t.createElement(Qp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$colorValue:i.value}):"image"===n?.type&&i?.value?t.createElement(Zp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$imageUrl:i.value}):t.createElement(Wp,{$themeColor:a,key:r,$isSelected:o,backgroundColor:o?a:void 0,onClick:()=>A(e.name,r)},r)}))))}))),t.createElement(Vp,{$themeColor:a??"#C33",onClick:y?.productRec?async()=>{if(B&&n){E(!0);try{await n(B,z,"product-recommendation-variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,productRec:!1})}catch(e){console.error("Error adding item from product recommendation:",e)}E(!1)}}:async()=>{if(!B)return;const t=!!y?.lineItemKey,r=String(B)!==String(y?.variantId);if(!t||r){E(!0);try{const t=y?.freebieSelection;t&&u&&y?.lineItemKey?await u(y.lineItemKey):await e(y?.lineItemKey||y?.variantId,"variant-selector",!0),t&&m?await m(B,y.allowedVariantIds):n&&B&&await n(B,z,"variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})}catch(e){}E(!1)}else b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})},disabled:!B||k},k?t.createElement(Vo,{color:"white",size:13}):y?.productRec?"ADD TO BAG":y?.freebieSelection?f||"CLAIM FREEBIE":"GET IN BAG")))):t.createElement(zp,{ref:x},t.createElement(Dp,{style:{backgroundColor:p||"white"}},t.createElement(Ip,null,t.createElement(Go,{color:a||"#868E96"}))))})),Jp=({exploreCTAColor:e,checkoutFontSize:n,handleDecrement:r,handleIncrement:a,removeCartItem:i,addCartItem:d,cartTitle:s,emptyCartTitle:p,emptyCartDescription:u,emptyCartButtons:m,backgroundColor:f,backgroundSubdued:h,tertiaryColor:x,tertiaryTextColor:y,backdrop:b=!0,cartData:v,isUserSignedIn:w,showBundle:C,showCouponOptions:k,bundleProducts:E,discountAmountOff:T,loyaltyIcon:S,pointsToBeUsed:B,rewardMultiplier:$,redemptionMultiplier:z,removeDiscount:_,applyDiscount:D,discountApplied:I,rewardCoupons:N,userTotalPoints:P,checkoutFunction:O,joinNowFunction:A,guestLoyaltyPercentage:F,showToggleButton:M,isOpen:R,setIsOpen:L,isDev:j,switchWidthVariant:V,recProductsList:H,showMultiStepProgressBar:W,cartCheckpoints:U,redemptionRate:G,pointsRewardRate:q,showCartLevelAltPay:Y,guestRewardCoupon:Q,showGuestDiscountCoupon:Z,applyTemplateDiscount:K,exploreCtaRedirectLink:X,discountAmountApplied:J,discountInCheckoutButton:ee,isStickyCheckout:te,showDiscountsListToGuestUsers:ne,showApplyCouponsButtonToGuestUsers:re,handleCheckpointCrossed:oe,customCartProgressBarCriteria:ae,checkoutButtonColor:ie,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,primaryTextColor:de,productRecsCtaButtonText:se,productRecsTitleText:pe,secondaryTextColor:ue,showProductRecsOnDesktop:me,showProductRecsOnMobile:fe,themeColor:ge,themeTextColor:he,companyName:xe,gstNumber:ye,showGSTOption:be,applyGSTToCart:ve,showMOVForProgressTiers:we,freeProduct:Ce,showLoyaltyCta:ke,freeProductAdjustedCartTotal:Ee,minimumOrderValueToAvailDiscount:Te,signinCTAButtonVisible:Se,cartSigninCTAMainText:Be,showNoteOption:$e,applyNoteToCart:ze,note:_e,inlineCartOfferInfoText:De,inlineCartOfferInfoRedirectLink:Ie,cartOfferTermsAndConditionsText:Ne,showEditOptionOnProducts:Pe,getProductDetailsByVariantId:Oe,onSetLoading:Ae,showVariantSelectionDropdownInProductRecs:Fe,originalCartSubtotal:Me,currentTier:Re,freebieProductsInCart:Le,showFreebieClaim:je,addFreebieToCart:Ve,freebiesInCart:He,effectiveQuantityForProgressBar:We,productPercentageOffMapping:Ue,productTagsMapping:Ge,removeFreebieFromCart:qe,postalCodeList:Ye,enableGeoLocationDeliveryRestriction:Qe,applyPostalCodeAndDeliverySlotToCart:Ze,showDeleteOnFreebies:Ke,freebieCouponTemplates:Xe,freebieFlowCheckpoints:Je,freebieClaimData:et,showStickyAddToCart:tt,stickyCartLineItem:nt,postalCodeBasedItemTrackingParameter:rt,enableSlotPicker:ot,deliveryHeaderTitle:at,deliveryAvailableText:it,deliveryNotAvailableText:lt,giftWrapSetupData:ct,giftWrapProductDetail:dt,enableCustomCartOnCartPage:st,isCartPage:pt,progressBarFreeProductIconType:ut,addToStickyCart:mt,productRecsCardLayout:ft,productRecsCardListVariant:gt,showCartTimer:ht,showFreebieMilestone:xt,freebieMilestoneData:yt,cartTimerInMinutes:bt,cartTimerCustomText:vt,imageAspectSelector:wt,cartComponentsCornerType:Ct,cartComponentsCornerRadius:kt,stickyCartCustomizationData:Et,cartOffersCarousalData:Tt,stickyBarBuyNowFunction:St,gstSectionCustomizationData:Bt,noteSectionTitle:$t,checkoutSectionMessage:zt,checkoutSectionMessageRedirectLink:_t,checkoutSectionMessageDisplay:Dt,showVariantSelectionDropdownInProductClaim:It,loyaltyDiscount:Nt,brandTokenName:Pt,showDiscountOnMRP:Ot,prefixMessageText:At,suffixMessageText:Ft,successMessageText:Mt,toggleDecimal:Rt,cartOffersCarouselHeight:Lt,disableCheckoutButton:jt,showEmptyCartRecommendations:Vt,emptyProductRecsTitleText:Gt,checkoutButtonBottomSpacing:qt,showPoweredByBadge:Yt=!0,applyCouponCode:Qt,showApplyCoupon:Zt,enableConfetti:Kt,showCheckoutButtonPaymentIcons:Xt=!0})=>{const Jt=Ht(Ut),[en,nn]=Wt(tn),[rn,on]=Wt(Hi),an=()=>L(!R);g((()=>{v&&Jt(v)}),[v]);const ln=o(null);l((()=>{function e(e){ln.current&&!ln.current.contains(e.target)&&(nn({open:!1,variantId:void 0,quantity:void 0,handle:void 0}),on({isOpen:!1}))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const[cn,dn]=c(!1);return l((()=>{const e=()=>{dn(window.innerWidth>=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),t.createElement(t.Fragment,null,t.createElement("div",{style:{position:st&&pt?"relative":"absolute",width:"100%",display:st&&pt?"flex":"block",alignItems:"center",justifyContent:"center"}},M&&!(st&&pt)&&t.createElement("button",{style:{margin:"16px"},onClick:an},R?"Close Drawer":"Open Drawer"),R&&b&&!(st&&pt)&&t.createElement("div",{onClick:an,id:"custom-cart-yt-overlay",style:{position:"fixed",top:0,right:0,zIndex:1e4,transform:"translateX(0)",backgroundColor:"rgba(0,0,0,0.5)",inset:0,height:"100%",width:"100%"}},""),t.createElement(dp,{isCartPage:pt,enableCustomCartOnCartPage:st,isOpen:R,setIsOpen:L,backgroundColor:f,backgroundSubdued:h??"#F5F5F5",tertiaryColor:x,tertiaryTextColor:y,exploreCTAColor:e,checkoutFontSize:n,cartTitle:s,handleDecrement:r,handleIncrement:a,removeCartItem:i,addCartItem:d,emptyCartTitle:p,emptyCartButtons:m,emptyCartDescription:u,showCouponOptions:k,showBundle:C,isUserSignedIn:w,bundleProducts:E,discountAmountOff:T,loyaltyIcon:S,pointsToBeUsed:B,rewardMultiplier:$,redemptionMultiplier:z,removeDiscount:_,applyDiscount:D,discountApplied:I,rewardCoupons:N,userTotalPoints:P,checkoutFunction:O,joinNowFunction:A,guestLoyaltyPercentage:F,isDev:j,switchWidthVariant:V,recProductsList:H,showMultiStepProgressBar:W,cartCheckpoints:U,redemptionRate:G,pointsRewardRate:q,showCartLevelAltPay:Y,guestRewardCoupon:Q,showGuestDiscountCoupon:Z,applyTemplateDiscount:K,exploreCtaRedirectLink:X,discountAmountApplied:J,discountInCheckoutButton:ee,isStickyCheckout:te,showDiscountsListToGuestUsers:ne,showApplyCouponsButtonToGuestUsers:re,handleCheckpointCrossed:oe,customCartProgressBarCriteria:ae??"minimum_order_value",checkoutButtonColor:ie,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,primaryTextColor:de,productRecsCtaButtonText:se,productRecsTitleText:pe,secondaryTextColor:ue,showProductRecsOnDesktop:me,showProductRecsOnMobile:fe,themeColor:ge,themeTextColor:he,companyName:xe,gstNumber:ye,showGSTOption:be,applyGSTToCart:ve,showMOVForProgressTiers:we,freeProduct:Ce,showLoyaltyCta:ke,freeProductAdjustedCartTotal:Ee,minimumOrderValueToAvailDiscount:Te,signinCTAButtonVisible:Se,cartSigninCTAMainText:Be,applyNoteToCart:ze,note:_e,showNoteOption:$e,inlineCartOfferInfoText:De,inlineCartOfferInfoRedirectLink:Ie,cartOfferTermsAndConditionsText:Ne,showEditOptionOnProducts:Pe,onSetLoading:Ae,showVariantSelectionDropdownInProductRecs:Fe,originalCartSubtotal:Me,currentTier:Re,freebieProductsInCart:Le,cartOffersCarousalData:Tt,showFreebieClaim:je,addFreebieToCart:Ve,freebiesInCart:He,effectiveQuantityForProgressBar:We,productPercentageOffMapping:Ue,productTagsMapping:Ge,removeFreebieFromCart:qe,postalCodeList:Ye,enableGeoLocationDeliveryRestriction:Qe,applyPostalCodeAndDeliverySlotToCart:Ze,showDeleteOnFreebies:Ke,freebieCouponTemplates:Xe,freebieFlowCheckpoints:Je,freebieClaimData:et,postalCodeBasedItemTrackingParameter:rt,enableSlotPicker:ot,deliveryHeaderTitle:at,deliveryAvailableText:it,deliveryNotAvailableText:lt,giftWrapSetupData:ct,giftWrapProductDetail:dt,progressBarFreeProductIconType:ut,productRecsCardLayout:ft,productRecsCardListVariant:gt,showCartTimer:ht,showFreebieMilestone:xt,freebieMilestoneData:yt,cartTimerCustomText:vt,cartTimerInMinutes:bt,imageAspectSelector:wt,cartComponentsCornerType:Ct,cartComponentsCornerRadius:kt,gstSectionCustomizationData:Bt,noteSectionTitle:$t,checkoutSectionMessage:zt,checkoutSectionMessageRedirectLink:_t,checkoutSectionMessageDisplay:Dt,showVariantSelectionDropdownInProductClaim:It,loyaltyDiscount:Nt,getProductDetailsByVariantId:Oe,brandTokenName:Pt,showDiscountOnMRP:Ot??!0,prefixMessageText:At,suffixMessageText:Ft,successMessageText:Mt,toggleDecimal:Rt,cartOffersCarouselHeight:Lt,disableCheckoutButton:jt,showEmptyCartRecommendations:Vt,emptyProductRecsTitleText:Gt,checkoutButtonBottomSpacing:qt,showPoweredByBadge:Yt,applyCouponCode:Qt,showApplyCoupon:Zt,enableConfetti:Kt,showCheckoutButtonPaymentIcons:Xt}),tt&&nt&&d&&t.createElement($p,{showStickyCart:tt,stickyCartCustomizationData:Et,product:nt,addCartItem:d,onSetLoading:Ae,themeColor:ge,themeTextColor:he,cartData:v,isCartOpen:R,setIsCartOpen:L,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,addToStickyCart:mt,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,checkoutFunction:St,backgroundColor:f,primaryTextColor:de}),cn&&en.open&&t.createElement(Kp,{backgroundColor:f,ref:ln,isDev:j,removeCartItem:i,addCartItem:d,getProductDetailsByVariantId:Oe,themeColor:ge,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,removeFreebieFromCart:qe,freebieClaimAddToCart:Ve,productClaimCtaButtonText:et?.productClaimCtaButtonText,backgroundSubdued:h??"#F5F5F5",primaryTextColor:de}),!cn&&en.open&&t.createElement(Xp,{ref:ln,isDev:j,removeCartItem:i,addCartItem:d,getProductDetailsByVariantId:Oe,themeColor:ge,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,backgroundColor:f,removeFreebieFromCart:qe,freebieClaimAddToCart:Ve,productClaimCtaButtonText:et?.productClaimCtaButtonText,backgroundSubdued:h??"#F5F5F5",primaryTextColor:de})))};L('@media (max-width: 108px) {\n .yt-fixed-bundle-price-section {\n width: 100% !important;\n }\n .yt-fixed-bundle-product-list {\n max-width: 100% !important;\n width: 100% !important;\n justify-content: center !important;\n }\n .price-text {\n text-align: center !important;\n }\n .bundle-builder-add-to-bundle-button {\n font-size: 12px !important;\n padding: 0px 8px !important;\n }\n .quantity .input-text.qty {\n width: 12px !important;\n height: 18px !important;\n }\n .quantity.buttons_added .minus,\n .quantity.buttons_added .plus {\n padding: 6px !important;\n height: 20px !important;\n }\n .bundle-builder-tracker-container {\n justify-content: center !important;\n }\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n .bundle-builder-title {\n font-size: 2rem !important;\n }\n .bundle-builder-tracker-item {\n width: 64px !important;\n height: 64px !important;\n }\n .bundle-builder-product-title {\n font-size: 14px !important;\n }\n}\n.hide-tracker-scrollbar {\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n\n.hide-tracker-scrollbar::-webkit-scrollbar {\n display: none;\n}\n\n.yt-fixed-bundle-border {\n border: 1px solid #c7c7c7;\n}\n\n.yt-fixed-bundle-border-minor-curved {\n border-radius: 8px;\n}\n\n.yt-fixed-bundle-border-minor-curved-image {\n border-radius: 6px;\n}\n\n.yt-fixed-bundle-border-major-curved {\n border-radius: 20px;\n}\n\n.yt-fixed-bundle-border-major-curved-image {\n border-radius: 18px;\n}\n\n@media (min-width: 1200px) {\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-builder-tracker-container {\n gap: 5px !important;\n margin-block: 0 !important;\n }\n .bundle-summary {\n display: flex;\n flex-direction: column !important;\n align-items: flex-start;\n gap: 2px !important;\n }\n .bundle-summary button {\n padding-top: 2px !important;\n padding-inline: 13px !important;\n font-size: 14px !important;\n padding-inline: 10px !important;\n padding: 0px;\n width: -webkit-fill-available;\n }\n .bundle-builder-tracker-progress {\n display: block !important;\n }\n .summary-info {\n width: 100% !important;\n min-width: 200px !important;\n display: flex;\n justify-content: space-between !important;\n flex-direction: row !important;\n flex-grow: 1 !important;\n font-size: 14px !important;\n }\n}\n@media (max-width: 540px) {\n .products-display {\n justify-content: space-between !important;\n column-gap: 5px !important;\n }\n .bundle-builder-product-container {\n width: 49% !important;\n }\n .bundle-builder-title {\n font-size: 1.5rem !important;\n margin-bottom: 8px !important;\n }\n .bundle-builder-subtitle {\n padding-top: 4px;\n font-size: 1rem !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-summary.bundle-filled {\n display: flex !important;\n }\n}\n.yt-bundle-builder-product-price {\n font-weight: 600;\n color: black;\n margin-bottom: 2px;\n}\n\n/* Fixed bundle block */\n.yt-fixed-bundle-fixed-bundle {\n box-sizing: unset;\n max-width: 1000px;\n margin: 0 auto;\n container-type: inline-size;\n text-align: left;\n}\n\n.yt-fixed-bundle-bundle-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n gap: 8px;\n line-height: normal;\n}\n\n.yt-fixed-bundle-bundle-title {\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n width: 100%;\n}\n\n.yt-fixed-bundle-bundle-subtitle {\n font-size: 16px;\n font-weight: 300;\n text-align: center;\n}\n\n.yt-fixed-bundle-bundle-content {\n display: flex;\n flex-direction: column;\n padding: 10px 0px;\n}\n\n.yt-fixed-bundle-product-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.yt-product-main {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-card {\n display: flex;\n width: 90%;\n align-items: flex-start;\n padding: 0px;\n box-shadow: 2px 2px 11.8px 0px rgba(0, 0, 0, 0.1411764706);\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n position: unset;\n}\n\n.yt-fixed-bundle-product-image {\n max-width: none;\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n}\n\n.yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n}\n\n.yt-fixed-bundle-product-title {\n font-size: 16px;\n font-weight: 700;\n display: block;\n line-height: 1.4;\n}\n\n.yt-fixed-bundle-product-price {\n font-size: 16px;\n display: block;\n margin-bottom: 6px;\n}\n\n.yt-fixed-bundle-original-price {\n text-decoration: line-through !important;\n color: #6b7280;\n margin-left: 4px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-checkbox {\n display: none !important;\n}\n\n.yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n}\n\n.yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n}\n\n.yt-fixed-bundle-variant-select {\n appearance: none;\n -webkit-appearance: none;\n width: 100%;\n padding: 4px 20px;\n background-color: #ffffff;\n font-size: 15px;\n background-image: none;\n color: #2d2d2d;\n cursor: pointer;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-variant-select:focus {\n border-color: #cac6c6;\n box-shadow: 0 0 8px 0 rgba(56, 55, 57, 0.3);\n outline: none;\n}\n\n.yt-fixed-bundle-select-dot {\n position: absolute;\n top: 50%;\n left: 10px;\n transform: translateY(-50%);\n font-weight: 700;\n color: #4d4d4d;\n width: 8px; /* Adjust size */\n font-size: 8px;\n border-radius: 50%;\n pointer-events: none;\n}\n\n.yt-fixed-bundle-select-dot::after {\n content: "";\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background-color: #1b1b1b;\n}\n\n.yt-fixed-bundle-select-icon {\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n pointer-events: none;\n color: #6b7280;\n background-color: rgba(30, 57, 103, 0.1);\n font-size: 20px;\n height: 100%;\n padding: 0px 5px;\n}\n\n.yt-fixed-bundle-plus-sign {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-plus-sign span {\n display: flex;\n justify-content: center;\n width: 24px;\n height: 22px;\n align-items: center;\n padding-bottom: 2px;\n background-color: #f2f2f2;\n color: black;\n border-radius: 2px;\n font-size: 20px;\n font-weight: bold;\n}\n\n.yt-fixed-bundle-price-section {\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n width: 1000px;\n}\n\n.yt-fixed-bundle-subtotal {\n font-size: 13px;\n font-weight: 400 !important;\n}\n\n.yt-fixed-bundle-subtotal-amount {\n font-weight: 600;\n font-size: 13px;\n}\n\n.yt-fixed-bundle-deal-price-container {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 12px;\n gap: 8px;\n margin-top: 3px;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-deal-price {\n font-size: 16px;\n font-weight: 600;\n}\n\n.yt-fixed-bundle-extra-savings {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700 !important;\n}\n\n.yt-fixed-bundle-add-to-cart-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background-color: #8b5cf6;\n border: none;\n padding: 8px 0px;\n font-size: 16px;\n font-weight: 500 !important;\n cursor: pointer;\n width: 100%;\n}\n\n.yt-fixed-bundle-add-to-cart-button:disabled,\n.yt-fixed-bundle-add-to-cart-button[disabled] {\n color: #7d7d7d;\n cursor: default;\n}\n\n.yt-fixed-bundle-product-card.horizontal {\n max-width: 100%;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-product-card.horizontal:hover {\n transform: none;\n}\n\n.yt-fixed-bundle-product-list.horizontal {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n}\n\n.yt-product-main.horizontal {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-image-container.horizontal {\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n width: 30%;\n}\n\n.yt-fixed-bundle-product-image.horizontal {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n user-select: none;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop.horizontal {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile.horizontal {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop.horizontal {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-product-details.horizontal {\n padding-left: 0px;\n}\n\n.yt-fixed-bundle-product-price.horizontal {\n margin-bottom: 0px;\n}\n\n@media (min-width: 100px) {\n @container (width > 100px) {\n .yt-fixed-bundle-fixed-bundle {\n padding: 40px;\n }\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: flex;\n width: 100%;\n bottom: 6px;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n display: none;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n }\n .yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n }\n .yt-fixed-bundle-variant-select {\n margin: 0px 4px;\n }\n .yt-fixed-bundle-select-icon {\n right: 4px;\n }\n .yt-fixed-bundle-bundle-title {\n font-size: 32px;\n }\n .yt-fixed-bundle-bundle-subtitle {\n font-size: 20px;\n }\n .yt-fixed-bundle-bundle-content {\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n .yt-fixed-bundle-product-list {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n }\n .yt-fixed-bundle-product-card {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n text-align: center;\n }\n .yt-fixed-bundle-product-image-container {\n width: 100%;\n height: 100%;\n margin-right: 0;\n margin-bottom: 12px;\n justify-content: center;\n position: relative;\n }\n .yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n }\n .yt-fixed-bundle-product-image {\n height: 230px;\n width: 100%;\n aspect-ratio: 1;\n align-self: center;\n }\n .yt-fixed-bundle-plus-sign {\n align-self: center;\n margin-left: 0;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n margin-top: 32px;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 10px;\n }\n .yt-fixed-bundle-subtotal {\n font-size: 15px;\n }\n .yt-fixed-bundle-subtotal-amount {\n font-size: 15px;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n top: 8px;\n left: 10px;\n height: auto;\n display: flex;\n align-items: center;\n }\n .yt-fixed-bundle-deal-price {\n font-size: 24px;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 13px;\n padding: 4px 8px;\n }\n .yt-fixed-bundle-add-to-cart-button {\n font-size: 20px;\n padding: 10px 0px;\n width: 100%;\n }\n .yt-product-main {\n width: 29%;\n }\n .yt-fixed-bundle-product-card:hover {\n transform: translateY(-5px);\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1411764706);\n }\n }\n}\n.yt-product-main {\n display: flex;\n position: relative;\n}\n\n/* Container query */\n@container (max-width: 100px) {\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n }\n .yt-product-main {\n width: 100%;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n bottom: 6px;\n }\n .yt-fixed-bundle-product-image {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n }\n .yt-fixed-bundle-variant-select-wrapper {\n position: relative;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n }\n .yt-fixed-bundle-product-card {\n max-width: 100%;\n flex-direction: row;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n }\n}\n.yt-product-card-transition {\n opacity: 0;\n transform: translateY(20px);\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n}\n\n.yt-product-card-transition-up {\n opacity: 0;\n transform: translateY(-20px);\n transition: opacity 0.6s ease, transform 0.6s ease;\n}\n\n.yt-product-card-transition-active {\n opacity: 1;\n transform: translateY(0);\n}\n\n.yt-description-content img {\n max-width: 100%;\n height: auto;\n display: block;\n margin: 0 auto 15px;\n border-radius: 7px;\n}\n\n.yt-description-content {\n text-align: left;\n overflow-wrap: break-word;\n}'),x.div`
|
|
2823
|
-
display: flex;
|
|
2824
|
-
flex-direction: row;
|
|
2825
|
-
height: 100%;
|
|
2826
|
-
background-color: #e7e7e7;
|
|
2827
|
-
width: 100%;
|
|
2828
|
-
font-weight: 600;
|
|
2829
|
-
`,x.button`
|
|
2830
|
-
display: flex;
|
|
2831
|
-
align-items: center;
|
|
2832
|
-
justify-content: center;
|
|
2833
|
-
width: 33%;
|
|
2834
|
-
cursor: pointer;
|
|
2835
|
-
background-color: #f2f2f2;
|
|
2836
|
-
user-select: none;
|
|
2837
|
-
&:hover {
|
|
2838
|
-
font-size: 17px;
|
|
2839
|
-
}
|
|
2840
|
-
border: none;
|
|
2841
|
-
|
|
2842
|
-
&:disabled {
|
|
2843
|
-
cursor: not-allowed;
|
|
2844
|
-
}
|
|
2845
|
-
`,x.div`
|
|
2846
|
-
display: flex;
|
|
2847
|
-
align-items: center;
|
|
2848
|
-
justify-content: center;
|
|
2849
|
-
border: 0;
|
|
2850
|
-
width: 100%;
|
|
2851
|
-
font-size: 14px;
|
|
2852
|
-
`;const eu=x.button`
|
|
2853
|
-
font-weight: 600;
|
|
2854
|
-
width: 100%;
|
|
2855
|
-
cursor: pointer;
|
|
2856
|
-
border: none;
|
|
2857
|
-
padding: 0;
|
|
2858
|
-
height: 40px;
|
|
2859
|
-
position: relative;
|
|
2860
|
-
overflow: hidden;
|
|
2861
|
-
display: flex;
|
|
2862
|
-
justify-content: center;
|
|
2863
|
-
align-items: center;
|
|
2864
|
-
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
2865
|
-
&.shifted {
|
|
2866
|
-
transform: translateX(100%);
|
|
2867
|
-
opacity: 0;
|
|
2868
|
-
}
|
|
2869
|
-
|
|
2870
|
-
&:disabled {
|
|
2871
|
-
cursor: not-allowed;
|
|
2872
|
-
background-color: #e7e7e7;
|
|
2873
|
-
color:rgba(0, 0, 0, 0.44);
|
|
2874
|
-
}
|
|
2875
|
-
`;x.div`
|
|
2876
|
-
position: absolute;
|
|
2877
|
-
background-color: "#e7e7e7";
|
|
2878
|
-
top: 0;
|
|
2879
|
-
left: 0;
|
|
2880
|
-
right: 0;
|
|
2881
|
-
bottom: 0;
|
|
2882
|
-
display: flex;
|
|
2883
|
-
align-items: center;
|
|
2884
|
-
justify-content: center;
|
|
2885
|
-
transition: transform 0.3s ease;
|
|
2886
|
-
transform: translateX(-100%); /* Start off-screen to the left */
|
|
2887
|
-
|
|
2888
|
-
&.visible {
|
|
2889
|
-
transform: translateX(0); /* Slide in from the left */
|
|
2890
|
-
}
|
|
2891
|
-
`;const tu=x.div`
|
|
2892
|
-
background-color: ${({backgroundColor:e})=>e||"#fff"};
|
|
2893
|
-
display: flex;
|
|
2894
|
-
flex-direction: column;
|
|
2895
|
-
width: 280px;
|
|
2896
|
-
row-gap: 8px;
|
|
2897
|
-
justify-content: space-between;
|
|
2898
|
-
cursor: pointer;
|
|
2899
|
-
border-radius: ${({borderRadius:e})=>e};
|
|
2900
|
-
border: ${({borderColor:e})=>"transparent"!==e?`1px solid ${e}`:"none"};
|
|
2901
|
-
transition: transform 0.6s ease, box-shadow 0.6s ease;
|
|
2902
|
-
overflow: hidden;
|
|
2903
|
-
${({shadowType:e})=>"none"===e?"box-shadow: none;":"spread"===e?"box-shadow: 8px 8px 8px -6px #0000004D;":"no-spread"===e?"box-shadow: 6px 6px 0px -1px #00000033;":void 0}
|
|
2904
|
-
`;x.div`
|
|
2905
|
-
display: flex;
|
|
2906
|
-
position: relative;
|
|
2907
|
-
flex-direction: column;
|
|
2908
|
-
padding: 0px;
|
|
2909
|
-
`,x.img`
|
|
2910
|
-
width: 100%;
|
|
2911
|
-
height: auto;
|
|
2912
|
-
object-fit: cover;
|
|
2913
|
-
aspect-ratio: ${({aspectRatio:e})=>e};
|
|
2914
|
-
background: #e2e2e2;
|
|
2915
|
-
border-top-left-radius: ${({borderRadius:e})=>e};
|
|
2916
|
-
border-top-right-radius: ${({borderRadius:e})=>e};
|
|
2917
|
-
transition: transform 0.3s ease;
|
|
2918
|
-
`,x.select`
|
|
2919
|
-
border: 1px solid #c7c7c7;
|
|
2920
|
-
padding: 8px;
|
|
2921
|
-
position: absolute;
|
|
2922
|
-
width: 98%;
|
|
2923
|
-
height: 38px;
|
|
2924
|
-
bottom: 4px;
|
|
2925
|
-
right: 3px;
|
|
2926
|
-
background-color: #f5f5f5;
|
|
2927
|
-
font-size: 14px;
|
|
2928
|
-
cursor: pointer;
|
|
2929
|
-
opacity: 0.8;
|
|
2930
|
-
${({isCoralHaze:e})=>e&&"appearance: auto;"}
|
|
2931
|
-
padding-left: 10px;
|
|
2932
|
-
|
|
2933
|
-
appearance: none;
|
|
2934
|
-
-webkit-appearance: none;
|
|
2935
|
-
-moz-appearance: none;
|
|
2936
|
-
|
|
2937
|
-
background-image: none !important;
|
|
2938
|
-
marginBottom: 0 !important;
|
|
2939
|
-
`,x.div`
|
|
2940
|
-
font-size: 18px;
|
|
2941
|
-
padding: ${({showBorder:e})=>e?"0 10px":"0 4px"};
|
|
2942
|
-
font-weight: var(--yt-bundle-font-weight, bold);
|
|
2943
|
-
color: #333;
|
|
2944
|
-
line-height: normal;
|
|
2945
|
-
margin-top: ${({isMobile:e})=>e?"4px":"0px"};
|
|
2946
|
-
display: -webkit-box;
|
|
2947
|
-
-webkit-line-clamp: 2;
|
|
2948
|
-
-webkit-box-orient: vertical;
|
|
2949
|
-
overflow: hidden;
|
|
2950
|
-
text-overflow: ellipsis;
|
|
2951
|
-
`,x.div`
|
|
2952
|
-
margin-bottom: 5px;
|
|
2953
|
-
padding: ${({showBorder:e})=>e?"0 10px":"0 4px"};
|
|
2954
|
-
`,x.div`
|
|
2955
|
-
position: relative;
|
|
2956
|
-
width: 100%;
|
|
2957
|
-
height: 40px;
|
|
2958
|
-
`,x(eu)`
|
|
2959
|
-
background-color: #747474;
|
|
2960
|
-
border-radius: ${({borderRadius:e})=>e};
|
|
2961
|
-
color: #fff;
|
|
2962
|
-
display: flex;
|
|
2963
|
-
justify-content: space-between;
|
|
2964
|
-
overflow: hidden;
|
|
2965
|
-
height: 40px;
|
|
2966
|
-
`,x.div`
|
|
2967
|
-
flex: 1;
|
|
2968
|
-
text-align: center;
|
|
2969
|
-
font-size: 14px;
|
|
2970
|
-
background-color: #747474;
|
|
2971
|
-
color: #fff;
|
|
2972
|
-
padding: 10px 0;
|
|
2973
|
-
display: flex;
|
|
2974
|
-
align-items: center;
|
|
2975
|
-
justify-content: center;
|
|
2976
|
-
cursor: default;
|
|
2977
|
-
`,x.div`
|
|
2978
|
-
width: 25%;
|
|
2979
|
-
background-color: #111;
|
|
2980
|
-
display: flex;
|
|
2981
|
-
align-items: center;
|
|
2982
|
-
justify-content: center;
|
|
2983
|
-
border-left: 1px solid #fff;
|
|
2984
|
-
height: 100%;
|
|
2985
|
-
cursor: pointer;
|
|
2986
|
-
`,x(eu)`
|
|
2987
|
-
background-color: ${({theme:e})=>e.general.disabledButtonColor};
|
|
2988
|
-
border-radius: ${({borderRadius:e})=>e};
|
|
2989
|
-
color: #fff;
|
|
2990
|
-
cursor: not-allowed;
|
|
2991
|
-
transition: transform 0.2s ease-in-out;
|
|
2992
|
-
`;L('.yt-bundleBuilder-product-card {\n display: flex;\n flex-direction: column;\n width: 280px;\n row-gap: 8px;\n justify-content: space-between;\n cursor: pointer;\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n overflow: hidden;\n\n background-color: var(--card-bg, #fff);\n border-radius: var(--card-radius, 0);\n border: var(--card-border, none);\n box-shadow: var(--card-shadow, none);\n}\n\n.yt-bundleBuilder-product-card:hover {\n transform: scale(1.01);\n}\n\n.yt-bundleBuilder-product-card_image-wrapper {\n display: flex;\n position: relative;\n flex-direction: column;\n padding: 0px;\n}\n\n.yt-bundleBuilder-product-card_title {\n font-size: var(--title-font-size, 18px);\n font-weight: var(--yt-bundle-font-weight, bold);\n color: #333;\n line-height: normal;\n margin-top: var(--title-margin-top, 0px);\n padding: var(--title-padding, 0 4px);\n\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.bundle-builder-variant-selector {\n border: 1px solid #c7c7c7;\n padding: 8px 8px 8px 10px;\n position: absolute;\n width: 98%;\n height: 38px;\n bottom: 4px;\n right: 3px;\n background-color: #f5f5f5;\n font-size: 14px;\n cursor: pointer;\n opacity: 0.8;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n background-image: none !important;\n margin-bottom: 0 !important;\n}\n\n.bundle-builder-variant-selector--coralHaze {\n appearance: auto;\n -webkit-appearance: auto;\n -moz-appearance: auto;\n}\n\n.yt-bundleBuilder-product-card_title {\n font-size: var(--title-font-size, 18px);\n font-weight: var(--yt-bundle-font-weight, bold);\n color: #333;\n line-height: normal;\n margin-top: var(--title-margin-top, 0px);\n padding: var(--title-padding, 0 4px);\n\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.yt-product-atc-wrapper {\n position: relative;\n width: 100%;\n height: 40px;\n}\n\n.yt-product-atc-button {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-quantity-selector-container--visible {\n position: absolute;\n background-color: "#e7e7e7";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.3s ease;\n transform: translateX(-100%); /* Start off-screen to the left */\n\n &.visible {\n transform: translateX(0); /* Slide in from the left */\n }\n}\n\n.yt-bundleBuilder-product-card_add-to-bundle-button--added {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n justify-content: space-between;\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-product-card_added-button-text {\n flex: 1;\n text-align: center;\n font-size: 14px;\n background-color: #747474;\n color: #fff;\n padding: 10px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n}\n\n.yt-bundleBuilder-product-card_added-button-text {\n width: 25%;\n background-color: #111;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid #fff;\n height: 100%;\n cursor: pointer;\n}\n\n.yt-bundleBuilder-product-card_add-to-bundle-button--disabled {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-quantity-selector-container {\n display: flex;\n flex-direction: row;\n height: 100%;\n background-color: #e7e7e7;\n width: 100%;\n font-weight: 600;\n}\n\n.yt-bundleBuilder-quantity-selector_quantity {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 0;\n width: 100%;\n font-size: 14px;\n}\n');L(".bundle-builder-tracker-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n width: 100%;\n align-items: center;\n text-align: center;\n row-gap: 4px;\n justify-content: space-between; \n padding: 4px 10px; \n}\n\n.bundle-builder-tracker-container.mobile {\n padding: 0;\n min-height: 30px;\n}\n\n.yt-bundleBuilderTracker-mobile-remaining{\n color: #000;\n background-color: #f5f5f5;\n padding: 10px;\n font-weight: 600;\n font-size: 18px;\n width: 100%;\n height: 80px;\n margin: 10px 0px;\n border: 1px solid #d3d3d3;\n}\n\n.yt-bundleBuilderTracker-tier-progress-container{\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-tier-progress-text{\n width: 100%;\n font-size: 14px;\n background-color: #e0e0e0;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-background{\n width: 100%;\n background-color: #e0e0e0;\n height: 6px;\n border-radius: 0;\n}\n\n.bundle-builder-tracker-progress,\n.yt-bundleBuilderTracker-progress-bar-fill {\n display: block;\n height: 100%;\n transition: width 0.3s ease-in-out, background-color 0.5s ease-in-out;\n}\n\n.yt-bundleBuilderTracker-quantity-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n font-size: 14px;\n border-radius: var(--corner-radius);\n}\n\n\n/* component.css */\n.yt-bundleBuilderTracker-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding: 4px 10px;\n width: 100%;\n align-items: center;\n text-align: center;\n row-gap: 4px;\n justify-content: space-between;\n}\n\n.yt-bundleBuilderTracker-container.mobile {\n padding: 0px;\n min-height: 30px;\n}\n\n.yt-bundleBuilderTracker-offer-tier-tag {\n position: absolute;\n top: -20px;\n padding: 5px 10px;\n}\n\n@media (max-width: 768px) {\n .yt-bundleBuilderTracker-offer-tier-tag {\n font-size: 12px;\n left: 0;\n }\n}\n\n.yt-bundleBuilderTracker-mobile-remaining {\n color: #000;\n background-color: #f5f5f5;\n padding: 10px;\n font-weight: 600;\n font-size: 18px;\n width: 100%;\n height: 80px;\n margin: 10px 0px;\n border: 1px solid #d3d3d3;\n}\n\n.yt-bundleBuilderTracker-tier-progress-container {\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-tier-progress-text {\n width: 100%;\n font-size: 14px;\n background-color: #e0e0e0;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-background {\n width: 100%;\n background-color: #e0e0e0;\n height: 6px;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-fill {\n display: block;\n height: 100%;\n transition: width 0.3s ease-in-out, background-color 0.5s ease-in-out;\n}\n\n.yt-bundleBuilderTracker-product-list-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n overflow-x: auto;\n}\n\n.yt-bundleBuilderTracker-summary-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 15px;\n justify-content: center;\n row-gap: 15px;\n padding: 0px 5px;\n}\n\n.yt-bundleBuilderTracker-summary-container.mobile {\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-item-wrapper {\n position: relative;\n margin-top: 8px;\n margin-right: 5px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-item-image-box {\n position: relative;\n border: 1px solid #d3d3d3;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.yt-bundleBuilderTracker-quantity-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-remove-button {\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: black;\n color: white !important;\n width: 16px;\n height: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border-radius: 2px;\n}\n\n.yt-bundleBuilderTracker-detailed-item-container {\n height: 85px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 5px 15px 0 5px;\n border: 1px solid #d3d3d3;\n column-gap: 5px;\n max-width: 220px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-detailed-image {\n position: relative;\n height: 75px;\n width: 75px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.yt-bundleBuilderTracker-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n border-radius: 2px;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-info-block {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n justify-content: flex-start;\n align-items: flex-start;\n text-align: left;\n}\n\n.yt-bundleBuilderTracker-product-title {\n font-size: 14px;\n font-weight: 500;\n line-height: normal;\n}\n\n.yt-bundleBuilderTracker-product-price {\n font-size: 13px;\n line-height: normal;\n}\n\n.yt-bundleBuilderTracker-remove-link {\n color: red;\n font-size: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 3px;\n align-items: center;\n cursor: pointer;\n}\n\n.yt-bundleBuilderTracker-placeholder-box {\n border: 1px solid #d3d3d3;\n margin-top: 10px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n flex-shrink: 0;\n}\n\n.yt-bundleBuilderTracker-summary-info {\n display: flex;\n flex-direction: column;\n font-size: 18px;\n align-items: center;\n justify-content: center;\n}\n\n.yt-bundleBuilderTracker-subtotal-label {\n line-height: normal;\n color: black;\n align-self: center;\n justify-content: center;\n display: flex;\n font-weight: 700;\n font-size: 16px;\n}\n\n.yt-bundleBuilderTracker-save-label {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700;\n}\n\n@media (max-width: 600px) {\n .yt-bundleBuilderTracker-save-label {\n display: none;\n }\n}\n\n.yt-bundleBuilderTracker-subtotal-row {\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n font-size: 16px;\n margin: 5px 0px;\n align-items: flex-end;\n}\n\n.yt-bundleBuilderTracker-total_price {\n font-weight: bold;\n text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-summary_price {\n color: #a0a0a0;\n text-decoration-line: line-through;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-checkout-button {\n padding: 5px 20px;\n height: 42px;\n outline: none;\n width: fit-content;\n min-width: 200px;\n transition: background-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-bundleBuilderTracker-checkout-button:hover {\n background-color: var(--ctaHoverBackgroundColor, #f4f4f6);\n color: var(--ctaHoverTextColor, #000);\n}\n\n@media (max-width: 768px) {\n .yt-bundleBuilderTracker-checkout-button {\n width: 100%;\n padding: 5px 5px;\n margin-inline: 0px;\n }\n}\n\n.yt-bundleBuilderTracker-checkout-text {\n display: flex;\n flex-direction: row;\n column-gap: 6px;\n align-items: center;\n justify-content: center;\n font-weight: 650;\n}\n\n.yt-bundleBuilderTracker-product-list-tracker-item {\n position: relative;\n margin-top: 8px;\n margin-right: 5px;\n border: 1px solid #d3d3d3;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-detailed-product-item {\n height: 85px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 5px 15px 0 5px;\n border: 1px solid #d3d3d3;\n column-gap: 5px;\n max-width: 220px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-plus-icon-container {\n justify-content: center;\n align-items: center;\n margin: 0px 6px;\n text-align: center;\n display: flex;\n flex-shrink: 0;\n}");const nu=({tiers:e,isMobile:n=!1,selectedProductsByTier:r,selectedProducts:o,themeColor:a,showProductDetailsInTracker:i,handleRemoveItemProductTier:l,cornerRadius:c,currencySymbol:d})=>t.createElement(t.Fragment,null,e.map(((a,s)=>{const p=a.minimumQuantity-(r[s]?.length??0),u=o?.filter((e=>r[s]?.includes(e.variantId)));return t.createElement("div",{className:"yt-bundleBuilderTracker-tier-product-list",style:{display:"flex",width:"100%"}},t.createElement("div",null,t.createElement("div",{style:{display:"flex",gap:"5px"}},u?.map?.((e=>{const o=e.product.variants?.edges?.find((t=>t.node.id===e.variantId)),a=r[s]?.filter((e=>e===o?.node.id)).length||0;return i?t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-product-item",key:e.variantId,style:{borderRadius:"5px"}},t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-image",style:{backgroundImage:`url(${o?.node.image?.url&&o?.node.image?.url?.length>0?o?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-badge",style:{borderRadius:"2px"}},e.quantity,"x")),t.createElement("div",{className:"yt-bundleBuilderTracker-info-block"},t.createElement("span",{className:"yt-bundleBuilderTracker-product-title"},e.product.title),t.createElement("span",{className:"yt-bundleBuilderTracker-product-price"},d,Ig(o?.node?.price)),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-link",onClick:()=>l(e.variantId,s)},t.createElement(Ia,null),t.createElement("span",null,"Remove")))):t.createElement("div",{className:"yt-bundleBuilderTracker-product-list-item",key:e.variantId},t.createElement("div",{className:"yt-bundleBuilderTracker-product-list-tracker-item",style:{backgroundImage:`url(${o?.node.image?.url&&o?.node.image?.url?.length>0?o?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`,..."high"===c&&{borderRadius:"20px"},..."medium"===c&&{borderRadius:"6px"},...""===c&&{borderRadius:"0px"},height:n?"60px":"70px",width:n?"60px":"70px"}},a>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-quantity-badge",style:{borderRadius:"high"===c?"20px":"medium"===c?"6px":"0px"}},a,"x"),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-button",onClick:()=>l(e.variantId,s)},t.createElement(ct,{fontSize:"12px"}))))})),p>=1&&[...Array(p)].map(((e,r)=>t.createElement("div",{className:"yt-bundleBuilderTracker-placeholder-box",style:{width:n?"60px":"70px",height:n?"60px":"70px",borderRadius:"high"===c?"20px":"medium"===c?"6px":"0px"},key:r},t.createElement(Kr,{size:40,color:"#A0A0A0"})))))),s<e.length-1&&t.createElement("div",{className:"yt-bundleBuilderTracker-plus-icon-container"},t.createElement(Kr,{size:"16px",style:{backgroundColor:"#f2f2f2"}})))}))),ru=({builderTiers:e,handleAddToCart:n,minimumQuantity:r,selectedProducts:o,showProductDetailsInTracker:a,loading:i,handleRemoveItem:d,percentageOff:s,selectedItemsQuantity:p,bundleSubtotal:u,amountOff:m,styles:f,dealAmount:g,isMobile:h=!1,themeColor:x,cornerRadiusType:y,primaryTextColorCta:b,handleRemoveItemProductTier:v,selectedProductsByTier:w,storeCurrencyCode:C})=>{const[k,E]=c(!1),[T,S]=c(0),[B,$]=c([]),[z,_]=c(0),[D,I]=c(0),[N,P]=c(!1),[O,A]=c(null),F=u?.price||0,M=e?.type,R=e=>{if(e<0||!B[e])return F;const t=B[e].discountValue??0;return s?F*(1-t/100):g?t:m?F-t:F};l((()=>{if(e&&"none"!==e.type)if("productTier"===M&&e.productTier){const t=e.productTier||[];$(t);let n=0;e.productTier.map((e=>{n+=e.minimumQuantity})),I(n-p)}else if(B.length)z>0&&p<B[z-1]?.minimumQuantity?(_(z-1),A(z-1)):p<B[z]?.minimumQuantity&&A(z-1),S(R(z));else{const t=e.offerTier||[];$(t),_(0),I(t[0]?.minimumQuantity-p||r-p)}else $([]),I(r-p),_(0)}),[e,r,p]),l((()=>{B.length&&"productTier"!=M?(()=>{if(!B?.length)return;let e=-1,t=null,n=0;if("offerTier"===M)for(let r=0;r<B.length&&(n+=B[r].minimumQuantity,p>=n);r++)t=r,e=r+1<B.length?r+1:r;if(_(e),A(t),null!==t){let e=B.slice(0,t+1).reduce(((e,t)=>e+t.minimumQuantity),0);P(e===p),E(!0),S(R(t))}else P(!1),E(!1),S(F);const r=e>=0&&e<B.length?B.slice(0,e+1).reduce(((e,t)=>e+t.minimumQuantity),0)-p:B[0].minimumQuantity-p;I(r)})():p===r?(E(!0),S(s?F*(1-s/100):g||(m?F-m:F)),P(!0)):(P(!1),E(!1))}),[p,B]);const L=k?Math.max(u?.compareAtPrice,u?.price):u?.compareAtPrice>u?.price?u?.compareAtPrice:null,j=k?T.toFixed(2):u?.price?.toFixed(2),V=L&&j?(L-Number(j)).toFixed(2):0,H=e&&"none"!==M&&e.offerTier?"offerTier"===M?Math.min(p/(p+D)*100,100):void 0:p/r*100;return l((()=>{if(k&&f.byob.enableConfetti){console.log("remainingItems",D);const e=document.getElementById("checkoutButton");if(!e)return;const t=e.getBoundingClientRect(),n=(t.left+t.width/2)/window.innerWidth,r=(t.top+t.height/2)/window.innerHeight;Or({particleCount:100,spread:70,origin:{x:n,y:r},zIndex:9999})}}),[k,f]),t.createElement("div",{className:"yt-bundleBuilderTracker-container "+(h?"mobile":""),style:{justifyContent:f.byob.selectedProductsVisibility&&!h?"space-between":"center"}},"offerTier"==M&&null!==O&&O>=0&&t.createElement("div",{className:"yt-bundleBuilderTracker-offer-tier-tag",style:{backgroundColor:x||"#000",color:b||"#fff"}},t.createElement(t.Fragment,null,"Buy"," ",B.slice(0,O+1).reduce(((e,t)=>e+t.minimumQuantity),0)," ","at",m||g?t.createElement(t.Fragment,null," ",Ng(f.general.currencySymbol,C)):""," ",Ig(B[O]?.discountValue),s?t.createElement(t.Fragment,null,"% "):Ig(g)?t.createElement(t.Fragment,null):"",s||m?t.createElement(t.Fragment,null," Off"):""),t.createElement("span",{style:{fontStyle:"italic"}}," applied")),h&&D>=1&&!N&&"offerTier"!==M?t.createElement("div",{className:"yt-bundleBuilderTracker-mobile-remaining",style:{margin:"0"}},"Select ",D," more item(s)"):t.createElement(t.Fragment,null),"productTier"!==M&&t.createElement("div",{className:"yt-bundleBuilderTracker-tier-progress-container"},t.createElement("div",{className:"yt-bundleBuilderTracker-tier-progress-text"},"offerTier"==M&&B.length>0&&z>=0&&D>0&&t.createElement(t.Fragment,null,t.createElement("div",{style:{padding:"4px",fontWeight:"600",...window.innerWidth<=768&&{fontSize:"12px"},color:"#121212"},className:"yt-bundleBuilderTracker-add-more-text"},"Add ",D," More Item(s)",t.createElement("span",{style:{fontWeight:"500"}}," to "),"Buy ",p+D," at",m||g?t.createElement(t.Fragment,null,Ng(f.general.currencySymbol,C)):""," ",Ig(B[z]?.discountValue),s?t.createElement(t.Fragment,null,"% "):Ig(g)?t.createElement(t.Fragment,null):"",s||m?t.createElement(t.Fragment,null," Off"):""))),t.createElement("div",{className:"yt-bundleBuilderTracker-progress-bar-background"},t.createElement("div",{className:"yt-bundleBuilderTracker-progress-bar-fill",style:{width:`${H??0}%`,backgroundColor:100===(H??0)?"#4caf50":x??f?.general.primaryColor??"black"}}," "))),f.byob.selectedProductsVisibility&&t.createElement("div",{className:"hide-tracker-scrollbar yt-bundleBuilderTracker-product-list-wrapper",style:{columnGap:"productTier"===M?"0px":"10px",maxWidth:h?"90%":"55%"}},"productTier"===M?t.createElement(nu,{tiers:B,isMobile:h,selectedProductsByTier:w??{},selectedProducts:o,themeColor:f.general.primaryColor,showProductDetailsInTracker:a,handleRemoveItemProductTier:v,cornerRadius:f.byob.borderRadius,currencySymbol:Ng(f.general.currencySymbol,C)}):t.createElement(t.Fragment,null,o?.map?.((e=>{const n=e.product.variants?.edges?.find((t=>t.node.id===e.variantId));return a?t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-item-container",style:{borderRadius:f.byob.borderRadius},key:e.variantId},t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-image",style:{backgroundImage:`url(${n?.node.image?.url&&n?.node.image?.url?.length>0?n?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-badge"},e.quantity,"x")),t.createElement("div",{className:"yt-bundleBuilderTracker-info-block"},t.createElement("span",{className:"yt-bundleBuilderTracker-product-title"},e.product.title),t.createElement("span",{className:"yt-bundleBuilderTracker-product-price"},f.general.currencySymbol,n?.node?.price),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-link",onClick:()=>d(e.variantId)},t.createElement(Ia,null),t.createElement("span",null,"Remove")))):t.createElement("div",{className:"yt-bundleBuilderTracker-item-wrapper",key:e.variantId,style:{marginTop:"8px",marginRight:"5px"}},t.createElement("div",{className:"yt-bundleBuilderTracker-item-image-box",style:{backgroundImage:`url(${n?.node.image?.url&&n?.node.image?.url?.length>0?n?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`,height:h?"60px":"70px",width:h?"60px":"70px",borderRadius:f.byob.borderRadius}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-quantity-badge",style:{borderRadius:f.byob.borderRadius}},e.quantity,"x"),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-button",onClick:()=>d(e.variantId)},t.createElement(ct,{fontSize:"12px"}))))})),D>=1&&[...Array(D)].map(((e,n)=>t.createElement("div",{className:"yt-bundleBuilderTracker-placeholder-box",style:{width:h?"60px":"70px",height:h?"60px":"70px",borderRadius:f.byob.borderRadius},key:n},t.createElement(Kr,{size:40,color:"#A0A0A0"})))))),(!h||N)&&t.createElement("div",{className:"yt-bundleBuilderTracker-summary-container",style:{width:h?"100%":"auto"}},Number(j)>0&&t.createElement("div",{className:"yt-bundleBuilderTracker-summary-info"},t.createElement("div",{style:{display:"flex",...window.innerWidth<=600&&{flexDirection:"column"},gap:"5px",justifyContent:"center"}},t.createElement("span",{className:"yt-bundleBuilderTracker-subtotal-label"},"Subtotal"),Number(V)>0?t.createElement("span",{className:"yt-bundleBuilderTracker-save-label"},"Save:"," ",Ng(f.general.currencySymbol,C),Ig(V)):""),t.createElement("div",{className:"yt-bundleBuilderTracker-subtotal-row"},t.createElement("span",{className:"yt-bundleBuilderTracker-total_price"},Ng(f.general.currencySymbol,C),Number(j)>=0?Ig(Number(j).toFixed(2)):0),L&&f.byob.compareAtPriceVisibility&&Number(L)>Number(j)&&t.createElement("span",{className:"yt-bundleBuilderTracker-summary_price"},Ng(f.general.currencySymbol,C),Ig(Number(L).toFixed(2))))),t.createElement("button",{className:"yt-bundleBuilderTracker-checkout-button",style:{cursor:N?"pointer":"auto",backgroundColor:100===(H??0)||N?f.general.ctaBackgroundColor||"black":"#f4f4f6",color:100===(H??0)||N?f.general.ctaTextColor||"#fff":"#000",border:`1.18px solid ${f.general.ctaBorderColor}`,borderRadius:f.general.ctaBorderRadius,boxShadow:N?"0px 4px 8px rgba(0, 0, 0, 0.2)":"none"},disabled:!N&&D>=1,onClick:e=>{i||console.log("saving"),n(e.target??e.currentTarget)},id:"checkoutButton"},i?t.createElement(Vo,{color:"white",loading:i,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):D>=1&&!N?t.createElement("div",{className:"yt-tracking-bar-checkout-button-items-text",style:{color:f.general.primaryColor}},"Add ",D," More Item(s)"):t.createElement("div",{className:"yt-bundleBuilderTracker-checkout-text",style:{color:b??f.general.ctaTextColor}},f.byob.checkoutCTAText??"Checkout"))))},ou={8087437412:{position:"fixed",bottom:"10px",zIndex:100,width:"95%",left:"50%",transform:"translateX(-50%)",mobile:{bottom:"50px"}},66134737152:{position:"fixed",zIndex:20,width:"90%",left:"50%",transform:"translateX(-50%)",bottom:"10px"},83438567714:{zIndex:100,position:"fixed",width:"95%",left:"50%",transform:"translateX(-50%)",bottom:"10px"},72726479068:{position:"fixed",zIndex:20,width:"90%",left:"50%",transform:"translateX(-50%)",bottom:"10px",mobile:{bottom:"70px"}},64800161992:{zIndex:20,mobile:{bottom:"50px"},position:"sticky",bottom:"10px"},53933408435:{zIndex:5,mobile:{bottom:"60px"},position:"sticky",bottom:"10px"},68377018594:{zIndex:5,bottom:"10px",position:"fixed",left:"50%",transform:"translateX(-50%)",mobile:{bottom:"70px"}},84569063743:{zIndex:999,bottom:"0px",width:"100%",position:"fixed",right:"0px",left:"0px"},62022680789:{bottom:"65px",zIndex:999,width:"100%",position:"fixed",right:"0px",left:"0px"},63102222549:{position:"sticky",bottom:"100px",zIndex:999,mobile:{bottom:"60px"}},26666008755:{bottom:"10px",zIndex:999,position:"fixed",left:"50%",transform:"translateX(-50%)"},67641475285:{bottom:"10px",zIndex:999,position:"fixed",left:"50%",transform:"translateX(-50%)"},61613179125:{position:"fixed",left:"50%",transform:"translateX(-50%)"},80866345280:{bottom:"10px",mobile:{bottom:"70px"}}},au={position:"sticky",bottom:"10px",zIndex:999,width:"96%"},iu=e=>{const[n,r]=c(!1);l((()=>{const e=()=>{r(window.innerWidth<=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const o="undefined"!=typeof window?(window?.ytapp||window?.ytBundleApp)?.storeId:void 0,a=((e,t=!1)=>{const n=e&&ou[e]?ou[e]:{},r={...au,...n};return t&&n.mobile?{...r,...n.mobile}:r})(String(o),n);e.renderingOnPage||(a.position="static",a.zIndex=0);const i={display:"flex",backgroundColor:"white",borderRadius:"4px",paddingBottom:"5px",justifyContent:"center",margin:"0 auto",transition:"box-shadow 0.3s ease, transform 0.3s ease",border:"1px solid #CBCBCB",boxShadow:"\n 0px 3px 6px 0px #00000040, \n 0px 11px 11px 0px #00000036, \n 0px 24px 14px 0px #00000021, \n 0px 43px 17px 0px #0000000A, \n 0px 68px 19px 0px #00000000\n ",...a};return t.createElement("div",{className:"yt-bundle-builder-tracker-bar",style:{...i,width:n?"100%":a.width,...!e.styles.byob.selectedProductsVisibility&&{width:n?"96%":"fit-content",paddingInline:"10px"},...n&&{display:"flex",flexDirection:"row",paadingTop:"0px"}},onMouseEnter:e=>{e.currentTarget.style.boxShadow="\n 0px 8px 16px 0px #00000040, \n 0px 24px 24px 0px #00000036, \n 0px 50px 30px 0px #00000021, \n 0px 90px 36px 0px #0000000A, \n 0px 140px 40px 0px #00000000\n ",e.currentTarget.style.transform="translateX(-50%)"===a.transform?"translate(-50%, -3px)":"translateY(-3px)"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="\n 0px 5px 12px 0px #00000040, \n 0px 22px 22px 0px #00000036, \n 0px 49px 29px 0px #00000021, \n 0px 87px 35px 0px #0000000A, \n 0px 136px 38px 0px #00000000\n ",e.currentTarget.style.transform=a.transform||"translateY(0)"}},t.createElement(ru,{...e,isMobile:n}))},lu=_t(void 0);function cu(e){return cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cu(e)}function du(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function su(e,t){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},su(e,t)}function pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uu(e);if(t){var o=uu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===cu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uu(e)}var mu=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&su(e,t)}(o,h);var e,t,n,r=pu(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return e=o,t=[{key:"componentDidMount",value:function(){!function(e,t){if(!document.head.querySelector("#"+e)){var n=document.createElement("style");n.textContent=t,n.type="text/css",n.id=e,document.head.appendChild(n)}}(this.props.name,this.props.css)}},{key:"componentWillUnmount",value:function(){var e=document.getElementById(this.props.name);e.parentNode.removeChild(e)}},{key:"render",value:function(){return null}}],t&&du(e.prototype,t),n&&du(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(),fu=function(e){var t=e.imageBackgroundColor;return"\n body {\n overflow: hidden;\n }\n\n .__react_modal_image__modal_container {\n position: fixed;\n z-index: 5000;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.8);\n touch-action: none;\n overflow: hidden;\n }\n\n .__react_modal_image__modal_content {\n position: relative;\n height: 100%;\n width: 100%;\n }\n\n .__react_modal_image__modal_content img, \n .__react_modal_image__modal_content svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate3d(-50%, -50%, 0);\n -webkit-transform: translate3d(-50%, -50%, 0);\n -ms-transform: translate3d(-50%, -50%, 0);\n overflow: hidden;\n }\n\n .__react_modal_image__medium_img {\n max-width: 98%;\n max-height: 98%;\n background-color: ".concat(t,";\n }\n\n .__react_modal_image__large_img {\n cursor: move;\n background-color: ").concat(t,"\n }\n\n .__react_modal_image__icon_menu a {\n display: inline-block;\n font-size: 40px;\n cursor: pointer;\n line-height: 40px;\n box-sizing: border-box;\n border: none;\n padding: 0px 5px 0px 5px;\n margin-left: 10px;\n color: white;\n background-color: rgba(0, 0, 0, 0);\n }\n\n .__react_modal_image__icon_menu {\n display: inline-block;\n float: right;\n }\n\n .__react_modal_image__caption {\n display: inline-block;\n color: white;\n font-size: 120%;\n padding: 10px;\n margin: 0;\n }\n\n .__react_modal_image__header {\n position: absolute;\n top: 0;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n overflow: hidden;\n }\n")},gu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))},hu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))},xu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},yu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},bu=function(){return t.createElement("svg",{fill:"#ffffff",height:"48",viewBox:"0 0 24 24",width:"48",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}),t.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}))},vu=function(){return t.createElement("svg",{fill:"#ffffff",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{fill:"none",d:"M0 0h24v24H0V0zm0 0h24v24H0V0z"}),t.createElement("path",{d:"M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"}))};var wu=function(e){return function(t){(function(e){return document.location.hostname!==new URL(e,document.location).hostname})(e)&&(t.preventDefault(),fetch(e).then((function(t){return t.ok||console.error("Failed to download image, HTTP status "+t.status+" from "+e),t.blob().then((function(t){var n=document.createElement("a");n.setAttribute("download",e.split("/").pop()),n.href=URL.createObjectURL(t),n.click()}))})).catch((function(t){console.error(t),console.error("Failed to download image from "+e)})))}},Cu=function(e){var n=e.image,r=e.alt,o=e.zoomed,a=e.toggleZoom,i=e.toggleRotate,l=e.onClose,c=e.enableDownload,d=e.enableZoom,s=e.enableRotate;return t.createElement("div",{className:"__react_modal_image__header"},t.createElement("span",{className:"__react_modal_image__icon_menu"},c&&t.createElement("a",{href:n,download:!0,onClick:wu(n)},t.createElement(xu,null)),d&&t.createElement("a",{onClick:a},o?t.createElement(hu,null):t.createElement(gu,null)),s&&t.createElement("a",{onClick:i},t.createElement(vu,null)),t.createElement("a",{onClick:l},t.createElement(yu,null))),r&&t.createElement("span",{className:"__react_modal_image__caption"},r))};function ku(e){return ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ku(e)}function Eu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tu(e,t){return Tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tu(e,t)}function Su(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$u(e);if(t){var o=$u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bu(e)}(this,n)}}function Bu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $u(e){return $u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$u(e)}function zu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _u=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tu(e,t)}(a,h);var e,n,r,o=Su(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return zu(Bu(e=o.call.apply(o,[this].concat(n))),"state",{loading:!0}),zu(Bu(e),"handleOnLoad",(function(){e.setState({loading:!1})})),zu(Bu(e),"handleOnContextMenu",(function(t){!e.props.contextMenu&&t.preventDefault()})),e}return e=a,n=[{key:"render",value:function(){var e=this.props,n=e.id,r=e.className,o=e.src,a=e.style,i=e.handleDoubleClick;return t.createElement("div",null,this.state.loading&&t.createElement(bu,null),t.createElement("img",{id:n,className:r,src:o,style:a,onLoad:this.handleOnLoad,onDoubleClick:i,onContextMenu:this.handleOnContextMenu}))}}],n&&Eu(e.prototype,n),r&&Eu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Du(e){return Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Du(e)}function Iu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nu(e,t){return Nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nu(e,t)}function Pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Au(e);if(t){var o=Au(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Du(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ou(e)}(this,n)}}function Ou(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Au(e){return Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Au(e)}function Fu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mu=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nu(e,t)}(a,h);var e,n,r,o=Pu(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fu(Ou(e=o.call.apply(o,[this].concat(n))),"state",{move:{x:0,y:0},moveStart:void 0,zoomed:!1,rotationDeg:0}),Fu(Ou(e),"handleKeyDown",(function(t){27!==t.keyCode&&13!==t.keyCode||e.props.onClose()})),Fu(Ou(e),"getCoordinatesIfOverImg",(function(t){var n=t.changedTouches?t.changedTouches[0]:t;if("react-modal-image-img"===n.target.id){var r=e.contentEl.getBoundingClientRect();return{x:n.clientX-r.left,y:n.clientY-r.top}}})),Fu(Ou(e),"handleMouseDownOrTouchStart",(function(t){if(t.preventDefault(),!(t.touches&&t.touches.length>1)){var n=e.getCoordinatesIfOverImg(t);n||e.props.onClose(),e.state.zoomed&&e.setState((function(e){return{moveStart:{x:n.x-e.move.x,y:n.y-e.move.y}}}))}})),Fu(Ou(e),"handleMouseMoveOrTouchMove",(function(t){if(t.preventDefault(),e.state.zoomed&&e.state.moveStart&&!(t.touches&&t.touches.length>1)){var n=e.getCoordinatesIfOverImg(t);n&&e.setState((function(e){return{move:{x:n.x-e.moveStart.x,y:n.y-e.moveStart.y}}}))}})),Fu(Ou(e),"handleMouseUpOrTouchEnd",(function(t){e.setState({moveStart:void 0})})),Fu(Ou(e),"toggleZoom",(function(t){t.preventDefault(),e.setState((function(e){return{zoomed:!e.zoomed,move:e.zoomed?{x:0,y:0}:e.move}}))})),Fu(Ou(e),"toggleRotate",(function(t){t.preventDefault(),360!==e.state.rotationDeg?e.setState((function(e){return{rotationDeg:e.rotationDeg+=90}})):e.setState({rotationDeg:90})})),e}return e=a,(n=[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown,!1)}},{key:"render",value:function(){var e=this,n=this.props,r=n.medium,o=n.large,a=n.alt,i=n.onClose,l=n.hideDownload,c=n.hideZoom,d=n.showRotate,s=n.imageBackgroundColor,p=void 0===s?"black":s,u=this.state,m=u.move,f=u.zoomed,g=u.rotationDeg;return t.createElement("div",null,t.createElement(mu,{name:"__react_modal_image__lightbox",css:fu({imageBackgroundColor:p})}),t.createElement("div",{className:"__react_modal_image__modal_container"},t.createElement("div",{className:"__react_modal_image__modal_content",onMouseDown:this.handleMouseDownOrTouchStart,onMouseUp:this.handleMouseUpOrTouchEnd,onMouseMove:this.handleMouseMoveOrTouchMove,onTouchStart:this.handleMouseDownOrTouchStart,onTouchEnd:this.handleMouseUpOrTouchEnd,onTouchMove:this.handleMouseMoveOrTouchMove,ref:function(t){e.contentEl=t}},f&&t.createElement(_u,{id:"react-modal-image-img",className:"__react_modal_image__large_img",src:o||r,style:{transform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)"),WebkitTransform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)"),MsTransform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)")},handleDoubleClick:this.toggleZoom}),!f&&t.createElement(_u,{id:"react-modal-image-img",className:"__react_modal_image__medium_img",src:r||o,handleDoubleClick:this.toggleZoom,contextMenu:!r,style:{transform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)"),WebkitTransform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)"),MsTransform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)")}})),t.createElement(Cu,{image:o||r,alt:a,zoomed:f,toggleZoom:this.toggleZoom,toggleRotate:this.toggleRotate,onClose:i,enableDownload:!l,enableZoom:!c,enableRotate:!!d})))}}])&&Iu(e.prototype,n),r&&Iu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Ru(e){return Ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ru(e)}function Lu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ju(e,t){return ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ju(e,t)}function Vu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wu(e);if(t){var o=Wu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ru(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Hu(e)}(this,n)}}function Hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wu(e){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wu(e)}function Uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gu=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ju(e,t)}(a,h);var e,n,r,o=Vu(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Uu(Hu(e=o.call.apply(o,[this].concat(n))),"state",{modalOpen:!1}),Uu(Hu(e),"toggleModal",(function(){e.setState((function(e){return{modalOpen:!e.modalOpen}}))})),e}return e=a,n=[{key:"render",value:function(){var e=this.props,n=e.className,r=e.small,o=e.smallSrcSet,a=e.medium,i=e.large,l=e.alt,c=e.hideDownload,d=e.hideZoom,s=e.showRotate,p=e.imageBackgroundColor,u=this.state.modalOpen;return t.createElement("div",null,t.createElement("img",{className:n,style:{cursor:"pointer",maxWidth:"100%",maxHeight:"100%"},onClick:this.toggleModal,src:r,srcSet:o,alt:l}),u&&t.createElement(Mu,{medium:a,large:i,alt:l,onClose:this.toggleModal,hideDownload:c,hideZoom:d,showRotate:s,imageBackgroundColor:p}))}}],n&&Lu(e.prototype,n),r&&Lu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();L(".yt-product-modal-close-button {\n position: absolute;\n top: 0px;\n right: 0px;\n cursor: pointer;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: none;\n}\n\n.yt-product-modal-close-button svg {\n color: #000;\n font-size: 25px;\n filter: drop-shadow(0 0 8px white) drop-shadow(0 0 5px white);\n}\n\n@media (max-width: 540px) {\n .yt-product-modal-close-button {\n top: 5px;\n right: 5px;\n }\n}\n\n.yt-product-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2147483644;\n}\n\n.yt-product-modal-content {\n background-color: white;\n box-shadow: 3px 6.01px 25.69px 0px rgba(0, 0, 0, 0.25);\n overflow-y: auto;\n scrollbar-width: none;\n}\n\n.yt-product-modal-content.small-screen {\n padding: 20px;\n border-radius: 0;\n width: 100%;\n height: 100%;\n}\n\n.yt-product-modal-content.large-screen {\n padding: 15px;\n border-radius: 16.5px;\n max-width: min(1200px, 70%);\n max-height: 80vh;\n}\n\n.yt-product-selection-modal {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n}\n\n.yt-variant-selection-modal {\n position: relative;\n z-index: 2147483644;\n background-color: white;\n overflow-y: auto;\n}\n\n.yt-variant-selection-modal .details-section h2 {\n text-align: left !important;\n margin-bottom: 10px;\n line-height: normal !important;\n}\n\n.yt-variant-selection-modal .details-section .price {\n font-size: 1.7em;\n font-weight: bold;\n margin-bottom: 10px;\n}\n\n.yt-variant-selection-modal .details-section .add-to-bundle {\n margin-top: 20px;\n padding: 10px 20px;\n background-color: #4caf50;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 1em;\n transition: background-color 0.3s ease;\n}\n\n.yt-variant-selection-modal .details-section .add-to-bundle:hover {\n background-color: #45a049;\n}\n\n.yt-variant-selection-modal.small-screen {\n flex-direction: column;\n}\n\n.yt-variant-selection-modal.small-screen .yt-product-modal-image-section {\n justify-content: center;\n position: relative;\n width: 100%;\n}\n\n.yt-variant-selection-modal.small-screen .yt-product-modal-image-section .yt-product-modal-main-image {\n width: inherit;\n height: inherit;\n object-fit: cover;\n aspect-ratio: 1 / 1 !important;\n}\n\n.yt-product-modal-main-image:hover {\n cursor: zoom-in;\n}\n\n.yt-variant-selection-modal.large-screen {\n display: flex;\n flex-direction: row;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-section {\n width: 50%;\n height: fit-content;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-section .yt-product-modal-main-image {\n width: fit-content;\n object-fit: cover;\n aspect-ratio: 1 / 1 !important;\n cursor: zoom-in;\n border-radius: 8px;\n border: 1px solid lightgray;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery {\n display: flex;\n flex-wrap: nowrap;\n gap: 10px;\n overflow-x: auto;\n margin-top: 10px;\n scrollbar-width: none;\n}\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery::-webkit-scrollbar {\n display: none;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img {\n width: 90px;\n height: 90px;\n cursor: pointer;\n opacity: 0.6;\n transition: opacity 0.3s ease;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img.active,\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img:hover {\n opacity: 1;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-details-section {\n width: 50%;\n padding-left: 20px;\n}\n\n.yt-product-modal-select-input {\n width: 50%;\n padding: 5px;\n margin-bottom: 20px;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 1em;\n justify-content: center;\n align-items: center;\n}\n\n.yt-product-modal-price-and-cta {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n\n.yt-product-modal-atc-wrapper {\n width: 80%;\n}\n\n.yt-product-modal-atc-button {\n text-transform: uppercase;\n font-weight: 800;\n width: 100%;\n cursor: pointer;\n border: none;\n min-height: 40px;\n padding: 0px 15px;\n position: relative;\n overflow: hidden;\n}\n\n.yt-product-modal-separator {\n height: 10px;\n min-height: 10px;\n border: none;\n background-color: #d9d9d96b;\n margin: 20px 0 10px 0;\n display: block !important;\n}\n\n.yt-description-content {\n scroll-behavior: smooth;\n}\n\n.yt-product-modal-phone-close-button {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 9999999999;\n background-color: #ffffff;\n padding: 4px;\n border-radius: 50%;\n border: 1px solid lightgray;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-product-modal-image-indicator {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n margin: 0 3px;\n cursor: pointer;\n backdrop-filter: blur(10px);\n}\n\n.yt-product-modal-image-gallery::-webkit-scrollbar {\n display: none;\n}");const qu=n(((e,n)=>{const[r,o]=Wt(lu),a=(e.disableInventoryTracking?r?.variants.edges?.filter((t=>t.node.inventoryQuantity>0||e.disableInventoryTracking)):r?.variants.edges)??[],[i,d]=c(a[0]?.node),[s,p]=c(0),[u,m]=c("undefined"!=typeof window&&window.innerWidth<=600),[f,g]=c(1),[h,x]=c("idle"),[y,b]=c(null),[w,C]=c(null);l((()=>{if(r){const t=r.variants.edges?.filter((t=>t.node.inventoryQuantity>0||e.disableQuantitySelector));d(r?.selectedVariant??t[0]?.node)}}),[r]),l((()=>{const t=e.selectedProducts.find((e=>e.variantId===i?.id));g(t?t.quantity:0)}),[f,e.selectedProducts,i]);const k=()=>{i?.id&&r&&(x("check"),e.handleAddToBundle(i?.id,r,1),setTimeout((()=>{x("idle"),o(void 0)}),500))};if(l((()=>{const e=()=>m(window.innerWidth<=600);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),!r||0===a.length)return null;const{title:E,descriptionHtml:T,media:S,variants:B}=r,$=S.edges.map((e=>e.node.image)).filter((e=>e.url.length>0));l((()=>{if(r&&i?.image?.url&&Array.isArray($)){const e=$.findIndex((e=>e.url===i?.image.url));-1!==e&&e!==s&&p(e)}}),[i]);const z=t=>{const n=t.target.value,r=a.find((e=>e.node.id===n))?.node;r&&(r.inventoryQuantity>0||e.disableInventoryTracking)&&d(r)};l((()=>{if(r){window.history.pushState({modalOpen:!0},"",window.location.href);const e=e=>{o(void 0),e.preventDefault()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e),window.history.state?.modalOpen&&window.history.back()}}}),[r,o]);const _=e=>{b(e.targetTouches[0].clientX),C(null)},D=e=>{C(e.targetTouches[0].clientX)},I=()=>{if(null!==y&&null!==w&&$.length>1){const e=y-w,t=50;e>t?p((e=>e<$.length-1?e+1:0)):e<-t&&p((e=>e>0?e-1:$.length-1))}b(null),C(null)},N=t.createElement("div",{className:"yt-bundleProductModal-modal-overlay"},t.createElement("div",{className:"yt-bundleProductModal-modal-content "+(u?"small-screen":"large-screen"),ref:n},t.createElement("div",{className:"yt-bundleProductModal-selection-modal yt-variant-selection-modal"},t.createElement("div",{className:"yt-variant-selection-modal "+(u?"small-screen":"large-screen")},t.createElement("button",{className:"yt-bundleProductModal-modal-close-button",onClick:()=>{o(void 0)},style:{backgroundColor:"white"}},t.createElement(at,{size:"25"})),t.createElement("div",{className:"yt-bundleProductModal-modal-image-section"},t.createElement(t.Fragment,null,t.createElement("div",{onTouchStart:_,onTouchMove:D,onTouchEnd:I},t.createElement(Gu,{small:$[s].url,medium:$[s].url,large:$[s].url,hideDownload:!0,className:"yt-bundleProductModal-modal-main-image",imageBackgroundColor:"#000"})),t.createElement("div",{className:"yt-bundleProductModal-modal-image-gallery",style:{display:"flex",flexDirection:"row",overflow:"auto",gap:"10px",scrollbarWidth:"none"}},$.length>1&&$.filter((e=>e.url.length>0)).map(((n,r)=>t.createElement("img",{key:r,src:n.url,alt:n.altText||`${E} - Image ${r+1}`,onClick:()=>p(r),className:s===r?"active":"",style:{width:"73px",height:"73px",cursor:"pointer",borderRadius:"7px",border:"1px solid lightgray",...s===r&&{border:`2px solid ${e.themeColor||"#111"}`},objectFit:"cover"}})))))),t.createElement("div",{className:"yt-bundleProductModal-modal-details-section",style:{marginLeft:"20px",minHeight:"100%",maxHeight:"70vh",scrollbarWidth:"none",overflowY:"auto",display:"flex",flexDirection:"column"}},t.createElement("h2",null,a.length>1?i?.displayName:r.title),"ratingOnly"===e.reviewRatingType&&(r?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:e.themeColor,size:14}),t.createElement("span",{style:{marginLeft:6}},r?.rating?.averageRating," ","rating")),"ratingAndReviewCount"===e.reviewRatingType&&(r?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-and-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:e.themeColor,size:14}),r?.rating?.averageRating,"|",t.createElement(Wn,{size:14,style:{color:"dodgerblue"}})," (",r?.rating?.ratingCount," reviews)"),t.createElement("div",{className:"yt-bundleProductModal-modal-variant-selection",style:{display:"flex",flexDirection:"column",gap:"2px",marginTop:"20px"}},a.length>1&&t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",paddingBottom:"5px",fontSize:"16px",color:"#999",position:"relative",marginBottom:"10px"}},t.createElement("span",{style:{flexShrink:0}},r.options[0].name," :"," ",t.createElement("strong",{style:{color:"#000",paddingLeft:"5px"}},i?.title)),t.createElement("select",{value:i?.id||"",onChange:z,className:"yt-bundleProductModal-modal-select-input",style:{appearance:"none",border:"none",background:"transparent",fontWeight:"bold",color:"#000",cursor:"pointer",paddingRight:"20px",position:"absolute",right:0,top:0,bottom:0,width:"100%",opacity:0,zIndex:2}},a.map((({node:n})=>t.createElement("option",{key:n.id,value:n.id,disabled:!n.inventoryQuantity&&!e.disableInventoryTracking},n.title)))),t.createElement("span",{style:{position:"absolute",right:5,pointerEvents:"none",fontSize:"12px",color:"#000"}},t.createElement(no,null)))),t.createElement("div",{className:"yt-bundleProductModal-modal-price-and-cta",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}},t.createElement("div",{style:{width:"fit-content",minWidth:"fit-content",paddingRight:"10px",display:"flex",flexDirection:"column"}},i?.compareAtPrice&&parseFloat(i.compareAtPrice)>parseFloat(i?.price)&&t.createElement("div",{style:{textDecoration:"line-through",opacity:"0.5",lineHeight:"normal"}},Ng(e.styles.general.currencySymbol,e.styles.general.currencySymbol),Ig(i?.compareAtPrice)),t.createElement("div",null,t.createElement("span",{className:"yt-bundleProductModal-modal-price",style:{fontSize:"20px",fontWeight:"600",color:"#000",textAlign:"center",lineHeight:"normal"}},Ng(e.styles.general.currencySymbol,e.styles.general.currencySymbol),Ig(i?.price)))),!e.hideAddToBundle&&((i?.inventoryQuantity??0)>0||e.disableInventoryTracking)&&(!e?.disableQuantitySelector||f<1)&&t.createElement("div",{style:{width:"80%"},className:"yt-bundleProductModal-modal-atc-wrapper"},t.createElement("button",{style:{textTransform:"uppercase",fontWeight:"800",width:"100%",cursor:"pointer",border:"none",backgroundColor:e.themeColor||"#111",borderRadius:e.cornerRadius,color:e.primaryTextColorCta||"#fff",minHeight:"40px",padding:"0px 15px",position:"relative",overflow:"hidden"},className:"yt-bundleProductModal-modal-atc-button",onClick:e=>{e.stopPropagation(),e.preventDefault(),k()},disabled:"idle"!==h},"Add to bundle")))),t.createElement("div",{className:"yt-bundleProductModal-modal-separator",style:{height:"10px",minHeight:"10px",border:"none",backgroundColor:"#D9D9D96B",margin:"20px 0 10px 0",display:"block !important"}},t.createElement("span",null)),t.createElement("span",{className:"yt-description-content",style:{scrollBehavior:"smooth"},dangerouslySetInnerHTML:{__html:T}})))))),P=t.createElement("div",{className:"yt-bundleProductModal-modal-overlay"},t.createElement("div",{className:"yt-bundleProductModal-modal-content small-screen",style:{padding:"0px",position:"relative"},ref:n},t.createElement("div",{className:"yt-bundleProductModal-selection-modal yt-variant-selection-modal"},t.createElement("button",{className:"yt-bundleProductModal-modal-phone-close-button",style:{position:"fixed",top:"20px",right:"20px",zIndex:9999999999,backgroundColor:"#FFFFFF",padding:"4px",borderRadius:"50%",border:"1px solid lightgray",display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>{o(void 0)}},t.createElement(ro,{style:{height:"22px",width:"22px",padding:"4px",color:"black"},onMouseEnter:e=>e.currentTarget.style.color="black"})),t.createElement("div",{className:"yt-variant-selection-modal small-screen",style:{padding:"0px"}},t.createElement("div",{className:"yt-bundleProductModal-modal-image-section"},t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"relative"},onTouchStart:_,onTouchMove:D,onTouchEnd:I},t.createElement(Gu,{small:$[s].url,medium:$[s].url,large:$[s].url,hideDownload:!0,className:"yt-bundleProductModal-modal-main-image",imageBackgroundColor:"#000"}),t.createElement("div",{style:{position:"absolute",bottom:"20px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},$.length>1&&$.map(((e,n)=>t.createElement("span",{className:"yt-bundleProductModal-modal-image-indicator",style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:s===n?"#FFFFFF":"#EBEBEB",margin:"0 3px",cursor:"pointer",backdropFilter:"blur(10px)"}}))))),t.createElement("div",{className:"yt-bundleProductModal-modal-image-gallery",style:{display:"flex",flexDirection:"row",overflowX:"auto",padding:"5px 20px",gap:"5px",scrollbarWidth:"none"}},$.length>1&&$.map(((n,r)=>t.createElement("img",{key:r,src:n.url,alt:n.altText||`${E} - Image ${r+1}`,onClick:()=>p(r),className:s===r?"active":"",style:{width:"60px",height:"60px",cursor:"pointer",borderRadius:"7px",border:"1px solid lightgray",...s===r&&{border:`2px solid ${e.themeColor||"#111"}`},objectFit:"cover"}})))))),t.createElement("div",{className:"yt-bundleProductModal-modal-details-section",style:{padding:"0 30px",margin:"15px 0",paddingBottom:"120px"}},t.createElement("h2",{style:{margin:"0px"}},a.length>1?i?.displayName:r.title),"ratingOnly"===e.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-only",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:e.themeColor,size:14}),t.createElement("span",{style:{marginLeft:6}},e?.rating?.averageRating," rating")),"ratingAndReviewCount"===e.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-and-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:e.themeColor,size:14}),e?.rating?.averageRating,"|",t.createElement(Wn,{size:14})," (",e?.rating?.ratingCount," ","reviews)"),t.createElement("div",{className:"yt-bundleProductModal-modal-separator",style:{opacity:"0.2",border:"none",height:"2px",backgroundColor:"#000000",margin:"10px 0px",display:"block !important"}},t.createElement("span",null)),t.createElement("span",{className:"yt-description-content",style:{scrollbarWidth:"none",scrollBehavior:"smooth",margin:"0px"},dangerouslySetInnerHTML:{__html:T}})))),t.createElement("div",{className:"yt-bundleProductModal-modal-phone-bottom-bar",style:{position:"fixed",bottom:"0px",left:"0px",right:"0px",padding:"12px 15px",borderTop:"1px solid lightgray",boxShadow:"0px -4px 5px rgba(0, 0, 0, 0.1)",backgroundColor:"#fff",display:"flex",flexDirection:"column",gap:"2px",zIndex:9999999999}},a.length>1&&t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",paddingBottom:"5px",fontSize:"16px",color:"#999",position:"relative",margin:"10px 0"}},t.createElement("span",{style:{flexShrink:0}},r.options[0].name," :"," ",t.createElement("strong",{style:{color:"#000",paddingLeft:"5px"}},i?.title)),t.createElement("select",{value:i?.id||"",onChange:z,className:"yt-bundleProductModal-modal-select-input",style:{appearance:"none",border:"none",background:"transparent",fontWeight:"bold",color:"#000",cursor:"pointer",paddingRight:"20px",position:"absolute",right:0,top:0,bottom:0,width:"100%",opacity:0,zIndex:2}},a.map((({node:n})=>t.createElement("option",{key:n.id,value:n.id,disabled:!n.inventoryQuantity&&!e.disableInventoryTracking},n.title)))),t.createElement("span",{style:{position:"absolute",right:5,pointerEvents:"none",fontSize:"12px",color:"#000"}},t.createElement(no,null)))),t.createElement("div",{className:"yt-bundleProductModal-modal-price-and-cta",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}},t.createElement("div",{style:{width:"fit-content",minWidth:"fit-content",display:"flex",flexDirection:"column",paddingRight:"10px"}},i?.compareAtPrice&&t.createElement("div",{style:{textDecoration:"line-through",opacity:"0.5",lineHeight:"normal"}},Ng(e.styles.general.currencySymbol,e.styles.general.currencySymbol),Ig(i?.compareAtPrice)),t.createElement("div",null,t.createElement("span",{className:"yt-bundleProductModal-modal-price",style:{fontSize:"20px",fontWeight:"600",color:"#000",textAlign:"center",lineHeight:"normal"}},Ng(e.styles.general.currencySymbol,e.styles.general.currencySymbol),Ig(i?.price)))),!e.hideAddToBundle&&((i?.inventoryQuantity??0)>0||e.disableInventoryTracking)&&(!e?.disableQuantitySelector||f<1)&&t.createElement("div",{style:{width:"100%"}},t.createElement("button",{style:{textTransform:"uppercase",fontWeight:"800",width:"100%",cursor:"pointer",border:"none",backgroundColor:e.themeColor||"#111",borderRadius:e.cornerRadius,color:e.primaryTextColorCta||"#fff",minHeight:"40px",padding:"0px 15px",position:"relative",overflow:"hidden"},className:"yt-bundleProductModal-modal-atc-button",onClick:e=>{e.stopPropagation(),e.preventDefault(),k()},disabled:"idle"!==h},e.styles.byob.addToBundleCTAText||"Add to Bundle"))))));return v.createPortal(u?P:N,document.body)})),Yu=({options:e,selectedValue:n,onChange:r,type:o="text"})=>t.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},e?.map((e=>t.createElement("div",{key:e.name,onClick:()=>r(e),style:{cursor:"pointer"}},((e,n)=>{const r={cursor:"pointer",border:n?"2px solid #333":"1px solid #d1d5db",transition:"all 0.2s ease"};return"color"===o?t.createElement("div",{style:{...r,width:24,height:24,borderRadius:"50%",backgroundColor:e.value}}):"image"===o?t.createElement("img",{src:e.value||"/placeholder.svg",alt:e.name,style:{...r,width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):t.createElement("div",{style:{...r,padding:"4px 8px",borderRadius:"12px",fontSize:"12px",fontWeight:n?"600":"400",backgroundColor:n?"#f3f4f6":"white",color:"#333",minWidth:"fit-content",textAlign:"center"}},e.name)})(e,n?.name===e.name))))),Qu=({product:e,isOpen:n,onClose:r,variantOptions:o,cta:a,onConfirm:i})=>{const[d,s]=c((()=>e.options?.map((e=>e.values[0]))||[]));l((()=>{const e=e=>{"Escape"===e.key&&r()};return n&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[n,r]);const p=e.variants.edges.find((t=>t.node.title===(e.options?.length>0?d.join(" / "):d[0])))?.node,u=p?.image?.url||e.featuredMedia?.preview?.image?.url,m=e=>{if(!o?.options)return"text";const t=o.options.find((t=>t.name===e));return t?.type||"text"},f=e=>{if(!o?.options)return e.values.map((e=>({name:e,value:e})));const t=o.options.find((t=>t.name===e.name));return e.values.map((e=>{const n=t?.values?.find((t=>t.name===e));return{name:e,value:n?.value||e}}))},g=(e,t)=>{const n=d[t];if(!n)return null;return f(e).find((e=>e.name===n))||null};if(!n)return null;const h=t.createElement("div",{onClick:r,style:{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.4)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center"},role:"dialog","aria-modal":"true","aria-labelledby":"yt-variant-options-modal-title",className:"yt-bundleBuilder-variant-options-modal-backdrop"},t.createElement("div",{onClick:e=>e.stopPropagation(),style:{background:"white",borderRadius:16,width:"fit-content",minWidth:350,maxWidth:450,maxHeight:"90vh",overflowY:"auto",position:"relative",zIndex:999,...window.innerWidth<=600&&{width:"90vw",maxWidth:"90vw",minWidth:"90vw"}},className:"yt-bundleBuilder-variant-options-modal-container"},t.createElement("div",{id:"yt-variant-options-modal-title",style:{width:"100%",padding:"16px 0",fontWeight:600,fontSize:14,textTransform:"uppercase",backgroundColor:"rgba(217, 217, 217)",color:a.textColor,textAlign:"center",borderTopLeftRadius:16,borderTopRightRadius:16}},"Select Options"),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"16px 20px",borderBottom:"1px solid #f0f0f0"},className:"yt-bundleBuilder-variant-options-modal-product-block"},t.createElement("img",{src:u,alt:e.title,style:{width:60,height:60,borderRadius:8,objectFit:"cover",flexShrink:0,transition:"opacity 0.3s ease"},className:"yt-bundleBuilder-variant-options-modal-product-image"}),t.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1,gap:4},className:"yt-bundleBuilder-variant-options-modal-product-info"},t.createElement("div",{style:{fontSize:14,fontWeight:600,color:"#333"},className:"yt-bundleBuilder-variant-options-modal-product-title"},e.title))),t.createElement("div",{style:{padding:"20px"},className:"yt-bundleBuilder-variant-options-modal-variant-selectors"},e.options.map(((e,n)=>t.createElement("div",{key:e.name,style:{display:"flex",flexDirection:"column",gap:8,marginBottom:e?.values?.length>1?16:0},className:"yt-bundleBuilder-variant-options-modal-option"},e?.values?.length>1&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},className:"yt-bundleBuilder-variant-options-modal-option-label"},t.createElement("span",{style:{fontSize:14,fontWeight:500,color:"#333"},className:"yt-bundleBuilder-variant-options-modal-option-name"},"Select ",e.name),t.createElement("span",{style:{fontSize:12,fontWeight:500,color:"#666",backgroundColor:"#f5f5f5",padding:"4px 12px",borderRadius:16,textTransform:"capitalize"},className:"yt-bundleBuilder-variant-options-modal-option-selected-value"},g(e,n)?.name||e.values[0])),t.createElement(Yu,{options:f(e),selectedValue:g(e,n),onChange:e=>{((e,t)=>{const n=[...d];n[e]=t.name,s(n)})(n,e)},type:m(e.name)})))))),t.createElement("button",{className:"yt-bundleBuilder-variant-options-modal-confirm-button",onClick:()=>{const t=e.variants.edges.find((t=>t.node.title===(e.options?.length>0?d.join(" / "):d[0])))?.node.id;if(t)i(t),r();else{console.warn("yt::variant options modal - no matching variant found for selection:",d);const t=e.variants.edges[0]?.node.id;t&&(i(t),r())}},style:{width:"100%",fontSize:14,fontWeight:600,textTransform:"uppercase",backgroundColor:a.backgroundColor,color:a.textColor,textAlign:"center",padding:"16px 0",border:"none",cursor:"pointer",borderBottomLeftRadius:16,borderBottomRightRadius:16},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"}},"Add to Bundle")));return v.createPortal(h,document.body)};function Zu({quantity:e,setQuantity:n,remainingQuantity:r,handleAddToBundle:o,variantId:a,product:i,handleRemoveItem:l,hideAddToBundle:c,disableInventoryTracking:d,selectedVariantInventoryQty:s}){const p={display:"flex",alignItems:"center",justifyContent:"center",width:"33%",cursor:"pointer",backgroundColor:"#f2f2f2",userSelect:"none",border:"none",padding:"8px",margin:"0",fontSize:"20px",color:"#333",textDecoration:"none",boxShadow:"none",outline:"none",borderRadius:"0",boxSizing:"border-box"},u=d||e<s;return t.createElement("div",{className:"yt-bundleBuilder-quantity-selector-container"},t.createElement("button",{className:"yt-bundleBuilder-quantity-selector_button-minus",onClick:t=>{t.stopPropagation();const r=Math.max(0,e-1);n(r),l&&a&&l(a,1)},style:p},"-"),t.createElement("div",{className:"yt-bundleBuilder-quantity-selector_quantity"},e," added"),t.createElement("button",{className:"yt-bundleBuilder-quantity-selector_button-plus",onClick:t=>{t.stopPropagation();const l=Math.min(r,e+1);n(l),o&&a&&i&&o(a,i,1)},disabled:!u||c,style:{...p,cursor:!u||c?"not-allowed":"pointer",opacity:!u||c?.6:1}},"+"))}const Ku=({product:e,styles:n,selectedVariant:r})=>{const[o,a]=c(!1),i=r?.image?.url||e?.featuredMedia?.preview?.image?.url||e?.media?.edges?.[0]?.node?.image?.url||"",l=e?.media?.edges?.map((e=>e.node.image.url)).filter(Boolean),d=l?.[1]??i??"";return t.createElement("div",{className:"yt-bundleBuilder-image-effect",style:{position:"relative",width:"100%",overflow:"hidden",aspectRatio:n.general.imageAspectRatio||"1/1"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},t.createElement("div",{className:"yt-bundleBuilder-image-effect_wrapper",style:{width:"100%",height:"100%",position:"relative"}},t.createElement("img",{className:"yt-bundleBuilder-image-effect_main-image",style:{width:"100%",height:"100%",objectFit:"cover",opacity:o&&(i||l?.[0])!==d?0:1,transition:l?.length>0?"opacity 300ms ease, transform 300ms ease":"",transform:o?"scale(1.1)":"scale(1)"},src:i||l?.[0],alt:e.title}),(i||l?.[0])!==d&&t.createElement("img",{className:"yt-bundleBuilder-image-effect_hover-image",style:{width:"100%",height:"100%",objectFit:"cover",opacity:o?1:0,transition:"opacity 400ms ease, transform 400ms ease",transform:o?"scale(1.1)":"scale(1)",position:"absolute",top:0,left:0},src:i||d,alt:e.title})))},Xu=({product:e,bundle:n,handleAddToBundle:r,hideAddToBundle:o,remainingQuantity:a,themeColor:i,handleRemoveItem:d,transitionActive:s,idx:p,selecteditems:u,customVariantsQuantity:m})=>{const f=Ht(lu),g=n.customizations,h=g?.byob?.variantSelectorType,[x,y]=c(!1),b=g.general?.variantTitleSuffix?e?.variants?.edges:(e=>{if(!e||e.length<2)return e;const t=e.map((e=>e.node.title)).map((e=>e.split(" ")));let n=[...t[0]];for(let e=1;e<t.length;e++){const r=t[e];let o=0;for(;o<n.length&&o<r.length&&n[n.length-1-o]===r[r.length-1-o];)o++;n=n.slice(n.length-o)}return n.length<1?e:e.map((e=>{const t=e.node.title.split(" "),r=t.slice(0,t.length-n.length).join(" ");return{...e,node:{...e.node,title:r,commonSuffix:n.join(" ")}}}))})(e?.variants?.edges);if(!b||!b.length)return t.createElement(t.Fragment,null);const v=b?.find((e=>e.node.inventoryQuantity>0||!g?.general.trackInventory))?.node?.id;if(!v&&!g.general.showOutOfStockProducts)return t.createElement(t.Fragment,null);const[w,C]=c(b?.find((e=>!g?.general.trackInventory||e.node.inventoryQuantity>0))?.node?.id||b[0]?.node?.id),[k,E]=c(0),[T,S]=c(window.innerWidth<450),[B,$]=c("normal"),z=b?.find((e=>e?.node?.id===w))?.node,_=m&&m.length>0&&m.find((e=>e.variantId==z?.id))?.quantity||z&&z?.inventoryQuantity;l((()=>{const e=u.find((e=>e.variantId===w));E(e?e.quantity:0)}),[k,u,w]),l((()=>{const e=()=>{S(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{CSS.supports("font-weight","500")?$("500"):CSS.supports("font-weight","400")?$("400"):CSS.supports("font-weight","600")&&$("600")}),[]),l((()=>{document.documentElement.style.setProperty("--yt-bundle-font-weight",B)}),[B]),l((()=>{if(w&&!b?.some((e=>e.node.id===w))){const e=b[0]?.node.id;e&&C(e)}}),[w,b]);const D=e.variants&&e.variants.edges?.length>1&&"customOptions"!==h,I="undefined"!=typeof window?(window?.ytapp||window?.ytBundleApp)?.storeId:void 0,N="53933408435"===I,P="75851235630"===I,O=(e=>{if(e.metafield&&"yourtoken_bundles_app"===e.metafield.namespace&&"categories"===e.metafield.key){if(e.metafield.jsonValue&&Array.isArray(e.metafield.jsonValue))return e.metafield.jsonValue;if(e.metafield.value)try{const t=JSON.parse(e.metafield.value);if(Array.isArray(t))return t}catch(e){console.error("Failed to parse categories:",e)}}return[]})(e),A=O.length>0;return t.createElement(t.Fragment,null,t.createElement(tu,{className:"bundle-builder-product-container "+(s?"yt-product-card-transition-active":p%2==0?"yt-product-card-transition":"yt-product-card-transition-up"),borderRadius:g?.byob.borderRadius,borderColor:g?.byob.borderColor,shadowType:g?.byob.shadowType,backgroundColor:g?.byob.cardBackgroundColor,onClick:()=>{if(_<=0&&g?.general.trackInventory)return;const t={...e,variants:{...e.variants,edges:b},selectedVariant:z};f(t)},onMouseEnter:e=>{e.currentTarget.style.transform="scale(1.01)"},onMouseLeave:e=>{e.currentTarget.style.transform="scale(1)"},style:{WebkitTapHighlightColor:"transparent"}},t.createElement("div",{className:"yt-bundleBuilder-product-card_image-wrapper"},t.createElement(Ku,{product:e,styles:g,selectedVariant:z}),n?.productCardBadgeText&&t.createElement("div",{className:"yt-bundleBuilder-product-card_badge",style:{position:"absolute",top:"0px",left:"0px",backgroundColor:g?.general.primaryColor||"#111",color:g?.general.primaryContrastColor||"#fff",zIndex:1,margin:"0px",whiteSpace:"pre",padding:"4px 8px",fontSize:"12px",borderTopLeftRadius:g.byob.borderRadius}},n.productCardBadgeText),D&&t.createElement("div",{className:"yt-bundleBuilder-variant-selector-container",style:{position:"relative",width:"100%"}},t.createElement("select",{className:"bundle-builder-variant-selector "+(N?"bundle-builder-variant-selector--coralHaze":""),onClick:e=>{e.preventDefault(),e.stopPropagation()},value:w||"",onChange:e=>{e.stopPropagation(),e.preventDefault(),C(e.target.value)}},b?.map((e=>{const n=window.innerWidth<=320?10:window.innerWidth<=420?15:22,r=e.node.title.length>n?e.node.title.substring(0,n)+"...":e.node.title;return t.createElement("option",{key:e.node.id,value:e.node.id},r)}))),t.createElement("div",{className:"yt-bundleBuilder-variant-selector_icon",style:{position:"absolute",right:"16px",bottom:"10px",pointerEvents:"none"}},t.createElement(F,null)))),t.createElement("div",{className:"yt-bundleBuilder-product-card_details"},"enabled"===n?.customizations?.byob?.productCardCategoryVisibility&&A&&t.createElement("div",{className:"yt-bundleBuilder-product-card_category-wrapper",style:{padding:"2px 4px"}},t.createElement("div",{className:"yt-bundleBuilder-product-card_category-container",style:{display:"flex",flexWrap:"wrap",gap:"4px"}},O.slice(0,2).map(((e,n)=>t.createElement("span",{className:"yt-bundleBuilder-product-card_category",key:n,style:{fontSize:T?"8px":"12px",color:"#666",fontWeight:"500"}},e.charAt(0).toUpperCase()+e.slice(1)))),O.length>2&&t.createElement("span",{className:"yt-bundleBuilder-product-card_category-more",style:{fontSize:"10px",padding:"2px 6px",backgroundColor:"rgba(0, 0, 0, 0.05)",borderRadius:"8px",color:"#666",fontWeight:"500"}},"+",O.length-2," more"))),t.createElement("div",{className:"yt-bundleBuilder-product-card_title",style:{"--title-margin-top":T?"4px":"0px","--title-padding":n?.showBorder??1?"0 10px":"0 4px",...!1===g?.byob.productsPriceVisibility&&{"--title-padding":"8px"},...g?.byob.productTitleFontSize&&{"--title-font-size":g?.byob.productTitleFontSize}}},P?String(z?.displayName).replace("- Default Title",""):e.title,z?.commonSuffix?" -"+z?.commonSuffix:"")),"ratingOnly"===n?.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleBuilder-product-card_rating",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:g?.general?.primaryColor,size:14}),t.createElement("span",{className:"yt-bundleBuilder-product-card_rating-text",style:{marginLeft:6}},e?.rating?.averageRating," rating")),"ratingAndReviewCount"===n?.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleBuilder-product-card_rating-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:g?.general?.primaryColor,size:14}),e?.rating?.averageRating,"|",t.createElement(Wn,{size:14,style:{color:"dodgerblue"}})," (",e?.rating?.ratingCount," reviews)"),g?.byob.productsPriceVisibility&&t.createElement("div",{className:"yt-bundleBuilder-product-price",style:{marginBottom:"5px",padding:n?.showBorder?"0px 10px":"0 4px"}},parseFloat(z?.price??"0")>0?t.createElement("span",{className:"yt-bundleBuilder-product-card_price"},Ng(g.general.currencySymbol,n?.storeCurrencyCode)??"Rs.",Ig(z?.price)):t.createElement("span",{className:"yt-bundleBuilder-product-card_price--free"},"Free"),z?.compareAtPrice&&g?.byob.compareAtPriceVisibility&&parseFloat(z.compareAtPrice)>parseFloat(z?.price)&&t.createElement("span",{className:"yt-fixed-bundle-original-price yt-bundleBuilder-product-card_price--old",style:{fontSize:"14px"}},Ng(g.general.currencySymbol,n?.storeCurrencyCode)??"Rs.",Ig(z.compareAtPrice))),(_>0||!g?.general.trackInventory)&&t.createElement("div",{className:"yt-product-atc-wrapper"},(0===k||void 0===k)&&t.createElement("button",{style:{...!o&&{backgroundColor:g?.general.primaryColor||"#111",color:g?.general.primaryContrastColor||"#fff"}},disabled:o,onClick:t=>{t.stopPropagation(),t.preventDefault(),E(1),(()=>{if(!w)return;"customOptions"===h&&b.length>1?y(!0):r(w,e,1)})()},className:"yt-product-atc-button"},g?.byob.addToBundleCTAText),!n?.disableQuantitySelector&&k>0&&w&&t.createElement("div",{className:"visible yt-bundleBuilder-quantity-selector-container--visible",style:{overflow:"hidden"}},t.createElement(Zu,{remainingQuantity:a,setQuantity:E,quantity:k,handleAddToBundle:r,variantId:w,product:e,handleRemoveItem:d,hideAddToBundle:o,disableInventoryTracking:!g?.general.trackInventory,selectedVariantInventoryQty:_})),n?.disableQuantitySelector&&k>0&&w&&t.createElement("button",{style:{backgroundColor:"#747474",color:g?.general.primaryContrastColor||"#fff"},className:"yt-bundleBuilder-product-card_add-to-bundle-button--added"},t.createElement("div",{className:"yt-bundleBuilder-product-card_added-button-text"},"ADDED"),t.createElement("div",{onClick:e=>{e.stopPropagation();const t=Math.max(0,k-1);E(t),d&&w&&d(w,1)},className:"yt-bundleBuilder-product-card_remove-button"},t.createElement(Jr,{className:"yt-bundleBuilder-product-card_remove-icon",style:{color:"#fff",fontSize:"20px"}})))),_<=0&&g?.general.trackInventory&&t.createElement("div",{style:{backgroundColor:g.general.disabledButtonColor,color:"#fff",cursor:"not-allowed",transition:"transform 0.2s ease-in-out"},className:"yt-product-atc-disabled yt-bundleBuilder-product-card_add-to-bundle-button--disabled"},g?.general.outOfStockLabel||"Out of Stock")),"customOptions"===h&&x&&b.length>1&&t.createElement(Qu,{product:e,isOpen:x,onClose:()=>y(!1),variantOptions:n.variantOptions,cta:{textColor:g.general.ctaTextColor,backgroundColor:g.general.primaryColor},onConfirm:t=>{C(t),r(t,e,1)}}))},Ju=({currentStep:e,setCurrentProductTier:n,totalSteps:r,tiers:o,isMobile:a,selectedProductsByTier:i,primaryColor:l="#000",primaryTextColorCta:c="#fff",tierNavigation:d})=>t.createElement("div",{className:"yt-bundleBuilder-stepper-container",style:{textAlign:"center",fontSize:"20px"}},t.createElement("div",{className:"yt-bundleBuilder-stepper_steps",style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center"}},Array.from({length:r}).map(((c,s)=>{const p=s+1,u=o[s].minimumQuantity-(i[s]?.length??0)==0,m=s===e;return l="black"===l?"#000000":l,t.createElement(t.Fragment,{key:p},t.createElement("div",{className:"yt-bundleBuilder-stepper_step "+(m?"yt-bundleBuilder-stepper_step--active":""),style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",gap:a?"4px":"8px"},onClick:()=>!1===d?()=>{}:n(p-1)},t.createElement("div",{className:"yt-bundleBuilder-stepper_label",style:{fontSize:"14px"}},"Step ",p),t.createElement("div",{className:"yt-bundleBuilder-stepper_line-container",style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",cursor:"pointer"}},t.createElement("div",{className:"yt-bundleBuilder-stepper_line",style:{height:"3px",width:a?"30px":"50px",backgroundColor:u?l:m?"#666666":"#CBD5E0",display:"block",borderTopLeftRadius:"5px",borderBottomLeftRadius:"5px"}}),t.createElement("div",{className:"yt-bundleBuilder-stepper_dot",style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:u?`${l}50`:"white",border:`2px solid ${u?l:m?"#666666":"#CBD5E0"}`,display:"flex",alignItems:"center",justifyContent:"center"}}),t.createElement("div",{className:"yt-bundleBuilder-stepper_line",style:{height:"3px",width:a?"30px":"50px",backgroundColor:u?l:m?"#666666":"#CBD5E0",display:"block",marginRight:s<r?a?"4px":"6px":"",borderTopRightRadius:"5px",borderBottomRightRadius:"5px"}}))))}))),t.createElement("div",{className:"yt-bundleBuilder-tier_title",style:{margin:a?"16px 0px":"15px 0px",fontSize:a?"16px":"18px",padding:"4px",background:"rgba(0, 0, 0, 0.03)",borderBottom:"1px solid rgba(130, 130, 130, 0.28)"}},o[e]?.title)),em=({isMobile:e,setSearchTerm:n,searchTerm:r,styles:o,setSortBy:a})=>{const[i,d]=c(!1),[s,p]=c(r);return l((()=>{const e=setTimeout((()=>{n(s)}),300);return()=>clearTimeout(e)}),[s,n]),t.createElement("div",{className:"yt-byob-sort-filter-container yt-bundleBuilder-sort-filter-container",style:{display:"flex",flexDirection:e?"column":"row",justifyContent:"space-between",alignItems:e?"flex-end":"center",textAlign:"center",marginBottom:"20px",width:"97%",gap:e?"10px":"0"}},t.createElement("div",{className:"yt-byob-sort-filter-inner yt-bundleBuilder-sort-filter-inner",style:{display:"flex",flexDirection:i&&e?"column":e?"row-reverse":"row",justifyContent:"space-between",alignItems:i?"":"center",gap:"12px",width:"100%"}},t.createElement("div",{className:"yt-byob-search-wrapper yt-bundleBuilder-search-wrapper",style:{position:"relative",display:"flex",alignItems:"center",width:e?i?"100%":"auto":"400px",transition:"width 0.3s ease-in-out"}},e&&!i?t.createElement(Xr,{className:"yt-byob-search-icon yt-bundleBuilder-search-icon",fontSize:"20px",color:"#555",style:{cursor:"pointer",lineHeight:"normal"},onClick:()=>d(!0)}):t.createElement(t.Fragment,null,t.createElement("input",{className:"yt-byob-search-input yt-bundleBuilder-search-input",style:{width:"100%",padding:e?"10px 12px":"10px 14px",fontSize:"14px",outline:"none",color:"#333",border:"1px solid #c7c7c7",borderRadius:o?.byob.borderRadius,boxShadow:o?.byob.borderColor?"0 2px 4px rgba(0, 0, 0, 0.1)":"none",textAlign:"start"},placeholder:"Search by Product Name",value:s,onChange:e=>p(e.target.value)}),!i&&t.createElement("span",{className:"yt-byob-search-icon-input yt-bundleBuilder-search-icon-input",style:{position:"absolute",right:"12px",color:"#aaa",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center",background:"white",paddingLeft:"5px"}},t.createElement(Xr,{fontSize:"18px",style:{lineHeight:"normal"}}))),e&&i&&t.createElement("span",{className:"yt-byob-search-close-icon yt-bundleBuilder-search-close-icon",style:{position:"absolute",right:"12px",color:"#aaa",fontSize:"16px",cursor:"pointer"},onClick:()=>d(!1)},"✖")),t.createElement("div",{className:"yt-byob-filter-wrapper yt-bundleBuilder-filter-wrapper",style:{display:"flex",alignItems:"center",textAlign:"center",border:window.innerWidth>600?"1px solid #d1d5db":"",padding:"8px 12px",fontSize:"14px",cursor:"pointer",borderRadius:o?.byob.borderRadius,boxShadow:o?.byob.borderColor?window.innerWidth>600?"0 2px 4px rgba(0, 0, 0, 0.1)":" ":"none"}},t.createElement("span",{className:"yt-byob-filter-label yt-bundleBuilder-filter_label",style:{fontSize:"14px",color:"#555",marginRight:"6px"}},"Sort:"),t.createElement("select",{className:"yt-byob-filter-select yt-bundleBuilder-filter_select",style:{flex:1,border:"none",height:"auto",padding:"0px",marginBottom:"0px",background:"transparent",fontSize:"14px",color:"#333",fontWeight:"500",width:e?"120px":"",outline:"none",cursor:"pointer",textAlign:"start"},onChange:e=>a(e.target.value)},t.createElement("option",{value:"best-selling"},"Featured"),t.createElement("option",{value:"title-asc"},"Product Title (A-Z)"),t.createElement("option",{value:"title-desc"},"Product Title (Z-A)"),t.createElement("option",{value:"price-low-to-high"},"Price (Low to High)"),t.createElement("option",{value:"price-high-to-low"},"Price (High to Low)")))))},tm=({styles:e,isMobile:n,categories:r,activeCategory:o,onCategoryChange:a})=>{const i=e=>{a(e)},l=(e,t)=>{const n=e.replace("#","");return`rgba(${parseInt(n.substring(0,2),16)}, ${parseInt(n.substring(2,4),16)}, ${parseInt(n.substring(4,6),16)}, ${t})`};return"tabs"===e?.byob?.categoryFilterOnPage?t.createElement("div",{style:{overflowX:n?"auto":"visible",scrollbarWidth:"none",msOverflowStyle:"none",marginBottom:"20px",width:"100%"},className:"yt-categoryfilter-wrapper"},t.createElement("div",{style:{display:"flex",gap:"0px",minWidth:"max-content",paddingBottom:"1px",flexWrap:"nowrap",justifyContent:"center",borderBottom:"1px solid #e0e0e0",width:"auto",height:n?"28px":"45px"},className:"yt-categoryfilter-tabs-container"},["All",...r].map((r=>{const a=o===r;return t.createElement("button",{key:r,onClick:()=>i(r),className:"yt-categoryfilter-tab-button "+(a?"yt-categoryfilter-tab-button--active":""),style:{background:"none",border:"none",padding:n?"12px 16px":"12px 20px",fontSize:n?"14px":"16px",fontWeight:a?"600":"400",color:a?e.general.primaryColor:"#666",cursor:"pointer",position:"relative",transition:"all 0.3s ease",backgroundColor:a?l(e.general.primaryColor,.07):"transparent",borderBottom:a?`2px solid ${e?.general.primaryColor}`:"2px solid transparent",marginBottom:"-1px",whiteSpace:"nowrap",minWidth:"fit-content"},onMouseEnter:t=>{a||(t.currentTarget.style.color=e?.general.primaryColor)},onMouseLeave:e=>{a||(e.currentTarget.style.color="#666")}},t.createElement("span",{style:{visibility:"hidden",height:0,display:"block",overflow:"hidden",fontWeight:600},"aria-hidden":"true"},r.charAt(0).toUpperCase()+r.slice(1)),t.createElement("span",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",textAlign:"center"}},r.charAt(0).toUpperCase()+r.slice(1)))})))):t.createElement("div",{style:{overflowX:n?"auto":"visible",scrollbarWidth:"none",msOverflowStyle:"none",marginBottom:"20px",paddingBottom:"5px"},className:"yt-categoryfilter-wrapper"},t.createElement("div",{style:{display:"flex",gap:"8px",minWidth:"max-content",flexWrap:"nowrap",justifyContent:"center",paddingRight:n?"10px":"0px"},className:"yt-categoryfilter-buttons-container"},["All",...r].map((r=>t.createElement("button",{key:r,onClick:()=>i(r),className:"yt-categoryfilter-button",style:{padding:n?"8px 16px":"10px 18px",fontSize:n?"13px":"14px",fontWeight:"500",border:`1px solid ${o===r?e?.general.primaryColor:"#e0e0e0"}`,borderRadius:e?.general.ctaBorderRadius,backgroundColor:o===r?e?.general.primaryColor:"white",color:o===r?"white":"#333",cursor:"pointer",transition:"all 0.3s ease",outline:"none",whiteSpace:"nowrap",minWidth:"fit-content",flexShrink:0},onMouseEnter:t=>{o!==r&&(t.currentTarget.style.borderColor=e?.general.primaryColor,t.currentTarget.style.color=e?.general.primaryColor)},onMouseLeave:e=>{o!==r&&(e.currentTarget.style.borderColor="#e0e0e0",e.currentTarget.style.color="#333")}},r.charAt(0).toUpperCase()+r.slice(1))))))},nm=({bundle:e,selectedItems:n,setSelectedItems:r,handleAddToCart:a,bundleAddToCartLoading:i,renderingOnPage:d,selectedItemsQuantity:s,handleRemoveItem:p,bundleSubtotal:u})=>{const[m,f]=c(void 0),[g,h]=c(window.innerWidth<450),[x,y]=c(0),[b,v]=c({}),w=e.builderTiers?.type,C=e.customizations,k=e.builderTiers?.productTier??[],E=e.builderTiers?.offerTier??[],[T,S]=c([]),[B,$]=c(!1),[z,_]=c("All");l((()=>{const t=new Set;let n=!1;e?.products?.forEach((e=>{const r=e.productDetails;if(r.metafield&&"yourtoken_bundles_app"===r.metafield.namespace&&"categories"===r.metafield.key){let e=[];if(r.metafield.jsonValue&&Array.isArray(r.metafield.jsonValue))e=r.metafield.jsonValue;else if(r.metafield.value)try{const t=JSON.parse(r.metafield.value);Array.isArray(t)&&(e=t)}catch(e){console.error("Failed to parse categories:",e)}e.length>0&&(n=!0,e.forEach((e=>t.add(e))))}})),S(Array.from(t)),$(n)}),[e.products]);const D=((e,t)=>"All"===t?e:e.filter((e=>{const n=e.productDetails;if(n.metafield&&"yourtoken_bundles_app"===n.metafield.namespace&&"categories"===n.metafield.key){let e=[];if(n.metafield.jsonValue&&Array.isArray(n.metafield.jsonValue))e=n.metafield.jsonValue;else if(n.metafield.value)try{const t=JSON.parse(n.metafield.value);Array.isArray(t)&&(e=t)}catch(e){console.error("Failed to parse categories:",e)}return e.includes(t)}return!1})))(e.products.filter((e=>"ACTIVE"===e.productDetails.status||void 0===e.productDetails.status||""===e.productDetails.status)),z),I="productTier"===w?k.reduce(((e,t)=>e+t.minimumQuantity),0):"offerTier"===w?E.reduce(((e,t)=>e+t.minimumQuantity),0):e.minimumQuantity,[N,P]=c(""),[O,A]=c(""),F=((e,t)=>e.filter((e=>e?.productDetails?.title?.toLowerCase().includes(t?.toLowerCase()))))(D,N),M=((e,t)=>[...e].sort(((e,n)=>{const r=e?.productDetails?.title?.toLowerCase(),o=n?.productDetails?.title?.toLowerCase(),a=parseFloat(e?.productDetails?.variants?.edges?.[0]?.node?.price||"0"),i=parseFloat(n?.productDetails?.variants?.edges?.[0]?.node?.price||"0");switch(t){case"title-asc":return r.localeCompare(o);case"title-desc":return o.localeCompare(r);case"price-low-to-high":return a-i;case"price-high-to-low":return i-a;default:return 0}})))(F,O),R=((e,t,n,r,o)=>(e[o]?.products.filter((e=>t.some((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0]))&&t?.productDetails.title.toLowerCase().includes(n?.toLowerCase())))))||[]).sort(((e,n)=>{let o=t.find((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0])))),a=t.find((e=>e.productId===n.productId&&(n.variantIds.length<1||e.variantIds.includes(n.variantIds[0]))));if(!o||!a)return 0;const i=o.productDetails?.title?.toLowerCase(),l=a.productDetails?.title?.toLowerCase(),c=parseFloat(o?.productDetails?.variants?.edges[0]?.node?.price||"0"),d=parseFloat(a?.productDetails?.variants?.edges[0]?.node?.price||"0");switch(r){case"title-asc":return i.localeCompare(l);case"title-desc":return l.localeCompare(i);case"price-low-to-high":return c-d;case"price-high-to-low":return d-c;default:return 0}})))(k,M,N,O,x),[L,j]=Wt(lu),[V,H]=c(!1);l((()=>{setTimeout((()=>{H(!0)}),100)}),[]);const W=o(null);l((()=>{const e=()=>{h(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{if(e.coverImageUrl){const t=new Image;t.src=e.coverImageUrl,t.onload=()=>{f(t.width/t.height)}}}),[e.coverImageUrl]),l((()=>{H(!1),setTimeout((()=>H(!0)),100)}),[x]);const U=(e,t)=>{if("productTier"===w){let n={...b},r=!1;if(n[t]){const o=n[t].indexOf(e);-1!==o&&(n[t]=[...n[t]],n[t].splice(o,1),r=!0)}if(!r)for(let t=k.length;t>=0;t--){const r=n[t].indexOf(e);if(-1!==r){n[t]=[...n[t]],n[t].splice(r,1);break}}v(n);const o=k.findIndex(((e,t)=>n[t]?.length<e.minimumQuantity));-1!==o&&y(o)}p(e)};l((()=>{if("productTier"===w){const e=Object.fromEntries(k.map((e=>[e.tier,[]])));v(e)}}),[e]),l((()=>{if("productTier"!==w||!k[x])return;if(I===s)return;const e=k.findIndex(((e,t)=>{const n=b[t]||[];return t>=x&&n.length<e.minimumQuantity}));-1!==e&&e!==x&&(y(e),(()=>{const e=document.querySelector(".products-display");e&&e.scrollIntoView({behavior:"smooth"})})())}),[b,k,w]),l((()=>{P("")}),[x]),l((()=>{function e(e){if(!W.current||!e.target)return;!W.current.contains(e.target)&&j(void 0)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const G=(e,t,o)=>{var a;"productTier"===w&&(a=e,v((e=>{const t={...e},n=k.findIndex(((e,n)=>{const r=t[n]||[];return n>=x&&r.length<e.minimumQuantity}));return-1!==n&&y(n),t[n]||(t[n]=[]),t[n].push(a),t}))),Pg(e,t,o,n,r)},q=(()=>{if(!e?.builderTiers)return e.minimumQuantity;const{type:t,offerTier:n,productTier:r}=e.builderTiers,o="offerTier"===t?n:"productTier"===t?r:null;if(!o)return e.minimumQuantity;let a=0;return o.map((e=>{a+=e.minimumQuantity})),a})(),Y=g&&e.mobileCoverImageUrl?e.mobileCoverImageUrl:e.coverImageUrl||null,Q=e.customStoreDetails?.fixedInventoryDetails,Z=e=>{const t=C?.general?.showOutOfStockProducts;if(t||!C?.general.trackInventory)return!0;const n=e?.productDetails?.variants?.edges||[];if(Q){if(n.some((e=>Q.some((t=>t.variantId===e.node.id&&t.quantity>0)))))return!0}return n.some((e=>e.node.inventoryQuantity>0))},K="bundles"==e.appName?e.pageHeader?.title:e?.title,X="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",rowGap:"15px",padding:"20px 0px",marginBottom:"20px",backgroundColor:C.byob.sectionBackgroundColor,..."transparent"!==C.fixedBundle.sectionBackgroundColor&&{padding:"20px"}},id:"yt-bundleBuilder-main-container",className:"yt-bundleBuilder-main-container"},Y?t.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",overflow:"hidden",...e?.coverImageVerticalMargin&&{marginBottom:e?.coverImageVerticalMargin,marginTop:e?.coverImageVerticalMargin}},className:"yt-bundleBuilder-header-banner"},Y&&t.createElement("img",{src:Y,alt:"Background",className:"yt-bundleBuilder-header_image",style:{width:"100%",height:"auto",display:"block"}}),t.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",width:"90%",maxWidth:"1000px",textShadow:"2px 2px 8px rgba(0, 0, 0, 0.4)"},className:"yt-bundleBuilder-header_text-overlay"},t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.titleFontSize??"3rem",fontWeight:"700",color:C?.byob?.titleTextColor??"#000",marginBottom:"15px",backgroundColor:C?.byob?.titleBackgroundColor??"transparent",width:"100%",textAlign:"center"},className:"bundle-builder-title yt-bundleBuilder-header_title"},K),t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.subtitleFontSize??"1.5rem",color:C?.byob?.titleTextColor??"#000"},className:"bundle-builder-subtitle yt-bundleBuilder-header_subtitle"},X))):(K||X)&&t.createElement("div",{style:{zIndex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",width:"90%",maxWidth:"1000px"},className:"yt-bundleBuilder-header-container"},K&&t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.titleFontSize??"3rem",fontWeight:"700",color:C?.byob?.titleTextColor??"#000",marginBottom:"15px",textAlign:"center",width:"100%",backgroundColor:C?.byob?.titleBackgroundColor??"transparent"},className:"yt-bundleBuilder-header_title"},K),X&&t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.subtitleFontSize??"1.5rem",color:C?.byob?.titleTextColor??"#000"},className:"yt-bundleBuilder-header_subtitle"},X)),t.createElement("div",{style:{fontSize:"20px",width:"100%"},className:"products-display yt-bundleBuilder-products-display"},"productTier"===w&&k.length>0&&C?.byob.productTiersVisibility&&t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Ju,{currentStep:x,totalSteps:k.length,tiers:k,isMobile:g,primaryColor:C?.general?.primaryColor,primaryTextColorCta:C?.general?.primaryContrastColor,setCurrentProductTier:y,selectedProductsByTier:b,tierNavigation:C.byob.tierNavigation})))),t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"20px"},className:"yt-bundleBuilder-filters-container"},e?.enableSortAndFilter&&t.createElement(em,{isMobile:g,searchTerm:N,setSearchTerm:P,setSortBy:A,styles:C}),e?.customizations?.byob?.enableProductCategories&&B&&t.createElement("div",null,t.createElement(tm,{styles:C,isMobile:g,categories:T,activeCategory:z,onCategoryChange:e=>{_(e)}}))),t.createElement("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"12px",justifyContent:"center",width:"100%"},className:"products-display yt-bundleBuilder-product-grid"},0===M?.length||"productTier"===w&&0===R?.length?t.createElement("p",{style:{fontSize:"20px",color:"#333",textAlign:"center",width:"100%"},className:"yt-bundleBuilder-product-grid_no-products-text"},"No products found"):"productTier"===w&&k.length>0?R.filter((e=>Z(M.find((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0]))))))).map(((r,o)=>{const a=(k[x]?.minimumQuantity??0)>(b[x]?.length??0),i=M.find((e=>e.productId===r.productId&&(r.variantIds.length<1||e.variantIds.includes(r.variantIds[0]))));return i?t.createElement(Xu,{bundle:e,idx:o,key:r?.variantIds?.[0]??r.productId,product:i?.productDetails,handleAddToBundle:G,hideAddToBundle:!a,remainingQuantity:q-s,themeColor:e?.dealTextColor,handleRemoveItem:e=>U(e,x),selecteditems:n,transitionActive:V,customVariantsQuantity:Q}):null})):M.filter(Z).map(((r,o)=>t.createElement(Xu,{bundle:e,idx:o,key:r.productId,product:r?.productDetails,handleAddToBundle:G,hideAddToBundle:s>=q,remainingQuantity:q-s,themeColor:e?.dealTextColor,handleRemoveItem:p,selecteditems:n,transitionActive:V,customVariantsQuantity:Q})))),!d&&t.createElement(iu,{builderTiers:e?.builderTiers,handleAddToCart:a,minimumQuantity:I,selectedProducts:n,showProductDetailsInTracker:e.showProductDetailsInTracker,handleRemoveItem:p,handleRemoveItemProductTier:U,selectedItemsQuantity:s,percentageOff:e.percentageOff,loading:i,bundleSubtotal:u,amountOff:e.amountOff,styles:e.customizations,dealAmount:e.dealAmount,themeColor:e?.dealTextColor??"#333",primaryTextColorCta:e?.primaryTextColorCta??"#fff",cornerRadiusType:e?.cornerRadiusType??"",selectedProductsByTier:b,renderingOnPage:d})),d&&t.createElement(iu,{handleAddToCart:a,minimumQuantity:I,builderTiers:e?.builderTiers,selectedProducts:n,showProductDetailsInTracker:e.showProductDetailsInTracker,loading:i,handleRemoveItem:p,handleRemoveItemProductTier:U,percentageOff:e.percentageOff,selectedItemsQuantity:s??0,bundleSubtotal:u??{price:0,compareAtPrice:0},amountOff:e.amountOff,styles:e.customizations,dealAmount:e.dealAmount,themeColor:C?.general.primaryColor||"#000",primaryTextColorCta:C.general.primaryContrastColor??"#fff",cornerRadiusType:e?.cornerRadiusType??"",selectedProductsByTier:b,renderingOnPage:d}),L&&void 0!==s&&(()=>{let r=s<e.minimumQuantity;return"productTier"==w&&(r=(k[x]?.minimumQuantity??0)>(b[x]?.length??0)),t.createElement(qu,{handleAddToBundle:G,ref:W,remainingQuantity:e.minimumQuantity-s,hideAddToBundle:!r,disableQuantitySelector:e?.disableQuantitySelector??!1,disableInventoryTracking:!e?.customizations.general.trackInventory,selectedProducts:n,themeColor:C?.general.primaryColor||"#000",primaryTextColorCta:e?.customizations?.general.primaryContrastColor??"#fff",primaryBackgroundColorCta:C?.general.primaryColor||"#000",cornerRadius:e?.customizations.byob.borderRadius,styles:e.customizations,reviewRatingType:e?.reviewRatingType??"none"})})())},rm=({product:e,selectedVariantId:n,onVariantChange:r,styles:o,originalPrice:a,dealPrice:l,isVertical:c=!1,variantOptions:d,storeCurrencyCode:s})=>{const p=e?.productDetails?.variants?.edges?.find((e=>e?.node?.id===n))?.node,u=i((()=>{if(p?.title&&e.productDetails.options){const t=p.title.split(" / ");if(t.length===e.productDetails.options.length)return t}return e.productDetails.options?.map((e=>e.values[0]))||[]}),[p,e.productDetails.options]),m=e=>{r(e)};return c?t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"normal",width:"165px",backgroundColor:"#F6F6F6",borderRadius:"20px",border:"1px solid #B3B3B3",boxShadow:"4px 4px 0px -1px #00000033",overflow:"hidden"}},t.createElement("div",{style:{position:"relative",width:"100%"}},o.comboBundle.subProductsImageVisibility&&t.createElement(t.Fragment,null,t.createElement("img",{src:p?.image?.url||e?.productDetails?.featuredMedia?.preview?.image?.url||"/placeholder.svg",alt:e?.productDetails?.featuredMedia?.alt,width:165,height:165,style:{objectFit:"cover",borderRadius:"20px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",height:"100%",aspectRatio:o.general?.imageAspectRatio||"1/1"}}),t.createElement("div",{style:{marginTop:"8px",position:"absolute",bottom:"10px",left:"5px",right:"5px"}},e?.productDetails?.variants?.edges?.length>1&&t.createElement(t.Fragment,null,t.createElement("select",{value:n,onChange:e=>m(e.target.value),style:{padding:"8px 10px",border:"1px solid #ddd",backgroundColor:"#fff",color:"#333",fontSize:"14px",width:"100%",appearance:"none",marginRight:"30px"}},e?.productDetails?.variants?.edges.map((e=>t.createElement("option",{key:e?.node?.id,value:e?.node?.id,disabled:e.node.inventoryQuantity<=0},e?.node?.title)))),t.createElement("div",{style:{position:"absolute",right:"1px",top:"2px",bottom:"0px",pointerEvents:"none",backgroundColor:"#F3F3F3",width:"15%",height:"calc(100% - 4px)",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(F,null)))))),(o.comboBundle.subProductsProductTitleVisibility||o.comboBundle.subProductsProductPriceVisibility)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"40px",width:"100%",paddingBlock:"5px"}},o.comboBundle.subProductsProductTitleVisibility&&t.createElement("span",{style:{fontSize:"12px",color:"#333",fontWeight:"600",lineHeight:"normal",textAlign:"center",width:"fit-content"}},e?.productDetails?.title),o.comboBundle.subProductsProductPriceVisibility&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",lineHeight:"normal",fontSize:"14px"}},t.createElement("span",{style:{lineHeight:"normal"}},Ng(o.general.currencySymbol,s),Ig((Number(""!==p?.compareAtPrice?Number(p?.compareAtPrice):p?.price)/Number(a)*Number(l)).toFixed(2))),t.createElement("span",{style:{textDecoration:"line-through",color:"#999",lineHeight:"normal",fontSize:"12px"}},Ng(o.general.currencySymbol,s),Ig(""!==p?.compareAtPrice?p?.compareAtPrice:p?.price))))):t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"16px",padding:"4px",lineHeight:"normal",borderRadius:"8px",transition:"background-color 0.3s",width:"100%",border:"1px solid transparent",..."right"===o.comboBundle.infoAlignment&&{flexDirection:"row-reverse"},..."center"===o.comboBundle.infoAlignment&&{justifyContent:"center"}},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#fafafa",e.currentTarget.style.border="1px solid #DFDFDF"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.border="1px solid transparent"}},o.comboBundle.subProductsImageVisibility&&t.createElement("div",{style:{position:"relative"}},t.createElement("img",{src:p?.image?.url||e?.productDetails?.featuredMedia?.preview?.image?.url||"/placeholder.svg",alt:e?.productDetails?.featuredMedia?.alt,height:80,style:{objectFit:"cover",borderRadius:"10px",border:"1px solid #DEDEDE",aspectRatio:"1/1",width:"90px",height:"90px"}}),t.createElement("div",{style:{position:"absolute",top:-8,right:-8,backgroundColor:"#f8f8f8",borderRadius:"50%",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #eee",fontSize:"14px"}},"1")),t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"left"===o.comboBundle?.infoAlignment?"flex-start":"right"===o.comboBundle?.infoAlignment?"flex-end":"center"===o.comboBundle?.infoAlignment?"flex-start":void 0}},o.comboBundle.subProductsProductTitleVisibility&&t.createElement("span",{style:{fontSize:"14px",fontWeight:"600",lineHeight:"normal",display:"flex",alignItems:"center",gap:"8px"}},t.createElement("span",null," ",e?.productDetails?.title," "),e.productDetails.variants.edges.length>1&&d&&u&&t.createElement("span",{style:{fontSize:"10px",color:"#666",backgroundColor:"#F4F4F4",padding:"2px 8px",borderRadius:"10px",border:"1px solid #ddd"}},u.length>1?u.join(" / "):u)),o.comboBundle.subProductsProductPriceVisibility&&t.createElement("div",{style:{display:"flex",gap:"8px",marginTop:"5px",alignItems:"baseline"}},t.createElement("span",{style:{lineHeight:"normal"}},Ng(o.general.currencySymbol,s),Ig((Number(""!==p?.compareAtPrice?Number(p?.compareAtPrice):p?.price)/Number(a)*Number(l)).toFixed(2))),t.createElement("span",{style:{textDecoration:"line-through",color:"#999",fontSize:"14px",lineHeight:"normal"}},Ng(o.general.currencySymbol,s),Ig(""!==p?.compareAtPrice?p?.compareAtPrice:p?.price))),e.productDetails.variants.edges.length>1&&e.productDetails.options.length>0?t.createElement(t.Fragment,null,e.productDetails.options.map(((n,r)=>t.createElement("div",{key:n.name,style:{marginTop:"10px",display:"flex",flexDirection:"row",gap:"8px",alignItems:"center"}},e.productDetails.options.length>1&&t.createElement("label",{style:{fontSize:"12px",fontWeight:"500",color:"#333"}},n.name,":"),n?.values?.length>1&&t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",flexWrap:"wrap"}},n.values.map((a=>{const i=d&&d?.options?.find((e=>e.name===n.name));return i&&"color"===i?.type?t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{borderRadius:"50%",padding:"1px",backgroundColor:"white",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid transparent"}},i?.values.find((e=>e.name===a))?.value?t.createElement("div",{style:{width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",borderRadius:"50%",backgroundColor:i?.values.find((e=>e.name===a))?.value,cursor:"pointer"}},t.createElement("span",null)):t.createElement("span",{key:a,style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)):i&&"image"===i?.type?t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"100%",backgroundColor:u[r]===a?"#F7F7F7":"transparent",cursor:"pointer",padding:"0px",width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",overflow:"hidden"}},i?.values.find((e=>e.name===a))?.value?t.createElement("img",{src:i?.values.find((e=>e.name===a))?.value||"/placeholder.svg",alt:a,style:{width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",objectFit:"cover",borderRadius:"100%",aspectRatio:"1/1"}}):t.createElement("span",{key:a,style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)):t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)}))))))):t.createElement(t.Fragment,null,e?.productDetails?.variants?.edges?.length>1&&t.createElement("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap",lineHeight:"normal",marginTop:"10px"}},e?.productDetails?.variants?.edges.map((e=>t.createElement("button",{key:e?.node?.id,onClick:()=>m(e?.node?.id),disabled:e.node.inventoryQuantity<=0,style:{padding:"4px 8px",border:n===e?.node?.id?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:n===e?.node?.id?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},e?.node?.title)))))))},om=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[a,d]=c(window.innerWidth<786),[s,p]=c((()=>{const t={};return e.products.forEach(((e,n)=>{const r=e.productDetails.variants.edges.find((e=>e.node.inventoryQuantity>0))?.node;t[n]=r?r.id:e?.productDetails?.variants?.edges[0]?.node?.id})),t})),u=e.products?.filter((e=>e?.productDetails?.variants?.edges.some((e=>e?.node?.inventoryQuantity>0))))||[],m=Object.keys(s).length===u.length,f=(e,t)=>{p((n=>({...n,[e]:t})))},{originalPrice:g,dealPrice:h,offerValue:x}=i((()=>{const{price:t,compareAtPrice:n}=Object.entries(s).reduce(((t,[n,r])=>{const o=e.products[parseInt(n)],a=o.productDetails.variants.edges?.find((e=>e.node.id===r))?.node,i=parseFloat(a?.price??"0"),l=parseFloat(a?.compareAtPrice||i.toString());return t.price+=i,t.compareAtPrice+=l,t}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff);const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[s,e.products,e.percentageOff,e.dealAmount,e.amountOff]);l((()=>{const e=()=>{d(window.innerWidth<786)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const y=e.customizations,b=y.comboBundle?.comboCardStyle||"auto",v="vertical"===b||"auto"===b&&!a,w=y.comboBundle?.embedContentVisibility,C="bundles"==e.appName?e.pageHeader?.title:e?.title,k="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement("div",{style:{lineHeight:"normal",maxWidth:"800px",marginBlock:y.comboBundle?.verticalMargin||"0px",display:"flex",flexDirection:"column",alignItems:"left"===y.comboBundle?.infoAlignment?"flex-start":"right"===y.comboBundle?.infoAlignment?"flex-end":"center"===y.comboBundle?.infoAlignment?"center":void 0,textAlign:y.comboBundle?.infoAlignment??"left",fontFamily:"system-ui, -apple-system, sans-serif"}},w&&y.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px"}},t.createElement("h2",{style:{fontSize:y.comboBundle?.productTitleFontSize||"28px",color:y.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},C)),w&&y?.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:y.comboBundle?.titleTextColor||"#000",fontSize:(parseInt(y.comboBundle?.productTitleFontSize?.replace("px",""))||28)-4+"px"}},t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px",flexWrap:"wrap"}},t.createElement("span",{style:{fontWeight:"bold",lineHeight:"1",minWidth:"fit-content"}},Ng(y.general.currencySymbol,e.storeCurrencyCode),Ig(h)),t.createElement("div",{style:{color:y.comboBundle?.titleTextColor||"#666",textDecoration:"line-through",verticalAlign:"middle",display:"inline-block",minWidth:"fit-content"}},Ng(y.general.currencySymbol,e.storeCurrencyCode),Ig(g)),t.createElement("span",{style:{backgroundColor:"#D3122A",color:"white",padding:"4px 8px",fontSize:"14px",borderRadius:"20px",fontWeight:"500",lineHeight:"1",minWidth:"fit-content"}},e?.percentageOff?`${e?.percentageOff}% Off`:e?.amountOff?`${Ng(y.general.currencySymbol,e.storeCurrencyCode)}${Ig(e?.amountOff)} Off`:`Save ${Ng(y.general.currencySymbol,e.storeCurrencyCode)}${Ig(x)}`))),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",margin:"15px 0px"},className:"yt-comboBundle-checkoutSpecific-container"},t.createElement("div",{style:{display:"flex",width:"12px",height:"12px",justifyContent:"center",alignItems:"center",alignContent:"center",borderRadius:"50%",backgroundColor:y.general?.ctaBackgroundColor||"#1e1e1e",flexShrink:0},className:"yt-comboBundle-checkoutSpecific-dot"},t.createElement("span",null)),t.createElement("p",{style:{fontSize:y.comboBundle.productDescriptionFontSize||"16px",color:y.comboBundle?.descriptionTextColor||"#000",alignItems:"center",margin:0,lineHeight:"1.2"},className:"yt-comboBundle-checkoutSpecific-text"},"Tax included. ",t.createElement("u",null,"Shipping")," calculated at checkout."))),y.comboBundle.subProductsSectionVisibility&&t.createElement(t.Fragment,null,v?t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",marginTop:"10px",flexWrap:"wrap"}},e.products.map(((n,r)=>{const o=n?.productDetails?.variants?.edges?.find((e=>e?.node?.id===s[r]))?.node;return o?t.createElement(rm,{key:`combo-product-${r}-${n.productId}`,product:n,styles:y,originalPrice:g,dealPrice:h,selectedVariantId:s[r],onVariantChange:e=>f(r,e),isVertical:v,variantOptions:e.variantOptions,storeCurrencyCode:e.storeCurrencyCode}):null}))):t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"10px",width:"100%"}},y.comboBundle.subProductsSectionVisibility&&e.products.map(((n,r)=>t.createElement(rm,{key:`combo-product-horizontal-${r}-${n.productId}`,product:n,styles:y,originalPrice:g,dealPrice:h,selectedVariantId:s[r],onVariantChange:e=>f(r,e),variantOptions:e.variantOptions}))))),t.createElement("div",{style:{borderTop:"1px solid #eee",display:"flex",flexDirection:"column",rowGap:"5px",marginTop:"20px",width:"100%"}},t.createElement("button",{style:{backgroundColor:m?y.general?.ctaBackgroundColor||"#121212":y.general.disabledButtonColor,color:y.general?.ctaTextColor||"#FFFFFF",fontSize:"16px",borderRadius:y.general.ctaBorderRadius??"20px",fontWeight:"bold",cursor:m?"pointer":"not-allowed",border:`1px solid ${m?y.general?.ctaBackgroundColor||"#121212":y.general.disabledButtonColor}`,boxShadow:y.general.ctaShadowType,padding:y.general?.ctaPadding,width:y.general?.ctaWidth,margin:"0"},disabled:!m,onMouseOver:e=>{y.general.customizeHoverState&&m&&(e.currentTarget.style.backgroundColor=y.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=y.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{y.general.customizeHoverState&&m&&(e.currentTarget.style.backgroundColor=y.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=y.general?.ctaTextColor||"#FFFFFF")},onClick:async()=>{try{if(o(!0),!n)return void o(!1);const t=Object.entries(s).map((([t,n])=>{const r=e.products[parseInt(t)],o=r.productDetails.variants.edges.find((e=>e.node.id===n))?.node;return o?{variantId:n,price:Number(o.price)}:null})).filter((e=>null!==e)),r=Object.values(s);await n(Number(g),r,Number(h),t)}catch(e){}o(!1)}},r?t.createElement(Vo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,m?y.comboBundle?.ctaTitle??"Add Bundle to cart":y.general.outOfStockLabel||"Out of Stock"," "))),w&&y.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:y.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:y.general.primaryColor+"20"}},"Description"),t.createElement("div",{style:{fontSize:y.comboBundle.productDescriptionFontSize||"16px",color:y.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:y.general.primaryColor+"08"}},t.createElement("p",null,k))))},am=x.div`
|
|
2822
|
+
`,Kp=n((({removeCartItem:e,addCartItem:n,getProductDetailsByVariantId:r,themeColor:a,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,productClaimCtaButtonText:f,backgroundSubdued:g,primaryTextColor:h},x)=>{const[y,b]=Wt(tn),v=Vt(Ut),w=o(null),[C,k]=c(null),[E,T]=c(!1),[S,B]=c({}),[$,z]=c(y?.variantId),[_,D]=c(y?.quantity||1),[I,N]=c(!1),[P,O]=c(null);l((()=>{const e=localStorage.getItem("yt_variant_options");if(e)try{const t=JSON.parse(e);Array.isArray(t)&&O({options:t})}catch(e){console.error("Failed to parse yt_variant_options from localStorage",e)}}),[]),l((()=>{y?.open?setTimeout((()=>{N(!0)}),10):N(!1)}),[y?.open]);l((()=>{(async()=>{if(!C&&r&&y?.variantId&&y?.handle){const e=await r(y.handle,y.variantId);if(e&&e.variants&&e.options){let t;const n=y.allowedVariantIds;if(t=y.freebieSelection&&Array.isArray(n)&&n.length>0?e.variants.find((e=>e.available&&n.includes(String(e.id)))):e.variants.find((e=>e.available&&String(e.id)===String(y.variantId))),t){z(String(t.id));const n={};e.options.forEach(((e,r)=>{n[e.name]=t[`option${r+1}`]})),B(n)}else z(void 0),B({})}k(e)}})()}),[C,r,y]);const A=(e,t)=>{const n={...S,[e]:t};B(n);const r=C?.variants?.find((e=>C.options.every(((t,r)=>e[`option${r+1}`]===n[t.name]))));r&&(y?.freebieSelection&&Array.isArray(y.allowedVariantIds)&&y.allowedVariantIds.length>0?y.allowedVariantIds.includes(String(r.id))&&z(String(r.id)):z(String(r.id)))},F=C?.variants?.find((e=>String(e.id)===String($))),M=sn(v,v?.currency),R=i((()=>{const e={};if(!C)return e;const t=y?.freebieSelection&&Array.isArray(y?.allowedVariantIds)&&y.allowedVariantIds.length>0,n=y.allowedVariantIds;return C.options.forEach((r=>{e[r.name]=r.values.filter((e=>C.variants.filter((t=>{const n=C.options.indexOf(r);if(t[`option${n+1}`]!==e)return!1;return!!C.options.every(((e,n)=>{if(e.name===r.name)return!0;const o=S[e.name];return!o||t[`option${n+1}`]===o}))&&!!t.available})).some((e=>!t||n?.includes(String(e.id))))))})),e}),[C,S,y]);return C?t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:y?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:I?1:0,transition:"opacity 0.3s ease"},onClick:()=>{N(!1),setTimeout((()=>{b({open:!1,variantId:void 0,handle:void 0,quantity:void 0})}),300)}}),t.createElement(zp,{ref:x,className:"yt-variant-selection-popup"},t.createElement(Dp,{ref:w,style:{backgroundColor:p||"white",opacity:I?1:0,transform:I?"translateY(0)":"translateY(20px)"},$themeColor:a,onClick:e=>e.stopPropagation()},y?.freebieSelection&&t.createElement(_p,null,"Unlocked Freebie"),t.createElement(Np,null,t.createElement(Pp,null,t.createElement(Op,null,t.createElement(Ap,{src:F?.featured_image?.src??C?.featured_image,alt:F?.featured_image?.alt??C?.title})),t.createElement(Fp,null,t.createElement(Mp,{$themeColor:a,$primaryTextColor:h,href:`${C?.url}?variant=${F?.id}`},C?.title),t.createElement(Yp,null,t.createElement(Rp,null,t.createElement(Lp,{$primaryTextColor:h},M,cn(F?.price,v?.currency??"INR")),F?.compare_at_price&&t.createElement(jp,null,M,cn(F?.compare_at_price,v?.currency??"INR"))),!y?.freebieSelection&&t.createElement(aa,{value:_,handleItemQuantityIncrement:async()=>{D((e=>e+1))},handleItemQuantityDecrement:async()=>{_>1&&D((e=>e-1))},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:g})))),C?.options?.map((e=>{const n=P?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()));return t.createElement(Hp,{key:e.name},t.createElement(Up,null,t.createElement("span",null,"Select ",e.name),S[e.name]&&t.createElement(Gp,null,S[e.name])),t.createElement(qp,null,R[e.name]?.map((r=>{const o=S[e.name]===r,i=n?.values?.find((e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()));return"color"===n?.type&&i?.value?t.createElement(Qp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$colorValue:i.value}):"image"===n?.type&&i?.value?t.createElement(Zp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$imageUrl:i.value}):t.createElement(Wp,{$themeColor:a,key:r,$isSelected:o,backgroundColor:o?a:void 0,onClick:()=>A(e.name,r)},r)}))))}))),t.createElement(Vp,{$themeColor:a??"#C33",onClick:y?.productRec?async()=>{if($&&n){T(!0);try{await n($,_,"product-recommendation-variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,productRec:!1})}catch(e){console.error("Error adding item from product recommendation:",e)}T(!1)}}:async()=>{if(!$)return;const t=!!y?.lineItemKey,r=String($)!==String(y?.variantId);if(!t||r){T(!0);try{const t=y?.freebieSelection;t&&u&&y?.lineItemKey?await u(y.lineItemKey):await e(y?.lineItemKey||y?.variantId,"variant-selector",!0),t&&m?await m($,y.allowedVariantIds):n&&$&&await n($,_,"variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})}catch(e){}T(!1)}else b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})},disabled:!$||E},E?t.createElement(Vo,{color:"white",size:13}):y?.productRec?"ADD TO BAG":y?.freebieSelection?f||"CLAIM FREEBIE":"GET IN BAG")))):t.createElement(zp,{ref:x},t.createElement(Dp,{style:{backgroundColor:p||"white"}},t.createElement(Ip,null,t.createElement(Go,{color:a||"#868E96"}))))}));Kp.displayName="DesktopVariantPopup";const Xp=n((({removeCartItem:e,addCartItem:n,getProductDetailsByVariantId:r,themeColor:a,cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundColor:p,removeFreebieFromCart:u,freebieClaimAddToCart:m,productClaimCtaButtonText:f,backgroundSubdued:g,primaryTextColor:h},x)=>{const[y,b]=Wt(tn),v=Vt(Ut),[w,C]=c(null),[k,E]=c(!1),[T,S]=c({}),[B,$]=c(y?.variantId),[z,_]=c(y?.quantity||1),D=o(null),[I,N]=c(null),[P,O]=c(!1);l((()=>{const e=localStorage.getItem("yt_variant_options");if(e)try{const t=JSON.parse(e);Array.isArray(t)&&N({options:t})}catch(e){console.error("Failed to parse yt_variant_options from localStorage",e)}}),[]),l((()=>{y?.open?setTimeout((()=>{O(!0)}),10):O(!1)}),[y?.open]);l((()=>{(async()=>{if(!w&&r&&y?.variantId&&y?.handle)try{const e=await r(y.handle,y.variantId);if(!e)return;if(!e.variants||!Array.isArray(e.variants))return;if(e&&e.variants&&e.options){let t;const n=y.allowedVariantIds;if(t=y.freebieSelection&&Array.isArray(n)&&n.length>0?e.variants.find((e=>e.available&&n.includes(String(e.id)))):e.variants.find((e=>e.available&&String(e.id)===String(y.variantId))),t){$(String(t.id));const n={};e.options.forEach(((e,r)=>{n[e.name]=t[`option${r+1}`]})),S(n)}else $(void 0),S({})}C(e)}catch(e){}})()}),[w,r,y]),l((()=>{}),[p,e,n,r]);const A=(e,t)=>{const n={...T,[e]:t};S(n);const r=w?.variants?.find((e=>w.options.every(((t,r)=>e[`option${r+1}`]===n[t.name]))));r&&$(String(r.id))},F=w?.variants?.find((e=>String(e.id)===String(B))),M=sn(v,v?.currency),R=i((()=>{const e={};if(!w)return e;const t=y?.freebieSelection&&Array.isArray(y?.allowedVariantIds)&&y.allowedVariantIds.length>0,n=y.allowedVariantIds;return w.options.forEach((r=>{e[r.name]=r.values.filter((e=>w.variants.filter((t=>{const n=w.options.indexOf(r);if(t[`option${n+1}`]!==e)return!1;return!!w.options.every(((e,n)=>{if(e.name===r.name)return!0;const o=T[e.name];return!o||t[`option${n+1}`]===o}))&&!!t.available})).some((e=>!t||n?.includes(String(e.id))))))})),e}),[w,T,y]);return w?t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:2147483643,display:y?.open?"flex":"none",justifyContent:"center",alignItems:"center",opacity:P?1:0,transition:"opacity 0.3s ease"},onClick:()=>{O(!1),setTimeout((()=>{b({open:!1,variantId:void 0,handle:void 0,quantity:void 0})}),300)}}),t.createElement(zp,{ref:x,className:"yt-variant-selection-popup"},t.createElement(Dp,{ref:D,style:{backgroundColor:p||"white",opacity:P?1:0,transform:P?"translateY(0)":"translateY(20px)"},$themeColor:a,onClick:e=>e.stopPropagation()},y?.freebieSelection&&t.createElement(_p,null,"Unlocked Freebie"),t.createElement(Np,null,t.createElement(Pp,null,t.createElement(Op,null,t.createElement(Ap,{src:F?.featured_image?.src??w?.featured_image,alt:F?.featured_image?.alt??w?.title})),t.createElement(Fp,null,t.createElement(Mp,{$themeColor:a,$primaryTextColor:h,href:`${w?.url}?variant=${F?.id}`},w?.title),t.createElement(Yp,null,t.createElement(Rp,null,t.createElement(Lp,{$primaryTextColor:h},M,cn(F?.price,v?.currency??"INR")),F?.compare_at_price&&t.createElement(jp,null,M,cn(F?.compare_at_price,v?.currency??"INR"))),!y?.freebieSelection&&t.createElement(aa,{value:z,handleItemQuantityIncrement:async()=>{_((e=>e+1))},handleItemQuantityDecrement:async()=>{z>1&&_((e=>e-1))},cartComponentsCornerRadius:d,cartComponentsCornerType:s,backgroundSubdued:g})))),w?.options?.map((e=>{const n=I?.options?.find((t=>t.name.trim().toLowerCase()===e.name.trim().toLowerCase()));return t.createElement(Hp,{key:e.name},t.createElement(Up,null,t.createElement("span",null,"Select ",e.name,":"),T[e.name]&&t.createElement(Gp,null,T[e.name])),t.createElement(qp,null,R[e.name]?.map((r=>{const o=T[e.name]===r,i=n?.values?.find((e=>e.name.trim().toLowerCase()===r.trim().toLowerCase()));return"color"===n?.type&&i?.value?t.createElement(Qp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$colorValue:i.value}):"image"===n?.type&&i?.value?t.createElement(Zp,{key:r,$isSelected:o,$themeColor:a,onClick:()=>A(e.name,r),$imageUrl:i.value}):t.createElement(Wp,{$themeColor:a,key:r,$isSelected:o,backgroundColor:o?a:void 0,onClick:()=>A(e.name,r)},r)}))))}))),t.createElement(Vp,{$themeColor:a??"#C33",onClick:y?.productRec?async()=>{if(B&&n){E(!0);try{await n(B,z,"product-recommendation-variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,productRec:!1})}catch(e){console.error("Error adding item from product recommendation:",e)}E(!1)}}:async()=>{if(!B)return;const t=!!y?.lineItemKey,r=String(B)!==String(y?.variantId);if(!t||r){E(!0);try{const t=y?.freebieSelection;t&&u&&y?.lineItemKey?await u(y.lineItemKey):await e(y?.lineItemKey||y?.variantId,"variant-selector",!0),t&&m?await m(B,y.allowedVariantIds):n&&B&&await n(B,z,"variant-selector",!1,y.handle),b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})}catch(e){}E(!1)}else b({open:!1,variantId:void 0,quantity:void 0,handle:void 0,lineItemKey:void 0})},disabled:!B||k},k?t.createElement(Vo,{color:"white",size:13}):y?.productRec?"ADD TO BAG":y?.freebieSelection?f||"CLAIM FREEBIE":"GET IN BAG")))):t.createElement(zp,{ref:x},t.createElement(Dp,{style:{backgroundColor:p||"white"}},t.createElement(Ip,null,t.createElement(Go,{color:a||"#868E96"}))))})),Jp=({exploreCTAColor:e,checkoutFontSize:n,handleDecrement:r,handleIncrement:a,removeCartItem:i,addCartItem:d,cartTitle:s,emptyCartTitle:p,emptyCartDescription:u,emptyCartButtons:m,backgroundColor:f,backgroundSubdued:h,tertiaryColor:x,tertiaryTextColor:y,backdrop:b=!0,cartData:v,isUserSignedIn:w,showBundle:C,showCouponOptions:k,bundleProducts:E,discountAmountOff:T,loyaltyIcon:S,pointsToBeUsed:B,rewardMultiplier:$,redemptionMultiplier:z,removeDiscount:_,applyDiscount:D,discountApplied:I,rewardCoupons:N,userTotalPoints:P,checkoutFunction:O,joinNowFunction:A,guestLoyaltyPercentage:F,showToggleButton:M,isOpen:R,setIsOpen:L,isDev:j,switchWidthVariant:V,recProductsList:H,showMultiStepProgressBar:W,cartCheckpoints:U,redemptionRate:G,pointsRewardRate:q,showCartLevelAltPay:Y,guestRewardCoupon:Q,showGuestDiscountCoupon:Z,applyTemplateDiscount:K,exploreCtaRedirectLink:X,discountAmountApplied:J,discountInCheckoutButton:ee,isStickyCheckout:te,showDiscountsListToGuestUsers:ne,showApplyCouponsButtonToGuestUsers:re,handleCheckpointCrossed:oe,customCartProgressBarCriteria:ae,checkoutButtonColor:ie,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,primaryTextColor:de,productRecsCtaButtonText:se,productRecsTitleText:pe,secondaryTextColor:ue,showProductRecsOnDesktop:me,showProductRecsOnMobile:fe,themeColor:ge,themeTextColor:he,companyName:xe,gstNumber:ye,showGSTOption:be,applyGSTToCart:ve,showMOVForProgressTiers:we,freeProduct:Ce,showLoyaltyCta:ke,freeProductAdjustedCartTotal:Ee,minimumOrderValueToAvailDiscount:Te,signinCTAButtonVisible:Se,cartSigninCTAMainText:Be,showNoteOption:$e,applyNoteToCart:ze,note:_e,inlineCartOfferInfoText:De,inlineCartOfferInfoRedirectLink:Ie,cartOfferTermsAndConditionsText:Ne,showEditOptionOnProducts:Pe,getProductDetailsByVariantId:Oe,onSetLoading:Ae,showVariantSelectionDropdownInProductRecs:Fe,originalCartSubtotal:Me,currentTier:Re,freebieProductsInCart:Le,showFreebieClaim:je,addFreebieToCart:Ve,freebiesInCart:He,effectiveQuantityForProgressBar:We,productPercentageOffMapping:Ue,productTagsMapping:Ge,removeFreebieFromCart:qe,postalCodeList:Ye,enableGeoLocationDeliveryRestriction:Qe,applyPostalCodeAndDeliverySlotToCart:Ze,showDeleteOnFreebies:Ke,freebieCouponTemplates:Xe,freebieFlowCheckpoints:Je,freebieClaimData:et,showStickyAddToCart:tt,stickyCartLineItem:nt,postalCodeBasedItemTrackingParameter:rt,enableSlotPicker:ot,deliveryHeaderTitle:at,deliveryAvailableText:it,deliveryNotAvailableText:lt,giftWrapSetupData:ct,giftWrapProductDetail:dt,enableCustomCartOnCartPage:st,isCartPage:pt,progressBarFreeProductIconType:ut,addToStickyCart:mt,productRecsCardLayout:ft,productRecsCardListVariant:gt,showCartTimer:ht,showFreebieMilestone:xt,freebieMilestoneData:yt,cartTimerInMinutes:bt,cartTimerCustomText:vt,imageAspectSelector:wt,cartComponentsCornerType:Ct,cartComponentsCornerRadius:kt,stickyCartCustomizationData:Et,cartOffersCarousalData:Tt,stickyBarBuyNowFunction:St,gstSectionCustomizationData:Bt,noteSectionTitle:$t,checkoutSectionMessage:zt,checkoutSectionMessageRedirectLink:_t,checkoutSectionMessageDisplay:Dt,showVariantSelectionDropdownInProductClaim:It,loyaltyDiscount:Nt,brandTokenName:Pt,showDiscountOnMRP:Ot,prefixMessageText:At,suffixMessageText:Ft,successMessageText:Mt,toggleDecimal:Rt,cartOffersCarouselHeight:Lt,disableCheckoutButton:jt,showEmptyCartRecommendations:Vt,emptyProductRecsTitleText:Gt,checkoutButtonBottomSpacing:qt,showPoweredByBadge:Yt=!0,applyCouponCode:Qt,showApplyCoupon:Zt,enableConfetti:Kt,showCheckoutButtonPaymentIcons:Xt=!0})=>{const Jt=Ht(Ut),[en,nn]=Wt(tn),[rn,on]=Wt(Hi),an=()=>L(!R);g((()=>{v&&Jt(v)}),[v]);const ln=o(null);l((()=>{function e(e){ln.current&&!ln.current.contains(e.target)&&(nn({open:!1,variantId:void 0,quantity:void 0,handle:void 0}),on({isOpen:!1}))}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const[cn,dn]=c(!1);return l((()=>{const e=()=>{dn(window.innerWidth>=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),t.createElement(t.Fragment,null,t.createElement("div",{style:{position:st&&pt?"relative":"absolute",width:"100%",display:st&&pt?"flex":"block",alignItems:"center",justifyContent:"center"}},M&&!(st&&pt)&&t.createElement("button",{style:{margin:"16px"},onClick:an},R?"Close Drawer":"Open Drawer"),R&&b&&!(st&&pt)&&t.createElement("div",{onClick:an,id:"custom-cart-yt-overlay",style:{position:"fixed",top:0,right:0,zIndex:1e4,transform:"translateX(0)",backgroundColor:"rgba(0,0,0,0.5)",inset:0,height:"100%",width:"100%"}},""),t.createElement(dp,{isCartPage:pt,enableCustomCartOnCartPage:st,isOpen:R,setIsOpen:L,backgroundColor:f,backgroundSubdued:h??"#F5F5F5",tertiaryColor:x,tertiaryTextColor:y,exploreCTAColor:e,checkoutFontSize:n,cartTitle:s,handleDecrement:r,handleIncrement:a,removeCartItem:i,addCartItem:d,emptyCartTitle:p,emptyCartButtons:m,emptyCartDescription:u,showCouponOptions:k,showBundle:C,isUserSignedIn:w,bundleProducts:E,discountAmountOff:T,loyaltyIcon:S,pointsToBeUsed:B,rewardMultiplier:$,redemptionMultiplier:z,removeDiscount:_,applyDiscount:D,discountApplied:I,rewardCoupons:N,userTotalPoints:P,checkoutFunction:O,joinNowFunction:A,guestLoyaltyPercentage:F,isDev:j,switchWidthVariant:V,recProductsList:H,showMultiStepProgressBar:W,cartCheckpoints:U,redemptionRate:G,pointsRewardRate:q,showCartLevelAltPay:Y,guestRewardCoupon:Q,showGuestDiscountCoupon:Z,applyTemplateDiscount:K,exploreCtaRedirectLink:X,discountAmountApplied:J,discountInCheckoutButton:ee,isStickyCheckout:te,showDiscountsListToGuestUsers:ne,showApplyCouponsButtonToGuestUsers:re,handleCheckpointCrossed:oe,customCartProgressBarCriteria:ae??"minimum_order_value",checkoutButtonColor:ie,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,primaryTextColor:de,productRecsCtaButtonText:se,productRecsTitleText:pe,secondaryTextColor:ue,showProductRecsOnDesktop:me,showProductRecsOnMobile:fe,themeColor:ge,themeTextColor:he,companyName:xe,gstNumber:ye,showGSTOption:be,applyGSTToCart:ve,showMOVForProgressTiers:we,freeProduct:Ce,showLoyaltyCta:ke,freeProductAdjustedCartTotal:Ee,minimumOrderValueToAvailDiscount:Te,signinCTAButtonVisible:Se,cartSigninCTAMainText:Be,applyNoteToCart:ze,note:_e,showNoteOption:$e,inlineCartOfferInfoText:De,inlineCartOfferInfoRedirectLink:Ie,cartOfferTermsAndConditionsText:Ne,showEditOptionOnProducts:Pe,onSetLoading:Ae,showVariantSelectionDropdownInProductRecs:Fe,originalCartSubtotal:Me,currentTier:Re,freebieProductsInCart:Le,cartOffersCarousalData:Tt,showFreebieClaim:je,addFreebieToCart:Ve,freebiesInCart:He,effectiveQuantityForProgressBar:We,productPercentageOffMapping:Ue,productTagsMapping:Ge,removeFreebieFromCart:qe,postalCodeList:Ye,enableGeoLocationDeliveryRestriction:Qe,applyPostalCodeAndDeliverySlotToCart:Ze,showDeleteOnFreebies:Ke,freebieCouponTemplates:Xe,freebieFlowCheckpoints:Je,freebieClaimData:et,postalCodeBasedItemTrackingParameter:rt,enableSlotPicker:ot,deliveryHeaderTitle:at,deliveryAvailableText:it,deliveryNotAvailableText:lt,giftWrapSetupData:ct,giftWrapProductDetail:dt,progressBarFreeProductIconType:ut,productRecsCardLayout:ft,productRecsCardListVariant:gt,showCartTimer:ht,showFreebieMilestone:xt,freebieMilestoneData:yt,cartTimerCustomText:vt,cartTimerInMinutes:bt,imageAspectSelector:wt,cartComponentsCornerType:Ct,cartComponentsCornerRadius:kt,gstSectionCustomizationData:Bt,noteSectionTitle:$t,checkoutSectionMessage:zt,checkoutSectionMessageRedirectLink:_t,checkoutSectionMessageDisplay:Dt,showVariantSelectionDropdownInProductClaim:It,loyaltyDiscount:Nt,getProductDetailsByVariantId:Oe,brandTokenName:Pt,showDiscountOnMRP:Ot??!0,prefixMessageText:At,suffixMessageText:Ft,successMessageText:Mt,toggleDecimal:Rt,cartOffersCarouselHeight:Lt,disableCheckoutButton:jt,showEmptyCartRecommendations:Vt,emptyProductRecsTitleText:Gt,checkoutButtonBottomSpacing:qt,showPoweredByBadge:Yt,applyCouponCode:Qt,showApplyCoupon:Zt,enableConfetti:Kt,showCheckoutButtonPaymentIcons:Xt}),tt&&nt&&d&&t.createElement($p,{showStickyCart:tt,stickyCartCustomizationData:Et,product:nt,addCartItem:d,onSetLoading:Ae,themeColor:ge,themeTextColor:he,cartData:v,isCartOpen:R,setIsCartOpen:L,ctaButtonBackgroundColor:le,ctaButtonTextColor:ce,addToStickyCart:mt,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,checkoutFunction:St,backgroundColor:f,primaryTextColor:de}),cn&&en.open&&t.createElement(Kp,{backgroundColor:f,ref:ln,isDev:j,removeCartItem:i,addCartItem:d,getProductDetailsByVariantId:Oe,themeColor:ge,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,removeFreebieFromCart:qe,freebieClaimAddToCart:Ve,productClaimCtaButtonText:et?.productClaimCtaButtonText,backgroundSubdued:h??"#F5F5F5",primaryTextColor:de}),!cn&&en.open&&t.createElement(Xp,{ref:ln,isDev:j,removeCartItem:i,addCartItem:d,getProductDetailsByVariantId:Oe,themeColor:ge,cartComponentsCornerRadius:kt,cartComponentsCornerType:Ct,backgroundColor:f,removeFreebieFromCart:qe,freebieClaimAddToCart:Ve,productClaimCtaButtonText:et?.productClaimCtaButtonText,backgroundSubdued:h??"#F5F5F5",primaryTextColor:de})))};L('@media (max-width: 108px) {\n .yt-fixed-bundle-price-section {\n width: 100% !important;\n }\n .yt-fixed-bundle-product-list {\n max-width: 100% !important;\n width: 100% !important;\n justify-content: center !important;\n }\n .price-text {\n text-align: center !important;\n }\n .bundle-builder-add-to-bundle-button {\n font-size: 12px !important;\n padding: 0px 8px !important;\n }\n .quantity .input-text.qty {\n width: 12px !important;\n height: 18px !important;\n }\n .quantity.buttons_added .minus,\n .quantity.buttons_added .plus {\n padding: 6px !important;\n height: 20px !important;\n }\n .bundle-builder-tracker-container {\n justify-content: center !important;\n }\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n .bundle-builder-title {\n font-size: 2rem !important;\n }\n .bundle-builder-tracker-item {\n width: 64px !important;\n height: 64px !important;\n }\n .bundle-builder-product-title {\n font-size: 14px !important;\n }\n}\n.hide-tracker-scrollbar {\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n\n.hide-tracker-scrollbar::-webkit-scrollbar {\n display: none;\n}\n\n.yt-fixed-bundle-border {\n border: 1px solid #c7c7c7;\n}\n\n.yt-fixed-bundle-border-minor-curved {\n border-radius: 8px;\n}\n\n.yt-fixed-bundle-border-minor-curved-image {\n border-radius: 6px;\n}\n\n.yt-fixed-bundle-border-major-curved {\n border-radius: 20px;\n}\n\n.yt-fixed-bundle-border-major-curved-image {\n border-radius: 18px;\n}\n\n@media (min-width: 1200px) {\n .bundle-builder-title .bundle-builder-subtitle {\n font-size: 30px !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-builder-tracker-container {\n gap: 5px !important;\n margin-block: 0 !important;\n }\n .bundle-summary {\n display: flex;\n flex-direction: column !important;\n align-items: flex-start;\n gap: 2px !important;\n }\n .bundle-summary button {\n padding-top: 2px !important;\n padding-inline: 13px !important;\n font-size: 14px !important;\n padding-inline: 10px !important;\n padding: 0px;\n width: -webkit-fill-available;\n }\n .bundle-builder-tracker-progress {\n display: block !important;\n }\n .summary-info {\n width: 100% !important;\n min-width: 200px !important;\n display: flex;\n justify-content: space-between !important;\n flex-direction: row !important;\n flex-grow: 1 !important;\n font-size: 14px !important;\n }\n}\n@media (max-width: 540px) {\n .products-display {\n justify-content: space-between !important;\n column-gap: 5px !important;\n }\n .bundle-builder-product-container {\n width: 49% !important;\n }\n .bundle-builder-title {\n font-size: 1.5rem !important;\n margin-bottom: 8px !important;\n }\n .bundle-builder-subtitle {\n padding-top: 4px;\n font-size: 1rem !important;\n }\n}\n@media (max-width: 540px) {\n .bundle-summary.bundle-filled {\n display: flex !important;\n }\n}\n.yt-bundle-builder-product-price {\n font-weight: 600;\n color: black;\n margin-bottom: 2px;\n}\n\n/* Fixed bundle block */\n.yt-fixed-bundle-fixed-bundle {\n box-sizing: unset;\n max-width: 1000px;\n margin: 0 auto;\n container-type: inline-size;\n text-align: left;\n}\n\n.yt-fixed-bundle-bundle-header {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 10px 0px;\n gap: 8px;\n line-height: normal;\n}\n\n.yt-fixed-bundle-bundle-title {\n font-size: 24px;\n font-weight: 600;\n text-align: center;\n width: 100%;\n}\n\n.yt-fixed-bundle-bundle-subtitle {\n font-size: 16px;\n font-weight: 300;\n text-align: center;\n}\n\n.yt-fixed-bundle-bundle-content {\n display: flex;\n flex-direction: column;\n padding: 10px 0px;\n}\n\n.yt-fixed-bundle-product-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.yt-product-main {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-card {\n display: flex;\n width: 90%;\n align-items: flex-start;\n padding: 0px;\n box-shadow: 2px 2px 11.8px 0px rgba(0, 0, 0, 0.1411764706);\n transition: transform 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n position: unset;\n}\n\n.yt-fixed-bundle-product-image {\n max-width: none;\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n}\n\n.yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n}\n\n.yt-fixed-bundle-product-title {\n font-size: 16px;\n font-weight: 700;\n display: block;\n line-height: 1.4;\n}\n\n.yt-fixed-bundle-product-price {\n font-size: 16px;\n display: block;\n margin-bottom: 6px;\n}\n\n.yt-fixed-bundle-original-price {\n text-decoration: line-through !important;\n color: #6b7280;\n margin-left: 4px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-checkbox {\n display: none !important;\n}\n\n.yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n}\n\n.yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n}\n\n.yt-fixed-bundle-variant-select {\n appearance: none;\n -webkit-appearance: none;\n width: 100%;\n padding: 4px 20px;\n background-color: #ffffff;\n font-size: 15px;\n background-image: none;\n color: #2d2d2d;\n cursor: pointer;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-fixed-bundle-variant-select:focus {\n border-color: #cac6c6;\n box-shadow: 0 0 8px 0 rgba(56, 55, 57, 0.3);\n outline: none;\n}\n\n.yt-fixed-bundle-select-dot {\n position: absolute;\n top: 50%;\n left: 10px;\n transform: translateY(-50%);\n font-weight: 700;\n color: #4d4d4d;\n width: 8px; /* Adjust size */\n font-size: 8px;\n border-radius: 50%;\n pointer-events: none;\n}\n\n.yt-fixed-bundle-select-dot::after {\n content: "";\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background-color: #1b1b1b;\n}\n\n.yt-fixed-bundle-select-icon {\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n pointer-events: none;\n color: #6b7280;\n background-color: rgba(30, 57, 103, 0.1);\n font-size: 20px;\n height: 100%;\n padding: 0px 5px;\n}\n\n.yt-fixed-bundle-plus-sign {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-plus-sign span {\n display: flex;\n justify-content: center;\n width: 24px;\n height: 22px;\n align-items: center;\n padding-bottom: 2px;\n background-color: #f2f2f2;\n color: black;\n border-radius: 2px;\n font-size: 20px;\n font-weight: bold;\n}\n\n.yt-fixed-bundle-price-section {\n display: flex;\n flex-direction: column;\n margin-top: 20px;\n width: 1000px;\n}\n\n.yt-fixed-bundle-subtotal {\n font-size: 13px;\n font-weight: 400 !important;\n}\n\n.yt-fixed-bundle-subtotal-amount {\n font-weight: 600;\n font-size: 13px;\n}\n\n.yt-fixed-bundle-deal-price-container {\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 12px;\n gap: 8px;\n margin-top: 3px;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-deal-price {\n font-size: 16px;\n font-weight: 600;\n}\n\n.yt-fixed-bundle-extra-savings {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700 !important;\n}\n\n.yt-fixed-bundle-add-to-cart-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background-color: #8b5cf6;\n border: none;\n padding: 8px 0px;\n font-size: 16px;\n font-weight: 500 !important;\n cursor: pointer;\n width: 100%;\n}\n\n.yt-fixed-bundle-add-to-cart-button:disabled,\n.yt-fixed-bundle-add-to-cart-button[disabled] {\n color: #7d7d7d;\n cursor: default;\n}\n\n.yt-fixed-bundle-product-card.horizontal {\n max-width: 100%;\n flex-direction: row;\n}\n\n.yt-fixed-bundle-product-card.horizontal:hover {\n transform: none;\n}\n\n.yt-fixed-bundle-product-list.horizontal {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n}\n\n.yt-product-main.horizontal {\n width: 100%;\n}\n\n.yt-fixed-bundle-product-image-container.horizontal {\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n width: 30%;\n}\n\n.yt-fixed-bundle-product-image.horizontal {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n user-select: none;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-desktop.horizontal {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n}\n\n.yt-fixed-bundle-variant-select-wrapper-mobile.horizontal {\n width: 98%;\n position: relative;\n display: flex;\n}\n\n.yt-fixed-bundle-checkbox-container-desktop.horizontal {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-fixed-bundle-product-details.horizontal {\n padding-left: 0px;\n}\n\n.yt-fixed-bundle-product-price.horizontal {\n margin-bottom: 0px;\n}\n\n@media (min-width: 100px) {\n @container (width > 100px) {\n .yt-fixed-bundle-fixed-bundle {\n padding: 40px;\n }\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: flex;\n width: 100%;\n bottom: 6px;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n display: none;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-label {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #000;\n background: white;\n cursor: pointer;\n color: white !important;\n }\n .yt-fixed-bundle-checkbox:checked + .yt-fixed-bundle-checkbox-label {\n border-color: #000;\n color: white !important;\n border: 0px;\n font-size: 16px;\n }\n .yt-fixed-bundle-variant-select {\n margin: 0px 4px;\n }\n .yt-fixed-bundle-select-icon {\n right: 4px;\n }\n .yt-fixed-bundle-bundle-title {\n font-size: 32px;\n }\n .yt-fixed-bundle-bundle-subtitle {\n font-size: 20px;\n }\n .yt-fixed-bundle-bundle-content {\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n .yt-fixed-bundle-product-list {\n width: 100%;\n flex-direction: row;\n justify-content: center;\n align-items: stretch;\n flex-wrap: wrap;\n gap: 15px;\n }\n .yt-fixed-bundle-product-card {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n text-align: center;\n }\n .yt-fixed-bundle-product-image-container {\n width: 100%;\n height: 100%;\n margin-right: 0;\n margin-bottom: 12px;\n justify-content: center;\n position: relative;\n }\n .yt-fixed-bundle-product-details {\n width: 100%;\n align-self: center;\n display: flex;\n flex-direction: column;\n gap: 6px;\n text-align: left;\n }\n .yt-fixed-bundle-product-image {\n height: 230px;\n width: 100%;\n aspect-ratio: 1;\n align-self: center;\n }\n .yt-fixed-bundle-plus-sign {\n align-self: center;\n margin-left: 0;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n margin-top: 32px;\n align-items: center;\n justify-content: center;\n text-align: center;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 10px;\n }\n .yt-fixed-bundle-subtotal {\n font-size: 15px;\n }\n .yt-fixed-bundle-subtotal-amount {\n font-size: 15px;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n top: 8px;\n left: 10px;\n height: auto;\n display: flex;\n align-items: center;\n }\n .yt-fixed-bundle-deal-price {\n font-size: 24px;\n }\n .yt-fixed-bundle-extra-savings {\n font-size: 13px;\n padding: 4px 8px;\n }\n .yt-fixed-bundle-add-to-cart-button {\n font-size: 20px;\n padding: 10px 0px;\n width: 100%;\n }\n .yt-product-main {\n width: 29%;\n }\n .yt-fixed-bundle-product-card:hover {\n transform: translateY(-5px);\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.1411764706);\n }\n }\n}\n.yt-product-main {\n display: flex;\n position: relative;\n}\n\n/* Container query */\n@container (max-width: 100px) {\n .yt-fixed-bundle-variant-select-wrapper-desktop {\n position: absolute;\n display: none;\n width: 100%;\n bottom: 6px;\n }\n .yt-product-main {\n width: 100%;\n }\n .yt-fixed-bundle-variant-select-wrapper-mobile {\n width: 98%;\n position: relative;\n display: flex;\n bottom: 6px;\n }\n .yt-fixed-bundle-product-image {\n height: 110px;\n aspect-ratio: 1;\n object-fit: cover;\n }\n .yt-fixed-bundle-variant-select-wrapper {\n position: relative;\n width: 100%;\n }\n .yt-fixed-bundle-checkbox-container-desktop {\n position: absolute;\n height: 100%;\n left: -8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .yt-fixed-bundle-product-image-container {\n margin-right: 8px;\n height: 110px;\n margin-bottom: 0px;\n position: unset;\n }\n .yt-fixed-bundle-product-card {\n max-width: 100%;\n flex-direction: row;\n }\n .yt-fixed-bundle-price-section {\n width: 100%;\n }\n}\n.yt-product-card-transition {\n opacity: 0;\n transform: translateY(20px);\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n}\n\n.yt-product-card-transition-up {\n opacity: 0;\n transform: translateY(-20px);\n transition: opacity 0.6s ease, transform 0.6s ease;\n}\n\n.yt-product-card-transition-active {\n opacity: 1;\n transform: translateY(0);\n}\n\n.yt-description-content img {\n max-width: 100%;\n height: auto;\n display: block;\n margin: 0 auto 15px;\n border-radius: 7px;\n}\n\n.yt-description-content {\n text-align: left;\n overflow-wrap: break-word;\n}');L('.yt-bundleBuilder-product-card {\n display: flex;\n flex-direction: column;\n width: 280px;\n row-gap: 8px;\n justify-content: space-between;\n cursor: pointer;\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n overflow: hidden;\n\n background-color: var(--card-bg, #fff);\n border-radius: var(--card-radius, 0);\n border: var(--card-border, none);\n box-shadow: var(--card-shadow, none);\n}\n\n.yt-bundleBuilder-product-card:hover {\n transform: scale(1.01);\n}\n\n.yt-bundleBuilder-product-card_image-wrapper {\n display: flex;\n position: relative;\n flex-direction: column;\n padding: 0px;\n}\n\n.yt-bundleBuilder-product-card_title {\n font-size: var(--title-font-size, 18px);\n font-weight: var(--yt-bundle-font-weight, bold);\n color: #333;\n line-height: normal;\n margin-top: var(--title-margin-top, 0px);\n padding: var(--title-padding, 0 4px);\n\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.bundle-builder-variant-selector {\n border: 1px solid #c7c7c7;\n padding: 8px 8px 8px 10px;\n position: absolute;\n width: 98%;\n height: 38px;\n bottom: 4px;\n right: 3px;\n background-color: #f5f5f5;\n font-size: 14px;\n cursor: pointer;\n opacity: 0.8;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n background-image: none !important;\n margin-bottom: 0 !important;\n}\n\n.bundle-builder-variant-selector--coralHaze {\n appearance: auto;\n -webkit-appearance: auto;\n -moz-appearance: auto;\n}\n\n.yt-bundleBuilder-product-card_title {\n font-size: var(--title-font-size, 18px);\n font-weight: var(--yt-bundle-font-weight, bold);\n color: #333;\n line-height: normal;\n margin-top: var(--title-margin-top, 0px);\n padding: var(--title-padding, 0 4px);\n\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.yt-product-atc-wrapper {\n position: relative;\n width: 100%;\n height: 40px;\n}\n\n.yt-product-atc-button {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-quantity-selector-container--visible {\n position: absolute;\n background-color: "#e7e7e7";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.3s ease;\n transform: translateX(-100%); /* Start off-screen to the left */\n\n &.visible {\n transform: translateX(0); /* Slide in from the left */\n }\n}\n\n.yt-bundleBuilder-product-card_add-to-bundle-button--added {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n justify-content: space-between;\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-product-card_added-button-text {\n flex: 1;\n text-align: center;\n font-size: 14px;\n background-color: #747474;\n color: #fff;\n padding: 10px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n}\n\n.yt-bundleBuilder-product-card_added-button-text {\n width: 25%;\n background-color: #111;\n display: flex;\n align-items: center;\n justify-content: center;\n border-left: 1px solid #fff;\n height: 100%;\n cursor: pointer;\n}\n\n.yt-bundleBuilder-product-card_add-to-bundle-button--disabled {\n font-weight: 600;\n width: 100%;\n cursor: pointer;\n border: none;\n padding: 0;\n height: 40px;\n position: relative;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.3s ease, opacity 0.3s ease;\n &.shifted {\n transform: translateX(100%);\n opacity: 0;\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: #e7e7e7;\n color: rgba(0, 0, 0, 0.44);\n }\n}\n\n.yt-bundleBuilder-quantity-selector-container {\n display: flex;\n flex-direction: row;\n height: 100%;\n background-color: #e7e7e7;\n width: 100%;\n font-weight: 600;\n}\n\n.yt-bundleBuilder-quantity-selector_quantity {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 0;\n width: 100%;\n font-size: 14px;\n}\n\n.yt-bundleBuilder-products-display {\n font-size: 20px;\n width: 100%;\n}\n\n.yt-bundleBuilder-header-container{\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 20px;\n width: 90%;\n max-width: 1000px;\n}\n\n.bundle-builder-product-container {\n display: flex;\n flex-direction: column;\n width: 280px;\n row-gap: 8px;\n justify-content: space-between;\n cursor: pointer;\n transition: transform 0.6s ease, box-shadow 0.6s ease;\n overflow: hidden;\n -webkit-tap-highlight-color: transparent; /* from inline style */\n}\n\n/* Hover/scale effect */\n.bundle-builder-product-container:hover {\n transform: scale(1.01);\n}\n\n.bundle-builder-product-container:active {\n transform: scale(1);\n}\n\n/* Optional shadows depending on "shadowType" */\n.bundle-builder-product-container.shadow-none {\n box-shadow: none;\n}\n\n.bundle-builder-product-container.shadow-spread {\n box-shadow: 8px 8px 8px -6px #0000004d;\n}\n\n.bundle-builder-product-container.shadow-no-spread {\n box-shadow: 6px 6px 0px -1px #00000033;\n}\n\n');L(".bundle-builder-tracker-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n width: 100%;\n align-items: center;\n text-align: center;\n row-gap: 4px;\n justify-content: space-between; \n padding: 4px 10px; \n}\n\n.bundle-builder-tracker-container.mobile {\n padding: 0;\n min-height: 30px;\n}\n\n.yt-bundleBuilderTracker-mobile-remaining{\n color: #000;\n background-color: #f5f5f5;\n padding: 10px;\n font-weight: 600;\n font-size: 18px;\n width: 100%;\n height: 80px;\n margin: 10px 0px;\n border: 1px solid #d3d3d3;\n}\n\n.yt-bundleBuilderTracker-tier-progress-container{\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-tier-progress-text{\n width: 100%;\n font-size: 14px;\n background-color: #e0e0e0;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-background{\n width: 100%;\n background-color: #e0e0e0;\n height: 6px;\n border-radius: 0;\n}\n\n.bundle-builder-tracker-progress,\n.yt-bundleBuilderTracker-progress-bar-fill {\n display: block;\n height: 100%;\n transition: width 0.3s ease-in-out, background-color 0.5s ease-in-out;\n}\n\n.yt-bundleBuilderTracker-quantity-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n font-size: 14px;\n border-radius: var(--corner-radius);\n}\n\n\n/* component.css */\n.yt-bundleBuilderTracker-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n padding: 4px 10px;\n width: 100%;\n align-items: center;\n text-align: center;\n row-gap: 4px;\n justify-content: space-between;\n}\n\n.yt-bundleBuilderTracker-container.mobile {\n padding: 0px;\n min-height: 30px;\n}\n\n.yt-bundleBuilderTracker-offer-tier-tag {\n position: absolute;\n top: -20px;\n padding: 5px 10px;\n}\n\n@media (max-width: 768px) {\n .yt-bundleBuilderTracker-offer-tier-tag {\n font-size: 12px;\n left: 0;\n }\n}\n\n.yt-bundleBuilderTracker-mobile-remaining {\n color: #000;\n background-color: #f5f5f5;\n padding: 10px;\n font-weight: 600;\n font-size: 18px;\n width: 100%;\n height: 80px;\n margin: 10px 0px;\n border: 1px solid #d3d3d3;\n}\n\n.yt-bundleBuilderTracker-tier-progress-container {\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-tier-progress-text {\n width: 100%;\n font-size: 14px;\n background-color: #e0e0e0;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-background {\n width: 100%;\n background-color: #e0e0e0;\n height: 6px;\n border-radius: 0;\n}\n\n.yt-bundleBuilderTracker-progress-bar-fill {\n display: block;\n height: 100%;\n transition: width 0.3s ease-in-out, background-color 0.5s ease-in-out;\n}\n\n.yt-bundleBuilderTracker-product-list-wrapper {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n overflow-x: auto;\n}\n\n.yt-bundleBuilderTracker-summary-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 15px;\n justify-content: center;\n row-gap: 15px;\n padding: 0px 5px;\n}\n\n.yt-bundleBuilderTracker-summary-container.mobile {\n width: 100%;\n}\n\n.yt-bundleBuilderTracker-item-wrapper {\n position: relative;\n margin-top: 8px;\n margin-right: 5px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-item-image-box {\n position: relative;\n border: 1px solid #d3d3d3;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.yt-bundleBuilderTracker-quantity-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-remove-button {\n position: absolute;\n top: -8px;\n right: -8px;\n background-color: black;\n color: white !important;\n width: 16px;\n height: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border-radius: 2px;\n}\n\n.yt-bundleBuilderTracker-detailed-item-container {\n height: 85px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 5px 15px 0 5px;\n border: 1px solid #d3d3d3;\n column-gap: 5px;\n max-width: 220px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-detailed-image {\n position: relative;\n height: 75px;\n width: 75px;\n border: 1px solid #d3d3d3;\n border-radius: 5px;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.yt-bundleBuilderTracker-badge {\n position: absolute;\n top: 5px;\n left: 5px;\n background-color: rgba(255, 255, 255, 0.7);\n color: black;\n padding: 2px 5px;\n border-radius: 2px;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-info-block {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n justify-content: flex-start;\n align-items: flex-start;\n text-align: left;\n}\n\n.yt-bundleBuilderTracker-product-title {\n font-size: 14px;\n font-weight: 500;\n line-height: normal;\n}\n\n.yt-bundleBuilderTracker-product-price {\n font-size: 13px;\n line-height: normal;\n}\n\n.yt-bundleBuilderTracker-remove-link {\n color: red;\n font-size: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 3px;\n align-items: center;\n cursor: pointer;\n}\n\n.yt-bundleBuilderTracker-placeholder-box {\n border: 1px solid #d3d3d3;\n margin-top: 10px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n flex-shrink: 0;\n}\n\n.yt-bundleBuilderTracker-summary-info {\n display: flex;\n flex-direction: column;\n font-size: 18px;\n align-items: center;\n justify-content: center;\n}\n\n.yt-bundleBuilderTracker-subtotal-label {\n line-height: normal;\n color: black;\n align-self: center;\n justify-content: center;\n display: flex;\n font-weight: 700;\n font-size: 16px;\n}\n\n.yt-bundleBuilderTracker-save-label {\n font-size: 12px;\n color: #f6f8f7;\n padding: 4px 8px;\n background-color: #d3122a;\n border-radius: 2px;\n font-weight: 700;\n}\n\n@media (max-width: 600px) {\n .yt-bundleBuilderTracker-save-label {\n display: none;\n }\n}\n\n.yt-bundleBuilderTracker-subtotal-row {\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n font-size: 16px;\n margin: 5px 0px;\n align-items: flex-end;\n}\n\n.yt-bundleBuilderTracker-total_price {\n font-weight: bold;\n text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-summary_price {\n color: #a0a0a0;\n text-decoration-line: line-through;\n font-size: 14px;\n}\n\n.yt-bundleBuilderTracker-checkout-button {\n padding: 5px 20px;\n height: 42px;\n outline: none;\n width: fit-content;\n min-width: 200px;\n transition: background-color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.yt-bundleBuilderTracker-checkout-button:hover {\n background-color: var(--ctaHoverBackgroundColor, #f4f4f6);\n color: var(--ctaHoverTextColor, #000);\n}\n\n@media (max-width: 768px) {\n .yt-bundleBuilderTracker-checkout-button {\n width: 100%;\n padding: 5px 5px;\n margin-inline: 0px;\n }\n}\n\n.yt-bundleBuilderTracker-checkout-text {\n display: flex;\n flex-direction: row;\n column-gap: 6px;\n align-items: center;\n justify-content: center;\n font-weight: 650;\n}\n\n.yt-bundleBuilderTracker-product-list-tracker-item {\n position: relative;\n margin-top: 8px;\n margin-right: 5px;\n border: 1px solid #d3d3d3;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-detailed-product-item {\n height: 85px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 5px 15px 0 5px;\n border: 1px solid #d3d3d3;\n column-gap: 5px;\n max-width: 220px;\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.yt-bundleBuilderTracker-plus-icon-container {\n justify-content: center;\n align-items: center;\n margin: 0px 6px;\n text-align: center;\n display: flex;\n flex-shrink: 0;\n}");const eu=({tiers:e,isMobile:n=!1,selectedProductsByTier:r,selectedProducts:o,themeColor:a,showProductDetailsInTracker:i,handleRemoveItemProductTier:l,cornerRadius:c,currencySymbol:d})=>t.createElement(t.Fragment,null,e.map(((a,s)=>{const p=a.minimumQuantity-(r[s]?.length??0),u=o?.filter((e=>r[s]?.includes(e.variantId)));return t.createElement("div",{className:"yt-bundleBuilderTracker-tier-product-list",style:{display:"flex",width:"100%"}},t.createElement("div",null,t.createElement("div",{style:{display:"flex",gap:"5px"}},u?.map?.((e=>{const o=e.product.variants?.edges?.find((t=>t.node.id===e.variantId)),a=r[s]?.filter((e=>e===o?.node.id)).length||0;return i?t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-product-item",key:e.variantId,style:{borderRadius:"5px"}},t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-image",style:{backgroundImage:`url(${o?.node.image?.url&&o?.node.image?.url?.length>0?o?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-badge",style:{borderRadius:"2px"}},e.quantity,"x")),t.createElement("div",{className:"yt-bundleBuilderTracker-info-block"},t.createElement("span",{className:"yt-bundleBuilderTracker-product-title"},e.product.title),t.createElement("span",{className:"yt-bundleBuilderTracker-product-price"},d,_g(o?.node?.price)),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-link",onClick:()=>l(e.variantId,s)},t.createElement(Ia,null),t.createElement("span",null,"Remove")))):t.createElement("div",{className:"yt-bundleBuilderTracker-product-list-item",key:e.variantId},t.createElement("div",{className:"yt-bundleBuilderTracker-product-list-tracker-item",style:{backgroundImage:`url(${o?.node.image?.url&&o?.node.image?.url?.length>0?o?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`,..."high"===c&&{borderRadius:"20px"},..."medium"===c&&{borderRadius:"6px"},...""===c&&{borderRadius:"0px"},height:n?"60px":"70px",width:n?"60px":"70px"}},a>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-quantity-badge",style:{borderRadius:"high"===c?"20px":"medium"===c?"6px":"0px"}},a,"x"),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-button",onClick:()=>l(e.variantId,s)},t.createElement(ct,{fontSize:"12px"}))))})),p>=1&&[...Array(p)].map(((e,r)=>t.createElement("div",{className:"yt-bundleBuilderTracker-placeholder-box",style:{width:n?"60px":"70px",height:n?"60px":"70px",borderRadius:"high"===c?"20px":"medium"===c?"6px":"0px"},key:r},t.createElement(Kr,{size:40,color:"#A0A0A0"})))))),s<e.length-1&&t.createElement("div",{className:"yt-bundleBuilderTracker-plus-icon-container"},t.createElement(Kr,{size:"16px",style:{backgroundColor:"#f2f2f2"}})))}))),tu=({builderTiers:e,handleAddToCart:n,minimumQuantity:r,selectedProducts:o,showProductDetailsInTracker:a,loading:i,handleRemoveItem:d,percentageOff:s,selectedItemsQuantity:p,bundleSubtotal:u,amountOff:m,styles:f,dealAmount:g,isMobile:h=!1,themeColor:x,cornerRadiusType:y,primaryTextColorCta:b,handleRemoveItemProductTier:v,selectedProductsByTier:w,storeCurrencyCode:C})=>{const[k,E]=c(!1),[T,S]=c(0),[B,$]=c([]),[z,_]=c(0),[D,I]=c(0),[N,P]=c(!1),[O,A]=c(null),F=u?.price||0,M=e?.type,R=e=>{if(e<0||!B[e])return F;const t=B[e].discountValue??0;return s?F*(1-t/100):g?t:m?F-t:F};l((()=>{if(e&&"none"!==e.type)if("productTier"===M&&e.productTier){const t=e.productTier||[];$(t);let n=0;e.productTier.map((e=>{n+=e.minimumQuantity})),I(n-p)}else if(B.length)z>0&&p<B[z-1]?.minimumQuantity?(_(z-1),A(z-1)):p<B[z]?.minimumQuantity&&A(z-1),S(R(z));else{const t=e.offerTier||[];$(t),_(0),I(t[0]?.minimumQuantity-p||r-p)}else $([]),I(r-p),_(0)}),[e,r,p]),l((()=>{B.length&&"productTier"!=M?(()=>{if(!B?.length)return;let e=-1,t=null,n=0;if("offerTier"===M)for(let r=0;r<B.length&&(n+=B[r].minimumQuantity,p>=n);r++)t=r,e=r+1<B.length?r+1:r;if(_(e),A(t),null!==t){let e=B.slice(0,t+1).reduce(((e,t)=>e+t.minimumQuantity),0);P(e===p),E(!0),S(R(t))}else P(!1),E(!1),S(F);const r=e>=0&&e<B.length?B.slice(0,e+1).reduce(((e,t)=>e+t.minimumQuantity),0)-p:B[0].minimumQuantity-p;I(r)})():p===r?(E(!0),S(s?F*(1-s/100):g||(m?F-m:F)),P(!0)):(P(!1),E(!1))}),[p,B]);const L=k?Math.max(u?.compareAtPrice,u?.price):u?.compareAtPrice>u?.price?u?.compareAtPrice:null,j=k?T.toFixed(2):u?.price?.toFixed(2),V=L&&j?(L-Number(j)).toFixed(2):0,H=e&&"none"!==M&&e.offerTier?"offerTier"===M?Math.min(p/(p+D)*100,100):void 0:p/r*100;return l((()=>{if(k&&f.byob.enableConfetti){console.log("remainingItems",D);const e=document.getElementById("checkoutButton");if(!e)return;const t=e.getBoundingClientRect(),n=(t.left+t.width/2)/window.innerWidth,r=(t.top+t.height/2)/window.innerHeight;Or({particleCount:100,spread:70,origin:{x:n,y:r},zIndex:9999})}}),[k,f]),t.createElement("div",{className:"yt-bundleBuilderTracker-container "+(h?"mobile":""),style:{justifyContent:f.byob.selectedProductsVisibility&&!h?"space-between":"center"}},"offerTier"==M&&null!==O&&O>=0&&t.createElement("div",{className:"yt-bundleBuilderTracker-offer-tier-tag",style:{backgroundColor:x||"#000",color:b||"#fff"}},t.createElement(t.Fragment,null,"Buy"," ",B.slice(0,O+1).reduce(((e,t)=>e+t.minimumQuantity),0)," ","at",m||g?t.createElement(t.Fragment,null," ",Dg(f.general.currencySymbol,C)):""," ",_g(B[O]?.discountValue),s?t.createElement(t.Fragment,null,"% "):_g(g)?t.createElement(t.Fragment,null):"",s||m?t.createElement(t.Fragment,null," Off"):""),t.createElement("span",{style:{fontStyle:"italic"}}," applied")),h&&D>=1&&!N&&"offerTier"!==M?t.createElement("div",{className:"yt-bundleBuilderTracker-mobile-remaining",style:{margin:"0"}},"Select ",D," more item(s)"):t.createElement(t.Fragment,null),"productTier"!==M&&t.createElement("div",{className:"yt-bundleBuilderTracker-tier-progress-container"},t.createElement("div",{className:"yt-bundleBuilderTracker-tier-progress-text"},"offerTier"==M&&B.length>0&&z>=0&&D>0&&t.createElement(t.Fragment,null,t.createElement("div",{style:{padding:"4px",fontWeight:"600",...window.innerWidth<=768&&{fontSize:"12px"},color:"#121212"},className:"yt-bundleBuilderTracker-add-more-text"},"Add ",D," More Item(s)",t.createElement("span",{style:{fontWeight:"500"}}," to "),"Buy ",p+D," at",m||g?t.createElement(t.Fragment,null,Dg(f.general.currencySymbol,C)):""," ",_g(B[z]?.discountValue),s?t.createElement(t.Fragment,null,"% "):_g(g)?t.createElement(t.Fragment,null):"",s||m?t.createElement(t.Fragment,null," Off"):""))),t.createElement("div",{className:"yt-bundleBuilderTracker-progress-bar-background"},t.createElement("div",{className:"yt-bundleBuilderTracker-progress-bar-fill",style:{width:`${H??0}%`,backgroundColor:100===(H??0)?"#4caf50":x??f?.general.primaryColor??"black"}}," "))),f.byob.selectedProductsVisibility&&t.createElement("div",{className:"hide-tracker-scrollbar yt-bundleBuilderTracker-product-list-wrapper",style:{columnGap:"productTier"===M?"0px":"10px",maxWidth:h?"90%":"55%"}},"productTier"===M?t.createElement(eu,{tiers:B,isMobile:h,selectedProductsByTier:w??{},selectedProducts:o,themeColor:f.general.primaryColor,showProductDetailsInTracker:a,handleRemoveItemProductTier:v,cornerRadius:f.byob.borderRadius,currencySymbol:Dg(f.general.currencySymbol,C)}):t.createElement(t.Fragment,null,o?.map?.((e=>{const n=e.product.variants?.edges?.find((t=>t.node.id===e.variantId));return a?t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-item-container",style:{borderRadius:f.byob.borderRadius},key:e.variantId},t.createElement("div",{className:"yt-bundleBuilderTracker-detailed-image",style:{backgroundImage:`url(${n?.node.image?.url&&n?.node.image?.url?.length>0?n?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-badge"},e.quantity,"x")),t.createElement("div",{className:"yt-bundleBuilderTracker-info-block"},t.createElement("span",{className:"yt-bundleBuilderTracker-product-title"},e.product.title),t.createElement("span",{className:"yt-bundleBuilderTracker-product-price"},f.general.currencySymbol,n?.node?.price),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-link",onClick:()=>d(e.variantId)},t.createElement(Ia,null),t.createElement("span",null,"Remove")))):t.createElement("div",{className:"yt-bundleBuilderTracker-item-wrapper",key:e.variantId,style:{marginTop:"8px",marginRight:"5px"}},t.createElement("div",{className:"yt-bundleBuilderTracker-item-image-box",style:{backgroundImage:`url(${n?.node.image?.url&&n?.node.image?.url?.length>0?n?.node.image.url:e.product.featuredMedia?.preview?.image?.url})`,height:h?"60px":"70px",width:h?"60px":"70px",borderRadius:f.byob.borderRadius}},e?.quantity>1&&t.createElement("div",{className:"yt-bundleBuilderTracker-quantity-badge",style:{borderRadius:f.byob.borderRadius}},e.quantity,"x"),t.createElement("div",{className:"yt-bundleBuilderTracker-remove-button",onClick:()=>d(e.variantId)},t.createElement(ct,{fontSize:"12px"}))))})),D>=1&&[...Array(D)].map(((e,n)=>t.createElement("div",{className:"yt-bundleBuilderTracker-placeholder-box",style:{width:h?"60px":"70px",height:h?"60px":"70px",borderRadius:f.byob.borderRadius},key:n},t.createElement(Kr,{size:40,color:"#A0A0A0"})))))),(!h||N)&&t.createElement("div",{className:"yt-bundleBuilderTracker-summary-container",style:{width:h?"100%":"auto"}},Number(j)>0&&t.createElement("div",{className:"yt-bundleBuilderTracker-summary-info"},t.createElement("div",{style:{display:"flex",...window.innerWidth<=600&&{flexDirection:"column"},gap:"5px",justifyContent:"center"}},t.createElement("span",{className:"yt-bundleBuilderTracker-subtotal-label"},"Subtotal"),Number(V)>0?t.createElement("span",{className:"yt-bundleBuilderTracker-save-label"},"Save:"," ",Dg(f.general.currencySymbol,C),_g(V)):""),t.createElement("div",{className:"yt-bundleBuilderTracker-subtotal-row"},t.createElement("span",{className:"yt-bundleBuilderTracker-total_price"},Dg(f.general.currencySymbol,C),Number(j)>=0?_g(Number(j).toFixed(2)):0),L&&f.byob.compareAtPriceVisibility&&Number(L)>Number(j)&&t.createElement("span",{className:"yt-bundleBuilderTracker-summary_price"},Dg(f.general.currencySymbol,C),_g(Number(L).toFixed(2))))),t.createElement("button",{className:"yt-bundleBuilderTracker-checkout-button",style:{cursor:N?"pointer":"auto",backgroundColor:100===(H??0)||N?f.general.ctaBackgroundColor||"black":"#f4f4f6",color:100===(H??0)||N?f.general.ctaTextColor||"#fff":"#000",border:`1.18px solid ${f.general.ctaBorderColor}`,borderRadius:f.general.ctaBorderRadius,boxShadow:N?"0px 4px 8px rgba(0, 0, 0, 0.2)":"none"},disabled:!N&&D>=1,onClick:e=>{i||console.log("saving"),n(e.target??e.currentTarget)},id:"checkoutButton"},i?t.createElement(Vo,{color:"white",loading:i,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):D>=1&&!N?t.createElement("div",{className:"yt-tracking-bar-checkout-button-items-text",style:{color:f.general.primaryColor}},"Add ",D," More Item(s)"):t.createElement("div",{className:"yt-bundleBuilderTracker-checkout-text",style:{color:b??f.general.ctaTextColor}},f.byob.checkoutCTAText??"Checkout"))))},nu={8087437412:{position:"fixed",bottom:"10px",zIndex:100,width:"95%",left:"50%",transform:"translateX(-50%)",mobile:{bottom:"50px"}},66134737152:{position:"fixed",zIndex:20,width:"90%",left:"50%",transform:"translateX(-50%)",bottom:"10px"},83438567714:{zIndex:100,position:"fixed",width:"95%",left:"50%",transform:"translateX(-50%)",bottom:"10px"},72726479068:{position:"fixed",zIndex:20,width:"90%",left:"50%",transform:"translateX(-50%)",bottom:"10px",mobile:{bottom:"70px"}},64800161992:{zIndex:20,mobile:{bottom:"50px"},position:"sticky",bottom:"10px"},53933408435:{zIndex:5,mobile:{bottom:"60px"},position:"sticky",bottom:"10px"},68377018594:{zIndex:5,bottom:"10px",position:"fixed",left:"50%",transform:"translateX(-50%)",mobile:{bottom:"70px"}},84569063743:{zIndex:999,bottom:"0px",width:"100%",position:"fixed",right:"0px",left:"0px"},62022680789:{bottom:"65px",zIndex:999,width:"100%",position:"fixed",right:"0px",left:"0px"},63102222549:{position:"sticky",bottom:"100px",zIndex:999,mobile:{bottom:"60px"}},26666008755:{bottom:"10px",zIndex:999,position:"fixed",left:"50%",transform:"translateX(-50%)"},67641475285:{bottom:"10px",zIndex:999,position:"fixed",left:"50%",transform:"translateX(-50%)"},61613179125:{position:"fixed",left:"50%",transform:"translateX(-50%)"},80866345280:{bottom:"10px",mobile:{bottom:"70px"}}},ru={position:"sticky",bottom:"10px",zIndex:999,width:"96%"},ou=e=>{const[n,r]=c(!1);l((()=>{const e=()=>{r(window.innerWidth<=768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const o="undefined"!=typeof window?(window?.ytapp||window?.ytBundleApp)?.storeId:void 0,a=((e,t=!1)=>{const n=e&&nu[e]?nu[e]:{},r={...ru,...n};return t&&n.mobile?{...r,...n.mobile}:r})(String(o),n);e.renderingOnPage||(a.position="static",a.zIndex=0);const i={display:"flex",backgroundColor:"white",borderRadius:"4px",paddingBottom:"5px",justifyContent:"center",margin:"0 auto",transition:"box-shadow 0.3s ease, transform 0.3s ease",border:"1px solid #CBCBCB",boxShadow:"\n 0px 3px 6px 0px #00000040, \n 0px 11px 11px 0px #00000036, \n 0px 24px 14px 0px #00000021, \n 0px 43px 17px 0px #0000000A, \n 0px 68px 19px 0px #00000000\n ",...a};return t.createElement("div",{className:"yt-bundle-builder-tracker-bar",style:{...i,width:n?"100%":a.width,...!e.styles.byob.selectedProductsVisibility&&{width:n?"96%":"fit-content",paddingInline:"10px"},...n&&{display:"flex",flexDirection:"row",paadingTop:"0px"}},onMouseEnter:e=>{e.currentTarget.style.boxShadow="\n 0px 8px 16px 0px #00000040, \n 0px 24px 24px 0px #00000036, \n 0px 50px 30px 0px #00000021, \n 0px 90px 36px 0px #0000000A, \n 0px 140px 40px 0px #00000000\n ",e.currentTarget.style.transform="translateX(-50%)"===a.transform?"translate(-50%, -3px)":"translateY(-3px)"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="\n 0px 5px 12px 0px #00000040, \n 0px 22px 22px 0px #00000036, \n 0px 49px 29px 0px #00000021, \n 0px 87px 35px 0px #0000000A, \n 0px 136px 38px 0px #00000000\n ",e.currentTarget.style.transform=a.transform||"translateY(0)"}},t.createElement(tu,{...e,isMobile:n}))},au=_t(void 0);function iu(e){return iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iu(e)}function lu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cu(e,t){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cu(e,t)}function du(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=su(e);if(t){var o=su(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===iu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},su(e)}var pu=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cu(e,t)}(o,h);var e,t,n,r=du(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.apply(this,arguments)}return e=o,t=[{key:"componentDidMount",value:function(){!function(e,t){if(!document.head.querySelector("#"+e)){var n=document.createElement("style");n.textContent=t,n.type="text/css",n.id=e,document.head.appendChild(n)}}(this.props.name,this.props.css)}},{key:"componentWillUnmount",value:function(){var e=document.getElementById(this.props.name);e.parentNode.removeChild(e)}},{key:"render",value:function(){return null}}],t&&lu(e.prototype,t),n&&lu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(),uu=function(e){var t=e.imageBackgroundColor;return"\n body {\n overflow: hidden;\n }\n\n .__react_modal_image__modal_container {\n position: fixed;\n z-index: 5000;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.8);\n touch-action: none;\n overflow: hidden;\n }\n\n .__react_modal_image__modal_content {\n position: relative;\n height: 100%;\n width: 100%;\n }\n\n .__react_modal_image__modal_content img, \n .__react_modal_image__modal_content svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate3d(-50%, -50%, 0);\n -webkit-transform: translate3d(-50%, -50%, 0);\n -ms-transform: translate3d(-50%, -50%, 0);\n overflow: hidden;\n }\n\n .__react_modal_image__medium_img {\n max-width: 98%;\n max-height: 98%;\n background-color: ".concat(t,";\n }\n\n .__react_modal_image__large_img {\n cursor: move;\n background-color: ").concat(t,"\n }\n\n .__react_modal_image__icon_menu a {\n display: inline-block;\n font-size: 40px;\n cursor: pointer;\n line-height: 40px;\n box-sizing: border-box;\n border: none;\n padding: 0px 5px 0px 5px;\n margin-left: 10px;\n color: white;\n background-color: rgba(0, 0, 0, 0);\n }\n\n .__react_modal_image__icon_menu {\n display: inline-block;\n float: right;\n }\n\n .__react_modal_image__caption {\n display: inline-block;\n color: white;\n font-size: 120%;\n padding: 10px;\n margin: 0;\n }\n\n .__react_modal_image__header {\n position: absolute;\n top: 0;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n overflow: hidden;\n }\n")},mu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))},fu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))},gu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},hu=function(){return t.createElement("svg",{fill:"#ffffff",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),t.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))},xu=function(){return t.createElement("svg",{fill:"#ffffff",height:"48",viewBox:"0 0 24 24",width:"48",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"}),t.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}))},yu=function(){return t.createElement("svg",{fill:"#ffffff",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{fill:"none",d:"M0 0h24v24H0V0zm0 0h24v24H0V0z"}),t.createElement("path",{d:"M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"}))};var bu=function(e){return function(t){(function(e){return document.location.hostname!==new URL(e,document.location).hostname})(e)&&(t.preventDefault(),fetch(e).then((function(t){return t.ok||console.error("Failed to download image, HTTP status "+t.status+" from "+e),t.blob().then((function(t){var n=document.createElement("a");n.setAttribute("download",e.split("/").pop()),n.href=URL.createObjectURL(t),n.click()}))})).catch((function(t){console.error(t),console.error("Failed to download image from "+e)})))}},vu=function(e){var n=e.image,r=e.alt,o=e.zoomed,a=e.toggleZoom,i=e.toggleRotate,l=e.onClose,c=e.enableDownload,d=e.enableZoom,s=e.enableRotate;return t.createElement("div",{className:"__react_modal_image__header"},t.createElement("span",{className:"__react_modal_image__icon_menu"},c&&t.createElement("a",{href:n,download:!0,onClick:bu(n)},t.createElement(gu,null)),d&&t.createElement("a",{onClick:a},o?t.createElement(fu,null):t.createElement(mu,null)),s&&t.createElement("a",{onClick:i},t.createElement(yu,null)),t.createElement("a",{onClick:l},t.createElement(hu,null))),r&&t.createElement("span",{className:"__react_modal_image__caption"},r))};function wu(e){return wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wu(e)}function Cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ku(e,t){return ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ku(e,t)}function Eu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Su(e);if(t){var o=Su(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tu(e)}(this,n)}}function Tu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Su(e)}function Bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $u=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ku(e,t)}(a,h);var e,n,r,o=Eu(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bu(Tu(e=o.call.apply(o,[this].concat(n))),"state",{loading:!0}),Bu(Tu(e),"handleOnLoad",(function(){e.setState({loading:!1})})),Bu(Tu(e),"handleOnContextMenu",(function(t){!e.props.contextMenu&&t.preventDefault()})),e}return e=a,n=[{key:"render",value:function(){var e=this.props,n=e.id,r=e.className,o=e.src,a=e.style,i=e.handleDoubleClick;return t.createElement("div",null,this.state.loading&&t.createElement(xu,null),t.createElement("img",{id:n,className:r,src:o,style:a,onLoad:this.handleOnLoad,onDoubleClick:i,onContextMenu:this.handleOnContextMenu}))}}],n&&Cu(e.prototype,n),r&&Cu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();function zu(e){return zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zu(e)}function _u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Du(e,t){return Du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Du(e,t)}function Iu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pu(e);if(t){var o=Pu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nu(e)}(this,n)}}function Nu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pu(e){return Pu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pu(e)}function Ou(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Au=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Du(e,t)}(a,h);var e,n,r,o=Iu(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ou(Nu(e=o.call.apply(o,[this].concat(n))),"state",{move:{x:0,y:0},moveStart:void 0,zoomed:!1,rotationDeg:0}),Ou(Nu(e),"handleKeyDown",(function(t){27!==t.keyCode&&13!==t.keyCode||e.props.onClose()})),Ou(Nu(e),"getCoordinatesIfOverImg",(function(t){var n=t.changedTouches?t.changedTouches[0]:t;if("react-modal-image-img"===n.target.id){var r=e.contentEl.getBoundingClientRect();return{x:n.clientX-r.left,y:n.clientY-r.top}}})),Ou(Nu(e),"handleMouseDownOrTouchStart",(function(t){if(t.preventDefault(),!(t.touches&&t.touches.length>1)){var n=e.getCoordinatesIfOverImg(t);n||e.props.onClose(),e.state.zoomed&&e.setState((function(e){return{moveStart:{x:n.x-e.move.x,y:n.y-e.move.y}}}))}})),Ou(Nu(e),"handleMouseMoveOrTouchMove",(function(t){if(t.preventDefault(),e.state.zoomed&&e.state.moveStart&&!(t.touches&&t.touches.length>1)){var n=e.getCoordinatesIfOverImg(t);n&&e.setState((function(e){return{move:{x:n.x-e.moveStart.x,y:n.y-e.moveStart.y}}}))}})),Ou(Nu(e),"handleMouseUpOrTouchEnd",(function(t){e.setState({moveStart:void 0})})),Ou(Nu(e),"toggleZoom",(function(t){t.preventDefault(),e.setState((function(e){return{zoomed:!e.zoomed,move:e.zoomed?{x:0,y:0}:e.move}}))})),Ou(Nu(e),"toggleRotate",(function(t){t.preventDefault(),360!==e.state.rotationDeg?e.setState((function(e){return{rotationDeg:e.rotationDeg+=90}})):e.setState({rotationDeg:90})})),e}return e=a,(n=[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown,!1)}},{key:"render",value:function(){var e=this,n=this.props,r=n.medium,o=n.large,a=n.alt,i=n.onClose,l=n.hideDownload,c=n.hideZoom,d=n.showRotate,s=n.imageBackgroundColor,p=void 0===s?"black":s,u=this.state,m=u.move,f=u.zoomed,g=u.rotationDeg;return t.createElement("div",null,t.createElement(pu,{name:"__react_modal_image__lightbox",css:uu({imageBackgroundColor:p})}),t.createElement("div",{className:"__react_modal_image__modal_container"},t.createElement("div",{className:"__react_modal_image__modal_content",onMouseDown:this.handleMouseDownOrTouchStart,onMouseUp:this.handleMouseUpOrTouchEnd,onMouseMove:this.handleMouseMoveOrTouchMove,onTouchStart:this.handleMouseDownOrTouchStart,onTouchEnd:this.handleMouseUpOrTouchEnd,onTouchMove:this.handleMouseMoveOrTouchMove,ref:function(t){e.contentEl=t}},f&&t.createElement($u,{id:"react-modal-image-img",className:"__react_modal_image__large_img",src:o||r,style:{transform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)"),WebkitTransform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)"),MsTransform:"translate3d(-50%, -50%, 0) translate3d(".concat(m.x,"px, ").concat(m.y,"px, 0) rotate(").concat(g,"deg)")},handleDoubleClick:this.toggleZoom}),!f&&t.createElement($u,{id:"react-modal-image-img",className:"__react_modal_image__medium_img",src:r||o,handleDoubleClick:this.toggleZoom,contextMenu:!r,style:{transform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)"),WebkitTransform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)"),MsTransform:"translate3d(-50%, -50%, 0) rotate(".concat(g,"deg)")}})),t.createElement(vu,{image:o||r,alt:a,zoomed:f,toggleZoom:this.toggleZoom,toggleRotate:this.toggleRotate,onClose:i,enableDownload:!l,enableZoom:!c,enableRotate:!!d})))}}])&&_u(e.prototype,n),r&&_u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();function Fu(e){return Fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(e)}function Mu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ru(e,t){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ru(e,t)}function Lu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vu(e);if(t){var o=Vu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ju(e)}(this,n)}}function ju(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vu(e){return Vu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vu(e)}function Hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wu=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ru(e,t)}(a,h);var e,n,r,o=Lu(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hu(ju(e=o.call.apply(o,[this].concat(n))),"state",{modalOpen:!1}),Hu(ju(e),"toggleModal",(function(){e.setState((function(e){return{modalOpen:!e.modalOpen}}))})),e}return e=a,n=[{key:"render",value:function(){var e=this.props,n=e.className,r=e.small,o=e.smallSrcSet,a=e.medium,i=e.large,l=e.alt,c=e.hideDownload,d=e.hideZoom,s=e.showRotate,p=e.imageBackgroundColor,u=this.state.modalOpen;return t.createElement("div",null,t.createElement("img",{className:n,style:{cursor:"pointer",maxWidth:"100%",maxHeight:"100%"},onClick:this.toggleModal,src:r,srcSet:o,alt:l}),u&&t.createElement(Au,{medium:a,large:i,alt:l,onClose:this.toggleModal,hideDownload:c,hideZoom:d,showRotate:s,imageBackgroundColor:p}))}}],n&&Mu(e.prototype,n),r&&Mu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}();L(".yt-product-modal-close-button {\n position: absolute;\n top: 0px;\n right: 0px;\n cursor: pointer;\n z-index: 1000;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border: none;\n background: none;\n}\n\n.yt-product-modal-close-button svg {\n color: #000;\n font-size: 25px;\n filter: drop-shadow(0 0 8px white) drop-shadow(0 0 5px white);\n}\n\n@media (max-width: 540px) {\n .yt-product-modal-close-button {\n top: 5px;\n right: 5px;\n }\n}\n\n.yt-product-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2147483644;\n}\n\n.yt-product-modal-content {\n background-color: white;\n box-shadow: 3px 6.01px 25.69px 0px rgba(0, 0, 0, 0.25);\n overflow-y: auto;\n scrollbar-width: none;\n}\n\n.yt-product-modal-content.small-screen {\n padding: 20px;\n border-radius: 0;\n width: 100%;\n height: 100%;\n}\n\n.yt-product-modal-content.large-screen {\n padding: 15px;\n border-radius: 16.5px;\n max-width: min(1200px, 70%);\n max-height: 80vh;\n}\n\n.yt-product-selection-modal {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n}\n\n.yt-variant-selection-modal {\n position: relative;\n z-index: 2147483644;\n background-color: white;\n overflow-y: auto;\n}\n\n.yt-variant-selection-modal .details-section h2 {\n text-align: left !important;\n margin-bottom: 10px;\n line-height: normal !important;\n}\n\n.yt-variant-selection-modal .details-section .price {\n font-size: 1.7em;\n font-weight: bold;\n margin-bottom: 10px;\n}\n\n.yt-variant-selection-modal .details-section .add-to-bundle {\n margin-top: 20px;\n padding: 10px 20px;\n background-color: #4caf50;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 1em;\n transition: background-color 0.3s ease;\n}\n\n.yt-variant-selection-modal .details-section .add-to-bundle:hover {\n background-color: #45a049;\n}\n\n.yt-variant-selection-modal.small-screen {\n flex-direction: column;\n}\n\n.yt-variant-selection-modal.small-screen .yt-product-modal-image-section {\n justify-content: center;\n position: relative;\n width: 100%;\n}\n\n.yt-variant-selection-modal.small-screen .yt-product-modal-image-section .yt-product-modal-main-image {\n width: inherit;\n height: inherit;\n object-fit: cover;\n aspect-ratio: 1 / 1 !important;\n}\n\n.yt-product-modal-main-image:hover {\n cursor: zoom-in;\n}\n\n.yt-variant-selection-modal.large-screen {\n display: flex;\n flex-direction: row;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-section {\n width: 50%;\n height: fit-content;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-section .yt-product-modal-main-image {\n width: fit-content;\n object-fit: cover;\n aspect-ratio: 1 / 1 !important;\n cursor: zoom-in;\n border-radius: 8px;\n border: 1px solid lightgray;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery {\n display: flex;\n flex-wrap: nowrap;\n gap: 10px;\n overflow-x: auto;\n margin-top: 10px;\n scrollbar-width: none;\n}\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery::-webkit-scrollbar {\n display: none;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img {\n width: 90px;\n height: 90px;\n cursor: pointer;\n opacity: 0.6;\n transition: opacity 0.3s ease;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img.active,\n.yt-variant-selection-modal.large-screen .yt-product-modal-image-gallery img:hover {\n opacity: 1;\n}\n\n.yt-variant-selection-modal.large-screen .yt-product-modal-details-section {\n width: 50%;\n padding-left: 20px;\n}\n\n.yt-product-modal-select-input {\n width: 50%;\n padding: 5px;\n margin-bottom: 20px;\n border: 1px solid #ccc;\n border-radius: 4px;\n font-size: 1em;\n justify-content: center;\n align-items: center;\n}\n\n.yt-product-modal-price-and-cta {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n}\n\n.yt-product-modal-atc-wrapper {\n width: 80%;\n}\n\n.yt-product-modal-atc-button {\n text-transform: uppercase;\n font-weight: 800;\n width: 100%;\n cursor: pointer;\n border: none;\n min-height: 40px;\n padding: 0px 15px;\n position: relative;\n overflow: hidden;\n}\n\n.yt-product-modal-separator {\n height: 10px;\n min-height: 10px;\n border: none;\n background-color: #d9d9d96b;\n margin: 20px 0 10px 0;\n display: block !important;\n}\n\n.yt-description-content {\n scroll-behavior: smooth;\n}\n\n.yt-product-modal-phone-close-button {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 9999999999;\n background-color: #ffffff;\n padding: 4px;\n border-radius: 50%;\n border: 1px solid lightgray;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.yt-product-modal-image-indicator {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n margin: 0 3px;\n cursor: pointer;\n backdrop-filter: blur(10px);\n}\n\n.yt-product-modal-image-gallery::-webkit-scrollbar {\n display: none;\n}");const Uu=n(((e,n)=>{const[r,o]=Wt(au),a=(e.disableInventoryTracking?r?.variants.edges?.filter((t=>t.node.inventoryQuantity>0||e.disableInventoryTracking)):r?.variants.edges)??[],[i,d]=c(a[0]?.node),[s,p]=c(0),[u,m]=c("undefined"!=typeof window&&window.innerWidth<=600),[f,g]=c(1),[h,x]=c("idle"),[y,b]=c(null),[w,C]=c(null);l((()=>{if(r){const t=r.variants.edges?.filter((t=>t.node.inventoryQuantity>0||e.disableQuantitySelector));d(r?.selectedVariant??t[0]?.node)}}),[r]),l((()=>{const t=e.selectedProducts.find((e=>e.variantId===i?.id));g(t?t.quantity:0)}),[f,e.selectedProducts,i]);const k=()=>{i?.id&&r&&(x("check"),e.handleAddToBundle(i?.id,r,1),setTimeout((()=>{x("idle"),o(void 0)}),500))};if(l((()=>{const e=()=>m(window.innerWidth<=600);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),!r||0===a.length)return null;const{title:E,descriptionHtml:T,media:S,variants:B}=r,$=S.edges.map((e=>e.node.image)).filter((e=>e.url.length>0));l((()=>{if(r&&i?.image?.url&&Array.isArray($)){const e=$.findIndex((e=>e.url===i?.image.url));-1!==e&&e!==s&&p(e)}}),[i]);const z=t=>{const n=t.target.value,r=a.find((e=>e.node.id===n))?.node;r&&(r.inventoryQuantity>0||e.disableInventoryTracking)&&d(r)};l((()=>{if(r){window.history.pushState({modalOpen:!0},"",window.location.href);const e=e=>{o(void 0),e.preventDefault()};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e),window.history.state?.modalOpen&&window.history.back()}}}),[r,o]);const _=e=>{b(e.targetTouches[0].clientX),C(null)},D=e=>{C(e.targetTouches[0].clientX)},I=()=>{if(null!==y&&null!==w&&$.length>1){const e=y-w,t=50;e>t?p((e=>e<$.length-1?e+1:0)):e<-t&&p((e=>e>0?e-1:$.length-1))}b(null),C(null)},N=t.createElement("div",{className:"yt-bundleProductModal-modal-overlay"},t.createElement("div",{className:"yt-bundleProductModal-modal-content "+(u?"small-screen":"large-screen"),ref:n},t.createElement("div",{className:"yt-bundleProductModal-selection-modal yt-variant-selection-modal"},t.createElement("div",{className:"yt-variant-selection-modal "+(u?"small-screen":"large-screen")},t.createElement("button",{className:"yt-bundleProductModal-modal-close-button",onClick:()=>{o(void 0)},style:{backgroundColor:"white"}},t.createElement(at,{size:"25"})),t.createElement("div",{className:"yt-bundleProductModal-modal-image-section"},t.createElement(t.Fragment,null,t.createElement("div",{onTouchStart:_,onTouchMove:D,onTouchEnd:I},t.createElement(Wu,{small:$[s].url,medium:$[s].url,large:$[s].url,hideDownload:!0,className:"yt-bundleProductModal-modal-main-image",imageBackgroundColor:"#000"})),t.createElement("div",{className:"yt-bundleProductModal-modal-image-gallery",style:{display:"flex",flexDirection:"row",overflow:"auto",gap:"10px",scrollbarWidth:"none"}},$.length>1&&$.filter((e=>e.url.length>0)).map(((n,r)=>t.createElement("img",{key:r,src:n.url,alt:n.altText||`${E} - Image ${r+1}`,onClick:()=>p(r),className:s===r?"active":"",style:{width:"73px",height:"73px",cursor:"pointer",borderRadius:"7px",border:"1px solid lightgray",...s===r&&{border:`2px solid ${e.themeColor||"#111"}`},objectFit:"cover"}})))))),t.createElement("div",{className:"yt-bundleProductModal-modal-details-section",style:{marginLeft:"20px",minHeight:"100%",maxHeight:"70vh",scrollbarWidth:"none",overflowY:"auto",display:"flex",flexDirection:"column"}},t.createElement("h2",null,a.length>1?i?.displayName:r.title),"ratingOnly"===e.reviewRatingType&&(r?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:e.themeColor,size:14}),t.createElement("span",{style:{marginLeft:6}},r?.rating?.averageRating," ","rating")),"ratingAndReviewCount"===e.reviewRatingType&&(r?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-and-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:e.themeColor,size:14}),r?.rating?.averageRating,"|",t.createElement(Wn,{size:14,style:{color:"dodgerblue"}})," (",r?.rating?.ratingCount," reviews)"),t.createElement("div",{className:"yt-bundleProductModal-modal-variant-selection",style:{display:"flex",flexDirection:"column",gap:"2px",marginTop:"20px"}},a.length>1&&t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",paddingBottom:"5px",fontSize:"16px",color:"#999",position:"relative",marginBottom:"10px"}},t.createElement("span",{style:{flexShrink:0}},r.options[0].name," :"," ",t.createElement("strong",{style:{color:"#000",paddingLeft:"5px"}},i?.title)),t.createElement("select",{value:i?.id||"",onChange:z,className:"yt-bundleProductModal-modal-select-input",style:{appearance:"none",border:"none",background:"transparent",fontWeight:"bold",color:"#000",cursor:"pointer",paddingRight:"20px",position:"absolute",right:0,top:0,bottom:0,width:"100%",opacity:0,zIndex:2}},a.map((({node:n})=>t.createElement("option",{key:n.id,value:n.id,disabled:!n.inventoryQuantity&&!e.disableInventoryTracking},n.title)))),t.createElement("span",{style:{position:"absolute",right:5,pointerEvents:"none",fontSize:"12px",color:"#000"}},t.createElement(no,null)))),t.createElement("div",{className:"yt-bundleProductModal-modal-price-and-cta",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}},t.createElement("div",{style:{width:"fit-content",minWidth:"fit-content",paddingRight:"10px",display:"flex",flexDirection:"column"}},i?.compareAtPrice&&parseFloat(i.compareAtPrice)>parseFloat(i?.price)&&t.createElement("div",{style:{textDecoration:"line-through",opacity:"0.5",lineHeight:"normal"}},Dg(e.styles.general.currencySymbol,e.styles.general.currencySymbol),_g(i?.compareAtPrice)),t.createElement("div",null,t.createElement("span",{className:"yt-bundleProductModal-modal-price",style:{fontSize:"20px",fontWeight:"600",color:"#000",textAlign:"center",lineHeight:"normal"}},Dg(e.styles.general.currencySymbol,e.styles.general.currencySymbol),_g(i?.price)))),!e.hideAddToBundle&&((i?.inventoryQuantity??0)>0||e.disableInventoryTracking)&&(!e?.disableQuantitySelector||f<1)&&t.createElement("div",{style:{width:"80%"},className:"yt-bundleProductModal-modal-atc-wrapper"},t.createElement("button",{style:{textTransform:"uppercase",fontWeight:"800",width:"100%",cursor:"pointer",border:"none",backgroundColor:e.themeColor||"#111",borderRadius:e.cornerRadius,color:e.primaryTextColorCta||"#fff",minHeight:"40px",padding:"0px 15px",position:"relative",overflow:"hidden"},className:"yt-bundleProductModal-modal-atc-button",onClick:e=>{e.stopPropagation(),e.preventDefault(),k()},disabled:"idle"!==h},"Add to bundle")))),t.createElement("div",{className:"yt-bundleProductModal-modal-separator",style:{height:"10px",minHeight:"10px",border:"none",backgroundColor:"#D9D9D96B",margin:"20px 0 10px 0",display:"block !important"}},t.createElement("span",null)),t.createElement("span",{className:"yt-description-content",style:{scrollBehavior:"smooth"},dangerouslySetInnerHTML:{__html:T}})))))),P=t.createElement("div",{className:"yt-bundleProductModal-modal-overlay"},t.createElement("div",{className:"yt-bundleProductModal-modal-content small-screen",style:{padding:"0px",position:"relative"},ref:n},t.createElement("div",{className:"yt-bundleProductModal-selection-modal yt-variant-selection-modal"},t.createElement("button",{className:"yt-bundleProductModal-modal-phone-close-button",style:{position:"fixed",top:"20px",right:"20px",zIndex:9999999999,backgroundColor:"#FFFFFF",padding:"4px",borderRadius:"50%",border:"1px solid lightgray",display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>{o(void 0)}},t.createElement(ro,{style:{height:"22px",width:"22px",padding:"4px",color:"black"},onMouseEnter:e=>e.currentTarget.style.color="black"})),t.createElement("div",{className:"yt-variant-selection-modal small-screen",style:{padding:"0px"}},t.createElement("div",{className:"yt-bundleProductModal-modal-image-section"},t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"relative"},onTouchStart:_,onTouchMove:D,onTouchEnd:I},t.createElement(Wu,{small:$[s].url,medium:$[s].url,large:$[s].url,hideDownload:!0,className:"yt-bundleProductModal-modal-main-image",imageBackgroundColor:"#000"}),t.createElement("div",{style:{position:"absolute",bottom:"20px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center"}},$.length>1&&$.map(((e,n)=>t.createElement("span",{className:"yt-bundleProductModal-modal-image-indicator",style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:s===n?"#FFFFFF":"#EBEBEB",margin:"0 3px",cursor:"pointer",backdropFilter:"blur(10px)"}}))))),t.createElement("div",{className:"yt-bundleProductModal-modal-image-gallery",style:{display:"flex",flexDirection:"row",overflowX:"auto",padding:"5px 20px",gap:"5px",scrollbarWidth:"none"}},$.length>1&&$.map(((n,r)=>t.createElement("img",{key:r,src:n.url,alt:n.altText||`${E} - Image ${r+1}`,onClick:()=>p(r),className:s===r?"active":"",style:{width:"60px",height:"60px",cursor:"pointer",borderRadius:"7px",border:"1px solid lightgray",...s===r&&{border:`2px solid ${e.themeColor||"#111"}`},objectFit:"cover"}})))))),t.createElement("div",{className:"yt-bundleProductModal-modal-details-section",style:{padding:"0 30px",margin:"15px 0",paddingBottom:"120px"}},t.createElement("h2",{style:{margin:"0px"}},a.length>1?i?.displayName:r.title),"ratingOnly"===e.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-only",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:e.themeColor,size:14}),t.createElement("span",{style:{marginLeft:6}},e?.rating?.averageRating," rating")),"ratingAndReviewCount"===e.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleProductModal-modal-rating-and-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:e.themeColor,size:14}),e?.rating?.averageRating,"|",t.createElement(Wn,{size:14})," (",e?.rating?.ratingCount," ","reviews)"),t.createElement("div",{className:"yt-bundleProductModal-modal-separator",style:{opacity:"0.2",border:"none",height:"2px",backgroundColor:"#000000",margin:"10px 0px",display:"block !important"}},t.createElement("span",null)),t.createElement("span",{className:"yt-description-content",style:{scrollbarWidth:"none",scrollBehavior:"smooth",margin:"0px"},dangerouslySetInnerHTML:{__html:T}})))),t.createElement("div",{className:"yt-bundleProductModal-modal-phone-bottom-bar",style:{position:"fixed",bottom:"0px",left:"0px",right:"0px",padding:"12px 15px",borderTop:"1px solid lightgray",boxShadow:"0px -4px 5px rgba(0, 0, 0, 0.1)",backgroundColor:"#fff",display:"flex",flexDirection:"column",gap:"2px",zIndex:9999999999}},a.length>1&&t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e0e0e0",paddingBottom:"5px",fontSize:"16px",color:"#999",position:"relative",margin:"10px 0"}},t.createElement("span",{style:{flexShrink:0}},r.options[0].name," :"," ",t.createElement("strong",{style:{color:"#000",paddingLeft:"5px"}},i?.title)),t.createElement("select",{value:i?.id||"",onChange:z,className:"yt-bundleProductModal-modal-select-input",style:{appearance:"none",border:"none",background:"transparent",fontWeight:"bold",color:"#000",cursor:"pointer",paddingRight:"20px",position:"absolute",right:0,top:0,bottom:0,width:"100%",opacity:0,zIndex:2}},a.map((({node:n})=>t.createElement("option",{key:n.id,value:n.id,disabled:!n.inventoryQuantity&&!e.disableInventoryTracking},n.title)))),t.createElement("span",{style:{position:"absolute",right:5,pointerEvents:"none",fontSize:"12px",color:"#000"}},t.createElement(no,null)))),t.createElement("div",{className:"yt-bundleProductModal-modal-price-and-cta",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}},t.createElement("div",{style:{width:"fit-content",minWidth:"fit-content",display:"flex",flexDirection:"column",paddingRight:"10px"}},i?.compareAtPrice&&t.createElement("div",{style:{textDecoration:"line-through",opacity:"0.5",lineHeight:"normal"}},Dg(e.styles.general.currencySymbol,e.styles.general.currencySymbol),_g(i?.compareAtPrice)),t.createElement("div",null,t.createElement("span",{className:"yt-bundleProductModal-modal-price",style:{fontSize:"20px",fontWeight:"600",color:"#000",textAlign:"center",lineHeight:"normal"}},Dg(e.styles.general.currencySymbol,e.styles.general.currencySymbol),_g(i?.price)))),!e.hideAddToBundle&&((i?.inventoryQuantity??0)>0||e.disableInventoryTracking)&&(!e?.disableQuantitySelector||f<1)&&t.createElement("div",{style:{width:"100%"}},t.createElement("button",{style:{textTransform:"uppercase",fontWeight:"800",width:"100%",cursor:"pointer",border:"none",backgroundColor:e.themeColor||"#111",borderRadius:e.cornerRadius,color:e.primaryTextColorCta||"#fff",minHeight:"40px",padding:"0px 15px",position:"relative",overflow:"hidden"},className:"yt-bundleProductModal-modal-atc-button",onClick:e=>{e.stopPropagation(),e.preventDefault(),k()},disabled:"idle"!==h},e.styles.byob.addToBundleCTAText||"Add to Bundle"))))));return v.createPortal(u?P:N,document.body)})),Gu=({options:e,selectedValue:n,onChange:r,type:o="text"})=>t.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"}},e?.map((e=>t.createElement("div",{key:e.name,onClick:()=>r(e),style:{cursor:"pointer"}},((e,n)=>{const r={cursor:"pointer",border:n?"2px solid #333":"1px solid #d1d5db",transition:"all 0.2s ease"};return"color"===o?t.createElement("div",{style:{...r,width:24,height:24,borderRadius:"50%",backgroundColor:e.value}}):"image"===o?t.createElement("img",{src:e.value||"/placeholder.svg",alt:e.name,style:{...r,width:24,height:24,borderRadius:"50%",objectFit:"cover"}}):t.createElement("div",{style:{...r,padding:"4px 8px",borderRadius:"12px",fontSize:"12px",fontWeight:n?"600":"400",backgroundColor:n?"#f3f4f6":"white",color:"#333",minWidth:"fit-content",textAlign:"center"}},e.name)})(e,n?.name===e.name))))),qu=({product:e,isOpen:n,onClose:r,variantOptions:o,cta:a,onConfirm:i})=>{const[d,s]=c((()=>e.options?.map((e=>e.values[0]))||[]));l((()=>{const e=e=>{"Escape"===e.key&&r()};return n&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[n,r]);const p=e.variants.edges.find((t=>t.node.title===(e.options?.length>0?d.join(" / "):d[0])))?.node,u=p?.image?.url||e.featuredMedia?.preview?.image?.url,m=e=>{if(!o?.options)return"text";const t=o.options.find((t=>t.name===e));return t?.type||"text"},f=e=>{if(!o?.options)return e.values.map((e=>({name:e,value:e})));const t=o.options.find((t=>t.name===e.name));return e.values.map((e=>{const n=t?.values?.find((t=>t.name===e));return{name:e,value:n?.value||e}}))},g=(e,t)=>{const n=d[t];if(!n)return null;return f(e).find((e=>e.name===n))||null};if(!n)return null;const h=t.createElement("div",{onClick:r,style:{position:"fixed",top:0,left:0,right:0,bottom:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.4)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center"},role:"dialog","aria-modal":"true","aria-labelledby":"yt-variant-options-modal-title",className:"yt-bundleBuilder-variant-options-modal-backdrop"},t.createElement("div",{onClick:e=>e.stopPropagation(),style:{background:"white",borderRadius:16,width:"fit-content",minWidth:350,maxWidth:450,maxHeight:"90vh",overflowY:"auto",position:"relative",zIndex:999,...window.innerWidth<=600&&{width:"90vw",maxWidth:"90vw",minWidth:"90vw"}},className:"yt-bundleBuilder-variant-options-modal-container"},t.createElement("div",{id:"yt-variant-options-modal-title",style:{width:"100%",padding:"16px 0",fontWeight:600,fontSize:14,textTransform:"uppercase",backgroundColor:"rgba(217, 217, 217)",color:a.textColor,textAlign:"center",borderTopLeftRadius:16,borderTopRightRadius:16}},"Select Options"),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"16px 20px",borderBottom:"1px solid #f0f0f0"},className:"yt-bundleBuilder-variant-options-modal-product-block"},t.createElement("img",{src:u,alt:e.title,style:{width:60,height:60,borderRadius:8,objectFit:"cover",flexShrink:0,transition:"opacity 0.3s ease"},className:"yt-bundleBuilder-variant-options-modal-product-image"}),t.createElement("div",{style:{display:"flex",flexDirection:"column",flex:1,gap:4},className:"yt-bundleBuilder-variant-options-modal-product-info"},t.createElement("div",{style:{fontSize:14,fontWeight:600,color:"#333"},className:"yt-bundleBuilder-variant-options-modal-product-title"},e.title))),t.createElement("div",{style:{padding:"20px"},className:"yt-bundleBuilder-variant-options-modal-variant-selectors"},e.options.map(((e,n)=>t.createElement("div",{key:e.name,style:{display:"flex",flexDirection:"column",gap:8,marginBottom:e?.values?.length>1?16:0},className:"yt-bundleBuilder-variant-options-modal-option"},e?.values?.length>1&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},className:"yt-bundleBuilder-variant-options-modal-option-label"},t.createElement("span",{style:{fontSize:14,fontWeight:500,color:"#333"},className:"yt-bundleBuilder-variant-options-modal-option-name"},"Select ",e.name),t.createElement("span",{style:{fontSize:12,fontWeight:500,color:"#666",backgroundColor:"#f5f5f5",padding:"4px 12px",borderRadius:16,textTransform:"capitalize"},className:"yt-bundleBuilder-variant-options-modal-option-selected-value"},g(e,n)?.name||e.values[0])),t.createElement(Gu,{options:f(e),selectedValue:g(e,n),onChange:e=>{((e,t)=>{const n=[...d];n[e]=t.name,s(n)})(n,e)},type:m(e.name)})))))),t.createElement("button",{className:"yt-bundleBuilder-variant-options-modal-confirm-button",onClick:()=>{const t=e.variants.edges.find((t=>t.node.title===(e.options?.length>0?d.join(" / "):d[0])))?.node.id;if(t)i(t),r();else{console.warn("yt::variant options modal - no matching variant found for selection:",d);const t=e.variants.edges[0]?.node.id;t&&(i(t),r())}},style:{width:"100%",fontSize:14,fontWeight:600,textTransform:"uppercase",backgroundColor:a.backgroundColor,color:a.textColor,textAlign:"center",padding:"16px 0",border:"none",cursor:"pointer",borderBottomLeftRadius:16,borderBottomRightRadius:16},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"}},"Add to Bundle")));return v.createPortal(h,document.body)};function Yu({quantity:e,setQuantity:n,remainingQuantity:r,handleAddToBundle:o,variantId:a,product:i,handleRemoveItem:l,hideAddToBundle:c,disableInventoryTracking:d,selectedVariantInventoryQty:s}){const p={display:"flex",alignItems:"center",justifyContent:"center",width:"33%",cursor:"pointer",backgroundColor:"#f2f2f2",userSelect:"none",border:"none",padding:"8px",margin:"0",fontSize:"20px",color:"#333",textDecoration:"none",boxShadow:"none",outline:"none",borderRadius:"0",boxSizing:"border-box"},u=d||e<s;return t.createElement("div",{className:"yt-bundleBuilder-quantity-selector-container"},t.createElement("button",{className:"yt-bundleBuilder-quantity-selector_button-minus",onClick:t=>{t.stopPropagation();const r=Math.max(0,e-1);n(r),l&&a&&l(a,1)},style:p},"-"),t.createElement("div",{className:"yt-bundleBuilder-quantity-selector_quantity"},e," added"),t.createElement("button",{className:"yt-bundleBuilder-quantity-selector_button-plus",onClick:t=>{t.stopPropagation();const l=Math.min(r,e+1);n(l),o&&a&&i&&o(a,i,1)},disabled:!u||c,style:{...p,cursor:!u||c?"not-allowed":"pointer",opacity:!u||c?.6:1}},"+"))}const Qu=({product:e,styles:n,selectedVariant:r})=>{const[o,a]=c(!1),i=r?.image?.url||e?.featuredMedia?.preview?.image?.url||e?.media?.edges?.[0]?.node?.image?.url||"",l=e?.media?.edges?.map((e=>e.node.image.url)).filter(Boolean),d=l?.[1]??i??"";return t.createElement("div",{className:"yt-bundleBuilder-image-effect",style:{position:"relative",width:"100%",overflow:"hidden",aspectRatio:n.general.imageAspectRatio||"1/1"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},t.createElement("div",{className:"yt-bundleBuilder-image-effect_wrapper",style:{width:"100%",height:"100%",position:"relative"}},t.createElement("img",{className:"yt-bundleBuilder-image-effect_main-image",style:{width:"100%",height:"100%",objectFit:"cover",opacity:o&&(i||l?.[0])!==d?0:1,transition:l?.length>0?"opacity 300ms ease, transform 300ms ease":"",transform:o?"scale(1.1)":"scale(1)"},src:i||l?.[0],alt:e.title}),(i||l?.[0])!==d&&t.createElement("img",{className:"yt-bundleBuilder-image-effect_hover-image",style:{width:"100%",height:"100%",objectFit:"cover",opacity:o?1:0,transition:"opacity 400ms ease, transform 400ms ease",transform:o?"scale(1.1)":"scale(1)",position:"absolute",top:0,left:0},src:i||d,alt:e.title})))},Zu=({product:e,bundle:n,handleAddToBundle:r,hideAddToBundle:o,remainingQuantity:a,themeColor:i,handleRemoveItem:d,transitionActive:s,idx:p,selecteditems:u,customVariantsQuantity:m})=>{const f=Ht(au),g=n.customizations,h=g?.byob?.variantSelectorType,[x,y]=c(!1),b=g.general?.variantTitleSuffix?e?.variants?.edges:(e=>{if(!e||e.length<2)return e;const t=e.map((e=>e.node.title)).map((e=>e.split(" ")));let n=[...t[0]];for(let e=1;e<t.length;e++){const r=t[e];let o=0;for(;o<n.length&&o<r.length&&n[n.length-1-o]===r[r.length-1-o];)o++;n=n.slice(n.length-o)}return n.length<1?e:e.map((e=>{const t=e.node.title.split(" "),r=t.slice(0,t.length-n.length).join(" ");return{...e,node:{...e.node,title:r,commonSuffix:n.join(" ")}}}))})(e?.variants?.edges);if(!b||!b.length)return t.createElement(t.Fragment,null);const v=b?.find((e=>e.node.inventoryQuantity>0||!g?.general.trackInventory))?.node?.id;if(!v&&!g.general.showOutOfStockProducts)return t.createElement(t.Fragment,null);const[w,C]=c(b?.find((e=>!g?.general.trackInventory||e.node.inventoryQuantity>0))?.node?.id||b[0]?.node?.id),[k,E]=c(0),[T,S]=c(window.innerWidth<450),[B,$]=c("normal"),z=b?.find((e=>e?.node?.id===w))?.node,_=m&&m.length>0&&m.find((e=>e.variantId==z?.id))?.quantity||z&&z?.inventoryQuantity;l((()=>{const e=u.find((e=>e.variantId===w));E(e?e.quantity:0)}),[k,u,w]),l((()=>{const e=()=>{S(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{CSS.supports("font-weight","500")?$("500"):CSS.supports("font-weight","400")?$("400"):CSS.supports("font-weight","600")&&$("600")}),[]),l((()=>{document.documentElement.style.setProperty("--yt-bundle-font-weight",B)}),[B]),l((()=>{if(w&&!b?.some((e=>e.node.id===w))){const e=b[0]?.node.id;e&&C(e)}}),[w,b]);const D=e.variants&&e.variants.edges?.length>1&&"customOptions"!==h,I="undefined"!=typeof window?(window?.ytapp||window?.ytBundleApp)?.storeId:void 0,N="53933408435"===I,P="75851235630"===I,O=(e=>{if(e.metafield&&"yourtoken_bundles_app"===e.metafield.namespace&&"categories"===e.metafield.key){if(e.metafield.jsonValue&&Array.isArray(e.metafield.jsonValue))return e.metafield.jsonValue;if(e.metafield.value)try{const t=JSON.parse(e.metafield.value);if(Array.isArray(t))return t}catch(e){console.error("Failed to parse categories:",e)}}return[]})(e),A=O.length>0;return t.createElement(t.Fragment,null,t.createElement("div",{className:`bundle-builder-product-container ${s?"yt-product-card-transition-active":p%2==0?"yt-product-card-transition":"yt-product-card-transition-up"} ${"none"===g?.byob.shadowType?"shadow-none":"spread"===g?.byob.shadowType?"shadow-spread":"shadow-no-spread"}`,style:{borderRadius:g?.byob.borderRadius,border:"transparent"!==g?.byob.borderColor?`1px solid ${g?.byob.borderColor}`:"none",backgroundColor:g?.byob.cardBackgroundColor||"#fff"},onClick:()=>{if(_<=0&&g?.general.trackInventory)return;const t={...e,variants:{...e.variants,edges:b},selectedVariant:z};f(t)}},t.createElement("div",{className:"yt-bundleBuilder-product-card_image-wrapper"},t.createElement(Qu,{product:e,styles:g,selectedVariant:z}),n?.productCardBadgeText&&t.createElement("div",{className:"yt-bundleBuilder-product-card_badge",style:{position:"absolute",top:"0px",left:"0px",backgroundColor:g?.general.primaryColor||"#111",color:g?.general.primaryContrastColor||"#fff",zIndex:1,margin:"0px",whiteSpace:"pre",padding:"4px 8px",fontSize:"12px",borderTopLeftRadius:g.byob.borderRadius}},n.productCardBadgeText),D&&t.createElement("div",{className:"yt-bundleBuilder-variant-selector-container",style:{position:"relative",width:"100%"}},t.createElement("select",{className:"bundle-builder-variant-selector "+(N?"bundle-builder-variant-selector--coralHaze":""),onClick:e=>{e.preventDefault(),e.stopPropagation()},value:w||"",onChange:e=>{e.stopPropagation(),e.preventDefault(),C(e.target.value)}},b?.map((e=>{const n=window.innerWidth<=320?10:window.innerWidth<=420?15:22,r=e.node.title.length>n?e.node.title.substring(0,n)+"...":e.node.title;return t.createElement("option",{key:e.node.id,value:e.node.id},r)}))),t.createElement("div",{className:"yt-bundleBuilder-variant-selector_icon",style:{position:"absolute",right:"16px",bottom:"10px",pointerEvents:"none"}},t.createElement(F,null)))),t.createElement("div",{className:"yt-bundleBuilder-product-card_details"},"enabled"===n?.customizations?.byob?.productCardCategoryVisibility&&A&&t.createElement("div",{className:"yt-bundleBuilder-product-card_category-wrapper",style:{padding:"2px 4px"}},t.createElement("div",{className:"yt-bundleBuilder-product-card_category-container",style:{display:"flex",flexWrap:"wrap",gap:"4px"}},O.slice(0,2).map(((e,n)=>t.createElement("span",{className:"yt-bundleBuilder-product-card_category",key:n,style:{fontSize:T?"8px":"12px",color:"#666",fontWeight:"500"}},e.charAt(0).toUpperCase()+e.slice(1)))),O.length>2&&t.createElement("span",{className:"yt-bundleBuilder-product-card_category-more",style:{fontSize:"10px",padding:"2px 6px",backgroundColor:"rgba(0, 0, 0, 0.05)",borderRadius:"8px",color:"#666",fontWeight:"500"}},"+",O.length-2," more"))),t.createElement("div",{className:"yt-bundleBuilder-product-card_title",style:{"--title-margin-top":T?"4px":"0px","--title-padding":n?.showBorder??1?"0 10px":"0 4px",...!1===g?.byob.productsPriceVisibility&&{"--title-padding":"8px"},...g?.byob.productTitleFontSize&&{"--title-font-size":g?.byob.productTitleFontSize}}},P?String(z?.displayName).replace("- Default Title",""):e.title,z?.commonSuffix?" -"+z?.commonSuffix:"")),"ratingOnly"===n?.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleBuilder-product-card_rating",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333"}},t.createElement(jr,{color:g?.general?.primaryColor,size:14}),t.createElement("span",{className:"yt-bundleBuilder-product-card_rating-text",style:{marginLeft:6}},e?.rating?.averageRating," rating")),"ratingAndReviewCount"===n?.reviewRatingType&&(e?.rating?.averageRating??0)>0&&t.createElement("div",{className:"yt-bundleBuilder-product-card_rating-review-count",style:{display:"flex",alignItems:"center",justifyContent:"start",fontSize:"14px",color:"#333",marginLeft:"10px"}},t.createElement(jr,{color:g?.general?.primaryColor,size:14}),e?.rating?.averageRating,"|",t.createElement(Wn,{size:14,style:{color:"dodgerblue"}})," (",e?.rating?.ratingCount," reviews)"),g?.byob.productsPriceVisibility&&t.createElement("div",{className:"yt-bundleBuilder-product-price",style:{marginBottom:"5px",padding:n?.showBorder?"0px 10px":"0 4px"}},parseFloat(z?.price??"0")>0?t.createElement("span",{className:"yt-bundleBuilder-product_price--new"},Dg(g.general.currencySymbol,n?.storeCurrencyCode)??"Rs.",_g(z?.price)):t.createElement("span",{className:"yt-bundleBuilder-product-card_price--free"},"Free"),z?.compareAtPrice&&g?.byob.compareAtPriceVisibility&&parseFloat(z.compareAtPrice)>parseFloat(z?.price)&&t.createElement("span",{className:"yt-fixed-bundle-original-price yt-bundleBuilder-product-card_price--old",style:{fontSize:"14px"}},Dg(g.general.currencySymbol,n?.storeCurrencyCode)??"Rs.",_g(z.compareAtPrice))),(_>0||!g?.general.trackInventory)&&t.createElement("div",{className:"yt-product-atc-wrapper"},(0===k||void 0===k)&&t.createElement("button",{style:{...!o&&{backgroundColor:g?.general.primaryColor||"#111",color:g?.general.primaryContrastColor||"#fff"}},disabled:o,onClick:t=>{t.stopPropagation(),t.preventDefault(),E(1),(()=>{if(!w)return;"customOptions"===h&&b.length>1?y(!0):r(w,e,1)})()},className:"yt-product-atc-button"},g?.byob.addToBundleCTAText),!n?.disableQuantitySelector&&k>0&&w&&t.createElement("div",{className:"visible yt-bundleBuilder-quantity-selector-container--visible",style:{overflow:"hidden"}},t.createElement(Yu,{remainingQuantity:a,setQuantity:E,quantity:k,handleAddToBundle:r,variantId:w,product:e,handleRemoveItem:d,hideAddToBundle:o,disableInventoryTracking:!g?.general.trackInventory,selectedVariantInventoryQty:_})),n?.disableQuantitySelector&&k>0&&w&&t.createElement("button",{style:{backgroundColor:"#747474",color:g?.general.primaryContrastColor||"#fff"},className:"yt-bundleBuilder-product-card_add-to-bundle-button--added"},t.createElement("div",{className:"yt-bundleBuilder-product-card_added-button-text"},"ADDED"),t.createElement("div",{onClick:e=>{e.stopPropagation();const t=Math.max(0,k-1);E(t),d&&w&&d(w,1)},className:"yt-bundleBuilder-product-card_remove-button"},t.createElement(Jr,{className:"yt-bundleBuilder-product-card_remove-icon",style:{color:"#fff",fontSize:"20px"}})))),_<=0&&g?.general.trackInventory&&t.createElement("div",{style:{backgroundColor:g.general.disabledButtonColor,color:"#fff",cursor:"not-allowed",transition:"transform 0.2s ease-in-out"},className:"yt-product-atc-disabled yt-bundleBuilder-product-card_add-to-bundle-button--disabled"},g?.general.outOfStockLabel||"Out of Stock")),"customOptions"===h&&x&&b.length>1&&t.createElement(qu,{product:e,isOpen:x,onClose:()=>y(!1),variantOptions:n.variantOptions,cta:{textColor:g.general.ctaTextColor,backgroundColor:g.general.primaryColor},onConfirm:t=>{C(t),r(t,e,1)}}))},Ku=({currentStep:e,setCurrentProductTier:n,totalSteps:r,tiers:o,isMobile:a,selectedProductsByTier:i,primaryColor:l="#000",primaryTextColorCta:c="#fff",tierNavigation:d})=>t.createElement("div",{className:"yt-bundleBuilder-stepper-container",style:{textAlign:"center",fontSize:"20px"}},t.createElement("div",{className:"yt-bundleBuilder-stepper_steps",style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center"}},Array.from({length:r}).map(((c,s)=>{const p=s+1,u=o[s].minimumQuantity-(i[s]?.length??0)==0,m=s===e;return l="black"===l?"#000000":l,t.createElement(t.Fragment,{key:p},t.createElement("div",{className:"yt-bundleBuilder-stepper_step "+(m?"yt-bundleBuilder-stepper_step--active":""),style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",gap:a?"4px":"8px"},onClick:()=>!1===d?()=>{}:n(p-1)},t.createElement("div",{className:"yt-bundleBuilder-stepper_label",style:{fontSize:"14px"}},"Step ",p),t.createElement("div",{className:"yt-bundleBuilder-stepper_line-container",style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",cursor:"pointer"}},t.createElement("div",{className:"yt-bundleBuilder-stepper_line",style:{height:"3px",width:a?"30px":"50px",backgroundColor:u?l:m?"#666666":"#CBD5E0",display:"block",borderTopLeftRadius:"5px",borderBottomLeftRadius:"5px"}}),t.createElement("div",{className:"yt-bundleBuilder-stepper_dot",style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:u?`${l}50`:"white",border:`2px solid ${u?l:m?"#666666":"#CBD5E0"}`,display:"flex",alignItems:"center",justifyContent:"center"}}),t.createElement("div",{className:"yt-bundleBuilder-stepper_line",style:{height:"3px",width:a?"30px":"50px",backgroundColor:u?l:m?"#666666":"#CBD5E0",display:"block",marginRight:s<r?a?"4px":"6px":"",borderTopRightRadius:"5px",borderBottomRightRadius:"5px"}}))))}))),t.createElement("div",{className:"yt-bundleBuilder-tier_title",style:{margin:a?"16px 0px":"15px 0px",fontSize:a?"16px":"18px",padding:"4px",background:"rgba(0, 0, 0, 0.03)",borderBottom:"1px solid rgba(130, 130, 130, 0.28)"}},o[e]?.title)),Xu=({isMobile:e,setSearchTerm:n,searchTerm:r,styles:o,setSortBy:a})=>{const[i,d]=c(!1),[s,p]=c(r);return l((()=>{const e=setTimeout((()=>{n(s)}),300);return()=>clearTimeout(e)}),[s,n]),t.createElement("div",{className:"yt-byob-sort-filter-container yt-bundleBuilder-sort-filter-container",style:{display:"flex",flexDirection:e?"column":"row",justifyContent:"space-between",alignItems:e?"flex-end":"center",textAlign:"center",marginBottom:"20px",width:"97%",gap:e?"10px":"0"}},t.createElement("div",{className:"yt-byob-sort-filter-inner yt-bundleBuilder-sort-filter-inner",style:{display:"flex",flexDirection:i&&e?"column":e?"row-reverse":"row",justifyContent:"space-between",alignItems:i?"":"center",gap:"12px",width:"100%"}},t.createElement("div",{className:"yt-byob-search-wrapper yt-bundleBuilder-search-wrapper",style:{position:"relative",display:"flex",alignItems:"center",width:e?i?"100%":"auto":"400px",transition:"width 0.3s ease-in-out"}},e&&!i?t.createElement(Xr,{className:"yt-byob-search-icon yt-bundleBuilder-search-icon",fontSize:"20px",color:"#555",style:{cursor:"pointer",lineHeight:"normal"},onClick:()=>d(!0)}):t.createElement(t.Fragment,null,t.createElement("input",{className:"yt-byob-search-input yt-bundleBuilder-search-input",style:{width:"100%",padding:e?"10px 12px":"10px 14px",fontSize:"14px",outline:"none",color:"#333",border:"1px solid #c7c7c7",borderRadius:o?.byob.borderRadius,boxShadow:o?.byob.borderColor?"0 2px 4px rgba(0, 0, 0, 0.1)":"none",textAlign:"start"},placeholder:"Search by Product Name",value:s,onChange:e=>p(e.target.value)}),!i&&t.createElement("span",{className:"yt-byob-search-icon-input yt-bundleBuilder-search-icon-input",style:{position:"absolute",right:"12px",color:"#aaa",fontSize:"16px",display:"flex",alignItems:"center",justifyContent:"center",background:"white",paddingLeft:"5px"}},t.createElement(Xr,{fontSize:"18px",style:{lineHeight:"normal"}}))),e&&i&&t.createElement("span",{className:"yt-byob-search-close-icon yt-bundleBuilder-search-close-icon",style:{position:"absolute",right:"12px",color:"#aaa",fontSize:"16px",cursor:"pointer"},onClick:()=>d(!1)},"✖")),t.createElement("div",{className:"yt-byob-filter-wrapper yt-bundleBuilder-filter-wrapper",style:{display:"flex",alignItems:"center",textAlign:"center",border:window.innerWidth>600?"1px solid #d1d5db":"",padding:"8px 12px",fontSize:"14px",cursor:"pointer",borderRadius:o?.byob.borderRadius,boxShadow:o?.byob.borderColor?window.innerWidth>600?"0 2px 4px rgba(0, 0, 0, 0.1)":" ":"none"}},t.createElement("span",{className:"yt-byob-filter-label yt-bundleBuilder-filter_label",style:{fontSize:"14px",color:"#555",marginRight:"6px"}},"Sort:"),t.createElement("select",{className:"yt-byob-filter-select yt-bundleBuilder-filter_select",style:{flex:1,border:"none",height:"auto",padding:"0px",marginBottom:"0px",background:"transparent",fontSize:"14px",color:"#333",fontWeight:"500",width:e?"120px":"",outline:"none",cursor:"pointer",textAlign:"start"},onChange:e=>a(e.target.value)},t.createElement("option",{value:"best-selling"},"Featured"),t.createElement("option",{value:"title-asc"},"Product Title (A-Z)"),t.createElement("option",{value:"title-desc"},"Product Title (Z-A)"),t.createElement("option",{value:"price-low-to-high"},"Price (Low to High)"),t.createElement("option",{value:"price-high-to-low"},"Price (High to Low)")))))},Ju=({styles:e,isMobile:n,categories:r,activeCategory:o,onCategoryChange:a})=>{const i=e=>{a(e)},l=(e,t)=>{const n=e.replace("#","");return`rgba(${parseInt(n.substring(0,2),16)}, ${parseInt(n.substring(2,4),16)}, ${parseInt(n.substring(4,6),16)}, ${t})`};return"tabs"===e?.byob?.categoryFilterOnPage?t.createElement("div",{style:{overflowX:n?"auto":"visible",scrollbarWidth:"none",msOverflowStyle:"none",marginBottom:"20px",width:"100%"},className:"yt-categoryfilter-wrapper"},t.createElement("div",{style:{display:"flex",gap:"0px",minWidth:"max-content",paddingBottom:"1px",flexWrap:"nowrap",justifyContent:"center",borderBottom:"1px solid #e0e0e0",width:"auto",height:n?"28px":"45px"},className:"yt-categoryfilter-tabs-container"},["All",...r].map((r=>{const a=o===r;return t.createElement("button",{key:r,onClick:()=>i(r),className:"yt-categoryfilter-tab-button "+(a?"yt-categoryfilter-tab-button--active":""),style:{background:"none",border:"none",padding:n?"12px 16px":"12px 20px",fontSize:n?"14px":"16px",fontWeight:a?"600":"400",color:a?e.general.primaryColor:"#666",cursor:"pointer",position:"relative",transition:"all 0.3s ease",backgroundColor:a?l(e.general.primaryColor,.07):"transparent",borderBottom:a?`2px solid ${e?.general.primaryColor}`:"2px solid transparent",marginBottom:"-1px",whiteSpace:"nowrap",minWidth:"fit-content"},onMouseEnter:t=>{a||(t.currentTarget.style.color=e?.general.primaryColor)},onMouseLeave:e=>{a||(e.currentTarget.style.color="#666")}},t.createElement("span",{style:{visibility:"hidden",height:0,display:"block",overflow:"hidden",fontWeight:600},"aria-hidden":"true"},r.charAt(0).toUpperCase()+r.slice(1)),t.createElement("span",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",textAlign:"center"}},r.charAt(0).toUpperCase()+r.slice(1)))})))):t.createElement("div",{style:{overflowX:n?"auto":"visible",scrollbarWidth:"none",msOverflowStyle:"none",marginBottom:"20px",paddingBottom:"5px"},className:"yt-categoryfilter-wrapper"},t.createElement("div",{style:{display:"flex",gap:"8px",minWidth:"max-content",flexWrap:"nowrap",justifyContent:"center",paddingRight:n?"10px":"0px"},className:"yt-categoryfilter-buttons-container"},["All",...r].map((r=>t.createElement("button",{key:r,onClick:()=>i(r),className:"yt-categoryfilter-button",style:{padding:n?"8px 16px":"10px 18px",fontSize:n?"13px":"14px",fontWeight:"500",border:`1px solid ${o===r?e?.general.primaryColor:"#e0e0e0"}`,borderRadius:e?.general.ctaBorderRadius,backgroundColor:o===r?e?.general.primaryColor:"white",color:o===r?"white":"#333",cursor:"pointer",transition:"all 0.3s ease",outline:"none",whiteSpace:"nowrap",minWidth:"fit-content",flexShrink:0},onMouseEnter:t=>{o!==r&&(t.currentTarget.style.borderColor=e?.general.primaryColor,t.currentTarget.style.color=e?.general.primaryColor)},onMouseLeave:e=>{o!==r&&(e.currentTarget.style.borderColor="#e0e0e0",e.currentTarget.style.color="#333")}},r.charAt(0).toUpperCase()+r.slice(1))))))},em=({bundle:e,selectedItems:n,setSelectedItems:r,handleAddToCart:a,bundleAddToCartLoading:i,renderingOnPage:d,selectedItemsQuantity:s,handleRemoveItem:p,bundleSubtotal:u})=>{const[m,f]=c(void 0),[g,h]=c(window.innerWidth<450),[x,y]=c(0),[b,v]=c({}),w=e.builderTiers?.type,C=e.customizations,k=e.builderTiers?.productTier??[],E=e.builderTiers?.offerTier??[],[T,S]=c([]),[B,$]=c(!1),[z,_]=c("All");l((()=>{const t=new Set;let n=!1;e?.products?.forEach((e=>{const r=e.productDetails;if(r.metafield&&"yourtoken_bundles_app"===r.metafield.namespace&&"categories"===r.metafield.key){let e=[];if(r.metafield.jsonValue&&Array.isArray(r.metafield.jsonValue))e=r.metafield.jsonValue;else if(r.metafield.value)try{const t=JSON.parse(r.metafield.value);Array.isArray(t)&&(e=t)}catch(e){console.error("Failed to parse categories:",e)}e.length>0&&(n=!0,e.forEach((e=>t.add(e))))}})),S(Array.from(t)),$(n)}),[e.products]);const D=((e,t)=>"All"===t?e:e.filter((e=>{const n=e.productDetails;if(n.metafield&&"yourtoken_bundles_app"===n.metafield.namespace&&"categories"===n.metafield.key){let e=[];if(n.metafield.jsonValue&&Array.isArray(n.metafield.jsonValue))e=n.metafield.jsonValue;else if(n.metafield.value)try{const t=JSON.parse(n.metafield.value);Array.isArray(t)&&(e=t)}catch(e){console.error("Failed to parse categories:",e)}return e.includes(t)}return!1})))(e.products.filter((e=>"ACTIVE"===e.productDetails.status||void 0===e.productDetails.status||""===e.productDetails.status)),z),I="productTier"===w?k.reduce(((e,t)=>e+t.minimumQuantity),0):"offerTier"===w?E.reduce(((e,t)=>e+t.minimumQuantity),0):e.minimumQuantity,[N,P]=c(""),[O,A]=c(""),F=((e,t)=>e.filter((e=>e?.productDetails?.title?.toLowerCase().includes(t?.toLowerCase()))))(D,N),M=((e,t)=>[...e].sort(((e,n)=>{const r=e?.productDetails?.title?.toLowerCase(),o=n?.productDetails?.title?.toLowerCase(),a=parseFloat(e?.productDetails?.variants?.edges?.[0]?.node?.price||"0"),i=parseFloat(n?.productDetails?.variants?.edges?.[0]?.node?.price||"0");switch(t){case"title-asc":return r.localeCompare(o);case"title-desc":return o.localeCompare(r);case"price-low-to-high":return a-i;case"price-high-to-low":return i-a;default:return 0}})))(F,O),R=((e,t,n,r,o)=>(e[o]?.products.filter((e=>t.some((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0]))&&t?.productDetails.title.toLowerCase().includes(n?.toLowerCase())))))||[]).sort(((e,n)=>{let o=t.find((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0])))),a=t.find((e=>e.productId===n.productId&&(n.variantIds.length<1||e.variantIds.includes(n.variantIds[0]))));if(!o||!a)return 0;const i=o.productDetails?.title?.toLowerCase(),l=a.productDetails?.title?.toLowerCase(),c=parseFloat(o?.productDetails?.variants?.edges[0]?.node?.price||"0"),d=parseFloat(a?.productDetails?.variants?.edges[0]?.node?.price||"0");switch(r){case"title-asc":return i.localeCompare(l);case"title-desc":return l.localeCompare(i);case"price-low-to-high":return c-d;case"price-high-to-low":return d-c;default:return 0}})))(k,M,N,O,x),[L,j]=Wt(au),[V,H]=c(!1);l((()=>{setTimeout((()=>{H(!0)}),100)}),[]);const W=o(null);l((()=>{const e=()=>{h(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{if(e.coverImageUrl){const t=new Image;t.src=e.coverImageUrl,t.onload=()=>{f(t.width/t.height)}}}),[e.coverImageUrl]),l((()=>{H(!1),setTimeout((()=>H(!0)),100)}),[x]);const U=(e,t)=>{if("productTier"===w){let n={...b},r=!1;if(n[t]){const o=n[t].indexOf(e);-1!==o&&(n[t]=[...n[t]],n[t].splice(o,1),r=!0)}if(!r)for(let t=k.length;t>=0;t--){const r=n[t].indexOf(e);if(-1!==r){n[t]=[...n[t]],n[t].splice(r,1);break}}v(n);const o=k.findIndex(((e,t)=>n[t]?.length<e.minimumQuantity));-1!==o&&y(o)}p(e)};l((()=>{if("productTier"===w){const e=Object.fromEntries(k.map((e=>[e.tier,[]])));v(e)}}),[e]),l((()=>{if("productTier"!==w||!k[x])return;if(I===s)return;const e=k.findIndex(((e,t)=>{const n=b[t]||[];return t>=x&&n.length<e.minimumQuantity}));-1!==e&&e!==x&&(y(e),(()=>{const e=document.querySelector(".products-display");e&&e.scrollIntoView({behavior:"smooth"})})())}),[b,k,w]),l((()=>{P("")}),[x]),l((()=>{function e(e){if(!W.current||!e.target)return;!W.current.contains(e.target)&&j(void 0)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const G=(e,t,o)=>{var a;"productTier"===w&&(a=e,v((e=>{const t={...e},n=k.findIndex(((e,n)=>{const r=t[n]||[];return n>=x&&r.length<e.minimumQuantity}));return-1!==n&&y(n),t[n]||(t[n]=[]),t[n].push(a),t}))),Ig(e,t,o,n,r)},q=(()=>{if(!e?.builderTiers)return e.minimumQuantity;const{type:t,offerTier:n,productTier:r}=e.builderTiers,o="offerTier"===t?n:"productTier"===t?r:null;if(!o)return e.minimumQuantity;let a=0;return o.map((e=>{a+=e.minimumQuantity})),a})(),Y=g&&e.mobileCoverImageUrl?e.mobileCoverImageUrl:e.coverImageUrl||null,Q=e.customStoreDetails?.fixedInventoryDetails,Z=e=>{const t=C?.general?.showOutOfStockProducts;if(t||!C?.general.trackInventory)return!0;const n=e?.productDetails?.variants?.edges||[];if(Q){if(n.some((e=>Q.some((t=>t.variantId===e.node.id&&t.quantity>0)))))return!0}return n.some((e=>e.node.inventoryQuantity>0))},K="bundles"==e.appName?e.pageHeader?.title:e?.title,X="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",rowGap:"15px",padding:"20px 0px",marginBottom:"20px",backgroundColor:C.byob.sectionBackgroundColor,..."transparent"!==C.fixedBundle.sectionBackgroundColor&&{padding:"20px"}},id:"yt-bundleBuilder-main-container",className:"yt-bundleBuilder-main-container"},Y?t.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",overflow:"hidden",...e?.coverImageVerticalMargin&&{marginBottom:e?.coverImageVerticalMargin,marginTop:e?.coverImageVerticalMargin}},className:"yt-bundleBuilder-header-banner"},Y&&t.createElement("img",{src:Y,alt:"Background",className:"yt-bundleBuilder-header_image",style:{width:"100%",height:"auto",display:"block"}}),t.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1,display:"flex",flexDirection:"column",alignItems:"center",padding:"20px",width:"90%",maxWidth:"1000px",textShadow:"2px 2px 8px rgba(0, 0, 0, 0.4)"},className:"yt-bundleBuilder-header_text-overlay"},t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.titleFontSize??"3rem",fontWeight:"700",color:C?.byob?.titleTextColor??"#000",marginBottom:"15px",backgroundColor:C?.byob?.titleBackgroundColor??"transparent",width:"100%",textAlign:"center"},className:"bundle-builder-title yt-bundleBuilder-header_title"},K),t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.subtitleFontSize??"1.5rem",color:C?.byob?.titleTextColor??"#000"},className:"bundle-builder-subtitle yt-bundleBuilder-header_subtitle"},X))):(K||X)&&t.createElement("div",{className:"yt-bundleBuilder-header-container"},K&&t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.titleFontSize??"3rem",fontWeight:"700",color:C?.byob?.titleTextColor??"#000",marginBottom:"15px",textAlign:"center",width:"100%",backgroundColor:C?.byob?.titleBackgroundColor??"transparent"},className:"yt-bundleBuilder-header_title"},K),X&&t.createElement("span",{style:{lineHeight:"normal",fontSize:C?.byob?.subtitleFontSize??"1.5rem",color:C?.byob?.titleTextColor??"#000"},className:"yt-bundleBuilder-header_subtitle"},X)),t.createElement("div",{className:"products-display yt-bundleBuilder-products-display"},"productTier"===w&&k.length>0&&C?.byob.productTiersVisibility&&t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Ku,{currentStep:x,totalSteps:k.length,tiers:k,isMobile:g,primaryColor:C?.general?.primaryColor,primaryTextColorCta:C?.general?.primaryContrastColor,setCurrentProductTier:y,selectedProductsByTier:b,tierNavigation:C.byob.tierNavigation})))),t.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"20px"},className:"yt-bundleBuilder-filters-container"},e?.enableSortAndFilter&&t.createElement(Xu,{isMobile:g,searchTerm:N,setSearchTerm:P,setSortBy:A,styles:C}),e?.customizations?.byob?.enableProductCategories&&B&&t.createElement("div",null,t.createElement(Ju,{styles:C,isMobile:g,categories:T,activeCategory:z,onCategoryChange:e=>{_(e)}}))),t.createElement("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"12px",justifyContent:"center",width:"100%"},className:"products-display yt-bundleBuilder-product-grid"},0===M?.length||"productTier"===w&&0===R?.length?t.createElement("p",{style:{fontSize:"20px",color:"#333",textAlign:"center",width:"100%"},className:"yt-bundleBuilder-product-grid_no-products-text"},"No products found"):"productTier"===w&&k.length>0?R.filter((e=>Z(M.find((t=>t.productId===e.productId&&(e.variantIds.length<1||t.variantIds.includes(e.variantIds[0]))))))).map(((r,o)=>{const a=(k[x]?.minimumQuantity??0)>(b[x]?.length??0),i=M.find((e=>e.productId===r.productId&&(r.variantIds.length<1||e.variantIds.includes(r.variantIds[0]))));return i?t.createElement(Zu,{bundle:e,idx:o,key:r?.variantIds?.[0]??r.productId,product:i?.productDetails,handleAddToBundle:G,hideAddToBundle:!a,remainingQuantity:q-s,themeColor:e?.dealTextColor,handleRemoveItem:e=>U(e,x),selecteditems:n,transitionActive:V,customVariantsQuantity:Q}):null})):M.filter(Z).map(((r,o)=>t.createElement(Zu,{bundle:e,idx:o,key:r.productId,product:r?.productDetails,handleAddToBundle:G,hideAddToBundle:s>=q,remainingQuantity:q-s,themeColor:e?.dealTextColor,handleRemoveItem:p,selecteditems:n,transitionActive:V,customVariantsQuantity:Q})))),!d&&t.createElement(ou,{builderTiers:e?.builderTiers,handleAddToCart:a,minimumQuantity:I,selectedProducts:n,showProductDetailsInTracker:e.showProductDetailsInTracker,handleRemoveItem:p,handleRemoveItemProductTier:U,selectedItemsQuantity:s,percentageOff:e.percentageOff,loading:i,bundleSubtotal:u,amountOff:e.amountOff,styles:e.customizations,dealAmount:e.dealAmount,themeColor:e?.dealTextColor??"#333",primaryTextColorCta:e?.primaryTextColorCta??"#fff",cornerRadiusType:e?.cornerRadiusType??"",selectedProductsByTier:b,renderingOnPage:d})),d&&t.createElement(ou,{handleAddToCart:a,minimumQuantity:I,builderTiers:e?.builderTiers,selectedProducts:n,showProductDetailsInTracker:e.showProductDetailsInTracker,loading:i,handleRemoveItem:p,handleRemoveItemProductTier:U,percentageOff:e.percentageOff,selectedItemsQuantity:s??0,bundleSubtotal:u??{price:0,compareAtPrice:0},amountOff:e.amountOff,styles:e.customizations,dealAmount:e.dealAmount,themeColor:C?.general.primaryColor||"#000",primaryTextColorCta:C.general.primaryContrastColor??"#fff",cornerRadiusType:e?.cornerRadiusType??"",selectedProductsByTier:b,renderingOnPage:d}),L&&void 0!==s&&(()=>{let r=s<e.minimumQuantity;return"productTier"==w&&(r=(k[x]?.minimumQuantity??0)>(b[x]?.length??0)),t.createElement(Uu,{handleAddToBundle:G,ref:W,remainingQuantity:e.minimumQuantity-s,hideAddToBundle:!r,disableQuantitySelector:e?.disableQuantitySelector??!1,disableInventoryTracking:!e?.customizations.general.trackInventory,selectedProducts:n,themeColor:C?.general.primaryColor||"#000",primaryTextColorCta:e?.customizations?.general.primaryContrastColor??"#fff",primaryBackgroundColorCta:C?.general.primaryColor||"#000",cornerRadius:e?.customizations.byob.borderRadius,styles:e.customizations,reviewRatingType:e?.reviewRatingType??"none"})})())},tm=({product:e,selectedVariantId:n,onVariantChange:r,styles:o,originalPrice:a,dealPrice:l,isVertical:c=!1,variantOptions:d,storeCurrencyCode:s})=>{const p=e?.productDetails?.variants?.edges?.find((e=>e?.node?.id===n))?.node,u=i((()=>{if(p?.title&&e.productDetails.options){const t=p.title.split(" / ");if(t.length===e.productDetails.options.length)return t}return e.productDetails.options?.map((e=>e.values[0]))||[]}),[p,e.productDetails.options]),m=e=>{r(e)};return c?t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",lineHeight:"normal",width:"165px",backgroundColor:"#F6F6F6",borderRadius:"20px",border:"1px solid #B3B3B3",boxShadow:"4px 4px 0px -1px #00000033",overflow:"hidden"}},t.createElement("div",{style:{position:"relative",width:"100%"}},o.comboBundle.subProductsImageVisibility&&t.createElement(t.Fragment,null,t.createElement("img",{src:p?.image?.url||e?.productDetails?.featuredMedia?.preview?.image?.url||"/placeholder.svg",alt:e?.productDetails?.featuredMedia?.alt,width:165,height:165,style:{objectFit:"cover",borderRadius:"20px",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",height:"100%",aspectRatio:o.general?.imageAspectRatio||"1/1"}}),t.createElement("div",{style:{marginTop:"8px",position:"absolute",bottom:"10px",left:"5px",right:"5px"}},e?.productDetails?.variants?.edges?.length>1&&t.createElement(t.Fragment,null,t.createElement("select",{value:n,onChange:e=>m(e.target.value),style:{padding:"8px 10px",border:"1px solid #ddd",backgroundColor:"#fff",color:"#333",fontSize:"14px",width:"100%",appearance:"none",marginRight:"30px"}},e?.productDetails?.variants?.edges.map((e=>t.createElement("option",{key:e?.node?.id,value:e?.node?.id,disabled:e.node.inventoryQuantity<=0},e?.node?.title)))),t.createElement("div",{style:{position:"absolute",right:"1px",top:"2px",bottom:"0px",pointerEvents:"none",backgroundColor:"#F3F3F3",width:"15%",height:"calc(100% - 4px)",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(F,null)))))),(o.comboBundle.subProductsProductTitleVisibility||o.comboBundle.subProductsProductPriceVisibility)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"40px",width:"100%",paddingBlock:"5px"}},o.comboBundle.subProductsProductTitleVisibility&&t.createElement("span",{style:{fontSize:"12px",color:"#333",fontWeight:"600",lineHeight:"normal",textAlign:"center",width:"fit-content"}},e?.productDetails?.title),o.comboBundle.subProductsProductPriceVisibility&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",lineHeight:"normal",fontSize:"14px"}},t.createElement("span",{style:{lineHeight:"normal"}},Dg(o.general.currencySymbol,s),_g((Number(""!==p?.compareAtPrice?Number(p?.compareAtPrice):p?.price)/Number(a)*Number(l)).toFixed(2))),t.createElement("span",{style:{textDecoration:"line-through",color:"#999",lineHeight:"normal",fontSize:"12px"}},Dg(o.general.currencySymbol,s),_g(""!==p?.compareAtPrice?p?.compareAtPrice:p?.price))))):t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"16px",padding:"4px",lineHeight:"normal",borderRadius:"8px",transition:"background-color 0.3s",width:"100%",border:"1px solid transparent",..."right"===o.comboBundle.infoAlignment&&{flexDirection:"row-reverse"},..."center"===o.comboBundle.infoAlignment&&{justifyContent:"center"}},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#fafafa",e.currentTarget.style.border="1px solid #DFDFDF"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.border="1px solid transparent"}},o.comboBundle.subProductsImageVisibility&&t.createElement("div",{style:{position:"relative"}},t.createElement("img",{src:p?.image?.url||e?.productDetails?.featuredMedia?.preview?.image?.url||"/placeholder.svg",alt:e?.productDetails?.featuredMedia?.alt,height:80,style:{objectFit:"cover",borderRadius:"10px",border:"1px solid #DEDEDE",aspectRatio:"1/1",width:"90px",height:"90px"}}),t.createElement("div",{style:{position:"absolute",top:-8,right:-8,backgroundColor:"#f8f8f8",borderRadius:"50%",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #eee",fontSize:"14px"}},"1")),t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"left"===o.comboBundle?.infoAlignment?"flex-start":"right"===o.comboBundle?.infoAlignment?"flex-end":"center"===o.comboBundle?.infoAlignment?"flex-start":void 0}},o.comboBundle.subProductsProductTitleVisibility&&t.createElement("span",{style:{fontSize:"14px",fontWeight:"600",lineHeight:"normal",display:"flex",alignItems:"center",gap:"8px"}},t.createElement("span",null," ",e?.productDetails?.title," "),e.productDetails.variants.edges.length>1&&d&&u&&t.createElement("span",{style:{fontSize:"10px",color:"#666",backgroundColor:"#F4F4F4",padding:"2px 8px",borderRadius:"10px",border:"1px solid #ddd"}},u.length>1?u.join(" / "):u)),o.comboBundle.subProductsProductPriceVisibility&&t.createElement("div",{style:{display:"flex",gap:"8px",marginTop:"5px",alignItems:"baseline"}},t.createElement("span",{style:{lineHeight:"normal"}},Dg(o.general.currencySymbol,s),_g((Number(""!==p?.compareAtPrice?Number(p?.compareAtPrice):p?.price)/Number(a)*Number(l)).toFixed(2))),t.createElement("span",{style:{textDecoration:"line-through",color:"#999",fontSize:"14px",lineHeight:"normal"}},Dg(o.general.currencySymbol,s),_g(""!==p?.compareAtPrice?p?.compareAtPrice:p?.price))),e.productDetails.variants.edges.length>1&&e.productDetails.options.length>0?t.createElement(t.Fragment,null,e.productDetails.options.map(((n,r)=>t.createElement("div",{key:n.name,style:{marginTop:"10px",display:"flex",flexDirection:"row",gap:"8px",alignItems:"center"}},e.productDetails.options.length>1&&t.createElement("label",{style:{fontSize:"12px",fontWeight:"500",color:"#333"}},n.name,":"),n?.values?.length>1&&t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",flexWrap:"wrap"}},n.values.map((a=>{const i=d&&d?.options?.find((e=>e.name===n.name));return i&&"color"===i?.type?t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{borderRadius:"50%",padding:"1px",backgroundColor:"white",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid transparent"}},i?.values.find((e=>e.name===a))?.value?t.createElement("div",{style:{width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",borderRadius:"50%",backgroundColor:i?.values.find((e=>e.name===a))?.value,cursor:"pointer"}},t.createElement("span",null)):t.createElement("span",{key:a,style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)):i&&"image"===i?.type?t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"100%",backgroundColor:u[r]===a?"#F7F7F7":"transparent",cursor:"pointer",padding:"0px",width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",overflow:"hidden"}},i?.values.find((e=>e.name===a))?.value?t.createElement("img",{src:i?.values.find((e=>e.name===a))?.value||"/placeholder.svg",alt:a,style:{width:u[r]===a?"26px":"24px",height:u[r]===a?"26px":"24px",objectFit:"cover",borderRadius:"100%",aspectRatio:"1/1"}}):t.createElement("span",{key:a,style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)):t.createElement("button",{key:a,onClick:()=>{const t=[...u];t[r]=a;const n=e.productDetails.options.length>0?t.join(" / "):t[r],o=e.productDetails.variants.edges.find((e=>e.node.title===n))?.node.id;o&&m(o)},style:{padding:"4px 8px",border:u[r]===a?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:u[r]===a?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"10px",fontWeight:"600"}},a)}))))))):t.createElement(t.Fragment,null,e?.productDetails?.variants?.edges?.length>1&&t.createElement("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap",lineHeight:"normal",marginTop:"10px"}},e?.productDetails?.variants?.edges.map((e=>t.createElement("button",{key:e?.node?.id,onClick:()=>m(e?.node?.id),disabled:e.node.inventoryQuantity<=0,style:{padding:"4px 8px",border:n===e?.node?.id?`1px solid ${o.general?.ctaBackgroundColor}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:n===e?.node?.id?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},e?.node?.title)))))))},nm=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[a,d]=c(window.innerWidth<786),[s,p]=c((()=>{const t={};return e.products.forEach(((e,n)=>{const r=e.productDetails.variants.edges.find((e=>e.node.inventoryQuantity>0))?.node;t[n]=r?r.id:e?.productDetails?.variants?.edges[0]?.node?.id})),t})),u=e.products?.filter((e=>e?.productDetails?.variants?.edges.some((e=>e?.node?.inventoryQuantity>0))))||[],m=Object.keys(s).length===u.length,f=(e,t)=>{p((n=>({...n,[e]:t})))},{originalPrice:g,dealPrice:h,offerValue:x}=i((()=>{const{price:t,compareAtPrice:n}=Object.entries(s).reduce(((t,[n,r])=>{const o=e.products[parseInt(n)],a=o.productDetails.variants.edges?.find((e=>e.node.id===r))?.node,i=parseFloat(a?.price??"0"),l=parseFloat(a?.compareAtPrice||i.toString());return t.price+=i,t.compareAtPrice+=l,t}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff);const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[s,e.products,e.percentageOff,e.dealAmount,e.amountOff]);l((()=>{const e=()=>{d(window.innerWidth<786)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const y=e.customizations,b=y.comboBundle?.comboCardStyle||"auto",v="vertical"===b||"auto"===b&&!a,w=y.comboBundle?.embedContentVisibility,C="bundles"==e.appName?e.pageHeader?.title:e?.title,k="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement("div",{style:{lineHeight:"normal",maxWidth:"800px",marginBlock:y.comboBundle?.verticalMargin||"0px",display:"flex",flexDirection:"column",alignItems:"left"===y.comboBundle?.infoAlignment?"flex-start":"right"===y.comboBundle?.infoAlignment?"flex-end":"center"===y.comboBundle?.infoAlignment?"center":void 0,textAlign:y.comboBundle?.infoAlignment??"left",fontFamily:"system-ui, -apple-system, sans-serif"}},w&&y.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px"}},t.createElement("h2",{style:{fontSize:y.comboBundle?.productTitleFontSize||"28px",color:y.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},C)),w&&y?.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",color:y.comboBundle?.titleTextColor||"#000",fontSize:(parseInt(y.comboBundle?.productTitleFontSize?.replace("px",""))||28)-4+"px"}},t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px",flexWrap:"wrap"}},t.createElement("span",{style:{fontWeight:"bold",lineHeight:"1",minWidth:"fit-content"}},Dg(y.general.currencySymbol,e.storeCurrencyCode),_g(h)),t.createElement("div",{style:{color:y.comboBundle?.titleTextColor||"#666",textDecoration:"line-through",verticalAlign:"middle",display:"inline-block",minWidth:"fit-content"}},Dg(y.general.currencySymbol,e.storeCurrencyCode),_g(g)),t.createElement("span",{style:{backgroundColor:"#D3122A",color:"white",padding:"4px 8px",fontSize:"14px",borderRadius:"20px",fontWeight:"500",lineHeight:"1",minWidth:"fit-content"}},e?.percentageOff?`${e?.percentageOff}% Off`:e?.amountOff?`${Dg(y.general.currencySymbol,e.storeCurrencyCode)}${_g(e?.amountOff)} Off`:`Save ${Dg(y.general.currencySymbol,e.storeCurrencyCode)}${_g(x)}`))),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",margin:"15px 0px"},className:"yt-comboBundle-checkoutSpecific-container"},t.createElement("div",{style:{display:"flex",width:"12px",height:"12px",justifyContent:"center",alignItems:"center",alignContent:"center",borderRadius:"50%",backgroundColor:y.general?.ctaBackgroundColor||"#1e1e1e",flexShrink:0},className:"yt-comboBundle-checkoutSpecific-dot"},t.createElement("span",null)),t.createElement("p",{style:{fontSize:y.comboBundle.productDescriptionFontSize||"16px",color:y.comboBundle?.descriptionTextColor||"#000",alignItems:"center",margin:0,lineHeight:"1.2"},className:"yt-comboBundle-checkoutSpecific-text"},"Tax included. ",t.createElement("u",null,"Shipping")," calculated at checkout."))),y.comboBundle.subProductsSectionVisibility&&t.createElement(t.Fragment,null,v?t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"20px",marginTop:"10px",flexWrap:"wrap"}},e.products.map(((n,r)=>{const o=n?.productDetails?.variants?.edges?.find((e=>e?.node?.id===s[r]))?.node;return o?t.createElement(tm,{key:`combo-product-${r}-${n.productId}`,product:n,styles:y,originalPrice:g,dealPrice:h,selectedVariantId:s[r],onVariantChange:e=>f(r,e),isVertical:v,variantOptions:e.variantOptions,storeCurrencyCode:e.storeCurrencyCode}):null}))):t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"10px",width:"100%"}},y.comboBundle.subProductsSectionVisibility&&e.products.map(((n,r)=>t.createElement(tm,{key:`combo-product-horizontal-${r}-${n.productId}`,product:n,styles:y,originalPrice:g,dealPrice:h,selectedVariantId:s[r],onVariantChange:e=>f(r,e),variantOptions:e.variantOptions}))))),t.createElement("div",{style:{borderTop:"1px solid #eee",display:"flex",flexDirection:"column",rowGap:"5px",marginTop:"20px",width:"100%"}},t.createElement("button",{style:{backgroundColor:m?y.general?.ctaBackgroundColor||"#121212":y.general.disabledButtonColor,color:y.general?.ctaTextColor||"#FFFFFF",fontSize:"16px",borderRadius:y.general.ctaBorderRadius??"20px",fontWeight:"bold",cursor:m?"pointer":"not-allowed",border:`1px solid ${m?y.general?.ctaBackgroundColor||"#121212":y.general.disabledButtonColor}`,boxShadow:y.general.ctaShadowType,padding:y.general?.ctaPadding,width:y.general?.ctaWidth,margin:"0"},disabled:!m,onMouseOver:e=>{y.general.customizeHoverState&&m&&(e.currentTarget.style.backgroundColor=y.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=y.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{y.general.customizeHoverState&&m&&(e.currentTarget.style.backgroundColor=y.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=y.general?.ctaTextColor||"#FFFFFF")},onClick:async()=>{try{if(o(!0),!n)return void o(!1);const t=Object.entries(s).map((([t,n])=>{const r=e.products[parseInt(t)],o=r.productDetails.variants.edges.find((e=>e.node.id===n))?.node;return o?{variantId:n,price:Number(o.price)}:null})).filter((e=>null!==e)),r=Object.values(s);await n(Number(g),r,Number(h),t)}catch(e){}o(!1)}},r?t.createElement(Vo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,m?y.comboBundle?.ctaTitle??"Add Bundle to cart":y.general.outOfStockLabel||"Out of Stock"," "))),w&&y.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:y.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:y.general.primaryColor+"20"}},"Description"),t.createElement("div",{style:{fontSize:y.comboBundle.productDescriptionFontSize||"16px",color:y.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:y.general.primaryColor+"08"}},t.createElement("p",null,k))))},rm=x.div`
|
|
2993
2823
|
max-width: 800px;
|
|
2994
2824
|
container-type: inline-size;
|
|
2995
2825
|
margin-top: ${e=>e.verticalMargin||"0px"};
|
|
@@ -2997,10 +2827,10 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
2997
2827
|
background-color: ${e=>e.backgroundColor||"transparent"};
|
|
2998
2828
|
|
|
2999
2829
|
${e=>"transparent"!==e.backgroundColor?"padding: 10px":""};
|
|
3000
|
-
`,
|
|
2830
|
+
`,om=x.div`
|
|
3001
2831
|
text-align: left;
|
|
3002
2832
|
margin-bottom: 24px;
|
|
3003
|
-
`,
|
|
2833
|
+
`,am=x.h2`
|
|
3004
2834
|
font-size: ${e=>e.fontSize||"24px"};
|
|
3005
2835
|
font-weight: 600;
|
|
3006
2836
|
margin: 0 0 8px 0;
|
|
@@ -3012,7 +2842,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3012
2842
|
@media (max-width: 600px) {
|
|
3013
2843
|
font-size: 20px;
|
|
3014
2844
|
}
|
|
3015
|
-
`,
|
|
2845
|
+
`,im=x.p`
|
|
3016
2846
|
font-size: ${e=>e.fontSize||"16px"};
|
|
3017
2847
|
color: #666;
|
|
3018
2848
|
margin: 0;
|
|
@@ -3023,7 +2853,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3023
2853
|
@container (max-width: 600px) {
|
|
3024
2854
|
font-size: 14px;
|
|
3025
2855
|
}
|
|
3026
|
-
`,
|
|
2856
|
+
`,lm=x.div`
|
|
3027
2857
|
background-color: ${e=>e.primaryBackgroundColorCta||"#121212"};
|
|
3028
2858
|
color: ${e=>e.primaryTextColorCta||"#FFFFFF"};
|
|
3029
2859
|
clip-path: polygon(2% 0%, 98% 0%, 100% 100%, 0% 100%);
|
|
@@ -3040,7 +2870,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3040
2870
|
@container (max-width: 600px) {
|
|
3041
2871
|
font-size: 10px;
|
|
3042
2872
|
}
|
|
3043
|
-
`,
|
|
2873
|
+
`,cm=x.div`
|
|
3044
2874
|
border: 1px solid
|
|
3045
2875
|
${e=>e.isSelected?e.primaryBackgroundColorCta:"#D4D4D4"};
|
|
3046
2876
|
border-radius: ${e=>"medium"==e.cornerRadiusType?"6px":"high"==e.cornerRadiusType?"16px":""};
|
|
@@ -3055,7 +2885,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3055
2885
|
&:hover {
|
|
3056
2886
|
border-color: ${e=>e.primaryBackgroundColorCta};
|
|
3057
2887
|
}
|
|
3058
|
-
`,
|
|
2888
|
+
`,dm=x.div`
|
|
3059
2889
|
display: flex;
|
|
3060
2890
|
justify-content: space-between;
|
|
3061
2891
|
border-radius: ${e=>"medium"==e.cornerRadiusType?"6px 6px 0px 0px":"high"==e.cornerRadiusType?"16px 16px 0px 0px":""};
|
|
@@ -3063,7 +2893,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3063
2893
|
padding: 16px;
|
|
3064
2894
|
background: #f9f9f9;
|
|
3065
2895
|
min-height: 32px;
|
|
3066
|
-
`,
|
|
2896
|
+
`,sm=x.div`
|
|
3067
2897
|
display: flex;
|
|
3068
2898
|
align-items: center;
|
|
3069
2899
|
gap: 12px;
|
|
@@ -3075,7 +2905,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3075
2905
|
@container (max-width: 600px) {
|
|
3076
2906
|
gap: 6px;
|
|
3077
2907
|
}
|
|
3078
|
-
`,
|
|
2908
|
+
`,pm=x.div`
|
|
3079
2909
|
background-color: ${e=>e.primaryBackgroundColorCta||"#000"};
|
|
3080
2910
|
color: white;
|
|
3081
2911
|
padding: 2px 8px;
|
|
@@ -3090,13 +2920,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3090
2920
|
padding: 2px 4px;
|
|
3091
2921
|
margin: 0px 5px;
|
|
3092
2922
|
}
|
|
3093
|
-
`,
|
|
2923
|
+
`,um=x.span`
|
|
3094
2924
|
display: flex;
|
|
3095
2925
|
flex-direction: column;
|
|
3096
2926
|
justify-content: center;
|
|
3097
2927
|
align-items: flex-start;
|
|
3098
2928
|
flex: 1 0 0;
|
|
3099
|
-
`,
|
|
2929
|
+
`,mm=x.h3`
|
|
3100
2930
|
font-size: 16px;
|
|
3101
2931
|
font-weight: 600;
|
|
3102
2932
|
text-align: left;
|
|
@@ -3107,7 +2937,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3107
2937
|
@container (max-width: 600px) {
|
|
3108
2938
|
font-size: 14px;
|
|
3109
2939
|
}
|
|
3110
|
-
`,
|
|
2940
|
+
`,fm=x.p`
|
|
3111
2941
|
font-size: 12px;
|
|
3112
2942
|
margin: 0;
|
|
3113
2943
|
@media (max-width: 600px) {
|
|
@@ -3116,9 +2946,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3116
2946
|
@container (max-width: 600px) {
|
|
3117
2947
|
font-size: 10px;
|
|
3118
2948
|
}
|
|
3119
|
-
`,
|
|
2949
|
+
`,gm=x.div`
|
|
3120
2950
|
text-align: right;
|
|
3121
|
-
`,
|
|
2951
|
+
`,hm=x.span`
|
|
3122
2952
|
font-size: 16px;
|
|
3123
2953
|
font-weight: 600;
|
|
3124
2954
|
color: #111;
|
|
@@ -3131,7 +2961,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3131
2961
|
font-size: 12px;
|
|
3132
2962
|
margin-left: 4px;
|
|
3133
2963
|
}
|
|
3134
|
-
`,
|
|
2964
|
+
`,xm=x.span`
|
|
3135
2965
|
font-size: 12px;
|
|
3136
2966
|
color: #666;
|
|
3137
2967
|
text-decoration: line-through;
|
|
@@ -3141,7 +2971,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3141
2971
|
@container (max-width: 600px) {
|
|
3142
2972
|
font-size: 10px;
|
|
3143
2973
|
}
|
|
3144
|
-
`,
|
|
2974
|
+
`,ym=x.div`
|
|
3145
2975
|
display: flex;
|
|
3146
2976
|
flex-direction: column;
|
|
3147
2977
|
padding: 10px 15px;
|
|
@@ -3159,9 +2989,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3159
2989
|
max-width: fit-content;
|
|
3160
2990
|
justify-content: space-between;
|
|
3161
2991
|
}
|
|
3162
|
-
`,
|
|
2992
|
+
`,bm=x.div`
|
|
3163
2993
|
margin: auto 0px;
|
|
3164
|
-
`,
|
|
2994
|
+
`,vm=x.div`
|
|
3165
2995
|
font-size: 12px;
|
|
3166
2996
|
font-weight: 500;
|
|
3167
2997
|
margin-bottom: 4px;
|
|
@@ -3170,7 +3000,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3170
3000
|
gap: 6px;
|
|
3171
3001
|
justify-content: flex-start;
|
|
3172
3002
|
flex-wrap: wrap;
|
|
3173
|
-
`;const
|
|
3003
|
+
`;const wm=x.button`
|
|
3174
3004
|
padding: 4px 8px;
|
|
3175
3005
|
border: 1px solid
|
|
3176
3006
|
${e=>e.isSelected?e.primaryColor:"#e5e7eb"};
|
|
@@ -3191,7 +3021,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3191
3021
|
font-size: 10px;
|
|
3192
3022
|
padding: 4px 8px;
|
|
3193
3023
|
}
|
|
3194
|
-
`,
|
|
3024
|
+
`,Cm=x.button`
|
|
3195
3025
|
width: ${e=>e.width||"100%"};
|
|
3196
3026
|
padding: ${e=>e.padding||"16px"};
|
|
3197
3027
|
background: ${e=>e.bgColor||"#121212"};
|
|
@@ -3216,13 +3046,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3216
3046
|
}
|
|
3217
3047
|
|
|
3218
3048
|
${e=>e.hoverProperties.customizeHoverState&&`\n &:hover {\n background: ${e.hoverProperties.backgroundColor||"#dc2626"};\n color: ${e.hoverProperties.textColor||"white"};\n }\n `}
|
|
3219
|
-
`,
|
|
3049
|
+
`,km=x.label`
|
|
3220
3050
|
display: inline-flex;
|
|
3221
3051
|
align-items: center;
|
|
3222
3052
|
cursor: pointer;
|
|
3223
|
-
`,
|
|
3053
|
+
`,Em=x.input.attrs({type:"radio"})`
|
|
3224
3054
|
display: none;
|
|
3225
|
-
`,
|
|
3055
|
+
`,Tm=x.span`
|
|
3226
3056
|
width: 20px;
|
|
3227
3057
|
height: 20px;
|
|
3228
3058
|
border-radius: 50%;
|
|
@@ -3243,7 +3073,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3243
3073
|
transition: transform 0.2s ease-in-out;
|
|
3244
3074
|
}
|
|
3245
3075
|
|
|
3246
|
-
${
|
|
3076
|
+
${km}[data-active="true"] & {
|
|
3247
3077
|
&::before {
|
|
3248
3078
|
transform: scale(1);
|
|
3249
3079
|
}
|
|
@@ -3264,13 +3094,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3264
3094
|
outline: none;
|
|
3265
3095
|
box-shadow: none;
|
|
3266
3096
|
}
|
|
3267
|
-
|
|
3097
|
+
`,Sm=x.img`
|
|
3268
3098
|
margin-right: 8px;
|
|
3269
3099
|
height: 64px;
|
|
3270
3100
|
border-radius: 8px;
|
|
3271
|
-
`,
|
|
3101
|
+
`,Bm=x.span`
|
|
3272
3102
|
margin-left: 10px;
|
|
3273
|
-
|
|
3103
|
+
`,$m=x.li`
|
|
3274
3104
|
display: flex;
|
|
3275
3105
|
align-items: center;
|
|
3276
3106
|
padding: 8px 12px;
|
|
@@ -3283,25 +3113,25 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3283
3113
|
&:last-child {
|
|
3284
3114
|
border-bottom: none;
|
|
3285
3115
|
}
|
|
3286
|
-
`,
|
|
3116
|
+
`,zm=x.img`
|
|
3287
3117
|
width: 30px;
|
|
3288
3118
|
height: 30px;
|
|
3289
3119
|
border-radius: 4px;
|
|
3290
3120
|
margin-right: 8px;
|
|
3291
|
-
`,
|
|
3121
|
+
`,_m=x.div`
|
|
3292
3122
|
width: 30px;
|
|
3293
3123
|
height: 30px;
|
|
3294
3124
|
border-radius: 50%;
|
|
3295
3125
|
margin-right: 8px;
|
|
3296
3126
|
border: 1px solid #ccc;
|
|
3297
|
-
`,
|
|
3127
|
+
`,Dm=x.div`
|
|
3298
3128
|
position: relative;
|
|
3299
3129
|
min-width: fit-content;
|
|
3300
3130
|
width: fit-content;
|
|
3301
3131
|
z-index: ${e=>e.isActive?"9999":"auto"};
|
|
3302
3132
|
border: 1px solid #e0e0e0;
|
|
3303
3133
|
outline: none;
|
|
3304
|
-
`,
|
|
3134
|
+
`,Im=x.button`
|
|
3305
3135
|
width: 100%;
|
|
3306
3136
|
display: flex;
|
|
3307
3137
|
gap: 10px;
|
|
@@ -3317,7 +3147,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3317
3147
|
&:hover {
|
|
3318
3148
|
background-color: #eaeaea;
|
|
3319
3149
|
}
|
|
3320
|
-
`,
|
|
3150
|
+
`,Nm=x.ul`
|
|
3321
3151
|
position: absolute;
|
|
3322
3152
|
top: 100%;
|
|
3323
3153
|
left: 0;
|
|
@@ -3341,22 +3171,22 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3341
3171
|
|
|
3342
3172
|
|
|
3343
3173
|
-ms-overflow-style: none;
|
|
3344
|
-
`;function Am({bundle:e,addToCartFunction:n,currentProductId:r}){const d=((e,t)=>{if(!t)return{};for(const n of t)if(n.productId==e)return n;return{}})(r?"gid://shopify/Product/"+r:e.products?.[0].productId,e.products),s=o(null),p=o(null),u=e.customizations??{},m=i((()=>d?.productDetails?.variants?.edges?.reduce(((e,{node:t})=>t.inventoryQuantity>0?e+=1:e),0)),[d]),f="enabled"===u.volumeBundle?.allowVariantSelection&&m>1,g=i((()=>e?.volumeTiers||[]),[e?.volumeTiers]),[h,x]=c(1),[y,b]=c(d?.productDetails?.variants?.edges?.[0]?.node?.id||""),[v,w]=c({}),[C,k]=c(g.reduce(((e,t,n)=>(e[t.tier-1]=Array.from({length:t.minimumQuantity},(()=>d?.productDetails?.options?.map((e=>e.values[0]))||[])),e)),{})||{}),[E,T]=c(!1),[S,B]=c(window.innerWidth<550),[$,z]=c(null);o([]);const _=o([]);l((()=>{const e=()=>{B(window.innerWidth<550)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{const e=e=>{$&&_.current[$.index]&&_.current[$.index][$.optionIndex]&&!_.current[$.index][$.optionIndex]?.contains(e.target)&&z(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[$]),l((()=>{const e={},t=y||d?.productDetails?.variants?.edges?.[0]?.node?.id||"";t&&g.forEach((n=>{e[n.tier]={};for(let r=0;r<n.minimumQuantity;r++)e[n.tier][r]=t})),w(e)}),[d,g,y]);const D=(e,t,n)=>{w((r=>({...r,[e]:{...r[e]||{},[t]:n}})))},I=a((()=>d?.productDetails?.variants?.edges?.find((e=>e.node.inventoryQuantity>0))?.node),[d]),N=a((()=>new URLSearchParams(window.location.search).get("variant")||""),[]),P=()=>{const e=N();if(e){const t=d?.productDetails?.variants?.edges?.find((t=>String(t.node.id)==="gid://shopify/ProductVariant/"+String(e)));if(t&&t.node.inventoryQuantity>0)b(String(t.node.id));else{const e=I();e&&b(String(e.id))}}};l((()=>{P();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,r=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(r.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",P),()=>{t=!1,window.removeEventListener("urlChange",P),window.history.pushState=n,window.history.replaceState=r}}),[N,d,I,y]);const O=(e,t)=>e?.productDetails?.variants?.edges?.find((e=>e.node.id===t))?.node,A=t=>{const n=g.find((e=>e.tier===t));if(!n)return{original:0,discounted:0};let r=0,o=0;const a=v[t]||{};for(let e=0;e<n.minimumQuantity;e++){const t=a[e]||y,n=O(d,t);n&&(n.compareAtPrice?r+=Number.parseFloat(n.compareAtPrice):r+=Number.parseFloat(n.price),o+=Number.parseFloat(n.price))}return"percentOff"===e?.discountType?o*=1-n.discountValue/100:"amountOff"===e?.discountType&&(o-=n.discountValue),o<0&&(o=0),{original:r,discounted:o,discountValue:n.discountValue}},F=(e,t,n,r)=>{let o=O(e,t);if(r){const a=v[r]?.[n||0]||t;o=O(e,a)}return o?.image?.url?o.image.url:e.productDetails.media.edges[0]?.node.image.url||""},M=i((()=>g.find((e=>e.tier===h))),[g,h]),R=i((()=>M?A(M.tier):null),[M,v,y]),L=i((()=>{if(!M||!R)return;const e=v[M.tier]||{},t={};for(let n=0;n<M.minimumQuantity;n++){const r=e[n]||y;t[r]=(t[r]||0)+1}return t}),[M?.minimumQuantity,y,v,R]),j=i((()=>Object.entries(L??{}).map((([e,t])=>({variantId:e,quantity:t})))),[L]);if(l((()=>{if(!M||!R)return;const e={tier:h,items:M.minimumQuantity,discountedPrice:R.discounted,originalPrice:R.original,variants:j,productData:d,tierData:{title:M.title,subtitle:M.subtitle,badgeTitle:M.badgeTitle}};if(JSON.stringify(e)!==JSON.stringify(p.current))return s.current&&clearTimeout(s.current),s.current=setTimeout((()=>{p.current=e;const t=new CustomEvent("ytBundleTierChange",{detail:e});window.dispatchEvent(t)}),50),()=>{s.current&&clearTimeout(s.current)};console.log("Event data is identical, skipping dispatch.")}),[h,d,j,R,M]),!n)return t.createElement(t.Fragment,null);const V=u.volumeBundle?.cardStyle,H=u.general?.primaryColor,W=u.general?.secondaryColor,U=u.general.primaryContrastColor,G=u.general.secondaryContrastColor,q="high"===e.cornerRadiusType?"20px":"medium"===e.cornerRadiusType?"6px":"0px",Y=i((()=>d?.productDetails?.variants?.edges?.find((e=>e.node.id===y))),[d,y]);if(i((()=>g.some((e=>e.minimumQuantity>(Y?.node.inventoryQuantity||0)))),[g,Y])&&u.general?.trackInventory)return t.createElement(t.Fragment,null);const Q=(e,t,n)=>{const r=[...e];r[t]=n;const o=r.join(" / ");return!u.general.trackInventory||d?.productDetails?.variants.edges.find((e=>e.node.title===o))?.node?.inventoryQuantity>0},Z="bundles"==e.appName?e.pageHeader?.title:e?.title,K="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(am,{verticalMargin:u.volumeBundle?.verticalMargin,backgroundColor:u.volumeBundle?.sectionBackgroundColor,className:"yt-bundle-container"},t.createElement(im,{className:"yt-bundle-header"},Z&&Z.trim().length>0&&t.createElement(lm,{fontSize:u.volumeBundle?.titleFontSize,backgroundColor:u.volumeBundle?.titleBackgroundColor,textColor:u.volumeBundle?.titleTextColor,className:"yt-bundle-header-title"},Z),t.createElement(cm,{className:"yt-bundle-header-subtitle",fontSize:u.volumeBundle?.subtitleFontSize},K)),"vertical"===V?t.createElement("div",{style:{display:"grid",gridTemplateColumns:S||4===g.length?"repeat(2, 1fr)":g.length>4?"repeat(3, 1fr)":`repeat(${g.length}, 1fr)`,justifyItems:"center",gap:S?"10px":"16px",paddingTop:"10px"},className:"yt-bundle-vertical-container"},g.map((n=>{const r=A(n.tier),o=r.original-r.discounted,a=d?.productDetails?.variants?.edges?.find((e=>e.node.id===y));if(n.minimumQuantity>a?.node.inventoryQuantity&&u.general.trackInventory)return t.createElement(t.Fragment,null);const i=h===n.tier;return t.createElement(t.Fragment,{key:n.tier},t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",borderRadius:q||"24px",...i?{border:`2px solid ${H}`}:{border:`1px solid ${W}`},boxShadow:`6px 6px 0px -1px ${i?H:W}20`,...n.badgeTitle&&{position:"relative"},zIndex:5,backgroundColor:"white",cursor:"pointer",position:"relative",height:"100%",maxHeight:"350px",width:"100%"},className:"yt-volume-vertical-tier-item "+(i?"yt-volume-vertical-tier-item-active":""),"data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType,"data-minimum-quantity":n.minimumQuantity,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),onClick:()=>x(n.tier)},n.badgeTitle&&t.createElement("div",{style:{position:"absolute",top:"-15px",zIndex:-1,left:"0",right:"0",width:"80%",textAlign:"center",margin:"0 auto",fontSize:"10px",clipPath:"polygon(2% 0%, 98% 0%, 100% 100%, 0% 100%)",backgroundColor:i?H:W,color:i?U:G,padding:"2px 0",borderRadius:"12px 12px 0px 0px",lineHeight:"normal"},className:i?"yt-volume-vertical-tier-badge-active":"yt-volume-vertical-tier-badge","data-tier":n.tier,"data-badge-title":n.badgeTitle},n.badgeTitle),t.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",height:"fit-content"},className:"yt-volume-vertical-tier-save-badge-container"},0!==r.discountValue&&t.createElement(t.Fragment,null,S&&o&&!!r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"5px",top:"8px"}},t.createElement(mm,{primaryBackgroundColorCta:i?H:W,isSelected:i,style:{height:"fit-content",fontSize:"10px",lineHeight:"normal",color:i?U:G},className:"yt-volume-vertical-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Ng(u.general.currencySymbol,e.storeCurrencyCode)}${Ig(r.discountValue)}`))),n.imageUrl&&t.createElement("img",{src:n.imageUrl,style:{objectFit:"cover",aspectRatio:"1/1",width:"100%",maxHeight:"160px",maxWidth:"160px",height:"fit-content",borderTopLeftRadius:q||"24px",borderTopRightRadius:q||"24px"},className:"yt-volume-vertical-tier-badge"})),t.createElement("div",{style:{padding:"8px",paddingTop:"0"}},t.createElement(fm,{style:{display:"flex",width:"100%",gap:"4px"},className:"yt-volume-vertical-details-container"},t.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative",width:"100%"},className:"yt-volume-vertical-details-title-container"},t.createElement(gm,{style:{fontSize:S?"12px":"14px",lineHeight:"normal"},className:"yt-volume-vertical-details-title"},n.title?n.title:t.createElement(t.Fragment,null,"Buy ",n.minimumQuantity,", Get"," ",n.discountValue,"% Off")),!S&&o&&r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility?t.createElement(mm,{primaryBackgroundColorCta:h===n.tier?H:W,isSelected:h===n.tier,style:{height:"fit-content",fontSize:"10px",lineHeight:"normal",color:i?U:G},className:"yt-volume-vertical-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Ng(u.general.currencySymbol,e.storeCurrencyCode)}${Ig(r.discountValue)}`):"",i&&n.imageUrl&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"0px"},className:"yt-volume-vertical-tier-selected-check"},t.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:H,color:U,padding:"2px"}},t.createElement(Zr,{style:{paddingBottom:"1px"},size:20,fontWeight:20})))),t.createElement(hm,{style:{lineHeight:"normal",fontSize:S?"10px":"14px",color:"#666"},className:"yt-volume-vertical-details-subtitle"},n.subtitle?n.subtitle:t.createElement(t.Fragment,null))),t.createElement(xm,{style:{textAlign:"left",marginTop:"4px",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center"},className:"yt-volume-vertical-details-price","data-tier":n.tier,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),"data-savings":o.toFixed(2)},t.createElement(ym,{style:{marginLeft:"0",lineHeight:"normal",marginRight:"8px"},className:"yt-volume-vertical-details-price-discount"},Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(r.discounted.toFixed(2))),o?t.createElement(bm,{style:{lineHeight:"normal"},className:"yt-volume-vertical-details-price-original"},Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(r.original.toFixed(2))):"")),i&&!n.imageUrl&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"10px",bottom:"10px"},className:"yt-volume-vertical-tier-selected-check"},t.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:H,color:U,padding:"2px"}},t.createElement(Zr,{style:{paddingBottom:"1px"},size:20,fontWeight:20})))))}))):t.createElement(t.Fragment,null,g.map((n=>{const r=A(n.tier),o=r.original-r.discounted,a=d?.productDetails?.variants?.edges?.find((e=>e.node.id===y));return n.minimumQuantity>a?.node.inventoryQuantity&&u.general.trackInventory?t.createElement(t.Fragment,null):t.createElement(t.Fragment,{key:n.tier},n.badgeTitle&&t.createElement(dm,{primaryTextColorCta:U,primaryBackgroundColorCta:H,style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-badge","data-tier":n.tier,"data-badge-title":n.badgeTitle},n.badgeTitle),t.createElement(sm,{cornerRadiusType:e?.cornerRadiusType??"",key:n.tier,primaryBackgroundColorCta:H??"",isSelected:h===n.tier,onClick:()=>x(n.tier),style:{borderRadius:q},className:"yt-volume-horizontal-tier-container "+(h===n.tier?"yt-volume-horizontal-tier-container-active":""),"data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType,"data-minimum-quantity":n.minimumQuantity,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2)},t.createElement(pm,{cornerRadiusType:e?.cornerRadiusType??"",style:{borderRadius:q,borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},className:"yt-volume-horizontal-tier-header"},t.createElement(um,{className:"yt-volume-horizontal-tier-info"},t.createElement(Tm,{"data-active":h===n.tier,accentColor:H,className:"yt-volume-horizontal-tier-radio-wrapper"},t.createElement(Sm,{name:"tier",checked:h===n.tier,onChange:()=>x(n.tier),className:"yt-volume-horizontal-tier-radio-hidden"}),t.createElement(Bm,{accentColor:H,className:"yt-volume-horizontal-tier-radio-custom"})),t.createElement(fm,{className:"yt-volume-horizontal-tier-details"},t.createElement("div",{style:{display:"flex"},className:"yt-volume-horizontal-tier-title-container"},t.createElement(gm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-title"},n.title?n.title:t.createElement(t.Fragment,null,"Buy ",n.minimumQuantity,", Get"," ",n.discountValue,"% Off")),o&&r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility?t.createElement(mm,{primaryBackgroundColorCta:H,isSelected:h===n.tier,style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Ng(u.general.currencySymbol,e.storeCurrencyCode)}${Ig(r.discountValue)}`):""),t.createElement(hm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-subtitle"},n.subtitle?n.subtitle:t.createElement(t.Fragment,null)))),t.createElement(xm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-price","data-tier":n.tier,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),"data-savings":o.toFixed(2)},o?t.createElement(bm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-original-price"},Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(r.original.toFixed(2))):"",t.createElement(ym,{className:"yt-volume-horizontal-tier-discounted-price"},Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(r.discounted.toFixed(2))))),f&&h===n.tier&&t.createElement(vm,{className:"yt-volume-horizontal-tier-product-grid"},Array.from({length:n.minimumQuantity}).map(((r,o)=>{const a=n.tier-1,i=(C[a]||[])[o]||d.productDetails.options.map((e=>e.values[0]));return t.createElement("div",{key:o,style:{display:"flex",gap:"10px",alignItems:"center",position:"relative"},className:"yt-volume-horizontal-tier-product-item"},t.createElement($m,{src:F(d,y,o,n.tier),alt:d?.productDetails?.title,className:"yt-volume-horizontal-tier-product-image"}),"auto"===u?.volumeBundle?.variantSelectorType?t.createElement("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"}},d?.productDetails?.options?.map(((r,l)=>{const c=$?.tier===n.tier&&$?.index===o&&$?.optionIndex===l,s=e?.variantOptions?.options?.find((e=>e.name===r.name));return t.createElement(Nm,{key:l,ref:e=>{_.current[o]||(_.current[o]=[]),_.current[o][l]=e},style:{zIndex:c?1e3:"auto"},isActive:c},t.createElement(Pm,{onClick:e=>{e.stopPropagation(),z(c?null:{tier:n.tier,index:o,optionIndex:l})},isActive:c},i[l],t.createElement(Rr,null)),c&&t.createElement(Om,{style:{zIndex:1001}},r.values.map((e=>{const r=[...i];r[l]=e;const c=!Q(i,l,e),p=d.productDetails.variants.edges.find((({node:e})=>e.title===r.join(" / ")))?.node,u=e=>{if(c)return void e.stopPropagation();k((e=>{const t={...e},n=[...t[a]||[]];return n[o]=r,t[a]=n,t}));const t=p?.id||y;D(n.tier,o,t),z(null)},m=s?.values.find((t=>t.name===e));return"image"===s?.type&&m?.value?t.createElement(_m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},t.createElement(Dm,{src:m.value,alt:e}),e):"color"===s?.type&&m?.value?t.createElement(_m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},t.createElement(Im,{style:{backgroundColor:m.value}}),e):t.createElement(_m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},e)}))))}))):t.createElement(wm,{style:{display:"flex",flexDirection:"column",gap:"5px"},className:"yt-volume-horizontal-tier-variant-selector"},d?.productDetails?.options.map(((r,l)=>{const c=e.variantOptions?.options?.find((e=>e.name===r.name))||null;return r.values.length<=1?null:t.createElement("div",{key:r.name,style:{width:"100%",display:"flex",flexDirection:"row",gap:"8px",alignItems:"center"},className:"yt-volume-horizontal-tier-variant-option"},t.createElement(Cm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-label"},"Select ",r.name,":"),t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",flexWrap:"wrap"},className:"yt-volume-horizontal-tier-variant-values"},r.values.map((e=>{const r=i[l]===e,s=!Q(i,l,e),p=c?.values.find((t=>t.name===e)),m=t=>{if(t.preventDefault(),t.stopPropagation(),s)return;const r=[...i];r[l]=e,k((e=>{const t={...e},n=[...t[a]||[]];return n[o]=r,t[a]=n,t}));const c=r.join(" / "),p=d.productDetails.variants.edges.find((e=>e.node.title===c))?.node.id||y;D(n.tier,o,p)},f={opacity:s?.5:1,cursor:s?"not-allowed":"pointer"};return c&&p?"color"===c.type&&p.value?t.createElement("button",{key:e,onClick:m,style:{...f,borderRadius:"50%",padding:"1px",backgroundColor:"white",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid transparent",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-color-button"},t.createElement("div",{style:{width:r?"24px":"20px",height:r?"24px":"20px",borderRadius:"50%",backgroundColor:p.value,lineHeight:"normal",boxShadow:"rgba(9, 30, 66, 0.25) 0px 4px 8px -2px, rgba(9, 30, 66, 0.08) 0px 0px 0px 2px"}},t.createElement("span",null))):"image"===c.type?t.createElement("button",{key:e,onClick:m,style:{...f,border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"100%",backgroundColor:r?"#F7F7F7":"transparent",padding:"0px",width:r?"20px":"18px",height:r?"20px":"18px",overflow:"hidden"},className:"yt-volume-horizontal-tier-variant-image-button"},t.createElement("img",{src:p.value,alt:e,style:{width:r?"26px":"24px",height:r?"26px":"24px",objectFit:"cover",borderRadius:"100%",aspectRatio:"1/1"}})):t.createElement(km,{key:e,isSelected:r,onClick:m,style:{...f,padding:"4px 8px",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:r?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"600",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-button-default"},e):t.createElement(km,{key:e,isSelected:r,onClick:m,disabled:s,style:{...f,padding:"4px 8px",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:r?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"600",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-button"},e)}))))}))))})))))}))),e?.showCta&&t.createElement(Em,{bgColor:u.general?.ctaBackgroundColor,textColor:u.general?.ctaTextColor,border:`1px solid ${u.general?.ctaBorderColor||"#121212"}`,shadow:u.general.ctaShadowType,padding:u.general?.ctaPadding,width:u.general?.ctaWidth,hoverProperties:{customizeHoverState:u.general?.customizeHoverState,backgroundColor:u.general?.ctaHoverBackgroundColor,textColor:u.general?.ctaHoverTextColor},onClick:async()=>{try{T(!0);const e=g.find((e=>e.tier===h));if(!e)return;const t={},r=v[e.tier]||{};for(let n=0;n<e.minimumQuantity;n++){const e=r[n]||y;t[e]?t[e].quantity+=1:t[e]={quantity:1}}const o=A(e.tier),a=Array.from({length:e.minimumQuantity},((e,t)=>r[t]||y));n&&await n(o.original,a)}catch(e){console.error("VolumeBundle handleAddToCart error:",e)}finally{T(!1)}},borderRadius:u.general.ctaBorderRadius??"",disabled:E,className:"yt-volume-add-to-cart-button"},E?t.createElement(Vo,{color:"white",loading:E,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"8px",justifyContent:"center",alignItems:"center"}},t.createElement("span",null,u.volumeBundle?.ctaTitle??"Add Bundle to Cart")," ","•",t.createElement(zm,{className:"yt-volume-add-to-cart-button-info"},(()=>{const n=A(h);return t.createElement(t.Fragment,null,Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(n.discounted.toFixed(2))," ",n?.original&&t.createElement("span",{style:{lineHeight:"normal",textDecoration:"line-through",fontWeight:"550"}},Ng(u.general.currencySymbol,e.storeCurrencyCode),Ig(n?.original.toFixed(2))," "))})()))))}const Fm=x.div`
|
|
3174
|
+
`;function Pm({bundle:e,addToCartFunction:n,currentProductId:r}){const d=((e,t)=>{if(!t)return{};for(const n of t)if(n.productId==e)return n;return{}})(r?"gid://shopify/Product/"+r:e.products?.[0].productId,e.products),s=o(null),p=o(null),u=e.customizations??{},m=i((()=>d?.productDetails?.variants?.edges?.reduce(((e,{node:t})=>t.inventoryQuantity>0?e+=1:e),0)),[d]),f="enabled"===u.volumeBundle?.allowVariantSelection&&m>1,g=i((()=>e?.volumeTiers||[]),[e?.volumeTiers]),[h,x]=c(1),[y,b]=c(d?.productDetails?.variants?.edges?.[0]?.node?.id||""),[v,w]=c({}),[C,k]=c(g.reduce(((e,t,n)=>(e[t.tier-1]=Array.from({length:t.minimumQuantity},(()=>d?.productDetails?.options?.map((e=>e.values[0]))||[])),e)),{})||{}),[E,T]=c(!1),[S,B]=c(window.innerWidth<550),[$,z]=c(null);o([]);const _=o([]);l((()=>{const e=()=>{B(window.innerWidth<550)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),l((()=>{const e=e=>{$&&_.current[$.index]&&_.current[$.index][$.optionIndex]&&!_.current[$.index][$.optionIndex]?.contains(e.target)&&z(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[$]),l((()=>{const e={},t=y||d?.productDetails?.variants?.edges?.[0]?.node?.id||"";t&&g.forEach((n=>{e[n.tier]={};for(let r=0;r<n.minimumQuantity;r++)e[n.tier][r]=t})),w(e)}),[d,g,y]);const D=(e,t,n)=>{w((r=>({...r,[e]:{...r[e]||{},[t]:n}})))},I=a((()=>d?.productDetails?.variants?.edges?.find((e=>e.node.inventoryQuantity>0))?.node),[d]),N=a((()=>new URLSearchParams(window.location.search).get("variant")||""),[]),P=()=>{const e=N();if(e){const t=d?.productDetails?.variants?.edges?.find((t=>String(t.node.id)==="gid://shopify/ProductVariant/"+String(e)));if(t&&t.node.inventoryQuantity>0)b(String(t.node.id));else{const e=I();e&&b(String(e.id))}}};l((()=>{P();const e=new Event("urlChange");let t=!0;const n=window.history.pushState,r=window.history.replaceState;return window.history.pushState=function(){t&&(n.apply(this,arguments),window.dispatchEvent(e))},window.history.replaceState=function(){t&&(r.apply(this,arguments),window.dispatchEvent(e))},window.addEventListener("urlChange",P),()=>{t=!1,window.removeEventListener("urlChange",P),window.history.pushState=n,window.history.replaceState=r}}),[N,d,I,y]);const O=(e,t)=>e?.productDetails?.variants?.edges?.find((e=>e.node.id===t))?.node,A=t=>{const n=g.find((e=>e.tier===t));if(!n)return{original:0,discounted:0};let r=0,o=0;const a=v[t]||{};for(let e=0;e<n.minimumQuantity;e++){const t=a[e]||y,n=O(d,t);n&&(n.compareAtPrice?r+=Number.parseFloat(n.compareAtPrice):r+=Number.parseFloat(n.price),o+=Number.parseFloat(n.price))}return"percentOff"===e?.discountType?o*=1-n.discountValue/100:"amountOff"===e?.discountType&&(o-=n.discountValue),o<0&&(o=0),{original:r,discounted:o,discountValue:n.discountValue}},F=(e,t,n,r)=>{let o=O(e,t);if(r){const a=v[r]?.[n||0]||t;o=O(e,a)}return o?.image?.url?o.image.url:e.productDetails.media.edges[0]?.node.image.url||""},M=i((()=>g.find((e=>e.tier===h))),[g,h]),R=i((()=>M?A(M.tier):null),[M,v,y]),L=i((()=>{if(!M||!R)return;const e=v[M.tier]||{},t={};for(let n=0;n<M.minimumQuantity;n++){const r=e[n]||y;t[r]=(t[r]||0)+1}return t}),[M?.minimumQuantity,y,v,R]),j=i((()=>Object.entries(L??{}).map((([e,t])=>({variantId:e,quantity:t})))),[L]);if(l((()=>{if(!M||!R)return;const e={tier:h,items:M.minimumQuantity,discountedPrice:R.discounted,originalPrice:R.original,variants:j,productData:d,tierData:{title:M.title,subtitle:M.subtitle,badgeTitle:M.badgeTitle}};if(JSON.stringify(e)!==JSON.stringify(p.current))return s.current&&clearTimeout(s.current),s.current=setTimeout((()=>{p.current=e;const t=new CustomEvent("ytBundleTierChange",{detail:e});window.dispatchEvent(t)}),50),()=>{s.current&&clearTimeout(s.current)};console.log("Event data is identical, skipping dispatch.")}),[h,d,j,R,M]),!n)return t.createElement(t.Fragment,null);const V=u.volumeBundle?.cardStyle,H=u.general?.primaryColor,W=u.general?.secondaryColor,U=u.general.primaryContrastColor,G=u.general.secondaryContrastColor,q="high"===e.cornerRadiusType?"20px":"medium"===e.cornerRadiusType?"6px":"0px",Y=i((()=>d?.productDetails?.variants?.edges?.find((e=>e.node.id===y))),[d,y]);if(i((()=>g.some((e=>e.minimumQuantity>(Y?.node.inventoryQuantity||0)))),[g,Y])&&u.general?.trackInventory)return t.createElement(t.Fragment,null);const Q=(e,t,n)=>{const r=[...e];r[t]=n;const o=r.join(" / ");return!u.general.trackInventory||d?.productDetails?.variants.edges.find((e=>e.node.title===o))?.node?.inventoryQuantity>0},Z="bundles"==e.appName?e.pageHeader?.title:e?.title,K="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(rm,{verticalMargin:u.volumeBundle?.verticalMargin,backgroundColor:u.volumeBundle?.sectionBackgroundColor,className:"yt-bundle-container"},t.createElement(om,{className:"yt-bundle-header"},Z&&Z.trim().length>0&&t.createElement(am,{fontSize:u.volumeBundle?.titleFontSize,backgroundColor:u.volumeBundle?.titleBackgroundColor,textColor:u.volumeBundle?.titleTextColor,className:"yt-bundle-header-title"},Z),t.createElement(im,{className:"yt-bundle-header-subtitle",fontSize:u.volumeBundle?.subtitleFontSize},K)),"vertical"===V?t.createElement("div",{style:{display:"grid",gridTemplateColumns:S||4===g.length?"repeat(2, 1fr)":g.length>4?"repeat(3, 1fr)":`repeat(${g.length}, 1fr)`,justifyItems:"center",gap:S?"10px":"16px",paddingTop:"10px"},className:"yt-bundle-vertical-container"},g.map((n=>{const r=A(n.tier),o=r.original-r.discounted,a=d?.productDetails?.variants?.edges?.find((e=>e.node.id===y));if(n.minimumQuantity>a?.node.inventoryQuantity&&u.general.trackInventory)return t.createElement(t.Fragment,null);const i=h===n.tier;return t.createElement(t.Fragment,{key:n.tier},t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",borderRadius:q||"24px",...i?{border:`2px solid ${H}`}:{border:`1px solid ${W}`},boxShadow:`6px 6px 0px -1px ${i?H:W}20`,...n.badgeTitle&&{position:"relative"},zIndex:5,backgroundColor:"white",cursor:"pointer",position:"relative",height:"100%",maxHeight:"350px",width:"100%"},className:"yt-volume-vertical-tier-item "+(i?"yt-volume-vertical-tier-item-active":""),"data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType,"data-minimum-quantity":n.minimumQuantity,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),onClick:()=>x(n.tier)},n.badgeTitle&&t.createElement("div",{style:{position:"absolute",top:"-15px",zIndex:-1,left:"0",right:"0",width:"80%",textAlign:"center",margin:"0 auto",fontSize:"10px",clipPath:"polygon(2% 0%, 98% 0%, 100% 100%, 0% 100%)",backgroundColor:i?H:W,color:i?U:G,padding:"2px 0",borderRadius:"12px 12px 0px 0px",lineHeight:"normal"},className:i?"yt-volume-vertical-tier-badge-active":"yt-volume-vertical-tier-badge","data-tier":n.tier,"data-badge-title":n.badgeTitle},n.badgeTitle),t.createElement("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",height:"fit-content"},className:"yt-volume-vertical-tier-save-badge-container"},0!==r.discountValue&&t.createElement(t.Fragment,null,S&&o&&!!r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"5px",top:"8px"}},t.createElement(pm,{primaryBackgroundColorCta:i?H:W,isSelected:i,style:{height:"fit-content",fontSize:"10px",lineHeight:"normal",color:i?U:G},className:"yt-volume-vertical-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Dg(u.general.currencySymbol,e.storeCurrencyCode)}${_g(r.discountValue)}`))),n.imageUrl&&t.createElement("img",{src:n.imageUrl,style:{objectFit:"cover",aspectRatio:"1/1",width:"100%",maxHeight:"160px",maxWidth:"160px",height:"fit-content",borderTopLeftRadius:q||"24px",borderTopRightRadius:q||"24px"},className:"yt-volume-vertical-tier-badge"})),t.createElement("div",{style:{padding:"8px",paddingTop:"0"}},t.createElement(um,{style:{display:"flex",width:"100%",gap:"4px"},className:"yt-volume-vertical-details-container"},t.createElement("div",{style:{display:"flex",alignItems:"center",position:"relative",width:"100%"},className:"yt-volume-vertical-details-title-container"},t.createElement(mm,{style:{fontSize:S?"12px":"14px",lineHeight:"normal"},className:"yt-volume-vertical-details-title"},n.title?n.title:t.createElement(t.Fragment,null,"Buy ",n.minimumQuantity,", Get"," ",n.discountValue,"% Off")),!S&&o&&r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility?t.createElement(pm,{primaryBackgroundColorCta:h===n.tier?H:W,isSelected:h===n.tier,style:{height:"fit-content",fontSize:"10px",lineHeight:"normal",color:i?U:G},className:"yt-volume-vertical-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Dg(u.general.currencySymbol,e.storeCurrencyCode)}${_g(r.discountValue)}`):"",i&&n.imageUrl&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"0px"},className:"yt-volume-vertical-tier-selected-check"},t.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:H,color:U,padding:"2px"}},t.createElement(Zr,{style:{paddingBottom:"1px"},size:20,fontWeight:20})))),t.createElement(fm,{style:{lineHeight:"normal",fontSize:S?"10px":"14px",color:"#666"},className:"yt-volume-vertical-details-subtitle"},n.subtitle?n.subtitle:t.createElement(t.Fragment,null))),t.createElement(gm,{style:{textAlign:"left",marginTop:"4px",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center"},className:"yt-volume-vertical-details-price","data-tier":n.tier,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),"data-savings":o.toFixed(2)},t.createElement(hm,{style:{marginLeft:"0",lineHeight:"normal",marginRight:"8px"},className:"yt-volume-vertical-details-price-discount"},Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(r.discounted.toFixed(2))),o?t.createElement(xm,{style:{lineHeight:"normal"},className:"yt-volume-vertical-details-price-original"},Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(r.original.toFixed(2))):"")),i&&!n.imageUrl&&t.createElement("div",{style:{lineHeight:"normal",position:"absolute",right:"10px",bottom:"10px"},className:"yt-volume-vertical-tier-selected-check"},t.createElement("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:H,color:U,padding:"2px"}},t.createElement(Zr,{style:{paddingBottom:"1px"},size:20,fontWeight:20})))))}))):t.createElement(t.Fragment,null,g.map((n=>{const r=A(n.tier),o=r.original-r.discounted,a=d?.productDetails?.variants?.edges?.find((e=>e.node.id===y));return n.minimumQuantity>a?.node.inventoryQuantity&&u.general.trackInventory?t.createElement(t.Fragment,null):t.createElement(t.Fragment,{key:n.tier},n.badgeTitle&&t.createElement(lm,{primaryTextColorCta:U,primaryBackgroundColorCta:H,style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-badge","data-tier":n.tier,"data-badge-title":n.badgeTitle},n.badgeTitle),t.createElement(cm,{cornerRadiusType:e?.cornerRadiusType??"",key:n.tier,primaryBackgroundColorCta:H??"",isSelected:h===n.tier,onClick:()=>x(n.tier),style:{borderRadius:q},className:"yt-volume-horizontal-tier-container "+(h===n.tier?"yt-volume-horizontal-tier-container-active":""),"data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType,"data-minimum-quantity":n.minimumQuantity,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2)},t.createElement(dm,{cornerRadiusType:e?.cornerRadiusType??"",style:{borderRadius:q,borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px"},className:"yt-volume-horizontal-tier-header"},t.createElement(sm,{className:"yt-volume-horizontal-tier-info"},t.createElement(km,{"data-active":h===n.tier,accentColor:H,className:"yt-volume-horizontal-tier-radio-wrapper"},t.createElement(Em,{name:"tier",checked:h===n.tier,onChange:()=>x(n.tier),className:"yt-volume-horizontal-tier-radio-hidden"}),t.createElement(Tm,{accentColor:H,className:"yt-volume-horizontal-tier-radio-custom"})),t.createElement(um,{className:"yt-volume-horizontal-tier-details"},t.createElement("div",{style:{display:"flex"},className:"yt-volume-horizontal-tier-title-container"},t.createElement(mm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-title"},n.title?n.title:t.createElement(t.Fragment,null,"Buy ",n.minimumQuantity,", Get"," ",n.discountValue,"% Off")),o&&r?.discountValue&&"Enabled"===u.volumeBundle?.discountBadgeVisibility?t.createElement(pm,{primaryBackgroundColorCta:H,isSelected:h===n.tier,style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-save-badge","data-tier":n.tier,"data-discount-value":r.discountValue,"data-discount-type":e?.discountType}," ","percentOff"===e?.discountType?`${r.discountValue}% Off`:`Save ${Dg(u.general.currencySymbol,e.storeCurrencyCode)}${_g(r.discountValue)}`):""),t.createElement(fm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-subtitle"},n.subtitle?n.subtitle:t.createElement(t.Fragment,null)))),t.createElement(gm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-price","data-tier":n.tier,"data-original-price":r.original.toFixed(2),"data-discounted-price":r.discounted.toFixed(2),"data-savings":o.toFixed(2)},o?t.createElement(xm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-original-price"},Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(r.original.toFixed(2))):"",t.createElement(hm,{className:"yt-volume-horizontal-tier-discounted-price"},Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(r.discounted.toFixed(2))))),f&&h===n.tier&&t.createElement(ym,{className:"yt-volume-horizontal-tier-product-grid"},Array.from({length:n.minimumQuantity}).map(((r,o)=>{const a=n.tier-1,i=(C[a]||[])[o]||d.productDetails.options.map((e=>e.values[0]));return t.createElement("div",{key:o,style:{display:"flex",gap:"10px",alignItems:"center",position:"relative"},className:"yt-volume-horizontal-tier-product-item"},t.createElement(Sm,{src:F(d,y,o,n.tier),alt:d?.productDetails?.title,className:"yt-volume-horizontal-tier-product-image"}),"auto"===u?.volumeBundle?.variantSelectorType?t.createElement("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"}},d?.productDetails?.options?.map(((r,l)=>{const c=$?.tier===n.tier&&$?.index===o&&$?.optionIndex===l,s=e?.variantOptions?.options?.find((e=>e.name===r.name));return t.createElement(Dm,{key:l,ref:e=>{_.current[o]||(_.current[o]=[]),_.current[o][l]=e},style:{zIndex:c?1e3:"auto"},isActive:c},t.createElement(Im,{onClick:e=>{e.stopPropagation(),z(c?null:{tier:n.tier,index:o,optionIndex:l})},isActive:c},i[l],t.createElement(Rr,null)),c&&t.createElement(Nm,{style:{zIndex:1001}},r.values.map((e=>{const r=[...i];r[l]=e;const c=!Q(i,l,e),p=d.productDetails.variants.edges.find((({node:e})=>e.title===r.join(" / ")))?.node,u=e=>{if(c)return void e.stopPropagation();k((e=>{const t={...e},n=[...t[a]||[]];return n[o]=r,t[a]=n,t}));const t=p?.id||y;D(n.tier,o,t),z(null)},m=s?.values.find((t=>t.name===e));return"image"===s?.type&&m?.value?t.createElement($m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},t.createElement(zm,{src:m.value,alt:e}),e):"color"===s?.type&&m?.value?t.createElement($m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},t.createElement(_m,{style:{backgroundColor:m.value}}),e):t.createElement($m,{key:e,onClick:u,style:{opacity:c?.5:1,cursor:c?"not-allowed":"pointer"}},e)}))))}))):t.createElement(bm,{style:{display:"flex",flexDirection:"column",gap:"5px"},className:"yt-volume-horizontal-tier-variant-selector"},d?.productDetails?.options.map(((r,l)=>{const c=e.variantOptions?.options?.find((e=>e.name===r.name))||null;return r.values.length<=1?null:t.createElement("div",{key:r.name,style:{width:"100%",display:"flex",flexDirection:"row",gap:"8px",alignItems:"center"},className:"yt-volume-horizontal-tier-variant-option"},t.createElement(vm,{style:{lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-label"},"Select ",r.name,":"),t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",flexWrap:"wrap"},className:"yt-volume-horizontal-tier-variant-values"},r.values.map((e=>{const r=i[l]===e,s=!Q(i,l,e),p=c?.values.find((t=>t.name===e)),m=t=>{if(t.preventDefault(),t.stopPropagation(),s)return;const r=[...i];r[l]=e,k((e=>{const t={...e},n=[...t[a]||[]];return n[o]=r,t[a]=n,t}));const c=r.join(" / "),p=d.productDetails.variants.edges.find((e=>e.node.title===c))?.node.id||y;D(n.tier,o,p)},f={opacity:s?.5:1,cursor:s?"not-allowed":"pointer"};return c&&p?"color"===c.type&&p.value?t.createElement("button",{key:e,onClick:m,style:{...f,borderRadius:"50%",padding:"1px",backgroundColor:"white",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid transparent",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-color-button"},t.createElement("div",{style:{width:r?"24px":"20px",height:r?"24px":"20px",borderRadius:"50%",backgroundColor:p.value,lineHeight:"normal",boxShadow:"rgba(9, 30, 66, 0.25) 0px 4px 8px -2px, rgba(9, 30, 66, 0.08) 0px 0px 0px 2px"}},t.createElement("span",null))):"image"===c.type?t.createElement("button",{key:e,onClick:m,style:{...f,border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"100%",backgroundColor:r?"#F7F7F7":"transparent",padding:"0px",width:r?"20px":"18px",height:r?"20px":"18px",overflow:"hidden"},className:"yt-volume-horizontal-tier-variant-image-button"},t.createElement("img",{src:p.value,alt:e,style:{width:r?"26px":"24px",height:r?"26px":"24px",objectFit:"cover",borderRadius:"100%",aspectRatio:"1/1"}})):t.createElement(wm,{key:e,isSelected:r,onClick:m,style:{...f,padding:"4px 8px",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:r?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"600",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-button-default"},e):t.createElement(wm,{key:e,isSelected:r,onClick:m,disabled:s,style:{...f,padding:"4px 8px",border:r?`1px solid ${u.general?.ctaBackgroundColor||"#121212"}`:"1px solid #E4E4E4",borderRadius:"16px",backgroundColor:r?"#F7F7F7":"transparent",color:"#707070",cursor:"pointer",fontSize:"12px",fontWeight:"600",lineHeight:"normal"},className:"yt-volume-horizontal-tier-variant-button"},e)}))))}))))})))))}))),e?.showCta&&t.createElement(Cm,{bgColor:u.general?.ctaBackgroundColor,textColor:u.general?.ctaTextColor,border:`1px solid ${u.general?.ctaBorderColor||"#121212"}`,shadow:u.general.ctaShadowType,padding:u.general?.ctaPadding,width:u.general?.ctaWidth,hoverProperties:{customizeHoverState:u.general?.customizeHoverState,backgroundColor:u.general?.ctaHoverBackgroundColor,textColor:u.general?.ctaHoverTextColor},onClick:async()=>{try{T(!0);const e=g.find((e=>e.tier===h));if(!e)return;const t={},r=v[e.tier]||{};for(let n=0;n<e.minimumQuantity;n++){const e=r[n]||y;t[e]?t[e].quantity+=1:t[e]={quantity:1}}const o=A(e.tier),a=Array.from({length:e.minimumQuantity},((e,t)=>r[t]||y));n&&await n(o.original,a)}catch(e){console.error("VolumeBundle handleAddToCart error:",e)}finally{T(!1)}},borderRadius:u.general.ctaBorderRadius??"",disabled:E,className:"yt-volume-add-to-cart-button"},E?t.createElement(Vo,{color:"white",loading:E,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement("div",{style:{display:"flex",flexDirection:"row",gap:"8px",justifyContent:"center",alignItems:"center"}},t.createElement("span",null,u.volumeBundle?.ctaTitle??"Add Bundle to Cart")," ","•",t.createElement(Bm,{className:"yt-volume-add-to-cart-button-info"},(()=>{const n=A(h);return t.createElement(t.Fragment,null,Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(n.discounted.toFixed(2))," ",n?.original&&t.createElement("span",{style:{lineHeight:"normal",textDecoration:"line-through",fontWeight:"550"}},Dg(u.general.currencySymbol,e.storeCurrencyCode),_g(n?.original.toFixed(2))," "))})()))))}const Om=x.div`
|
|
3345
3175
|
container-type: inline-size;
|
|
3346
3176
|
border-radius: ${e=>e.borderRadius?e.borderRadius:"8px"};
|
|
3347
3177
|
max-width: 800px;
|
|
3348
3178
|
|
|
3349
3179
|
${e=>e.verticalMargin&&`margin: ${e.verticalMargin} 0;`})}
|
|
3350
|
-
`,
|
|
3180
|
+
`,Am=x.div`
|
|
3351
3181
|
margin-bottom: 16px;
|
|
3352
|
-
`,
|
|
3182
|
+
`,Fm=x.div`
|
|
3353
3183
|
display: flex;
|
|
3354
3184
|
align-items: center;
|
|
3355
3185
|
gap: 8px;
|
|
3356
3186
|
margin-bottom: 4px;
|
|
3357
3187
|
justify-content: ${e=>"left"===e.infoAlignment?"flex-start":"right"===e.infoAlignment?"flex-end":"center"};
|
|
3358
3188
|
flex-direction: row;
|
|
3359
|
-
`,
|
|
3189
|
+
`,Mm=x.span`
|
|
3360
3190
|
font-size: 20px;
|
|
3361
3191
|
font-weight: 700;
|
|
3362
3192
|
color: #000;
|
|
@@ -3364,7 +3194,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3364
3194
|
@media (max-width: 600px) {
|
|
3365
3195
|
font-size: 18px;
|
|
3366
3196
|
}
|
|
3367
|
-
`,
|
|
3197
|
+
`,Rm=x.span`
|
|
3368
3198
|
font-size: 16px;
|
|
3369
3199
|
color: #888;
|
|
3370
3200
|
text-decoration: line-through;
|
|
@@ -3372,7 +3202,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3372
3202
|
@media (max-width: 600px) {
|
|
3373
3203
|
font-size: 14px;
|
|
3374
3204
|
}
|
|
3375
|
-
`,
|
|
3205
|
+
`,Lm=x.span`
|
|
3376
3206
|
font-size: 12px;
|
|
3377
3207
|
background-color: #f3f3f3;
|
|
3378
3208
|
color: #666;
|
|
@@ -3384,7 +3214,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3384
3214
|
font-size: 10px;
|
|
3385
3215
|
padding: 2px 4px;
|
|
3386
3216
|
}
|
|
3387
|
-
`,
|
|
3217
|
+
`,jm=x.p`
|
|
3388
3218
|
font-size: 12px;
|
|
3389
3219
|
color: #666;
|
|
3390
3220
|
margin: 0;
|
|
@@ -3392,7 +3222,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3392
3222
|
@media (max-width: 600px) {
|
|
3393
3223
|
font-size: 10px;
|
|
3394
3224
|
}
|
|
3395
|
-
`,
|
|
3225
|
+
`,Vm=x.div`
|
|
3396
3226
|
display: grid;
|
|
3397
3227
|
grid-template-columns: ${e=>e.gridSize?"repeat("+e.gridSize+", 1fr)":"repeat(3, 1fr)"};
|
|
3398
3228
|
gap: 12px;
|
|
@@ -3406,7 +3236,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3406
3236
|
}
|
|
3407
3237
|
|
|
3408
3238
|
${e=>e.isHorizontal&&"\n display: flex;\n flex-direction: column;\n overflow: hidden;\n gap: 12px;\n \n "}
|
|
3409
|
-
`,
|
|
3239
|
+
`,Hm=x.div`
|
|
3410
3240
|
border: 1px solid #e0e0e0;
|
|
3411
3241
|
border-radius: ${e=>"medium"==e.cornerRadiusType?"6px":"high"==e.cornerRadiusType?"20px":""};
|
|
3412
3242
|
overflow: hidden;
|
|
@@ -3427,14 +3257,14 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3427
3257
|
${e=>e.isHorizontal&&"\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n \n &:hover {\n transform: none;\n }\n "}
|
|
3428
3258
|
|
|
3429
3259
|
${e=>"left"===e.infoAlignment?"align-items: flex-start;":"right"===e.infoAlignment&&e.isHorizontal?"align-items: flex-end; flex-direction: row-reverse;":"align-items: center;"}
|
|
3430
|
-
`,
|
|
3260
|
+
`,Wm=x.img`
|
|
3431
3261
|
width: 100%;
|
|
3432
3262
|
min-height: 180px;
|
|
3433
3263
|
object-fit: cover;
|
|
3434
3264
|
|
|
3435
3265
|
${e=>e.isHorizontal&&"\n height: 90px;\n min-height: 0;\n max-height: 90px;\n max-width: 90px;\n object-fit: cover;\n "}
|
|
3436
3266
|
}
|
|
3437
|
-
`,
|
|
3267
|
+
`,Um=x.div`
|
|
3438
3268
|
padding: 8px;
|
|
3439
3269
|
flex-grow: 1;
|
|
3440
3270
|
justify-content: center;
|
|
@@ -3449,13 +3279,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3449
3279
|
}
|
|
3450
3280
|
|
|
3451
3281
|
${e=>e.isHorizontal&&"\n justify-content: center;\n min-height: 90px;\n text-align: left;\n "}
|
|
3452
|
-
`,
|
|
3282
|
+
`,Gm=x.h4`
|
|
3453
3283
|
font-size: 12px;
|
|
3454
3284
|
font-weight: 500;
|
|
3455
3285
|
margin: 0 0 4px 0;
|
|
3456
3286
|
text-align: center;
|
|
3457
3287
|
color: #333;
|
|
3458
|
-
`,
|
|
3288
|
+
`,qm=x.p`
|
|
3459
3289
|
font-size: 10px;
|
|
3460
3290
|
color: #666;
|
|
3461
3291
|
margin: 0;
|
|
@@ -3464,7 +3294,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3464
3294
|
@media (max-width: 600px) {
|
|
3465
3295
|
font-size: 10px;
|
|
3466
3296
|
}
|
|
3467
|
-
`,
|
|
3297
|
+
`,Ym=x.div`
|
|
3468
3298
|
border: 1px dashed #ccc;
|
|
3469
3299
|
border-radius: 8px;
|
|
3470
3300
|
display: flex;
|
|
@@ -3485,7 +3315,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3485
3315
|
${e=>e.isHorizontal&&"\n flex-direction: row;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n \n &:hover {\n transform: none;\n }\n\n "}
|
|
3486
3316
|
|
|
3487
3317
|
${e=>"left"===e.infoAlignment?"align-items: flex-start;":"right"===e.infoAlignment&&e.isHorizontal?"align-items: flex-end; flex-direction: row-reverse;":"align-items: center;"}
|
|
3488
|
-
`,
|
|
3318
|
+
`,Qm=x.div`
|
|
3489
3319
|
display: flex;
|
|
3490
3320
|
font-size: 26px;
|
|
3491
3321
|
height: 70%;
|
|
@@ -3497,7 +3327,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3497
3327
|
align-items: center;
|
|
3498
3328
|
|
|
3499
3329
|
${e=>e.isHorizontal&&"\n height: 90px;\n min-height: 0;\n width: 100%;\n max-width: 90px;\n font-size: 40px;\n margin-right: 1px;\n border-right: 1px dashed #ccc;\n \n margin-bottom: 0;\n "}
|
|
3500
|
-
`,
|
|
3330
|
+
`,Zm=x.div`
|
|
3501
3331
|
font-size: 12px;
|
|
3502
3332
|
display: flex;
|
|
3503
3333
|
justify-content: center;
|
|
@@ -3513,7 +3343,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3513
3343
|
|
|
3514
3344
|
${e=>e.isHorizontal&&`\n height: 100%;\n font-size: 14px;\n min-height: 90px;\n border-bottom-left-radius: 0;\n border-right: 1px dashed #ccc;\n margin-right: 1px;\n\n ${"right"===e.infoAlignment&&"border-bottom-right-radius: 0;"}`}
|
|
3515
3345
|
}
|
|
3516
|
-
`,
|
|
3346
|
+
`,Km=x.button`
|
|
3517
3347
|
width: 100%;
|
|
3518
3348
|
background-color: ${e=>e.primaryBgColor?e.primaryBgColor:"#e75a87"};
|
|
3519
3349
|
color: ${e=>e.textColor?e.textColor:"white"};
|
|
@@ -3536,7 +3366,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3536
3366
|
}
|
|
3537
3367
|
|
|
3538
3368
|
${e=>e.hoverProperties?.customizeHoverState&&`\n &:hover {\n background: ${e.hoverProperties.backgroundColor||"#dc2626"};\n color: ${e.hoverProperties.textColor||"white"};\n }\n `}
|
|
3539
|
-
`,
|
|
3369
|
+
`,Xm=x.div`
|
|
3540
3370
|
position: fixed;
|
|
3541
3371
|
top: 0;
|
|
3542
3372
|
left: 0;
|
|
@@ -3547,7 +3377,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3547
3377
|
align-items: center;
|
|
3548
3378
|
justify-content: center;
|
|
3549
3379
|
z-index: 1000;
|
|
3550
|
-
`,
|
|
3380
|
+
`,Jm=x.div`
|
|
3551
3381
|
position: relative;
|
|
3552
3382
|
width: 90%;
|
|
3553
3383
|
max-height: 80vh;
|
|
@@ -3570,11 +3400,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3570
3400
|
border-bottom-left-radius: 0;
|
|
3571
3401
|
border-bottom-right-radius: 0;
|
|
3572
3402
|
}
|
|
3573
|
-
`,
|
|
3403
|
+
`,ef=x.div`
|
|
3574
3404
|
display: flex;
|
|
3575
3405
|
align-items: center;
|
|
3576
3406
|
margin-bottom: 16px;
|
|
3577
|
-
`,
|
|
3407
|
+
`,tf=x.input`
|
|
3578
3408
|
flex-grow: 1;
|
|
3579
3409
|
padding: 8px 12px;
|
|
3580
3410
|
border: 1px solid #ddd;
|
|
@@ -3589,7 +3419,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3589
3419
|
font-size: 12px;
|
|
3590
3420
|
padding: 6px 10px;
|
|
3591
3421
|
}
|
|
3592
|
-
`,
|
|
3422
|
+
`,nf=x.button`
|
|
3593
3423
|
background: none;
|
|
3594
3424
|
border: none;
|
|
3595
3425
|
color: #666;
|
|
@@ -3621,11 +3451,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3621
3451
|
border-radius: 10px;
|
|
3622
3452
|
margin-left: 4px;
|
|
3623
3453
|
}
|
|
3624
|
-
`;const
|
|
3454
|
+
`;const rf=x.div`
|
|
3625
3455
|
display: flex;
|
|
3626
3456
|
flex-direction: column;
|
|
3627
3457
|
gap: 12px;
|
|
3628
|
-
`,
|
|
3458
|
+
`,of=x.div`
|
|
3629
3459
|
display: flex;
|
|
3630
3460
|
align-items: center;
|
|
3631
3461
|
padding: 8px;
|
|
@@ -3645,15 +3475,15 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3645
3475
|
@media (max-width: 600px) {
|
|
3646
3476
|
padding: 6px;
|
|
3647
3477
|
}
|
|
3648
|
-
`,
|
|
3478
|
+
`,af=x.img`
|
|
3649
3479
|
width: 50px;
|
|
3650
3480
|
height: 50px;
|
|
3651
3481
|
border-radius: 4px;
|
|
3652
3482
|
object-fit: cover;
|
|
3653
3483
|
margin-right: 12px;
|
|
3654
|
-
`,
|
|
3484
|
+
`,lf=x.div`
|
|
3655
3485
|
flex-grow: 1;
|
|
3656
|
-
`,
|
|
3486
|
+
`,cf=x.h4`
|
|
3657
3487
|
font-size: 14px;
|
|
3658
3488
|
font-weight: 500;
|
|
3659
3489
|
margin: 0 0 4px 0;
|
|
@@ -3668,7 +3498,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3668
3498
|
text-decoration: line-through;
|
|
3669
3499
|
margin-left: 4px;
|
|
3670
3500
|
}
|
|
3671
|
-
`;const
|
|
3501
|
+
`;const df=x.button`
|
|
3672
3502
|
background: ${e=>e.primaryBgColor?e.primaryBgColor+"20":"#e75a87"};
|
|
3673
3503
|
color: ${e=>e.primaryBgColor?e.primaryBgColor:"#e75a87"};
|
|
3674
3504
|
border: none;
|
|
@@ -3687,11 +3517,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3687
3517
|
font-size: 11px;
|
|
3688
3518
|
padding: 5px 10px;
|
|
3689
3519
|
}
|
|
3690
|
-
`,
|
|
3520
|
+
`,sf=x.span`
|
|
3691
3521
|
display: flex;
|
|
3692
3522
|
align-items: center;
|
|
3693
3523
|
gap: 4px;
|
|
3694
|
-
`,
|
|
3524
|
+
`,pf=x.div`
|
|
3695
3525
|
text-align: center;
|
|
3696
3526
|
padding: 20px;
|
|
3697
3527
|
color: #666;
|
|
@@ -3703,11 +3533,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3703
3533
|
font-size: 12px;
|
|
3704
3534
|
font-weight: 500;
|
|
3705
3535
|
margin-bottom: 4px;
|
|
3706
|
-
`;const
|
|
3536
|
+
`;const uf=x.div`
|
|
3707
3537
|
display: flex;
|
|
3708
3538
|
gap: 4px;
|
|
3709
3539
|
flex-wrap: wrap;
|
|
3710
|
-
`,
|
|
3540
|
+
`,mf=x.button`
|
|
3711
3541
|
padding: 6px 12px;
|
|
3712
3542
|
border: 1px solid
|
|
3713
3543
|
${e=>e.isSelected?e.primaryBgColor+"50":"#e5e7eb"};
|
|
@@ -3726,10 +3556,10 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3726
3556
|
font-size: 11px;
|
|
3727
3557
|
padding: 4px 8px;
|
|
3728
3558
|
}
|
|
3729
|
-
`,
|
|
3559
|
+
`,ff=({bundle:e,addToCartFunction:n})=>{const[r,o]=c({}),[a,d]=c(!1),[s,p]=c(0),[u,m]=c(0),[f,g]=c(""),[h,x]=c([]),[y,b]=c({}),[v,w]=c(!1),[C,k]=c(window.innerWidth<450),E=e.mixAndMatchTiers||[],{originalPrice:T,dealPrice:S,offerValue:B}=i((()=>{const t=[];let n=0;Object.values(r).forEach((e=>{e.productId&&e.variantId&&(t.push({productId:e.productId,variantId:e.variantId}),n++)}));let o=0,a=0;for(const{productId:n,variantId:r}of t){const t=e.products.find((e=>e.productId===n));if(!t)continue;const i=t.productDetails.variants.edges.find((e=>e.node.id===r))?.node;if(!i)continue;const l=parseFloat(i.price||"0"),c=parseFloat(i.compareAtPrice||"0");o+=l,a+=c>0?c:l}let i=o;(n===E.length||e?.dealAmount)&&(e?.percentageOff?i=o*(1-e.percentageOff/100):e?.dealAmount?i=e.dealAmount:e?.amountOff&&e.amountOff<o&&(i=o-e.amountOff));const l=a||o,c=l-i;return{originalPrice:l.toFixed(2),dealPrice:i.toFixed(2),offerValue:c.toFixed(2)}}),[e,r,E.length]);l((()=>{p(E.length-Object.keys(r).length)}),[r]),l((()=>{if(!u&&0!==u)return;let t=[...e.products];if(""!==f.trim()){const e=f.toLowerCase();t=t.filter((t=>t.productDetails.title.toLowerCase().includes(e)||t.productDetails.selectedVariant?.displayName?.toLowerCase().includes(e)||t.productDetails.collections?.edges?.some((t=>t.node.title.toLowerCase().includes(e)))))}const n=E[u];if(n){const e=n.products.map((e=>e.productId));t=t.filter((t=>e.includes(t.productId)))}x(t)}),[f,e.products,u,E]);const $=t=>{const n=e.products.find((e=>e.productId===t));return n?.productDetails},z=(t,n)=>{if(null===u&&0!==u)return;const r=n||(t=>{const n=e.products.find((e=>e.productId===t));return n&&n.productDetails.variants.edges.length?n.productDetails.variants.edges[0].node.id:""})(t);o((e=>({...e,[u]:{productId:t,variantId:r}}))),d(!1),g("")},_=t=>{m(t),d(!0),g("");const n=E[t];if(n){const t=n.products.map((e=>e.productId)),r=e.products.filter((e=>t.includes(e.productId)));x(r)}else x([])},D=e=>{const t=r[e];return t?{product:$(t.productId),variantId:t.variantId}:{product:void 0,variantId:""}};l((()=>{const e=()=>{k(window.innerWidth<450)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const I=e.customizations,N=C,P="bundles"==e.appName?e.pageHeader?.title:e?.title,O="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(Om,{verticalMargin:I.comboBundle.verticalMargin,borderRadius:"20px"},I.comboBundle.embedContentVisibility&&t.createElement(Am,null,I.comboBundle?.embedContentVisibility&&I.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Title")&&t.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginBottom:"10px",width:"100%",textAlign:I.comboBundle.infoAlignment||"left"}},t.createElement("h2",{style:{fontSize:"28px",color:I.comboBundle?.titleTextColor||"#000",fontWeight:"bold",lineHeight:"1.6",margin:0}},P)),I.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Price")&&Number(S)>1&&t.createElement(t.Fragment,null,t.createElement(Fm,{infoAlignment:I.comboBundle.infoAlignment},t.createElement(Mm,null,Dg(I.general.currencySymbol,e.storeCurrencyCode),_g(S)),Number(S)<Number(T)&&t.createElement(Rm,{style:{minWidth:"fit-content"}},Dg(I.general.currencySymbol,e.storeCurrencyCode)," ",_g(T)),t.createElement(Lm,{style:{minWidth:"fit-content"}},"In Stock")),t.createElement(jm,{style:{textAlign:I.comboBundle.infoAlignment||"left",fontSize:I.comboBundle.productDescriptionFontSize}},"Tax included. Shipping calculated at checkout."))),t.createElement(Vm,{gridSize:E.length,isHorizontal:N},E.map(((e,n)=>{const o=(e=>!!r[e]&&!!r[e].productId)(n),{product:a,variantId:i}=D(n),l=a?((e,t)=>{if(!e||!e.variants.edges)return null;const n=e.variants.edges.find((e=>e.node.id===t));return n?.node})(a,i):null;return o&&a?t.createElement(Hm,{key:`tier-${n}`,onClick:()=>_(n),style:{borderRadius:"20px"},isHorizontal:N,infoAlignment:I.comboBundle.infoAlignment},t.createElement(Wm,{src:a.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=200&width=200",alt:a.title,style:{aspectRatio:I?.general.imageAspectRatio||"1/1"},isHorizontal:N}),t.createElement(Um,{style:{color:"#1e1e1e",padding:"0",textAlign:"center",...N&&"right"===I.comboBundle.infoAlignment&&{padding:"0 20px",textAlign:"right",alignItems:"flex-end"},...N&&"left"===I.comboBundle.infoAlignment&&{padding:"0 20px",textAlign:"left",alignItems:"flex-start"},...!N&&"left"===I.comboBundle.infoAlignment&&{margin:"0 auto",padding:"0 10px"},...N&&"center"===I.comboBundle.infoAlignment&&{textAlign:"left",alignItems:"flex-start",padding:"0 10px"}},isHorizontal:N},t.createElement(Gm,{style:{margin:"0",fontSize:"14px",fontWeight:"600",lineHeight:"normal"}},a.title),t.createElement(qm,{style:{fontSize:"12px",textAlign:"center",minWidth:"fit-content",lineHeight:"normal"}},l?.displayName||l?.title))):t.createElement(Ym,{key:`tier-${n}`,onClick:()=>_(n),isHorizontal:N,infoAlignment:I.comboBundle.infoAlignment},t.createElement(Qm,{isHorizontal:N},"+"),t.createElement(Zm,{style:{fontSize:"14px",fontWeight:"600",color:I.comboBundle.titleTextColor||"#1e1e1e",...N&&{textAlign:"right"===I.comboBundle.infoAlignment?"right":"left"},lineHeight:"normal"},isHorizontal:N,infoAlignment:I.comboBundle.infoAlignment},t.createElement("p",{style:{width:"80%",margin:"0"}},e.title?`${e.title}`:`Select Product ${n+1}`)))}))),t.createElement(Km,{hoverProperties:{customizeHoverState:I.general.customizeHoverState,backgroundColor:I.general.ctaHoverBackgroundColor,textColor:I.general.ctaHoverTextColor},borderRadius:I.general.ctaBorderRadius,primaryBgColor:I.general.ctaBackgroundColor,onClick:async()=>{w(!0);try{if(s>0)return console.log("returing"),void w(!1);const e=Object.entries(r).map((([e,t])=>t.variantId));await n(e,Number(T),Number(S))}catch(e){console.log(e)}finally{w(!1)}},textColor:I.general.ctaTextColor,borderColor:I.general.ctaBorderColor},0===s?v?t.createElement(Vo,{color:"white",loading:v,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,I.comboBundle.ctaTitle||"Add Bundle to cart"):`Add ${s} more item(s)`),I.comboBundle?.embedContentVisibility&&I.comboBundle?.selectedEmbedContentVisibilityOptions?.includes("Combo Description")&&t.createElement("div",{style:{margin:"20px 0px"}},t.createElement("h4",{style:{fontSize:"16px",color:I.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",margin:0,padding:"8px",backgroundColor:I.general.primaryColor+"20",textAlign:I.comboBundle.infoAlignment||"left"}},"Description"),t.createElement("div",{style:{fontSize:I.comboBundle.productDescriptionFontSize||"16px",color:I.comboBundle?.descriptionTextColor||"#000",lineHeight:"1.2",padding:"8px",backgroundColor:I.general.primaryColor+"08",textAlign:I.comboBundle.infoAlignment||"left"}},t.createElement("p",null,O))),a&&t.createElement(Xm,{onClick:()=>d(!1)},t.createElement(Jm,{onClick:e=>e.stopPropagation()},t.createElement(ef,null,t.createElement(tf,{placeholder:"Search",value:f,onChange:e=>{g(e.target.value)}}),t.createElement(nf,{onClick:()=>d(!1)},"Cancel")),t.createElement(rf,null,h.length>0?h.map((n=>{const a=n.productDetails,i=(e=>{if(null===u&&0!==u)return!1;const t=r[u];return!!t&&t.productId===e})(n.productId);D(u);let l=a.variants.edges[0].node.id;return l=i&&null!==u?r[u]?.variantId||l:y[n.productId]||(a.variants.edges.length>0?a.variants.edges[0].node.id:""),t.createElement(of,{primaryBgColor:I.general.primaryColor||"#1e1e1e",key:a.id,isSelected:i,onClick:()=>{z(n.productId,l)}},t.createElement(af,{src:a.featuredMedia?.preview?.image?.url||"/placeholder.svg?height=50&width=50",alt:a.title}),t.createElement(lf,null,t.createElement(cf,null,a.title),t.createElement(uf,null,a.variants.edges.map((({node:e})=>e.inventoryQuantity>0&&t.createElement(mf,{primaryBgColor:I.general?.primaryColor||"#1e1e1e",disabled:!!i,key:e.id,isSelected:l===e.id,tierHasProductId:!!i,onClick:t=>{var r,o;t.stopPropagation(),r=n.productId,o=e.id,b((e=>({...e,[r]:o})))}},e.title))))),t.createElement(df,{cornerRadiusType:e?.cornerRadiusType??"",primaryBgColor:I.general?.primaryColor||"#1e1e1e",onClick:()=>{return i?(e=u||0,o((t=>{const n={...t};return delete n[e],n})),void b({})):z(n.productId,l);var e}},i?t.createElement(sf,null,"Added"):" + Add"))})):t.createElement(pf,null,'No products found matching "',f,'"')))))},gf=x.div`
|
|
3730
3560
|
border-radius: 8px;
|
|
3731
3561
|
container-type: inline-size;
|
|
3732
|
-
`,
|
|
3562
|
+
`,hf=x.div`
|
|
3733
3563
|
background-color: #ff4da6;
|
|
3734
3564
|
color: white;
|
|
3735
3565
|
padding: 10px;
|
|
@@ -3738,19 +3568,19 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3738
3568
|
border-radius: 4px;
|
|
3739
3569
|
font-size: 14px;
|
|
3740
3570
|
line-height: normal;
|
|
3741
|
-
`,
|
|
3571
|
+
`,xf=x.div`
|
|
3742
3572
|
text-align: center;
|
|
3743
3573
|
color: #777;
|
|
3744
3574
|
font-size: 16px;
|
|
3745
3575
|
margin: 8px 0;
|
|
3746
3576
|
line-height: normal;
|
|
3747
|
-
`,
|
|
3577
|
+
`,yf=x.div`
|
|
3748
3578
|
display: flex;
|
|
3749
3579
|
flex-direction: column;
|
|
3750
3580
|
gap: 5px;
|
|
3751
3581
|
margin: 10px 0px;
|
|
3752
3582
|
padding: 5px
|
|
3753
|
-
`,
|
|
3583
|
+
`,bf=x.div`
|
|
3754
3584
|
display: flex;
|
|
3755
3585
|
border: 1px solid #eee;
|
|
3756
3586
|
border-radius: 8px;
|
|
@@ -3758,27 +3588,27 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3758
3588
|
align-items: center;
|
|
3759
3589
|
background-color: white;
|
|
3760
3590
|
width: 100%;
|
|
3761
|
-
`,
|
|
3591
|
+
`,vf=x.img`
|
|
3762
3592
|
width: 100px;
|
|
3763
3593
|
object-fit: cover;
|
|
3764
3594
|
border-radius: 4px;
|
|
3765
3595
|
margin-right: 12px;
|
|
3766
3596
|
aspect-ratio: 1/1;
|
|
3767
|
-
`,
|
|
3597
|
+
`,wf=x.div`
|
|
3768
3598
|
flex: 1;
|
|
3769
|
-
`,
|
|
3599
|
+
`,Cf=x.div`
|
|
3770
3600
|
font-weight: 500;
|
|
3771
3601
|
font-size: 16px;
|
|
3772
3602
|
margin-bottom: 4px;
|
|
3773
3603
|
line-height: normal;
|
|
3774
|
-
`,
|
|
3604
|
+
`,kf=x.div`
|
|
3775
3605
|
font-size: 14px;
|
|
3776
3606
|
margin-bottom: 6px;
|
|
3777
3607
|
font-weight: bold;
|
|
3778
3608
|
line-height: normal;
|
|
3779
|
-
`,
|
|
3609
|
+
`,Ef=x.span`
|
|
3780
3610
|
color: #000;
|
|
3781
|
-
`,
|
|
3611
|
+
`,Tf=x.span`
|
|
3782
3612
|
text-decoration: line-through;
|
|
3783
3613
|
color: #999;
|
|
3784
3614
|
margin-left: 6px;
|
|
@@ -3788,7 +3618,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3788
3618
|
font-size: 10px;
|
|
3789
3619
|
margin-left: 2px;
|
|
3790
3620
|
}
|
|
3791
|
-
|
|
3621
|
+
`,Sf=x.div`
|
|
3792
3622
|
font-size: 14px;
|
|
3793
3623
|
width: 100%;
|
|
3794
3624
|
display: flex;
|
|
@@ -3798,11 +3628,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3798
3628
|
gap: 10px;
|
|
3799
3629
|
color: #2e2e2e;
|
|
3800
3630
|
line-height: normal;
|
|
3801
|
-
`,
|
|
3631
|
+
`,Bf=x.div`
|
|
3802
3632
|
margin-top: 10px;
|
|
3803
3633
|
font-size: 14px;
|
|
3804
3634
|
line-height: normal;
|
|
3805
|
-
|
|
3635
|
+
`,$f=x.div`
|
|
3806
3636
|
font-size: 20px;
|
|
3807
3637
|
display: flex;
|
|
3808
3638
|
flex-direction: row;
|
|
@@ -3813,15 +3643,15 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3813
3643
|
@media (max-width: 480px) {
|
|
3814
3644
|
font-size: 18px;
|
|
3815
3645
|
}
|
|
3816
|
-
`,
|
|
3646
|
+
`,zf=x.span`
|
|
3817
3647
|
font-weight: 600;
|
|
3818
|
-
`,
|
|
3648
|
+
`,_f=x.span`
|
|
3819
3649
|
background-color: red;
|
|
3820
3650
|
color: white;
|
|
3821
3651
|
font-weight: bold;
|
|
3822
3652
|
font-size: 13px;
|
|
3823
3653
|
padding: 3px 6px;
|
|
3824
|
-
`,
|
|
3654
|
+
`,Df=x.button`
|
|
3825
3655
|
width: 100%;
|
|
3826
3656
|
margin-top: 12px;
|
|
3827
3657
|
padding: 12px;
|
|
@@ -3855,7 +3685,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3855
3685
|
`,x.span`
|
|
3856
3686
|
font-size: 14px;
|
|
3857
3687
|
margin-left: 6px;
|
|
3858
|
-
`;const
|
|
3688
|
+
`;const If=x.div`
|
|
3859
3689
|
border-radius: 8px;
|
|
3860
3690
|
container-type: inline-size;
|
|
3861
3691
|
margin-top: 10px;
|
|
@@ -3874,7 +3704,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3874
3704
|
font-size: 14px;
|
|
3875
3705
|
margin: 6px 0 16px;
|
|
3876
3706
|
line-height: normal;
|
|
3877
|
-
`;const
|
|
3707
|
+
`;const Nf=x.div`
|
|
3878
3708
|
display: flex;
|
|
3879
3709
|
flex-direction: row;
|
|
3880
3710
|
align-items: stretch;
|
|
@@ -3883,7 +3713,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3883
3713
|
padding: 0;
|
|
3884
3714
|
flex-wrap: wrap;
|
|
3885
3715
|
overflow: hidden;
|
|
3886
|
-
`,
|
|
3716
|
+
`,Pf=x.div`
|
|
3887
3717
|
flex: 0 0 auto;
|
|
3888
3718
|
width: ${({productsLength:e})=>`calc((100% - ${e-1} * 37px - 8px) / ${e})`};
|
|
3889
3719
|
border: 1px solid #ccc;
|
|
@@ -3903,9 +3733,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3903
3733
|
@container (max-width: 480px) {
|
|
3904
3734
|
width: ${({productsLength:e})=>`calc((100% - ${e-1} * 20px - 8px) / ${e})`};
|
|
3905
3735
|
}
|
|
3906
|
-
`,
|
|
3736
|
+
`,Of=x.div`
|
|
3907
3737
|
position: relative;
|
|
3908
|
-
`,
|
|
3738
|
+
`,Af=x.img`
|
|
3909
3739
|
width: 100%;
|
|
3910
3740
|
aspect-ratio: 1/1;
|
|
3911
3741
|
object-fit: cover;
|
|
@@ -3939,7 +3769,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3939
3769
|
&:hover {
|
|
3940
3770
|
transform: scale(1.1);
|
|
3941
3771
|
}
|
|
3942
|
-
`;const
|
|
3772
|
+
`;const Ff=x.div`
|
|
3943
3773
|
position: absolute;
|
|
3944
3774
|
bottom: 10px;
|
|
3945
3775
|
left: 6px;
|
|
@@ -3966,7 +3796,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3966
3796
|
cursor: pointer;
|
|
3967
3797
|
background-color: #ffffff60;
|
|
3968
3798
|
}
|
|
3969
|
-
`,
|
|
3799
|
+
`,Mf=x.div`
|
|
3970
3800
|
width: 14px;
|
|
3971
3801
|
height: 14px;
|
|
3972
3802
|
border-radius: 50%;
|
|
@@ -3980,7 +3810,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3980
3810
|
width: 12px;
|
|
3981
3811
|
height: 12px;
|
|
3982
3812
|
}
|
|
3983
|
-
`,
|
|
3813
|
+
`,Rf=x.div`
|
|
3984
3814
|
width: 14px;
|
|
3985
3815
|
height: 14px;
|
|
3986
3816
|
border-radius: 50%;
|
|
@@ -3995,7 +3825,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
3995
3825
|
width: 12px;
|
|
3996
3826
|
height: 12px;
|
|
3997
3827
|
}
|
|
3998
|
-
`,
|
|
3828
|
+
`,Lf=x.div`
|
|
3999
3829
|
border-radius: 20px;
|
|
4000
3830
|
font-size: 10px;
|
|
4001
3831
|
font-weight: 600;
|
|
@@ -4005,7 +3835,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4005
3835
|
color: #333;
|
|
4006
3836
|
|
|
4007
3837
|
line-height: normal;
|
|
4008
|
-
`,
|
|
3838
|
+
`,jf=x.div`
|
|
4009
3839
|
padding: 6px;
|
|
4010
3840
|
text-align: left;
|
|
4011
3841
|
min-height: 40px;
|
|
@@ -4021,7 +3851,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4021
3851
|
@container (max-width: 480px) {
|
|
4022
3852
|
padding: 4px;
|
|
4023
3853
|
}
|
|
4024
|
-
`,
|
|
3854
|
+
`,Vf=x.div`
|
|
4025
3855
|
font-size: 14px;
|
|
4026
3856
|
font-weight: 500;
|
|
4027
3857
|
margin: 4px 0;
|
|
@@ -4035,7 +3865,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4035
3865
|
font-size: 12px;
|
|
4036
3866
|
margin: 2px 0;
|
|
4037
3867
|
}
|
|
4038
|
-
`,
|
|
3868
|
+
`,Hf=x.div`
|
|
4039
3869
|
font-weight: bold;
|
|
4040
3870
|
line-height: normal;
|
|
4041
3871
|
|
|
@@ -4044,7 +3874,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4044
3874
|
@container (max-width: 480px) {
|
|
4045
3875
|
font-size: 12px;
|
|
4046
3876
|
}
|
|
4047
|
-
`,
|
|
3877
|
+
`,Wf=x.div`
|
|
4048
3878
|
display: flex;
|
|
4049
3879
|
align-items: center;
|
|
4050
3880
|
font-size: 14px;
|
|
@@ -4072,9 +3902,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4072
3902
|
font-size: 16px;
|
|
4073
3903
|
font-weight: bold;
|
|
4074
3904
|
cursor: pointer;
|
|
4075
|
-
`;const
|
|
3905
|
+
`;const Uf=x.div`
|
|
4076
3906
|
position: relative;
|
|
4077
|
-
`;x(
|
|
3907
|
+
`;x(Uf)`
|
|
4078
3908
|
&:nth-child(2n) {
|
|
4079
3909
|
@media (max-width: 768px) {
|
|
4080
3910
|
display: none;
|
|
@@ -4092,7 +3922,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4092
3922
|
display: none;
|
|
4093
3923
|
}
|
|
4094
3924
|
}
|
|
4095
|
-
`;const
|
|
3925
|
+
`;const Gf=x.div`
|
|
4096
3926
|
flex: 0 0 auto;
|
|
4097
3927
|
max-width: 20px;
|
|
4098
3928
|
font-size: 32px;
|
|
@@ -4117,11 +3947,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4117
3947
|
color: #717171;
|
|
4118
3948
|
z-index: 2;
|
|
4119
3949
|
}
|
|
4120
|
-
`,
|
|
3950
|
+
`,qf=x.div`
|
|
4121
3951
|
position: relative;
|
|
4122
3952
|
display: inline-block;
|
|
4123
3953
|
min-width: 100px;
|
|
4124
|
-
`,
|
|
3954
|
+
`,Yf=x.div`
|
|
4125
3955
|
display: flex;
|
|
4126
3956
|
align-items: center;
|
|
4127
3957
|
justify-content: space-between;
|
|
@@ -4139,7 +3969,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4139
3969
|
@container (max-width: 480px) {
|
|
4140
3970
|
padding: 4px 6px;
|
|
4141
3971
|
}
|
|
4142
|
-
`,
|
|
3972
|
+
`,Qf=x.div`
|
|
4143
3973
|
display: flex;
|
|
4144
3974
|
align-items: center;
|
|
4145
3975
|
gap: 6px;
|
|
@@ -4149,11 +3979,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4149
3979
|
&:hover {
|
|
4150
3980
|
cursor: pointer;
|
|
4151
3981
|
}
|
|
4152
|
-
`,
|
|
3982
|
+
`,Zf=x((function(e){return I({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.293 9.293 12 13.586 7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z"},child:[]}]})(e)}))`
|
|
4153
3983
|
font-size: 14px;
|
|
4154
3984
|
transition: transform 0.2s ease;
|
|
4155
3985
|
transform: ${({$isOpen:e})=>e?"rotate(180deg)":"rotate(0deg)"};
|
|
4156
|
-
`,
|
|
3986
|
+
`,Kf=x.div`
|
|
4157
3987
|
position: absolute;
|
|
4158
3988
|
top: 100%;
|
|
4159
3989
|
left: 0;
|
|
@@ -4165,7 +3995,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4165
3995
|
z-index: 1000;
|
|
4166
3996
|
max-height: 200px;
|
|
4167
3997
|
overflow-y: auto;
|
|
4168
|
-
`,
|
|
3998
|
+
`,Xf=x.div`
|
|
4169
3999
|
display: flex;
|
|
4170
4000
|
align-items: center;
|
|
4171
4001
|
padding: 8px;
|
|
@@ -4178,9 +4008,9 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4178
4008
|
&:hover {
|
|
4179
4009
|
background-color: ${({$isSelected:e})=>e?"#F7F7F7":"#F9F9F9"};
|
|
4180
4010
|
}
|
|
4181
|
-
`,
|
|
4011
|
+
`,Jf=x.span`
|
|
4182
4012
|
font-weight: 500;
|
|
4183
|
-
`,
|
|
4013
|
+
`,eg=x.div`
|
|
4184
4014
|
width: 14px;
|
|
4185
4015
|
height: 14px;
|
|
4186
4016
|
border-radius: 50%;
|
|
@@ -4188,7 +4018,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4188
4018
|
border: 1px solid #e4e4e4;
|
|
4189
4019
|
flex-shrink: 0;
|
|
4190
4020
|
line-height: normal;
|
|
4191
|
-
`,
|
|
4021
|
+
`,tg=x.img`
|
|
4192
4022
|
width: 16px;
|
|
4193
4023
|
height: 16px;
|
|
4194
4024
|
border-radius: 50%;
|
|
@@ -4196,14 +4026,14 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4196
4026
|
border: 1px solid #e4e4e4;
|
|
4197
4027
|
flex-shrink: 0;
|
|
4198
4028
|
line-height: normal;
|
|
4199
|
-
`,
|
|
4029
|
+
`,ng=x.div`
|
|
4200
4030
|
display: flex;
|
|
4201
4031
|
flex-direction: row;
|
|
4202
4032
|
gap: 5px;
|
|
4203
4033
|
align-items: center;
|
|
4204
4034
|
|
|
4205
4035
|
flex-wrap: wrap;
|
|
4206
|
-
`,
|
|
4036
|
+
`,rg=x.div`
|
|
4207
4037
|
display: flex;
|
|
4208
4038
|
flex-direction: row;
|
|
4209
4039
|
gap: 8px;
|
|
@@ -4219,15 +4049,15 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4219
4049
|
@media (max-width: 600px) {
|
|
4220
4050
|
display: none;
|
|
4221
4051
|
}
|
|
4222
|
-
`;const
|
|
4052
|
+
`;const og=x.div`
|
|
4223
4053
|
position: absolute;
|
|
4224
4054
|
z-index: 2;
|
|
4225
4055
|
display: flex;
|
|
4226
4056
|
align-items: center;
|
|
4227
4057
|
justify-content: center;
|
|
4228
|
-
`,
|
|
4058
|
+
`,ag=x.input`
|
|
4229
4059
|
display: none;
|
|
4230
|
-
`,
|
|
4060
|
+
`,ig=x.label.attrs({className:"yt-fixed-bundle-checkbox-label"})`
|
|
4231
4061
|
width: 18px;
|
|
4232
4062
|
height: 18px;
|
|
4233
4063
|
border: 1.5px solid ${({borderColor:e})=>e+"80"||"#ccc"};
|
|
@@ -4244,13 +4074,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4244
4074
|
font-size: 14px;
|
|
4245
4075
|
visibility: ${({isChecked:e})=>e?"visible":"hidden"};
|
|
4246
4076
|
}
|
|
4247
|
-
`,
|
|
4077
|
+
`,lg=x.div`
|
|
4248
4078
|
|
|
4249
|
-
`,
|
|
4079
|
+
`,cg=x(og)`
|
|
4250
4080
|
top: ${({isImage:e})=>e?"0px":"10px"} !important;
|
|
4251
4081
|
left: ${({isImage:e})=>e?"0px":"10px"} !important;
|
|
4252
4082
|
position: ${({isImage:e})=>e?"relative":"absolute"} !important
|
|
4253
|
-
`,
|
|
4083
|
+
`,dg=x.div`
|
|
4254
4084
|
position: fixed;
|
|
4255
4085
|
top: 0;
|
|
4256
4086
|
left: 0;
|
|
@@ -4263,7 +4093,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4263
4093
|
display: flex;
|
|
4264
4094
|
align-items: center;
|
|
4265
4095
|
justify-content: center;
|
|
4266
|
-
`,
|
|
4096
|
+
`,sg=x.div`
|
|
4267
4097
|
background: white;
|
|
4268
4098
|
border-radius: 20px;
|
|
4269
4099
|
width: fit-content;
|
|
@@ -4279,7 +4109,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4279
4109
|
max-width: 80vw;
|
|
4280
4110
|
min-width: 80vw;
|
|
4281
4111
|
}
|
|
4282
|
-
`,
|
|
4112
|
+
`,pg=x.div`
|
|
4283
4113
|
width: 100%;
|
|
4284
4114
|
padding: 8px;
|
|
4285
4115
|
font-weight: 600;
|
|
@@ -4289,7 +4119,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4289
4119
|
|
|
4290
4120
|
text-align: center;
|
|
4291
4121
|
padding: 10px 0;
|
|
4292
|
-
`,
|
|
4122
|
+
`,ug=x.button`
|
|
4293
4123
|
width: 100%;
|
|
4294
4124
|
font-size: 14px;
|
|
4295
4125
|
font-weight: 600;
|
|
@@ -4302,25 +4132,25 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4302
4132
|
border: none;
|
|
4303
4133
|
|
|
4304
4134
|
cursor: pointer;
|
|
4305
|
-
`,
|
|
4135
|
+
`,mg=x.div`
|
|
4306
4136
|
display: flex;
|
|
4307
4137
|
align-items: center;
|
|
4308
4138
|
gap: 12px;
|
|
4309
4139
|
|
|
4310
4140
|
padding: 10px;
|
|
4311
|
-
`,
|
|
4141
|
+
`,fg=x.img`
|
|
4312
4142
|
width: 70px;
|
|
4313
4143
|
height: 70px;
|
|
4314
4144
|
border-radius: 8px;
|
|
4315
4145
|
object-fit: cover;
|
|
4316
|
-
`,
|
|
4146
|
+
`,gg=x.div`
|
|
4317
4147
|
display: flex;
|
|
4318
4148
|
flex-direction: column;
|
|
4319
4149
|
height: 100%;
|
|
4320
4150
|
justify-content: center;
|
|
4321
4151
|
|
|
4322
4152
|
gap: 4px;
|
|
4323
|
-
`,
|
|
4153
|
+
`,hg=x.div`
|
|
4324
4154
|
font-size: 14px;
|
|
4325
4155
|
font-weight: 600;
|
|
4326
4156
|
margin-bottom: 4px;
|
|
@@ -4331,11 +4161,11 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4331
4161
|
align-items: center;
|
|
4332
4162
|
flex-wrap: wrap;
|
|
4333
4163
|
gap: 4px;
|
|
4334
|
-
`,
|
|
4164
|
+
`,xg=x.hr`
|
|
4335
4165
|
margin: 0;
|
|
4336
4166
|
border: none;
|
|
4337
4167
|
border-top: 1px solid #d3d3d3;
|
|
4338
|
-
`,
|
|
4168
|
+
`,yg=x.span`
|
|
4339
4169
|
font-size: 10px;
|
|
4340
4170
|
color: #777;
|
|
4341
4171
|
margin-left: 4px;
|
|
@@ -4345,13 +4175,13 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4345
4175
|
font-weight: 600;
|
|
4346
4176
|
border: 1px solid lightgray;
|
|
4347
4177
|
border-radius: 10px;
|
|
4348
|
-
`,
|
|
4178
|
+
`,bg=x.div`
|
|
4349
4179
|
display: flex;
|
|
4350
4180
|
flex-wrap: wrap;
|
|
4351
4181
|
gap: 6px;
|
|
4352
4182
|
|
|
4353
4183
|
align-items: center;
|
|
4354
|
-
`,
|
|
4184
|
+
`,vg=x.div`
|
|
4355
4185
|
width: 18px;
|
|
4356
4186
|
height: 18px;
|
|
4357
4187
|
border-radius: 50%;
|
|
@@ -4367,7 +4197,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4367
4197
|
&:hover {
|
|
4368
4198
|
cursor: pointer;
|
|
4369
4199
|
}
|
|
4370
|
-
`,
|
|
4200
|
+
`,wg=x.span`
|
|
4371
4201
|
font-size: 10px;
|
|
4372
4202
|
color: #777;
|
|
4373
4203
|
padding: 2px 4px;
|
|
@@ -4381,7 +4211,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4381
4211
|
cursor: pointer;
|
|
4382
4212
|
background-color: #f3f3f35f;
|
|
4383
4213
|
}
|
|
4384
|
-
`,
|
|
4214
|
+
`,Cg=x.img`
|
|
4385
4215
|
width: 16px;
|
|
4386
4216
|
height: 16px;
|
|
4387
4217
|
border-radius: 50%;
|
|
@@ -4392,6 +4222,6 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
4392
4222
|
&:hover {
|
|
4393
4223
|
cursor: pointer;
|
|
4394
4224
|
}
|
|
4395
|
-
`,
|
|
4225
|
+
`,kg=x.span`
|
|
4396
4226
|
font-size: 12px;
|
|
4397
|
-
`,Sg=({products:e,isOpen:n,onClose:r,cta:o,variantOptions:a,onVariantChange:i,handleAddToCart:l})=>{const[d,s]=c((()=>{const t={};return e.forEach((({productId:e,productDetails:n})=>{const r=n.options.map((e=>e.values[0]??""));t[e]=r})),t})),[p,u]=c({}),m=(t,n,r)=>{const o={...d};o[t][r]=n,s(o);const a=e.find((e=>e.productId===t));if(!a?.productDetails)return;const l=a.productDetails.variants.edges.find((e=>e.node.title===o[t].join(" / ")))?.node;l&&(i(t,l.id),u((e=>({...e,[t]:{node:l}}))))};if(!n)return null;const f=t.createElement(pg,{className:"yt-fixedBundle-variant-modal_overlay",onClick:r},t.createElement(ug,{className:"yt-fixedBundle-variant-modal_container",onClick:e=>e.stopPropagation()},t.createElement(mg,{className:"yt-fixedBundle-variant-modal_header",style:{backgroundColor:o.backgroundColor,color:o.textColor}},"Select Options"),e?.map(((n,r)=>t.createElement(t.Fragment,null,t.createElement(gg,{className:"yt-fixedBundle-variant-modal_product-block"},t.createElement(hg,{className:"yt-fixedBundle-variant-modal_thumbnail",src:p[n.productId]?.node?.image.url||n.productDetails.featuredMedia?.preview?.image?.url,alt:n.productDetails.title}),t.createElement(xg,{className:"yt-fixedBundle-variant-modal_product-info"},t.createElement(yg,{className:"yt-fixedBundle-variant-modal_product-name"},n.productDetails.title,n.productDetails.variants.edges.length>1&&t.createElement(vg,{className:"yt-fixedBundle-variant-modal_selected-value"},d[n.productId].join(" / "))),n.productDetails.options.map(((e,r)=>{const o=a&&a?.options?.find((t=>t.name===e.name));return e.values.length<=1?t.createElement(t.Fragment,null):o&&"color"===o?.type?t.createElement(wg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Tg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(Cg,{className:"yt-fixedBundle-variant-modal_color-swatch",key:a,color:o.values.find((t=>t.name===e))?.value||e,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},t.createElement("span",null)):t.createElement(kg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))):o&&"image"===o?.type?t.createElement(wg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Tg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(Eg,{className:"yt-fixedBundle-variant-modal_image-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)},src:o.values.find((t=>t.name===e))?.value},t.createElement("span",null)):t.createElement(kg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))):t.createElement(wg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(Tg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,o)=>t.createElement(kg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:o,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))})))),r<e.length-1&&t.createElement(bg,{className:"yt-fixedBundle-variant-modal_divider"})))),t.createElement(fg,{className:"yt-fixedBundle-variant-modal_confirm-button",style:{backgroundColor:o.backgroundColor,color:o.textColor},onClick:l},"Add bundle to cart")));return v.createPortal(f,document.body)},Bg=({options:e,selectedValue:n,onChange:r,type:a="text"})=>{const[i,d]=c(!1),s=o(null);l((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]);const p=e=>"color"===a?t.createElement(ng,{className:"yt-fixedBundle-variant-dropdown-horizontal_color-swatch",$color:e.value},t.createElement("span",null)):"image"===a?t.createElement(rg,{className:"yt-fixedBundle-variant-dropdown-horizontal_image-swatch",src:e.value||"/placeholder.svg",alt:e.name},t.createElement("span",null)):null;return t.createElement(Qf,{className:"yt-fixedBundle-variant-dropdown-horizontal_container",ref:s},t.createElement(Zf,{className:"yt-fixedBundle-variant-dropdown-horizontal_header",onClick:()=>d(!i)},t.createElement(Kf,{className:"yt-fixedBundle-variant-dropdown-horizontal_content"},n&&("color"===a||"image"===a)&&p(n),t.createElement("span",{className:"yt-fixedBundle-variant-dropdown-horizontal_selected-text"},n&&n.name)),t.createElement(Xf,{className:"yt-fixedBundle-variant-dropdown-horizontal_chevron-icon",$isOpen:i})),i&&t.createElement(Jf,{className:"yt-fixedBundle-variant-dropdown-horizontal_list"},e?.map((e=>t.createElement(eg,{className:"yt-fixedBundle-variant-dropdown-horizontal_item",key:e.name,$isSelected:n?.name===e.name,onClick:()=>{r(e),d(!1)}},("color"===a||"image"===a)&&p(e),t.createElement(tg,{className:"yt-fixedBundle-variant-dropdown-horizontal_item-text"},e.name))))))},$g=({product:e,variantOptions:n,selectedVariants:r,onVariantChange:o})=>{const[a,i]=c(r||[]),l=e=>{if(!n?.options)return"text";const t=n.options.find((t=>t.name===e));return t?.type||"text"},d=(e,t)=>{if(!n?.options)return e.values.map((e=>({name:e,value:e})));const r=n.options.find((t=>t.name===e.name));return e.values.map((e=>{const t=r?.values?.find((t=>t.name===e));return{name:e,value:t?.value||e}}))},s=(e,t)=>{const n=a[t];if(!n)return null;return d(e).find((e=>e.name===n))||null};return t.createElement(og,{className:"yt-fixedBundle-variant-selector-horizontal_container"},e.options.map(((n,r)=>t.createElement(ag,{className:"yt-fixedBundle-variant-selector-horizontal_option-row",key:n.name,$isFirst:0===r},n?.values?.length>1&&t.createElement(Bg,{options:d(n),selectedValue:s(n,r),onChange:t=>{console.log(t),((t,n)=>{const r=[...a];r[t]=n.name,i(r);const l=e.variants.edges.find((n=>n.node.title===(e.options?.length>0?r.join(" / "):r[t])))?.node.id;o(l||"")})(r,t)},type:l(n.name)})))))},zg=({product:e,selectedVariantId:n,isChecked:r,canCustomize:o,styles:a,onVariantChange:i,onCheckChange:l,isMobile:d,isHorizontal:s,index:p,variantOptions:u,productsLength:m,handleOpenModal:f,storeCurrencyCode:g,primaryProductId:h})=>{const[x]=c(e.options?.map((e=>e.values[0]))||[]),y=e.variants.edges.find((e=>e.node.id===n))?.node,b=e.id===h,v="undefined"!=typeof window&&"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain||"usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain;return t.createElement(t.Fragment,null,s?t.createElement("div",{className:""+(e.id===h?"yt-fixedBundle-product-card--horizontal-primary":"yt-fixedBundle-product-card--horizontal-associated"),style:{display:"flex",alignItems:"center",gap:"10px",backgroundColor:a.fixedBundle?.cardBackgroundColor}},o&&t.createElement(dg,{className:"yt-fixedBundle-product-card_checkbox-wrapper--horizontal"},t.createElement(lg,{className:"yt-fixedBundle-product-card_checkbox-hidden",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}`,defaultChecked:r,onChange:e=>l(e.target.checked),disabled:b}),t.createElement(cg,{className:"yt-fixedBundle-product-card_checkbox-label",htmlFor:`checkbox-${e.id}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(tt,null))),t.createElement(wf,{className:"yt-fixedBundle-product-card-horizontal_item",style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}80`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`8px 8px 8px -6px ${a.fixedBundle.borderColor}`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}80`}[a.fixedBundle.shadowType]||"none"},canCustomize:o},"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Cf,{className:"yt-fixedBundle-product-card-horizontal_image",src:y?.image?.url||e.featuredMedia?.preview?.image?.url,alt:e.title,style:{borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,aspectRatio:a.general.imageAspectRatio||"1/1",borderTopRightRadius:"0",borderBottomRightRadius:"0"}}),t.createElement(kf,{className:"yt-fixedBundle-product-card-horizontal_details"},t.createElement(Ef,{className:"yt-fixedBundle-product-card-horizontal_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Tf,{className:"yt-fixedBundle-product-card-horizontal_price-section"},t.createElement(Sf,{className:"yt-fixedBundle-product-card-horizontal_price--new"},Ng(a.general.currencySymbol,g)," ",Ig(y?.price)),a.fixedBundle.compareAtPriceVisibility&&y?.compareAtPrice&&parseFloat(y.compareAtPrice)>parseFloat(y?.price)&&t.createElement(Bf,{className:"yt-fixedBundle-product-card-horizontal_price--old"},Ng(a.general.currencySymbol,g),Ig(y?.compareAtPrice))),t.createElement($g,{product:e,variantOptions:u,selectedVariants:x,onVariantChange:e=>{i(e)}})))):t.createElement(t.Fragment,null,t.createElement(Af,{className:""+(e.id===h?"yt-fixedBundle-product-card--vertical-primary":"yt-fixedBundle-product-card--vertical-associated"),productsLength:m,style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}50`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`0 4px 10px -6px ${a.fixedBundle.borderColor}50`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}50`}[a.fixedBundle.shadowType]||"none",...o&&{position:"relative"},...v&&{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",minWidth:"max-content",paddingLeft:"2px"}},borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.fixedBundle?.cardBackgroundColor},o&&t.createElement(sg,{className:"yt-fixedBundle-product-card_checkbox-wrapper--vertical",isImage:v},t.createElement(lg,{className:"yt-fixedBundle-product-card_checkbox-hidden--vertical",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}`,defaultChecked:r,onChange:e=>l(e.target.checked),disabled:b}),t.createElement(cg,{className:"yt-fixedBundle-product-card_checkbox-label--vertical",htmlFor:`checkbox-${e.id}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(tt,{size:10}))),"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Ff,{className:"yt-fixedBundle-product-card_image-wrapper--vertical",style:{aspectRatio:a.general.imageAspectRatio,height:"fit-content"}},t.createElement(Mf,{className:"yt-fixedBundle-product-card_image--vertical",src:e.featuredMedia?.preview?.image?.url,style:{aspectRatio:a.general.imageAspectRatio},alt:e.title}),e.variants.edges.length>1&&t.createElement(Rf,{className:"yt-fixedBundle-product-card_badge-container"},t.createElement(Lf,{className:"yt-fixedBundle-product-card_circle-button"},t.createElement("span",null)),t.createElement(jf,{className:"yt-fixedBundle-product-card_circle-button-two"},t.createElement("span",null)),t.createElement(Vf,{className:"yt-fixedBundle-product-card_count-badge"},e.variants.edges.length,"+"))),t.createElement(Hf,{className:"yt-fixedBundle-product-card-vertical_info"},t.createElement(Wf,{className:"yt-fixedBundle-product-card-vertical_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Gf,{className:"yt-fixedBundle-product-card-vertical_price-line"},t.createElement(Uf,{className:"yt-fixedBundle-product-card-vertical_price--new"},Ng(a.general.currencySymbol,g),Ig(y?.price)),a.fixedBundle.compareAtPriceVisibility&&y?.compareAtPrice&&parseFloat(y.compareAtPrice)>parseFloat(y?.price)&&t.createElement(Bf,{className:"yt-fixedBundle-product-card-vertical_price--old"},Ng(a.general.currencySymbol,g),Ig(y?.compareAtPrice))))),(m<=3||!d)&&p<m-1&&t.createElement(qf,{className:"yt-fixedBundle-plus-wrapper"}," ",t.createElement(Yf,{className:"yt-fixedBundle-plus-icon"},"+")," ")))},_g=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[a,d]=c(window.innerWidth<786),[s,p]=c(Object.fromEntries(e?.products?.map((e=>[e.productId,e.productDetails?.variants?.edges?.find((e=>e.node.inventoryQuantity>0))?.node?.id||e.productDetails?.variants?.edges?.[0]?.node?.id])))),u=("undefined"!=typeof window?window.location.pathname:"").split("/"),m=u[u.length-1].replace(/;$/,""),f=e?.products?.find((e=>e.productDetails?.handle===m)),g=f?.productId,[h,x]=c(!1),y="undefined"!=typeof window&&("usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain||"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain),b=e?.showIndividualProductSelector||!0,[v,w]=c(new Set(e.products.filter((e=>!y||(e.productId===g||b))).map((e=>e.productId)))),C=(e,t)=>{y&&b&&t===g||w((n=>{const r=new Set(n);return e?r.add(t):r.delete(t),r}))};l((()=>{const e=()=>{d(window.innerWidth<600)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const k=(e,t)=>{p((n=>({...n,[e]:t})))},E=e.products.every((e=>e.productDetails.variants.edges.some((e=>e.node.inventoryQuantity>0)))),T=i((()=>e.products.some((e=>v.has(e.productId)&&e.productDetails.variants.edges.length>1))),[e.products,v]),{originalPrice:S,dealPrice:B,offerValue:$}=i((()=>{const{price:t,compareAtPrice:n}=e.products.reduce(((e,t)=>{if(!v.has(t.productId))return e;const n=t.productDetails.variants.edges?.find((e=>e.node.id===s[t.productId]))?.node,r=parseFloat(n?.price??"0"),o=parseFloat(n?.compareAtPrice||r.toString());return e.price+=r,e.compareAtPrice+=o,e}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);v.size===e.products.length&&(e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff));const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[e.products,s,v,e.percentageOff,e.dealAmount,e.amountOff]),z=async e=>{e.preventDefault(),e.stopPropagation(),o(!0),x(!1);try{const e=Object.entries(s).filter((([e])=>v.has(e))).map((([e,t])=>t));n&&await n(Number(S),e)}catch(e){console.error("Error adding to cart:",e)}o(!1)};if(!n)return t.createElement(t.Fragment,null);if(!E&&e?.customizations.general?.trackInventory)return t.createElement(t.Fragment,null);const _=e.customizations,D=_.fixedBundle?.cardLayoutStyle||"auto",I="horizontal"===D||"auto"===D&&a,N=()=>{x(!0)},P="bundles"==e.appName?e.pageHeader?.title:e?.title,O="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(xf,{id:"yt-fixedBundle-container",className:"yt-fixedBundle-container",style:{maxWidth:"800px",backgroundColor:_.fixedBundle.sectionBackgroundColor,..."transparent"!==_.fixedBundle.sectionBackgroundColor&&{padding:"20px"}}},P&&t.createElement(yf,{id:"yt-fixedBundle-header",className:"yt-fixedBundle-header",style:{backgroundColor:_.fixedBundle?.titleBackgroundColor||"none",color:_.fixedBundle?.titleTextColor||"black",textAlign:_.fixedBundle.infoAlignment??"center",fontSize:_.fixedBundle?.titleFontSize,..."transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingBlock:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"===_.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},P),O&&t.createElement(bf,{id:"yt-fixedBundle-subheader",className:"yt-fixedBundle-subheader",style:{color:"#121212",fontSize:_.fixedBundle?.subtitleFontSize,textAlign:_.fixedBundle.infoAlignment??"center",..."left"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"===_.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},O),I?t.createElement(vf,{id:"yt-fixedBundle-horizontal-container",className:"yt-fixedBundle-horizontal-container"},e?.products?.map(((n,r)=>t.createElement(t.Fragment,{key:n.productId},t.createElement(zg,{isChecked:v.has(n.productId),product:n.productDetails,selectedVariantId:s[n.productId],canCustomize:e?.canCustomizeFixedBundle||!1,styles:_,onVariantChange:e=>k(n.productId,e),onCheckChange:e=>{console.log(e),C(e,n.productId)},isMobile:a,index:r,isHorizontal:I,variantOptions:e.variantOptions,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:g}))))):t.createElement(Pf,{id:"yt-fixedBundle-vertical-container",className:"yt-fixedBundle-vertical-container"},t.createElement(Of,{id:"yt-fixedBundle-product-list",className:"yt-fixedBundle-product-list",style:{justifyContent:"left"===_.fixedBundle.infoAlignment?"flex-start":"right"===_.fixedBundle.infoAlignment?"flex-end":"center"}},e?.products?.map(((n,r)=>t.createElement(zg,{isChecked:v.has(n.productId),product:n.productDetails,selectedVariantId:s[n.productId],canCustomize:e?.canCustomizeFixedBundle||!1,styles:_,onVariantChange:e=>k(n.productId,e),onCheckChange:e=>C(e,n.productId),isMobile:a,index:r,isHorizontal:I,productsLength:e.products.length,handleOpenModal:N,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:g}))),T&&t.createElement(Sg,{products:e.products.filter((e=>v.has(e.productId))),isOpen:h,onClose:()=>x(!1),variantOptions:e.variantOptions,cta:{textColor:_.general.ctaTextColor,backgroundColor:_.general.ctaBackgroundColor},onVariantChange:k,handleAddToCart:z}))),t.createElement($f,{id:"yt-fixedBundle-summary",className:"yt-fixedBundle-summary",style:{alignItems:"left"===_.fixedBundle.infoAlignment?"flex-start":"right"===_.fixedBundle.infoAlignment?"flex-end":"center"}},Number(S)>0&&Number($)>0&&_.fixedBundle.compareAtPriceVisibility&&t.createElement(zf,{className:"yt-fixedBundle-summary_original-price"},"Original Price:"," ",t.createElement(Df,{className:"yt-fixedBundle-summary_price"},Ng(_.general.currencySymbol,e?.storeCurrencyCode),Ig(S))),0!==v.size&&t.createElement(_f,{className:"yt-fixedBundle-summary_total-price"},"Total Price:"," ",t.createElement(Df,{className:"yt-fixedBundle-summary_price"},Ng(_.general.currencySymbol,e?.storeCurrencyCode),Ig(B))," ",Number($)>0&&t.createElement(If,{className:"yt-fixedBundle-summary_save-tag"},"Save:"," ",Ng(_.general.currencySymbol,e?.storeCurrencyCode),Ig($)))),t.createElement(Nf,{id:"yt-fixedBundle-add-to-cart",className:"yt-fixedBundle-add-to-cart",onClick:e=>{e.preventDefault(),e.stopPropagation(),I||!T?z(e):x(!0)},disabled:v.size<1||r,style:{backgroundColor:_.general?.ctaBackgroundColor||"#121212",color:_.general?.ctaTextColor||"#FFFFFF",border:`1px solid ${_.general?.ctaBackgroundColor||"#121212"}`,boxShadow:_.general.ctaShadowType,paddingTop:_.general?.ctaPadding,paddingBottom:_.general?.ctaPadding,borderRadius:_.general.ctaBorderRadius,width:_.general.ctaWidth||"100%",textAlign:"center"},onMouseOver:e=>{_.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=_.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=_.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{_.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=_.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=_.general?.ctaTextColor||"#FFFFFF")}},r?t.createElement(Vo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,_.fixedBundle?.ctaTitle??"Add Bundle to cart")))},Dg=window?.Shopify?.currency||{rate:1,active:"INR"},Ig=e=>{if(!e)return;const t=navigator.language||"en-US",n=Number((Number(e)*Dg.rate).toFixed(2));return new Intl.NumberFormat(t).format(n)},Ng=(e,t)=>t==Dg.active?e:ln(Dg.active)||Dg.active,Pg=(e,t,n,r,o)=>{const a=r.findIndex((t=>t.variantId===e));o(0===n?e=>e.filter(((e,t)=>t!==a)):-1===a?r=>[...r,{product:t,variantId:e,quantity:n}]:e=>e.map(((e,t)=>t===a?{...e,quantity:e.quantity+n}:e)))},Og=({bundle:e,currentProductId:n,addToCartFunction:r,addCustomBundleToCart:o,selectedItems:a,setSelectedItems:i,bundleAddToCartLoading:l,handleRemoveItem:c,selectedItemsQuantity:d,renderingOnPage:s,bundleSubtotal:p})=>"fixed"!==e.type&&e.type&&0!==e?.type?.length?"builder"===e.type?t.createElement(nm,{bundleAddToCartLoading:l,bundle:e,selectedItems:a,setSelectedItems:i,handleAddToCart:o,handleRemoveItem:c,renderingOnPage:s,selectedItemsQuantity:d??0,bundleSubtotal:p??{price:0,compareAtPrice:0}}):"combo"===e.type?t.createElement(om,{bundle:e,addToCartFunction:r}):"mixnmatch"===e.type?t.createElement(hf,{bundle:e,addToCartFunction:r}):t.createElement(Am,{bundle:e,currentProductId:n,addToCartFunction:r}):t.createElement(_g,{addToCartFunction:r,bundle:e});L(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Ag=()=>t.createElement("div",{className:"scene"},t.createElement("div",{className:"floating"},t.createElement("div",{className:"cube"},t.createElement("div",{className:"side front"},""),t.createElement("div",{className:"side back"},""),t.createElement("div",{className:"side left"},""),t.createElement("div",{className:"side right"},""),t.createElement("div",{className:"side bottom"},""),t.createElement("div",{className:"lid"},t.createElement("div",{className:"flap north"},""),t.createElement("div",{className:"flap south"},""),t.createElement("div",{className:"flap east"},""),t.createElement("div",{className:"flap west"},"")))));export{Og as Bundle,Ag as BundleLoader,Jp as Cart,ea as CouponFrame,Ge as Nudge,Je as SpinnerWheel};
|
|
4227
|
+
`,Eg=({products:e,isOpen:n,onClose:r,cta:o,variantOptions:a,onVariantChange:i,handleAddToCart:l})=>{const[d,s]=c((()=>{const t={};return e.forEach((({productId:e,productDetails:n})=>{const r=n.options.map((e=>e.values[0]??""));t[e]=r})),t})),[p,u]=c({}),m=(t,n,r)=>{const o={...d};o[t][r]=n,s(o);const a=e.find((e=>e.productId===t));if(!a?.productDetails)return;const l=a.productDetails.variants.edges.find((e=>e.node.title===o[t].join(" / ")))?.node;l&&(i(t,l.id),u((e=>({...e,[t]:{node:l}}))))};if(!n)return null;const f=t.createElement(dg,{className:"yt-fixedBundle-variant-modal_overlay",onClick:r},t.createElement(sg,{className:"yt-fixedBundle-variant-modal_container",onClick:e=>e.stopPropagation()},t.createElement(pg,{className:"yt-fixedBundle-variant-modal_header",style:{backgroundColor:o.backgroundColor,color:o.textColor}},"Select Options"),e?.map(((n,r)=>t.createElement(t.Fragment,null,t.createElement(mg,{className:"yt-fixedBundle-variant-modal_product-block"},t.createElement(fg,{className:"yt-fixedBundle-variant-modal_thumbnail",src:p[n.productId]?.node?.image.url||n.productDetails.featuredMedia?.preview?.image?.url,alt:n.productDetails.title}),t.createElement(gg,{className:"yt-fixedBundle-variant-modal_product-info"},t.createElement(hg,{className:"yt-fixedBundle-variant-modal_product-name"},n.productDetails.title,n.productDetails.variants.edges.length>1&&t.createElement(yg,{className:"yt-fixedBundle-variant-modal_selected-value"},d[n.productId].join(" / "))),n.productDetails.options.map(((e,r)=>{const o=a&&a?.options?.find((t=>t.name===e.name));return e.values.length<=1?t.createElement(t.Fragment,null):o&&"color"===o?.type?t.createElement(bg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(kg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(vg,{className:"yt-fixedBundle-variant-modal_color-swatch",key:a,color:o.values.find((t=>t.name===e))?.value||e,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},t.createElement("span",null)):t.createElement(wg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))):o&&"image"===o?.type?t.createElement(bg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(kg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,a)=>t.createElement(t.Fragment,null,o.values.find((t=>t.name===e))?.value?t.createElement(Cg,{className:"yt-fixedBundle-variant-modal_image-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)},src:o.values.find((t=>t.name===e))?.value},t.createElement("span",null)):t.createElement(wg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:a,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))):t.createElement(bg,{className:"yt-fixedBundle-variant-modal_options-row"},t.createElement(kg,{className:"yt-fixedBundle-variant-modal_option-name"},e.name," : "),e.values.map(((e,o)=>t.createElement(wg,{className:"yt-fixedBundle-variant-modal_text-swatch",key:o,selected:d[n.productId][r]==e,onClick:()=>{m(n.productId,e,r)}},e))))})))),r<e.length-1&&t.createElement(xg,{className:"yt-fixedBundle-variant-modal_divider"})))),t.createElement(ug,{className:"yt-fixedBundle-variant-modal_confirm-button",style:{backgroundColor:o.backgroundColor,color:o.textColor},onClick:l},"Add bundle to cart")));return v.createPortal(f,document.body)},Tg=({options:e,selectedValue:n,onChange:r,type:a="text"})=>{const[i,d]=c(!1),s=o(null);l((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[]);const p=e=>"color"===a?t.createElement(eg,{className:"yt-fixedBundle-variant-dropdown-horizontal_color-swatch",$color:e.value},t.createElement("span",null)):"image"===a?t.createElement(tg,{className:"yt-fixedBundle-variant-dropdown-horizontal_image-swatch",src:e.value||"/placeholder.svg",alt:e.name},t.createElement("span",null)):null;return t.createElement(qf,{className:"yt-fixedBundle-variant-dropdown-horizontal_container",ref:s},t.createElement(Yf,{className:"yt-fixedBundle-variant-dropdown-horizontal_header",onClick:()=>d(!i)},t.createElement(Qf,{className:"yt-fixedBundle-variant-dropdown-horizontal_content"},n&&("color"===a||"image"===a)&&p(n),t.createElement("span",{className:"yt-fixedBundle-variant-dropdown-horizontal_selected-text"},n&&n.name)),t.createElement(Zf,{className:"yt-fixedBundle-variant-dropdown-horizontal_chevron-icon",$isOpen:i})),i&&t.createElement(Kf,{className:"yt-fixedBundle-variant-dropdown-horizontal_list"},e?.map((e=>t.createElement(Xf,{className:"yt-fixedBundle-variant-dropdown-horizontal_item",key:e.name,$isSelected:n?.name===e.name,onClick:()=>{r(e),d(!1)}},("color"===a||"image"===a)&&p(e),t.createElement(Jf,{className:"yt-fixedBundle-variant-dropdown-horizontal_item-text"},e.name))))))},Sg=({product:e,variantOptions:n,selectedVariants:r,onVariantChange:o})=>{const[a,i]=c(r||[]),l=e=>{if(!n?.options)return"text";const t=n.options.find((t=>t.name===e));return t?.type||"text"},d=(e,t)=>{if(!n?.options)return e.values.map((e=>({name:e,value:e})));const r=n.options.find((t=>t.name===e.name));return e.values.map((e=>{const t=r?.values?.find((t=>t.name===e));return{name:e,value:t?.value||e}}))},s=(e,t)=>{const n=a[t];if(!n)return null;return d(e).find((e=>e.name===n))||null};return t.createElement(ng,{className:"yt-fixedBundle-variant-selector-horizontal_container"},e.options.map(((n,r)=>t.createElement(rg,{className:"yt-fixedBundle-variant-selector-horizontal_option-row",key:n.name,$isFirst:0===r},n?.values?.length>1&&t.createElement(Tg,{options:d(n),selectedValue:s(n,r),onChange:t=>{console.log(t),((t,n)=>{const r=[...a];r[t]=n.name,i(r);const l=e.variants.edges.find((n=>n.node.title===(e.options?.length>0?r.join(" / "):r[t])))?.node.id;o(l||"")})(r,t)},type:l(n.name)})))))},Bg=({product:e,selectedVariantId:n,isChecked:r,canCustomize:o,styles:a,onVariantChange:i,onCheckChange:l,isMobile:d,isHorizontal:s,index:p,variantOptions:u,productsLength:m,handleOpenModal:f,storeCurrencyCode:g,primaryProductId:h})=>{const[x]=c(e.options?.map((e=>e.values[0]))||[]),y=e.variants.edges.find((e=>e.node.id===n))?.node,b=e.id===h,v="undefined"!=typeof window&&"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain||"usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain;return t.createElement(t.Fragment,null,s?t.createElement("div",{className:""+(e.id===h?"yt-fixedBundle-product-card--horizontal-primary":"yt-fixedBundle-product-card--horizontal-associated"),style:{display:"flex",alignItems:"center",gap:"10px",backgroundColor:a.fixedBundle?.cardBackgroundColor}},o&&t.createElement(lg,{className:"yt-fixedBundle-product-card_checkbox-wrapper--horizontal"},t.createElement(ag,{className:"yt-fixedBundle-product-card_checkbox-hidden",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}`,defaultChecked:r,onChange:e=>l(e.target.checked),disabled:b}),t.createElement(ig,{className:"yt-fixedBundle-product-card_checkbox-label",htmlFor:`checkbox-${e.id}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(tt,null))),t.createElement(bf,{className:"yt-fixedBundle-product-card-horizontal_item",style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}80`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`8px 8px 8px -6px ${a.fixedBundle.borderColor}`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}80`}[a.fixedBundle.shadowType]||"none"},canCustomize:o},"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(vf,{className:"yt-fixedBundle-product-card-horizontal_image",src:y?.image?.url||e.featuredMedia?.preview?.image?.url,alt:e.title,style:{borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,aspectRatio:a.general.imageAspectRatio||"1/1",borderTopRightRadius:"0",borderBottomRightRadius:"0"}}),t.createElement(wf,{className:"yt-fixedBundle-product-card-horizontal_details"},t.createElement(Cf,{className:"yt-fixedBundle-product-card-horizontal_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(kf,{className:"yt-fixedBundle-product-card-horizontal_price-section"},t.createElement(Ef,{className:"yt-fixedBundle-product-card-horizontal_price--new"},Dg(a.general.currencySymbol,g)," ",_g(y?.price)),a.fixedBundle.compareAtPriceVisibility&&y?.compareAtPrice&&parseFloat(y.compareAtPrice)>parseFloat(y?.price)&&t.createElement(Tf,{className:"yt-fixedBundle-product-card-horizontal_price--old"},Dg(a.general.currencySymbol,g),_g(y?.compareAtPrice))),t.createElement(Sg,{product:e,variantOptions:u,selectedVariants:x,onVariantChange:e=>{i(e)}})))):t.createElement(t.Fragment,null,t.createElement(Pf,{className:""+(e.id===h?"yt-fixedBundle-product-card--vertical-primary":"yt-fixedBundle-product-card--vertical-associated"),productsLength:m,style:{borderRadius:a.fixedBundle?.borderRadius,border:`1px solid ${a.fixedBundle?.borderColor}50`,backgroundColor:a.fixedBundle?.cardBackgroundColor,boxShadow:{none:"none",spread:`0 4px 10px -6px ${a.fixedBundle.borderColor}50`,"no-spread":`4px 4px 0px -1px ${a.fixedBundle.borderColor}50`}[a.fixedBundle.shadowType]||"none",...o&&{position:"relative"},...v&&{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",minWidth:"max-content",paddingLeft:"2px"}},borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.fixedBundle?.cardBackgroundColor},o&&t.createElement(cg,{className:"yt-fixedBundle-product-card_checkbox-wrapper--vertical",isImage:v},t.createElement(ag,{className:"yt-fixedBundle-product-card_checkbox-hidden--vertical",style:{display:"none"},type:"checkbox",id:`checkbox-${e.id}`,defaultChecked:r,onChange:e=>l(e.target.checked),disabled:b}),t.createElement(ig,{className:"yt-fixedBundle-product-card_checkbox-label--vertical",htmlFor:`checkbox-${e.id}`,isChecked:r,borderRadius:a.fixedBundle?.borderRadius,borderColor:a.fixedBundle?.borderColor,backgroundColor:a.general?.ctaBackgroundColor},t.createElement(tt,{size:10}))),"undefined"!=typeof window&&"devansh-test123.myshopify.com"!==window.ytBundleApp?.storeDomain&&"usee-shop-app.myshopify.com"!==window.ytBundleApp?.storeDomain&&t.createElement(Of,{className:"yt-fixedBundle-product-card_image-wrapper--vertical",style:{aspectRatio:a.general.imageAspectRatio,height:"fit-content"}},t.createElement(Af,{className:"yt-fixedBundle-product-card_image--vertical",src:e.featuredMedia?.preview?.image?.url,style:{aspectRatio:a.general.imageAspectRatio},alt:e.title}),e.variants.edges.length>1&&t.createElement(Ff,{className:"yt-fixedBundle-product-card_badge-container"},t.createElement(Mf,{className:"yt-fixedBundle-product-card_circle-button"},t.createElement("span",null)),t.createElement(Rf,{className:"yt-fixedBundle-product-card_circle-button-two"},t.createElement("span",null)),t.createElement(Lf,{className:"yt-fixedBundle-product-card_count-badge"},e.variants.edges.length,"+"))),t.createElement(jf,{className:"yt-fixedBundle-product-card-vertical_info"},t.createElement(Vf,{className:"yt-fixedBundle-product-card-vertical_title"},e.title),a.fixedBundle.productsPriceVisibility&&t.createElement(Wf,{className:"yt-fixedBundle-product-card-vertical_price-line"},t.createElement(Hf,{className:"yt-fixedBundle-product-card-vertical_price--new"},Dg(a.general.currencySymbol,g),_g(y?.price)),a.fixedBundle.compareAtPriceVisibility&&y?.compareAtPrice&&parseFloat(y.compareAtPrice)>parseFloat(y?.price)&&t.createElement(Tf,{className:"yt-fixedBundle-product-card-vertical_price--old"},Dg(a.general.currencySymbol,g),_g(y?.compareAtPrice))))),(m<=3||!d)&&p<m-1&&t.createElement(Uf,{className:"yt-fixedBundle-plus-wrapper"}," ",t.createElement(Gf,{className:"yt-fixedBundle-plus-icon"},"+")," ")))},$g=({bundle:e,addToCartFunction:n})=>{const[r,o]=c(!1),[a,d]=c(window.innerWidth<786),[s,p]=c(Object.fromEntries(e?.products?.map((e=>[e.productId,e.productDetails?.variants?.edges?.find((e=>e.node.inventoryQuantity>0))?.node?.id||e.productDetails?.variants?.edges?.[0]?.node?.id])))),u=("undefined"!=typeof window?window.location.pathname:"").split("/"),m=u[u.length-1].replace(/;$/,""),f=e?.products?.find((e=>e.productDetails?.handle===m)),g=f?.productId,[h,x]=c(!1),y="undefined"!=typeof window&&("usee-shop-app.myshopify.com"===window.ytBundleApp?.storeDomain||"devansh-test123.myshopify.com"===window.ytBundleApp?.storeDomain),b=e?.showIndividualProductSelector||!0,[v,w]=c(new Set(e.products.filter((e=>!y||(e.productId===g||b))).map((e=>e.productId)))),C=(e,t)=>{y&&b&&t===g||w((n=>{const r=new Set(n);return e?r.add(t):r.delete(t),r}))};l((()=>{const e=()=>{d(window.innerWidth<600)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const k=(e,t)=>{p((n=>({...n,[e]:t})))},E=e.products.every((e=>e.productDetails.variants.edges.some((e=>e.node.inventoryQuantity>0)))),T=i((()=>e.products.some((e=>v.has(e.productId)&&e.productDetails.variants.edges.length>1))),[e.products,v]),{originalPrice:S,dealPrice:B,offerValue:$}=i((()=>{const{price:t,compareAtPrice:n}=e.products.reduce(((e,t)=>{if(!v.has(t.productId))return e;const n=t.productDetails.variants.edges?.find((e=>e.node.id===s[t.productId]))?.node,r=parseFloat(n?.price??"0"),o=parseFloat(n?.compareAtPrice||r.toString());return e.price+=r,e.compareAtPrice+=o,e}),{price:0,compareAtPrice:0}),r=Math.max(t,n);let o=Math.min(t,n);v.size===e.products.length&&(e?.percentageOff?o=t*(1-e.percentageOff/100):e?.dealAmount?o=e.dealAmount:e?.amountOff&&(o=t-e.amountOff));const a=n-o;return{originalPrice:r.toFixed(2),dealPrice:o.toFixed(2),offerValue:a.toFixed(2)}}),[e.products,s,v,e.percentageOff,e.dealAmount,e.amountOff]),z=async e=>{e.preventDefault(),e.stopPropagation(),o(!0),x(!1);try{const e=Object.entries(s).filter((([e])=>v.has(e))).map((([e,t])=>t));n&&await n(Number(S),e)}catch(e){console.error("Error adding to cart:",e)}o(!1)};if(!n)return t.createElement(t.Fragment,null);if(!E&&e?.customizations.general?.trackInventory)return t.createElement(t.Fragment,null);const _=e.customizations,D=_.fixedBundle?.cardLayoutStyle||"auto",I="horizontal"===D||"auto"===D&&a,N=()=>{x(!0)},P="bundles"==e.appName?e.pageHeader?.title:e?.title,O="bundles"==e.appName?e.pageHeader?.description:e?.subtitle;return t.createElement(gf,{id:"yt-fixedBundle-container",className:"yt-fixedBundle-container",style:{maxWidth:"800px",backgroundColor:_.fixedBundle.sectionBackgroundColor,..."transparent"!==_.fixedBundle.sectionBackgroundColor&&{padding:"20px"}}},P&&t.createElement(hf,{id:"yt-fixedBundle-header",className:"yt-fixedBundle-header",style:{backgroundColor:_.fixedBundle?.titleBackgroundColor||"none",color:_.fixedBundle?.titleTextColor||"black",textAlign:_.fixedBundle.infoAlignment??"center",fontSize:_.fixedBundle?.titleFontSize,..."transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingBlock:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"===_.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},P),O&&t.createElement(xf,{id:"yt-fixedBundle-subheader",className:"yt-fixedBundle-subheader",style:{color:"#121212",fontSize:_.fixedBundle?.subtitleFontSize,textAlign:_.fixedBundle.infoAlignment??"center",..."left"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingLeft:"7px"},..."right"===_.fixedBundle.infoAlignment&&"transparent"!==_.fixedBundle.titleBackgroundColor&&{paddingRight:"7px"},..."left"===_.fixedBundle.infoAlignment&&"transparent"===_.fixedBundle.titleBackgroundColor&&{paddingLeft:"0px"}}},O),I?t.createElement(yf,{id:"yt-fixedBundle-horizontal-container",className:"yt-fixedBundle-horizontal-container"},e?.products?.map(((n,r)=>t.createElement(t.Fragment,{key:n.productId},t.createElement(Bg,{isChecked:v.has(n.productId),product:n.productDetails,selectedVariantId:s[n.productId],canCustomize:e?.canCustomizeFixedBundle||!1,styles:_,onVariantChange:e=>k(n.productId,e),onCheckChange:e=>{console.log(e),C(e,n.productId)},isMobile:a,index:r,isHorizontal:I,variantOptions:e.variantOptions,productsLength:e.products.length,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:g}))))):t.createElement(If,{id:"yt-fixedBundle-vertical-container",className:"yt-fixedBundle-vertical-container"},t.createElement(Nf,{id:"yt-fixedBundle-product-list",className:"yt-fixedBundle-product-list",style:{justifyContent:"left"===_.fixedBundle.infoAlignment?"flex-start":"right"===_.fixedBundle.infoAlignment?"flex-end":"center"}},e?.products?.map(((n,r)=>t.createElement(Bg,{isChecked:v.has(n.productId),product:n.productDetails,selectedVariantId:s[n.productId],canCustomize:e?.canCustomizeFixedBundle||!1,styles:_,onVariantChange:e=>k(n.productId,e),onCheckChange:e=>C(e,n.productId),isMobile:a,index:r,isHorizontal:I,productsLength:e.products.length,handleOpenModal:N,storeCurrencyCode:e.storeCurrencyCode,primaryProductId:g}))),T&&t.createElement(Eg,{products:e.products.filter((e=>v.has(e.productId))),isOpen:h,onClose:()=>x(!1),variantOptions:e.variantOptions,cta:{textColor:_.general.ctaTextColor,backgroundColor:_.general.ctaBackgroundColor},onVariantChange:k,handleAddToCart:z}))),t.createElement(Sf,{id:"yt-fixedBundle-summary",className:"yt-fixedBundle-summary",style:{alignItems:"left"===_.fixedBundle.infoAlignment?"flex-start":"right"===_.fixedBundle.infoAlignment?"flex-end":"center"}},Number(S)>0&&Number($)>0&&_.fixedBundle.compareAtPriceVisibility&&t.createElement(Bf,{className:"yt-fixedBundle-summary_original-price"},"Original Price:"," ",t.createElement(zf,{className:"yt-fixedBundle-summary_price"},Dg(_.general.currencySymbol,e?.storeCurrencyCode),_g(S))),0!==v.size&&t.createElement($f,{className:"yt-fixedBundle-summary_total-price"},"Total Price:"," ",t.createElement(zf,{className:"yt-fixedBundle-summary_price"},Dg(_.general.currencySymbol,e?.storeCurrencyCode),_g(B))," ",Number($)>0&&t.createElement(_f,{className:"yt-fixedBundle-summary_save-tag"},"Save:"," ",Dg(_.general.currencySymbol,e?.storeCurrencyCode),_g($)))),t.createElement(Df,{id:"yt-fixedBundle-add-to-cart",className:"yt-fixedBundle-add-to-cart",onClick:e=>{e.preventDefault(),e.stopPropagation(),I||!T?z(e):x(!0)},disabled:v.size<1||r,style:{backgroundColor:_.general?.ctaBackgroundColor||"#121212",color:_.general?.ctaTextColor||"#FFFFFF",border:`1px solid ${_.general?.ctaBackgroundColor||"#121212"}`,boxShadow:_.general.ctaShadowType,paddingTop:_.general?.ctaPadding,paddingBottom:_.general?.ctaPadding,borderRadius:_.general.ctaBorderRadius,width:_.general.ctaWidth||"100%",textAlign:"center"},onMouseOver:e=>{_.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=_.general?.ctaHoverBackgroundColor||"#F1F1F1",e.currentTarget.style.color=_.general?.ctaHoverTextColor||"#121212")},onMouseOut:e=>{_.general.customizeHoverState&&(e.currentTarget.style.backgroundColor=_.general?.ctaBackgroundColor||"#121212",e.currentTarget.style.color=_.general?.ctaTextColor||"#FFFFFF")}},r?t.createElement(Vo,{color:"white",loading:r,size:15,"aria-label":"Loading Spinner","data-testid":"loader"}):t.createElement(t.Fragment,null,_.fixedBundle?.ctaTitle??"Add Bundle to cart")))},zg=window?.Shopify?.currency||{rate:1,active:"INR"},_g=e=>{if(!e)return;const t=navigator.language||"en-US",n=Number((Number(e)*zg.rate).toFixed(2));return new Intl.NumberFormat(t).format(n)},Dg=(e,t)=>t==zg.active?e:ln(zg.active)||zg.active,Ig=(e,t,n,r,o)=>{const a=r.findIndex((t=>t.variantId===e));o(0===n?e=>e.filter(((e,t)=>t!==a)):-1===a?r=>[...r,{product:t,variantId:e,quantity:n}]:e=>e.map(((e,t)=>t===a?{...e,quantity:e.quantity+n}:e)))},Ng=({bundle:e,currentProductId:n,addToCartFunction:r,addCustomBundleToCart:o,selectedItems:a,setSelectedItems:i,bundleAddToCartLoading:l,handleRemoveItem:c,selectedItemsQuantity:d,renderingOnPage:s,bundleSubtotal:p})=>"fixed"!==e.type&&e.type&&0!==e?.type?.length?"builder"===e.type?t.createElement(em,{bundleAddToCartLoading:l,bundle:e,selectedItems:a,setSelectedItems:i,handleAddToCart:o,handleRemoveItem:c,renderingOnPage:s,selectedItemsQuantity:d??0,bundleSubtotal:p??{price:0,compareAtPrice:0}}):"combo"===e.type?t.createElement(nm,{bundle:e,addToCartFunction:r}):"mixnmatch"===e.type?t.createElement(ff,{bundle:e,addToCartFunction:r}):t.createElement(Pm,{bundle:e,currentProductId:n,addToCartFunction:r}):t.createElement($g,{addToCartFunction:r,bundle:e});L(".scene {\n width: 100%;\n height: 60vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.floating {\n animation: float 3s ease-in-out infinite;\n}\n\n@keyframes float {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n}\n.cube {\n position: relative;\n width: 50px;\n height: 50px;\n transform-style: preserve-3d;\n transform: rotateX(-45deg) rotateY(50deg) rotateZ(0deg);\n}\n\n.side,\n.lid,\n.flap {\n position: absolute;\n width: 100px;\n height: 100px;\n border: 4px solid #333366;\n background: transparent;\n box-sizing: border-box;\n}\n\n.side {\n background: #fff;\n backface-visibility: hidden;\n}\n\n.side.front {\n transform: translateZ(50px);\n}\n\n.side.back {\n transform: rotateY(180deg) translateZ(50px);\n}\n\n.side.left {\n transform: rotateY(-90deg) translateZ(50px);\n}\n\n.side.right {\n transform: rotateY(90deg) translateZ(50px);\n}\n\n.side.bottom {\n transform: rotateX(-90deg) translateZ(50px);\n}\n\n.lid {\n transform: rotateX(90deg) translateZ(50px);\n transform-style: preserve-3d;\n}\n\n.flap.north {\n top: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: top center;\n animation: openNorth 3s ease-in-out infinite;\n}\n\n.flap.south {\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n transform-origin: bottom center;\n animation: openSouth 3s ease-in-out infinite;\n}\n\n.flap.east {\n top: 0;\n right: 0;\n width: 50%;\n height: 100%;\n transform-origin: right center;\n animation: openEast 3s ease-in-out infinite;\n}\n\n.flap.west {\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n transform-origin: left center;\n animation: openWest 3s ease-in-out infinite;\n}\n\n@keyframes openNorth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(180deg);\n }\n}\n@keyframes openSouth {\n 0%, 100% {\n transform: rotateX(0deg);\n }\n 50% {\n transform: rotateX(-180deg);\n }\n}\n@keyframes openEast {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n}\n@keyframes openWest {\n 0%, 100% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(-180deg);\n }\n}");const Pg=()=>t.createElement("div",{className:"scene"},t.createElement("div",{className:"floating"},t.createElement("div",{className:"cube"},t.createElement("div",{className:"side front"},""),t.createElement("div",{className:"side back"},""),t.createElement("div",{className:"side left"},""),t.createElement("div",{className:"side right"},""),t.createElement("div",{className:"side bottom"},""),t.createElement("div",{className:"lid"},t.createElement("div",{className:"flap north"},""),t.createElement("div",{className:"flap south"},""),t.createElement("div",{className:"flap east"},""),t.createElement("div",{className:"flap west"},"")))));export{Ng as Bundle,Pg as BundleLoader,Jp as Cart,ea as CouponFrame,Ge as Nudge,Je as SpinnerWheel};
|