@ikas/storefront 6.1.0-beta.388 → 6.1.0-beta.389

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.
Files changed (28) hide show
  1. package/build/components/checkout/components/cart-summary/index.d.ts +0 -7
  2. package/build/components/checkout/components/cart-summary/index.js +1 -1
  3. package/build/components/checkout/components/cart-summary/loyalty/icons.d.ts +4 -0
  4. package/build/components/checkout/components/cart-summary/loyalty/icons.js +1 -0
  5. package/build/components/checkout/components/cart-summary/loyalty/index.d.ts +13 -0
  6. package/build/components/checkout/components/cart-summary/loyalty/index.js +1 -0
  7. package/build/components/checkout/components/cart-summary/loyalty/style.module.scss.js +1 -0
  8. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  9. package/build/components/checkout/components/step-container/index.js +1 -1
  10. package/build/components/checkout/components/svg/star-loyalty.js +1 -1
  11. package/build/components/checkout/components/tkpay/index.js +1 -1
  12. package/build/components/checkout/index.d.ts +1 -0
  13. package/build/components/checkout/index.js +1 -1
  14. package/build/components/checkout/model.d.ts +36 -3
  15. package/build/components/checkout/model.js +1 -1
  16. package/build/components/checkout/steps/step-payment/index.js +1 -1
  17. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  18. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.js +1 -1
  19. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/style.module.scss.js +1 -1
  20. package/build/models/data/theme-json/index.js +1 -1
  21. package/build/pages/checkout.js +1 -1
  22. package/package.json +11 -11
  23. package/build/components/checkout/components/svg/arrow-loyalty.d.ts +0 -6
  24. package/build/components/checkout/components/svg/arrow-loyalty.js +0 -1
  25. package/build/components/checkout/components/svg/arrow-right-loyalty.d.ts +0 -6
  26. package/build/components/checkout/components/svg/arrow-right-loyalty.js +0 -1
  27. package/build/components/checkout/components/svg/left-arrow-loyalty.d.ts +0 -6
  28. package/build/components/checkout/components/svg/left-arrow-loyalty.js +0 -1
@@ -25,11 +25,4 @@ declare type CouponProps = {
25
25
  showOnlyMobile?: boolean;
26
26
  } & CommonProps;
27
27
  export declare const Coupon: React.FC<CouponProps>;
28
- declare type LoyaltyPointsLineProps = {
29
- vm: CheckoutViewModel;
30
- isVisibleLoyaltyPoints: boolean;
31
- setIsVisibleLoyaltyPoints: (value: boolean) => void;
32
- isMobile?: boolean;
33
- } & CommonProps;
34
- export declare const LoyaltyPointsLine: React.FC<LoyaltyPointsLineProps>;
35
28
  export {};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t,__assign as n}from'./../../../../ext/tslib/tslib.es6.js';import*as o from"react";import{observer as i}from"mobx-react-lite";import a from"lodash/sortBy";import l from"../input-with-button/index.js";import s from"../notification-box/index.js";import{CheckoutStep as r}from"../../model.js";import{IkasStorefrontConfig as c}from"@ikas/storefront-config";import{formatCurrency as d}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";import{CartItem as m}from"./cart-item/index.js";import{FormItem as y}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import v from"../tooltip/index.js";import E from"../svg/arrow-down.js";import g from"../svg/cross.js";import f from"../svg/gift.js";import h from"../../styles/common.module.scss.js";import C from"./style.module.scss.js";import L from"../svg/ikas.js";import{Button as P}from"../button/index.js";import{IkasCartCreatedBy as k,IkasCampaignCreatedFor as N,IkasGiftCardType as S}from"@ikas/storefront-models";import I from"../../../../hooks/useDimension.js";import M from"../svg/coupon-code-tag.js";import T from"../svg/gift-cart-tag.js";import x from"../svg/store-credit-tag.js";import j from"../svg/gift-loyalty.js";import b from"../svg/package-loyalty.js";import O from"../svg/percentage-loyalty.js";import A from"../svg/arrow-loyalty.js";import w from"../svg/star-loyalty.js";import{LoyaltyProgramMethodSpendingTypeEnum as D,searchProducts as _,useLoyaltyPoints as R}from"@ikas/storefront-api";import V from"../svg/left-arrow-loyalty.js";import"../../../../models/data/blog/category/index.js";import"../../../../models/data/blog/content/index.js";import"../../../../models/data/blog/meta-data/index.js";import"../../../../models/data/blog/tag/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"mobx";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import{IkasCheckout as F}from"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import{IkasImage as U}from"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import H from"../svg/arrow-right-loyalty.js";var B;!function(e){e.COUPON_CODE_NOT_EXIST="COUPON_CODE_NOT_EXIST",e.COUPON_CODE_NOT_EXIST_FOR_GUESS="COUPON_CODE_NOT_EXIST_FOR_GUESS",e.COUPON_APPLIED_WITHOUT_DISCOUNT="COUPON_APPLIED_WITHOUT_DISCOUNT",e.COUPON_PERIOD_USAGE_LIMIT_EXCEEDED="COUPON_PERIOD_USAGE_LIMIT_EXCEEDED"}(B||(B={}));var G=i((function(e){var t,n,i,a,l,y,p,v,g,f,h,P,N=e.vm,S=e.allowExpand,M=e.isSuccessPageSummary,T=N.checkout,x=u().t,j=o.useState(!S||N.isMiniCartOpenOnLoad),b=j[0],O=j[1],A=o.useState(!1),w=A[0],D=A[1],_=o.useState(null),R=_[0],V=_[1],F=o.useState(0),U=F[0],H=F[1],G=o.useState(null),Y=G[0],$=G[1],Z=o.useState(!1),ee=Z[0],te=Z[1],ne=o.useState(!1),oe=ne[0],ie=ne[1],ae=o.useState(!1),le=ae[0],se=ae[1],re=I().isMobile;o.useEffect((function(){S&&(b?Y&&H(Y.getBoundingClientRect().height):H(0))}),[b,Y,S,ee,oe,w,le]);var ce=o.useMemo((function(){switch(R){case B.COUPON_CODE_NOT_EXIST:return x("checkout-page:giftCodeErrorDescription");case B.COUPON_CODE_NOT_EXIST_FOR_GUESS:return x("checkout-page:mustBeSignInToApplyCampaign");case B.COUPON_APPLIED_WITHOUT_DISCOUNT:return x("checkout-page:couponInvalidForCartItems");case B.COUPON_PERIOD_USAGE_LIMIT_EXCEEDED:return x("checkout-page:couponPeriodUsageLimitExceeded");default:return""}}),[R]),de=[C.CartSummary,S?C.HideOnDesktop:"",M?C.SuccessPageCartSummary:""].join(" "),ue=S?{height:U+"px"}:void 0,me=[C.ArrowDown,b?C.Rotated:""].join(" "),ye=!!(null===(t=N.loyaltySpendingMethods)||void 0===t?void 0:t.length)&&(null===(n=N.loyaltySpendingMethods)||void 0===n?void 0:n.length)>0&&!re&&!!(null===(i=N.customizationProps)||void 0===i?void 0:i.showLoyaltyPoints)&&!N.isOpenEditOrderWithTransaction&&!(N.checkout.createdBy===k.UPSELL||N.checkout.createdBy===k.ADMIN);return T?o.createElement(o.Fragment,null,!!S&&o.createElement(o.Fragment,null,o.createElement("div",{id:"checkout-mobile-summary-header"}),o.createElement("div",{className:C.ExpandHeader,onClick:function(){if(!b){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}O(!b)}},o.createElement("div",{className:C.Left},x("checkout-page:summary")),o.createElement("div",{className:C.Price},o.createElement("span",{className:C.PriceText},"".concat(d(N.finalPrice||0,T.currencyCode,T.currencySymbol)," (").concat(T.itemQuantity," ").concat(x("checkout-page:cartItemProduct"),")")),o.createElement("span",{className:me},o.createElement(E,null))))),o.createElement("div",{className:de},o.createElement("div",{className:[C.DetailsContainer,M?C.SuccessPageDetailContainer:""].join(" "),style:ue},o.createElement("div",{className:C.Details,ref:$},o.createElement("div",{className:C.ItemsContainer},o.createElement("div",null,T.items.map((function(e,t){return o.createElement(m,{key:t,vm:N,cartItem:e,currencyCode:T.currencyCode,onChange:se,isSuccessPageSummary:M})})))),o.createElement("div",{className:C.Divider}),o.createElement("div",{className:C.SubTotalInfo},w&&o.createElement("div",{className:C.NotificationContainer},o.createElement(s,{type:"warning",title:x("checkout-page:giftCodeErrorTitle"),content:ce,onClose:function(){D(!1),V(null)}})),o.createElement(X,{label:x("checkout-page:subtotal"),value:T.formattedTotalPrice,tooltipText:x("checkout-page:subtotalTooltip"),hideMarginBottom:!(N.isCouponCodeVisible||(null===(a=N.checkout.giftCardLines)||void 0===a?void 0:a.length)||(null===(l=N.checkout.loyaltyLines)||void 0===l?void 0:l.length)||(null===(y=N.checkout.nonCouponAdjustments)||void 0===y?void 0:y.length))}),!!(null===(p=T.shippingLines)||void 0===p?void 0:p.length)&&(N.step===r.SUCCESS?o.createElement(X,{label:x("checkout-page:cartShippingTitle"),value:T.shippingTotal?T.formattedShippingTotal:x("checkout-page:free")}):T.shippingLines.map((function(e,t){return o.createElement(X,{key:t,label:e.paymentMethod?e.title:x("checkout-page:cartShippingTitle"),value:e.finalPrice?d(e.finalPrice,T.currencyCode,T.currencySymbol):x("checkout-page:free")})}))),o.createElement(W,{vm:N}),o.createElement(z,{vm:N}),(N.step===r.SUCCESS&&(!!N.checkout.note||!!N.checkout.appliedCouponCode)||N.step!==r.SUCCESS)&&N.isCouponCodeVisible&&o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),ye&&o.createElement(K,{vm:N,isVisibleLoyaltyPoints:N.isLoyaltyPointsVisible,setIsVisibleLoyaltyPoints:N.setIsLoyaltyPointsVisible,isMobile:re}),o.createElement(Q,{vm:N,isVisibleLoyaltyPoints:N.isLoyaltyPointsVisible,setIsVisibleLoyaltyPoints:N.setIsLoyaltyPointsVisible}),o.createElement(q,{vm:N,isAddingCoupon:oe,setAddingCoupon:ie,setCouponError:D,setCouponErrorCode:V}),o.createElement(J,{vm:N,isAddingNote:ee,setAddingNote:te}),!!N.installmentExtraPrice&&N.installmentExtraPrice>0&&o.createElement(o.Fragment,null,o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement(X,{label:x("checkout-page:cartInterest"),value:d(N.installmentExtraPrice,T.currencyCode,T.currencySymbol)}))),N.isOpenEditOrderWithTransaction&&o.createElement("div",{className:C.SubTotalInfo,style:{}},!!(null===(v=N.openEditOrderTransaction)||void 0===v?void 0:v.chargedAmount)&&o.createElement(X,{label:x("checkout-page:chargedAmount"),value:d((null===(g=N.openEditOrderTransaction)||void 0===g?void 0:g.chargedAmount)||0,T.currencyCode,T.currencySymbol)}),!!(null===(f=N.openEditOrderTransaction)||void 0===f?void 0:f.refundedAmount)&&o.createElement(X,{label:x("checkout-page:refundedAmount"),value:d((null===(h=N.openEditOrderTransaction)||void 0===h?void 0:h.refundedAmount)||0,T.currencyCode,T.currencySymbol)})),o.createElement("div",{className:[C.TotalContainer,M?C.SuccessPageTotalContainer:""].join(" ")},o.createElement("div",{className:C.TitleContainer},o.createElement("div",{className:C.Title},N.isOpenEditOrderWithTransaction?x("checkout-page:totalAmountPayable"):x("checkout-page:total"))),o.createElement("div",null,o.createElement("div",{className:C.TotalPricesContainer},o.createElement("div",{className:C.TotalPrice},d(N.finalPrice||0,T.currencyCode,T.currencySymbol)),!!T.$totalTax&&!!(null===(P=N.customizationProps)||void 0===P?void 0:P.showTax)&&o.createElement("div",{className:[C.TotalTax].join(" ")},x("checkout-page:cartTaxTitle")+" "+T.$formattedTotalTax)))),!M&&N.step===r.PAYMENT&&N.isMilesSmilesActive()&&N.milesSmilesAppliedValue>0&&o.createElement("div",{className:C.MilesSmilesPayable},o.createElement(X,{label:x("checkout-page:milesSmilesPaymentLabel"),value:"-"+d(N.milesSmilesAppliedValue,T.currencyCode,T.currencySymbol)}),o.createElement("div",{className:C.TotalContainer},o.createElement("div",{className:C.TitleContainer},o.createElement("div",{className:C.Title},x("checkout-page:milesSmilesAmountToPay"))),o.createElement("div",{className:C.TotalPrice},d(N.milesSmilesAmountToPay,T.currencyCode,T.currencySymbol)))),!!N.loyaltyEarningMethod&&!!N.loyaltyCustomerInfo&&o.createElement("div",{className:C.LoyaltyEarningMethod},o.createElement("div",{className:C.LoyaltyEarningMethodTitle},x("checkout-page:loyaltyEarningMethodTitle",{value:(N.loyaltyEarningMethod.pointsEarned/(N.loyaltyEarningMethod.amountPerPointsEarned||1)*N.finalPrice).toFixed(2)}))),!M&&!N.isPoweredByHidden&&o.createElement("div",{className:C.PoweredBy},o.createElement("span",null,"powered by"),o.createElement("a",{href:"https://ikas.com"+("tr"===c.getCurrentLocale()?"/tr":""),target:"_blank"},o.createElement(L,null))))))):null})),X=i((function(e){var t=e.label,n=e.value,i=e.tooltipText,a=e.hideMarginBottom;return o.createElement("div",{className:[C.InfoRow,a?C.hideMb:""].join(" ")},o.createElement("div",{className:C.Label},o.createElement("span",null,t),!!i&&o.createElement(v,{text:i,style:{marginLeft:"8px"}})),o.createElement("div",{className:C.Value},n))})),W=i((function(e){var t=e.vm,n=u().t;return t.checkout?o.createElement(o.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").filter((function(e){return e.createdFor!==N.LOYALTY_SPEND})).map((function(e,i){return o.createElement("div",{className:C.InfoRow,key:i},o.createElement("div",{className:C.Label},"INTEREST"===e.name?n("checkout-page:cartInterest"):e.name),o.createElement("div",{className:C.Value},o.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",o.createElement("span",null,d(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),z=i((function(e){var t,n=e.vm,i=u().t;return n.checkout?o.createElement(o.Fragment,null,null===(t=n.checkout.giftPackageLines)||void 0===t?void 0:t.map((function(e,t){return o.createElement("div",{className:C.InfoRow,key:t},o.createElement("div",{className:C.Label},o.createElement("div",{className:C.GiftLabel},o.createElement(f,{style:{position:"relative",top:"-1px"}}),o.createElement("span",null,i("checkout-page:giftPackage")))),o.createElement("div",{className:C.Value},o.createElement("span",null,d(e.price,n.checkout.currencyCode,n.checkout.currencySymbol))))}))):null})),q=i((function(n){var i=n.vm,a=n.isAddingCoupon,s=n.setAddingCoupon,c=n.setCouponError,d=n.setCouponErrorCode,m=n.isOpenCouponCode,v=n.isMobile,E=n.showOnlyMobile,g=u().t,f=o.useState(""),L=f[0],N=f[1],S=o.useState(!1),I=S[0],M=S[1],T=o.useRef(null);o.useEffect((function(){a&&T.current&&T.current.focus()}),[a]);var x=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return i.checkout.couponCode=L,M(!0),[4,i.onCouponCodeApply(!0)];case 1:return t.sent(),M(!1),N(""),e=i.checkout.giftCardLines&&!!i.checkout.giftCardLines.length,i.couponError?[3,4]:i.checkout.appliedCouponCode||e?(c(!1),d(null),[4,i.reInitPaymentMethod()]):[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:i.checkout.couponCode=null,c(!0),d(i.couponError),t.label=5;case 5:return[2]}}))}))},j=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return M(!0),[4,i.removeGiftCardLine(n)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),M(!1),[2]}}))}))},b=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return M(!0),[4,i.removeLoyaltyPointsFromCart(n)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),M(!1),[2]}}))}))};i.step,r.SUCCESS;var O=i.step===r.SHIPPING,A=!!i.checkout.appliedCouponCode||!!(i.checkout.giftCardLines&&i.checkout.giftCardLines.length>0)||!!(i.checkout.loyaltyLines&&i.checkout.loyaltyLines.length>0),w=!!i.checkout.appliedCouponCode&&m,D=!a&&i.isCouponCodeVisible&&!i.isCouponCodeRequirementOpen&&i.step!==r.SUCCESS,_=A&&(!m||v),R=!!m&&!(i.checkout.createdBy===k.UPSELL||i.checkout.createdBy===k.ADMIN)&&!i.isOpenEditOrderWithTransaction;return o.createElement(o.Fragment,null,R&&o.createElement(o.Fragment,null,o.createElement("div",{className:[C.CartSummary,C.OpenCouponCodeSummary].join(" ")},o.createElement("div",{className:h.FormSectionTitle},o.createElement("div",{style:{paddingBottom:w?0:6},className:h.Title},g("checkout-page:couponCode"))))),A&&!O&&!i.isCouponCodeRequirementDefult&&o.createElement("div",{className:C.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),o.createElement("div",{className:D?C.InfoRow:""},D&&o.createElement("div",{className:C.ActionTextBtn,onClick:function(){return s(!0)}},g("checkout-page:addCouponCode")),a&&!m&&o.createElement("div",{style:{marginBottom:"10px"}},o.createElement(l,{value:L,placeholder:g("checkout-page:couponCode"),buttonLabel:g("checkout-page:actions.apply"),inputRef:T,onClick:x,isLoading:I,onChange:N})),R&&o.createElement("div",{tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&x()},className:[C.OpenCouponCodeMain,_?C.OpenCouponCodeMainWithMb:""].join(" ")},o.createElement(y,{name:"couponCode",label:g("checkout-page:addCouponCode"),type:p.TEXT,value:L,onChange:N}),o.createElement(P,{style:{width:"33%"},text:g("checkout-page:actions.apply"),isLoading:I,onClick:x}))),_&&o.createElement(o.Fragment,null,!!i.checkout.appliedCouponCode&&o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement(Y,{vm:i,onClearCouponCode:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return i.checkout.couponCode=null,M(!0),[4,i.onCouponCodeApply(!1)];case 1:return e.sent(),[4,i.reInitPaymentMethod()];case 2:return e.sent(),M(!1),[2]}}))}))},couponCode:i.checkout.appliedCouponCode})),!!i.checkout.giftCardLines&&!!i.checkout.giftCardLines.length&&i.checkout.giftCardLines.map((function(e){return o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement(Y,{vm:i,onClearGiftCode:j,couponCode:e.code,giftCardLine:e}))})),!!i.checkout.loyaltyLines&&!!i.checkout.loyaltyLines.length&&i.checkout.loyaltyLines.map((function(e){return o.createElement("div",{className:[C.InfoRow,E?C.InfoRowGiftCardMobile:""].join(" ")},o.createElement($,{vm:i,onClearLoyaltyPoints:b,loyaltyPointsLine:e}))}))))})),Y=i((function(e){var t=e.vm,n=e.onClearCouponCode,i=e.couponCode,a=e.giftCardLine,l=e.onClearGiftCode,s=t.checkout.couponAdjustment,c=u().t,m=!a,y=(null==a?void 0:a.type)===S.STORE_CREDIT;return o.createElement(o.Fragment,null,o.createElement("div",{className:[C.ActionTextBtn,C.NoUnderline].join(" ")},a&&y&&o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px"}},o.createElement("span",{style:{height:"20px"}},o.createElement(x,null)),o.createElement("span",{className:C.StoreCreditTag},c("checkout-page:storeCredit"))),!y&&o.createElement("span",{className:[C.AppliedCoupon,t.isCouponCodeRequirementDefult?"":C.NotClosed].join(" ")},m?o.createElement("span",{style:{height:"16px"}},o.createElement(M,null)):!y&&o.createElement("span",{style:{height:"16px"}},o.createElement(T,null)),o.createElement("span",{className:C.CouponCode},i),t.step!==r.SUCCESS&&!t.isOpenEditOrderWithTransaction&&o.createElement("span",{className:C.ClearCoupon,onClick:function(){return a?l&&l(a.giftCardId):n&&n()}},o.createElement(g,null)))),o.createElement("div",null,a?o.createElement("div",{className:C.Value},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==a?void 0:a.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol))):o.createElement("div",{className:C.Value},o.createElement("span",null,"DECREMENT"===(null==s?void 0:s.type)?"- ":"")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol)))))})),$=i((function(e){var t,n,i=e.vm,a=e.onClearLoyaltyPoints,l=e.loyaltyPointsLine,s=null===(t=i.checkout.nonCouponAdjustments)||void 0===t?void 0:t.find((function(e){return e.campaignId===l.id})),c=u().t,m=null===(n=i.loyaltySpendingMethodsAll)||void 0===n?void 0:n.find((function(e){return e.id===l.loyaltySpendingMethodId})),y=function(){return m?m.type===D.FREE_PRODUCT?{icon:o.createElement(j,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProductAdded")}:m.type===D.FREE_SHIPPING?{icon:o.createElement(b,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping")}:{icon:o.createElement(O,null),title:c("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)})}:{icon:o.createElement(O,null),title:c("checkout-page:loyaltyPoints")}};return o.createElement(o.Fragment,null,o.createElement("div",{className:C.LoyaltyPointsLineContainer},o.createElement("div",{className:[C.ActionTextBtn,C.NoUnderline].join(" ")},o.createElement("span",{className:[C.AppliedCouponLoyalty,i.isCouponCodeRequirementDefult?"":C.NotClosed].join(" ")},o.createElement("div",{style:{width:"16px",height:"16px"},className:C.LoyaltyPointsLineIcon},y().icon),o.createElement("span",{className:C.CouponCode},y().title),i.step!==r.SUCCESS&&!i.isOpenEditOrderWithTransaction&&o.createElement("span",{className:C.ClearCouponLoyalty,onClick:function(){return a&&a(l.loyaltySpendingMethodId)}},o.createElement(g,null)))),o.createElement("span",{className:C.LoyaltyPointSpending},"(",c("checkout-page:loyaltyPointSpending",{point:l.amount}),")")),m?m.type!==D.FREE_PRODUCT&&m.type!==D.FREE_SHIPPING?o.createElement("div",null,o.createElement("div",{className:C.ValueLoyalty},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)))):null:o.createElement("div",null,o.createElement("div",{className:C.ValueLoyalty},o.createElement("span",null,"-")," ",o.createElement("span",null,d((null==s?void 0:s.amount)||0,i.checkout.currencyCode,i.checkout.currencySymbol)))))})),K=i((function(e){var t,n,i,a,l,s,r,c,m,y=e.vm;e.isVisibleLoyaltyPoints;var p=e.setIsVisibleLoyaltyPoints,v=e.isMobile,E=o.useState("undefined"!=typeof window?window.innerWidth:1500),g=E[0],f=E[1];o.useEffect((function(){var e=function(){return f(window.innerWidth)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var h=null===(t=y.loyaltySpendingMethods)||void 0===t?void 0:t.filter((function(e){return e.type===D.FREE_PRODUCT})),L=null!==(n=null==h?void 0:h.map((function(e){var t;return null===(t=e.discountSettings)||void 0===t?void 0:t.point})).filter((function(e){return"number"==typeof e})))&&void 0!==n?n:[],P=L.length?Math.min.apply(Math,L):null,k=L.length?Math.max.apply(Math,L):null,N=1===(null===(i=y.loyaltySpendingMethods)||void 0===i?void 0:i.length),S=function(e){var t,n,i,a,l,s="",r=null;return e.type===D.FIXED_AMOUNT&&e.isDynamic&&(s=N?"".concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount")," (").concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0,amount:d((null===(n=e.discountSettings)||void 0===n?void 0:n.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}),")"):I("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount"),r=o.createElement(O,null)),e.type===D.FREE_SHIPPING&&(s=I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping"),r=o.createElement(b,null)),e.type!==D.FIXED_AMOUNT||e.isDynamic||(s=N?I("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmountOneRow",{value:d((null===(i=e.discountSettings)||void 0===i?void 0:i.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}):I("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(a=e.discountSettings)||void 0===a?void 0:a.discountAmount)||0,y.checkout.currencyCode,y.checkout.currencySymbol)}),r=o.createElement(O,null)),e.type===D.FREE_PRODUCT&&(s=I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"),r=o.createElement(j,null)),e.type===D.RATIO&&(s="".concat(I("checkout-page:loyaltyPointsLinesModalContentItemTitleRatio")," (%").concat((null===(l=e.discountSettings)||void 0===l?void 0:l.discountAmount)||0,")"),r=o.createElement(O,null)),{title:s,icon:r}},I=u().t,M=null!==(l=null===(a=y.loyaltySpendingMethods)||void 0===a?void 0:a.filter((function(e){return e.type!==D.FREE_PRODUCT})))&&void 0!==l?l:[],T=g>1380||v?h&&h.length>0?2:3:g<1100?h&&h.length>0?0:1:h&&h.length>0?1:2,x=M.slice(0,Math.min(T,M.length));return 1===(null===(s=y.loyaltySpendingMethods)||void 0===s?void 0:s.length)?o.createElement("div",{className:C.LoyaltyPointsContainer},o.createElement("div",{className:C.LoyaltyPointsLineOneRow,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineOneRowTitle},S(null===(r=y.loyaltySpendingMethods)||void 0===r?void 0:r[0]).icon&&S(null===(c=y.loyaltySpendingMethods)||void 0===c?void 0:c[0]).icon,o.createElement("span",{className:C.LoyaltyPointsLineOneRowTitleText},S(null===(m=y.loyaltySpendingMethods)||void 0===m?void 0:m[0]).title)),o.createElement(A,null))):o.createElement("div",{className:C.LoyaltyPointsContainer},o.createElement("div",{className:C.LoyaltyPointsTitle},I("checkout-page:loyaltyPointsTitle")),o.createElement("div",{className:C.LoyaltyPointsLines},x.map((function(e){var t;return o.createElement("div",{key:e.id,className:C.LoyaltyPointsLine,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineTitle},S(e).icon&&S(e).icon,o.createElement("span",{className:C.LoyaltyPointsLineTitleText},S(e).title)),o.createElement("span",{className:C.LoyaltyPointsLineValue},(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0," ",I("checkout-page:loyaltyPoint")))})),h&&h.length>0&&o.createElement("div",{className:C.LoyaltyPointsLine,onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineTitle},o.createElement(j,null),o.createElement("span",{className:C.LoyaltyPointsLineTitleText},I("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"))),o.createElement("span",{className:C.LoyaltyPointsLineValue},P&&k?"".concat(P," ~ ").concat(k):""," ",I("checkout-page:loyaltyPoint"))),o.createElement("div",{className:[C.LoyaltyPointsLine,C.LoyaltyPointsLineAllMain].join(" "),onClick:function(){return p(!0)}},o.createElement("div",{className:C.LoyaltyPointsLineAllContainer},o.createElement("span",{className:C.LoyaltyPointsLineAll},I("checkout-page:loyaltyPointsViewAll")),o.createElement(A,null)))))})),Q=i((function(i){var a,l,s,r,m,y,p,v,E,f,h,L,k,N=i.vm,S=i.isVisibleLoyaltyPoints,I=i.setIsVisibleLoyaltyPoints,M=o.useState(!1),T=M[0],x=M[1],A=o.useState(!1),B=A[0],G=A[1],X=o.useState(!1),W=X[0],z=X[1],q=o.useState(!1),Y=q[0],$=q[1],K=o.useState(!1),Q=K[0],J=K[1],Z=o.useState(!1),ee=Z[0],te=Z[1],ne=o.useState(null),oe=ne[0],ie=ne[1],ae=o.useState(0),le=ae[0],se=ae[1];o.useEffect((function(){if(S&&!Q){var e=requestAnimationFrame((function(){requestAnimationFrame((function(){return te(!0)}))}));return function(){return cancelAnimationFrame(e)}}S||te(!1)}),[S,Q]),o.useEffect((function(){if(Q){var e=setTimeout((function(){I(!1),J(!1)}),250);return function(){return clearTimeout(e)}}}),[Q]);var re=o.useCallback((function(){J(!0)}),[]),ce=o.useCallback((function(){G(!0)}),[]),de=o.useCallback((function(){$(!0)}),[]);o.useEffect((function(){if(B){var e=setTimeout((function(){x(!1),G(!1)}),180);return function(){return clearTimeout(e)}}}),[B]),o.useEffect((function(){if(Y){var e=setTimeout((function(){z(!1),ie(null),$(!1)}),180);return function(){return clearTimeout(e)}}}),[Y]),o.useEffect((function(){var e,t;if(oe){var n=(null===(e=oe.discountSettings)||void 0===e?void 0:e.point)||1,o=null===(t=oe.pointUsageLimit)||void 0===t?void 0:t.minPointLimit;se("number"==typeof o&&o>0?o:n)}}),[oe]);var ue=null===(a=N.loyaltySpendingMethods)||void 0===a?void 0:a.filter((function(e){return e.type===D.FREE_PRODUCT})),me=o.useState("undefined"!=typeof window?window.innerHeight:1200),ye=me[0],pe=me[1];o.useEffect((function(){var e=function(){return pe(window.innerHeight)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),o.useEffect((function(){S&&fe((null==ue?void 0:ue.map((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)||""})))||[])}),[S]);var ve=o.useState([]),Ee=ve[0],ge=ve[1],fe=function(n){return e(void 0,void 0,void 0,(function(){var e,o,i;return t(this,(function(t){switch(t.label){case 0:return(null==n?void 0:n.length)?[4,_({input:{productIdList:n,page:1,perPage:n.length,priceListId:c.getPriceListId(),salesChannelId:c.getSalesChannelId()}},[])]:[2,[]];case 1:return e=t.sent(),o=(null===(i=e.data)||void 0===i?void 0:i.data)||[],ge(o.map((function(e){var t,n,o,i,a,l;return{id:e.id,name:e.name,mainImageSrc:new U({id:(null===(a=null===(i=null===(o=null===(n=null===(t=e.variants)||void 0===t?void 0:t[0])||void 0===n?void 0:n.images)||void 0===o?void 0:o.find((function(e){return e.isMain})))||void 0===i?void 0:i.image)||void 0===a?void 0:a.id)||null,isVideo:!1}).thumbnailSrc,variants:(null===(l=e.variants)||void 0===l?void 0:l.map((function(e){var t,n,o,i;return{id:e.id,mainImageSrc:new U({id:(null===(o=null===(n=null===(t=e.images)||void 0===t?void 0:t.find((function(e){return e.isMain})))||void 0===n?void 0:n.image)||void 0===o?void 0:o.id)||null,isVideo:!1}).thumbnailSrc,variantText:(null===(i=e.variantValues)||void 0===i?void 0:i.map((function(e){return e.name})).join(" / "))||null}})))||[]}}))),[2]}}))}))},he=null!==(l=null==ue?void 0:ue.map((function(e){var t;return null===(t=e.discountSettings)||void 0===t?void 0:t.point})).filter((function(e){return"number"==typeof e})))&&void 0!==l?l:[],Ce=he.length?Math.min.apply(Math,he):null,Le=he.length?Math.max.apply(Math,he):null,Pe=function(e){var t,n,i="",a=null;return e.type===D.FIXED_AMOUNT&&e.isDynamic&&(i=Me("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount"),a=o.createElement(O,null)),e.type===D.FREE_SHIPPING&&(i=Me("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping"),a=o.createElement(b,null)),e.type!==D.FIXED_AMOUNT||e.isDynamic||(i=Me("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(t=e.discountSettings)||void 0===t?void 0:t.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}),a=o.createElement(O,null)),e.type===D.FREE_PRODUCT&&(i=Me("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"),a=o.createElement(j,null)),e.type===D.RATIO&&(i="".concat(Me("checkout-page:loyaltyPointsLinesModalContentItemTitleRatio")," (%").concat((null===(n=e.discountSettings)||void 0===n?void 0:n.discountAmount)||0,")"),a=o.createElement(O,null)),{title:i,icon:a}},ke=null===(s=N.loyaltySpendingMethods)||void 0===s?void 0:s.filter((function(e){return e.type!==D.FREE_PRODUCT})),Ne=1===(null==ke?void 0:ke.length),Se=function(e,t){var n,o,i,a,l=null!==(o=null===(n=N.loyaltyCustomerInfo)||void 0===n?void 0:n.totalPoint)&&void 0!==o?o:0;return(null==t?void 0:t.type)===D.FIXED_AMOUNT&&(null==t?void 0:t.isDynamic)?!!((null===(i=t.pointUsageLimit)||void 0===i?void 0:i.minPointLimit)&&(null===(a=t.pointUsageLimit)||void 0===a?void 0:a.minPointLimit)>l):!l||l<e},Ie=function(o,i,a){return e(void 0,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return[4,R({input:n({cartId:N.checkout.id,loyaltyProgramId:o,loyaltySpendingMethodId:i},a?{amount:a}:{})})];case 1:return(e=t.sent()).isSuccess?(re(),l=e.data,N.checkout=new F(n(n({},l),{shippingAddress:N.checkout.shippingAddress,billingAddress:N.checkout.billingAddress,customer:N.checkout.customer,selectedPaymentGateway:N.checkout.selectedPaymentGateway}),N.countrySettings),[4,N.getLoyaltyCustomerInfo()]):[3,4];case 2:return t.sent(),[4,N.listSpendingMethodsByCartId()];case 3:t.sent(),t.label=4;case 4:return[2,e]}}))}))},Me=u().t;if(!S&&!Q)return null;var Te=[C.LoyaltyPointsLinesModalContainer,ee&&!Q&&C.LoyaltyPointsLinesModalContainerVisible,Q&&C.LoyaltyPointsLinesModalContainerClosing].filter(Boolean).join(" ");return o.createElement("div",{className:Te,onClick:re,role:"presentation"},o.createElement("div",{className:C.LoyaltyPointsLinesModal,onClick:function(e){return e.stopPropagation()},role:"dialog","aria-modal":"true"},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(g,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderTitle},Me("checkout-page:loyaltyPointsLinesModalTitle")),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Me("checkout-page:loyaltyPointsLinesModalDescription"))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent,style:W?{maxHeight:"316px",height:"316px"}:{maxHeight:ye<748?ye-140+"px":650}},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Me("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(w,null)),o.createElement("span",null,(null===(r=N.loyaltyCustomerInfo)||void 0===r?void 0:r.totalPoint)||0," ",Me("checkout-page:loyaltyPoint")))),null==ke?void 0:ke.map((function(n,i){var a,l,s,r;return o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItem,0===i?C.LoyaltyPointsLinesModalContentItemsFirst:"",i===((null==ke?void 0:ke.length)||0)-1&&!ue||Ne&&0===i?C.LoyaltyPointsLinesModalContentItemsLast:""].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIcon},Pe(n).icon&&Pe(n).icon),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},Pe(n).title),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},n.type===D.FIXED_AMOUNT&&n.isDynamic?Me("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(a=n.discountSettings)||void 0===a?void 0:a.point)||0,amount:d((null===(l=n.discountSettings)||void 0===l?void 0:l.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}):"".concat((null===(s=n.discountSettings)||void 0===s?void 0:s.point)||0," ").concat(Me("checkout-page:loyaltyPoint"))))),o.createElement("div",null,o.createElement("button",{type:"button",disabled:Se((null===(r=n.discountSettings)||void 0===r?void 0:r.point)||0,n),onClick:function(){return e(void 0,void 0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return e=(null===(o=n.discountSettings)||void 0===o?void 0:o.point)||0,Se(e,n)?[2]:n.type===D.FIXED_AMOUNT&&n.isDynamic?(ie(n),z(!0),[3,3]):[3,1];case 1:return[4,Ie(n.loyaltyProgramId,n.id)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},className:C.LoyaltyPointsLinesModalContentItemButton},Me("checkout-page:loyaltyPointsLineItemButtonApply")))))})),ue&&ue.length>0&&o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItem,C.LoyaltyPointsLinesModalContentItemsLast].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIcon},o.createElement(j,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},Me("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct")),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},Ce&&Le?"".concat(Ce," ~ ").concat(Le):""," ",Me("checkout-page:loyaltyPoint")))),o.createElement("div",null,o.createElement("button",{type:"button",disabled:function(){var e,t,n=null!==(t=null===(e=N.loyaltyCustomerInfo)||void 0===e?void 0:e.totalPoint)&&void 0!==t?t:0;return!n||n<(null!=Ce?Ce:0)}(),className:C.LoyaltyPointsLinesModalContentItemButton,onClick:function(){var e,t,n=null!==(t=null===(e=N.loyaltyCustomerInfo)||void 0===e?void 0:e.totalPoint)&&void 0!==t?t:0;!n||n<(null!=Ce?Ce:0)||x(!0)}},Me("checkout-page:loyaltyPointsLineItemButtonSelectGift")))))),(T||B)&&o.createElement("div",{className:C.LoyaltyPointsGiftModalOverlay},o.createElement("div",{className:[C.LoyaltyPointsGiftModal,B&&C.LoyaltyPointsGiftModalClosing].filter(Boolean).join(" ")},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(g,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",cursor:"pointer"},onClick:ce,className:C.LoyaltyPointsLinesModalHeaderTitle},o.createElement(V,null),Me("checkout-page:loyaltyPointsGiftModalTitle")),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Me("checkout-page:loyaltyPointsGiftModalDescription"))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Me("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(w,null)),o.createElement("span",null,(null===(m=N.loyaltyCustomerInfo)||void 0===m?void 0:m.totalPoint)||0," ",Me("checkout-page:loyaltyPoint")))),null==Ee?void 0:Ee.map((function(n,i){var a,l,s,r,c,d;return o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItems},o.createElement("div",{className:[C.LoyaltyPointsLinesModalContentItemFreeProduct,C.LoyaltyPointsLinesModalContentItem,0===i?C.LoyaltyPointsLinesModalContentItemsFirst:"",i===((null==Ee?void 0:Ee.length)||0)-1?C.LoyaltyPointsLinesModalContentItemsLast:""].join(" ")},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconContainer},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueIconImage},n.mainImageSrc&&o.createElement("img",{src:n.mainImageSrc,alt:n.name})),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMain},o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle},n.name),o.createElement("span",{className:C.LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue},(null===(l=null===(a=n.variants)||void 0===a?void 0:a.find((function(e){var t,o;return e.id===(null===(o=null===(t=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===t?void 0:t.discountSettings)||void 0===o?void 0:o.freeProductVariantId)})))||void 0===l?void 0:l.variantText)||""),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemPoint},(null===(r=null===(s=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===s?void 0:s.discountSettings)||void 0===r?void 0:r.point)||0," ",Me("checkout-page:loyaltyPoint")))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemButtonContainerMobile},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemPointMobile},(null===(d=null===(c=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})))||void 0===c?void 0:c.discountSettings)||void 0===d?void 0:d.point)||0," ",Me("checkout-page:loyaltyPoint")),function(){var i,a=null==ue?void 0:ue.find((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)===n.id})),l=(null===(i=null==a?void 0:a.discountSettings)||void 0===i?void 0:i.point)||0,s=Se(l,a);return o.createElement("button",{type:"button",disabled:s,onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return s||!a?[2]:[4,Ie(a.loyaltyProgramId,a.id)];case 1:return e.sent(),[2]}}))}))},className:C.LoyaltyPointsLinesModalContentItemButton},Me("checkout-page:loyaltyPointsLineItemButtonAddFree"))}())))}))))),(W&&oe||Y)&&o.createElement("div",{className:C.LoyaltyPointsGiftModalOverlay},o.createElement("div",{className:[C.LoyaltyPointsGiftModal,Y&&C.LoyaltyPointsGiftModalClosing].filter(Boolean).join(" ")},o.createElement("span",{onClick:re,className:C.LoyaltyPointsLinesModalCloseButton},o.createElement(g,null)),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeader},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",cursor:"pointer"},onClick:de,className:C.LoyaltyPointsLinesModalHeaderTitle},o.createElement(V,null),Me("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:d((null===(y=null==oe?void 0:oe.discountSettings)||void 0===y?void 0:y.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)})),o.createElement("div",{className:C.LoyaltyPointsLinesModalHeaderDescription},Me("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:(null===(p=null==oe?void 0:oe.discountSettings)||void 0===p?void 0:p.point)||0,amount:d((null===(v=null==oe?void 0:oe.discountSettings)||void 0===v?void 0:v.discountAmount)||0,N.checkout.currencyCode,N.checkout.currencySymbol)}))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContent,style:{maxHeight:"316px",overflow:"hidden"}},o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeader},o.createElement("span",null,Me("checkout-page:loyaltyPointsLinesModalCurrentPoints")," "),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemHeaderValue},o.createElement("div",{style:{width:"18px",height:"18px"}},o.createElement(w,null)),o.createElement("span",null,(null===(E=N.loyaltyCustomerInfo)||void 0===E?void 0:E.totalPoint)||0," ",Me("checkout-page:loyaltyPoint")))),o.createElement("div",{className:C.LoyaltyPointsLinesModalContentItemSlider},o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfo},o.createElement("span",null,le," ",Me("checkout-page:loyaltyPoint")),o.createElement(H,null),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoValue},o.createElement(O,null),o.createElement("span",null,d(le/((null===(f=null==oe?void 0:oe.discountSettings)||void 0===f?void 0:f.point)||1)*((null===(h=null==oe?void 0:oe.discountSettings)||void 0===h?void 0:h.discountAmount)||0),N.checkout.currencyCode,N.checkout.currencySymbol)))),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSlider},function(){var e,t,n,i,a,l,s,r=(null===(e=null==oe?void 0:oe.discountSettings)||void 0===e?void 0:e.point)||1,c=null!==(n=null===(t=null==oe?void 0:oe.pointUsageLimit)||void 0===t?void 0:t.minPointLimit)&&void 0!==n?n:r,d=null!==(s=null!==(a=null===(i=null==oe?void 0:oe.pointUsageLimit)||void 0===i?void 0:i.maxPointLimit)&&void 0!==a?a:null===(l=N.loyaltyCustomerInfo)||void 0===l?void 0:l.totalPoint)&&void 0!==s?s:r,u=Math.max(d-c,0),m=u>0?(le-c)/u*100:0,y=Math.min(100,Math.max(0,m));return o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSlider},o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValue}),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValueText,style:{width:"".concat(y,"%")}}),o.createElement("div",{className:C.LoyaltyPointsLinesModalSliderInfoSliderValueTextValue,style:{left:"".concat(y,"%")}}),o.createElement("input",{type:"range",min:c,max:d,step:r,className:C.LoyaltyPointsLinesModalSliderInput,value:le,onChange:function(e){return se(Number(e.target.value))}}))}())),o.createElement("div",{style:{display:"flex",width:"100%",marginTop:"24px",marginBottom:"24px"}},o.createElement(P,{onClick:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,Ie(oe.loyaltyProgramId,oe.id,le)];case 1:return e.sent(),[2]}}))}))},style:{width:"100%"},text:Me("checkout-page:loyaltyPointsLineItemButtonApplyAmount",{amount:d(le/((null===(L=null==oe?void 0:oe.discountSettings)||void 0===L?void 0:L.point)||1)*((null===(k=null==oe?void 0:oe.discountSettings)||void 0===k?void 0:k.discountAmount)||0),N.checkout.currencyCode,N.checkout.currencySymbol)})})))))))})),J=i((function(e){var t=e.vm,n=e.isAddingNote,i=e.setAddingNote,a=u().t,l=o.useState(t.checkout.note?a("checkout-page:editOrderNote"):a("checkout-page:addOrderNote"))[0],s=o.useCallback((function(){i(!0)}),[]),c=o.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var d=t.step===r.SUCCESS;return d&&!t.checkout.note?null:o.createElement("div",{className:C.InfoRow},!n&&!d&&o.createElement("div",{className:C.ActionTextBtn,onClick:s},l),(n||d)&&o.createElement("div",{className:[C.CheckoutNoteContainer,d?C.Success:""].join(" ")},o.createElement("div",{className:C.Title},a("checkout-page:orderNote")),d?o.createElement("div",{className:C.CheckoutNoteDisplay},t.checkout.note):o.createElement(y,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:c,maxLength:320})))}));export{G as CartSummary,q as Coupon,B as CouponErrorCode,K as LoyaltyPointsLine};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as n from"react";import{observer as o}from"mobx-react-lite";import a from"lodash/sortBy";import l from"../input-with-button/index.js";import c from"../notification-box/index.js";import{CheckoutStep as r}from"../../model.js";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{formatCurrency as s}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";import{CartItem as m}from"./cart-item/index.js";import{FormItem as d}from"../form-item/index.js";import{FormItemType as p}from"../form-item/model.js";import E from"../tooltip/index.js";import C from"../svg/arrow-down.js";import h from"../svg/cross.js";import v from"../svg/gift.js";import y from"../../styles/common.module.scss.js";import g from"./style.module.scss.js";import f from"../svg/ikas.js";import{Button as k}from"../button/index.js";import{IkasCampaignCreatedFor as N,IkasCartCreatedBy as S,IkasGiftCardType as T}from"@ikas/storefront-models";import P from"../../../../hooks/useDimension.js";import O from"../svg/coupon-code-tag.js";import b from"../svg/gift-cart-tag.js";import I from"../svg/store-credit-tag.js";import L from"../svg/gift-loyalty.js";import _ from"../svg/package-loyalty.js";import x from"../svg/percentage-loyalty.js";import{LoyaltyProgramMethodSpendingTypeEnum as A}from"@ikas/storefront-api";import{isLoyaltyBlockVisible as j,LoyaltyPointsBlock as D,LoyaltyEarningRow as R}from"./loyalty/index.js";var U;!function(e){e.COUPON_CODE_NOT_EXIST="COUPON_CODE_NOT_EXIST",e.COUPON_CODE_NOT_EXIST_FOR_GUESS="COUPON_CODE_NOT_EXIST_FOR_GUESS",e.COUPON_APPLIED_WITHOUT_DISCOUNT="COUPON_APPLIED_WITHOUT_DISCOUNT",e.COUPON_PERIOD_USAGE_LIMIT_EXCEEDED="COUPON_PERIOD_USAGE_LIMIT_EXCEEDED"}(U||(U={}));var M=o((function(e){var t,o,a,l,d,p,E,h,v,y=e.vm,k=e.allowExpand,N=e.isSuccessPageSummary,S=y.checkout,T=u().t,O=n.useState(!k||y.isMiniCartOpenOnLoad),b=O[0],I=O[1],L=n.useState(!1),_=L[0],x=L[1],A=n.useState(null),M=A[0],V=A[1],X=n.useState(0),W=X[0],q=X[1],Y=n.useState(null),z=Y[0],$=Y[1],K=n.useState(!1),Q=K[0],J=K[1],Z=n.useState(!1),ee=Z[0],te=Z[1],ne=n.useState(!1),oe=ne[0],ae=ne[1],le=P().isMobile;n.useEffect((function(){k&&(b?z&&q(z.getBoundingClientRect().height):q(0))}),[b,z,k,Q,ee,_,oe]);var ce=n.useMemo((function(){switch(M){case U.COUPON_CODE_NOT_EXIST:return T("checkout-page:giftCodeErrorDescription");case U.COUPON_CODE_NOT_EXIST_FOR_GUESS:return T("checkout-page:mustBeSignInToApplyCampaign");case U.COUPON_APPLIED_WITHOUT_DISCOUNT:return T("checkout-page:couponInvalidForCartItems");case U.COUPON_PERIOD_USAGE_LIMIT_EXCEEDED:return T("checkout-page:couponPeriodUsageLimitExceeded");default:return""}}),[M]),re=[g.CartSummary,k?g.HideOnDesktop:"",N?g.SuccessPageCartSummary:""].join(" "),ie=k?{height:W+"px"}:void 0,se=[g.ArrowDown,b?g.Rotated:""].join(" "),ue=!le&&j(y);return S?n.createElement(n.Fragment,null,!!k&&n.createElement(n.Fragment,null,n.createElement("div",{id:"checkout-mobile-summary-header"}),n.createElement("div",{className:g.ExpandHeader,onClick:function(){if(!b){var e=document.getElementById("Checkout"),t=document.getElementById("checkout-mobile-summary-header");e&&t&&e.scrollTo({top:t.offsetTop,behavior:"smooth"})}I(!b)}},n.createElement("div",{className:g.Left},T("checkout-page:summary")),n.createElement("div",{className:g.Price},n.createElement("span",{className:g.PriceText},"".concat(s(y.finalPrice||0,S.currencyCode,S.currencySymbol)," (").concat(S.itemQuantity," ").concat(T("checkout-page:cartItemProduct"),")")),n.createElement("span",{className:se},n.createElement(C,null))))),n.createElement("div",{className:re},n.createElement("div",{className:[g.DetailsContainer,N?g.SuccessPageDetailContainer:""].join(" "),style:ie},n.createElement("div",{className:g.Details,ref:$},n.createElement("div",{className:g.ItemsContainer},n.createElement("div",null,S.items.map((function(e,t){return n.createElement(m,{key:t,vm:y,cartItem:e,currencyCode:S.currencyCode,onChange:ae,isSuccessPageSummary:N})})))),n.createElement("div",{className:g.Divider}),n.createElement("div",{className:g.SubTotalInfo},_&&n.createElement("div",{className:g.NotificationContainer},n.createElement(c,{type:"warning",title:T("checkout-page:giftCodeErrorTitle"),content:ce,onClose:function(){x(!1),V(null)}})),n.createElement(w,{label:T("checkout-page:subtotal"),value:S.formattedTotalPrice,tooltipText:T("checkout-page:subtotalTooltip"),hideMarginBottom:!(y.isCouponCodeVisible||(null===(t=y.checkout.giftCardLines)||void 0===t?void 0:t.length)||(null===(o=y.checkout.loyaltyLines)||void 0===o?void 0:o.length)||(null===(a=y.checkout.nonCouponAdjustments)||void 0===a?void 0:a.length))}),!!(null===(l=S.shippingLines)||void 0===l?void 0:l.length)&&(y.step===r.SUCCESS?n.createElement(w,{label:T("checkout-page:cartShippingTitle"),value:S.shippingTotal?S.formattedShippingTotal:T("checkout-page:free")}):S.shippingLines.map((function(e,t){return n.createElement(w,{key:t,label:e.paymentMethod?e.title:T("checkout-page:cartShippingTitle"),value:e.finalPrice?s(e.finalPrice,S.currencyCode,S.currencySymbol):T("checkout-page:free")})}))),n.createElement(F,{vm:y}),n.createElement(B,{vm:y}),(y.step===r.SUCCESS&&(!!y.checkout.note||!!y.checkout.appliedCouponCode)||y.step!==r.SUCCESS)&&y.isCouponCodeVisible&&n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),ue&&n.createElement(D,{vm:y}),n.createElement(G,{vm:y,isAddingCoupon:ee,setAddingCoupon:te,setCouponError:x,setCouponErrorCode:V}),n.createElement(H,{vm:y,isAddingNote:Q,setAddingNote:J}),!!y.installmentExtraPrice&&y.installmentExtraPrice>0&&n.createElement(n.Fragment,null,n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),n.createElement(w,{label:T("checkout-page:cartInterest"),value:s(y.installmentExtraPrice,S.currencyCode,S.currencySymbol)}))),y.isOpenEditOrderWithTransaction&&n.createElement("div",{className:g.SubTotalInfo,style:{}},!!(null===(d=y.openEditOrderTransaction)||void 0===d?void 0:d.chargedAmount)&&n.createElement(w,{label:T("checkout-page:chargedAmount"),value:s((null===(p=y.openEditOrderTransaction)||void 0===p?void 0:p.chargedAmount)||0,S.currencyCode,S.currencySymbol)}),!!(null===(E=y.openEditOrderTransaction)||void 0===E?void 0:E.refundedAmount)&&n.createElement(w,{label:T("checkout-page:refundedAmount"),value:s((null===(h=y.openEditOrderTransaction)||void 0===h?void 0:h.refundedAmount)||0,S.currencyCode,S.currencySymbol)})),n.createElement("div",{className:[g.TotalContainer,N?g.SuccessPageTotalContainer:""].join(" ")},n.createElement("div",{className:g.TitleContainer},n.createElement("div",{className:g.Title},y.isOpenEditOrderWithTransaction?T("checkout-page:totalAmountPayable"):T("checkout-page:total"))),n.createElement("div",null,n.createElement("div",{className:g.TotalPricesContainer},n.createElement("div",{className:g.TotalPrice},s(y.finalPrice||0,S.currencyCode,S.currencySymbol)),!!S.$totalTax&&!!(null===(v=y.customizationProps)||void 0===v?void 0:v.showTax)&&n.createElement("div",{className:[g.TotalTax].join(" ")},T("checkout-page:cartTaxTitle")+" "+S.$formattedTotalTax)))),!N&&y.step===r.PAYMENT&&y.isMilesSmilesActive()&&y.milesSmilesAppliedValue>0&&n.createElement("div",{className:g.MilesSmilesPayable},n.createElement(w,{label:T("checkout-page:milesSmilesPaymentLabel"),value:"-"+s(y.milesSmilesAppliedValue,S.currencyCode,S.currencySymbol)}),n.createElement("div",{className:g.TotalContainer},n.createElement("div",{className:g.TitleContainer},n.createElement("div",{className:g.Title},T("checkout-page:milesSmilesAmountToPay"))),n.createElement("div",{className:g.TotalPrice},s(y.milesSmilesAmountToPay,S.currencyCode,S.currencySymbol)))),n.createElement(R,{vm:y}),!N&&!y.isPoweredByHidden&&n.createElement("div",{className:g.PoweredBy},n.createElement("span",null,"powered by"),n.createElement("a",{href:"https://ikas.com"+("tr"===i.getCurrentLocale()?"/tr":""),target:"_blank"},n.createElement(f,null))))))):null})),w=o((function(e){var t=e.label,o=e.value,a=e.tooltipText,l=e.hideMarginBottom;return n.createElement("div",{className:[g.InfoRow,l?g.hideMb:""].join(" ")},n.createElement("div",{className:g.Label},n.createElement("span",null,t),!!a&&n.createElement(E,{text:a,style:{marginLeft:"8px"}})),n.createElement("div",{className:g.Value},o))})),F=o((function(e){var t=e.vm,o=u().t;return t.checkout?n.createElement(n.Fragment,null,a(t.checkout.nonCouponAdjustments||[],"order").filter((function(e){return e.createdFor!==N.LOYALTY_SPEND})).map((function(e,a){return n.createElement("div",{className:g.InfoRow,key:a},n.createElement("div",{className:g.Label},"INTEREST"===e.name?o("checkout-page:cartInterest"):e.name),n.createElement("div",{className:g.Value},n.createElement("span",null,"DECREMENT"===e.type?"- ":"")," ",n.createElement("span",null,s(e.amount,t.checkout.currencyCode,t.checkout.currencySymbol))))}))):null})),B=o((function(e){var t,o=e.vm,a=u().t;return o.checkout?n.createElement(n.Fragment,null,null===(t=o.checkout.giftPackageLines)||void 0===t?void 0:t.map((function(e,t){return n.createElement("div",{className:g.InfoRow,key:t},n.createElement("div",{className:g.Label},n.createElement("div",{className:g.GiftLabel},n.createElement(v,{style:{position:"relative",top:"-1px"}}),n.createElement("span",null,a("checkout-page:giftPackage")))),n.createElement("div",{className:g.Value},n.createElement("span",null,s(e.price,o.checkout.currencyCode,o.checkout.currencySymbol))))}))):null})),G=o((function(o){var a=o.vm,c=o.isAddingCoupon,i=o.setAddingCoupon,s=o.setCouponError,m=o.setCouponErrorCode,E=o.isOpenCouponCode,C=o.isMobile,h=o.showOnlyMobile,v=u().t,f=n.useState(""),N=f[0],T=f[1],P=n.useState(!1),O=P[0],b=P[1],I=n.useRef(null);n.useEffect((function(){c&&I.current&&I.current.focus()}),[c]);var L=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return a.checkout.couponCode=N,b(!0),[4,a.onCouponCodeApply(!0)];case 1:return t.sent(),b(!1),T(""),e=a.checkout.giftCardLines&&!!a.checkout.giftCardLines.length,a.couponError?[3,4]:a.checkout.appliedCouponCode||e?(s(!1),m(null),[4,a.reInitPaymentMethod()]):[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:a.checkout.couponCode=null,s(!0),m(a.couponError),t.label=5;case 5:return[2]}}))}))},_=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return b(!0),[4,a.removeGiftCardLine(n)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),b(!1),[2]}}))}))},x=function(n){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return b(!0),[4,a.removeLoyaltyPointsFromCart(n)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),b(!1),[2]}}))}))},A=a.step===r.SUCCESS,j=a.step===r.SHIPPING,D=A&&!!(a.checkout.loyaltyLines&&a.checkout.loyaltyLines.length>0),R=!!a.checkout.appliedCouponCode||!!(a.checkout.giftCardLines&&a.checkout.giftCardLines.length>0)||D,U=!!a.checkout.appliedCouponCode&&E,M=!c&&a.isCouponCodeVisible&&!a.isCouponCodeRequirementOpen&&a.step!==r.SUCCESS,w=R&&(!E||C),F=!!E&&!(a.checkout.createdBy===S.UPSELL||a.checkout.createdBy===S.ADMIN)&&!a.isOpenEditOrderWithTransaction;return n.createElement(n.Fragment,null,F&&n.createElement(n.Fragment,null,n.createElement("div",{className:[g.CartSummary,g.OpenCouponCodeSummary].join(" ")},n.createElement("div",{className:y.FormSectionTitle},n.createElement("div",{style:{paddingBottom:U?0:6},className:y.Title},v("checkout-page:couponCode"))))),R&&!j&&!a.isCouponCodeRequirementDefult&&n.createElement("div",{className:g.Divider,style:{marginTop:"24px",marginBottom:"24px"}}),n.createElement("div",{className:M?g.InfoRow:""},M&&n.createElement("div",{className:g.ActionTextBtn,onClick:function(){return i(!0)}},v("checkout-page:addCouponCode")),c&&!E&&n.createElement("div",{style:{marginBottom:"10px"}},n.createElement(l,{value:N,placeholder:v("checkout-page:couponCode"),buttonLabel:v("checkout-page:actions.apply"),inputRef:I,onClick:L,isLoading:O,onChange:T})),F&&n.createElement("div",{tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&L()},className:[g.OpenCouponCodeMain,w?g.OpenCouponCodeMainWithMb:""].join(" ")},n.createElement(d,{name:"couponCode",label:v("checkout-page:addCouponCode"),type:p.TEXT,value:N,onChange:T}),n.createElement(k,{style:{width:"33%"},text:v("checkout-page:actions.apply"),isLoading:O,onClick:L}))),w&&n.createElement(n.Fragment,null,!!a.checkout.appliedCouponCode&&n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(V,{vm:a,onClearCouponCode:function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return a.checkout.couponCode=null,b(!0),[4,a.onCouponCodeApply(!1)];case 1:return e.sent(),[4,a.reInitPaymentMethod()];case 2:return e.sent(),b(!1),[2]}}))}))},couponCode:a.checkout.appliedCouponCode})),!!a.checkout.giftCardLines&&!!a.checkout.giftCardLines.length&&a.checkout.giftCardLines.map((function(e){return n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(V,{vm:a,onClearGiftCode:_,couponCode:e.code,giftCardLine:e}))})),D&&a.checkout.loyaltyLines.map((function(e){return n.createElement("div",{className:[g.InfoRow,h?g.InfoRowGiftCardMobile:""].join(" ")},n.createElement(X,{vm:a,onClearLoyaltyPoints:x,loyaltyPointsLine:e}))}))))})),V=o((function(e){var t=e.vm,o=e.onClearCouponCode,a=e.couponCode,l=e.giftCardLine,c=e.onClearGiftCode,i=t.checkout.couponAdjustment,m=u().t,d=!l,p=(null==l?void 0:l.type)===T.STORE_CREDIT;return n.createElement(n.Fragment,null,n.createElement("div",{className:[g.ActionTextBtn,g.NoUnderline].join(" ")},l&&p&&n.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px"}},n.createElement("span",{style:{height:"20px"}},n.createElement(I,null)),n.createElement("span",{className:g.StoreCreditTag},m("checkout-page:storeCredit"))),!p&&n.createElement("span",{className:[g.AppliedCoupon,t.isCouponCodeRequirementDefult?"":g.NotClosed].join(" ")},d?n.createElement("span",{style:{height:"16px"}},n.createElement(O,null)):!p&&n.createElement("span",{style:{height:"16px"}},n.createElement(b,null)),n.createElement("span",{className:g.CouponCode},a),t.step!==r.SUCCESS&&!t.isOpenEditOrderWithTransaction&&n.createElement("span",{className:g.ClearCoupon,onClick:function(){return l?c&&c(l.giftCardId):o&&o()}},n.createElement(h,null)))),n.createElement("div",null,l?n.createElement("div",{className:g.Value},n.createElement("span",null,"-")," ",n.createElement("span",null,s((null==l?void 0:l.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol))):n.createElement("div",{className:g.Value},n.createElement("span",null,"DECREMENT"===(null==i?void 0:i.type)?"- ":"")," ",n.createElement("span",null,s((null==i?void 0:i.amount)||0,t.checkout.currencyCode,t.checkout.currencySymbol)))))})),X=o((function(e){var t,o,a=e.vm,l=e.onClearLoyaltyPoints,c=e.loyaltyPointsLine,i=null===(t=a.checkout.nonCouponAdjustments)||void 0===t?void 0:t.find((function(e){return e.campaignId===c.id})),m=u().t,d=null===(o=a.loyaltySpendingMethodsAll)||void 0===o?void 0:o.find((function(e){return e.id===c.loyaltySpendingMethodId})),p=function(){return d?d.type===A.FREE_PRODUCT?{icon:n.createElement(L,null),title:m("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProductAdded")}:d.type===A.FREE_SHIPPING?{icon:n.createElement(_,null),title:m("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping")}:{icon:n.createElement(x,null),title:m("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:s((null==i?void 0:i.amount)||0,a.checkout.currencyCode,a.checkout.currencySymbol)})}:{icon:n.createElement(x,null),title:m("checkout-page:loyaltyPoints")}};return n.createElement(n.Fragment,null,n.createElement("div",{className:g.LoyaltyPointsLineContainer},n.createElement("div",{className:[g.ActionTextBtn,g.NoUnderline].join(" ")},n.createElement("span",{className:[g.AppliedCouponLoyalty,a.isCouponCodeRequirementDefult?"":g.NotClosed].join(" ")},n.createElement("div",{style:{width:"16px",height:"16px"},className:g.LoyaltyPointsLineIcon},p().icon),n.createElement("span",{className:g.CouponCode},p().title),a.step!==r.SUCCESS&&!a.isOpenEditOrderWithTransaction&&n.createElement("span",{className:g.ClearCouponLoyalty,onClick:function(){return l&&l(c.loyaltySpendingMethodId)}},n.createElement(h,null)))),n.createElement("span",{className:g.LoyaltyPointSpending},"(",m("checkout-page:loyaltyPointSpending",{point:c.amount}),")")),d?d.type!==A.FREE_PRODUCT&&d.type!==A.FREE_SHIPPING?n.createElement("div",null,n.createElement("div",{className:g.ValueLoyalty},n.createElement("span",null,"-")," ",n.createElement("span",null,s((null==i?void 0:i.amount)||0,a.checkout.currencyCode,a.checkout.currencySymbol)))):null:n.createElement("div",null,n.createElement("div",{className:g.ValueLoyalty},n.createElement("span",null,"-")," ",n.createElement("span",null,s((null==i?void 0:i.amount)||0,a.checkout.currencyCode,a.checkout.currencySymbol)))))})),H=o((function(e){var t=e.vm,o=e.isAddingNote,a=e.setAddingNote,l=u().t,c=n.useState(t.checkout.note?l("checkout-page:editOrderNote"):l("checkout-page:addOrderNote"))[0],i=n.useCallback((function(){a(!0)}),[]),s=n.useCallback((function(e){t.checkout.note=e}),[t,t.checkout]);if(!t.checkoutSettings.showCheckoutNote)return null;var m=t.step===r.SUCCESS;return m&&!t.checkout.note?null:n.createElement("div",{className:g.InfoRow},!o&&!m&&n.createElement("div",{className:g.ActionTextBtn,onClick:i},c),(o||m)&&n.createElement("div",{className:[g.CheckoutNoteContainer,m?g.Success:""].join(" ")},n.createElement("div",{className:g.Title},l("checkout-page:orderNote")),m?n.createElement("div",{className:g.CheckoutNoteDisplay},t.checkout.note):n.createElement(d,{style:{width:"100%"},type:p.TEXT_AREA,disableResize:!0,label:"",value:t.checkout.note||"",onChange:s,maxLength:320})))}));export{M as CartSummary,G as Coupon,U as CouponErrorCode};
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ export declare const SVGLoyaltyTag: React.FC;
3
+ export declare const SVGLoyaltyBox: React.FC;
4
+ export declare const SVGLoyaltyGift: React.FC;
@@ -0,0 +1 @@
1
+ import{__assign as e}from'./../../../../../ext/tslib/tslib.es6.js';import*as t from"react";var r={xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},a=function(){return t.createElement("svg",e({},r),t.createElement("path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}),t.createElement("circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}))},n=function(){return t.createElement("svg",e({},r),t.createElement("path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}),t.createElement("path",{d:"m3.3 7 8.7 5 8.7-5"}),t.createElement("path",{d:"M12 22V12"}))},l=function(){return t.createElement("svg",e({},r),t.createElement("rect",{x:"3",y:"8",width:"18",height:"4",rx:"1"}),t.createElement("path",{d:"M12 8v13"}),t.createElement("path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7"}),t.createElement("path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5"}))};export{n as SVGLoyaltyBox,l as SVGLoyaltyGift,a as SVGLoyaltyTag};
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import CheckoutViewModel from "../../../model";
3
+ /** Points are always whole numbers written in tr-TR format ("1.250"). */
4
+ export declare const formatPoint: (value: number) => string;
5
+ export declare const isLoyaltyBlockVisible: (vm: CheckoutViewModel) => boolean;
6
+ export declare const LoyaltyEarningRow: React.FC<{
7
+ vm: CheckoutViewModel;
8
+ }>;
9
+ declare type BlockProps = {
10
+ vm: CheckoutViewModel;
11
+ };
12
+ export declare const LoyaltyPointsBlock: React.FC<BlockProps>;
13
+ export {};
@@ -0,0 +1 @@
1
+ import{__spreadArray as e,__awaiter as t,__generator as n,__assign as o}from'./../../../../../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as a}from"mobx-react-lite";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{LoyaltyProgramMethodSpendingTypeEnum as l,searchProducts as s,useLoyaltyPoints as d}from"@ikas/storefront-api";import{IkasCartCreatedBy as c}from"@ikas/storefront-models";import{CheckoutStep as u}from"../../../model.js";import"../../../../../models/data/blog/category/index.js";import"../../../../../models/data/blog/content/index.js";import"../../../../../models/data/blog/meta-data/index.js";import"../../../../../models/data/blog/tag/index.js";import"../../../../../models/data/blog/index.js";import"../../../../../models/data/brand/index.js";import"mobx";import"../../../../../models/data/campaign-offer/index.js";import"../../../../../models/data/cart/campaign-offer/index.js";import"../../../../../models/data/cart/index.js";import"../../../../../models/data/category/path-item/index.js";import"../../../../../models/data/category/index.js";import{IkasCheckout as m}from"../../../../../models/data/checkout/index.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/index.js";import"../../../../../models/data/customer/address/region/index.js";import"../../../../../models/data/customer/address/index.js";import"../../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../../models/data/customer/attribute/index.js";import"../../../../../models/data/customer/review/summary/index.js";import"../../../../../models/data/customer/review/index.js";import"../../../../../models/data/customer/index.js";import"../../../../../models/data/customer-form-data-input/index.js";import"../../../../../models/data/district/index.js";import"../../../../../models/data/favorite-product/index.js";import"../../../../../models/data/filter-category/index.js";import"../../../../../models/data/html-meta-data/index.js";import{IkasImage as p}from"../../../../../models/data/image/index.js";import"../../../../../models/data/order/address/region/index.js";import"../../../../../models/data/order/address/index.js";import"../../../../../models/data/order/line-item/option/value/index.js";import"../../../../../models/data/order/line-item/variant/value/index.js";import"../../../../../models/data/order/line-item/variant/index.js";import"../../../../../models/data/order/line-item/index.js";import"../../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../../models/data/order/package/index.js";import"../../../../../models/data/order/transaction/index.js";import"../../../../../models/data/order/index.js";import"../../../../../models/data/payment-gateway/index.js";import"../../../../../models/data/product/attribute-value/index.js";import"../../../../../models/data/product/filter/index.js";import"../../../../../models/data/product/campaign-offer/index.js";import"../../../../../models/data/product/option-set/option/index.js";import"../../../../../models/data/product/option-set/index.js";import"../../../../../models/data/product/stock-location/index.js";import"../../../../../models/data/product/variant/price/index.js";import"../../../../../models/data/product/variant/index.js";import"../../../../../models/data/variant-type/index.js";import"../../../../../models/data/product/index.js";import"../../../../../models/data/raffle/index.js";import"../../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../../models/data/state/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../../models/data/storefront-popup/index.js";import"../../../../../models/data/theme-json/index.js";import"../../../../../models/data/theme-json/component/index.js";import"../../../../../models/data/theme-json/custom-data/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../../models/ui/blog-list/index.js";import"../../../../../models/ui/blog-category-list/index.js";import"../../../../../models/ui/brand-list/index.js";import"../../../../../models/ui/category-list/index.js";import"../../../../../models/ui/product-list/index.js";import"../../../../../models/ui/product-attribute-detail/index.js";import"../../../../../models/ui/product-attribute-list/index.js";import"../../../../../models/ui/customer-review-list/index.js";import"../../../../../models/ui/customer-review-summary-list/index.js";import"../../../../../models/ui/validator/index.js";import"../../../../../models/ui/validator/rules/index.js";import"../../../../../models/ui/validator/form/login.js";import"../../../../../models/ui/validator/form/address.js";import"../../../../../models/ui/validator/form/ikas-address.js";import"../../../../../models/ui/validator/form/register.js";import"../../../../../models/ui/validator/form/contact-form.js";import"../../../../../models/ui/validator/form/forgot-password.js";import"../../../../../models/ui/validator/form/recover-password.js";import"../../../../../models/ui/validator/form/account-info.js";import"../../../../../models/ui/validator/form/raffle-form.js";import"../../../../../models/ui/validator/form/customer-review.js";import"../../../../../models/ui/raffle-list/index.js";import{formatCurrency as y}from"../../../../../utils/currency.js";import{useTranslation as v}from"../../../../../utils/i18n.js";import{Button as f}from"../../button/index.js";import g from"../../input-with-button/index.js";import h from"../../svg/cross.js";import{SVGLoyaltyGift as x,SVGLoyaltyBox as k,SVGLoyaltyTag as j}from"./icons.js";import E from"../../svg/star-loyalty.js";import I from"./style.module.scss.js";var S=new Intl.NumberFormat("tr-TR",{maximumFractionDigits:0}),P=function(e){return S.format(Math.floor(e||0))},C=function(e){var t=Math.abs(Math.floor(e)),n=P(t),o="'in";if(0===t)o="'ın";else if(t%1e6==0)o="'un";else if(t%1e3==0)o="'in";else if(t%100==0)o="'ün";else if(t%10==0){o={1:"'un",2:"'nin",3:"'un",4:"'ın",5:"'nin",6:"'ın",7:"'in",8:"'in",9:"'ın"}[t/10%10]}else{o={1:"'in",2:"'nin",3:"'ün",4:"'ün",5:"'in",6:"'nın",7:"'nin",8:"'in",9:"'un"}[t%10]}return n+o},M=function(e){switch(e.type){case l.FREE_PRODUCT:return"GIFT";case l.FREE_SHIPPING:return"SHIPPING";case l.RATIO:return"RATIO";default:return e.isDynamic?"DYNAMIC":"FIXED"}},N=function(e,t){var n,o,i,a,r,l=(null===(n=e.discountSettings)||void 0===n?void 0:n.point)||1,s=null!==(i=null===(o=e.pointUsageLimit)||void 0===o?void 0:o.minPointLimit)&&void 0!==i?i:l,d=Math.min(null!==(r=null===(a=e.pointUsageLimit)||void 0===a?void 0:a.maxPointLimit)&&void 0!==r?r:t,t);return{step:l,min:s,max:Math.max(Math.floor(d/l)*l,0)}},b=function(e){var t=e.kind;return"GIFT"===t?i.createElement(x,null):"SHIPPING"===t?i.createElement(k,null):i.createElement(j,null)},T=function(e){var t,n,o;return!(e.step===u.SUCCESS||!(null===(t=e.customizationProps)||void 0===t?void 0:t.showLoyaltyPoints)||!e.loyaltyCustomerInfo||!(null===(n=e.loyaltySpendingMethods)||void 0===n?void 0:n.length)&&!(null===(o=e.checkout.loyaltyLines)||void 0===o?void 0:o.length)||e.isOpenEditOrderWithTransaction||e.checkout.createdBy===c.UPSELL||e.checkout.createdBy===c.ADMIN)},A=a((function(e){var t,n,o=e.vm,a=v().t,l=o.loyaltyEarningMethod,s=o.loyaltyCustomerInfo;if(!l||!s)return null;var d,c,u,m=l.amountPerPointsEarned||1,p=Math.floor(l.pointsEarned/m*(o.finalPrice||0)),f=s.customerTier,g=r.getCurrentLocale(),h=(f?(null===(n=null===(t=f.translations)||void 0===t?void 0:t.find((function(e){return e.locale===g})))||void 0===n?void 0:n.name)||f.name:null)||a("checkout-page:loyaltyEarnRule",{amount:y(m,o.checkout.currencyCode,o.checkout.currencySymbol),point:P(l.pointsEarned)});return i.createElement("div",{className:I.EarningRow},i.createElement("div",{className:I.EarningRowLeft},i.createElement("span",{className:I.StarIcon},i.createElement(E,null)),i.createElement("span",null,(d=a("checkout-page:loyaltyEarnTitle"),c="".concat(P(p)," ").concat(a("checkout-page:loyaltyPoint")),(u=d.split("{{value}}")).length<2?d:i.createElement(i.Fragment,null,u[0],i.createElement("strong",null,c),u.slice(1).join(c))))),i.createElement("span",{className:I.SecondaryText},h))})),L=a((function(a){var c,g,x,k,j=a.vm,S=v().t,C=i.useState(null),T=C[0],A=C[1],L=i.useState(null),F=L[0],R=L[1],w=i.useState(null),G=w[0],O=w[1],B=i.useState([]),U=B[0],H=B[1],V=j.isLoyaltyPointsVisible,z=Math.floor(null!==(g=null===(c=j.loyaltyCustomerInfo)||void 0===c?void 0:c.totalPoint)&&void 0!==g?g:0),Y=j.checkout.loyaltyLines||[],X=Y.map((function(e){return e.loyaltySpendingMethodId})),_=j.step!==u.SUCCESS&&!j.isOpenEditOrderWithTransaction,W=function(e){return y(e,j.checkout.currencyCode,j.checkout.currencySymbol)},$=function(e){return"".concat(P(e)," ").concat(S("checkout-page:loyaltyPoint"))},q=i.useMemo((function(){var t=(j.loyaltySpendingMethods||[]).filter((function(e){return!X.includes(e.id)})),n=[],o=[];if(t.forEach((function(e){var t,i=M(e);if("GIFT"!==i){var a="DYNAMIC"===i?N(e,z).min:(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0;n.push({key:e.id,kind:i,methods:[e],minCost:a,maxCost:a,isDisabled:z<a,missingPoint:Math.max(a-z,0)})}else o.push(e)})),o.length){var i=o.map((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.point)||0})),a=Math.min.apply(Math,i);n.push({key:"GIFT",kind:"GIFT",methods:o,minCost:a,maxCost:Math.max.apply(Math,i),isDisabled:z<a,missingPoint:Math.max(a-z,0)})}return e(e([],n.filter((function(e){return!e.isDisabled})),!0),n.filter((function(e){return e.isDisabled})),!0)}),[j.loyaltySpendingMethods,X.join(","),z]),J=q.filter((function(e){return!e.isDisabled})),K=1===q.length&&1===J.length?q[0]:null,Q=_&&q.length>0&&(J.length>0||0===Y.length);i.useEffect((function(){!Q&&V&&j.setIsLoyaltyPointsVisible(!1)}),[Q,V]),i.useEffect((function(){T&&!q.some((function(e){return e.key===T}))&&A(null)}),[q,T]);var Z=i.useMemo((function(){return(j.loyaltySpendingMethodsAll||j.loyaltySpendingMethods||[]).filter((function(e){return e.type===l.FREE_PRODUCT}))}),[j.loyaltySpendingMethodsAll,j.loyaltySpendingMethods]),ee=Z.map((function(e){var t;return(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)||""})).filter(Boolean).join(",");i.useEffect((function(){if(ee){var e=!1;return t(void 0,void 0,void 0,(function(){var t,o,i,a,l;return n(this,(function(n){switch(n.label){case 0:return t=ee.split(","),[4,s({input:{productIdList:t,page:1,perPage:t.length,priceListId:r.getPriceListId(),salesChannelId:r.getSalesChannelId()}},[])];case 1:return o=n.sent(),e||(i=(null===(l=o.data)||void 0===l?void 0:l.data)||[],a=[],Z.forEach((function(e){var t,n,o,r,l,s,d,c,u,m,y,v=i.find((function(t){var n;return t.id===(null===(n=e.discountSettings)||void 0===n?void 0:n.freeProductId)}));if(v){var f=(null===(t=v.variants)||void 0===t?void 0:t.find((function(t){var n;return t.id===(null===(n=e.discountSettings)||void 0===n?void 0:n.freeProductVariantId)})))||(null===(n=v.variants)||void 0===n?void 0:n[0]),g=(null===(l=null===(r=null===(o=null==f?void 0:f.images)||void 0===o?void 0:o.find((function(e){return e.isMain})))||void 0===r?void 0:r.image)||void 0===l?void 0:l.id)||(null===(c=null===(d=null===(s=null==f?void 0:f.images)||void 0===s?void 0:s[0])||void 0===d?void 0:d.image)||void 0===c?void 0:c.id)||null,h=null===(u=null==f?void 0:f.prices)||void 0===u?void 0:u[0];a.push({id:e.id,name:v.name,imageSrc:g?new p({id:g,isVideo:!1}).thumbnailSrc:null,price:h&&null!==(y=null!==(m=h.discountPrice)&&void 0!==m?m:h.sellPrice)&&void 0!==y?y:null,method:e})}})),H(a)),[2]}}))})),function(){e=!0}}}),[ee]);var te=function(e,i,a){return t(void 0,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:if(F)return[2,!1];R(i),n.label=1;case 1:return n.trys.push([1,,7,8]),[4,d({input:o({cartId:j.checkout.id,loyaltyProgramId:e.loyaltyProgramId,loyaltySpendingMethodId:e.id},a?{amount:a}:{})})];case 2:return(t=n.sent()).isSuccess&&t.data?(j.checkout=new m(o(o({},t.data),{shippingAddress:j.checkout.shippingAddress,billingAddress:j.checkout.billingAddress,customer:j.checkout.customer,selectedPaymentGateway:j.checkout.selectedPaymentGateway}),j.countrySettings),[4,j.getLoyaltyCustomerInfo()]):[3,6];case 3:return n.sent(),[4,j.listSpendingMethodsByCartId()];case 4:return n.sent(),[4,j.reInitPaymentMethod()];case 5:return n.sent(),A(null),j.setIsLoyaltyPointsVisible(!1),[2,!0];case 6:return[2,!1];case 7:return R(null),[7];case 8:return[2]}}))}))},ne=function(e){var t;return(j.checkout.totalPrice||0)*((null===(t=e.discountSettings)||void 0===t?void 0:t.discountAmount)||0)/100},oe=function(t){var n,o=t.methods[0];if("DYNAMIC"===t.kind)return i.createElement(D,{vm:j,method:o,balance:z,isLoading:F===t.key,onApply:function(e){return te(o,t.key,e)}});if("GIFT"===t.kind){var a=U.filter((function(e){return t.methods.some((function(t){return t.id===e.method.id}))})),r=e(e([],a.filter((function(e){var t;return((null===(t=e.method.discountSettings)||void 0===t?void 0:t.point)||0)<=z})),!0),a.filter((function(e){var t;return((null===(t=e.method.discountSettings)||void 0===t?void 0:t.point)||0)>z})),!0);return i.createElement("div",{className:I.GiftList},r.map((function(e){var t,n=(null===(t=e.method.discountSettings)||void 0===t?void 0:t.point)||0,o=n>z;return i.createElement("div",{key:e.id,className:[I.GiftRow,o?I.GiftRowDisabled:""].join(" ")},i.createElement("div",{className:I.GiftImage},!!e.imageSrc&&i.createElement("img",{src:e.imageSrc,alt:e.name})),i.createElement("div",{className:I.GiftInfo},i.createElement("span",{className:I.GiftName},e.name),i.createElement("span",{className:I.SecondaryText},$(n),null!==e.price&&i.createElement(i.Fragment,null," · ",i.createElement("s",null,W(e.price))),o&&" · ".concat(S("checkout-page:loyaltyMissingPoints",{point:P(n-z)})))),i.createElement(f,{size:"medium",classes:I.SmallButton,isDisabled:o,isLoading:F===e.id,text:S("checkout-page:loyaltyPointsLineItemButtonAddFree"),onClick:function(){return te(e.method,e.id)}}))})))}var l="SHIPPING"===t.kind?S("checkout-page:loyaltyApplyFreeShipping"):S("checkout-page:loyaltyPointsLineItemButtonApplyAmount",{amount:W("RATIO"===t.kind?ne(o):(null===(n=o.discountSettings)||void 0===n?void 0:n.discountAmount)||0)});return i.createElement(f,{size:"medium",style:{width:"100%"},isLoading:F===t.key,text:l,onClick:function(){return te(o,t.key)}})},ie="DYNAMIC"===(null==K?void 0:K.kind)?K.methods[0]:null;return i.createElement("div",{className:I.LoyaltyBlock},i.createElement("div",{className:I.BalanceRow},i.createElement("div",{className:I.BalanceText},i.createElement("span",{className:I.StarIcon},i.createElement(E,null)),i.createElement("span",null,i.createElement("span",{className:I.SecondaryText},Y.length?S("checkout-page:loyaltyRemainingBalance"):S("checkout-page:loyaltyBalance"))," ",i.createElement("strong",null,$(z)),!!ie&&i.createElement("span",{className:I.SecondaryText}," · ",S("checkout-page:loyaltyRateRule",{point:P((null===(x=ie.discountSettings)||void 0===x?void 0:x.point)||0),amount:W((null===(k=ie.discountSettings)||void 0===k?void 0:k.discountAmount)||0)})))),Q&&i.createElement(f,{isLine:!0,size:"medium",classes:I.UseButton,text:S(V?"checkout-page:actions.cancel":"checkout-page:loyaltyUse"),onClick:function(){V&&A(null),j.setIsLoyaltyPointsVisible(!V)}})),V&&Q&&!!K&&i.createElement("div",{className:I.SingleContent},oe(K)),V&&Q&&!K&&i.createElement("div",{className:I.OptionList},q.map((function(e){var t=T===e.key;return i.createElement("div",{key:e.key,className:[I.OptionCard,t?I.OptionCardSelected:"",e.isDisabled?I.OptionCardDisabled:""].join(" ")},i.createElement("div",{className:I.OptionHeader,onClick:function(){return e.isDisabled||t?void 0:A(e.key)}},i.createElement("span",{className:I.Radio}),i.createElement("span",{className:I.IconBox},i.createElement(b,{kind:e.kind})),i.createElement("div",{className:I.TextColumn},i.createElement("span",{className:I.PrimaryText},function(e){var t,n=(null===(t=e.methods[0].discountSettings)||void 0===t?void 0:t.discountAmount)||0;switch(e.kind){case"DYNAMIC":return S("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmount");case"FIXED":return S("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:W(n)});case"SHIPPING":return S("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping");case"RATIO":return"".concat(S("checkout-page:loyaltyPointsLinesModalContentItemTitleRatio")," (%").concat(n,")");case"GIFT":return S("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct")}}(e)),i.createElement("span",{className:I.SecondaryText},e.isDisabled?S("checkout-page:loyaltyMissingPoints",{point:P(e.missingPoint)}):function(e){var t,n,o=e.methods[0],i=(null===(t=o.discountSettings)||void 0===t?void 0:t.discountAmount)||0;switch(e.kind){case"DYNAMIC":return S("checkout-page:loyaltyPointsLinesModalContentItemTitleDynamicAmountDescription",{point:P((null===(n=o.discountSettings)||void 0===n?void 0:n.point)||0),amount:W(i)});case"FIXED":return S("checkout-page:loyaltyCardFixedDescription",{amount:W(i)});case"SHIPPING":return S("checkout-page:loyaltyCardFreeShippingDescription");case"RATIO":return S("checkout-page:loyaltyCardRatioDescription",{ratio:String(i),amount:W(ne(o))});case"GIFT":return S("checkout-page:loyaltyCardFreeProductDescription",{count:String(e.methods.length)})}}(e))),i.createElement("span",{className:[I.Cost,I.SecondaryText].join(" ")},function(e){return"DYNAMIC"===e.kind?S("checkout-page:loyaltyCardDynamicCost",{point:P(e.minCost)}):"GIFT"===e.kind&&e.minCost!==e.maxCost?"".concat(P(e.minCost)," ~ ").concat($(e.maxCost)):$(e.minCost)}(e))),t&&i.createElement("div",{className:I.OptionContent},oe(e)))}))),!!Y.length&&i.createElement("div",{className:I.AppliedList},Y.map((function(e){var o,a,r,l,s,d,c=null===(o=j.loyaltySpendingMethodsAll)||void 0===o?void 0:o.find((function(t){return t.id===e.loyaltySpendingMethodId})),u=null===(a=j.checkout.nonCouponAdjustments)||void 0===a?void 0:a.find((function(t){return t.campaignId===e.id})),m=c?M(c):"FIXED",p=(null==u?void 0:u.amount)||0,y="",v=null;if("GIFT"===m){var f=null===(r=null==c?void 0:c.discountSettings)||void 0===r?void 0:r.freeProductId,g=(null===(l=j.checkout.items.find((function(e){return e.variant.productId===f})))||void 0===l?void 0:l.variant.name)||(null===(s=U.find((function(e){return e.method.id===(null==c?void 0:c.id)})))||void 0===s?void 0:s.name);y=g?S("checkout-page:loyaltyAppliedGiftTitle",{name:g}):S("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeProduct"),v=i.createElement("span",null,S("checkout-page:free"))}else"SHIPPING"===m?(y=S("checkout-page:loyaltyPointsLinesModalContentItemTitleFreeShipping"),v=i.createElement("span",null,S("checkout-page:loyaltyAppliedShippingFree"))):(y="RATIO"===m?S("checkout-page:loyaltyAppliedRatioTitle",{ratio:String((null===(d=null==c?void 0:c.discountSettings)||void 0===d?void 0:d.discountAmount)||0)}):S("checkout-page:loyaltyPointsLinesModalContentItemTitleFixedAmount",{value:W(p)}),v=i.createElement("span",{className:I.DiscountValue},"- ",W(p)));return i.createElement("div",{key:e.id,className:I.AppliedRow},i.createElement("span",{className:I.IconBox},i.createElement(b,{kind:m})),i.createElement("div",{className:I.TextColumn},i.createElement("span",{className:I.PrimaryText},y),i.createElement("span",{className:I.SecondaryText},S("checkout-page:loyaltyAppliedPointsUsed",{point:P(e.amount)}))),i.createElement("div",{className:I.AppliedValue},v,_&&i.createElement("span",{className:[I.RemoveIcon,G===e.loyaltySpendingMethodId?I.RemoveIconLoading:""].join(" "),onClick:function(){return o=e.loyaltySpendingMethodId,t(void 0,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:if(G)return[2];O(o),e.label=1;case 1:return e.trys.push([1,,4,5]),[4,j.removeLoyaltyPointsFromCart(o)];case 2:return e.sent(),[4,j.reInitPaymentMethod()];case 3:return e.sent(),[3,5];case 4:return O(null),[7];case 5:return[2]}}))}));var o}},i.createElement(h,null))))}))))})),D=a((function(e){var o,a=e.vm,r=e.method,l=e.balance,s=e.isLoading,d=e.onApply,c=v().t,u=i.useState(""),m=u[0],p=u[1],f=i.useState(null),h=f[0],x=f[1],k=i.useRef(null);i.useEffect((function(){var e;null===(e=k.current)||void 0===e||e.focus()}),[]);var j,E=N(r,l),S=E.step,M=E.min,b=E.max,T=(null===(o=r.discountSettings)||void 0===o?void 0:o.discountAmount)||0,A=function(e){return y(e,a.checkout.currencyCode,a.checkout.currencySymbol)},L=(j=m.replace(/[.\s]/g,""))&&/^\d+$/.test(j)?parseInt(j,10):null,D=null!==L&&L>0?c("checkout-page:loyaltyDynamicPreview",{point:P(L),amount:A(L/S*T)}):"".concat(c("checkout-page:loyaltyDynamicRule",{min:P(M),max:P(b)})," · ").concat(c("checkout-page:loyaltyRateRule",{point:P(S),amount:A(T)}));return i.createElement("div",{className:I.DynamicInput},i.createElement(g,{value:m,inputRef:k,placeholder:c("checkout-page:loyaltyDynamicPlaceholder"),buttonLabel:c("checkout-page:actions.apply"),isLoading:s,onChange:function(e){p(e),h&&x(null)},onClick:function(){return t(void 0,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return s?[2]:(e=function(e){if(null===e)return c("checkout-page:loyaltyErrorEmpty");if(e<M)return c("checkout-page:loyaltyErrorMin",{min:P(M)});if(e>b)return c("checkout-page:loyaltyErrorMax",{max:P(b)});if(e%S!=0){var t=Math.min(Math.max(Math.floor(e/S)*S,M),b);return c("checkout-page:loyaltyErrorStep",{point:P(S),pointWithSuffix:C(S),example:P(t)})}return null}(L),x(e),e||null===L?[2]:[4,d(L)]);case 1:return t.sent(),[2]}}))}))}}),i.createElement("div",{className:I.HintRow},i.createElement("span",{className:h?I.ErrorText:I.SecondaryText},h||D),b>=M&&i.createElement("span",{className:I.TextLink,onClick:function(){p(P(b)),x(null)}},c("checkout-page:loyaltyUseAll"))))}));export{A as LoyaltyEarningRow,L as LoyaltyPointsBlock,P as formatPoint,T as isLoyaltyBlockVisible};
@@ -0,0 +1 @@
1
+ import e from'./../../../../../ext/style-inject/dist/style-inject.es.js';var n={PrimaryText:"style-module_PrimaryText__HGpu6",SecondaryText:"style-module_SecondaryText__z9dmR",ErrorText:"style-module_ErrorText__r4c62",TextLink:"style-module_TextLink__xwg5z",StarIcon:"style-module_StarIcon__12tKJ",IconBox:"style-module_IconBox__lFMov",TextColumn:"style-module_TextColumn__vtGBb",EarningRow:"style-module_EarningRow__0QTAQ",EarningRowLeft:"style-module_EarningRowLeft__3OlOo",LoyaltyBlock:"style-module_LoyaltyBlock__MWvGo",BalanceRow:"style-module_BalanceRow__yVaQc",BalanceText:"style-module_BalanceText__SD-u6",UseButton:"style-module_UseButton__hL-Rh",SmallButton:"style-module_SmallButton__Styu6",SingleContent:"style-module_SingleContent__zlrTo",OptionList:"style-module_OptionList__repyQ",Radio:"style-module_Radio__XVGRg",OptionCard:"style-module_OptionCard__BGQPj",OptionHeader:"style-module_OptionHeader__JtkLp",Cost:"style-module_Cost__NLCD-",OptionContent:"style-module_OptionContent__KUmfq",OptionCardSelected:"style-module_OptionCardSelected__-TSjd",OptionCardDisabled:"style-module_OptionCardDisabled__vHjmn",DynamicInput:"style-module_DynamicInput__jh-g0",HintRow:"style-module_HintRow__6UPJ-",GiftList:"style-module_GiftList__xs6uv",GiftRow:"style-module_GiftRow__addVG",GiftRowDisabled:"style-module_GiftRowDisabled__7Ossr",GiftImage:"style-module_GiftImage__L8Qdn",GiftInfo:"style-module_GiftInfo__VAtS7",GiftName:"style-module_GiftName__hjiMJ",AppliedList:"style-module_AppliedList__yHMSJ",AppliedRow:"style-module_AppliedRow__6ePX6",AppliedValue:"style-module_AppliedValue__zM0fW",DiscountValue:"style-module_DiscountValue__PBnlU",RemoveIcon:"style-module_RemoveIcon__HQ26R",RemoveIconLoading:"style-module_RemoveIconLoading__iGIrr"};e(".style-module_PrimaryText__HGpu6 {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_SecondaryText__z9dmR {\n font-size: 13px;\n line-height: 18px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ErrorText__r4c62 {\n font-size: 16px;\n line-height: 20px;\n color: var(--checkout-error-color);\n}\n\n.style-module_TextLink__xwg5z {\n flex: 0 0 auto;\n font-size: 16px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n cursor: pointer;\n user-select: none;\n}\n.style-module_TextLink__xwg5z:hover {\n text-decoration: underline;\n}\n\n.style-module_StarIcon__12tKJ {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n color: var(--checkout-loyalty-icon-color);\n}\n\n.style-module_IconBox__lFMov {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n border: 1px solid var(--checkout-border-color);\n border-radius: 6px;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_TextColumn__vtGBb {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.style-module_EarningRow__0QTAQ {\n margin-top: 16px;\n padding: 10px 16px;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.style-module_EarningRow__0QTAQ .style-module_EarningRowLeft__3OlOo {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 16px;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_EarningRow__0QTAQ .style-module_EarningRowLeft__3OlOo strong {\n font-weight: 600;\n}\n.style-module_EarningRow__0QTAQ .style-module_SecondaryText__z9dmR {\n flex: 0 0 auto;\n text-align: right;\n}\n\n.style-module_LoyaltyBlock__MWvGo {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-bottom: 18px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyBlock__MWvGo {\n margin-bottom: 0;\n margin-top: 16px;\n }\n}\n\n.style-module_BalanceRow__yVaQc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.style-module_BalanceRow__yVaQc .style-module_BalanceText__SD-u6 {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 16px;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_BalanceRow__yVaQc .style-module_BalanceText__SD-u6 strong {\n font-weight: 600;\n}\n.style-module_BalanceRow__yVaQc .style-module_BalanceText__SD-u6 .style-module_SecondaryText__z9dmR {\n font-size: 16px;\n line-height: 24px;\n}\n\n.style-module_UseButton__hL-Rh {\n flex: 0 0 auto;\n height: 36px !important;\n padding: 0 16px !important;\n font-size: 14px;\n}\n\n.style-module_SmallButton__Styu6 {\n flex: 0 0 auto;\n height: 40px !important;\n padding: 0 16px !important;\n font-size: 14px;\n}\n\n.style-module_SingleContent__zlrTo {\n display: flex;\n flex-direction: column;\n}\n\n.style-module_OptionList__repyQ {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.style-module_Radio__XVGRg {\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n border: 1px solid var(--checkout-border-color);\n background-color: var(--checkout-primary-bg-color);\n box-sizing: border-box;\n transition: border-color 0.2s;\n}\n\n.style-module_OptionCard__BGQPj {\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n background-color: var(--checkout-primary-bg-color);\n transition: border-color 0.2s;\n}\n.style-module_OptionCard__BGQPj .style-module_OptionHeader__JtkLp {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 14px;\n cursor: pointer;\n user-select: none;\n}\n.style-module_OptionCard__BGQPj .style-module_Cost__NLCD- {\n flex: 0 0 auto;\n text-align: right;\n}\n.style-module_OptionCard__BGQPj .style-module_OptionContent__KUmfq {\n padding: 0 14px 16px;\n}\n.style-module_OptionCard__BGQPj:hover:not(.style-module_OptionCardSelected__-TSjd):not(.style-module_OptionCardDisabled__vHjmn) {\n border-color: var(--checkout-secondary-text-color);\n}\n.style-module_OptionCard__BGQPj:hover:not(.style-module_OptionCardSelected__-TSjd):not(.style-module_OptionCardDisabled__vHjmn) .style-module_Radio__XVGRg {\n border-color: var(--checkout-secondary-text-color);\n}\n.style-module_OptionCard__BGQPj.style-module_OptionCardSelected__-TSjd {\n border-color: var(--checkout-primary-text-color);\n box-shadow: 0 0 0 1px var(--checkout-primary-text-color);\n}\n.style-module_OptionCard__BGQPj.style-module_OptionCardSelected__-TSjd .style-module_OptionHeader__JtkLp {\n cursor: default;\n}\n.style-module_OptionCard__BGQPj.style-module_OptionCardSelected__-TSjd .style-module_Radio__XVGRg {\n border: 5px solid var(--checkout-primary-text-color);\n}\n.style-module_OptionCard__BGQPj.style-module_OptionCardDisabled__vHjmn {\n background-color: transparent;\n}\n.style-module_OptionCard__BGQPj.style-module_OptionCardDisabled__vHjmn .style-module_OptionHeader__JtkLp {\n cursor: default;\n opacity: 0.5;\n}\n\n.style-module_DynamicInput__jh-g0 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.style-module_HintRow__6UPJ- {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 12px;\n}\n.style-module_HintRow__6UPJ- .style-module_SecondaryText__z9dmR {\n font-size: 16px;\n line-height: 20px;\n}\n\n.style-module_GiftList__xs6uv {\n display: flex;\n flex-direction: column;\n padding: 8px 0 4px;\n}\n\n.style-module_GiftRow__addVG {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 0;\n}\n.style-module_GiftRow__addVG + .style-module_GiftRow__addVG {\n border-top: 1px solid var(--checkout-border-color);\n}\n.style-module_GiftRow__addVG:first-child {\n padding-top: 0;\n}\n.style-module_GiftRow__addVG:last-child {\n padding-bottom: 0;\n}\n.style-module_GiftRow__addVG.style-module_GiftRowDisabled__7Ossr .style-module_GiftImage__L8Qdn,\n.style-module_GiftRow__addVG.style-module_GiftRowDisabled__7Ossr .style-module_GiftInfo__VAtS7 {\n opacity: 0.5;\n}\n\n.style-module_GiftImage__L8Qdn {\n flex: 0 0 auto;\n width: 44px;\n height: 44px;\n border-radius: 8px;\n overflow: hidden;\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_GiftImage__L8Qdn img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.style-module_GiftInfo__VAtS7 {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n.style-module_GiftInfo__VAtS7 .style-module_GiftName__hjiMJ {\n font-size: 16px;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_AppliedList__yHMSJ {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.style-module_AppliedRow__6ePX6 {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n background-color: var(--checkout-primary-bg-color);\n}\n.style-module_AppliedRow__6ePX6 .style-module_AppliedValue__zM0fW {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_AppliedRow__6ePX6 .style-module_DiscountValue__PBnlU {\n color: var(--checkout-error-color);\n}\n\n.style-module_RemoveIcon__HQ26R {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_RemoveIcon__HQ26R svg {\n width: 20px;\n height: 20px;\n transform: scale(0.8);\n}\n.style-module_RemoveIcon__HQ26R.style-module_RemoveIconLoading__iGIrr {\n pointer-events: none;\n opacity: 0.5;\n}");export{n as default};
@@ -1 +1 @@
1
- import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={ExpandHeader:"style-module_ExpandHeader__LQwWm",Left:"style-module_Left__-N12h",Price:"style-module_Price__OT1Wh",PriceText:"style-module_PriceText__bq1pk",ArrowDown:"style-module_ArrowDown__YhRny",Rotated:"style-module_Rotated__ZPfId",CartSummary:"style-module_CartSummary__m77tn",OpenCouponCodeSummary:"style-module_OpenCouponCodeSummary__ua9wx",HideOnDesktop:"style-module_HideOnDesktop__Vs5AV",ItemsContainer:"style-module_ItemsContainer__QFKQV",DetailsContainer:"style-module_DetailsContainer__PK33m",SuccessPageDetailContainer:"style-module_SuccessPageDetailContainer__-p8kJ",Details:"style-module_Details__hWJ9o",Divider:"style-module_Divider__MNDti",ActionTextBtn:"style-module_ActionTextBtn__7yua4",NoUnderline:"style-module_NoUnderline__FphKn",Light:"style-module_Light__dIcW-",SubTotalInfo:"style-module_SubTotalInfo__JMqK9",InfoRow:"style-module_InfoRow__oAvZS",hideMb:"style-module_hideMb__j7VBr",LoyaltyPoints:"style-module_LoyaltyPoints__3gd4k",Label:"style-module_Label__28Bij",Value:"style-module_Value__7rELF",TotalContainer:"style-module_TotalContainer__sGR7d",TitleContainer:"style-module_TitleContainer__LgmJI",Title:"style-module_Title__oMVSD",TotalPricesContainer:"style-module_TotalPricesContainer__-PsOD",TotalPrice:"style-module_TotalPrice__QBdM1",TotalTax:"style-module_TotalTax__9pA4Y",MilesSmilesPayable:"style-module_MilesSmilesPayable__fzibn",SuccessPageTotalContainer:"style-module_SuccessPageTotalContainer__NZGFF",AppliedCoupon:"style-module_AppliedCoupon__UNo1h",AppliedCouponBgGray:"style-module_AppliedCouponBgGray__MYoYu",NotClosed:"style-module_NotClosed__E-N9z",CouponCode:"style-module_CouponCode__UKPmf",ClearCoupon:"style-module_ClearCoupon__CBAzl",NotificationContainer:"style-module_NotificationContainer__AXfJT",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__d-z4m",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__DtnXo",Success:"style-module_Success__VI2Bw",GiftLabel:"style-module_GiftLabel__cazrS",PoweredBy:"style-module_PoweredBy__DKBJF",SuccessPageCartSummary:"style-module_SuccessPageCartSummary__pjgea",OpenCouponCodeMain:"style-module_OpenCouponCodeMain__lZtb3",OpenCouponCodeMainWithMb:"style-module_OpenCouponCodeMainWithMb__DqVmh",InfoRowGiftCardMobile:"style-module_InfoRowGiftCardMobile__Kp-zh",StoreCreditTag:"style-module_StoreCreditTag__D1TtS",LoyaltyPointsContainer:"style-module_LoyaltyPointsContainer__NDR6k",LoyaltyPointsTitle:"style-module_LoyaltyPointsTitle__4rwqg",LoyaltyPointsLines:"style-module_LoyaltyPointsLines__rAHEY",LoyaltyPointsLine:"style-module_LoyaltyPointsLine__WPMxS",LoyaltyPointsLineTitle:"style-module_LoyaltyPointsLineTitle__ikVAx",LoyaltyPointsLineTitleText:"style-module_LoyaltyPointsLineTitleText__bngZY",LoyaltyPointsLineValue:"style-module_LoyaltyPointsLineValue__EDVfX",LoyaltyPointsLineAll:"style-module_LoyaltyPointsLineAll__RHBd4",LoyaltyPointsLineAllContainer:"style-module_LoyaltyPointsLineAllContainer__IX7I0",LoyaltyPointsLinesModalContainer:"style-module_LoyaltyPointsLinesModalContainer__cjW0h",LoyaltyPointsLinesModalContainerVisible:"style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV",LoyaltyPointsLinesModalContainerClosing:"style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx",LoyaltyPointsLinesModal:"style-module_LoyaltyPointsLinesModal__h1aD-",LoyaltyPointsLinesModalHeader:"style-module_LoyaltyPointsLinesModalHeader__-Zcj7",LoyaltyPointsLinesModalCloseButton:"style-module_LoyaltyPointsLinesModalCloseButton__nb3-5",LoyaltyPointsLinesModalHeaderTitle:"style-module_LoyaltyPointsLinesModalHeaderTitle__xcD59",LoyaltyPointsLinesModalHeaderDescription:"style-module_LoyaltyPointsLinesModalHeaderDescription__9N8ot",LoyaltyPointsLinesModalContent:"style-module_LoyaltyPointsLinesModalContent__hjwxz",LoyaltyPointsLinesModalContentItemHeader:"style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i",LoyaltyPointsLinesModalContentItemHeaderValue:"style-module_LoyaltyPointsLinesModalContentItemHeaderValue__T9r6z",LoyaltyPointsLinesModalContentItem:"style-module_LoyaltyPointsLinesModalContentItem__r1qmE",LoyaltyPointsLinesModalContentItemFreeProduct:"style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx",LoyaltyPointsLinesModalContentItemsFirst:"style-module_LoyaltyPointsLinesModalContentItemsFirst__Sj8rF",LoyaltyPointsLinesModalContentItemsLast:"style-module_LoyaltyPointsLinesModalContentItemsLast__gc8cc",LoyaltyPointsLinesModalContentItemHeaderValueIcon:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIcon__c4CR6",LoyaltyPointsLinesModalContentItemHeaderValueIconContainer:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconContainer__26F-5",LoyaltyPointsLinesModalContentItemHeaderValueTextMain:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A",LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle__TQC3n",LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue__TSz0-",LoyaltyPointsLinesModalContentItemButton:"style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7",LoyaltyPointsGiftModalOverlay:"style-module_LoyaltyPointsGiftModalOverlay__xeQyA",LoyaltyPointsGiftModal:"style-module_LoyaltyPointsGiftModal__C7rhN",LoyaltyGiftSlideIn:"style-module_LoyaltyGiftSlideIn__sZfMa",LoyaltyPointsGiftModalClosing:"style-module_LoyaltyPointsGiftModalClosing__cEwwl",LoyaltyGiftSlideOut:"style-module_LoyaltyGiftSlideOut__uTEqW",LoyaltyPointsGiftModalHeader:"style-module_LoyaltyPointsGiftModalHeader__54vAK",LoyaltyPointsGiftModalTitle:"style-module_LoyaltyPointsGiftModalTitle__qnzx3",LoyaltyPointsGiftModalDescription:"style-module_LoyaltyPointsGiftModalDescription__80l9h",LoyaltyPointsGiftModalClose:"style-module_LoyaltyPointsGiftModalClose__bsSO2",LoyaltyPointsGiftModalBody:"style-module_LoyaltyPointsGiftModalBody__aLoj3",LoyaltyPointsLinesModalContentItemHeaderValueIconImage:"style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0",LoyaltyPointsLinesModalContentItemPoint:"style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23",LoyaltyPointsLinesModalContentItemPointMobile:"style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP",LoyaltyPointsLinesModalContentItemSlider:"style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU",LoyaltyPointsLinesModalSliderInfo:"style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X",LoyaltyPointsLinesModalSliderInfoSlider:"style-module_LoyaltyPointsLinesModalSliderInfoSlider__tnBdu",LoyaltyPointsLinesModalSliderInfoSliderValue:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValue__oG1fM",LoyaltyPointsLinesModalSliderInfoSliderValueText:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValueText__fnKQh",LoyaltyPointsLinesModalSliderInfoSliderValueTextValue:"style-module_LoyaltyPointsLinesModalSliderInfoSliderValueTextValue__lGm4z",LoyaltyPointsLinesModalSliderInput:"style-module_LoyaltyPointsLinesModalSliderInput__sgZrN",LoyaltyPointsLinesModalSliderInfoValue:"style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6",LoyaltyEarningMethod:"style-module_LoyaltyEarningMethod__UNcvo",LoyaltyEarningMethodTitle:"style-module_LoyaltyEarningMethodTitle__d5p2X",LoyaltyPointsLineOneRow:"style-module_LoyaltyPointsLineOneRow__YdQkF",LoyaltyPointsLineOneRowTitle:"style-module_LoyaltyPointsLineOneRowTitle__V04li",LoyaltyPointsLineOneRowTitleText:"style-module_LoyaltyPointsLineOneRowTitleText__y3UOy",AppliedCouponLoyalty:"style-module_AppliedCouponLoyalty__p2Mi0",LoyaltyPointsLineIcon:"style-module_LoyaltyPointsLineIcon__ECQ1W",ClearCouponLoyalty:"style-module_ClearCouponLoyalty__vRYH4",ValueLoyalty:"style-module_ValueLoyalty__jdjW9",LoyaltyPointSpending:"style-module_LoyaltyPointSpending__qam9Z",LoyaltyPointsLineContainer:"style-module_LoyaltyPointsLineContainer__85Cvs",LoyaltyPointsLinesModalContentItemButtonContainerMobile:"style-module_LoyaltyPointsLinesModalContentItemButtonContainerMobile__iNiif"};e(".style-module_ExpandHeader__LQwWm {\n position: sticky;\n top: 0;\n z-index: 10;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-top: 1px solid var(--checkout-border-color);\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n@media only screen and (min-width: 1000px) {\n .style-module_ExpandHeader__LQwWm {\n display: none;\n }\n}\n.style-module_ExpandHeader__LQwWm .style-module_Left__-N12h {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_PriceText__bq1pk {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny.style-module_Rotated__ZPfId {\n transform: rotate(-180deg);\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n .style-module_CartSummary__m77tn.style-module_OpenCouponCodeSummary__ua9wx {\n background-color: transparent;\n }\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CartSummary__m77tn.style-module_HideOnDesktop__Vs5AV {\n display: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: 50vh;\n overflow-y: auto;\n margin-bottom: 24px;\n /* Track */\n /* Handle */\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: unset;\n overflow-y: unset;\n margin-bottom: 0;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar {\n width: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-track {\n box-shadow: inset 0 0 20px 20px #e3e7ef;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 20px 20px #000000;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ {\n padding: 0;\n box-shadow: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ .style-module_Details__hWJ9o {\n padding-top: 0;\n}\n.style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_Divider__MNDti {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_LoyaltyPoints__3gd4k {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d {\n display: flex;\n justify-content: space-between;\n margin-top: 12px;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TitleContainer__LgmJI .style-module_Title__oMVSD {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPricesContainer__-PsOD {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPrice__QBdM1 {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalTax__9pA4Y {\n font-size: 14px;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF {\n height: unset;\n margin-top: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_Title__oMVSD {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_TotalPrice__QBdM1 {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 2px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_AppliedCouponBgGray__MYoYu {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n margin-left: 6px;\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__m77tn .style-module_NotificationContainer__AXfJT {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_Title__oMVSD {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_CheckoutNoteDisplay__DtnXo {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m.style-module_Success__VI2Bw {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS span {\n margin-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n margin-top: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n display: flex;\n }\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF a {\n display: flex;\n align-items: center;\n}\n\n.style-module_SuccessPageCartSummary__pjgea {\n background-color: #fff;\n}\n\n.style-module_OpenCouponCodeMain__lZtb3 {\n display: flex;\n}\n.style-module_OpenCouponCodeMain__lZtb3 input {\n width: calc(100% - 12px) !important;\n}\n.style-module_OpenCouponCodeMain__lZtb3.style-module_OpenCouponCodeMainWithMb__DqVmh {\n margin-bottom: 12px;\n}\n\n.style-module_InfoRowGiftCardMobile__Kp-zh {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh:last-of-type {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 .style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_AppliedCoupon__UNo1h {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n\n.style-module_StoreCreditTag__D1TtS {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsContainer__NDR6k {\n margin-bottom: 24px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsContainer__NDR6k {\n margin-bottom: 0;\n margin-top: 16px;\n }\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsTitle__4rwqg {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 8px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY {\n overflow: auto;\n }\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLine__WPMxS {\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n padding: 10px 12px;\n background-color: #fff;\n display: flex;\n flex-direction: column;\n justify-content: center;\n cursor: pointer;\n white-space: nowrap;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineTitle__ikVAx {\n display: flex;\n gap: 6px;\n align-items: center;\n margin-bottom: 2px;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineTitle__ikVAx .style-module_LoyaltyPointsLineTitleText__bngZY {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n letter-spacing: 0;\n white-space: nowrap;\n width: 100px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineValue__EDVfX {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n letter-spacing: 0;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAll__RHBd4 {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAllContainer__IX7I0 {\n display: flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n align-self: center;\n}\n.style-module_LoyaltyPointsContainer__NDR6k .style-module_LoyaltyPointsLines__rAHEY .style-module_LoyaltyPointsLineAllContainer__IX7I0 svg path {\n stroke: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background-color: rgba(39, 39, 39, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n opacity: 0;\n transition: opacity 0.25s ease-out;\n pointer-events: none;\n}\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h.style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV {\n opacity: 1;\n pointer-events: auto;\n}\n.style-module_LoyaltyPointsLinesModalContainer__cjW0h.style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx {\n opacity: 0;\n pointer-events: none;\n}\n\n.style-module_LoyaltyPointsLinesModal__h1aD- {\n width: 720px;\n border-radius: 8px;\n background-color: #fff;\n position: relative;\n overflow: hidden;\n transform: scale(0.96);\n transition: transform 0.25s ease-out;\n}\n.style-module_LoyaltyPointsLinesModalContainerVisible__4sXcV .style-module_LoyaltyPointsLinesModal__h1aD- {\n transform: scale(1);\n}\n.style-module_LoyaltyPointsLinesModalContainerClosing__IEpXx .style-module_LoyaltyPointsLinesModal__h1aD- {\n transform: scale(0.96);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- {\n width: 96%;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeader__-Zcj7 {\n border-bottom: 1px solid var(--checkout-border-color);\n padding: 24px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalCloseButton__nb3-5 {\n position: absolute;\n top: 16px;\n right: 16px;\n width: 24px;\n height: 24px;\n cursor: pointer;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeaderTitle__xcD59 {\n font-size: 22px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 4px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalHeaderDescription__9N8ot {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContent__hjwxz {\n padding: 24px;\n max-height: 650px;\n overflow: auto;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContent__hjwxz {\n max-height: 500px !important;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i {\n display: flex;\n gap: 6px;\n align-items: center;\n margin-bottom: 16px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeader__aQV4i span {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValue__T9r6z {\n display: flex;\n gap: 4px;\n align-items: center;\n background-color: #f7f7f9;\n padding: 2px 6px;\n border-radius: 28px;\n line-height: 22px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItem__r1qmE {\n padding: 16px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--checkout-border-color);\n border-bottom: none;\n transition: background-color 0.3s ease;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItem__r1qmE:hover {\n background-color: #f7f7f9;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemFreeProduct__aAUrx button {\n display: flex;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemsFirst__Sj8rF {\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemsLast__gc8cc {\n border-bottom-right-radius: 8px;\n border-bottom-left-radius: 8px;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIcon__c4CR6 {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconContainer__26F-5 {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMain__aft8A {\n width: 72%;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainTitle__TQC3n {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemHeaderValueTextMainValue__TSz0- {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7 {\n background-color: var(--checkout-button-bg-color);\n border-radius: 8px;\n padding: 8px 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n color: var(--checkout-button-text-color);\n outline: none;\n border: none;\n min-width: 123px;\n transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7 {\n min-width: unset;\n }\n}\n.style-module_LoyaltyPointsLinesModal__h1aD- .style-module_LoyaltyPointsLinesModalContentItemButton__Xwvm7:disabled {\n background-color: #e3e8ef;\n color: var(--checkout-secondary-text-color);\n cursor: not-allowed;\n opacity: 0.8;\n}\n\n.style-module_LoyaltyPointsGiftModalOverlay__xeQyA {\n position: absolute;\n inset: 0;\n z-index: 10;\n display: flex;\n justify-content: flex-end;\n align-items: stretch;\n border-radius: 8px;\n}\n\n.style-module_LoyaltyPointsGiftModal__C7rhN {\n width: 100%;\n max-width: 100%;\n height: 100%;\n background-color: #fff;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n transform: translateX(0);\n animation: style-module_LoyaltyGiftSlideIn__sZfMa 0.18s ease-out forwards;\n}\n.style-module_LoyaltyPointsGiftModal__C7rhN.style-module_LoyaltyPointsGiftModalClosing__cEwwl {\n animation: style-module_LoyaltyGiftSlideOut__uTEqW 0.18s ease-in forwards;\n}\n\n@keyframes style-module_LoyaltyGiftSlideOut__uTEqW {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(100%);\n }\n}\n@keyframes style-module_LoyaltyGiftSlideIn__sZfMa {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0%);\n }\n}\n.style-module_LoyaltyPointsGiftModalHeader__54vAK {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n padding: 20px 24px;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n\n.style-module_LoyaltyPointsGiftModalTitle__qnzx3 {\n font-size: 18px;\n font-weight: 600;\n line-height: 26px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsGiftModalDescription__80l9h {\n margin-top: 4px;\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsGiftModalClose__bsSO2 {\n width: 28px;\n height: 28px;\n border-radius: 999px;\n border: none;\n background-color: transparent;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsGiftModalClose__bsSO2:hover {\n background-color: var(--checkout-secondary-bg-color);\n}\n\n.style-module_LoyaltyPointsGiftModalBody__aLoj3 {\n padding: 16px 24px 24px;\n overflow-y: auto;\n flex: 1;\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 {\n width: 72px;\n height: 72px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 {\n width: 42px;\n height: 42px;\n }\n}\n.style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 img {\n width: 72px;\n height: 72px;\n object-fit: contain;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemHeaderValueIconImage__BQic0 img {\n width: 42px;\n height: 42px;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23 {\n border-radius: 12px;\n padding: 2px 8px;\n border: 1px solid var(--checkout-border-color);\n background-color: #f7f7f9;\n width: fit-content;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemPoint__xvR23 {\n display: none;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP {\n border-radius: 12px;\n padding: 2px 8px;\n border: 1px solid var(--checkout-border-color);\n background-color: #f7f7f9;\n width: fit-content;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemPointMobile__AUrpP {\n display: flex;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU {\n height: 152px;\n background-color: #f7f7f9;\n padding: 32px 48px;\n border-radius: 8px;\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemSlider__iWpgU {\n padding: 32px 16px;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X span {\n font-size: 20px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n white-space: nowrap;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalSliderInfo__WiA8X span {\n font-size: 18px !important;\n line-height: 30px !important;\n }\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSlider__tnBdu {\n position: relative;\n width: 100%;\n height: 24px;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n margin-top: 24px;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValue__oG1fM {\n position: absolute;\n left: 0;\n right: 0;\n height: 6px;\n border-radius: 3px;\n background-color: #e3e8ef;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValueText__fnKQh {\n position: absolute;\n left: 0;\n height: 6px;\n width: 0;\n border-radius: 3px;\n background: linear-gradient(90deg, #36398e 0%, #6d76cb 100%);\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoSliderValueTextValue__lGm4z {\n position: absolute;\n left: 0;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 20px;\n height: 20px;\n border-radius: 50%;\n background: #ffffff;\n border: 2px solid #ffffff;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1), 0 0.5px 4px rgba(0, 0, 0, 0.1);\n z-index: 2;\n pointer-events: none;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInput__sgZrN {\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n z-index: 3;\n margin: 0;\n}\n\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 {\n display: flex;\n border-radius: 8px;\n background-color: #fff;\n padding: 2px 8px;\n border: 0.6px solid #cfced3;\n gap: 8px;\n align-items: center;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 svg {\n width: 22px;\n height: 22px;\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 svg path {\n stroke: var(--checkout-secondary-text-color);\n}\n.style-module_LoyaltyPointsLinesModalSliderInfoValue__RuqZ6 span {\n font-size: 20px;\n font-weight: 500;\n line-height: 32px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyEarningMethod__UNcvo {\n margin-top: 2px;\n}\n.style-module_LoyaltyEarningMethod__UNcvo .style-module_LoyaltyEarningMethodTitle__d5p2X {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n display: flex;\n gap: 4px;\n align-items: center;\n}\n.style-module_LoyaltyEarningMethod__UNcvo .style-module_LoyaltyEarningMethodTitle__d5p2X span {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineOneRow__YdQkF {\n border-radius: 8px;\n padding: 10px 12px;\n background-color: #fff;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n cursor: pointer;\n border: 1px solid var(--checkout-border-color);\n align-items: center;\n}\n.style-module_LoyaltyPointsLineOneRow__YdQkF svg path {\n stroke: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineOneRowTitle__V04li {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.style-module_LoyaltyPointsLineOneRowTitleText__y3UOy {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_AppliedCouponLoyalty__p2Mi0 {\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n padding: 4px 8px;\n background-color: #fff;\n display: flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n line-height: 20px;\n}\n.style-module_AppliedCouponLoyalty__p2Mi0 .style-module_CouponCode__UKPmf {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineIcon__ECQ1W svg path {\n stroke: var(--checkout-secondary-text-color);\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 {\n width: 20px;\n height: 20px;\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 svg {\n width: 20px;\n height: 20px;\n}\n.style-module_ClearCouponLoyalty__vRYH4 svg path {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ValueLoyalty__jdjW9 {\n color: var(--checkout-error-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_LoyaltyPointSpending__qam9Z {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsLineContainer__85Cvs {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLineContainer__85Cvs {\n flex-direction: column;\n gap: 2px;\n align-items: flex-start;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLinesModalContentItemButtonContainerMobile__iNiif {\n display: flex;\n justify-content: space-between;\n width: 100%;\n align-items: center;\n }\n}");export{n as default};
1
+ import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={ExpandHeader:"style-module_ExpandHeader__LQwWm",Left:"style-module_Left__-N12h",Price:"style-module_Price__OT1Wh",PriceText:"style-module_PriceText__bq1pk",ArrowDown:"style-module_ArrowDown__YhRny",Rotated:"style-module_Rotated__ZPfId",CartSummary:"style-module_CartSummary__m77tn",OpenCouponCodeSummary:"style-module_OpenCouponCodeSummary__ua9wx",HideOnDesktop:"style-module_HideOnDesktop__Vs5AV",ItemsContainer:"style-module_ItemsContainer__QFKQV",DetailsContainer:"style-module_DetailsContainer__PK33m",SuccessPageDetailContainer:"style-module_SuccessPageDetailContainer__-p8kJ",Details:"style-module_Details__hWJ9o",Divider:"style-module_Divider__MNDti",ActionTextBtn:"style-module_ActionTextBtn__7yua4",NoUnderline:"style-module_NoUnderline__FphKn",Light:"style-module_Light__dIcW-",SubTotalInfo:"style-module_SubTotalInfo__JMqK9",InfoRow:"style-module_InfoRow__oAvZS",hideMb:"style-module_hideMb__j7VBr",LoyaltyPoints:"style-module_LoyaltyPoints__3gd4k",Label:"style-module_Label__28Bij",Value:"style-module_Value__7rELF",TotalContainer:"style-module_TotalContainer__sGR7d",TitleContainer:"style-module_TitleContainer__LgmJI",Title:"style-module_Title__oMVSD",TotalPricesContainer:"style-module_TotalPricesContainer__-PsOD",TotalPrice:"style-module_TotalPrice__QBdM1",TotalTax:"style-module_TotalTax__9pA4Y",MilesSmilesPayable:"style-module_MilesSmilesPayable__fzibn",SuccessPageTotalContainer:"style-module_SuccessPageTotalContainer__NZGFF",AppliedCoupon:"style-module_AppliedCoupon__UNo1h",AppliedCouponBgGray:"style-module_AppliedCouponBgGray__MYoYu",NotClosed:"style-module_NotClosed__E-N9z",CouponCode:"style-module_CouponCode__UKPmf",ClearCoupon:"style-module_ClearCoupon__CBAzl",NotificationContainer:"style-module_NotificationContainer__AXfJT",CheckoutNoteContainer:"style-module_CheckoutNoteContainer__d-z4m",CheckoutNoteDisplay:"style-module_CheckoutNoteDisplay__DtnXo",Success:"style-module_Success__VI2Bw",GiftLabel:"style-module_GiftLabel__cazrS",PoweredBy:"style-module_PoweredBy__DKBJF",SuccessPageCartSummary:"style-module_SuccessPageCartSummary__pjgea",OpenCouponCodeMain:"style-module_OpenCouponCodeMain__lZtb3",OpenCouponCodeMainWithMb:"style-module_OpenCouponCodeMainWithMb__DqVmh",InfoRowGiftCardMobile:"style-module_InfoRowGiftCardMobile__Kp-zh",StoreCreditTag:"style-module_StoreCreditTag__D1TtS",AppliedCouponLoyalty:"style-module_AppliedCouponLoyalty__p2Mi0",LoyaltyPointsLineIcon:"style-module_LoyaltyPointsLineIcon__ECQ1W",ClearCouponLoyalty:"style-module_ClearCouponLoyalty__vRYH4",ValueLoyalty:"style-module_ValueLoyalty__jdjW9",LoyaltyPointSpending:"style-module_LoyaltyPointSpending__qam9Z",LoyaltyPointsLineContainer:"style-module_LoyaltyPointsLineContainer__85Cvs"};e(".style-module_ExpandHeader__LQwWm {\n position: sticky;\n top: 0;\n z-index: 10;\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-top: 1px solid var(--checkout-border-color);\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom 0.3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color);\n}\n@media only screen and (min-width: 1000px) {\n .style-module_ExpandHeader__LQwWm {\n display: none;\n }\n}\n.style-module_ExpandHeader__LQwWm .style-module_Left__-N12h {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh {\n font-weight: 600;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_PriceText__bq1pk {\n font-weight: 600;\n margin-right: 8px;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny {\n transition: all 0.3s;\n display: flex;\n align-items: center;\n}\n.style-module_ExpandHeader__LQwWm .style-module_Price__OT1Wh .style-module_ArrowDown__YhRny.style-module_Rotated__ZPfId {\n transform: rotate(-180deg);\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn {\n width: 100%;\n background-color: var(--checkout-card-bg-color);\n }\n .style-module_CartSummary__m77tn.style-module_OpenCouponCodeSummary__ua9wx {\n background-color: transparent;\n }\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CartSummary__m77tn.style-module_HideOnDesktop__Vs5AV {\n display: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: 50vh;\n overflow-y: auto;\n margin-bottom: 24px;\n /* Track */\n /* Handle */\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV {\n max-height: unset;\n overflow-y: unset;\n margin-bottom: 0;\n }\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar {\n width: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-track {\n box-shadow: inset 0 0 20px 20px #e3e7ef;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_ItemsContainer__QFKQV::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 20px 20px #000000;\n border-left: 16px solid transparent;\n}\n.style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n overflow: hidden;\n width: 100%;\n transition: height 0.3s ease-in-out;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_DetailsContainer__PK33m {\n padding: 0 24px;\n box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ {\n padding: 0;\n box-shadow: none;\n }\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageDetailContainer__-p8kJ .style-module_Details__hWJ9o {\n padding-top: 0;\n}\n.style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n overflow: hidden;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_Details__hWJ9o {\n padding-top: 24px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_Divider__MNDti {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_CartSummary__m77tn .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_LoyaltyPoints__3gd4k {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n margin-right: 4px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_SubTotalInfo__JMqK9 .style-module_InfoRow__oAvZS:last-of-type {\n margin-bottom: 0;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d {\n display: flex;\n justify-content: space-between;\n margin-top: 12px;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TitleContainer__LgmJI .style-module_Title__oMVSD {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPricesContainer__-PsOD {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalPrice__QBdM1 {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CartSummary__m77tn .style-module_TotalContainer__sGR7d .style-module_TotalTax__9pA4Y {\n font-size: 14px;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--checkout-border-color);\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn .style-module_InfoRow__oAvZS {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_MilesSmilesPayable__fzibn .style-module_InfoRow__oAvZS .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF {\n height: unset;\n margin-top: 10px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_Title__oMVSD {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_SuccessPageTotalContainer__NZGFF .style-module_TotalPrice__QBdM1 {\n font-weight: 500 !important;\n line-height: 32px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 2px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_AppliedCouponBgGray__MYoYu {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n margin-left: 6px;\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n.style-module_CartSummary__m77tn .style-module_NotificationContainer__AXfJT {\n margin-bottom: 14px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_Title__oMVSD {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m .style-module_CheckoutNoteDisplay__DtnXo {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m.style-module_Success__VI2Bw {\n margin-top: 0;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_CheckoutNoteContainer__d-z4m {\n margin-top: 0px;\n }\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS {\n display: flex;\n align-items: center;\n}\n.style-module_CartSummary__m77tn .style-module_GiftLabel__cazrS span {\n margin-left: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none;\n margin-top: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF {\n display: flex;\n }\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CartSummary__m77tn .style-module_PoweredBy__DKBJF a {\n display: flex;\n align-items: center;\n}\n\n.style-module_SuccessPageCartSummary__pjgea {\n background-color: #fff;\n}\n\n.style-module_OpenCouponCodeMain__lZtb3 {\n display: flex;\n}\n.style-module_OpenCouponCodeMain__lZtb3 input {\n width: calc(100% - 12px) !important;\n}\n.style-module_OpenCouponCodeMain__lZtb3.style-module_OpenCouponCodeMainWithMb__DqVmh {\n margin-bottom: 12px;\n}\n\n.style-module_InfoRowGiftCardMobile__Kp-zh {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh.style-module_hideMb__j7VBr {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Label__28Bij {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center;\n flex: 1 1 auto;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_Value__7rELF {\n flex: 0 0 auto;\n padding-left: 8px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh:last-of-type {\n margin-bottom: 0;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4 .style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4:hover {\n text-decoration: underline;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_NoUnderline__FphKn:hover {\n text-decoration: none;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_ActionTextBtn__7yua4.style-module_Light__dIcW- {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_AppliedCoupon__UNo1h {\n background-color: var(--checkout-secondary-bg-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h.style-module_NotClosed__E-N9z {\n padding: 4px 4px 4px 4px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_CouponCode__UKPmf {\n font-size: 14px;\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_InfoRowGiftCardMobile__Kp-zh .style-module_AppliedCoupon__UNo1h .style-module_ClearCoupon__CBAzl svg {\n transform: scale(0.8);\n}\n\n.style-module_StoreCreditTag__D1TtS {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_AppliedCouponLoyalty__p2Mi0 {\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n padding: 4px 8px;\n background-color: #fff;\n display: flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n line-height: 20px;\n}\n.style-module_AppliedCouponLoyalty__p2Mi0 .style-module_CouponCode__UKPmf {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--checkout-primary-text-color);\n}\n\n.style-module_LoyaltyPointsLineIcon__ECQ1W svg path {\n stroke: var(--checkout-secondary-text-color);\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 {\n width: 20px;\n height: 20px;\n}\n\n.style-module_ClearCouponLoyalty__vRYH4 svg {\n width: 20px;\n height: 20px;\n}\n.style-module_ClearCouponLoyalty__vRYH4 svg path {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ValueLoyalty__jdjW9 {\n color: var(--checkout-error-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_LoyaltyPointSpending__qam9Z {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_LoyaltyPointsLineContainer__85Cvs {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_LoyaltyPointsLineContainer__85Cvs {\n flex-direction: column;\n gap: 2px;\n align-items: flex-start;\n }\n}");export{n as default};
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{makeAutoObservable as i}from"mobx";import n from"../checkbox/check.js";import o from"./style.module.scss.js";import{PayWithIkas as l}from"../../../pay-with-ikas/index.js";import{CheckoutStep as s}from"../../model.js";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{LoyaltyPointsLine as r}from"../cart-summary/index.js";import{IkasCartCreatedBy as c}from"@ikas/storefront-models";import m from"next/dynamic";m((function(){return import("../stripe-express/index.js").then((function(e){return e.default}))}));var d=t((function(t){var i,m,d,p=t.steps,u=t.stepContent,h=t.step,y=t.hasTopMargin,v=t.vm,f=t.isMobile;e.useEffect((function(){var e,t;if(document.body.getBoundingClientRect().width<768){var i=p.findIndex((function(e){return e.isSelected}));if(0===i)return;2===i?null===(e=document.getElementById("step-".concat(1)))||void 0===e||e.scrollIntoView():null===(t=document.getElementById("step-".concat(i)))||void 0===t||t.scrollIntoView()}}),[]);var C=a.getPayWithIkasUrl(),g=a.getCurrentRouting(),E="tr"===(null==g?void 0:g.locale)&&"TRY"===(null==g?void 0:g.currencyCode)&&C&&h===s.INFO,S=!!(null===(i=v.loyaltySpendingMethods)||void 0===i?void 0:i.length)&&(null===(m=v.loyaltySpendingMethods)||void 0===m?void 0:m.length)>0&&f&&!!(null===(d=v.customizationProps)||void 0===d?void 0:d.showLoyaltyPoints)&&!v.isOpenEditOrderWithTransaction&&!(v.checkout.createdBy===c.UPSELL||v.checkout.createdBy===c.ADMIN);return e.createElement("div",{className:o.StepContainer},S&&e.createElement(r,{vm:v,isVisibleLoyaltyPoints:v.isLoyaltyPointsVisible,setIsVisibleLoyaltyPoints:v.setIsLoyaltyPointsVisible,isMobile:f}),E&&e.createElement("div",{className:[o.PayWithIkasContainer,y?o.HasTopMargin:""].join(" ")},e.createElement("div",{className:o.PayWithIkasContent},e.createElement("span",{className:o.PayWithIkasTitle},"Hızlı Öde ile Kolay Alışveriş"),e.createElement("span",{className:o.PayWithIkasDescription},"Bilgilerini bir kez kaydet, 20.000 e-ticaret sitesinde tek tıkla öde.")),e.createElement("div",{className:o.PayWithIkasButton},e.createElement(l,{useExistingCart:!0}))),p.map((function(t,i){return e.createElement("div",{className:o.Step},e.createElement("div",{id:"step-".concat(i),className:[o.StepTitleContainer,0===i?o.First:""].join(" ")},e.createElement("div",{className:[o.StepTitleTop,t.titleRightContent?o.WithRightContent:""].join(" ")},e.createElement("div",{className:[o.StepCircle,t.isSelected||t.isComplete?o.Selected:""].join(" ").trim()},t.isComplete?e.createElement(n,null):i+1),e.createElement("div",{className:[o.StepTitle,t.isSelected||t.isComplete?"":o.Light].join(" ")},t.label),!!t.titleRightContent&&e.createElement("div",{className:o.StepTitleRightContent},t.titleRightContent)),!!t.titleBottomContent&&e.createElement("div",{className:o.StepTitleBottom},t.titleBottomContent)),t.isSelected&&e.createElement("div",{className:o.StepContent},u))})))})),p=function(e,t,n,o,l){this.label=e,this.isSelected=t,this.isComplete=n,this.titleRightContent=o,this.titleBottomContent=l,i(this)};export{p as Step,d as default};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import{makeAutoObservable as i}from"mobx";import n from"../checkbox/check.js";import a from"./style.module.scss.js";import{PayWithIkas as o}from"../../../pay-with-ikas/index.js";import{CheckoutStep as l}from"../../model.js";import{IkasStorefrontConfig as s}from"@ikas/storefront-config";import{isLoyaltyBlockVisible as r,LoyaltyPointsBlock as m}from"../cart-summary/loyalty/index.js";import c from"next/dynamic";c((function(){return import("../stripe-express/index.js").then((function(e){return e.default}))}));var d=t((function(t){var i=t.steps,c=t.stepContent,d=t.step,p=t.hasTopMargin,u=t.vm,f=t.isMobile;e.useEffect((function(){var e,t;if(document.body.getBoundingClientRect().width<768){var n=i.findIndex((function(e){return e.isSelected}));if(0===n)return;2===n?null===(e=document.getElementById("step-".concat(1)))||void 0===e||e.scrollIntoView():null===(t=document.getElementById("step-".concat(n)))||void 0===t||t.scrollIntoView()}}),[]);var h=s.getPayWithIkasUrl(),v=s.getCurrentRouting(),C="tr"===(null==v?void 0:v.locale)&&"TRY"===(null==v?void 0:v.currencyCode)&&h&&d===l.INFO,E=!!f&&r(u);return e.createElement("div",{className:a.StepContainer},E&&e.createElement(m,{vm:u}),C&&e.createElement("div",{className:[a.PayWithIkasContainer,p?a.HasTopMargin:""].join(" ")},e.createElement("div",{className:a.PayWithIkasContent},e.createElement("span",{className:a.PayWithIkasTitle},"Hızlı Öde ile Kolay Alışveriş"),e.createElement("span",{className:a.PayWithIkasDescription},"Bilgilerini bir kez kaydet, 20.000 e-ticaret sitesinde tek tıkla öde.")),e.createElement("div",{className:a.PayWithIkasButton},e.createElement(o,{useExistingCart:!0}))),i.map((function(t,i){return e.createElement("div",{className:a.Step},e.createElement("div",{id:"step-".concat(i),className:[a.StepTitleContainer,0===i?a.First:""].join(" ")},e.createElement("div",{className:[a.StepTitleTop,t.titleRightContent?a.WithRightContent:""].join(" ")},e.createElement("div",{className:[a.StepCircle,t.isSelected||t.isComplete?a.Selected:""].join(" ").trim()},t.isComplete?e.createElement(n,null):i+1),e.createElement("div",{className:[a.StepTitle,t.isSelected||t.isComplete?"":a.Light].join(" ")},t.label),!!t.titleRightContent&&e.createElement("div",{className:a.StepTitleRightContent},t.titleRightContent)),!!t.titleBottomContent&&e.createElement("div",{className:a.StepTitleBottom},t.titleBottomContent)),t.isSelected&&e.createElement("div",{className:a.StepContent},c))})))})),p=function(e,t,n,a,o){this.label=e,this.isSelected=t,this.isComplete=n,this.titleRightContent=a,this.titleBottomContent=o,i(this)};export{p as Step,d as default};
@@ -1 +1 @@
1
- import*as e from"react";var t=function(t){return t.className,e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},e.createElement("g",{filter:"url(#filter0_dii_4527_5468)"},e.createElement("path",{d:"M7.73445 0.617758C7.90731 0.267554 7.99375 0.0924516 8.11108 0.0365064C8.21317 -0.0121688 8.33178 -0.0121688 8.43386 0.0365064C8.5512 0.0924516 8.63763 0.267554 8.8105 0.617758L10.4505 3.94023C10.5015 4.04362 10.5271 4.09532 10.5643 4.13545C10.5974 4.17099 10.637 4.19978 10.6809 4.22024C10.7306 4.24334 10.7877 4.25168 10.9018 4.26835L14.5702 4.80455C14.9565 4.86101 15.1497 4.88925 15.239 4.9836C15.3168 5.06569 15.3534 5.17849 15.3386 5.2906C15.3216 5.41946 15.1817 5.55566 14.9021 5.82806L12.2485 8.41258C12.1658 8.49315 12.1245 8.53344 12.0978 8.58137C12.0742 8.62381 12.059 8.67043 12.0531 8.71865C12.0465 8.77311 12.0563 8.83002 12.0758 8.94382L12.7019 12.5944C12.768 12.9794 12.801 13.1719 12.7389 13.2861C12.6849 13.3855 12.589 13.4553 12.4778 13.4759C12.3499 13.4996 12.1771 13.4087 11.8313 13.2268L8.55174 11.5021C8.44956 11.4484 8.39847 11.4215 8.34464 11.411C8.29698 11.4016 8.24796 11.4016 8.2003 11.411C8.14648 11.4215 8.09539 11.4484 7.9932 11.5021L4.71365 13.2268C4.3679 13.4087 4.19502 13.4996 4.06719 13.4759C3.95597 13.4553 3.86 13.3855 3.80601 13.2861C3.74396 13.1719 3.77698 12.9794 3.84302 12.5944L4.46913 8.94382C4.48864 8.83002 4.4984 8.77311 4.4918 8.71865C4.48595 8.67043 4.47079 8.62381 4.44717 8.58137C4.42048 8.53344 4.37912 8.49315 4.2964 8.41258L1.64288 5.82806C1.36321 5.55566 1.22337 5.41946 1.20636 5.2906C1.19155 5.17849 1.22813 5.06569 1.3059 4.9836C1.39529 4.88925 1.58844 4.86101 1.97474 4.80455L5.64319 4.26835C5.75728 4.25168 5.81432 4.24334 5.864 4.22024C5.90798 4.19978 5.94758 4.17099 5.9806 4.13545C6.01789 4.09532 6.04341 4.04362 6.09444 3.94023L7.73445 0.617758Z",fill:"url(#paint0_linear_4527_5468)"})),e.createElement("defs",null,e.createElement("filter",{id:"filter0_dii_4527_5468",x:"0.00312495",y:"-1.2",width:"16.5406",height:"17.0805",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},e.createElement("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",{dy:"1.2"}),e.createElement("feGaussianBlur",{stdDeviation:"0.6"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),e.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.552941 0 0 0 0 0.294118 0 0 0 0 0 0 0 0 0.24 0"}),e.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4527_5468"}),e.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4527_5468",result:"shape"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",{dy:"-1.2"}),e.createElement("feGaussianBlur",{stdDeviation:"1.2"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),e.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.844933 0 0 0 0 0.523295 0 0 0 0 0.161948 0 0 0 1 0"}),e.createElement("feBlend",{mode:"normal",in2:"shape",result:"effect2_innerShadow_4527_5468"}),e.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.createElement("feOffset",{dy:"1.2"}),e.createElement("feGaussianBlur",{stdDeviation:"1.2"}),e.createElement("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),e.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0"}),e.createElement("feBlend",{mode:"normal",in2:"effect2_innerShadow_4527_5468",result:"effect3_innerShadow_4527_5468"})),e.createElement("linearGradient",{id:"paint0_linear_4527_5468",x1:"8.27247",y1:"0",x2:"8.27247",y2:"13.4796",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{"stop-color":"#FFE6B1"}),e.createElement("stop",{offset:"1","stop-color":"#F49D30"}))))};export{t as default};
1
+ import*as C from"react";var e=function(e){var t=e.className;return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 17 16",fill:"none",className:t},C.createElement("path",{d:"M7.73445 1.21776C7.90731 0.867554 7.99375 0.692452 8.11108 0.636506C8.21317 0.587831 8.33178 0.587831 8.43386 0.636506C8.5512 0.692452 8.63763 0.867554 8.8105 1.21776L10.4505 4.54023C10.5015 4.64362 10.5271 4.69532 10.5643 4.73545C10.5974 4.77099 10.637 4.79978 10.6809 4.82024C10.7306 4.84334 10.7877 4.85168 10.9018 4.86835L14.5702 5.40455C14.9565 5.46101 15.1497 5.48925 15.239 5.5836C15.3168 5.66569 15.3534 5.77849 15.3386 5.8906C15.3216 6.01946 15.1817 6.15566 14.9021 6.42806L12.2485 9.01258C12.1658 9.09315 12.1245 9.13344 12.0978 9.18137C12.0742 9.22381 12.059 9.27043 12.0531 9.31865C12.0465 9.37311 12.0563 9.43002 12.0758 9.54382L12.7019 13.1944C12.768 13.5794 12.801 13.7719 12.7389 13.8861C12.6849 13.9855 12.589 14.0553 12.4778 14.0759C12.3499 14.0996 12.1771 14.0087 11.8313 13.8268L8.55174 12.1021C8.44956 12.0484 8.39847 12.0215 8.34464 12.011C8.29698 12.0016 8.24796 12.0016 8.2003 12.011C8.14648 12.0215 8.09539 12.0484 7.9932 12.1021L4.71365 13.8268C4.3679 14.0087 4.19502 14.0996 4.06719 14.0759C3.95597 14.0553 3.86 13.9855 3.80601 13.8861C3.74396 13.7719 3.77698 13.5794 3.84302 13.1944L4.46913 9.54382C4.48864 9.43002 4.4984 9.37311 4.4918 9.31865C4.48595 9.27043 4.47079 9.22381 4.44717 9.18137C4.42048 9.13344 4.37912 9.09315 4.2964 9.01258L1.64288 6.42806C1.36321 6.15566 1.22337 6.01946 1.20636 5.8906C1.19155 5.77849 1.22813 5.66569 1.3059 5.5836C1.39529 5.48925 1.58844 5.46101 1.97474 5.40455L5.64319 4.86835C5.75728 4.85168 5.81432 4.84334 5.864 4.82024C5.90798 4.79978 5.94758 4.77099 5.9806 4.73545C6.01789 4.69532 6.04341 4.64362 6.09444 4.54023L7.73445 1.21776Z",fill:"currentColor"}))};export{e as default};
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as t,__generator as r}from'./../../../../ext/tslib/tslib.es6.js';import*as n from"react";import{observer as a}from"mobx-react-lite";var s=["https://sandbox-app.tkpay.com","https://app.tkpay.com"],i=a((function(a){var i,o,c=a.vm;a.isSelected;var l=n.useRef(null),u=n.useRef(!1),p=null===(i=c.tkPayResponse)||void 0===i?void 0:i.paymentPageUrl,d=null===(o=c.tkPayResponse)||void 0===o?void 0:o.callbackUrl;return n.useEffect((function(){u.current=!1}),[p,d]),n.useEffect((function(){if(p){var e=function(e){if(s.includes(e.origin)){var n=e.data||{};if("tkpay:resize"!==n.type){var a;"tkpay:success"===n.type&&n.payload&&(a=n.payload,t(void 0,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:if(!d||u.current)return[2];if(a.status&&"SUCCESS"!==a.status)return[2];u.current=!0,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),u.current=!1,console.error("TkPay callback post failed",e),[3,4];case 4:return[2]}}))})))}else{var i=Number(n.height||0);l.current&&i>0&&(l.current.style.height="".concat(i,"px"))}}};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}}}),[p,d]),p?n.createElement("div",{style:e({},!c.showTkPayContainer&&{display:"none"})},n.createElement("iframe",{ref:l,src:p,id:"tkpay-payment-page",className:"responsive",title:"TKPay Payment",style:{width:"100%",height:"600px",border:"none"}})):null}));export{i as TkPay};
1
+ import{__assign as e,__awaiter as t,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import*as r from"react";import{observer as a}from"mobx-react-lite";var s=["https://sandbox-app.tkpay.com","https://app.tkpay.com"],o=a((function(a){var o,i,c=a.vm;a.isSelected;var u=r.useRef(null),l=r.useRef(!1),p=null===(o=c.tkPayResponse)||void 0===o?void 0:o.paymentPageUrl,d=null===(i=c.tkPayResponse)||void 0===i?void 0:i.callbackUrl;return r.useEffect((function(){l.current=!1}),[p,d]),r.useEffect((function(){if(p){var e=function(e){e.status&&"SUCCESS"!==e.status||c.onTkPayPaymentSuccess((function(){return function(e){return t(void 0,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:if(!d||l.current)return[2];l.current=!0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),l.current=!1,console.error("TkPay callback post failed",t),[3,4];case 4:return[2]}}))}))}(e)}))},r=function(t){if(s.includes(t.origin)){var n=t.data||{};if("tkpay:resize"!==n.type)"tkpay:success"===n.type&&n.payload&&e(n.payload);else{var r=Number(n.height||0);u.current&&r>0&&(u.current.style.height="".concat(r,"px"))}}};return window.addEventListener("message",r),function(){return window.removeEventListener("message",r)}}}),[p,d]),p?r.createElement("div",{style:e({},!c.showTkPayContainer&&{display:"none"})},r.createElement("iframe",{ref:u,src:p,id:"tkpay-payment-page",className:"responsive",title:"TKPay Payment",style:{width:"100%",height:"600px",border:"none"}})):null}));export{o as TkPay};
@@ -51,6 +51,7 @@ export declare type IkasCheckoutCustomizationProps = {
51
51
  secondaryButtonBgColor?: string;
52
52
  secondaryButtonTextColor?: string;
53
53
  secondaryButtonBorderColor?: string;
54
+ loyaltyIconColor?: string;
54
55
  };
55
56
  declare const _default: React.FunctionComponent<IkasCheckoutPageProps>;
56
57
  export default _default;