yt-uikit 0.8.18 → 0.8.19-checkout-section-update.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -993,7 +993,7 @@ import*as e from"react";import t,{forwardRef as n,useImperativeHandle as r,useRe
|
|
|
993
993
|
width: 100%;
|
|
994
994
|
gap: 10px;
|
|
995
995
|
margin-top: 16px;
|
|
996
|
-
`;function jo({showLoyaltyCta:e,exploreCTAColor:n="#73DABB",emptyCartTitle:r="Your Cart is Empty",emptyCartDescription:o,isUserSignedIn:a=!1,joinNowFunction:i,exploreCtaRedirectLink:l,themeColor:s,emptyCartButtons:d=[],cartComponentsCornerRadius:p=0,cartComponentsCornerType:u="sharp",themeTextColor:m="white",recProductsList:f,addCartItem:g,productRecsCtaButtonText:x,ctaButtonBackgroundColor:h,ctaButtonTextColor:y,primaryTextColor:b,secondaryTextColor:v,showVariantSelectionDropdownInProductRecs:w,productRecsTitleText:C,emptyProductRecsTitleText:k="Empty cart Recommendations",backgroundSubdued:E,showEmptyCartRecommendations:S=!1,tertiaryColor:T,tertiaryTextColor:$}){const[B,z]=c(!1),[N,I]=c(null);return t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",height:"100%",overflowY:"auto",marginTop:"5px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",rowGap:"12px"}},t.createElement("svg",{className:"yt-empty-cart-svg",xmlns:"http://www.w3.org/2000/svg",width:"90",height:"80",viewBox:"0 0 79 67",fill:"none"},t.createElement("path",{d:"M78.3148 24.8681V27.0245C78.3148 28.8109 76.8667 30.259 75.0803 30.259H74.0021L70.4827 54.894C70.0275 58.081 67.298 60.4483 64.0787 60.4483H14.9214C11.7021 60.4483 8.97266 58.081 8.51726 54.894L4.99805 30.259H3.91987C2.13344 30.259 0.685303 28.8109 0.685303 27.0245V24.8681C0.685303 23.0817 2.13344 21.6335 3.91987 21.6335H12.9956L27.3868 1.84596C28.7877 -0.0802239 31.4848 -0.506243 33.4113 0.894727C35.3376 2.2957 35.7635 4.99292 34.3625 6.91924L23.6611 21.6335H55.339L44.6376 6.9191C43.2367 4.99292 43.6627 2.29556 45.589 0.894592C47.515 -0.506378 50.2125 -0.0804935 51.6135 1.84582L66.0045 21.6335H75.0803C76.8667 21.6335 78.3148 23.0817 78.3148 24.8681ZM42.7346 48.5882V33.4936C42.7346 31.7072 41.2865 30.259 39.5001 30.259C37.7136 30.259 36.2655 31.7072 36.2655 33.4936V48.5882C36.2655 50.3747 37.7136 51.8228 39.5001 51.8228C41.2865 51.8228 42.7346 50.3747 42.7346 48.5882ZM57.8293 48.5882V33.4936C57.8293 31.7072 56.3811 30.259 54.5947 30.259C52.8083 30.259 51.3601 31.7072 51.3601 33.4936V48.5882C51.3601 50.3747 52.8083 51.8228 54.5947 51.8228C56.3811 51.8228 57.8293 50.3747 57.8293 48.5882ZM27.64 48.5882V33.4936C27.64 31.7072 26.1919 30.259 24.4054 30.259C22.619 30.259 21.1709 31.7072 21.1709 33.4936V48.5882C21.1709 50.3747 22.619 51.8228 24.4054 51.8228C26.1919 51.8228 27.64 50.3747 27.64 48.5882Z",fill:v??"#4D4D4D"}),t.createElement("path",{d:"M78.0001 57C78.0001 62.5228 73.5229 67 68.0001 67C62.4772 67 58.0001 62.5228 58.0001 57C58.0001 51.4772 62.4772 47 68.0001 47C73.5229 47 78.0001 51.4772 78.0001 57Z",fill:T??"#D9D9D9"}),t.createElement("path",{d:"M64.7572 56.512C64.7572 55.128 65.0052 54.044 65.5012 53.26C66.0052 52.476 66.8372 52.084 67.9972 52.084C69.1572 52.084 69.9852 52.476 70.4812 53.26C70.9852 54.044 71.2372 55.128 71.2372 56.512C71.2372 57.904 70.9852 58.996 70.4812 59.788C69.9852 60.58 69.1572 60.976 67.9972 60.976C66.8372 60.976 66.0052 60.58 65.5012 59.788C65.0052 58.996 64.7572 57.904 64.7572 56.512ZM69.5812 56.512C69.5812 55.92 69.5412 55.424 69.4612 55.024C69.3892 54.616 69.2372 54.284 69.0052 54.028C68.7812 53.772 68.4452 53.644 67.9972 53.644C67.5492 53.644 67.2092 53.772 66.9772 54.028C66.7532 54.284 66.6012 54.616 66.5212 55.024C66.4492 55.424 66.4132 55.92 66.4132 56.512C66.4132 57.12 66.4492 57.632 66.5212 58.048C66.5932 58.456 66.7452 58.788 66.9772 59.044C67.2092 59.292 67.5492 59.416 67.9972 59.416C68.4452 59.416 68.7852 59.292 69.0172 59.044C69.2492 58.788 69.4012 58.456 69.4732 58.048C69.5452 57.632 69.5812 57.12 69.5812 56.512Z",fill:$??"black"})),t.createElement("span",{style:{color:b,fontWeight:"semibold"}},r),o&&t.createElement("span",{style:{color:"#929292",fontSize:"14px"}},o),!a&&e&&t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"4px"}},t.createElement(Mo,{color:n,fontSize:"14px",strokeWidth:2}),t.createElement(Ro,null,t.createElement("span",{onClick:i,style:{color:n,textDecorationLine:"underline",cursor:"pointer"}},"Sign-in")," ",t.createElement("span",{style:{color:"black"}},"to avail offers"))),d&&d.length>0&&t.createElement(Lo,null,d.map((e,n)=>t.createElement("button",{key:`empty-cart-button-${n}`,onMouseEnter:()=>I(n),onMouseLeave:()=>I(null),onClick:()=>window.location.href=e.link,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:N===n?s||"#73DABB":"#CACACA30",color:N===n?m:"#333333",padding:"12px 24px",cursor:"pointer",border:"1px solid #D1D1D1",borderRadius:"rounded"===u?`${p}px`:"0px",transition:"all 0.2s ease",width:"100%",fontSize:"14px",fontWeight:500,textTransform:"capitalize"}},e.title)))),S&&f&&f.length>0&&g&&t.createElement("div",{style:{width:"100%",marginTop:"20px",marginBottom:"20px"}},t.createElement(Ir,{products:f,addCartItem:g,productRecsTitleText:k,productRecsCtaButtonText:x,ctaButtonBackgroundColor:h,ctaButtonTextColor:y,primaryTextColor:b,secondaryTextColor:v,showVariantSelectionDropdownInProductRecs:w,variant:"scroll",cardLayout:"vertical",cartComponentsCornerRadius:p,cartComponentsCornerType:u,backgroundSubdued:E,tertiaryColor:T,tertiaryTextColor:$}))),t.createElement("button",{onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),onClick:()=>window.location.replace(l??"/"),style:{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"4px",backgroundColor:B?"#CACACA50":"#CACACA30",padding:"16px 40px",cursor:"pointer",border:"none",transition:"all 0.2s ease",width:"100%",justifyContent:"center",borderRadius:0,backgroundImage:"none",marginTop:"auto"}},t.createElement(Ao,{color:b}),t.createElement("span",{style:{textTransform:"uppercase",fontSize:"12px",fontWeight:600,color:b,cursor:"pointer"}},"Continue Shopping")))}function Vo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,18 L12,6 M6,12 L18,12"},child:[]}]})(e)}function Wo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"polyline",attr:{fill:"none",strokeWidth:"2",points:"9 6 15 12 9 18"},child:[]}]})(e)}function Ho(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M6,12 L18,12"},child:[]}]})(e)}function qo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M3,11 L21,11 L21,23 L3,23 L3,11 Z M2,11 L2,7 L22,7 L22,11 L2,11 Z M12,23 L12,7 L12,23 Z M7,7 L12,7 C12,7 10,2 7,2 C3.5,2 3,7 7,7 Z M17.1843819,7 L12.1843819,7 C12.1843819,7 14,2 17.1843819,2 C20.5,2 21.1843819,7 17.1843819,7 Z"},child:[]}]})(e)}const Uo=hn("gstNumber",""),Qo=hn("gstCompanyName",""),Yo=Kt("");q("/* Body when cart drawer is open */\nbody.drawer-open {\n overflow: hidden;\n}\n\n/* Quantity Selector */\n.qty-selector-decrement-button {\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n flex-wrap: nowrap !important;\n margin: 0 !important;\n cursor: pointer;\n width: 25px !important;\n height: 22px !important;\n min-height: 22px !important;\n padding: 10px !important;\n border: 0 !important;\n outline: none;\n /* focus:outline-none */\n background-color: #ffffff;\n color: black !important;\n border-radius: 0px !important;\n font-size: 16px !important;\n font-weight: 200 !important;\n min-width: fit-content;\n box-shadow: none;\n}\n\n.qty-selector-decrement-button:hover {\n background-color: #e5e7eb;\n /* hover:bg-gray-200 */\n}\n\n.qty-selector-input {\n background-color: white !important;\n /* bg-white */\n text-align: center;\n /* text-center */\n color: #111827;\n /* text-gray-900 */\n font-size: 1.1rem;\n /* text-sm */\n display: block;\n /* block */\n width: 3.4rem;\n /* w-12 */\n height: 28px;\n border: 0;\n margin: 0;\n}\n\nform .qty-selector-input {\n min-height: 22px !important;\n height: auto !important;\n text-align: center !important;\n line-height: 22px !important;\n box-shadow: none;\n}\n\n@media screen and (max-width: 450px) {\n .qty-selector-decrement-button {\n width: 30px;\n height: 28px;\n padding: 10px;\n }\n .qty-selector-input {\n height: 28px;\n width: 2rem;\n }\n}\n.close-button {\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: transform 0.5s ease-in-out;\n}\n\n.close-button:hover {\n transform: rotate(360deg);\n}\n\n.qty-selector-decrement-button,\n.yt-checkout-button {\n background-image: none !important;\n}\n\nbutton.yt-checkout-button,\nbutton.add-to-cart-button {\n min-height: auto !important;\n line-height: normal !important;\n}\n\n.yt-cart-title-container {\n display: -webkit-flex !important;\n display: -moz-flex !important;\n display: -ms-flexbox !important;\n display: flex !important;\n align-items: center !important;\n gap: 8px !important;\n flex-direction: row !important;\n flex-wrap: nowrap !important;\n}\n\n.yt-cart-details-button {\n margin-left: 5px;\n background: none;\n border: none;\n color: #d3122a;\n cursor: pointer;\n font-size: 12px;\n font-weight: 600;\n text-decoration: underline;\n padding: 0 !important;\n min-height: 10px !important;\n}\n\n.delete-icon,\n.edit-icon {\n height: 24px !important;\n width: 24px !important;\n}\n\n:root {\n --yt-base-color: #ddd;\n --yt-shine-color: #e8e8e8;\n --yt-animation-duration: 1.6s;\n --yt-cart-skeleton-loader-media-offset: 68px;\n /* 52px + 16px */\n}\n\n.yt-cart-skeleton-loader-container {\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n}\n\n.yt-cart-skeleton-loader-item {\n width: 250px;\n height: 80px;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-media {\n float: left;\n width: 52px;\n height: 52px;\n background-color: #ccc;\n border-radius: 25%;\n margin: 8px;\n background-image: linear-gradient(90deg, var(--yt-base-color) 0px, var(--yt-shine-color) 40px, var(--yt-base-color) 80px);\n background-size: 600px;\n animation: shine-yt-cart-skeleton-loader-media var(--yt-animation-duration) infinite linear;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-line {\n float: left;\n width: 180px;\n height: 16px;\n margin-top: 12px;\n border-radius: 7px;\n background-image: linear-gradient(90deg, var(--yt-base-color) 0px, var(--yt-shine-color) 40px, var(--yt-base-color) 80px);\n background-size: 600px;\n animation: shine-lines var(--yt-animation-duration) infinite linear;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-media + .yt-cart-skeleton-loader-line {\n margin-top: 11px;\n width: 140px;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-line ~ .yt-cart-skeleton-loader-line {\n background-color: var(--yt-base-color);\n}\n\n@keyframes shine-lines {\n 0% {\n background-position: -100px;\n }\n 40%, 100% {\n background-position: 140px;\n }\n}\n@keyframes shine-yt-cart-skeleton-loader-media {\n 0% {\n background-position: calc(-100px + var(--yt-cart-skeleton-loader-media-offset));\n }\n 40%, 100% {\n background-position: calc(140px + var(--yt-cart-skeleton-loader-media-offset));\n }\n}\n.yt-loyalty-cta-container {\n box-shadow: 0px 3px 3.8px 0px rgba(1, 1, 1, 0.231372549);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n border-radius: 10px;\n}\n\n.yt-loyalty-apply-cta-loading-container {\n box-shadow: 0px 3px 3.8px 0px rgba(1, 1, 1, 0.231372549);\n border: 1px solid #e5e7e8;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n border-radius: 10px;\n position: relative;\n overflow: hidden;\n margin: 0 1rem;\n min-height: 54.5px;\n background: #fafafa;\n z-index: 100;\n}\n\n.yt-loyalty-cta-progress-bar-container {\n width: 100%;\n height: 2px;\n background-color: #f0f0f0;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 100;\n}\n\n.yt-loyalty-cta-progress-bar {\n height: 100%;\n background-color: red;\n transition: width 2.25s ease-in-out;\n z-index: 100;\n}");const Go=hn("postalCode",void 0);function Zo({checkoutButtonColor:e,checkoutFontSize:n,checkoutFunction:r,discountApplied:a,discountInCheckoutButton:s,discountAmountApplied:d,minimumCartValue:p,themeTextColor:u,applyGSTToCart:m,showGSTOption:f,applyNoteToCart:g,showNoteOption:x,enableGeoLocationDeliveryRestriction:h,applyPostalCodeAndDeliverySlotToCart:y,enableSlotPicker:b,isStickyCheckout:v,cartComponentsCornerType:w,cartComponentsCornerRadius:C,checkoutSectionMessage:k,checkoutSectionMessageDisplay:E,checkoutSectionMessageRedirectLink:S,showDiscountOnMRP:T,tertiaryColor:$,tertiaryTextColor:B,cartCheckpoints:z,toggleDecimal:N,disableCheckoutButton:I,checkoutButtonBottomSpacing:D=8,showPoweredByBadge:_=!0,showCheckoutButtonPaymentIcons:P,primaryTextColor:O}){const F=dn(mn),A=dn(Uo),M=dn(Qo),R=dn(Yo),L=dn(bn),j=dn(yn),V=dn(Go),W=dn(wn),H=dn(vn),[q,U]=c(!1),Q=In(F,F?.currency),[Y,G]=c("closed"),Z=o(null),[X,K]=c(!1),J=i(()=>((e,t=.2)=>{if(!e)return"#000000";try{const n=e.trim();if(n.startsWith("#")&&(7===n.length||9===n.length)){const e=parseInt(n.slice(1,3),16),r=parseInt(n.slice(3,5),16),o=parseInt(n.slice(5,7),16),a=9===n.length?parseInt(n.slice(7,9),16):void 0,i=Math.max(0,Math.min(255,Math.floor(e*(1-t)))),l=Math.max(0,Math.min(255,Math.floor(r*(1-t)))),c=Math.max(0,Math.min(255,Math.floor(o*(1-t)))),s=`#${i.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`;return void 0!==a?`${s}${a.toString(16).padStart(2,"0")}`:s}return e}catch{return e}})($,.22),[$]),ee=i(()=>zn(p??0,F?.currency??"INR"),[p,F?.currency]),te=i(()=>jn(N?ee.toFixed(2):ee.toFixed(0)),[ee,N]),ne=o(null),re=o(null),oe=o(null),ae=()=>{G("closing"),setTimeout(()=>{G("closed")},300)},ie=zn(F?.original_total_price,F?.currency),le=i(()=>z?.find(e=>"free_delivery"===e.couponType&&void 0!==e.discountValue),[z]),ce=i(()=>!(!le||!le.minimumOrderValue)&&ie>=le.minimumOrderValue,[le,ie]),se=ce&&le&&le.discountValue||0,de=d?zn(d,F?.currency??"INR"):0,pe=Number((ie-de).toFixed(2)),ue=i(()=>{if(!F?.items?.length)return 0;const e=F.items.reduce((e,t)=>e+(T&&t?.compare_at_price&&t?.compare_at_price>t?.original_price?t.compare_at_price:t.original_price)*t.quantity,0);return zn(e,F?.currency)},[F?.items,T]),me=i(()=>ce?ue+se:ue,[ce,ue,se]),fe=i(()=>ee&&ee>0?`Add products worth more than ${Q}${te}`:"",[ee,Q,te]),ge=i(()=>F?.items?.length?F.items.reduce((e,t)=>t.compare_at_price&&t.compare_at_price>t.original_price?e+(t.compare_at_price-t.original_price)*t.quantity:e,0):0,[F?.items]),xe=zn(ge,F?.currency??"INR");l(()=>{ne.current&&Ln(ne.current),re.current&&Ln(re.current),oe.current&&Ln(oe.current)},[e,de,T,xe,Y,se]);const he=i(()=>{const e={};return F?.items?.length?(F.items.forEach(t=>{t.discounts&&Array.isArray(t.discounts)&&t.discounts.forEach(t=>{e[t.title]=(e[t.title]||0)+t.amount})}),e):e},[F?.items]),ye=i(()=>{const e=[];for(const t in he)if(Object.prototype.hasOwnProperty.call(he,t)){const n=he[t],r=zn(n,F?.currency??"INR"),o=Hn(t);e.push({title:o,amount:r})}return e},[he,F?.currency]),be=i(()=>{let e=0;return e+=T?de+xe:de,ce&&(e+=se),e},[de,xe,T,ce,se]),ve=async e=>{if(U(!0),pe<=0)U(!1);else{if(h){if("standard"!==H&&(b?!L:!j.isPostalCodeValid))return void U(!1);if(y)try{"standard"===H?await y(H):await y(H,String(V)||"",W&&b?new Date(W).toDateString():"")}catch(e){console.error("Error applying postal code and delivery slot"),alert("There was an error processing your delivery options. Please try again.")}}f&&m&&""!==M&&""!==A&&await m(A,M),x&&g&&""!==R&&await g(R),await r(e),U(!1)}},[we,Ce]=c(!1);l(()=>{Ce(pe<=0||(!!I||!!h&&("standard"!==H&&(b?!L:!j.isPostalCodeValid))))},[j,H,h,b,L,W,I,pe]);const[ke,Ee]=c(!1),Se=o(null),[Te,$e]=c("0px");l(()=>{Se.current&&$e(ke?`${Se.current.scrollHeight}px`:"0px")},[ke,ye,ce]);const Be=()=>{Ee(!ke)};l(()=>{function e(e){Z.current&&!Z.current.contains(e.target)&&ae()}return"open"!==Y&&"opening"!==Y||document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[Y]);const ze=(e,n="Checkout")=>e?t.createElement("span",{style:{fontSize:"13px",width:"100%",textAlign:"center"}},"Redirecting to Checkout..."):P?t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"none"}},t.createElement("span",{className:"yt-cart-summary-checkout-span",style:{fontSize:"16px"}},n),t.createElement("div",{style:{display:"flex",alignItems:"center",marginLeft:"1.5rem"}},t.createElement("img",{src:"https://r2.yourtoken.io/checkout-button-payment-provider-icons.png",alt:"Payment methods",style:{height:"22px",width:"auto"}}),t.createElement(Wo,{className:"yt-cart-summary-checkout-next-icon",fontSize:"24px"}))):t.createElement("div",{style:{alignItems:"center",display:"flex",columnGap:"5px",pointerEvents:"none"}},t.createElement(co,{fontSize:"20px"}),t.createElement("span",{style:{fontSize:"16px",pointerEvents:"none"}},n));return t.createElement("div",{style:{position:"relative"}},!!k&&k.length>0&&!Vn()&&(()=>{const e=E||"ribbon";if("ribbon"===e)return t.createElement("div",{className:"yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:$,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:B,marginBottom:"4px",borderTopLeftRadius:"14px",borderTopRightRadius:"14px",cursor:S?"pointer":"default"},onClick:()=>{S&&(window.location.href=S)}},k);const n=({children:n})=>t.createElement("div",{className:"yt-cart-checkout-ribbon-container",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",padding:"0 55px",marginBottom:"4px",position:"bookmark"===e?"absolute":"static",top:"bookmark"===e?"-11px":void 0,cursor:S?"pointer":"default"},onClick:()=>{S&&(window.location.href=S)}},n);return"tag"===e?t.createElement(n,null,t.createElement("div",{className:"yt-cart-checkout-ribbon-tag-container",style:{display:"flex",alignItems:"center",width:"100%"}},t.createElement("svg",{width:"20",height:"26",viewBox:"0 0 20 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"0 0 auto"}},t.createElement("path",{d:"M0 0H20V20H0L7.41935 10.7639L0 0Z",fill:J}),t.createElement("path",{d:"M12.2581 5.80645L20 0V5.80645H12.2581Z",fill:"black",fillOpacity:"0.36"}),t.createElement("path",{d:"M12 5.80646L20 5.80645V25.8065H12V5.80646Z",fill:$})),t.createElement("div",{className:"yt-cart-checkout-ribbon-tag-center",style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",backgroundColor:$,color:B,padding:"8px 16px",fontSize:"10px",marginTop:"5px",lineHeight:"5px"}},k),t.createElement("svg",{width:"20",height:"26",viewBox:"0 0 20 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"0 0 auto"}},t.createElement("path",{d:"M20 0H0V20H20L12.5806 10.7639L20 0Z",fill:J}),t.createElement("path",{d:"M7.74194 5.80645L0 0V5.80645H7.74194Z",fill:"black",fillOpacity:"0.36"}),t.createElement("path",{d:"M8 5.80646L0 5.80645V25.8065H8V5.80646Z",fill:$})))):t.createElement(n,null,t.createElement("div",{className:"yt-cart-checkout-ribbon-bookmark-container",style:{display:"flex",alignItems:"center",width:"100%"}},t.createElement("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M8.34334 4.75V9.5H0V4.75C0 2.12665 1.86772 0 4.17167 0C6.47562 0 8.34334 2.12665 8.34334 4.75Z",fill:J}),t.createElement("path",{d:"M12.1545 19H13.9056V0H4.17167C6.27666 0 7.98284 1.943 7.98284 4.33981V14.25C7.98284 16.8734 9.85056 19 12.1545 19Z",fill:$})),t.createElement("div",{className:"yt-cart-checkout-ribbon-bookmark-center",style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",backgroundColor:$,color:B,padding:"8px 16px",fontSize:"10px",lineHeight:"3px",marginRight:"-1px",marginLeft:"-1px"}},k),t.createElement("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M5.65666 4.75V9.5H14V4.75C14 2.12665 12.1323 0 9.82833 0C7.52438 0 5.65666 2.12665 5.65666 4.75Z",fill:J}),t.createElement("path",{d:"M1.84549 19H0.0944166V0H9.82833C7.72334 0 6.01716 1.943 6.01716 4.33981V14.25C6.01716 16.8734 4.14944 19 1.84549 19Z",fill:$}))))})(),(!0===s||"true"===s)&&"closed"!==Y&&t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:"open"===Y?1:0,transition:"opacity 0.3s ease-in-out",display:"block",zIndex:2147483643},onClick:ae}),t.createElement("div",{ref:Z,style:{position:"fixed",bottom:0,left:0,right:0,zIndex:2147483644,transform:"open"===Y?"translateY(0)":"translateY(100%)",transition:"transform 0.3s cubic-bezier(0.22, 1, 0.36, 1)"}},t.createElement("div",{style:{backgroundColor:"#F1F1F1",padding:"1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000000",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",fontWeight:"bold",fontSize:"16px"}},t.createElement("span",null,"Price Summary"),t.createElement("button",{onClick:ae,style:{background:"none",border:"none",color:"#000000",fontSize:"16px",fontWeight:"bold",cursor:"pointer",padding:0,marginLeft:"auto",transition:"transform 0.3s ease"}},"✕")),t.createElement("div",{style:{backgroundColor:"white",padding:"10px 1rem 0"}},t.createElement(t.Fragment,null,(T&&xe>0||a&&ye.length>0||ce&&se>0)&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"14px",color:"#212529"}},"Subtotal"),t.createElement("span",{style:{fontSize:"14px",color:"#212529"}},Q,jn(ce?N?me.toFixed(2):me.toFixed(0):N?ue.toFixed(2):ue.toFixed(0)))),(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",paddingBottom:"5px",marginTop:"5px",fontWeight:"600"}},T&&xe>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529"}},t.createElement("span",null,"Discount on MRP"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?xe.toFixed(2):xe.toFixed(0)))),ce&&se>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529"}},t.createElement("span",null,"Free Shipping"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?se.toFixed(2):se.toFixed(0)))),ye.map(e=>t.createElement("div",{key:e.title,style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#1E1E1E"}},t.createElement("span",null,e.title),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?e.amount.toFixed(2):e.amount.toFixed(0))))),be>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529",marginTop:"5px",paddingTop:"5px",borderTop:"1px solid #E5E7EB"}},t.createElement("span",null,"Total Savings"),t.createElement("span",{style:{color:"#D3122A",fontWeight:"bold"}},"-",Q,jn(N?be.toFixed(2):be.toFixed(0))))),(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{style:{height:"12px",display:"flex",background:"#F5F5F5",width:"calc(100% + 2rem)",margin:"10px -1rem 0 -1rem",position:"relative",borderTop:"0.8px solid #C5C5C5",borderBottom:"0.8px solid #C5C5C5"}}))),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:de>0||T&&xe>0||ce&&se>0?"10px":"0"}},t.createElement("div",{style:{display:"flex",flexDirection:"column"}},t.createElement("span",{style:{fontSize:"14px",fontWeight:"600",color:"#212529"}},"Grand Total"),t.createElement("span",{style:{fontSize:"9px",color:"#4A5157"}},"Inclusive of all taxes")),t.createElement("span",{style:{fontSize:"16px",color:"black",fontWeight:"var(--yt-cart-font-weight)"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0)))),t.createElement("div",{style:{display:"flex",background:$,color:B,width:"calc(100% + 2rem)",margin:"10px -1rem 0 -1rem",position:"relative",fontSize:"12px",fontWeight:"600",justifyContent:"center",alignItems:"center",gap:"5px",padding:"4px 0"}},t.createElement("img",{src:"https://r2.yourtoken.io/image%2016.png",alt:"confetti-image",style:{width:"30px",height:"30px"}}),"You saved"," ",t.createElement("span",null,Q,jn(N?be.toFixed(2):be.toFixed(0)))," ","on your order")),t.createElement("button",{ref:re,id:"yt-checkout-button-popout",className:"yt-checkout-button",onClick:ve,disabled:we,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:0,height:"45px",padding:"10px",justifyContent:"center",columnGap:"8px",backgroundColor:e,border:0,textTransform:"uppercase",fontSize:n,letterSpacing:"1px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"0px",boxShadow:"none",width:"100%"}},ze(q)))),(!0===s||"true"===s)&&I&&we&&fe&&t.createElement("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"13px",color:"red"}},fe),!0===s||"true"===s?t.createElement("div",{className:"yt-cart-checkout-section-concise-container",style:{display:"flex",flexDirection:"column",backgroundColor:"rgba(138, 138, 138, 0.08)",paddingTop:"10px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"space-between",width:"auto",padding:v?"7px 0 8px 8px":`7px 8px ${D}px 8px`}},t.createElement("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",justifyContent:"center",alignItems:"flex-start",paddingRight:"2rem",overflowWrap:"normal"}},(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{className:"yt-cart-checkout-save-badge",ref:oe,style:{fontSize:"9px",backgroundColor:e,width:"max-content",padding:"2px 8px"}},"Saving ",Q,jn(N?be.toFixed(2):be.toFixed(0))),q?t.createElement("div",{style:{fontSize:"12px",color:"#4a4a4a"}},"Redirecting to Checkout..."):a||ce&&le?t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"center"}},t.createElement("span",{style:{fontSize:"15px",color:"#1E1E1E",fontWeight:"600"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))),(de>0||xe>0||ce&&se>0)&&t.createElement("span",{style:{fontSize:"14px",color:"#8C8C8C",textDecoration:"line-through",marginLeft:"4px",fontWeight:"normal"}},Q,jn(ce?me.toFixed(0):ue.toFixed(0))))):t.createElement("div",{style:{fontSize:"18px",color:"#1E1E1E",fontWeight:"600"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))),T&&xe>0||a&&de>0||ce&&se>0?t.createElement("div",{style:{fontSize:"11px",color:"#4A5157",width:"max-content",cursor:"pointer",textDecoration:"underline"},onClick:e=>{e.stopPropagation(),G("opening"),requestAnimationFrame(()=>{G("open")}),K(!X)}},"See Details"):t.createElement("div",{style:{fontSize:"9px",color:"#4A5157",width:"max-content"}},"Inclusive of all taxes")),t.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},t.createElement("button",{ref:ne,id:"yt-checkout-button",className:"yt-checkout-button",onClick:ve,disabled:we,style:{backgroundColor:e,border:0,textTransform:"uppercase",letterSpacing:"1px",fontSize:"12px",padding:"10px 15px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"rounded"===w?`${C}px`:"0px",width:"100%",margin:"0 auto",boxShadow:"none"}},P?t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"none"}},t.createElement("span",{style:{fontSize:"12px"}},"CHECKOUT"),t.createElement("div",{style:{display:"flex",alignItems:"center",marginLeft:"1.5rem"}},t.createElement("img",{src:"https://r2.yourtoken.io/checkout-button-payment-provider-icons.png",alt:"Payment methods",style:{height:"22px",width:"auto"}}),t.createElement(Wo,{fontSize:"24px"}))):"CHECKOUT"))),_&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingBlock:"0 6px"}},t.createElement("img",{src:"https://r2.yourtoken.io/badge.png",alt:"Powered by YourToken",style:{height:"48px",width:"auto"}}))):t.createElement(t.Fragment,null,I&&we&&fe&&t.createElement("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"13px",color:"red"}},fe),t.createElement("div",{className:"yt-cart-checkout-summary",style:{display:"flex",flexDirection:"column",rowGap:"5px",backgroundColor:"rgba(138, 138, 138, 0.08)",paddingTop:"10px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"2px",margin:"0 1rem",color:O}},(xe>0||a&&ye.length>0||ce&&se>0)&&be>0&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"12px"}},"Subtotal"),t.createElement("span",{style:{fontSize:"14px"}},Q,jn(ce?N?me.toFixed(2):me.toFixed(0):N?ue.toFixed(2):ue.toFixed(0)))),(de>0||xe>0||ce&&se>0)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",paddingBottom:"5px"}},t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center"}},"Discounts Applied",t.createElement("button",{onClick:Be,className:"yt-cart-details-button",style:{marginBottom:"0",marginLeft:"5px",background:"none",border:"none",color:"#7E7E7E",cursor:"pointer",fontSize:"12px",fontWeight:"600",textDecoration:"underline",padding:"0 !important",minHeight:"10px !important",boxShadow:"none",minWidth:"fit-content",height:"auto",lineHeight:"normal",marginTop:"0"}},ke?"Hide details":"See details")),t.createElement("span",{style:{fontSize:"14px",color:"#D3122A",fontWeight:"600"}},"-",Q,jn(N?be.toFixed(2):be.toFixed(0)))),t.createElement("div",{ref:Se,style:{height:Te,overflow:"hidden",transition:"height 0.3s ease, opacity 0.3s ease",opacity:ke?1:0,marginTop:ke?"5px":"0",borderTop:ke?"1px solid #E5E7EB":"none",paddingTop:ke?"5px":"0",fontWeight:"600"}},T&&xe>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,"Discount on MRP"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?xe.toFixed(2):xe.toFixed(0)))),ce&&se>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,"Free Shipping"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?se.toFixed(2):se.toFixed(0)))),ye.map(e=>t.createElement("div",{key:e.title,style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,e.title),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?e.amount.toFixed(2):e.amount.toFixed(0))))))),t.createElement("hr",{className:"yt-cart-checkout-divider",style:{height:"1px",margin:"2px 0",backgroundColor:"#E5E7EB",border:"none",maxWidth:"unset"}})),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"14px",fontWeight:"600"}},"Total"),t.createElement("span",{style:{fontSize:"16px",fontWeight:"var(--yt-cart-font-weight)"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))))),t.createElement("button",{ref:ne,id:"yt-checkout-button",className:"yt-checkout-button",onClick:ve,disabled:we,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"closed"!==Y||v?"0":`4px 1rem ${D}px 1rem`,height:"45px",paddingTop:"10px",paddingBottom:"10px",justifyContent:"center",columnGap:"8px",backgroundColor:e,border:0,color:u??"white",textTransform:"uppercase",fontSize:n,letterSpacing:"1px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"closed"!==Y?"0px":"rounded"===w?`${C}px`:"0px",boxShadow:"none"}},ze(q,P?"Checkout":"Proceed to Checkout")),_&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingBlock:"0px 6px"}},t.createElement("img",{src:"https://r2.yourtoken.io/powered-by-badge-v2.png",alt:"Powered by YourToken",style:{height:"48px",width:"auto"}})))))}const Xo=h.button`
|
|
996
|
+
`;function jo({showLoyaltyCta:e,exploreCTAColor:n="#73DABB",emptyCartTitle:r="Your Cart is Empty",emptyCartDescription:o,isUserSignedIn:a=!1,joinNowFunction:i,exploreCtaRedirectLink:l,themeColor:s,emptyCartButtons:d=[],cartComponentsCornerRadius:p=0,cartComponentsCornerType:u="sharp",themeTextColor:m="white",recProductsList:f,addCartItem:g,productRecsCtaButtonText:x,ctaButtonBackgroundColor:h,ctaButtonTextColor:y,primaryTextColor:b,secondaryTextColor:v,showVariantSelectionDropdownInProductRecs:w,productRecsTitleText:C,emptyProductRecsTitleText:k="Empty cart Recommendations",backgroundSubdued:E,showEmptyCartRecommendations:S=!1,tertiaryColor:T,tertiaryTextColor:$}){const[B,z]=c(!1),[N,I]=c(null);return t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",height:"100%",overflowY:"auto",marginTop:"5px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",rowGap:"12px"}},t.createElement("svg",{className:"yt-empty-cart-svg",xmlns:"http://www.w3.org/2000/svg",width:"90",height:"80",viewBox:"0 0 79 67",fill:"none"},t.createElement("path",{d:"M78.3148 24.8681V27.0245C78.3148 28.8109 76.8667 30.259 75.0803 30.259H74.0021L70.4827 54.894C70.0275 58.081 67.298 60.4483 64.0787 60.4483H14.9214C11.7021 60.4483 8.97266 58.081 8.51726 54.894L4.99805 30.259H3.91987C2.13344 30.259 0.685303 28.8109 0.685303 27.0245V24.8681C0.685303 23.0817 2.13344 21.6335 3.91987 21.6335H12.9956L27.3868 1.84596C28.7877 -0.0802239 31.4848 -0.506243 33.4113 0.894727C35.3376 2.2957 35.7635 4.99292 34.3625 6.91924L23.6611 21.6335H55.339L44.6376 6.9191C43.2367 4.99292 43.6627 2.29556 45.589 0.894592C47.515 -0.506378 50.2125 -0.0804935 51.6135 1.84582L66.0045 21.6335H75.0803C76.8667 21.6335 78.3148 23.0817 78.3148 24.8681ZM42.7346 48.5882V33.4936C42.7346 31.7072 41.2865 30.259 39.5001 30.259C37.7136 30.259 36.2655 31.7072 36.2655 33.4936V48.5882C36.2655 50.3747 37.7136 51.8228 39.5001 51.8228C41.2865 51.8228 42.7346 50.3747 42.7346 48.5882ZM57.8293 48.5882V33.4936C57.8293 31.7072 56.3811 30.259 54.5947 30.259C52.8083 30.259 51.3601 31.7072 51.3601 33.4936V48.5882C51.3601 50.3747 52.8083 51.8228 54.5947 51.8228C56.3811 51.8228 57.8293 50.3747 57.8293 48.5882ZM27.64 48.5882V33.4936C27.64 31.7072 26.1919 30.259 24.4054 30.259C22.619 30.259 21.1709 31.7072 21.1709 33.4936V48.5882C21.1709 50.3747 22.619 51.8228 24.4054 51.8228C26.1919 51.8228 27.64 50.3747 27.64 48.5882Z",fill:v??"#4D4D4D"}),t.createElement("path",{d:"M78.0001 57C78.0001 62.5228 73.5229 67 68.0001 67C62.4772 67 58.0001 62.5228 58.0001 57C58.0001 51.4772 62.4772 47 68.0001 47C73.5229 47 78.0001 51.4772 78.0001 57Z",fill:T??"#D9D9D9"}),t.createElement("path",{d:"M64.7572 56.512C64.7572 55.128 65.0052 54.044 65.5012 53.26C66.0052 52.476 66.8372 52.084 67.9972 52.084C69.1572 52.084 69.9852 52.476 70.4812 53.26C70.9852 54.044 71.2372 55.128 71.2372 56.512C71.2372 57.904 70.9852 58.996 70.4812 59.788C69.9852 60.58 69.1572 60.976 67.9972 60.976C66.8372 60.976 66.0052 60.58 65.5012 59.788C65.0052 58.996 64.7572 57.904 64.7572 56.512ZM69.5812 56.512C69.5812 55.92 69.5412 55.424 69.4612 55.024C69.3892 54.616 69.2372 54.284 69.0052 54.028C68.7812 53.772 68.4452 53.644 67.9972 53.644C67.5492 53.644 67.2092 53.772 66.9772 54.028C66.7532 54.284 66.6012 54.616 66.5212 55.024C66.4492 55.424 66.4132 55.92 66.4132 56.512C66.4132 57.12 66.4492 57.632 66.5212 58.048C66.5932 58.456 66.7452 58.788 66.9772 59.044C67.2092 59.292 67.5492 59.416 67.9972 59.416C68.4452 59.416 68.7852 59.292 69.0172 59.044C69.2492 58.788 69.4012 58.456 69.4732 58.048C69.5452 57.632 69.5812 57.12 69.5812 56.512Z",fill:$??"black"})),t.createElement("span",{style:{color:b,fontWeight:"semibold"}},r),o&&t.createElement("span",{style:{color:"#929292",fontSize:"14px"}},o),!a&&e&&t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"4px"}},t.createElement(Mo,{color:n,fontSize:"14px",strokeWidth:2}),t.createElement(Ro,null,t.createElement("span",{onClick:i,style:{color:n,textDecorationLine:"underline",cursor:"pointer"}},"Sign-in")," ",t.createElement("span",{style:{color:"black"}},"to avail offers"))),d&&d.length>0&&t.createElement(Lo,null,d.map((e,n)=>t.createElement("button",{key:`empty-cart-button-${n}`,onMouseEnter:()=>I(n),onMouseLeave:()=>I(null),onClick:()=>window.location.href=e.link,style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:N===n?s||"#73DABB":"#CACACA30",color:N===n?m:"#333333",padding:"12px 24px",cursor:"pointer",border:"1px solid #D1D1D1",borderRadius:"rounded"===u?`${p}px`:"0px",transition:"all 0.2s ease",width:"100%",fontSize:"14px",fontWeight:500,textTransform:"capitalize"}},e.title)))),S&&f&&f.length>0&&g&&t.createElement("div",{style:{width:"100%",marginTop:"20px",marginBottom:"20px"}},t.createElement(Ir,{products:f,addCartItem:g,productRecsTitleText:k,productRecsCtaButtonText:x,ctaButtonBackgroundColor:h,ctaButtonTextColor:y,primaryTextColor:b,secondaryTextColor:v,showVariantSelectionDropdownInProductRecs:w,variant:"scroll",cardLayout:"vertical",cartComponentsCornerRadius:p,cartComponentsCornerType:u,backgroundSubdued:E,tertiaryColor:T,tertiaryTextColor:$}))),t.createElement("button",{onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),onClick:()=>window.location.replace(l??"/"),style:{display:"flex",flexDirection:"row",alignItems:"center",columnGap:"4px",backgroundColor:B?"#CACACA50":"#CACACA30",padding:"16px 40px",cursor:"pointer",border:"none",transition:"all 0.2s ease",width:"100%",justifyContent:"center",borderRadius:0,backgroundImage:"none",marginTop:"auto"}},t.createElement(Ao,{color:b}),t.createElement("span",{style:{textTransform:"uppercase",fontSize:"12px",fontWeight:600,color:b,cursor:"pointer"}},"Continue Shopping")))}function Vo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,18 L12,6 M6,12 L18,12"},child:[]}]})(e)}function Wo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"polyline",attr:{fill:"none",strokeWidth:"2",points:"9 6 15 12 9 18"},child:[]}]})(e)}function Ho(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M6,12 L18,12"},child:[]}]})(e)}function qo(e){return _({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M3,11 L21,11 L21,23 L3,23 L3,11 Z M2,11 L2,7 L22,7 L22,11 L2,11 Z M12,23 L12,7 L12,23 Z M7,7 L12,7 C12,7 10,2 7,2 C3.5,2 3,7 7,7 Z M17.1843819,7 L12.1843819,7 C12.1843819,7 14,2 17.1843819,2 C20.5,2 21.1843819,7 17.1843819,7 Z"},child:[]}]})(e)}const Uo=hn("gstNumber",""),Qo=hn("gstCompanyName",""),Yo=Kt("");q("/* Body when cart drawer is open */\nbody.drawer-open {\n overflow: hidden;\n}\n\n/* Quantity Selector */\n.qty-selector-decrement-button {\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n flex-wrap: nowrap !important;\n margin: 0 !important;\n cursor: pointer;\n width: 25px !important;\n height: 22px !important;\n min-height: 22px !important;\n padding: 10px !important;\n border: 0 !important;\n outline: none;\n /* focus:outline-none */\n background-color: #ffffff;\n color: black !important;\n border-radius: 0px !important;\n font-size: 16px !important;\n font-weight: 200 !important;\n min-width: fit-content;\n box-shadow: none;\n}\n\n.qty-selector-decrement-button:hover {\n background-color: #e5e7eb;\n /* hover:bg-gray-200 */\n}\n\n.qty-selector-input {\n background-color: white !important;\n /* bg-white */\n text-align: center;\n /* text-center */\n color: #111827;\n /* text-gray-900 */\n font-size: 1.1rem;\n /* text-sm */\n display: block;\n /* block */\n width: 3.4rem;\n /* w-12 */\n height: 28px;\n border: 0;\n margin: 0;\n}\n\nform .qty-selector-input {\n min-height: 22px !important;\n height: auto !important;\n text-align: center !important;\n line-height: 22px !important;\n box-shadow: none;\n}\n\n@media screen and (max-width: 450px) {\n .qty-selector-decrement-button {\n width: 30px;\n height: 28px;\n padding: 10px;\n }\n .qty-selector-input {\n height: 28px;\n width: 2rem;\n }\n}\n.close-button {\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: transform 0.5s ease-in-out;\n}\n\n.close-button:hover {\n transform: rotate(360deg);\n}\n\n.qty-selector-decrement-button,\n.yt-checkout-button {\n background-image: none !important;\n}\n\nbutton.yt-checkout-button,\nbutton.add-to-cart-button {\n min-height: auto !important;\n line-height: normal !important;\n}\n\n.yt-cart-title-container {\n display: -webkit-flex !important;\n display: -moz-flex !important;\n display: -ms-flexbox !important;\n display: flex !important;\n align-items: center !important;\n gap: 8px !important;\n flex-direction: row !important;\n flex-wrap: nowrap !important;\n}\n\n.yt-cart-details-button {\n margin-left: 5px;\n background: none;\n border: none;\n color: #d3122a;\n cursor: pointer;\n font-size: 12px;\n font-weight: 600;\n text-decoration: underline;\n padding: 0 !important;\n min-height: 10px !important;\n}\n\n.delete-icon,\n.edit-icon {\n height: 24px !important;\n width: 24px !important;\n}\n\n:root {\n --yt-base-color: #ddd;\n --yt-shine-color: #e8e8e8;\n --yt-animation-duration: 1.6s;\n --yt-cart-skeleton-loader-media-offset: 68px;\n /* 52px + 16px */\n}\n\n.yt-cart-skeleton-loader-container {\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n}\n\n.yt-cart-skeleton-loader-item {\n width: 250px;\n height: 80px;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-media {\n float: left;\n width: 52px;\n height: 52px;\n background-color: #ccc;\n border-radius: 25%;\n margin: 8px;\n background-image: linear-gradient(90deg, var(--yt-base-color) 0px, var(--yt-shine-color) 40px, var(--yt-base-color) 80px);\n background-size: 600px;\n animation: shine-yt-cart-skeleton-loader-media var(--yt-animation-duration) infinite linear;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-line {\n float: left;\n width: 180px;\n height: 16px;\n margin-top: 12px;\n border-radius: 7px;\n background-image: linear-gradient(90deg, var(--yt-base-color) 0px, var(--yt-shine-color) 40px, var(--yt-base-color) 80px);\n background-size: 600px;\n animation: shine-lines var(--yt-animation-duration) infinite linear;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-media + .yt-cart-skeleton-loader-line {\n margin-top: 11px;\n width: 140px;\n}\n\n.yt-cart-skeleton-loader-item .yt-cart-skeleton-loader-line ~ .yt-cart-skeleton-loader-line {\n background-color: var(--yt-base-color);\n}\n\n@keyframes shine-lines {\n 0% {\n background-position: -100px;\n }\n 40%, 100% {\n background-position: 140px;\n }\n}\n@keyframes shine-yt-cart-skeleton-loader-media {\n 0% {\n background-position: calc(-100px + var(--yt-cart-skeleton-loader-media-offset));\n }\n 40%, 100% {\n background-position: calc(140px + var(--yt-cart-skeleton-loader-media-offset));\n }\n}\n.yt-loyalty-cta-container {\n box-shadow: 0px 3px 3.8px 0px rgba(1, 1, 1, 0.231372549);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n border-radius: 10px;\n}\n\n.yt-loyalty-apply-cta-loading-container {\n box-shadow: 0px 3px 3.8px 0px rgba(1, 1, 1, 0.231372549);\n border: 1px solid #e5e7e8;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n border-radius: 10px;\n position: relative;\n overflow: hidden;\n margin: 0 1rem;\n min-height: 54.5px;\n background: #fafafa;\n z-index: 100;\n}\n\n.yt-loyalty-cta-progress-bar-container {\n width: 100%;\n height: 2px;\n background-color: #f0f0f0;\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 100;\n}\n\n.yt-loyalty-cta-progress-bar {\n height: 100%;\n background-color: red;\n transition: width 2.25s ease-in-out;\n z-index: 100;\n}");const Go=hn("postalCode",void 0);function Zo({checkoutButtonColor:e,checkoutFontSize:n,checkoutFunction:r,discountApplied:a,discountInCheckoutButton:s,discountAmountApplied:d,minimumCartValue:p,themeTextColor:u,applyGSTToCart:m,showGSTOption:f,applyNoteToCart:g,showNoteOption:x,enableGeoLocationDeliveryRestriction:h,applyPostalCodeAndDeliverySlotToCart:y,enableSlotPicker:b,isStickyCheckout:v,cartComponentsCornerType:w,cartComponentsCornerRadius:C,checkoutSectionMessage:k,checkoutSectionMessageDisplay:E,checkoutSectionMessageRedirectLink:S,showDiscountOnMRP:T,tertiaryColor:$,tertiaryTextColor:B,cartCheckpoints:z,toggleDecimal:N,disableCheckoutButton:I,checkoutButtonBottomSpacing:D=8,showPoweredByBadge:_=!0,showCheckoutButtonPaymentIcons:P,primaryTextColor:O}){const F=dn(mn),A=dn(Uo),M=dn(Qo),R=dn(Yo),L=dn(bn),j=dn(yn),V=dn(Go),W=dn(wn),H=dn(vn),[q,U]=c(!1),Q=In(F,F?.currency),[Y,G]=c("closed"),Z=o(null),[X,K]=c(!1),J=i(()=>((e,t=.2)=>{if(!e)return"#000000";try{const n=e.trim();if(n.startsWith("#")&&(7===n.length||9===n.length)){const e=parseInt(n.slice(1,3),16),r=parseInt(n.slice(3,5),16),o=parseInt(n.slice(5,7),16),a=9===n.length?parseInt(n.slice(7,9),16):void 0,i=Math.max(0,Math.min(255,Math.floor(e*(1-t)))),l=Math.max(0,Math.min(255,Math.floor(r*(1-t)))),c=Math.max(0,Math.min(255,Math.floor(o*(1-t)))),s=`#${i.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`;return void 0!==a?`${s}${a.toString(16).padStart(2,"0")}`:s}return e}catch{return e}})($,.22),[$]),ee=i(()=>zn(p??0,F?.currency??"INR"),[p,F?.currency]),te=i(()=>jn(N?ee.toFixed(2):ee.toFixed(0)),[ee,N]),ne=o(null),re=o(null),oe=o(null),ae=()=>{G("closing"),setTimeout(()=>{G("closed")},300)},ie=zn(F?.original_total_price,F?.currency),le=i(()=>z?.find(e=>"free_delivery"===e.couponType&&void 0!==e.discountValue),[z]),ce=i(()=>!(!le||!le.minimumOrderValue)&&ie>=le.minimumOrderValue,[le,ie]),se=ce&&le&&le.discountValue||0,de=d?zn(d,F?.currency??"INR"):0,pe=Number((ie-de).toFixed(2)),ue=i(()=>{if(!F?.items?.length)return 0;const e=F.items.reduce((e,t)=>e+(T&&t?.compare_at_price&&t?.compare_at_price>t?.original_price?t.compare_at_price:t.original_price)*t.quantity,0);return zn(e,F?.currency)},[F?.items,T]),me=i(()=>ce?ue+se:ue,[ce,ue,se]),fe=i(()=>ee&&ee>0?`Add products worth more than ${Q}${te}`:"",[ee,Q,te]),ge=i(()=>F?.items?.length?F.items.reduce((e,t)=>t.compare_at_price&&t.compare_at_price>t.original_price?e+(t.compare_at_price-t.original_price)*t.quantity:e,0):0,[F?.items]),xe=zn(ge,F?.currency??"INR");l(()=>{ne.current&&Ln(ne.current),re.current&&Ln(re.current),oe.current&&Ln(oe.current)},[e,de,T,xe,Y,se]);const he=i(()=>{const e={};return F?.items?.length?(F.items.forEach(t=>{t.discounts&&Array.isArray(t.discounts)&&t.discounts.forEach(t=>{e[t.title]=(e[t.title]||0)+t.amount})}),e):e},[F?.items]),ye=i(()=>{const e=[];for(const t in he)if(Object.prototype.hasOwnProperty.call(he,t)){const n=he[t],r=zn(n,F?.currency??"INR"),o=Hn(t);e.push({title:o,amount:r})}return e},[he,F?.currency]),be=i(()=>{let e=0;return e+=T?de+xe:de,ce&&(e+=se),e},[de,xe,T,ce,se]),ve=async e=>{if(U(!0),pe<=0)U(!1);else{if(h){if("standard"!==H&&(b?!L:!j.isPostalCodeValid))return void U(!1);if(y)try{"standard"===H?await y(H):await y(H,String(V)||"",W&&b?new Date(W).toDateString():"")}catch(e){console.error("Error applying postal code and delivery slot"),alert("There was an error processing your delivery options. Please try again.")}}f&&m&&""!==M&&""!==A&&await m(A,M),x&&g&&""!==R&&await g(R),await r(e),U(!1)}},[we,Ce]=c(!1);l(()=>{Ce(pe<=0||(!!I||!!h&&("standard"!==H&&(b?!L:!j.isPostalCodeValid))))},[j,H,h,b,L,W,I,pe]);const[ke,Ee]=c(!1),Se=o(null),[Te,$e]=c("0px");l(()=>{Se.current&&$e(ke?`${Se.current.scrollHeight}px`:"0px")},[ke,ye,ce]);const Be=()=>{Ee(!ke)};l(()=>{function e(e){Z.current&&!Z.current.contains(e.target)&&ae()}return"open"!==Y&&"opening"!==Y||document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[Y]);const ze=(e,n="Checkout")=>e?t.createElement("span",{style:{fontSize:"13px",width:"100%",textAlign:"center"}},"Redirecting to Checkout..."):P?t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"none"}},t.createElement("span",{className:"yt-cart-summary-checkout-span",style:{fontSize:"16px"}},n),t.createElement("div",{style:{display:"flex",alignItems:"center",marginLeft:"1.5rem"}},t.createElement("img",{src:"https://r2.yourtoken.io/checkout-button-payment-provider-icons.png",alt:"Payment methods",style:{height:"22px",width:"auto"}}),t.createElement(Wo,{className:"yt-cart-summary-checkout-next-icon",fontSize:"24px"}))):t.createElement("div",{style:{alignItems:"center",display:"flex",columnGap:"5px",pointerEvents:"none"}},"Proceed to Checkout"!==n&&t.createElement(co,{fontSize:"20px"}),t.createElement("span",{style:{fontSize:"16px",pointerEvents:"none"}},n));return t.createElement("div",{style:{position:"relative"}},!!k&&k.length>0&&!Vn()&&(()=>{const e=E||"ribbon";if("ribbon"===e)return t.createElement("div",{className:"yt-cart-bottom-bar",style:{fontSize:"10px",textAlign:"center",backgroundColor:$,padding:"3px",boxShadow:"1px 2px 4px 0px #00000061",color:B,marginBottom:"4px",borderTopLeftRadius:"14px",borderTopRightRadius:"14px",cursor:S?"pointer":"default"},onClick:()=>{S&&(window.location.href=S)}},k);const n=({children:n})=>t.createElement("div",{className:"yt-cart-checkout-ribbon-container",style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",padding:"0 55px",marginBottom:"4px",position:"bookmark"===e?"absolute":"static",top:"bookmark"===e?"-11px":void 0,cursor:S?"pointer":"default"},onClick:()=>{S&&(window.location.href=S)}},n);return"tag"===e?t.createElement(n,null,t.createElement("div",{className:"yt-cart-checkout-ribbon-tag-container",style:{display:"flex",alignItems:"center",width:"100%"}},t.createElement("svg",{width:"20",height:"26",viewBox:"0 0 20 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"0 0 auto"}},t.createElement("path",{d:"M0 0H20V20H0L7.41935 10.7639L0 0Z",fill:J}),t.createElement("path",{d:"M12.2581 5.80645L20 0V5.80645H12.2581Z",fill:"black",fillOpacity:"0.36"}),t.createElement("path",{d:"M12 5.80646L20 5.80645V25.8065H12V5.80646Z",fill:$})),t.createElement("div",{className:"yt-cart-checkout-ribbon-tag-center",style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",backgroundColor:$,color:B,padding:"8px 16px",fontSize:"10px",marginTop:"5px",lineHeight:"5px"}},k),t.createElement("svg",{width:"20",height:"26",viewBox:"0 0 20 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flex:"0 0 auto"}},t.createElement("path",{d:"M20 0H0V20H20L12.5806 10.7639L20 0Z",fill:J}),t.createElement("path",{d:"M7.74194 5.80645L0 0V5.80645H7.74194Z",fill:"black",fillOpacity:"0.36"}),t.createElement("path",{d:"M8 5.80646L0 5.80645V25.8065H8V5.80646Z",fill:$})))):t.createElement(n,null,t.createElement("div",{className:"yt-cart-checkout-ribbon-bookmark-container",style:{display:"flex",alignItems:"center",width:"100%"}},t.createElement("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M8.34334 4.75V9.5H0V4.75C0 2.12665 1.86772 0 4.17167 0C6.47562 0 8.34334 2.12665 8.34334 4.75Z",fill:J}),t.createElement("path",{d:"M12.1545 19H13.9056V0H4.17167C6.27666 0 7.98284 1.943 7.98284 4.33981V14.25C7.98284 16.8734 9.85056 19 12.1545 19Z",fill:$})),t.createElement("div",{className:"yt-cart-checkout-ribbon-bookmark-center",style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",backgroundColor:$,color:B,padding:"8px 16px",fontSize:"10px",lineHeight:"3px",marginRight:"-1px",marginLeft:"-1px"}},k),t.createElement("svg",{width:"14",height:"19",viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M5.65666 4.75V9.5H14V4.75C14 2.12665 12.1323 0 9.82833 0C7.52438 0 5.65666 2.12665 5.65666 4.75Z",fill:J}),t.createElement("path",{d:"M1.84549 19H0.0944166V0H9.82833C7.72334 0 6.01716 1.943 6.01716 4.33981V14.25C6.01716 16.8734 4.14944 19 1.84549 19Z",fill:$}))))})(),(!0===s||"true"===s)&&"closed"!==Y&&t.createElement(t.Fragment,null,t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:"open"===Y?1:0,transition:"opacity 0.3s ease-in-out",display:"block",zIndex:2147483643},onClick:ae}),t.createElement("div",{ref:Z,style:{position:"fixed",bottom:0,left:0,right:0,zIndex:2147483644,transform:"open"===Y?"translateY(0)":"translateY(100%)",transition:"transform 0.3s cubic-bezier(0.22, 1, 0.36, 1)"}},t.createElement("div",{style:{backgroundColor:"#F1F1F1",padding:"1rem",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000000",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",fontWeight:"bold",fontSize:"16px"}},t.createElement("span",null,"Price Summary"),t.createElement("button",{onClick:ae,style:{background:"none",border:"none",color:"#000000",fontSize:"16px",fontWeight:"bold",cursor:"pointer",padding:0,marginLeft:"auto",transition:"transform 0.3s ease"}},"✕")),t.createElement("div",{style:{backgroundColor:"white",padding:"10px 1rem 0"}},t.createElement(t.Fragment,null,(T&&xe>0||a&&ye.length>0||ce&&se>0)&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"14px",color:"#212529"}},"Subtotal"),t.createElement("span",{style:{fontSize:"14px",color:"#212529"}},Q,jn(ce?N?me.toFixed(2):me.toFixed(0):N?ue.toFixed(2):ue.toFixed(0)))),(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",paddingBottom:"5px",marginTop:"5px",fontWeight:"600"}},T&&xe>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529"}},t.createElement("span",null,"Discount on MRP"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?xe.toFixed(2):xe.toFixed(0)))),ce&&se>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529"}},t.createElement("span",null,"Free Shipping"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?se.toFixed(2):se.toFixed(0)))),ye.map(e=>t.createElement("div",{key:e.title,style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#1E1E1E"}},t.createElement("span",null,e.title),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?e.amount.toFixed(2):e.amount.toFixed(0))))),be>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"#212529",marginTop:"5px",paddingTop:"5px",borderTop:"1px solid #E5E7EB"}},t.createElement("span",null,"Total Savings"),t.createElement("span",{style:{color:"#D3122A",fontWeight:"bold"}},"-",Q,jn(N?be.toFixed(2):be.toFixed(0))))),(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{style:{height:"12px",display:"flex",background:"#F5F5F5",width:"calc(100% + 2rem)",margin:"10px -1rem 0 -1rem",position:"relative",borderTop:"0.8px solid #C5C5C5",borderBottom:"0.8px solid #C5C5C5"}}))),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:de>0||T&&xe>0||ce&&se>0?"10px":"0"}},t.createElement("div",{style:{display:"flex",flexDirection:"column"}},t.createElement("span",{style:{fontSize:"14px",fontWeight:"600",color:"#212529"}},"Grand Total"),t.createElement("span",{style:{fontSize:"9px",color:"#4A5157"}},"Inclusive of all taxes")),t.createElement("span",{style:{fontSize:"16px",color:"black",fontWeight:"var(--yt-cart-font-weight)"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0)))),t.createElement("div",{style:{display:"flex",background:$,color:B,width:"calc(100% + 2rem)",margin:"10px -1rem 0 -1rem",position:"relative",fontSize:"12px",fontWeight:"600",justifyContent:"center",alignItems:"center",gap:"5px",padding:"4px 0"}},t.createElement("img",{src:"https://r2.yourtoken.io/image%2016.png",alt:"confetti-image",style:{width:"30px",height:"30px"}}),"You saved"," ",t.createElement("span",null,Q,jn(N?be.toFixed(2):be.toFixed(0)))," ","on your order")),t.createElement("button",{ref:re,id:"yt-checkout-button-popout",className:"yt-checkout-button",onClick:ve,disabled:we,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:0,height:"45px",padding:"10px",justifyContent:"center",columnGap:"8px",backgroundColor:e,border:0,textTransform:"uppercase",fontSize:n,letterSpacing:"1px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"0px",boxShadow:"none",width:"100%"}},ze(q)))),(!0===s||"true"===s)&&I&&we&&fe&&t.createElement("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"13px",color:"red"}},fe),!0===s||"true"===s?t.createElement("div",{className:"yt-cart-checkout-section-concise-container",style:{display:"flex",flexDirection:"column",backgroundColor:"rgba(138, 138, 138, 0.08)",paddingTop:"10px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"stretch",justifyContent:"space-between",width:"auto",padding:v?"7px 0 8px 8px":`7px 8px ${D}px 8px`}},t.createElement("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",justifyContent:"center",alignItems:"flex-start",paddingRight:"2rem",overflowWrap:"normal"}},(de>0||T&&xe>0||ce&&se>0)&&t.createElement("div",{className:"yt-cart-checkout-save-badge",ref:oe,style:{fontSize:"9px",backgroundColor:e,width:"max-content",padding:"2px 8px"}},"Saving ",Q,jn(N?be.toFixed(2):be.toFixed(0))),q?t.createElement("div",{style:{fontSize:"12px",color:"#4a4a4a"}},"Redirecting to Checkout..."):a||ce&&le?t.createElement("div",null,t.createElement("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"center"}},t.createElement("span",{style:{fontSize:"15px",color:"#1E1E1E",fontWeight:"600"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))),(de>0||xe>0||ce&&se>0)&&t.createElement("span",{style:{fontSize:"14px",color:"#8C8C8C",textDecoration:"line-through",marginLeft:"4px",fontWeight:"normal"}},Q,jn(ce?me.toFixed(0):ue.toFixed(0))))):t.createElement("div",{style:{fontSize:"18px",color:"#1E1E1E",fontWeight:"600"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))),T&&xe>0||a&&de>0||ce&&se>0?t.createElement("div",{style:{fontSize:"11px",color:"#4A5157",width:"max-content",cursor:"pointer",textDecoration:"underline"},onClick:e=>{e.stopPropagation(),G("opening"),requestAnimationFrame(()=>{G("open")}),K(!X)}},"See Details"):t.createElement("div",{style:{fontSize:"9px",color:"#4A5157",width:"max-content"}},"Inclusive of all taxes")),t.createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},t.createElement("button",{ref:ne,id:"yt-checkout-button",className:"yt-checkout-button",onClick:ve,disabled:we,style:{backgroundColor:e,border:0,textTransform:"uppercase",letterSpacing:"1px",fontSize:"12px",padding:"10px 15px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"rounded"===w?`${C}px`:"0px",width:"100%",margin:"0 auto",boxShadow:"none"}},P?t.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"none"}},t.createElement("span",{style:{fontSize:"12px"}},"CHECKOUT"),t.createElement("div",{style:{display:"flex",alignItems:"center",marginLeft:"1.5rem"}},t.createElement("img",{src:"https://r2.yourtoken.io/checkout-button-payment-provider-icons.png",alt:"Payment methods",style:{height:"22px",width:"auto"}}),t.createElement(Wo,{fontSize:"24px"}))):"CHECKOUT"))),_&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingBlock:"0 6px"}},t.createElement("img",{src:"https://r2.yourtoken.io/badge.png",alt:"Powered by YourToken",style:{height:"48px",width:"auto"}}))):t.createElement(t.Fragment,null,I&&we&&fe&&t.createElement("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"13px",color:"red"}},fe),t.createElement("div",{className:"yt-cart-checkout-summary",style:{display:"flex",flexDirection:"column",rowGap:"5px",backgroundColor:"rgba(138, 138, 138, 0.08)",paddingTop:"10px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"2px",margin:"0 1rem",color:O}},(xe>0||a&&ye.length>0||ce&&se>0)&&be>0&&t.createElement(t.Fragment,null,t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"12px"}},"Subtotal"),t.createElement("span",{style:{fontSize:"14px"}},Q,jn(ce?N?me.toFixed(2):me.toFixed(0):N?ue.toFixed(2):ue.toFixed(0)))),(de>0||xe>0||ce&&se>0)&&t.createElement("div",{style:{display:"flex",flexDirection:"column",paddingBottom:"5px"}},t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"12px",fontWeight:"600",display:"flex",alignItems:"center"}},"Discounts Applied",t.createElement("button",{onClick:Be,className:"yt-cart-details-button",style:{marginBottom:"0",marginLeft:"5px",background:"none",border:"none",color:"#7E7E7E",cursor:"pointer",fontSize:"12px",fontWeight:"600",textDecoration:"underline",padding:"0 !important",minHeight:"10px !important",boxShadow:"none",minWidth:"fit-content",height:"auto",lineHeight:"normal",marginTop:"0"}},ke?"Hide details":"See details")),t.createElement("span",{style:{fontSize:"14px",color:"#D3122A",fontWeight:"600"}},"-",Q,jn(N?be.toFixed(2):be.toFixed(0)))),t.createElement("div",{ref:Se,style:{height:Te,overflow:"hidden",transition:"height 0.3s ease, opacity 0.3s ease",opacity:ke?1:0,marginTop:ke?"5px":"0",borderTop:ke?"1px solid #E5E7EB":"none",paddingTop:ke?"5px":"0",fontWeight:"600"}},T&&xe>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,"Discount on MRP"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?xe.toFixed(2):xe.toFixed(0)))),ce&&se>0&&t.createElement("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,"Free Shipping"),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?se.toFixed(2):se.toFixed(0)))),ye.map(e=>t.createElement("div",{key:e.title,style:{display:"flex",justifyContent:"space-between",fontSize:"12px"}},t.createElement("span",null,e.title),t.createElement("span",{style:{color:"#D3122A"}},"-",Q,jn(N?e.amount.toFixed(2):e.amount.toFixed(0))))))),t.createElement("hr",{className:"yt-cart-checkout-divider",style:{height:"1px",margin:"2px 0",backgroundColor:"#E5E7EB",border:"none",maxWidth:"unset"}})),t.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},t.createElement("span",{style:{fontSize:"14px",fontWeight:"600"}},"Total"),t.createElement("span",{style:{fontSize:"16px",fontWeight:"var(--yt-cart-font-weight)"}},Q,jn(N?pe.toFixed(2):pe.toFixed(0))))),t.createElement("button",{ref:ne,id:"yt-checkout-button",className:"yt-checkout-button",onClick:ve,disabled:we,style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"closed"!==Y||v?"0":`4px 1rem ${D}px 1rem`,height:"45px",paddingTop:"10px",paddingBottom:"10px",justifyContent:"center",columnGap:"8px",backgroundColor:e,border:0,color:u??"white",textTransform:"uppercase",fontSize:n,letterSpacing:"1px",opacity:we?.5:1,cursor:we?"not-allowed":"pointer",borderRadius:"closed"!==Y?"0px":"rounded"===w?`${C}px`:"0px",boxShadow:"none"}},ze(q,P?"Checkout":"Proceed to Checkout")),_&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingBlock:"0px 6px"}},t.createElement("img",{src:"https://r2.yourtoken.io/powered-by-badge-v2.png",alt:"Powered by YourToken",style:{height:"auto",width:"340px"}})))))}const Xo=h.button`
|
|
997
997
|
background-color: ${e=>e.$ctaButtonBackgroundColor||"#BEB8EC"};
|
|
998
998
|
color: ${e=>e.$ctaButtonTextColor||"black"};
|
|
999
999
|
font-size: 11px;
|