yt-uikit 0.10.4 → 0.10.6
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.
|
@@ -40,6 +40,8 @@ type CartProductsListProps = {
|
|
|
40
40
|
showFreebieMilestone?: boolean;
|
|
41
41
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
42
42
|
freeLabelText?: string;
|
|
43
|
+
customCartProgressBarCriteria?: string;
|
|
44
|
+
effectiveQuantityForProgressBar?: number;
|
|
43
45
|
};
|
|
44
46
|
declare const CartProductsList: React.FC<CartProductsListProps>;
|
|
45
47
|
export default CartProductsList;
|
package/dist/esm/index.js
CHANGED
|
@@ -1311,7 +1311,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
|
|
|
1311
1311
|
font-size: 10px;
|
|
1312
1312
|
white-space: nowrap;
|
|
1313
1313
|
width: fit-content;
|
|
1314
|
-
max-width:
|
|
1314
|
+
max-width: 100px;
|
|
1315
1315
|
overflow: hidden;
|
|
1316
1316
|
|
|
1317
1317
|
@media (max-width: ${yo}) {
|
|
@@ -1376,7 +1376,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
|
|
|
1376
1376
|
.yt_subtitle { font-size: 11px; opacity: 0.9; }
|
|
1377
1377
|
|
|
1378
1378
|
.lock { margin-left: auto; width: 30px; height: 30px; border-radius: 999px; background: rgba(0,0,0,0.08); display: inline-flex; align-items: center; justify-content: center; }
|
|
1379
|
-
`,Mo=({name:t,minimumOrderValue:n,currency:r,themeColor:o,tertiaryColor:a,imageUrl:i})=>{const
|
|
1379
|
+
`,Mo=({name:t,minimumOrderValue:n,currency:r,themeColor:o,tertiaryColor:a,imageUrl:i,criteria:l,quantityThreshold:c})=>{const s=a?`${a}22`:o?`${o}22`:void 0,d="minimum_order_value"!==(l??"minimum_order_value")?`Add ${c} item${1===(c??0)?"":"s"} or more`:`Buy items worth ${r}${n.toLocaleString()} or above`;return e.createElement(Ro,{className:"yt-cart-next-freebie-row",$backgroundColor:s},e.createElement("div",{className:"image-wrapper"},e.createElement("img",{src:i||"https://r2.yourtoken.io/image.png",alt:"Next freebie",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"})),e.createElement("div",{className:"content"},e.createElement("span",{className:"yt_title"},`Unlock ${t}`),e.createElement("span",{className:"yt_subtitle"},d)),e.createElement("div",{className:"lock"},e.createElement(pt,{size:16})))},Oo=()=>e.createElement("div",{className:"yt-cart-skeleton-loader-container"},e.createElement("div",{className:"yt-cart-skeleton-loader-item"},e.createElement("div",{className:"yt-cart-skeleton-loader-media"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},"")),e.createElement("div",{className:"yt-cart-skeleton-loader-item"},e.createElement("div",{className:"yt-cart-skeleton-loader-media"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},"")),e.createElement("div",{className:"yt-cart-skeleton-loader-item"},e.createElement("div",{className:"yt-cart-skeleton-loader-media"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},""),e.createElement("div",{className:"yt-cart-skeleton-loader-line"},""))),Vo=s.div`
|
|
1380
1380
|
padding: 5px 0;
|
|
1381
1381
|
position: relative;
|
|
1382
1382
|
|
|
@@ -1389,7 +1389,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
|
|
|
1389
1389
|
border-bottom: 0.8px solid rgb(135 135 135 / 50%);
|
|
1390
1390
|
width: calc(100% + 2rem);
|
|
1391
1391
|
}
|
|
1392
|
-
`,Wo=({addCartItem:t,handleDecrement:n,handleIncrement:r,removeCartItem:o,isDev:a,themeColor:i,primaryTextColor:l,secondaryTextColor:c,freeProduct:s,themeTextColor:d,showEditOptionOnProducts:p,productPercentageOffMapping:m,removeFreebieFromCart:u,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:f,freebieCouponTemplates:x,cartCheckpoints:y,freebieFlowCheckpoints:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:z,checkoutSectionMessage:F,checkoutSectionMessageRedirectLink:$,showFreebieMilestone:I,freebieMilestoneData:P,freeLabelText:D})=>{const A=se(tn),{cartLoading:L}=cn(),_=!L.cartLoading&&A?.items,R=(f??Number(A?.items_subtotal_price))/100;let M=!0,O=0;if(A?.items?.length>0)for(const e of A.items)e?.properties?._isYtFreebie&&(O+=e?.quantity);if(O===A?.item_count&&(M=!1),!_&&0===A?.item_count)return e.createElement(Oo,null);if(!(_&&0!==A?.item_count||A?.items))return null;const V=P?.campaignFilter??"all_campaigns";let W=[];"all_campaigns"===V?W=x??[]:"progress_bar_tiers"===V?W=y??[]:"freebie_campaigns"===V&&(W=h??[]);const H=Array.isArray(W)?W.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>e.minimumOrderValue-t.minimumOrderValue).find(e=>e.minimumOrderValue>R):void 0,j=mn(A,A?.currency);return e.createElement(e.Fragment,null,A.items.filter(e=>!!k||!(String(e?.id)===hn(String(C))||String(e?.id)===hn(String(E)))).map(s=>{const f=m?.[s?.key],y=x?.find(e=>e?._allVariantIds?.includes(String(s.id)));let h=!1;if(y&&R>=y.minimumOrderValue&&0===s?.line_price&&(h=!0),!k&&(String(s?.id)===hn(String(C))||hn(String(E))===String(s?.id)))return null;const F=s.discounts&&s.discounts.length>0;return s.properties?._isYtFreebie&&(f||h)&&F&&M?e.createElement(e.Fragment,null,e.createElement(Vo,{className:"yt-cart-product-card-wrapper",key:s?.key??s?.id},e.createElement(_o,{product:s,themeColor:i,isDev:a,primaryTextColor:l,secondaryTextColor:c,themeTextColor:d,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:f,imageAspectSelector:b,showDeleteOnFreebies:g,removeFreebieFromCart:u,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:!0,freeLabelText:D}))):e.createElement(Vo,{className:"yt-cart-product-card-wrapper",key:s?.key??s?.id},e.createElement(_o,{themeColor:i,handleDecrement:n,handleIncrement:r,removeCartItem:o,addCartItem:t,product:s,isDev:a,primaryTextColor:l,secondaryTextColor:c,showQtySelector:!s.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:u,showDeleteOnFreebies:g,imageAspectSelector:b,cartComponentsCornerRadius:v,cartComponentsCornerType:w,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:z,freeLabelText:D}))}),I&&M&&H&&e.createElement(Mo,{name:H.name,minimumOrderValue:H.minimumOrderValue,currency:j,themeColor:i,tertiaryColor:S,imageUrl:P?.milestoneImage?.path}),vn()&&F&&F.length>0?e.createElement("div",{className:"yt-cart-checkout-message yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:N,marginBottom:"4px",cursor:$?"pointer":"default"},onClick:()=>{$&&(window.location.href=$)}},F):e.createElement("div",{className:"yt-cart-products-list-separator",style:{display:"list-item",height:"12px",background:"#87878717"}}))};const Ho=({bundleProducts:t})=>{const n=se(tn);return e.createElement("div",{className:"yt-cart-bundle-container flex flex-col gap-y-2"},e.createElement("div",{className:"yt-cart-bundle-title flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"yt-cart-bundle-products flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"yt-cart-bundle-product-card w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},un(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},mn(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},mn(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},un(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},mn(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},mn(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"yt-cart-bundle-plus-icon absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"yt-cart-bundle-pricing flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",null,e.createElement("span",{className:"font-bold text-black"},mn(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},mn(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},mn(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"yt-cart-bundle-buy-button flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(ft,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},mn(n,n?.currency),t[0].price+t[1].price))))},jo=({backgroundSubdued:r,themeColor:a,themeTextColor:i,primaryTextColor:l,cartComponentsCornerRadius:c,applyCouponCode:s,removeDiscount:d,enableConfetti:p,hideAppliedCodes:m})=>{const u=se(tn),[g,f]=t(""),[x,y]=t(null),[h,b]=t(!1),[w,v]=t(!1),[C,E]=t(!1),{setLoading:k}=cn(),[T,S]=t(null),[N,B]=t(!1),[z,F]=t(!1),$=o(null);n(()=>{if(T){B(!0);const e=setTimeout(()=>{B(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}B(!1)},[T]),n(()=>{if(u&&u.discount_codes&&x){const e=u.discount_codes.find(e=>e.code===x);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(F(!0),setTimeout(()=>F(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),y(null))}},[u,x]);const I=async()=>{if(s&&g&&!h){S(null),b(!0),y(g);try{await s(g),f("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),y(null)}finally{b(!1)}}},P=async()=>{if(d&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await d()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},D="error"===T?.type,A=u?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{className:"yt-cart-apply-container",ref:$,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},z&&p&&e.createElement(Nr,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{className:"yt-cart-apply-input-wrapper",style:{display:"flex",alignItems:"stretch",border:D?"0.5px solid #FF4E4E":w?`1px solid ${a||"#007bff"}`:"1px solid #e0e0e0",borderRadius:c??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{className:"yt-cart-apply-input",type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:h,onFocus:()=>{v(!0),setTimeout(()=>{$.current&&window.innerWidth<=768&&$.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>v(!1),onChange:e=>{f(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&I()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:c??4,borderBottomLeftRadius:c??4,backgroundColor:r,color:l,boxShadow:"none",cursor:h?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{className:"yt-cart-apply-button",onClick:I,disabled:!g||h,style:{padding:"10px 15px",border:"none",backgroundColor:D?"#D98181":g?a||"#007bff":"#cccccc",color:g||D?i||"#ffffff":"#666666",cursor:!g||h?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:c??4,borderBottomRightRadius:c??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:h?.7:1}},h?e.createElement(fe,{color:i||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{className:"yt-cart-apply-status",style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:N?1:0,transform:N?"translateY(0)":"translateY(-10px)",maxHeight:N?"50px":"0",overflow:"hidden"}},T.message),!m&&A&&A.length>0&&e.createElement("div",{className:"yt-cart-apply-applied-list",style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},A.map(t=>e.createElement("div",{className:"yt-cart-apply-applied-item",key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{className:"yt-cart-apply-applied-badge",style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:r,paddingInlineStart:"6px",gap:"4px"}},e.createElement(at,{size:12,color:"#4D4D4D"}),e.createElement("span",{style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{className:"yt-cart-apply-remove-button",onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(fe,{color:a||"#007bff",size:14}):e.createElement(Ee,{size:16})))))))},qo="yt-coupon-selection-animations",Uo=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Zo=e=>e?.trim().toLowerCase()??"",Qo=e=>e.couponType?.toLowerCase()??"",Go=e=>"percentage_discount_coupon"===Qo(e),Yo=e=>"amount_discount_coupon"===Qo(e),Xo=e=>"free_delivery"===Qo(e),Ko=e=>{const t=Number(e);return Number.isFinite(t)&&t>0?t:0},Jo=e=>{const t=Number(e.toFixed(2)),n=Number.isInteger(t)?t.toFixed(0):t.toFixed(2);return wn(n)},ea=e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"},ta=(e,t,n,r)=>{const o=((e,t)=>{const n=Number(e.estimatedSavings);if(Number.isFinite(n)&&n>=0)return n;const r=(e.allowedCollections?.ids?.length??0)>0,o=Number(e.applicableSubtotal),a=Number.isFinite(o)&&o>=0?o:r?0:Ko(t);return Go(e)?a*(Ko(e.discountPercentage)/100):Yo(e)?Math.min(Ko(e.discountValue),a):Xo(e)?Ko(e.discountValue):0})(e,n),a=`${t}${Jo(o)}`,i=!1!==e.isEligible;let l=e.name;Go(e)&&e.discountPercentage?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${e.discountPercentage}% ${r.couponTextSuffix}`:`Get an additional ${e.discountPercentage}% off`:Yo(e)&&e.discountValue?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${t}${Jo(e.discountValue)} ${r.couponTextSuffix}`:`Get an additional ${t}${Jo(e.discountValue)} off`:Xo(e)&&(l="Get free shipping");let c="";return"minimum_quantity"===e.customCartProgressBarCriteria?e.quantityThreshold&&(c=`On orders with ${e.quantityThreshold}+ items.`):e.minimumOrderValue&&(c=`On purchases above ${t}${Jo(e.minimumOrderValue)}.`),{coupon:e,isUnlocked:i,estimatedSavings:o,title:l,subtitle:c,bannerTitle:o>0?r.preCollectionBannerPrefixText&&r.preCollectionBannerSuffixText?`${r.preCollectionBannerPrefixText} ${a} ${r.preCollectionBannerSuffixText}`:`Save extra ${a} on this order`:Xo(e)?"Claim free shipping on this order":l,appliedSavingsText:o>0?`saved extra ${a} off`:Xo(e)?"saved extra on shipping":Go(e)&&e.discountPercentage?`saved extra ${e.discountPercentage}% off`:"",bannerSavingsText:o>0?r.postCollectionBannerPrefixText&&r.postCollectionBannerSuffixText?`${r.postCollectionBannerPrefixText} ${a} ${r.postCollectionBannerSuffixText}`:`saved additional ${a} on your purchase`:Xo(e)?"saved additional shipping on your purchase":"coupon applied on your purchase",applicabilityText:ea(e)}},na=({rewardCoupons:a,couponSelectionData:i,applyCouponCode:l,removeDiscount:c,enableConfetti:s,backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,ctaButtonBackgroundColor:g,ctaButtonTextColor:f,cartComponentsCornerRadius:x})=>{const y=se(tn),h=o(null),b=o(null),w=o(null),v=o(!1),C=o(null),[E,k]=t(!1),[T,S]=t(!1),[N,B]=t(null),[z,F]=t(null),[$,I]=t(null),[P,D]=t(!1),[A,L]=t(null);n(()=>((()=>{if(document.getElementById(qo))return;const e=document.createElement("style");e.id=qo,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})(),()=>{Uo(h),Uo(b),Uo(w)}),[]);const _=r(()=>y?.discount_codes?.filter(e=>!1!==e?.applicable)??[],[y?.discount_codes]),R=_[0],V=mn(y,y?.currency),W=dn(y?.items_subtotal_price??y?.original_total_price??y?.total_price??0,y?.currency??"INR"),H=r(()=>((e,t,n,r,o)=>{const a=new Set(t.map(e=>Zo(e?.code)).filter(Boolean)),i=e.map(e=>ta(e,n,r,o));let l;const c=[];let s;for(const e of i)!l&&a.has(Zo(e.coupon.name))&&(l=e),e.isUnlocked&&(c.push(e),(!s||e.estimatedSavings>s.estimatedSavings)&&(s=e));return{couponDisplayModels:i,collectedCouponDisplay:l,unlockedCouponDisplays:c,bestUnlockedCouponDisplay:s,eligibleCouponCountText:1===c.length?"1 coupon eligible for your order":`${c.length}+ coupons eligible for your order`}})(a,_,V,W,i),[_,W,i,V,a]),j=()=>{C.current=null,F(null),B(null),Uo(w)},q=()=>{S(!1),k(!0)},U=()=>{T||(Uo(h),S(!0),h.current=setTimeout(()=>{h.current=null,v.current?window.history.back():(k(!1),S(!1))},280))};n(()=>{const e=H.collectedCouponDisplay;e&&C.current===e.coupon.couponTemplateId&&(j(),I(null),L(e.coupon.couponTemplateId),Uo(b),b.current=setTimeout(()=>{L(null),U(),b.current=null},1200))},[H.collectedCouponDisplay,T]),n(()=>{if(!E)return;v.current||(window.history.pushState({couponSelectionOpen:!0},""),v.current=!0);const e=()=>{v.current=!1,Uo(h),k(!1),S(!1)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[E]);const Z=async e=>{if(null===N&&!P&&!1!==e.isEligible&&e.name)if(l){Uo(w),I(null),B(e.couponTemplateId),F(e.couponTemplateId),C.current=e.couponTemplateId;try{await l(e.name),C.current===e.couponTemplateId&&(w.current=setTimeout(()=>{C.current===e.couponTemplateId&&(C.current=null,F(null),B(null),I(e.couponTemplateId)),w.current=null},2500))}catch(t){console.error("Failed to collect coupon:",t),C.current=null,F(null),B(null),I(e.couponTemplateId)}}else I(e.couponTemplateId)},Q=async()=>{if(c&&!P){D(!0);try{await c(),L(null),I(null),j()}catch(e){console.error("Failed to remove coupon:",e)}finally{D(!1)}}},G=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),q())},Y=t=>{const{coupon:n}=t,r=n.couponTemplateId===H.collectedCouponDisplay?.coupon.couponTemplateId,o=N===n.couponTemplateId;n.couponTemplateId;const a=A===n.couponTemplateId,l=!r&&!t.isUnlocked,s=$===n.couponTemplateId,d=o||P||l||r&&!c,m=r?"Remove":i.applyButtonText||"Apply";return e.createElement("div",{className:`yt-cart-coupon-selection-card${r?" yt-cart-coupon-selection-card-selected":""}${l?" yt-cart-coupon-selection-card-ineligible":""}`,key:n.couponTemplateId,style:{border:r?`1.5px solid ${p||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:x??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:a?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-body",style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},a&&e.createElement("div",{className:"yt-cart-coupon-selection-card-checkmark",style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{className:"yt-cart-coupon-selection-card-header",style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-icon",style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ae,{size:18,color:l?"#6b7280":"#8B0000"})),e.createElement("div",{className:"yt-cart-coupon-selection-card-text",style:{flex:1}},e.createElement("div",{className:"yt-cart-coupon-selection-card-title",style:{fontSize:"14px",fontWeight:600,color:u||"#1A1A1A",marginBottom:"2px"}},t.title),e.createElement("div",{className:"yt-cart-coupon-selection-card-subtitle",style:{fontSize:"12px",color:l?"#6b7280":"#2E7D32",fontWeight:500}},t.subtitle))),e.createElement("div",{className:"yt-cart-coupon-selection-code-row",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:x??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{className:"yt-cart-coupon-selection-code",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",letterSpacing:"0.5px"}},n.name),e.createElement("button",{className:"yt-cart-coupon-selection-action","aria-label":r?`Remove ${n.name}`:`Apply ${n.name}`,onClick:e=>{e.stopPropagation(),r?Q():Z(n)},disabled:d,style:{background:"none",border:"none",color:l?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:d?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||r&&P?e.createElement(fe,{color:"#8B0000",size:14}):m)),s&&e.createElement("div",{className:"yt-cart-coupon-selection-error",style:{color:"#B91C1C",fontSize:"12px",marginTop:"8px"}},"Could not apply this coupon. Try another offer.")),e.createElement("div",{className:"yt-cart-coupon-selection-applicability",style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:l?"#6b7280":"#8B0000",borderTop:"1px solid #FECACA"}},t.applicabilityText))};return e.createElement(e.Fragment,null,(()=>{const t=H.collectedCouponDisplay,n=H.bestUnlockedCouponDisplay,r=!!t||!!R,o=H.unlockedCouponDisplays.length>0,a=!r&&!!n,l=n?.coupon,c=l&&N===l.couponTemplateId,s=t?.coupon.name??R?.code??"",d=t?"#2E7D32":"#8B0000",y=t?"#2E7D32":"#666666";return e.createElement("div",{className:"yt-cart-coupon-selection-banner-container",style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner",onClick:q,onKeyDown:G,role:"button",tabIndex:0,"aria-label":"Open coupons and offers",style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px dashed #E8E8E8",borderRadius:x??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner-icon",style:{width:36,height:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},t?e.createElement(at,{size:20,color:d}):e.createElement(ae,{size:20,color:d})),e.createElement("div",{className:"yt-cart-coupon-selection-banner-content",style:{flex:1,minWidth:0}},r?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",color:u||"#1A1A1A"}},e.createElement("span",{className:"yt-cart-coupon-selection-banner-code",style:{fontWeight:600}},s),e.createElement("span",{className:"yt-cart-coupon-selection-banner-applied",style:{fontStyle:"italic"}}," ","applied!")),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:y,marginTop:"1px",fontStyle:t?"italic":"normal"}},t?.bannerSavingsText??"coupon applied on your purchase")):a&&n?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",lineHeight:1.25}},n.bannerTitle),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#8B0000",marginTop:"2px"}},"view all offers →")):e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"view available offers"))),a&&l?e.createElement("button",{className:"yt-cart-coupon-selection-banner-collect","aria-label":`Apply ${l.name}`,onClick:e=>{e.stopPropagation(),Z(l)},disabled:!!c||P,style:{borderRadius:x??8,border:`1.5px solid ${g||p||"#315A9F"}`,backgroundColor:g||p||"#EEF4FF",color:f||m||"#FFFFFF",fontSize:"16px",fontWeight:700,cursor:c||P?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"12px",flexShrink:0,padding:c?"6px":"5px 9px"}},c?e.createElement(fe,{color:f||m||"#FFFFFF",size:16}):i.applyButtonText||"Apply"):e.createElement(M,{className:"yt-cart-coupon-selection-banner-arrow",size:14,color:"#888888"})),!r&&o&&e.createElement("div",{className:"yt-cart-coupon-selection-eligible-count",style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#8B0000",backgroundColor:"#FFF0F0",padding:"6px 0",borderRadius:`0 0 ${x??8}px ${x??8}px`,marginTop:"-1px",border:"1px dashed #FECACA",borderTop:"none"}},H.eligibleCouponCountText))})(),E&&(()=>{const t=H.unlockedCouponDisplays.length>0;return e.createElement("div",{className:"yt-cart-coupon-selection-overlay",style:{position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:T?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{className:"yt-cart-coupon-selection-overlay-header",style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{className:"yt-cart-coupon-selection-back-button","aria-label":"Close coupons and offers",onClick:U,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(O,{size:18,color:u||"#1A1A1A"})),e.createElement("span",{className:"yt-cart-coupon-selection-overlay-title",style:{fontSize:"18px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-overlay-content",style:{flex:1,overflowY:"auto"}},R&&e.createElement("div",{className:"yt-cart-coupon-selection-applied-badge",style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(at,{size:16,color:"#333333"}),e.createElement("span",{className:"yt-cart-coupon-selection-applied-code",style:{fontWeight:700,fontSize:"14px",color:u||"#1A1A1A"}},R.code),e.createElement("span",{className:"yt-cart-coupon-selection-applied-text",style:{fontStyle:"italic",fontSize:"14px",color:u||"#1A1A1A"}},"applied!"),e.createElement("button",{className:"yt-cart-coupon-selection-applied-remove","aria-label":`Remove ${R.code}`,onClick:Q,disabled:P||!c,style:{background:"none",border:"none",cursor:P||!c?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},P?e.createElement(fe,{color:"#666",size:14}):e.createElement(Ee,{size:18,color:"#666666"})),H.collectedCouponDisplay?.appliedSavingsText&&e.createElement("span",{className:"yt-cart-coupon-selection-applied-savings",style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},H.collectedCouponDisplay.appliedSavingsText)),e.createElement("div",{className:"yt-cart-coupon-selection-apply-section"},e.createElement(jo,{backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,cartComponentsCornerRadius:x,applyCouponCode:l,removeDiscount:c,enableConfetti:s,hideAppliedCodes:!0})),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-collect-section",style:{padding:"16px"}},e.createElement("div",{className:"yt-cart-coupon-selection-collect-title",style:{fontSize:"16px",fontWeight:700,color:u||"#1A1A1A",marginBottom:"4px"}},t?"Collect Coupon":"Available Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-collect-subtitle",style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},t?"Pick any one coupon deal":"No coupons are currently unlocked for this cart"),e.createElement("div",{className:"yt-cart-coupon-selection-list"},H.couponDisplayModels.map(Y)))))})())},ra=pe("showGSTInput",!1),oa=s.div`
|
|
1392
|
+
`,Wo=({addCartItem:t,handleDecrement:n,handleIncrement:r,removeCartItem:o,isDev:a,themeColor:i,primaryTextColor:l,secondaryTextColor:c,freeProduct:s,themeTextColor:d,showEditOptionOnProducts:p,productPercentageOffMapping:m,removeFreebieFromCart:u,showDeleteOnFreebies:g,freeProductAdjustedCartTotal:f,freebieCouponTemplates:x,cartCheckpoints:y,freebieFlowCheckpoints:h,imageAspectSelector:b,cartComponentsCornerType:w,cartComponentsCornerRadius:v,giftWrapProductId:C,giftWrapVariantId:E,showGiftWrapAsLineItem:k=!1,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:z,checkoutSectionMessage:F,checkoutSectionMessageRedirectLink:$,showFreebieMilestone:I,freebieMilestoneData:P,freeLabelText:D,customCartProgressBarCriteria:A,effectiveQuantityForProgressBar:L})=>{const _=se(tn),{cartLoading:R}=cn(),M=!R.cartLoading&&_?.items,O=(f??Number(_?.items_subtotal_price))/100;let V=!0,W=0;if(_?.items?.length>0)for(const e of _.items)e?.properties?._isYtFreebie&&(W+=e?.quantity);if(W===_?.item_count&&(V=!1),!M&&0===_?.item_count)return e.createElement(Oo,null);if(!(M&&0!==_?.item_count||_?.items))return null;const H=P?.campaignFilter??"all_campaigns";let j=[];"all_campaigns"===H?j=x??[]:"progress_bar_tiers"===H?j=y??[]:"freebie_campaigns"===H&&(j=h??[]);const q="minimum_order_value"!==(A??"minimum_order_value"),U=q?L??_?.item_count??0:O,Z=e=>q?e.quantityThreshold:e.minimumOrderValue,Q=Array.isArray(j)?j.filter(e=>"free_product"===e?.couponType).slice().sort((e,t)=>Z(e)-Z(t)).find(e=>Z(e)>U):void 0,G=mn(_,_?.currency);return e.createElement(e.Fragment,null,_.items.filter(e=>!!k||!(String(e?.id)===hn(String(C))||String(e?.id)===hn(String(E)))).map(s=>{const f=m?.[s?.key],y=x?.find(e=>e?._allVariantIds?.includes(String(s.id)));let h=!1;if(y&&O>=y.minimumOrderValue&&0===s?.line_price&&(h=!0),!k&&(String(s?.id)===hn(String(C))||hn(String(E))===String(s?.id)))return null;const F=s.discounts&&s.discounts.length>0;return s.properties?._isYtFreebie&&(f||h)&&F&&V?e.createElement(e.Fragment,null,e.createElement(Vo,{className:"yt-cart-product-card-wrapper",key:s?.key??s?.id},e.createElement(_o,{product:s,themeColor:i,isDev:a,primaryTextColor:l,secondaryTextColor:c,themeTextColor:d,showQtySelector:!1,showEditOptionOnProducts:p,percentageOff:f,imageAspectSelector:b,showDeleteOnFreebies:g,removeFreebieFromCart:u,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:!0,freeLabelText:D}))):e.createElement(Vo,{className:"yt-cart-product-card-wrapper",key:s?.key??s?.id},e.createElement(_o,{themeColor:i,handleDecrement:n,handleIncrement:r,removeCartItem:o,addCartItem:t,product:s,isDev:a,primaryTextColor:l,secondaryTextColor:c,showQtySelector:!s.properties?._isYtFreebie,showEditOptionOnProducts:p,removeFreebieFromCart:u,showDeleteOnFreebies:g,imageAspectSelector:b,cartComponentsCornerRadius:v,cartComponentsCornerType:w,backgroundSubdued:T,tertiaryColor:S,tertiaryTextColor:N,backgroundColor:B,showDiscountOnMRP:z,freeLabelText:D}))}),I&&V&&Q&&e.createElement(Mo,{name:Q.name,minimumOrderValue:Q.minimumOrderValue,currency:G,themeColor:i,tertiaryColor:S,imageUrl:P?.milestoneImage?.path,criteria:A??"minimum_order_value",quantityThreshold:Q.quantityThreshold}),vn()&&F&&F.length>0?e.createElement("div",{className:"yt-cart-checkout-message yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:S,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:N,marginBottom:"4px",cursor:$?"pointer":"default"},onClick:()=>{$&&(window.location.href=$)}},F):e.createElement("div",{className:"yt-cart-products-list-separator",style:{display:"list-item",height:"12px",background:"#87878717"}}))};const Ho=({bundleProducts:t})=>{const n=se(tn);return e.createElement("div",{className:"yt-cart-bundle-container flex flex-col gap-y-2"},e.createElement("div",{className:"yt-cart-bundle-title flex items-center justify-center"},e.createElement("span",{className:"font-semibold"},"Save more with Bundle!")),e.createElement("div",{className:"yt-cart-bundle-products flex items-center justify-center gap-2 relative"},e.createElement("div",{className:"yt-cart-bundle-product-card w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[0].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},un(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},mn(n,n?.currency),t[0].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},mn(n,n?.currency),t[0].price)),t[0]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"w-48 h-48 flex flex-col justify-center border-[1px] p-2 border-[#B0B0B0]"},e.createElement("img",{style:{alignSelf:"center"},width:100,height:100,src:t[1].image}),e.createElement("span",{className:"text-[12.5px] text-[#667085] font-semibold"},un(t[0].title)),e.createElement("div",null,e.createElement("span",{className:"text-[#344054] text-[14px] font-bold"},mn(n,n?.currency),t[1].original_price)," ",e.createElement("span",{className:"line-through text-[#667085] text-[12px]"},mn(n,n?.currency),t[1].price)),t[1]?.options_with_values?.length>0&&e.createElement("div",{className:"flex flex-col"},t[0]?.options_with_values?.map(t=>{if("Title"!==t.name)return e.createElement("span",{className:"text-[10px] text-[#868E96]"},t.name,": ",t.value)}))),e.createElement("div",{className:"yt-cart-bundle-plus-icon absolute",style:{left:"50%",transform:"translateX(-50%)"}},e.createElement("img",{src:'<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="17.2797" cy="18.7208" r="15.5219" fill="#3A3A3A" stroke="#767676" stroke-width="1.51433"/>\n<path d="M15.5903 25.9172V12.1037H19.0827V25.9172H15.5903ZM10.4297 20.7566V17.2642H24.2433V20.7566H10.4297Z" fill="white"/>\n</svg>',alt:"Delivery Truck",height:"25px",width:"42px"}))),e.createElement("div",{className:"yt-cart-bundle-pricing flex flex-row justify-between items-center"},e.createElement("div",{className:"flex flex-row gap-x-4 items-center"},e.createElement("span",{className:"text-[#667085] text-[13px]"},"Total Price"),e.createElement("span",null,e.createElement("span",{className:"font-bold text-black"},mn(n,n?.currency),t[0].price+t[1].price)," ",e.createElement("span",{className:"text-[#868E96] text-[12px] line-through"},mn(n,n?.currency),t[0].original_price+t[1].original_price))),e.createElement("span",{className:"text-[#1ADF5D] text-[10px]"},"save extra"," ",e.createElement("span",{className:"font-semibold"},mn(n,n?.currency),t[0].original_price-t[0].price+(t[1].original_price-t[1].price)))),e.createElement("button",{className:"yt-cart-bundle-buy-button flex flex-row items-center bg-[#333333] gap-x-3 justify-center w-full py-1.5"},e.createElement(ft,{color:"white"}),e.createElement("span",{className:"text-white uppercase text-[14px]"},"Buy Bundle at"," ",e.createElement("span",{className:"font-semibold"},mn(n,n?.currency),t[0].price+t[1].price))))},jo=({backgroundSubdued:r,themeColor:a,themeTextColor:i,primaryTextColor:l,cartComponentsCornerRadius:c,applyCouponCode:s,removeDiscount:d,enableConfetti:p,hideAppliedCodes:m})=>{const u=se(tn),[g,f]=t(""),[x,y]=t(null),[h,b]=t(!1),[w,v]=t(!1),[C,E]=t(!1),{setLoading:k}=cn(),[T,S]=t(null),[N,B]=t(!1),[z,F]=t(!1),$=o(null);n(()=>{if(T){B(!0);const e=setTimeout(()=>{B(!1)},4e3),t=setTimeout(()=>{S(null)},4500);return()=>{clearTimeout(e),clearTimeout(t)}}B(!1)},[T]),n(()=>{if(u&&u.discount_codes&&x){const e=u.discount_codes.find(e=>e.code===x);e&&(e.applicable?(S({message:"Coupon applied successfully!",type:"success"}),p&&(F(!0),setTimeout(()=>F(!1),5e3))):S({message:"Coupon not applicable",type:"error"}),y(null))}},[u,x]);const I=async()=>{if(s&&g&&!h){S(null),b(!0),y(g);try{await s(g),f("")}catch(e){S({message:"Failed to apply coupon.",type:"error"}),y(null)}finally{b(!1)}}},P=async()=>{if(d&&!C){S(null),E(!0),k&&k(!0,!1,!1,!0);try{await d()}catch(e){S({message:"Failed to remove coupon.",type:"error"})}finally{k&&k(!1,!1,!1,!1),E(!1)}}},D="error"===T?.type,A=u?.discount_codes?.filter(e=>!1!==e?.applicable);return e.createElement("div",{className:"yt-cart-apply-container",ref:$,style:{marginTop:"10px",padding:"0 16px",marginBottom:"10px"}},z&&p&&e.createElement(Nr,{particleCount:100,spread:160,origin:{y:.6},checkpointPosition:.5}),e.createElement("div",{className:"yt-cart-apply-input-wrapper",style:{display:"flex",alignItems:"stretch",border:D?"0.5px solid #FF4E4E":w?`1px solid ${a||"#007bff"}`:"1px solid #e0e0e0",borderRadius:c??4,transition:"border-color 0.5s ease-in-out",overflow:"hidden"}},e.createElement("input",{className:"yt-cart-apply-input",type:"text",placeholder:"Have a Coupon Code?",value:g,disabled:h,onFocus:()=>{v(!0),setTimeout(()=>{$.current&&window.innerWidth<=768&&$.current.scrollIntoView({behavior:"smooth",block:"nearest"})},300)},onBlur:()=>v(!1),onChange:e=>{f(e.target.value),T&&S(null)},onKeyDown:e=>{"Enter"===e.key&&I()},style:{flexGrow:1,border:"none",padding:"10px",outline:"none",fontSize:"14px",fontWeight:"bold",borderTopLeftRadius:c??4,borderBottomLeftRadius:c??4,backgroundColor:r,color:l,boxShadow:"none",cursor:h?"not-allowed":"auto",margin:"0"}}),e.createElement("button",{className:"yt-cart-apply-button",onClick:I,disabled:!g||h,style:{padding:"10px 15px",border:"none",backgroundColor:D?"#D98181":g?a||"#007bff":"#cccccc",color:g||D?i||"#ffffff":"#666666",cursor:!g||h?"not-allowed":"pointer",fontSize:"14px",fontWeight:"bold",borderTopRightRadius:c??4,borderBottomRightRadius:c??4,transition:"background-color 0.5s ease-in-out, opacity 0.2s ease-in-out",minWidth:"80px",display:"flex",justifyContent:"center",alignItems:"center",opacity:h?.7:1}},h?e.createElement(fe,{color:i||"#ffffff",size:18}):"Apply")),T&&e.createElement("div",{className:"yt-cart-apply-status",style:{color:"success"===T.type?"#28a745":"#dc3545",fontSize:"12px",marginTop:"4px",fontStyle:"italic",transition:"opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out",opacity:N?1:0,transform:N?"translateY(0)":"translateY(-10px)",maxHeight:N?"50px":"0",overflow:"hidden"}},T.message),!m&&A&&A.length>0&&e.createElement("div",{className:"yt-cart-apply-applied-list",style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"8px"}},A.map(t=>e.createElement("div",{className:"yt-cart-apply-applied-item",key:t.code,style:{display:"flex",alignItems:"center",fontSize:"12px",fontStyle:"italic"}},e.createElement("div",{className:"yt-cart-apply-applied-badge",style:{display:"flex",alignItems:"center",color:"#333333",backgroundColor:r,paddingInlineStart:"6px",gap:"4px"}},e.createElement(at,{size:12,color:"#4D4D4D"}),e.createElement("span",{style:{fontWeight:"bold",fontStyle:"normal"}},t.code)," applied!",e.createElement("button",{className:"yt-cart-apply-remove-button",onClick:P,disabled:C,style:{background:"#E2E2E2",border:"0.5px solid #B5B5B5",cursor:"pointer",marginLeft:"4px",padding:"0",display:"flex",alignItems:"center"}},C?e.createElement(fe,{color:a||"#007bff",size:14}):e.createElement(Ee,{size:16})))))))},qo="yt-coupon-selection-animations",Uo=e=>{e.current&&(clearTimeout(e.current),e.current=null)},Zo=e=>e?.trim().toLowerCase()??"",Qo=e=>e.couponType?.toLowerCase()??"",Go=e=>"percentage_discount_coupon"===Qo(e),Yo=e=>"amount_discount_coupon"===Qo(e),Xo=e=>"free_delivery"===Qo(e),Ko=e=>{const t=Number(e);return Number.isFinite(t)&&t>0?t:0},Jo=e=>{const t=Number(e.toFixed(2)),n=Number.isInteger(t)?t.toFixed(0):t.toFixed(2);return wn(n)},ea=e=>{const t=e.resolvedCollectionNames;return t&&t.length>0?1===t.length?`Applicable on '${t[0]}' collection only.`:`Applicable on '${t.join("', '")}' collections.`:e.allowedCollections?.ids&&e.allowedCollections.ids.length>0?"Applicable on select collections.":"Applicable storewide"},ta=(e,t,n,r)=>{const o=((e,t)=>{const n=Number(e.estimatedSavings);if(Number.isFinite(n)&&n>=0)return n;const r=(e.allowedCollections?.ids?.length??0)>0,o=Number(e.applicableSubtotal),a=Number.isFinite(o)&&o>=0?o:r?0:Ko(t);return Go(e)?a*(Ko(e.discountPercentage)/100):Yo(e)?Math.min(Ko(e.discountValue),a):Xo(e)?Ko(e.discountValue):0})(e,n),a=`${t}${Jo(o)}`,i=!1!==e.isEligible;let l=e.name;Go(e)&&e.discountPercentage?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${e.discountPercentage}% ${r.couponTextSuffix}`:`Get an additional ${e.discountPercentage}% off`:Yo(e)&&e.discountValue?l=r.couponTextPrefix&&r.couponTextSuffix?`${r.couponTextPrefix} ${t}${Jo(e.discountValue)} ${r.couponTextSuffix}`:`Get an additional ${t}${Jo(e.discountValue)} off`:Xo(e)&&(l="Get free shipping");let c="";return"minimum_quantity"===e.customCartProgressBarCriteria?e.quantityThreshold&&(c=`On orders with ${e.quantityThreshold}+ items.`):e.minimumOrderValue&&(c=`On purchases above ${t}${Jo(e.minimumOrderValue)}.`),{coupon:e,isUnlocked:i,estimatedSavings:o,title:l,subtitle:c,bannerTitle:o>0?r.preCollectionBannerPrefixText&&r.preCollectionBannerSuffixText?`${r.preCollectionBannerPrefixText} ${a} ${r.preCollectionBannerSuffixText}`:`Save extra ${a} on this order`:Xo(e)?"Claim free shipping on this order":l,appliedSavingsText:o>0?`saved extra ${a} off`:Xo(e)?"saved extra on shipping":Go(e)&&e.discountPercentage?`saved extra ${e.discountPercentage}% off`:"",bannerSavingsText:o>0?r.postCollectionBannerPrefixText&&r.postCollectionBannerSuffixText?`${r.postCollectionBannerPrefixText} ${a} ${r.postCollectionBannerSuffixText}`:`saved additional ${a} on your purchase`:Xo(e)?"saved additional shipping on your purchase":"coupon applied on your purchase",applicabilityText:ea(e)}},na=({rewardCoupons:a,couponSelectionData:i,applyCouponCode:l,removeDiscount:c,enableConfetti:s,backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,ctaButtonBackgroundColor:g,ctaButtonTextColor:f,cartComponentsCornerRadius:x})=>{const y=se(tn),h=o(null),b=o(null),w=o(null),v=o(!1),C=o(null),[E,k]=t(!1),[T,S]=t(!1),[N,B]=t(null),[z,F]=t(null),[$,I]=t(null),[P,D]=t(!1),[A,L]=t(null);n(()=>((()=>{if(document.getElementById(qo))return;const e=document.createElement("style");e.id=qo,e.textContent="\n @keyframes ytSlideUp {\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n }\n @keyframes ytSlideDown {\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n }\n @keyframes ytSuccessPulse {\n 0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.4); }\n 50% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }\n 100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }\n }\n @keyframes ytCheckFade {\n 0% { opacity: 0; transform: scale(0.5); }\n 50% { opacity: 1; transform: scale(1.2); }\n 100% { opacity: 1; transform: scale(1); }\n }\n ",document.head.appendChild(e)})(),()=>{Uo(h),Uo(b),Uo(w)}),[]);const _=r(()=>y?.discount_codes?.filter(e=>!1!==e?.applicable)??[],[y?.discount_codes]),R=_[0],V=mn(y,y?.currency),W=dn(y?.items_subtotal_price??y?.original_total_price??y?.total_price??0,y?.currency??"INR"),H=r(()=>((e,t,n,r,o)=>{const a=new Set(t.map(e=>Zo(e?.code)).filter(Boolean)),i=e.map(e=>ta(e,n,r,o));let l;const c=[];let s;for(const e of i)!l&&a.has(Zo(e.coupon.name))&&(l=e),e.isUnlocked&&(c.push(e),(!s||e.estimatedSavings>s.estimatedSavings)&&(s=e));return{couponDisplayModels:i,collectedCouponDisplay:l,unlockedCouponDisplays:c,bestUnlockedCouponDisplay:s,eligibleCouponCountText:1===c.length?"1 coupon eligible for your order":`${c.length}+ coupons eligible for your order`}})(a,_,V,W,i),[_,W,i,V,a]),j=()=>{C.current=null,F(null),B(null),Uo(w)},q=()=>{S(!1),k(!0)},U=()=>{T||(Uo(h),S(!0),h.current=setTimeout(()=>{h.current=null,v.current?window.history.back():(k(!1),S(!1))},280))};n(()=>{const e=H.collectedCouponDisplay;e&&C.current===e.coupon.couponTemplateId&&(j(),I(null),L(e.coupon.couponTemplateId),Uo(b),b.current=setTimeout(()=>{L(null),U(),b.current=null},1200))},[H.collectedCouponDisplay,T]),n(()=>{if(!E)return;v.current||(window.history.pushState({couponSelectionOpen:!0},""),v.current=!0);const e=()=>{v.current=!1,Uo(h),k(!1),S(!1)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[E]);const Z=async e=>{if(null===N&&!P&&!1!==e.isEligible&&e.name)if(l){Uo(w),I(null),B(e.couponTemplateId),F(e.couponTemplateId),C.current=e.couponTemplateId;try{await l(e.name),C.current===e.couponTemplateId&&(w.current=setTimeout(()=>{C.current===e.couponTemplateId&&(C.current=null,F(null),B(null),I(e.couponTemplateId)),w.current=null},2500))}catch(t){console.error("Failed to collect coupon:",t),C.current=null,F(null),B(null),I(e.couponTemplateId)}}else I(e.couponTemplateId)},Q=async()=>{if(c&&!P){D(!0);try{await c(),L(null),I(null),j()}catch(e){console.error("Failed to remove coupon:",e)}finally{D(!1)}}},G=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),q())},Y=t=>{const{coupon:n}=t,r=n.couponTemplateId===H.collectedCouponDisplay?.coupon.couponTemplateId,o=N===n.couponTemplateId;n.couponTemplateId;const a=A===n.couponTemplateId,l=!r&&!t.isUnlocked,s=$===n.couponTemplateId,d=o||P||l||r&&!c,m=r?"Remove":i.applyButtonText||"Apply";return e.createElement("div",{className:`yt-cart-coupon-selection-card${r?" yt-cart-coupon-selection-card-selected":""}${l?" yt-cart-coupon-selection-card-ineligible":""}`,key:n.couponTemplateId,style:{border:r?`1.5px solid ${p||"#4A7C59"}`:"1px solid #E8E8E8",borderRadius:x??8,overflow:"hidden",marginBottom:"12px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",animation:a?"ytSuccessPulse 0.6s ease-out":void 0,transition:"border-color 0.3s ease, box-shadow 0.3s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-body",style:{padding:"14px 16px",background:"linear-gradient(135deg, #FFFFFF 60%, #FFF5F5 100%)",position:"relative"}},a&&e.createElement("div",{className:"yt-cart-coupon-selection-card-checkmark",style:{position:"absolute",top:"10px",right:"10px",width:24,height:24,borderRadius:"50%",backgroundColor:"#2E7D32",display:"flex",alignItems:"center",justifyContent:"center",animation:"ytCheckFade 0.4s ease-out forwards"}},e.createElement("span",{style:{color:"#fff",fontSize:"14px",fontWeight:700}},"✓")),e.createElement("div",{className:"yt-cart-coupon-selection-card-header",style:{display:"flex",alignItems:"flex-start",gap:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-card-icon",style:{width:32,height:32,borderRadius:4,backgroundColor:"#FDE8E8",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},e.createElement(ae,{size:18,color:l?"#6b7280":"#8B0000"})),e.createElement("div",{className:"yt-cart-coupon-selection-card-text",style:{flex:1}},e.createElement("div",{className:"yt-cart-coupon-selection-card-title",style:{fontSize:"14px",fontWeight:600,color:u||"#1A1A1A",marginBottom:"2px"}},t.title),e.createElement("div",{className:"yt-cart-coupon-selection-card-subtitle",style:{fontSize:"12px",color:l?"#6b7280":"#2E7D32",fontWeight:500}},t.subtitle))),e.createElement("div",{className:"yt-cart-coupon-selection-code-row",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"12px",border:"1px solid #E0E0E0",borderRadius:x??6,padding:"8px 12px",backgroundColor:"#FAFAFA"}},e.createElement("span",{className:"yt-cart-coupon-selection-code",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",letterSpacing:"0.5px"}},n.name),e.createElement("button",{className:"yt-cart-coupon-selection-action","aria-label":r?`Remove ${n.name}`:`Apply ${n.name}`,onClick:e=>{e.stopPropagation(),r?Q():Z(n)},disabled:d,style:{background:"none",border:"none",color:l?"#6b7280":"#8B0000",fontSize:"14px",fontWeight:600,cursor:d?"not-allowed":"pointer",padding:0,display:"flex",alignItems:"center",gap:"4px"}},o||r&&P?e.createElement(fe,{color:"#8B0000",size:14}):m)),s&&e.createElement("div",{className:"yt-cart-coupon-selection-error",style:{color:"#B91C1C",fontSize:"12px",marginTop:"8px"}},"Could not apply this coupon. Try another offer.")),e.createElement("div",{className:"yt-cart-coupon-selection-applicability",style:{padding:"6px 16px",fontSize:"11px",fontWeight:500,textAlign:"center",backgroundColor:"#FFF0F0",color:l?"#6b7280":"#8B0000",borderTop:"1px solid #FECACA"}},t.applicabilityText))};return e.createElement(e.Fragment,null,(()=>{const t=H.collectedCouponDisplay,n=H.bestUnlockedCouponDisplay,r=!!t||!!R,o=H.unlockedCouponDisplays.length>0,a=!r&&!!n,l=n?.coupon,c=l&&N===l.couponTemplateId,s=t?.coupon.name??R?.code??"",d=t?"#2E7D32":"#8B0000",y=t?"#2E7D32":"#666666";return e.createElement("div",{className:"yt-cart-coupon-selection-banner-container",style:{padding:"0 16px",marginTop:"10px",marginBottom:"10px"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner",onClick:q,onKeyDown:G,role:"button",tabIndex:0,"aria-label":"Open coupons and offers",style:{display:"flex",alignItems:"center",padding:"12px 14px",border:"1px dashed #E8E8E8",borderRadius:x??8,cursor:"pointer",backgroundColor:"#FFFFFF",transition:"box-shadow 0.2s ease"}},e.createElement("div",{className:"yt-cart-coupon-selection-banner-icon",style:{width:36,height:36,borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginRight:"12px",transition:"background-color 0.3s ease"}},t?e.createElement(at,{size:20,color:d}):e.createElement(ae,{size:20,color:d})),e.createElement("div",{className:"yt-cart-coupon-selection-banner-content",style:{flex:1,minWidth:0}},r?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",color:u||"#1A1A1A"}},e.createElement("span",{className:"yt-cart-coupon-selection-banner-code",style:{fontWeight:600}},s),e.createElement("span",{className:"yt-cart-coupon-selection-banner-applied",style:{fontStyle:"italic"}}," ","applied!")),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:y,marginTop:"1px",fontStyle:t?"italic":"normal"}},t?.bannerSavingsText??"coupon applied on your purchase")):a&&n?e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A",lineHeight:1.25}},n.bannerTitle),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#8B0000",marginTop:"2px"}},"view all offers →")):e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-coupon-selection-banner-title",style:{fontSize:"14px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-banner-subtitle",style:{fontSize:"12px",color:"#888888",marginTop:"1px"}},"view available offers"))),a&&l?e.createElement("button",{className:"yt-cart-coupon-selection-banner-collect","aria-label":`Apply ${l.name}`,onClick:e=>{e.stopPropagation(),Z(l)},disabled:!!c||P,style:{borderRadius:x??8,border:`1.5px solid ${g||p||"#315A9F"}`,backgroundColor:g||p||"#EEF4FF",color:f||m||"#FFFFFF",fontSize:"16px",fontWeight:700,cursor:c||P?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"12px",flexShrink:0,padding:c?"6px":"5px 9px"}},c?e.createElement(fe,{color:f||m||"#FFFFFF",size:16}):i.applyButtonText||"Apply"):e.createElement(M,{className:"yt-cart-coupon-selection-banner-arrow",size:14,color:"#888888"})),!r&&o&&e.createElement("div",{className:"yt-cart-coupon-selection-eligible-count",style:{textAlign:"center",fontSize:"12px",fontWeight:600,color:"#8B0000",backgroundColor:"#FFF0F0",padding:"6px 0",borderRadius:`0 0 ${x??8}px ${x??8}px`,marginTop:"-1px",border:"1px dashed #FECACA",borderTop:"none"}},H.eligibleCouponCountText))})(),E&&(()=>{const t=H.unlockedCouponDisplays.length>0;return e.createElement("div",{className:"yt-cart-coupon-selection-overlay",style:{position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",backgroundColor:"#FFFFFF",zIndex:2147483645,display:"flex",flexDirection:"column",animation:T?"ytSlideDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards":"ytSlideUp 0.32s cubic-bezier(0, 0, 0.2, 1) forwards"}},e.createElement("div",{className:"yt-cart-coupon-selection-overlay-header",style:{display:"flex",alignItems:"center",padding:"16px",flexShrink:0}},e.createElement("button",{className:"yt-cart-coupon-selection-back-button","aria-label":"Close coupons and offers",onClick:U,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",display:"flex",alignItems:"center",marginRight:"12px"}},e.createElement(O,{size:18,color:u||"#1A1A1A"})),e.createElement("span",{className:"yt-cart-coupon-selection-overlay-title",style:{fontSize:"18px",fontWeight:700,color:u||"#1A1A1A"}},"Coupons and Offers")),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-overlay-content",style:{flex:1,overflowY:"auto"}},R&&e.createElement("div",{className:"yt-cart-coupon-selection-applied-badge",style:{display:"flex",alignItems:"center",padding:"12px 16px",gap:"8px",flexWrap:"wrap"}},e.createElement(at,{size:16,color:"#333333"}),e.createElement("span",{className:"yt-cart-coupon-selection-applied-code",style:{fontWeight:700,fontSize:"14px",color:u||"#1A1A1A"}},R.code),e.createElement("span",{className:"yt-cart-coupon-selection-applied-text",style:{fontStyle:"italic",fontSize:"14px",color:u||"#1A1A1A"}},"applied!"),e.createElement("button",{className:"yt-cart-coupon-selection-applied-remove","aria-label":`Remove ${R.code}`,onClick:Q,disabled:P||!c,style:{background:"none",border:"none",cursor:P||!c?"not-allowed":"pointer",padding:"2px",display:"flex",alignItems:"center"}},P?e.createElement(fe,{color:"#666",size:14}):e.createElement(Ee,{size:18,color:"#666666"})),H.collectedCouponDisplay?.appliedSavingsText&&e.createElement("span",{className:"yt-cart-coupon-selection-applied-savings",style:{fontSize:"14px",color:"#2E7D32",fontStyle:"italic"}},H.collectedCouponDisplay.appliedSavingsText)),e.createElement("div",{className:"yt-cart-coupon-selection-apply-section"},e.createElement(jo,{backgroundSubdued:d,themeColor:p,themeTextColor:m,primaryTextColor:u,cartComponentsCornerRadius:x,applyCouponCode:l,removeDiscount:c,enableConfetti:s,hideAppliedCodes:!0})),e.createElement("div",{className:"yt-cart-coupon-selection-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),e.createElement("div",{className:"yt-cart-coupon-selection-collect-section",style:{padding:"16px"}},e.createElement("div",{className:"yt-cart-coupon-selection-collect-title",style:{fontSize:"16px",fontWeight:700,color:u||"#1A1A1A",marginBottom:"4px"}},t?"Collect Coupon":"Available Offers"),e.createElement("div",{className:"yt-cart-coupon-selection-collect-subtitle",style:{fontSize:"13px",color:"#888888",marginBottom:"16px"}},t?"Pick any one coupon deal":"No coupons are currently unlocked for this cart"),e.createElement("div",{className:"yt-cart-coupon-selection-list"},H.couponDisplayModels.map(Y)))))})())},ra=pe("showGSTInput",!1),oa=s.div`
|
|
1393
1393
|
width: 95%;
|
|
1394
1394
|
background: white;
|
|
1395
1395
|
border-radius: 2px;
|
|
@@ -2468,7 +2468,7 @@ import e,{useState as t,useEffect as n,useMemo as r,useRef as o,useCallback as a
|
|
|
2468
2468
|
font-weight: 400;
|
|
2469
2469
|
min-width: 14px;
|
|
2470
2470
|
line-height: 14px;
|
|
2471
|
-
`,ic=[...((lc={headerIds:["offers-carousel","timer","info-text"],scroll:{topIds:[],bottomIds:["steal-deal","recs"]},footerIds:["bundle","gst","freebie-claim","shipping","note","gift-wrap","coupon","loyalty","points-preview"]}).headerIds??[]).map(e=>({id:e,zone:"headerIds"})),...(lc.scroll?.topIds??[]).map(e=>({id:e,zone:"scroll.topIds"})),...(lc.scroll?.bottomIds??[]).map(e=>({id:e,zone:"scroll.bottomIds"})),...(lc.footerIds??[]).map(e=>({id:e,zone:"footerIds"}))];var lc;const cc=new Set(ic.map(e=>e.id)),sc=(e,t,n)=>{switch(t){case"headerIds":e.headerIds?.push(n);break;case"scroll.topIds":e.scroll?.topIds?.push(n);break;case"scroll.bottomIds":e.scroll?.bottomIds?.push(n);break;case"footerIds":e.footerIds?.push(n)}},dc=({isOpen:r,setIsOpen:a,backgroundColor:i="white",backgroundSubdued:l="#3947821F",tertiaryColor:c="#067D431A",tertiaryTextColor:s="#000000",exploreCTAColor:d,checkoutFontSize:p,cartTitle:m="My Cart",emptyCartTitle:u,emptyCartDescription:g,emptyCartButtons:f,removeCartItem:x,handleIncrement:y,handleDecrement:h,addCartItem:b,isUserSignedIn:w,showBundle:v,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:N,discountApplied:B,removeDiscount:z,applyDiscount:F,checkoutFunction:$,joinNowFunction:I,guestLoyaltyPercentage:P,isDev:D,recProductsList:L,showMultiStepProgressBar:_,cartCheckpoints:R,redemptionRate:M,pointsRewardRate:O,showCartLevelAltPay:H,exploreCtaRedirectLink:j,discountAmountApplied:q,minimumCartValue:U,discountInCheckoutButton:Z,isStickyCheckout:Q,handleCheckpointCrossed:G,customCartProgressBarCriteria:Y,checkoutButtonColor:X="#252E69",ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,productRecsCtaButtonText:re,productRecsTitleText:oe,emptyProductRecsTitleText:ae,showProductRecsOnDesktop:le,showProductRecsOnMobile:de,themeColor:pe,themeTextColor:me,companyName:ue,gstNumber:ge,showGSTOption:fe,applyGSTToCart:xe,showMOVForProgressTiers:ye,freeProduct:he,showLoyaltyCta:be=!1,freeProductAdjustedCartTotal:we,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:Ce,cartSigninCTAMainText:Ee,applyNoteToCart:ke,note:Te,showNoteOption:Se,inlineCartOfferInfoText:Ne,inlineCartOfferInfoRedirectLink:Be,cartOfferTermsAndConditionsText:ze,showEditOptionOnProducts:Fe,onSetLoading:$e,showVariantSelectionDropdownInProductRecs:Ie,originalCartSubtotal:Pe,freebieProductsInCart:De,showFreebieClaim:Ae,addFreebieToCart:Le,freebiesInCart:_e,effectiveQuantityForProgressBar:Re,productPercentageOffMapping:Me,removeFreebieFromCart:Oe,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We=!1,getProductDetailsByVariantId:He,applyPostalCodeAndDeliverySlotToCart:je,showDeleteOnFreebies:qe,freebieCouponTemplates:Ue,freebieFlowCheckpoints:Ze,freebieClaimData:Qe,postalCodeBasedItemTrackingParameter:Ge,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,giftWrapSetupData:et,giftWrapProductDetail:tt,progressBarFreeProductIconType:nt,enableCustomCartOnCartPage:rt,isCartPage:ot,showCartTimer:at,showFreebieMilestone:it,freebieMilestoneData:lt,cartTimerInMinutes:ct,cartTimerCustomText:st,productRecsCardLayout:dt,productRecsCardListVariant:pt,imageAspectSelector:mt,cartComponentsCornerType:ut,cartComponentsCornerRadius:gt,cartOffersCarousalData:ft,gstSectionCustomizationData:xt,noteSectionTitle:yt,checkoutSectionMessage:ht,checkoutSectionMessageDisplay:bt,showVariantSelectionDropdownInProductClaim:wt,loyaltyDiscount:vt,brandTokenName:Ct,showDiscountOnMRP:Et,switchWidthVariant:kt,prefixMessageText:Tt,suffixMessageText:St,successMessageText:Nt,toggleDecimal:Bt,cartOffersCarouselHeight:zt,disableCheckoutButton:Ft,showEmptyCartRecommendations:$t=!1,checkoutButtonBottomSpacing:It,applyCouponCode:Pt,showApplyCoupon:Dt,enableConfetti:At,checkoutSectionMessageRedirectLink:Lt,showCheckoutButtonPaymentIcons:_t,stealDealCheckpoints:Rt,stealDealProducts:Mt,stealDealAddToCart:Ot,showCouponOptions:Vt,rewardCoupons:Wt,couponSelectionData:Ht,useCartShell:jt,showTrustedBadge:qt,trustedBadgeData:Ut,drawerLayoutData:Zt})=>{const Qt=se(tn),Gt=se(ln),[Yt,Xt]=t(!1),[Kt,Jt]=t(!1),[en,rn]=t(!0),{setLoading:pn}=cn();e.useEffect(()=>{$e&&$e(pn)},[$e]);const mn=o(!!jt&&(window.ytCartShellState?.isOpen??!1)),un=o(null),gn=o(null);n(()=>{const e=e=>{"open"!==e.state?.ytCustomCartDrawer&&a(!1)};return r?(mn.current||(un.current=window.history.state,gn.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",e),mn.current=!0):(mn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(un.current,"",gn.current??window.location.href),mn.current=!1),()=>{window.removeEventListener("popstate",e)}},[r,a]);const[fn,xn]=t(!1);n(()=>{const e=document.querySelector("body");e&&(rt&&ot?e.classList.remove("drawer-open"):!fn&&r?e.classList.add("drawer-open"):e.classList.remove("drawer-open"))},[r,rt,ot,fn]),n(()=>{function e(){const e=window.innerWidth;xn(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const yn=Qt?.items?.reduce((e,t)=>e+t?.quantity,0);n(()=>{const e=()=>{Xt(!0),window.setTimeout(()=>Xt(!1),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)},[]);const[hn,bn]=t("normal"),[wn,vn]=t("normal"),[Cn,En]=t("auto");n(()=>{CSS.supports("font-weight","500")?bn("500"):CSS.supports("font-weight","400")?bn("400"):CSS.supports("font-weight","600")&&bn("600"),CSS.supports("font-weight","400")?vn("400"):CSS.supports("font-weight","300")?vn("300"):CSS.supports("font-weight","200")&&vn("200"),CSS.supports("width","-webkit-fill-available")?En("-webkit-fill-available"):CSS.supports("width","-moz-available")&&En("-moz-available")},[]),n(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",hn),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",wn),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Cn)},[hn,wn]);const[kn]=ce(nn),[Tn]=ce(an),[Sn]=ce(on);n(()=>{rn(!("all-products"!==Ge&&("specific-tags"!==Ge||kn.isPostalCodeValid||Ye)&&("specific-tags"!==Ge||kn.isPostalCodeValid||Tn||!Ye)&&("specific-tags"===Ge&&"standard"===Sn||Kt&&(Ye?kn.isPostalCodeValid&&Tn:kn.isPostalCodeValid))))},[kn.isPostalCodeValid,Tn,Kt,Ge,Ye]),ce(sn);const[Nn,Bn]=t(!0);n(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&Bn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&Bn(!1)},[]);const zn=()=>{Bn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")},Fn=new Date("2024-11-01"),$n=jt?document.getElementById("yt-cart-shell-content"):null,In=(e=>{const t={headerIds:[],scroll:{topIds:[],bottomIds:[]},footerIds:[]},n=new Set;return["headerIds","scroll.topIds","scroll.bottomIds","footerIds"].forEach(r=>{((e,t)=>{switch(t){case"headerIds":return e?.headerIds??[];case"scroll.topIds":return e?.scroll?.topIds??[];case"scroll.bottomIds":return e?.scroll?.bottomIds??[];case"footerIds":return e?.footerIds??[];default:return[]}})(e,r).forEach(e=>{!n.has(e)&&cc.has(e)&&(n.add(e),sc(t,r,e))})}),ic.forEach(({id:e,zone:r})=>{n.has(e)||(n.add(e),sc(t,r,e))}),t})(Zt),Pn=L&&L?.filter(Boolean).length>0,Dn=L&&L?.filter(Boolean),An=(t,n)=>{const o=`drawer-layout-${t}-${n}`;switch(t){case"offers-carousel":return ft?.enableCartOffersCarousel?e.createElement(yl,{key:o,themeColor:pe,cartOffersCarousalData:ft,cartOffersCarouselHeight:zt,cartData:Qt}):null;case"timer":return at&&Nn&&Qt?.item_count?e.createElement(Gi,{key:o,minutes:ct,customText:st,onTimerComplete:zn}):null;case"info-text":return Ne?e.createElement(Pi,{key:o,inlineCartOfferInfoText:Ne,inlineCartOfferInfoRedirectLink:Be,themeColor:pe,tooltipText:ze,themeTextColor:me}):null;case"steal-deal":return Rt&&Rt.length>0&&Mt&&Mt.length>0&&Qt?.item_count>0?e.createElement(rc,{key:o,stealDealCheckpoints:Rt,stealDealProducts:Mt,freeProductAdjustedCartTotal:we,effectiveQuantityForProgressBar:Re,addFreebieToCart:Ot??Le,freebiesInCart:_e??[],themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne}):null;case"recs":return(t=>{const n=fn&&le&&!!Dn&&Pn&&Qt?.item_count>0&&b,r=!fn&&de&&!!Dn&&Pn&&Qt?.item_count>0&&b;return n||r?e.createElement(e.Fragment,{key:t},n&&e.createElement(nr,{addCartItem:b,products:Dn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,productRecsTitleText:oe,themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,cardLayout:dt,variant:pt,cartComponentsCornerType:ut,cartComponentsCornerRadius:gt,backgroundSubdued:l,backgroundColor:i,tertiaryColor:c,tertiaryTextColor:s}),r&&e.createElement(nr,{addCartItem:b,products:Dn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,productRecsTitleText:oe,themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,cardLayout:dt,variant:pt,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,backgroundSubdued:l,tertiaryColor:c,tertiaryTextColor:s})):null})(o);case"bundle":return Qt?.item_count>0&&v&&C?e.createElement(Ho,{key:o,bundleProducts:C}):null;case"gst":return fe&&xe&&Qt?.item_count>0?e.createElement(fa,{key:o,companyName:ue,gstNumber:ge,themeColor:pe,iconColor:xt?.iconColor,showIcon:xt?.showIcon,backgroundColor:xt?.backgroundColor,textColor:xt?.textColor,title:xt?.title}):null;case"freebie-claim":return Qt&&Qt?.item_count>0&&Le&&De&&_e&&De.length>0?e.createElement(Ii,{key:o,freebieProductsInCart:De,themeColor:pe,themeTextColor:me,primaryTextColor:ee,addFreebieToCart:Le,freebiesInCart:_e,imageAspectSelector:mt,freebieCouponTemplates:Ue,freebieClaimData:Qe,cartCheckpoints:R,isCartDrawerOpen:r}):null;case"shipping":return We&&(Ve?.length??0)>0&&je&&Qt?.item_count>0?e.createElement("div",{key:o,className:"yt-cart-geolocation-section form-group"},e.createElement("div",{className:"yt-cart-shipping-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>rn(!en)},e.createElement("span",{className:"yt-cart-shipping-label",style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",e.createElement(te,null)),e.createElement("div",{className:"yt-cart-shipping-toggle-icon icon-transition"},en?e.createElement(V,null):e.createElement(W,null))),"all-products"===Ge&&en?e.createElement(Li,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,disabledDates:Fn}):en&&(Kt?e.createElement(Li,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,disabledDates:Fn}):e.createElement(_i,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,disabledDates:Fn}))):null;case"note":return Se&&ke&&Qt?.item_count>0?e.createElement(xa,{key:o,note:Te,noteSectionTitle:yt}):null;case"gift-wrap":return et?.showGiftWrapOption&&Qt?.item_count>0?e.createElement(Ui,{key:o,themeColor:pe,id:et?.giftProductId,detail:tt,showPrice:et?.showPrice,errorText:et?.errorText,customText:et?.customText,showGiftIcon:et?.showGiftIcon,showProductImage:et?.showProductImage,addCartItem:b,removeCartItem:x}):null;case"coupon":return Qt?.item_count>0&&Vt&&Wt&&Ht&&Pt&&!be?e.createElement(na,{key:o,rewardCoupons:Wt,couponSelectionData:Ht,applyCouponCode:Pt,removeDiscount:z,enableConfetti:At,backgroundSubdued:l,themeColor:pe,themeTextColor:me,primaryTextColor:ee,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,cartComponentsCornerRadius:gt}):Qt?.item_count>0&&Dt&&!Vt&&!be&&Pt?e.createElement(jo,{key:o,backgroundSubdued:l,themeColor:pe,themeTextColor:me,primaryTextColor:ee,cartComponentsCornerRadius:gt,applyCouponCode:Pt,removeDiscount:z,enableConfetti:At}):null;case"loyalty":return(t=>be&&Qt?.item_count?e.createElement(e.Fragment,{key:t},w||vt?!vt&&void 0!==E&&void 0!==T&&!!k&&!!F&&e.createElement(oo,{themeColor:pe,applyDiscount:F,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,minimumOrderValueToAvailDiscount:ve,brandTokenName:Ct,showCartLevelAltPay:H,redemptionMultiplier:N}):!!P&&!!I&&e.createElement(Yr,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:Ce,themeColor:pe,joinNowFunction:I,guestLoyaltyPercentage:P,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,showCartLevelAltPay:H}),!!vt&&!!z&&vt&&void 0!==T&&e.createElement(eo,{themeColor:pe,removeDiscount:z,loyaltyDiscount:vt,isDev:D,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,pointsToBeUsed:T,brandTokenName:Ct,showCartLevelAltPay:H}),!!ve&&ve>1&&e.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:pe??"#50D1AA",fontWeight:600,display:"flex",justifyContent:Ce?"space-between":"center"}},"Minimum order value to use ",Ct,":"," ",ve)):null)(o);case"points-preview":return be&&H&&M&&k&&Qt?.item_count>0?e.createElement(El,{key:o,loyaltyIcon:k,backgroundSubdued:l,primaryTextColor:ee,pointsRewardRate:O,rewardMultiplier:S}):null;default:return null}},Ln=e.createElement(e.Fragment,null,Gt.cartLoading?e.createElement("div",{className:"yt-cart-loader-overlay",style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Gt.showLoader&&!Gt.showSkeletonLoader&&e.createElement("div",{className:"loader"},"")):e.createElement(e.Fragment,null),e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},e.createElement("div",{className:"yt-cart-header"},e.createElement("div",{className:"yt-cart-header-row",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},e.createElement("span",{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:ee,fontSize:"16px"}},e.createElement("span",{className:"yt-cart-title-text",style:{whiteSpace:"nowrap",flexShrink:0}},m),Qt?.item_count>0&&H&&!(be&&H)&&O>0&&e.createElement(Tl,{pointsRewardRate:O,loyaltyIcon:k,brandTokenName:Ct,themeColor:pe,themeTextColor:me,rewardMultiplier:S}),yn>0&&e.createElement(ac,{className:"yt-cart-item-count-badge",$backgroundSubdued:l},yn)),e.createElement("div",{className:"yt-cart-header-actions",style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(rt&&ot)&&e.createElement("div",{className:"yt-cart-close-button close-button",style:{backgroundColor:l||"#cacaca30"}},e.createElement(ie,{style:{height:"auto",width:"auto",color:ee},fontSize:24,cursor:"pointer",onClick:()=>{a(!r)}})))),Gt&&e.createElement(vl,{$themeColor:pe,show:Gt.showLoader}),Yt&&At&&e.createElement(Nr,{particleCount:50,spread:90,origin:{y:.3}}),In.headerIds?.map((e,t)=>An(e,t))),_&&Qt?.items_subtotal_price>0&&Qt?.currency&&!!R&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[Cr(r)]&&("minimum_order_value"!==r||1!==e?.[Cr(r)])).some((e,i)=>Er(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(R,dn(void 0!==Pe?Pe:Qt?.items_subtotal_price,Qt.currency),void 0===Re?Qt?.item_count:Re,Y??"minimum_order_value",Qt?.item_count)&&e.createElement(e.Fragment,null,e.createElement(_r,{customCartProgressBarCriteria:Y??"minimum_order_value",handleCheckpointCrossed:G,checkpoints:R,effectiveQuantityForProgressBar:void 0===Re?Qt?.item_count:Re,currentCartAmount:dn(void 0!==Pe?Pe:Qt?.items_subtotal_price,Qt.currency),themeColor:pe,themeTextColor:me,primaryTextColor:ee,secondaryTextColor:ne,showMOVForProgressTiers:ye,progressBarFreeProductIconType:nt,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,prefixMessageText:Tt,suffixMessageText:St,successMessageText:Nt,enableConfetti:At})),Qt?.item_count>0&&e.createElement("div",{className:"yt-cart-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),0===Qt?.items?.length&&0===Qt?.item_count&&!1===Gt?.showSkeletonLoader?e.createElement(Or,{showLoyaltyCta:be,joinNowFunction:I,emptyCartTitle:u,emptyCartDescription:g,exploreCTAColor:d,isUserSignedIn:w,exploreCtaRedirectLink:j,themeColor:pe,emptyCartButtons:f,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,themeTextColor:me,isRecProductsListValid:Pn,recProductsList:Dn,addCartItem:b,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,emptyProductRecsTitleText:ae,backgroundSubdued:l,showEmptyCartRecommendations:$t,tertiaryColor:c,tertiaryTextColor:s}):e.createElement("div",{className:"yt-cart-scroll-area",style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},In.scroll?.topIds?.map((e,t)=>An(e,t)),e.createElement(Wo,{isDev:D,themeColor:pe,handleDecrement:h,handleIncrement:y,removeCartItem:x,addCartItem:b,primaryTextColor:ee,secondaryTextColor:ne,freeProduct:he,themeTextColor:me,showEditOptionOnProducts:Fe,productPercentageOffMapping:Me,removeFreebieFromCart:Oe,showDeleteOnFreebies:qe,freebieCouponTemplates:Ue??[],freebieFlowCheckpoints:Ze??[],cartCheckpoints:R,freeProductAdjustedCartTotal:we,imageAspectSelector:mt,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,giftWrapVariantId:tt?.variants?.nodes[0]?.id,giftWrapProductId:et?.giftProductId,showGiftWrapAsLineItem:et?.showGiftWrapAsLineItem,backgroundSubdued:l,tertiaryColor:c,tertiaryTextColor:s,backgroundColor:i,showDiscountOnMRP:Et,checkoutSectionMessage:ht,checkoutSectionMessageRedirectLink:Lt,showFreebieMilestone:it,freebieMilestoneData:lt,freeLabelText:Qe?.freeLabelText}),In.scroll?.bottomIds?.map((e,t)=>An(e,t)),"devlhok.myshopify.com"===window.ytapp?.storeDomain&&e.createElement(Sl,{showDiscountOnMRP:Et,cartCheckpoints:R,toggleDecimal:Bt,primaryTextColor:ee,discountApplied:B,showTrustedBadge:qt,discountAmountApplied:q})),e.createElement(Kr,null,In.footerIds?.map((e,t)=>An(e,t)),Qt&&$&&Qt?.item_count>0&&e.createElement("div",{className:"yt-cart-checkout-wrapper"},e.createElement(qr,{disableCheckoutButton:!!Ft||Gt.cartLoading,discountApplied:B,checkoutFunction:$,checkoutButtonColor:X,checkoutFontSize:p,discountInCheckoutButton:Z,isStickyCheckout:Q,discountAmountApplied:q,minimumCartValue:U,themeTextColor:me,applyGSTToCart:xe,showGSTOption:fe,applyNoteToCart:ke,showNoteOption:Se,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:je,enableSlotPicker:Ye,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,checkoutSectionMessage:ht,checkoutSectionMessageDisplay:bt,checkoutSectionMessageRedirectLink:Lt,showDiscountOnMRP:Et,tertiaryColor:c,tertiaryTextColor:s,cartCheckpoints:R,toggleDecimal:Bt,checkoutButtonBottomSpacing:It,showCheckoutButtonPaymentIcons:_t,primaryTextColor:ee,hideSubtotalAndBadge:"devlhok.myshopify.com"===window.ytapp?.storeDomain,showTrustedBadge:qt,trustedBadgeData:Ut,isLargeScreen:fn}))))));return jt&&$n?A(Ln,$n):e.createElement(oc,{className:"yt-cart-drawer",$isDev:D,$isOpen:r,$backgroundColor:i,$enableCustomCartOnCartPage:rt,$isCartPage:ot,$isLargeScreen:fn,$switchWidthVariant:kt},Ln)};Ct('@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.yt-collection-bundle-modal-description img,\n.yt-collection-bundle-modal-description iframe {\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.yt-collection-bundle-modal-description {\n text-align: left;\n overflow-wrap: break-word;\n}\n\n.yt-byob-pagination-observer {\n display: block !important;\n}');const pc=s.div`
|
|
2471
|
+
`,ic=[...((lc={headerIds:["offers-carousel","timer","info-text"],scroll:{topIds:[],bottomIds:["steal-deal","recs"]},footerIds:["bundle","gst","freebie-claim","shipping","note","gift-wrap","coupon","loyalty","points-preview"]}).headerIds??[]).map(e=>({id:e,zone:"headerIds"})),...(lc.scroll?.topIds??[]).map(e=>({id:e,zone:"scroll.topIds"})),...(lc.scroll?.bottomIds??[]).map(e=>({id:e,zone:"scroll.bottomIds"})),...(lc.footerIds??[]).map(e=>({id:e,zone:"footerIds"}))];var lc;const cc=new Set(ic.map(e=>e.id)),sc=(e,t,n)=>{switch(t){case"headerIds":e.headerIds?.push(n);break;case"scroll.topIds":e.scroll?.topIds?.push(n);break;case"scroll.bottomIds":e.scroll?.bottomIds?.push(n);break;case"footerIds":e.footerIds?.push(n)}},dc=({isOpen:r,setIsOpen:a,backgroundColor:i="white",backgroundSubdued:l="#3947821F",tertiaryColor:c="#067D431A",tertiaryTextColor:s="#000000",exploreCTAColor:d,checkoutFontSize:p,cartTitle:m="My Cart",emptyCartTitle:u,emptyCartDescription:g,emptyCartButtons:f,removeCartItem:x,handleIncrement:y,handleDecrement:h,addCartItem:b,isUserSignedIn:w,showBundle:v,bundleProducts:C,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,rewardMultiplier:S,redemptionMultiplier:N,discountApplied:B,removeDiscount:z,applyDiscount:F,checkoutFunction:$,joinNowFunction:I,guestLoyaltyPercentage:P,isDev:D,recProductsList:L,showMultiStepProgressBar:_,cartCheckpoints:R,redemptionRate:M,pointsRewardRate:O,showCartLevelAltPay:H,exploreCtaRedirectLink:j,discountAmountApplied:q,minimumCartValue:U,discountInCheckoutButton:Z,isStickyCheckout:Q,handleCheckpointCrossed:G,customCartProgressBarCriteria:Y,checkoutButtonColor:X="#252E69",ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,productRecsCtaButtonText:re,productRecsTitleText:oe,emptyProductRecsTitleText:ae,showProductRecsOnDesktop:le,showProductRecsOnMobile:de,themeColor:pe,themeTextColor:me,companyName:ue,gstNumber:ge,showGSTOption:fe,applyGSTToCart:xe,showMOVForProgressTiers:ye,freeProduct:he,showLoyaltyCta:be=!1,freeProductAdjustedCartTotal:we,minimumOrderValueToAvailDiscount:ve,signinCTAButtonVisible:Ce,cartSigninCTAMainText:Ee,applyNoteToCart:ke,note:Te,showNoteOption:Se,inlineCartOfferInfoText:Ne,inlineCartOfferInfoRedirectLink:Be,cartOfferTermsAndConditionsText:ze,showEditOptionOnProducts:Fe,onSetLoading:$e,showVariantSelectionDropdownInProductRecs:Ie,originalCartSubtotal:Pe,freebieProductsInCart:De,showFreebieClaim:Ae,addFreebieToCart:Le,freebiesInCart:_e,effectiveQuantityForProgressBar:Re,productPercentageOffMapping:Me,removeFreebieFromCart:Oe,postalCodeList:Ve,enableGeoLocationDeliveryRestriction:We=!1,getProductDetailsByVariantId:He,applyPostalCodeAndDeliverySlotToCart:je,showDeleteOnFreebies:qe,freebieCouponTemplates:Ue,freebieFlowCheckpoints:Ze,freebieClaimData:Qe,postalCodeBasedItemTrackingParameter:Ge,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,giftWrapSetupData:et,giftWrapProductDetail:tt,progressBarFreeProductIconType:nt,enableCustomCartOnCartPage:rt,isCartPage:ot,showCartTimer:at,showFreebieMilestone:it,freebieMilestoneData:lt,cartTimerInMinutes:ct,cartTimerCustomText:st,productRecsCardLayout:dt,productRecsCardListVariant:pt,imageAspectSelector:mt,cartComponentsCornerType:ut,cartComponentsCornerRadius:gt,cartOffersCarousalData:ft,gstSectionCustomizationData:xt,noteSectionTitle:yt,checkoutSectionMessage:ht,checkoutSectionMessageDisplay:bt,showVariantSelectionDropdownInProductClaim:wt,loyaltyDiscount:vt,brandTokenName:Ct,showDiscountOnMRP:Et,switchWidthVariant:kt,prefixMessageText:Tt,suffixMessageText:St,successMessageText:Nt,toggleDecimal:Bt,cartOffersCarouselHeight:zt,disableCheckoutButton:Ft,showEmptyCartRecommendations:$t=!1,checkoutButtonBottomSpacing:It,applyCouponCode:Pt,showApplyCoupon:Dt,enableConfetti:At,checkoutSectionMessageRedirectLink:Lt,showCheckoutButtonPaymentIcons:_t,stealDealCheckpoints:Rt,stealDealProducts:Mt,stealDealAddToCart:Ot,showCouponOptions:Vt,rewardCoupons:Wt,couponSelectionData:Ht,useCartShell:jt,showTrustedBadge:qt,trustedBadgeData:Ut,drawerLayoutData:Zt})=>{const Qt=se(tn),Gt=se(ln),[Yt,Xt]=t(!1),[Kt,Jt]=t(!1),[en,rn]=t(!0),{setLoading:pn}=cn();e.useEffect(()=>{$e&&$e(pn)},[$e]);const mn=o(!!jt&&(window.ytCartShellState?.isOpen??!1)),un=o(null),gn=o(null);n(()=>{const e=e=>{"open"!==e.state?.ytCustomCartDrawer&&a(!1)};return r?(mn.current||(un.current=window.history.state,gn.current=window.location.href,window.history.pushState({ytCustomCartDrawer:"open"},"")),window.addEventListener("popstate",e),mn.current=!0):(mn.current&&"open"===window.history.state?.ytCustomCartDrawer&&window.history.replaceState(un.current,"",gn.current??window.location.href),mn.current=!1),()=>{window.removeEventListener("popstate",e)}},[r,a]);const[fn,xn]=t(!1);n(()=>{const e=document.querySelector("body");e&&(rt&&ot?e.classList.remove("drawer-open"):!fn&&r?e.classList.add("drawer-open"):e.classList.remove("drawer-open"))},[r,rt,ot,fn]),n(()=>{function e(){const e=window.innerWidth;xn(e>=450)}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const yn=Qt?.items?.reduce((e,t)=>e+t?.quantity,0);n(()=>{const e=()=>{Xt(!0),window.setTimeout(()=>Xt(!1),3e3)};return window.addEventListener("yt:autoFreebieAdded",e),()=>window.removeEventListener("yt:autoFreebieAdded",e)},[]);const[hn,bn]=t("normal"),[wn,vn]=t("normal"),[Cn,En]=t("auto");n(()=>{CSS.supports("font-weight","500")?bn("500"):CSS.supports("font-weight","400")?bn("400"):CSS.supports("font-weight","600")&&bn("600"),CSS.supports("font-weight","400")?vn("400"):CSS.supports("font-weight","300")?vn("300"):CSS.supports("font-weight","200")&&vn("200"),CSS.supports("width","-webkit-fill-available")?En("-webkit-fill-available"):CSS.supports("width","-moz-available")&&En("-moz-available")},[]),n(()=>{document.documentElement.style.setProperty("--yt-cart-font-weight",hn),document.documentElement.style.setProperty("--yt-cart-product-rec-price-font-weight",wn),document.documentElement.style.setProperty("--yt-cart-custom-fill-width",Cn)},[hn,wn]);const[kn]=ce(nn),[Tn]=ce(an),[Sn]=ce(on);n(()=>{rn(!("all-products"!==Ge&&("specific-tags"!==Ge||kn.isPostalCodeValid||Ye)&&("specific-tags"!==Ge||kn.isPostalCodeValid||Tn||!Ye)&&("specific-tags"===Ge&&"standard"===Sn||Kt&&(Ye?kn.isPostalCodeValid&&Tn:kn.isPostalCodeValid))))},[kn.isPostalCodeValid,Tn,Kt,Ge,Ye]),ce(sn);const[Nn,Bn]=t(!0);n(()=>{"true"===localStorage.getItem("cartTimerRanOnce")&&Bn(!1);const e=localStorage.getItem("cartTimerTimeLeft");e&&parseInt(e,10)<=0&&Bn(!1)},[]);const zn=()=>{Bn(!1),localStorage.setItem("cartTimerRanOnce","true"),localStorage.removeItem("timeLeft"),localStorage.removeItem("lastUpdate")},Fn=new Date("2024-11-01"),$n=jt?document.getElementById("yt-cart-shell-content"):null,In=(e=>{const t={headerIds:[],scroll:{topIds:[],bottomIds:[]},footerIds:[]},n=new Set;return["headerIds","scroll.topIds","scroll.bottomIds","footerIds"].forEach(r=>{((e,t)=>{switch(t){case"headerIds":return e?.headerIds??[];case"scroll.topIds":return e?.scroll?.topIds??[];case"scroll.bottomIds":return e?.scroll?.bottomIds??[];case"footerIds":return e?.footerIds??[];default:return[]}})(e,r).forEach(e=>{!n.has(e)&&cc.has(e)&&(n.add(e),sc(t,r,e))})}),ic.forEach(({id:e,zone:r})=>{n.has(e)||(n.add(e),sc(t,r,e))}),t})(Zt),Pn=L&&L?.filter(Boolean).length>0,Dn=L&&L?.filter(Boolean),An=(t,n)=>{const o=`drawer-layout-${t}-${n}`;switch(t){case"offers-carousel":return ft?.enableCartOffersCarousel?e.createElement(yl,{key:o,themeColor:pe,cartOffersCarousalData:ft,cartOffersCarouselHeight:zt,cartData:Qt}):null;case"timer":return at&&Nn&&Qt?.item_count?e.createElement(Gi,{key:o,minutes:ct,customText:st,onTimerComplete:zn}):null;case"info-text":return Ne?e.createElement(Pi,{key:o,inlineCartOfferInfoText:Ne,inlineCartOfferInfoRedirectLink:Be,themeColor:pe,tooltipText:ze,themeTextColor:me}):null;case"steal-deal":return Rt&&Rt.length>0&&Mt&&Mt.length>0&&Qt?.item_count>0?e.createElement(rc,{key:o,stealDealCheckpoints:Rt,stealDealProducts:Mt,freeProductAdjustedCartTotal:we,effectiveQuantityForProgressBar:Re,addFreebieToCart:Ot??Le,freebiesInCart:_e??[],themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne}):null;case"recs":return(t=>{const n=fn&&le&&!!Dn&&Pn&&Qt?.item_count>0&&b,r=!fn&&de&&!!Dn&&Pn&&Qt?.item_count>0&&b;return n||r?e.createElement(e.Fragment,{key:t},n&&e.createElement(nr,{addCartItem:b,products:Dn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,productRecsTitleText:oe,themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,cardLayout:dt,variant:pt,cartComponentsCornerType:ut,cartComponentsCornerRadius:gt,backgroundSubdued:l,backgroundColor:i,tertiaryColor:c,tertiaryTextColor:s}),r&&e.createElement(nr,{addCartItem:b,products:Dn,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,productRecsTitleText:oe,themeColor:pe,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,cardLayout:dt,variant:pt,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,backgroundSubdued:l,tertiaryColor:c,tertiaryTextColor:s})):null})(o);case"bundle":return Qt?.item_count>0&&v&&C?e.createElement(Ho,{key:o,bundleProducts:C}):null;case"gst":return fe&&xe&&Qt?.item_count>0?e.createElement(fa,{key:o,companyName:ue,gstNumber:ge,themeColor:pe,iconColor:xt?.iconColor,showIcon:xt?.showIcon,backgroundColor:xt?.backgroundColor,textColor:xt?.textColor,title:xt?.title}):null;case"freebie-claim":return Qt&&Qt?.item_count>0&&Le&&De&&_e&&De.length>0?e.createElement(Ii,{key:o,freebieProductsInCart:De,themeColor:pe,themeTextColor:me,primaryTextColor:ee,addFreebieToCart:Le,freebiesInCart:_e,imageAspectSelector:mt,freebieCouponTemplates:Ue,freebieClaimData:Qe,cartCheckpoints:R,isCartDrawerOpen:r}):null;case"shipping":return We&&(Ve?.length??0)>0&&je&&Qt?.item_count>0?e.createElement("div",{key:o,className:"yt-cart-geolocation-section form-group"},e.createElement("div",{className:"yt-cart-shipping-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"6px 1rem 1rem 1rem"},onClick:()=>rn(!en)},e.createElement("span",{className:"yt-cart-shipping-label",style:{fontSize:"12px",display:"flex",gap:"5px",alignItems:"center"}},"Shipping ",e.createElement(te,null)),e.createElement("div",{className:"yt-cart-shipping-toggle-icon icon-transition"},en?e.createElement(V,null):e.createElement(W,null))),"all-products"===Ge&&en?e.createElement(Li,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,disabledDates:Fn}):en&&(Kt?e.createElement(Li,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,deliveryHeaderTitle:Xe,deliveryAvailableText:Ke,deliveryNotAvailableText:Je,disabledDates:Fn}):e.createElement(_i,{postalCodeList:Ve,themeColor:pe,themeTextColor:me,enableSlotPicker:Ye,disabledDates:Fn}))):null;case"note":return Se&&ke&&Qt?.item_count>0?e.createElement(xa,{key:o,note:Te,noteSectionTitle:yt}):null;case"gift-wrap":return et?.showGiftWrapOption&&Qt?.item_count>0?e.createElement(Ui,{key:o,themeColor:pe,id:et?.giftProductId,detail:tt,showPrice:et?.showPrice,errorText:et?.errorText,customText:et?.customText,showGiftIcon:et?.showGiftIcon,showProductImage:et?.showProductImage,addCartItem:b,removeCartItem:x}):null;case"coupon":return Qt?.item_count>0&&Vt&&Wt&&Ht&&Pt&&!be?e.createElement(na,{key:o,rewardCoupons:Wt,couponSelectionData:Ht,applyCouponCode:Pt,removeDiscount:z,enableConfetti:At,backgroundSubdued:l,themeColor:pe,themeTextColor:me,primaryTextColor:ee,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,cartComponentsCornerRadius:gt}):Qt?.item_count>0&&Dt&&!Vt&&!be&&Pt?e.createElement(jo,{key:o,backgroundSubdued:l,themeColor:pe,themeTextColor:me,primaryTextColor:ee,cartComponentsCornerRadius:gt,applyCouponCode:Pt,removeDiscount:z,enableConfetti:At}):null;case"loyalty":return(t=>be&&Qt?.item_count?e.createElement(e.Fragment,{key:t},w||vt?!vt&&void 0!==E&&void 0!==T&&!!k&&!!F&&e.createElement(oo,{themeColor:pe,applyDiscount:F,discountAmountOff:E,loyaltyIcon:k,pointsToBeUsed:T,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,minimumOrderValueToAvailDiscount:ve,brandTokenName:Ct,showCartLevelAltPay:H,redemptionMultiplier:N}):!!P&&!!I&&e.createElement(Yr,{cartSigninCTAMainText:Ee,signinCTAButtonVisible:Ce,themeColor:pe,joinNowFunction:I,guestLoyaltyPercentage:P,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,showCartLevelAltPay:H}),!!vt&&!!z&&vt&&void 0!==T&&e.createElement(eo,{themeColor:pe,removeDiscount:z,loyaltyDiscount:vt,isDev:D,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,pointsToBeUsed:T,brandTokenName:Ct,showCartLevelAltPay:H}),!!ve&&ve>1&&e.createElement("span",{className:"yt-cart-loyalty-mov-text",style:{fontSize:"10px",color:pe??"#50D1AA",fontWeight:600,display:"flex",justifyContent:Ce?"space-between":"center"}},"Minimum order value to use ",Ct,":"," ",ve)):null)(o);case"points-preview":return be&&H&&M&&k&&Qt?.item_count>0?e.createElement(El,{key:o,loyaltyIcon:k,backgroundSubdued:l,primaryTextColor:ee,pointsRewardRate:O,rewardMultiplier:S}):null;default:return null}},Ln=e.createElement(e.Fragment,null,Gt.cartLoading?e.createElement("div",{className:"yt-cart-loader-overlay",style:{backgroundColor:"#fff",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",display:"flex",position:"absolute",opacity:0,zIndex:51}},Gt.showLoader&&!Gt.showSkeletonLoader&&e.createElement("div",{className:"loader"},"")):e.createElement(e.Fragment,null),e.createElement(e.Fragment,null,e.createElement("div",{className:"yt-cart-drawer-content",style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},e.createElement("div",{className:"yt-cart-header"},e.createElement("div",{className:"yt-cart-header-row",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",margin:"1rem 1rem 0px"}},e.createElement("span",{className:"yt-cart-title-container",style:{fontWeight:"var(--yt-cart-font-weight, bold)",color:ee,fontSize:"16px"}},e.createElement("span",{className:"yt-cart-title-text",style:{whiteSpace:"nowrap",flexShrink:0}},m),Qt?.item_count>0&&H&&!(be&&H)&&O>0&&e.createElement(Tl,{pointsRewardRate:O,loyaltyIcon:k,brandTokenName:Ct,themeColor:pe,themeTextColor:me,rewardMultiplier:S}),yn>0&&e.createElement(ac,{className:"yt-cart-item-count-badge",$backgroundSubdued:l},yn)),e.createElement("div",{className:"yt-cart-header-actions",style:{display:"flex",gap:"8px",flexDirection:"row",alignItems:"center"}},!(rt&&ot)&&e.createElement("div",{className:"yt-cart-close-button close-button",style:{backgroundColor:l||"#cacaca30"}},e.createElement(ie,{style:{height:"auto",width:"auto",color:ee},fontSize:24,cursor:"pointer",onClick:()=>{a(!r)}})))),Gt&&e.createElement(vl,{$themeColor:pe,show:Gt.showLoader}),Yt&&At&&e.createElement(Nr,{particleCount:50,spread:90,origin:{y:.3}}),In.headerIds?.map((e,t)=>An(e,t))),_&&Qt?.items_subtotal_price>0&&Qt?.currency&&!!R&&function(e,t,n,r,o){if(!e||0===e.length)return!1;const a=[...e].sort((e,t)=>"minimum_order_value"===r?e?.minimumOrderValue-t?.minimumOrderValue:e?.quantityThreshold-t?.quantityThreshold);return a.filter(e=>0!==e?.[Cr(r)]&&("minimum_order_value"!==r||1!==e?.[Cr(r)])).some((e,i)=>Er(e,i,a,o,{currentCartAmount:t,effectiveQuantityForProgressBar:n,customCartProgressBarCriteria:r,checkpoints:a}).progressPercentage>0)}(R,dn(void 0!==Pe?Pe:Qt?.items_subtotal_price,Qt.currency),void 0===Re?Qt?.item_count:Re,Y??"minimum_order_value",Qt?.item_count)&&e.createElement(e.Fragment,null,e.createElement(_r,{customCartProgressBarCriteria:Y??"minimum_order_value",handleCheckpointCrossed:G,checkpoints:R,effectiveQuantityForProgressBar:void 0===Re?Qt?.item_count:Re,currentCartAmount:dn(void 0!==Pe?Pe:Qt?.items_subtotal_price,Qt.currency),themeColor:pe,themeTextColor:me,primaryTextColor:ee,secondaryTextColor:ne,showMOVForProgressTiers:ye,progressBarFreeProductIconType:nt,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,prefixMessageText:Tt,suffixMessageText:St,successMessageText:Nt,enableConfetti:At})),Qt?.item_count>0&&e.createElement("div",{className:"yt-cart-divider",style:{display:"flex",height:"12px",background:"#87878717"}}),0===Qt?.items?.length&&0===Qt?.item_count&&!1===Gt?.showSkeletonLoader?e.createElement(Or,{showLoyaltyCta:be,joinNowFunction:I,emptyCartTitle:u,emptyCartDescription:g,exploreCTAColor:d,isUserSignedIn:w,exploreCtaRedirectLink:j,themeColor:pe,emptyCartButtons:f,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,themeTextColor:me,isRecProductsListValid:Pn,recProductsList:Dn,addCartItem:b,productRecsCtaButtonText:re,ctaButtonBackgroundColor:K,ctaButtonTextColor:J,primaryTextColor:ee,secondaryTextColor:ne,showVariantSelectionDropdownInProductRecs:Ie,emptyProductRecsTitleText:ae,backgroundSubdued:l,showEmptyCartRecommendations:$t,tertiaryColor:c,tertiaryTextColor:s}):e.createElement("div",{className:"yt-cart-scroll-area",style:{display:"flex",flexDirection:"column",overflowY:"auto",flex:1,overflowX:"hidden",height:"100%",scrollbarWidth:"none"}},In.scroll?.topIds?.map((e,t)=>An(e,t)),e.createElement(Wo,{isDev:D,themeColor:pe,handleDecrement:h,handleIncrement:y,removeCartItem:x,addCartItem:b,primaryTextColor:ee,secondaryTextColor:ne,freeProduct:he,themeTextColor:me,showEditOptionOnProducts:Fe,productPercentageOffMapping:Me,removeFreebieFromCart:Oe,showDeleteOnFreebies:qe,freebieCouponTemplates:Ue??[],freebieFlowCheckpoints:Ze??[],cartCheckpoints:R,freeProductAdjustedCartTotal:we,imageAspectSelector:mt,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,giftWrapVariantId:tt?.variants?.nodes[0]?.id,giftWrapProductId:et?.giftProductId,showGiftWrapAsLineItem:et?.showGiftWrapAsLineItem,backgroundSubdued:l,tertiaryColor:c,tertiaryTextColor:s,backgroundColor:i,showDiscountOnMRP:Et,checkoutSectionMessage:ht,checkoutSectionMessageRedirectLink:Lt,showFreebieMilestone:it,freebieMilestoneData:lt,freeLabelText:Qe?.freeLabelText,customCartProgressBarCriteria:Y,effectiveQuantityForProgressBar:Re}),In.scroll?.bottomIds?.map((e,t)=>An(e,t)),"devlhok.myshopify.com"===window.ytapp?.storeDomain&&e.createElement(Sl,{showDiscountOnMRP:Et,cartCheckpoints:R,toggleDecimal:Bt,primaryTextColor:ee,discountApplied:B,showTrustedBadge:qt,discountAmountApplied:q})),e.createElement(Kr,null,In.footerIds?.map((e,t)=>An(e,t)),Qt&&$&&Qt?.item_count>0&&e.createElement("div",{className:"yt-cart-checkout-wrapper"},e.createElement(qr,{disableCheckoutButton:!!Ft||Gt.cartLoading,discountApplied:B,checkoutFunction:$,checkoutButtonColor:X,checkoutFontSize:p,discountInCheckoutButton:Z,isStickyCheckout:Q,discountAmountApplied:q,minimumCartValue:U,themeTextColor:me,applyGSTToCart:xe,showGSTOption:fe,applyNoteToCart:ke,showNoteOption:Se,enableGeoLocationDeliveryRestriction:We,applyPostalCodeAndDeliverySlotToCart:je,enableSlotPicker:Ye,cartComponentsCornerRadius:gt,cartComponentsCornerType:ut,checkoutSectionMessage:ht,checkoutSectionMessageDisplay:bt,checkoutSectionMessageRedirectLink:Lt,showDiscountOnMRP:Et,tertiaryColor:c,tertiaryTextColor:s,cartCheckpoints:R,toggleDecimal:Bt,checkoutButtonBottomSpacing:It,showCheckoutButtonPaymentIcons:_t,primaryTextColor:ee,hideSubtotalAndBadge:"devlhok.myshopify.com"===window.ytapp?.storeDomain,showTrustedBadge:qt,trustedBadgeData:Ut,isLargeScreen:fn}))))));return jt&&$n?A(Ln,$n):e.createElement(oc,{className:"yt-cart-drawer",$isDev:D,$isOpen:r,$backgroundColor:i,$enableCustomCartOnCartPage:rt,$isCartPage:ot,$isLargeScreen:fn,$switchWidthVariant:kt},Ln)};Ct('@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.yt-collection-bundle-modal-description img,\n.yt-collection-bundle-modal-description iframe {\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.yt-collection-bundle-modal-description {\n text-align: left;\n overflow-wrap: break-word;\n}\n\n.yt-byob-pagination-observer {\n display: block !important;\n}');const pc=s.div`
|
|
2472
2472
|
display: flex;
|
|
2473
2473
|
flex-direction: row;
|
|
2474
2474
|
height: 100%;
|