@zonos/elements 1.0.16 → 1.0.17-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-e27fd17c.js → cart-108bc407.js} +8 -1
- package/dist/cjs/cart-108bc407.js.map +1 -0
- package/dist/cjs/zonos-address_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +5 -3
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js.map +1 -1
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js.map +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js.map +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js.map +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js.map +1 -1
- package/dist/collection/components/store/checkout/cart.js +6 -0
- package/dist/collection/components/store/checkout/cart.js.map +1 -1
- package/dist/collection/components/store/checkout/stripe.js +2 -0
- package/dist/collection/components/store/checkout/stripe.js.map +1 -1
- package/dist/collection/environment.js +9 -1
- package/dist/collection/environment.js.map +1 -1
- package/dist/collection/scripts/stripe.js +3 -3
- package/dist/collection/scripts/stripe.js.map +1 -1
- package/dist/collection/types/generated/graphql.customer.types.js +5 -0
- package/dist/collection/types/generated/graphql.customer.types.js.map +1 -1
- package/dist/components/stripe.js +8 -1
- package/dist/components/stripe.js.map +1 -1
- package/dist/components/zonos-cart-items2.js +3 -1
- package/dist/components/zonos-cart-items2.js.map +1 -1
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-finish2.js.map +1 -1
- package/dist/components/zonos-checkout.js +5 -1
- package/dist/components/zonos-checkout.js.map +1 -1
- package/dist/esm/{cart-36c33342.js → cart-2f83e048.js} +8 -1
- package/dist/esm/cart-2f83e048.js.map +1 -0
- package/dist/esm/zonos-address_2.entry.js +1 -1
- package/dist/esm/zonos-banner_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_10.entry.js +5 -3
- package/dist/esm/zonos-cart-items_10.entry.js.map +1 -1
- package/dist/esm/zonos-checkout.entry.js +6 -2
- package/dist/esm/zonos-checkout.entry.js.map +1 -1
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/cart-2f83e048.js +2 -0
- package/dist/esm-es5/cart-2f83e048.js.map +1 -0
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js.map +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js.map +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/scripts/loadStripe.js +118 -0
- package/dist/scripts/loadZonos.js +300 -0
- package/dist/scripts/stripe.js +126 -0
- package/dist/scripts/zonos.js +300 -0
- package/dist/types/components/store/checkout/cart.d.ts +14 -0
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +48 -0
- package/dist/types/types/generated/graphql.customer.types.ts +50 -0
- package/dist/zonos-elements/{cart-36c33342.js → cart-2f83e048.js} +8 -1
- package/dist/zonos-elements/cart-2f83e048.js.map +1 -0
- package/dist/zonos-elements/cart-9780fa28.system.js +2 -0
- package/dist/zonos-elements/cart-9780fa28.system.js.map +1 -0
- package/dist/zonos-elements/zonos-address_2.entry.js +1 -1
- package/dist/zonos-elements/zonos-address_2.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-banner_2.entry.js +1 -1
- package/dist/zonos-elements/zonos-banner_2.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-cart-items_10.entry.js +5 -3
- package/dist/zonos-elements/zonos-cart-items_10.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-cart-items_10.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-cart-items_10.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-checkout.entry.js +6 -2
- package/dist/zonos-elements/zonos-checkout.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-checkout.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-checkout.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-controller.entry.js +1 -1
- package/dist/zonos-elements/zonos-controller.system.entry.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/cart-e27fd17c.js.map +0 -1
- package/dist/esm/cart-36c33342.js.map +0 -1
- package/dist/esm-es5/cart-36c33342.js +0 -2
- package/dist/esm-es5/cart-36c33342.js.map +0 -1
- package/dist/zonos-elements/cart-36c33342.js.map +0 -1
- package/dist/zonos-elements/cart-ecd9011b.system.js +0 -2
- package/dist/zonos-elements/cart-ecd9011b.system.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,e,s){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{c(s.next(o))}catch(o){i(o)}}function r(o){try{c(s["throw"](o))}catch(o){i(o)}}function c(o){o.done?e(o.value):n(o.value).then(a,r)}c((s=s.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(t){return c([o,t])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;n=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=t.call(o,e)}catch(o){r=[6,o];n=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,i;s<n;s++){if(i||!(s in t)){if(!i)i=Array.prototype.slice.call(t,0,s);i[s]=t[s]}}return o.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,a as getAssetPath,h,H as Host,F as Fragment,c as createEvent,d as getElement}from"./index-d1aa9293.js";import{c as cartStore,s as stripeStore,l as stripeStoreRetrievePayment,j as stripeStoreReset,m as cartStoreUpdateSelectedShippingOption,n as cartStoreGetShippingTransitInfo}from"./cart-36c33342.js";import{t as translate}from"./localization-4a424f49.js";import{g as getBorderRadius}from"./getBorderRadius-82fbaf25.js";import{s as submitGtag,i as isCheckoutMobile}from"./submitGtag-fbdb454b.js";import{c as classes}from"./classes-0d95c529.js";import{z as zonosStore}from"./zonosStore-13a7b534.js";import"./isDarkColor-b21326ae.js";var formatCurrency=function(o){var t=o.amount,e=o.currency,s=o.showCurrencyText;return s?"".concat(new Intl.NumberFormat("en-US",{currency:e,style:"currency"}).format(t)," ").concat(e):new Intl.NumberFormat("en-US",{currency:e,style:"currency"}).format(t)};var zonosCartItemsCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";var ZonosCartItems=function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");return h(Host,{class:"zonos--cart-items zonos--elements"},h("table",{class:"zonos--cart-table"},h("tbody",null,cartStore.items.map((function(e){var s=e.imageUrl;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?h("img",{alt:e.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:e.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:e.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("zonos-text",{type:"label"},e.name)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:e.amount*e.quantity,currency:cartStore.currency}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss;var InfoIcon='<svg viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n';var zonosCartSubtotalCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-subtotal-price{text-align:right}";var ZonosCartSubtotal=function(){function o(o){registerInstance(this,o)}o.prototype.render=function(){var o=cartStore.total-cartStore.dutiesTaxFees;var t=function(){if(!cartStore.selectedShippingOption){return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Shipping")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("No shipping method selected")))}return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},cartStore.selectedShippingOption.displayName),cartStore.selectedShippingOptionTransitTime&&h("zonos-text",{class:"zonos--caption",type:"caption"},cartStore.selectedShippingOptionTransitTime," ",translate("business days")))};return h(Host,{class:"zonos--cart-subtotal zonos--elements"},h("table",{class:"zonos--cart-table"},h("tr",{class:"zonos--row zonos--cart-subtotal"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Cart subtotal"))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:cartStore.subtotal,currency:cartStore.currency})))),h("tr",{class:"zonos--row zonos--cart-shipping"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},t()),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.shipping?formatCurrency({amount:cartStore.shipping,currency:cartStore.currency}):"-")),cartStore.step==="payment"&&h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("div",{class:"zonos--title-with-icon"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),h("zonos-icon",{content:InfoIcon,size:16})),!!cartStore.isSelectedShippingAboveDeminimis&&h("zonos-text",{color:"gray-800",type:"body"},translate("Order is over the de minimis threshold for both duty and tax"))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.dutiesTaxFees?formatCurrency({amount:cartStore.dutiesTaxFees,currency:cartStore.currency}):"-",cartStore.isSelectedShippingGuarantee&&h("zonos-badge",null,translate("Guaranteed")))),h("tr",{class:"zonos--row zonos--cart-pay-total"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Order total"))),h("td",{class:"zonos--column"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:cartStore.step==="shipping"?o:cartStore.total,currency:cartStore.currency}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartSubtotal.style=zonosCartSubtotalCss;var RemoveIcon$1='<svg color="var(--amino-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var SuccessIcon='<svg color="var(--amino-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--amino-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var zonosCheckoutFinishCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";var ZonosCheckoutFinish=function(){function o(o){var t=this;registerInstance(this,o);this.closeClick=createEvent(this,"closeClick",7);this.checkPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,t,e,s;return __generator(this,(function(n){switch(n.label){case 0:this.isLoading=true;o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!o)return[3,2];return[4,stripeStoreRetrievePayment({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:t=n.sent(),e=t.error,s=t.messages;this.notificationType=e?"error":"success";this.notificationMessages=s||[];this.notificationTitle=e?translate("Payment failed"):translate("You're all set!");if(e){submitGtag("zonos-checkout-payment-fail")}else{submitGtag("zonos-checkout-success")}n.label=2;case 2:stripeStoreReset();this.isLoading=false;return[2]}}))}))};this.closeClickHandler=function(){t.closeClick.emit()};this.borderRadius="ROUNDED";this.storybookForceStatus=undefined;this.overrideNotification=undefined;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[]}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;return}void this.checkPaymentStatus()};o.prototype.render=function(){var o=this;return h(Host,{class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":getBorderRadius(this.borderRadius)}},this.isLoading&&h("div",{class:"loading-wrapper"},h("zonos-spinner",null)),!this.isLoading&&h("div",{class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{color:"blue-800",content:SuccessIcon,size:50}):h("zonos-icon",{color:"red-800",content:RemoveIcon$1,size:50}),h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),h("zonos-text",null,this.notificationMessages.map((function(o){return h(Fragment,null,o,h("br",null))}))),h("zonos-button",{onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},translate("Keep shopping"))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCheckoutFinish.style=zonosCheckoutFinishCss;var zonosCheckoutPaymentCss=".sc-zonos-checkout-payment-h{font-family:Inter;display:block}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:0 5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{width:100%}";var ZonosCheckoutPayment=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.paymentError=false;this.submitBtnType=undefined;this.continueLoading=false;this.submitBtnColor=undefined;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-payment-info")}};o.prototype.render=function(){var o=this;var t;if(!stripeStore.stripeElements){return null}this.disabled=!((t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.complete);return h(Host,{class:"zonos--checkout-payment zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),this.paymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},translate("We couldn't complete your payment. Please verify the payment details and try again.")),h("zonos-payment",null)),h("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},"Pay"," ",formatCurrency({amount:cartStore.total,currency:cartStore.currency})))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosCheckoutPayment.style=zonosCheckoutPaymentCss;var zonosCollapseCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapse=function(){function o(o){registerInstance(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var t="".concat(this.collapseSize,"px");return this.collapsed?t:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var t,e,s;(s=(e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("iframe"))===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){o.height=o.el.scrollHeight}))};o.prototype.render=function(){this.height=this.el.scrollHeight;return h(Host,{class:"zonos--elements zonos--collapse",style:{height:this.getElementHeight()}},h("div",null,h("iframe",{class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",null)))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCollapse.style=zonosCollapseCss;var zonosCustomerInfoCss=".sc-zonos-customer-info-h{font-family:Inter;display:block}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:0 5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{width:100%}";var ZonosCustomerInfo=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.defaultAddress=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-customer-info")}};o.prototype.render=function(){var o=this;var t,e;if(!stripeStore.stripeElements){return null}this.disabled=!((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete)||!((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.complete);return h(Host,{class:"zonos--customer-info zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Customer information")),h("zonos-link-authentication",{titleText:translate("Contact")}),h("zonos-address",{defaultAddress:this.defaultAddress,titleText:translate("Address"),type:"shipping"})),h("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},translate("Continue to shipping")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosCustomerInfo.style=zonosCustomerInfoCss;var RemoveIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosDialogCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:1001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:1001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:1002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var ZonosDialog=function(){function o(o){var t=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.footerRightAction=null;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=getBorderRadius(this.borderStyle);return h(Host,{class:classes(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--height":this.height||"initial","--width":this.width}},h("div",{class:"zonos--backdrop"}),h("div",{"aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},h("div",{class:"zonos--dialog"},this.isLoading&&h("div",{class:"zonos--loading"},h("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&h("div",{class:"zonos--header"},this.headerText&&h("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{content:RemoveIcon}),noBackground:true,onClick:this.closeButtonHandler})),h("div",{class:classes(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},h("slot",null)),this.footerRightAction&&h("div",{class:"zonos--footer"},h("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosDialog.style=zonosDialogCss;var zonosLogoCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var ZonosLogo=function(){function o(o){registerInstance(this,o);this.theme="LIGHT";this.width="auto";this.class=""}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{class:classes(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--width":this.width}},h("img",{alt:"Zonos Logo",src:getAssetPath("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosLogo.style=zonosLogoCss;var ChevronDownIcon='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var zonosReviewCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";var ZonosReview=function(){function o(o){registerInstance(this,o);this.mobile=false;this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var t=this.isMobile?"boldSubheader":"semiBoldLabel";var e=this.isMobile?"boldSubheader":"secondaryPageHeader";var s=this.isMobile?"gray-1200":"gray-800";var n=cartStore.total-cartStore.dutiesTaxFees;var i=function(){if(!o.isMobile){return null}if(!o.collapsed){return h("zonos-icon",{color:"gray-1200",content:ChevronDownIcon})}return h("zonos-icon",{color:"gray-1200",content:ChevronUpIcon})};return h(Host,{class:classes(["zonos--review zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--title"},h("zonos-text",{color:s,type:t},translate("Pay")," ",zonosStore.organizationName),i()),h("div",{class:"zonos--total-pay"},h("zonos-text",{type:e},formatCurrency({amount:cartStore.step==="shipping"?n:cartStore.total,currency:cartStore.currency}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosReview.style=zonosReviewCss;var zonosShippingCss=".sc-zonos-shipping-h{font-family:Inter;display:block}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding-right:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";var ZonosShipping=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.handleRadioSelected=function(o){return __awaiter(t,void 0,void 0,(function(){var t,e,s;var n=this;return __generator(this,(function(i){switch(i.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2]}e=((t=cartStore.shippingData)===null||t===void 0?void 0:t.find((function(o){var t;return o.id===((t=n.selectedShippingMethod)===null||t===void 0?void 0:t.value)})))||null;if(!e){return[2]}return[4,cartStoreUpdateSelectedShippingOption(e)];case 1:s=i.sent();if(!s){return[2]}this.disabled=false;return[2]}}))}))};this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnColor=undefined;this.submitBtnType=undefined;this.selectedShippingMethod=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-shipping-info")}};o.prototype.render=function(){var o=this;var t,e;var s=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;var n=(e=cartStore.shippingData)===null||e===void 0?void 0:e.flatMap((function(o){var t,e;var s=cartStoreGetShippingTransitInfo(o),n=s.expectedDate,i=s.maxTransit,a=s.minTransit;var r=n?"".concat(translate("Expected delivery")," ").concat(n):"";var c=a&&i?"(".concat(a,"-").concat(i," ").concat(translate("business days"),")"):"";var l=((e=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(t){var e;return((e=t.landedCost)===null||e===void 0?void 0:e.shipmentRating.id)===o.id})))===null||e===void 0?void 0:e.subtotals.shipping)||0;return{caption:c,label:o.displayName,price:formatCurrency({amount:l,currency:cartStore.currency}),sublabel:r,value:o.id}}));return h(Host,{class:"zonos--shipping zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Shipping information")),h("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},translate("Shipping method")),!(n===null||n===void 0?void 0:n.length)?h("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"}):h("zonos-shipping-rich-radio",{items:n||[],onRadioSelected:function(t){return o.handleRadioSelected(t)}}),cartStore.isSelectedShippingAboveDeminimis&&h("zonos-banner",{intent:"warning"},translate("Above de minimis threshold for")," ",s,"."," ",translate("Duties and taxes will be applied to items and shipping."))),h("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},translate("Go to payment")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosShipping.style=zonosShippingCss;export{ZonosCartItems as zonos_cart_items,ZonosCartSubtotal as zonos_cart_subtotal,ZonosCheckoutFinish as zonos_checkout_finish,ZonosCheckoutPayment as zonos_checkout_payment,ZonosCollapse as zonos_collapse,ZonosCustomerInfo as zonos_customer_info,ZonosDialog as zonos_dialog,ZonosLogo as zonos_logo,ZonosReview as zonos_review,ZonosShipping as zonos_shipping};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,s){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{c(s.next(o))}catch(o){i(o)}}function r(o){try{c(s["throw"](o))}catch(o){i(o)}}function c(o){o.done?e(o.value):n(o.value).then(a,r)}c((s=s.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(t){return c([o,t])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;n=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=t.call(o,e)}catch(o){r=[6,o];n=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,i;s<n;s++){if(i||!(s in t)){if(!i)i=Array.prototype.slice.call(t,0,s);i[s]=t[s]}}return o.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,a as getAssetPath,h,H as Host,F as Fragment,c as createEvent,d as getElement}from"./index-d1aa9293.js";import{c as cartStore,s as stripeStore,l as stripeStoreRetrievePayment,j as stripeStoreReset,m as cartStoreUpdateSelectedShippingOption,n as cartStoreGetShippingTransitInfo}from"./cart-2f83e048.js";import{t as translate}from"./localization-4a424f49.js";import{g as getBorderRadius}from"./getBorderRadius-82fbaf25.js";import{s as submitGtag,i as isCheckoutMobile}from"./submitGtag-fbdb454b.js";import{c as classes}from"./classes-0d95c529.js";import{z as zonosStore}from"./zonosStore-13a7b534.js";import"./isDarkColor-b21326ae.js";var formatCurrency=function(o){var t=o.amount,e=o.currency,s=o.showCurrencyText;return s?"".concat(new Intl.NumberFormat("en-US",{currency:e,style:"currency"}).format(t)," ").concat(e):new Intl.NumberFormat("en-US",{currency:e,style:"currency"}).format(t)};var zonosCartItemsCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";var ZonosCartItems=function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t;var e=getAssetPath("./assets/empty-item.jpeg");var s=((t=cartStore.exchangeRate)===null||t===void 0?void 0:t.rate)||1;return h(Host,{class:"zonos--cart-items zonos--elements"},h("table",{class:"zonos--cart-table"},h("tbody",null,cartStore.items.map((function(t){var n=t.imageUrl;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},n&&!o.errorImages.includes(n)?h("img",{alt:t.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[n],false)},src:t.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:t.name,src:e,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("zonos-text",{type:"label"},t.name)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:t.amount*t.quantity*s,currency:cartStore.currency}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss;var InfoIcon='<svg viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n';var zonosCartSubtotalCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-subtotal-price{text-align:right}";var ZonosCartSubtotal=function(){function o(o){registerInstance(this,o)}o.prototype.render=function(){var o=cartStore.total-cartStore.dutiesTaxFees;var t=function(){if(!cartStore.selectedShippingOption){return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Shipping")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("No shipping method selected")))}return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},cartStore.selectedShippingOption.displayName),cartStore.selectedShippingOptionTransitTime&&h("zonos-text",{class:"zonos--caption",type:"caption"},cartStore.selectedShippingOptionTransitTime," ",translate("business days")))};return h(Host,{class:"zonos--cart-subtotal zonos--elements"},h("table",{class:"zonos--cart-table"},h("tr",{class:"zonos--row zonos--cart-subtotal"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Cart subtotal"))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:cartStore.subtotal,currency:cartStore.currency})))),h("tr",{class:"zonos--row zonos--cart-shipping"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},t()),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.shipping?formatCurrency({amount:cartStore.shipping,currency:cartStore.currency}):"-")),cartStore.step==="payment"&&h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("div",{class:"zonos--title-with-icon"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),h("zonos-icon",{content:InfoIcon,size:16})),!!cartStore.isSelectedShippingAboveDeminimis&&h("zonos-text",{color:"gray-800",type:"body"},translate("Order is over the de minimis threshold for both duty and tax"))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.dutiesTaxFees?formatCurrency({amount:cartStore.dutiesTaxFees,currency:cartStore.currency}):"-",cartStore.isSelectedShippingGuarantee&&h("zonos-badge",null,translate("Guaranteed")))),h("tr",{class:"zonos--row zonos--cart-pay-total"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Order total"))),h("td",{class:"zonos--column"},h("zonos-text",{type:"semiBoldLabel"},formatCurrency({amount:cartStore.step==="shipping"?o:cartStore.total,currency:cartStore.currency}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartSubtotal.style=zonosCartSubtotalCss;var RemoveIcon$1='<svg color="var(--amino-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var SuccessIcon='<svg color="var(--amino-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--amino-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var zonosCheckoutFinishCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";var ZonosCheckoutFinish=function(){function o(o){var t=this;registerInstance(this,o);this.closeClick=createEvent(this,"closeClick",7);this.checkPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,t,e,s;return __generator(this,(function(n){switch(n.label){case 0:this.isLoading=true;o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!(o||this.storybookForceStatus))return[3,2];return[4,stripeStoreRetrievePayment({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:t=n.sent(),e=t.error,s=t.messages;this.notificationType=e?"error":"success";this.notificationMessages=s||[];this.notificationTitle=e?translate("Payment failed"):translate("You're all set!");if(e){submitGtag("zonos-checkout-payment-fail")}else{submitGtag("zonos-checkout-success")}n.label=2;case 2:stripeStoreReset();this.isLoading=false;return[2]}}))}))};this.closeClickHandler=function(){t.closeClick.emit()};this.borderRadius="ROUNDED";this.storybookForceStatus=undefined;this.overrideNotification=undefined;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[]}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;return}void this.checkPaymentStatus()};o.prototype.render=function(){var o=this;return h(Host,{class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":getBorderRadius(this.borderRadius)}},this.isLoading&&h("div",{class:"loading-wrapper"},h("zonos-spinner",null)),!this.isLoading&&h("div",{class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{color:"blue-800",content:SuccessIcon,size:50}):h("zonos-icon",{color:"red-800",content:RemoveIcon$1,size:50}),h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),h("zonos-text",null,this.notificationMessages.map((function(o){return h(Fragment,null,o,h("br",null))}))),h("zonos-button",{onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},translate("Keep shopping"))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCheckoutFinish.style=zonosCheckoutFinishCss;var zonosCheckoutPaymentCss=".sc-zonos-checkout-payment-h{font-family:Inter;display:block}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:0 5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{width:100%}";var ZonosCheckoutPayment=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.paymentError=false;this.submitBtnType=undefined;this.continueLoading=false;this.submitBtnColor=undefined;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-payment-info")}};o.prototype.render=function(){var o=this;var t;if(!stripeStore.stripeElements){return null}this.disabled=!((t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.complete);return h(Host,{class:"zonos--checkout-payment zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),this.paymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},translate("We couldn't complete your payment. Please verify the payment details and try again.")),h("zonos-payment",null)),h("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},"Pay"," ",formatCurrency({amount:cartStore.total,currency:cartStore.currency})))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosCheckoutPayment.style=zonosCheckoutPaymentCss;var zonosCollapseCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapse=function(){function o(o){registerInstance(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var t="".concat(this.collapseSize,"px");return this.collapsed?t:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var t,e,s;(s=(e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("iframe"))===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){o.height=o.el.scrollHeight}))};o.prototype.render=function(){this.height=this.el.scrollHeight;return h(Host,{class:"zonos--elements zonos--collapse",style:{height:this.getElementHeight()}},h("div",null,h("iframe",{class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",null)))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCollapse.style=zonosCollapseCss;var zonosCustomerInfoCss=".sc-zonos-customer-info-h{font-family:Inter;display:block}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:0 5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{width:100%}";var ZonosCustomerInfo=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.defaultAddress=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-customer-info")}};o.prototype.render=function(){var o=this;var t,e;if(!stripeStore.stripeElements){return null}this.disabled=!((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete)||!((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.complete);return h(Host,{class:"zonos--customer-info zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Customer information")),h("zonos-link-authentication",{titleText:translate("Contact")}),h("zonos-address",{defaultAddress:this.defaultAddress,titleText:translate("Address"),type:"shipping"})),h("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},translate("Continue to shipping")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosCustomerInfo.style=zonosCustomerInfoCss;var RemoveIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosDialogCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:1001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:1001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:1002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var ZonosDialog=function(){function o(o){var t=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.footerRightAction=null;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=getBorderRadius(this.borderStyle);return h(Host,{class:classes(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--height":this.height||"initial","--width":this.width}},h("div",{class:"zonos--backdrop"}),h("div",{"aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},h("div",{class:"zonos--dialog"},this.isLoading&&h("div",{class:"zonos--loading"},h("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&h("div",{class:"zonos--header"},this.headerText&&h("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{content:RemoveIcon}),noBackground:true,onClick:this.closeButtonHandler})),h("div",{class:classes(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},h("slot",null)),this.footerRightAction&&h("div",{class:"zonos--footer"},h("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosDialog.style=zonosDialogCss;var zonosLogoCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var ZonosLogo=function(){function o(o){registerInstance(this,o);this.theme="LIGHT";this.width="auto";this.class=""}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{class:classes(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--width":this.width}},h("img",{alt:"Zonos Logo",src:getAssetPath("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosLogo.style=zonosLogoCss;var ChevronDownIcon='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon='<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var zonosReviewCss=":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";var ZonosReview=function(){function o(o){registerInstance(this,o);this.mobile=false;this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var t=this.isMobile?"boldSubheader":"semiBoldLabel";var e=this.isMobile?"boldSubheader":"secondaryPageHeader";var s=this.isMobile?"gray-1200":"gray-800";var n=cartStore.total-cartStore.dutiesTaxFees;var i=function(){if(!o.isMobile){return null}if(!o.collapsed){return h("zonos-icon",{color:"gray-1200",content:ChevronDownIcon})}return h("zonos-icon",{color:"gray-1200",content:ChevronUpIcon})};return h(Host,{class:classes(["zonos--review zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--title"},h("zonos-text",{color:s,type:t},translate("Pay")," ",zonosStore.organizationName),i()),h("div",{class:"zonos--total-pay"},h("zonos-text",{type:e},formatCurrency({amount:cartStore.step==="shipping"?n:cartStore.total,currency:cartStore.currency}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosReview.style=zonosReviewCss;var zonosShippingCss=".sc-zonos-shipping-h{font-family:Inter;display:block}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding-right:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";var ZonosShipping=function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.handleRadioSelected=function(o){return __awaiter(t,void 0,void 0,(function(){var t,e,s;var n=this;return __generator(this,(function(i){switch(i.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2]}e=((t=cartStore.shippingData)===null||t===void 0?void 0:t.find((function(o){var t;return o.id===((t=n.selectedShippingMethod)===null||t===void 0?void 0:t.value)})))||null;if(!e){return[2]}return[4,cartStoreUpdateSelectedShippingOption(e)];case 1:s=i.sent();if(!s){return[2]}this.disabled=false;return[2]}}))}))};this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnColor=undefined;this.submitBtnType=undefined;this.selectedShippingMethod=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){submitGtag("zonos-checkout-shipping-info")}};o.prototype.render=function(){var o=this;var t,e;var s=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;var n=(e=cartStore.shippingData)===null||e===void 0?void 0:e.flatMap((function(o){var t,e;var s=cartStoreGetShippingTransitInfo(o),n=s.expectedDate,i=s.maxTransit,a=s.minTransit;var r=n?"".concat(translate("Expected delivery")," ").concat(n):"";var c=a&&i?"(".concat(a,"-").concat(i," ").concat(translate("business days"),")"):"";var l=((e=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(t){var e;return((e=t.landedCost)===null||e===void 0?void 0:e.shipmentRating.id)===o.id})))===null||e===void 0?void 0:e.subtotals.shipping)||0;return{caption:c,label:o.displayName,price:formatCurrency({amount:l,currency:cartStore.currency}),sublabel:r,value:o.id}}));return h(Host,{class:"zonos--shipping zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Shipping information")),h("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},translate("Shipping method")),!(n===null||n===void 0?void 0:n.length)?h("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"}):h("zonos-shipping-rich-radio",{items:n||[],onRadioSelected:function(t){return o.handleRadioSelected(t)}}),cartStore.isSelectedShippingAboveDeminimis&&h("zonos-banner",{intent:"warning"},translate("Above de minimis threshold for")," ",s,"."," ",translate("Duties and taxes will be applied to items and shipping."))),h("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},translate("Go to payment")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}();ZonosShipping.style=zonosShippingCss;export{ZonosCartItems as zonos_cart_items,ZonosCartSubtotal as zonos_cart_subtotal,ZonosCheckoutFinish as zonos_checkout_finish,ZonosCheckoutPayment as zonos_checkout_payment,ZonosCollapse as zonos_collapse,ZonosCustomerInfo as zonos_customer_info,ZonosDialog as zonos_dialog,ZonosLogo as zonos_logo,ZonosReview as zonos_review,ZonosShipping as zonos_shipping};
|
|
2
2
|
//# sourceMappingURL=zonos-cart-items_10.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["formatCurrency","_d","amount","currency","showCurrencyText","concat","Intl","NumberFormat","style","format","zonosCartItemsCss","ZonosCartItems","prototype","render","_this","this","emptyItemImg","getAssetPath","h","Host","class","cartStore","items","map","item","itemImg","imageUrl","errorImages","includes","alt","name","onError","__spreadArray","src","width","type","quantity","zonosCartSubtotalCss","ZonosCartSubtotal","totalWithoutTaxes","total","dutiesTaxFees","renderShippingInfo","selectedShippingOption","Fragment","translate","displayName","selectedShippingOptionTransitTime","subtotal","shipping","step","content","InfoIcon","size","isSelectedShippingAboveDeminimis","color","isSelectedShippingGuarantee","zonosCheckoutFinishCss","ZonosCheckoutFinish","checkPaymentStatus","__awaiter","isLoading","clientSecret","URLSearchParams","window","location","search","get","stripeStore","stripeStoreRetrievePayment","storybookForceStatus","_e","sent","error","messages","notificationType","notificationMessages","notificationTitle","submitGtag","stripeStoreReset","closeClickHandler","closeClick","emit","class_1","componentDidLoad","overrideNotification","title","getBorderRadius","borderRadius","SuccessIcon","RemoveIcon","message","onClick","variant","zonosCheckoutPaymentCss","ZonosCheckoutPayment","continueClickHandler","continueClicked","watchFormComplete","disabled","stripeElements","_a","stripePaymentEventData","complete","paymentError","intent","backgroundColor","submitBtnColor","loading","continueLoading","submitBtnType","zonosCollapseCss","ZonosCollapse","el","scrollHeight","getElementHeight","fullHeight","height","collapsedHeight","collapseSize","collapsed","componentDidRender","_c","_b","shadowRoot","querySelector","contentWindow","addEventListener","tabindex","zonosCustomerInfoCss","ZonosCustomerInfo","stripeAddressEventData","stripeLinkEventData","titleText","defaultAddress","isDisabled","zonosDialogCss","ZonosDialog","isMobileMode","mobile","innerWidth","closeButtonHandler","closeDialog","clickOutsideDialogHandler","event","target","currentTarget","noClickOutside","handleWindowResize","isMobile","open","document","body","overflow","borderStyle","classes","noBorder","headerText","noCloseButton","icon","noBackground","noBodyPadding","footerRightAction","zonosLogoCss","ZonosLogo","filterColor","theme","zonosReviewCss","ZonosReview","isCheckoutMobile","componentWillLoad","titleTextType","totalTextType","titleTextColor","renderCollapseIcon","ChevronDownIcon","ChevronUpIcon","zonosStore","organizationName","zonosShippingCss","ZonosShipping","handleRadioSelected","e","selectedShippingMethod","detail","shippingData","find","id","value","cartStoreUpdateSelectedShippingOption","updateStatus","class_2","shipToCountry","address","country","serviceLevels","flatMap","cartStoreGetShippingTransitInfo","expectedDate","maxTransit","minTransit","sublabel","caption","shippingAmount","landedCostData","landedCostItem","landedCost","shipmentRating","subtotals","label","price","length","bannerTitle","onRadioSelected"],"sources":["src/components/utils/formatCurrency.ts","src/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.scss?tag=zonos-cart-items&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.tsx","src/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.scss?tag=zonos-cart-subtotal&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.tsx","src/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.scss?tag=zonos-checkout-finish&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.tsx","src/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.scss?tag=zonos-checkout-payment&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.tsx","src/components/common/zonos-collapse/zonos-collapse.scss?tag=zonos-collapse&encapsulation=shadow","src/components/common/zonos-collapse/zonos-collapse.tsx","src/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.scss?tag=zonos-customer-info&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.tsx","src/components/common/zonos-dialog/zonos-dialog.scss?tag=zonos-dialog&encapsulation=shadow","src/components/common/zonos-dialog/zonos-dialog.tsx","src/components/common/zonos-logo/zonos-logo.scss?tag=zonos-logo&encapsulation=shadow","src/components/common/zonos-logo/zonos-logo.tsx","src/components/checkout/zonos-checkout/zonos-review/zonos-review.scss?tag=zonos-review&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-review/zonos-review.tsx","src/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.scss?tag=zonos-shipping&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.tsx"],"sourcesContent":["export const formatCurrency = ({\n amount,\n currency,\n showCurrencyText,\n}: {\n amount: number;\n currency: string;\n showCurrencyText?: boolean;\n}) =>\n showCurrencyText\n ? `${new Intl.NumberFormat('en-US', {\n currency,\n style: 'currency',\n }).format(amount)} ${currency}`\n : new Intl.NumberFormat('en-US', {\n currency,\n style: 'currency',\n }).format(amount);\n",":host {\n .zonos--cart-table {\n width: 100%;\n border: none;\n border-collapse: collapse;\n overflow: auto;\n font-size: $amino-font-size-base;\n .zonos--column {\n padding: $amino-space-8;\n font-size: $amino-font-size-base;\n &:last-child {\n text-align: right;\n }\n &:first-child {\n width: 60px;\n }\n }\n }\n img {\n min-width: 40px;\n }\n}\n","import { Component, getAssetPath, h, Host, State } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-cart-items.scss',\n tag: 'zonos-cart-items',\n})\nexport class ZonosCartItems {\n @State() errorImages: string[] = [];\n\n render() {\n const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');\n return (\n <Host class=\"zonos--cart-items zonos--elements\">\n <table class=\"zonos--cart-table\">\n <tbody>\n {cartStore.items.map(item => {\n const itemImg = item.imageUrl;\n return (\n <tr class=\"zonos--cart-item\">\n <td class=\"zonos--column zonos--cart-item-image\">\n {itemImg && !this.errorImages.includes(itemImg) ? (\n <img\n alt={item.name}\n onError={() => {\n this.errorImages = [...this.errorImages, itemImg];\n }}\n src={item.imageUrl}\n style={{\n 'min-width': '40px',\n }}\n width={40}\n />\n ) : (\n <img alt={item.name} src={emptyItemImg} width={40} />\n )}\n </td>\n <td class=\"zonos--column zonos--cart-item-name\">\n <zonos-text type=\"label\">{item.name}</zonos-text>\n </td>\n <td class=\"zonos--column zonos--cart-item-price\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount: item.amount * item.quantity,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n </Host>\n );\n }\n}\n",":host {\n .zonos--cart-table {\n width: 100%;\n border: none;\n border-collapse: collapse;\n overflow: auto;\n font-size: $amino-font-size-base;\n .zonos--column {\n padding: $amino-space-20 $amino-space-8;\n vertical-align: top;\n &:last-child {\n text-align: right;\n }\n &:first-child {\n width: 60px;\n }\n }\n }\n .zonos--title-with-icon {\n display: flex;\n align-items: center;\n gap: $amino-space-8;\n }\n .zonos--cart-subtotal-title,\n .zonos--cart-subtotal-price {\n border-bottom: 1px solid $amino-gray-200;\n }\n\n .zonos--cart-subtotal-price {\n text-align: right;\n }\n}\n","import { Component, Fragment, h, Host } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n// These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport InfoIcon from './assets/InfoIcon.svg';\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-cart-subtotal.scss',\n tag: 'zonos-cart-subtotal',\n})\nexport class ZonosCartSubtotal {\n render() {\n const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;\n const renderShippingInfo = () => {\n if (!cartStore.selectedShippingOption) {\n return (\n <>\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Shipping')}\n </zonos-text>\n <zonos-text class=\"zonos--caption\" type=\"caption\">\n {translate('No shipping method selected')}\n </zonos-text>\n </>\n );\n }\n return (\n <>\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {cartStore.selectedShippingOption.displayName}\n </zonos-text>\n {cartStore.selectedShippingOptionTransitTime && (\n <zonos-text class=\"zonos--caption\" type=\"caption\">\n {cartStore.selectedShippingOptionTransitTime}{' '}\n {translate('business days')}\n </zonos-text>\n )}\n </>\n );\n };\n return (\n <Host class=\"zonos--cart-subtotal zonos--elements\">\n <table class=\"zonos--cart-table\">\n <tr class=\"zonos--row zonos--cart-subtotal\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n <zonos-text type=\"semiBoldLabel\">\n {translate('Cart subtotal')}\n </zonos-text>\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount: cartStore.subtotal,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n <tr class=\"zonos--row zonos--cart-shipping\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n {renderShippingInfo()}\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n {cartStore.shipping\n ? formatCurrency({\n amount: cartStore.shipping,\n currency: cartStore.currency,\n })\n : '-'}\n </td>\n </tr>\n {/* Only show fee row when step is payment */}\n {cartStore.step === 'payment' && (\n <tr class=\"zonos--row zonos--cart-duties\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n <div class=\"zonos--title-with-icon\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Duties, taxes, and fees')}\n </zonos-text>\n <zonos-icon content={InfoIcon} size={16}></zonos-icon>\n </div>\n {!!cartStore.isSelectedShippingAboveDeminimis && (\n <zonos-text color=\"gray-800\" type=\"body\">\n {translate(\n 'Order is over the de minimis threshold for both duty and tax',\n )}\n </zonos-text>\n )}\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n {cartStore.dutiesTaxFees\n ? formatCurrency({\n amount: cartStore.dutiesTaxFees,\n currency: cartStore.currency,\n })\n : '-'}\n {cartStore.isSelectedShippingGuarantee && (\n <zonos-badge>{translate('Guaranteed')}</zonos-badge>\n )}\n </td>\n </tr>\n )}\n <tr class=\"zonos--row zonos--cart-pay-total\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Order total')}\n </zonos-text>\n </td>\n <td class=\"zonos--column\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount:\n // show total without taxes when step is shipping, show total with taxes when step is payment\n cartStore.step === 'shipping'\n ? totalWithoutTaxes\n : cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n </table>\n </Host>\n );\n }\n}\n","$border-radius: var(--border-radius, 10px);\n\n:host {\n display: flex;\n flex-direction: column;\n .zonos--group {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-bottom: $amino-space-24;\n border-radius: $border-radius;\n gap: $amino-space-24;\n max-width: 360px;\n width: auto;\n margin: auto;\n margin-top: $amino-space-24;\n background-color: $amino-gray-50;\n padding: $amino-space-20;\n }\n zonos-button {\n width: 100%;\n }\n .loading-wrapper {\n min-height: 300px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n Fragment,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport type { PaymentIntent } from '@stripe/stripe-js';\n\nimport {\n stripeStore,\n stripeStoreReset,\n stripeStoreRetrievePayment,\n} from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { getBorderRadius } from 'src/components/utils/getBorderRadius';\nimport { submitGtag } from 'src/components/utils/submitGtag';\nimport type { ElementsUiStyle } from 'src/types';\n\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/RemoveIcon.svg';\n/* Need to use relative import because inline-svg-stencil couldn't resolve absolute path */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport SuccessIcon from './assets/SuccessIcon.svg';\n\ntype OverrideNotification = {\n messages: string[];\n title: string;\n type: 'success' | 'error';\n};\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-checkout-finish.scss',\n tag: 'zonos-checkout-finish',\n})\nexport class ZonosCheckoutFinish {\n /**\n * The border radius style of the dialog\n */\n @Prop() borderRadius: ElementsUiStyle = 'ROUNDED';\n\n /**\n * Force status to test the UI for storybook\n */\n @Prop() storybookForceStatus?: PaymentIntent['status'];\n\n /**\n * Override the notification message and title, bypass checking stripe payment status\n *\n */\n @Prop() overrideNotification?: OverrideNotification;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() closeClick!: EventEmitter<void>;\n\n @State() isLoading: boolean = true;\n @State() notificationType: 'success' | 'error' = 'success';\n @State() notificationTitle: string = '';\n @State() notificationMessages: string[] = [];\n\n private checkPaymentStatus = async () => {\n this.isLoading = true;\n const clientSecret =\n new URLSearchParams(window.location.search).get(\n 'payment_intent_client_secret',\n ) || stripeStore.clientSecret;\n if (clientSecret) {\n const { error, messages } = await stripeStoreRetrievePayment({\n clientSecret,\n storybookForceStatus: this.storybookForceStatus,\n });\n this.notificationType = error ? 'error' : 'success';\n this.notificationMessages = messages || [];\n this.notificationTitle = error\n ? translate('Payment failed')\n : translate(\"You're all set!\");\n\n if (error) {\n submitGtag('zonos-checkout-payment-fail');\n } else {\n submitGtag('zonos-checkout-success');\n }\n }\n stripeStoreReset();\n this.isLoading = false;\n };\n\n private closeClickHandler = () => {\n this.closeClick.emit();\n };\n\n componentDidLoad() {\n if (this.overrideNotification) {\n // just show the notification and don't check any of the payment status\n this.notificationType = this.overrideNotification.type;\n this.notificationTitle = this.overrideNotification.title;\n this.notificationMessages = this.overrideNotification.messages;\n return;\n }\n void this.checkPaymentStatus();\n }\n\n render() {\n return (\n <Host\n class=\"zonos--checkout-finish zonos--elements\"\n style={{\n '--border-radius': getBorderRadius(this.borderRadius),\n }}\n >\n {this.isLoading && (\n <div class=\"loading-wrapper\">\n <zonos-spinner></zonos-spinner>\n </div>\n )}\n {!this.isLoading && (\n <div class=\"zonos--group\">\n {this.notificationType === 'success' ? (\n <zonos-icon\n color={'blue-800'}\n content={SuccessIcon}\n size={50}\n ></zonos-icon>\n ) : (\n <zonos-icon\n color={'red-800'}\n content={RemoveIcon}\n size={50}\n ></zonos-icon>\n )}\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {this.notificationTitle}\n </zonos-text>\n <zonos-text>\n {this.notificationMessages.map(message => (\n <>\n {message}\n <br />\n </>\n ))}\n </zonos-text>\n <zonos-button\n onClick={() => this.closeClickHandler()}\n size=\"md\"\n variant=\"primary\"\n >\n {translate('Keep shopping')}\n </zonos-button>\n </div>\n )}\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n .zonos--title {\n margin-bottom: $amino-space-24;\n }\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding: 0 5px;\n\n @include zonos--scrollbar;\n }\n\n .zonos--payment-error-banner {\n margin-bottom: $amino-space-8;\n }\n\n zonos-button {\n width: 100%;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { stripeStore } from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\nimport { submitGtag } from 'src/components/utils/submitGtag';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-checkout-payment.scss',\n tag: 'zonos-checkout-payment',\n})\nexport class ZonosCheckoutPayment {\n /**\n * Error occurred during payment\n */\n @Prop() paymentError: boolean = false;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-payment-info');\n }\n }\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n if (!stripeStore.stripeElements) {\n return null;\n }\n\n this.disabled = !stripeStore.stripePaymentEventData?.complete;\n\n return (\n <Host class=\"zonos--checkout-payment zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Payment method')}\n </zonos-text>\n {this.paymentError && (\n <zonos-banner class=\"zonos--payment-error-banner\" intent=\"error\">\n {translate(\n \"We couldn't complete your payment. Please verify the payment details and try again.\",\n )}\n </zonos-banner>\n )}\n <zonos-payment></zonos-payment>\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n is-disabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n Pay{' '}\n {formatCurrency({\n amount: cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-button>\n </Host>\n );\n }\n}\n",":host {\n transition: all 0.3s ease-in-out;\n overflow: hidden;\n div {\n position: relative;\n }\n iframe {\n width: 0;\n height: 100%;\n position: absolute;\n top: 0;\n border: 0;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { Element, Host, State } from '@stencil/core/internal';\n\n@Component({\n shadow: true,\n styleUrl: 'zonos-collapse.scss',\n tag: 'zonos-collapse',\n})\nexport class ZonosCollapse {\n /**\n * Collapsed state of the element\n */\n @Prop() collapsed: boolean = false;\n /**\n * Collapsed size when collapsed\n */\n @Prop() collapseSize: number = 0;\n\n @Element() el!: HTMLZonosCollapseElement;\n\n @State() height: number = this.el.scrollHeight;\n\n private getElementHeight() {\n const fullHeight = `${this.height}px`;\n const collapsedHeight = `${this.collapseSize}px`;\n return this.collapsed ? collapsedHeight : fullHeight;\n }\n\n componentDidLoad() {\n this.height = this.el.scrollHeight;\n }\n\n componentDidRender() {\n this.el.shadowRoot\n ?.querySelector('iframe')\n ?.contentWindow?.addEventListener('resize', () => {\n this.height = this.el.scrollHeight;\n });\n }\n\n render() {\n this.height = this.el.scrollHeight;\n return (\n <Host\n class={'zonos--elements zonos--collapse'}\n style={{\n height: this.getElementHeight(),\n }}\n >\n <div>\n <iframe\n class=\"height-change-listener\"\n tabindex=\"-1\"\n title=\"collapse-height-change-listener\"\n ></iframe>\n <slot />\n </div>\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .zonos--title {\n margin-bottom: $amino-space-20;\n }\n .zonos--link-authentication {\n margin-bottom: $amino-space-32;\n }\n\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding: 0 5px;\n\n @include zonos--scrollbar;\n }\n\n zonos-button {\n width: 100%;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport {\n type ContactOption,\n stripeStore,\n} from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { submitGtag } from 'src/components/utils/submitGtag';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-customer-info.scss',\n tag: 'zonos-customer-info',\n})\nexport class ZonosCustomerInfo {\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Default address to use for the checkout (preview mode)\n */\n @Prop() defaultAddress: ContactOption | null = null;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-customer-info');\n }\n }\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n if (!stripeStore.stripeElements) {\n return null;\n }\n // make sure data is valid\n this.disabled =\n !stripeStore.stripeAddressEventData?.complete ||\n !stripeStore.stripeLinkEventData?.complete;\n\n return (\n <Host class=\"zonos--customer-info zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Customer information')}\n </zonos-text>\n <zonos-link-authentication\n titleText={translate('Contact')}\n ></zonos-link-authentication>\n <zonos-address\n defaultAddress={this.defaultAddress}\n titleText={translate('Address')}\n type=\"shipping\"\n ></zonos-address>\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n isDisabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n {translate('Continue to shipping')}\n </zonos-button>\n </Host>\n );\n }\n}\n","$border-radius: var(--border-radius, $amino-radius-10);\n$height: var(--height, auto);\n$width: var(--width, auto);\n\n:host {\n .zonos--backdrop,\n .zonos--dialog-layout {\n opacity: 0;\n z-index: -999;\n visibility: hidden;\n transition: 0.3s all ease;\n }\n // close by default\n .zonos--backdrop {\n width: 100vw;\n height: 100vh;\n left: 0px;\n top: 0px;\n background: $amino-backdrop-color;\n z-index: -999;\n opacity: 0;\n visibility: hidden;\n position: fixed;\n }\n .zonos--loading {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1002;\n background: white;\n }\n\n // close by default\n .zonos--dialog-layout {\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n color: $amino-text-color;\n visibility: hidden;\n }\n\n .zonos--dialog {\n position: relative;\n z-index: 1001;\n background: $amino-gray-0;\n max-width: calc(90vw);\n max-height: 90vh;\n min-height: 500px;\n height: $height;\n width: $width;\n border-radius: $border-radius;\n outline: none;\n box-shadow: $amino-v3-shadow-xxl;\n border: $amino-border;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .zonos--header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: $amino-space-16 $amino-space-24;\n\n .-zonos-stencil-library--header-text {\n flex-grow: 1;\n }\n\n .zonos--close-button {\n width: $amino-size-md;\n height: $amino-size-md;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: $amino-radius-10;\n &:hover {\n background: $amino-hover-color;\n }\n }\n }\n\n .zonos--body {\n padding: $amino-space-8 $amino-space-24;\n max-height: 100%;\n height: 100%;\n overflow: auto;\n &.zonos--no-body-padding {\n padding: 0;\n }\n }\n\n .zonos--footer {\n padding: $amino-space-16 $amino-space-24;\n }\n}\n\n:host(.open) {\n .zonos--dialog-layout,\n .zonos--backdrop {\n visibility: visible;\n }\n .zonos--backdrop {\n z-index: 1001;\n opacity: 0.65;\n }\n .zonos--dialog-layout {\n opacity: 1;\n z-index: 1002;\n transform: scale(1);\n }\n}\n\n:host(.no-border) {\n .zonos--dialog {\n border: none;\n }\n}\n\n:host(.mobile) {\n .zonos--dialog {\n max-width: 100vw;\n max-height: 100vh;\n height: 100%;\n width: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\n\nimport { classes } from 'src/components/utils/classes';\nimport { getBorderRadius } from 'src/components/utils/getBorderRadius';\nimport type { ElementsUiStyle } from 'src/types';\n\n/** These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/removeIcon.svg';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-dialog.scss',\n tag: 'zonos-dialog',\n})\nexport class ZonosDialog {\n /**\n * Whether or not the dialog is open\n * @default false\n */\n @Prop() open: boolean = false;\n /**\n * The header text for the dialog\n */\n @Prop() headerText: string = '';\n /**\n * The width of the dialog\n * @default 460px\n */\n @Prop() width: string = '460px';\n /**\n * The height of the dialog (max-wdith still 90vh)\n */\n @Prop() height?: string;\n /**\n * Whether or not to show the header\n * @default false\n */\n @Prop() noHeader: boolean = false;\n\n /**\n * Whether or not to have body padding\n * @default false\n */\n @Prop() noBodyPadding: boolean = false;\n\n /**\n * Whether or not to have body padding\n * @default false\n */\n @Prop() noBorder: boolean = false;\n\n /**\n * The right area for the action in the footer\n * @default null\n */\n @Prop() footerRightAction: HTMLElement | null = null;\n\n /**\n * The border style of the button\n * @default ROUNDED\n */\n @Prop() borderStyle?: ElementsUiStyle;\n\n /**\n * Close dialog button click\n */\n // @Prop() onCloseDialog!: () => void;\n\n /**\n * Whether or not to show the close button\n * @default false\n */\n @Prop() noCloseButton: boolean = false;\n\n /**\n * Whether or not to close the dialog when clicking outside of it\n * @default false\n */\n @Prop() noClickOutside: boolean = false;\n\n /**\n * Flag to determine if the checkout is on mobile\n */\n @Prop() mobile: boolean = false;\n\n /**\n * Load loading spinner for the dialog or not\n */\n @Prop() isLoading: boolean = true;\n\n @State() isMobile: boolean = false;\n\n /**\n * Close dialog button click\n */\n @Event() closeDialog!: EventEmitter<void>;\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n this.isMobile = this.isMobileMode();\n }\n\n private isMobileMode = () => {\n return this.mobile || window.innerWidth <= 768;\n };\n\n private closeButtonHandler = () => {\n this.closeDialog.emit();\n };\n\n private clickOutsideDialogHandler = (event: MouseEvent) => {\n if (event.target === event.currentTarget && !this.noClickOutside) {\n this.closeDialog.emit();\n }\n };\n\n componentDidLoad() {\n this.isMobile = this.isMobileMode();\n }\n\n render() {\n // disable scroll on the body when dialog is open\n if (this.open) {\n document.body.style.overflow = 'hidden';\n } else {\n document.body.style.overflow = 'auto';\n }\n\n const borderStyle = getBorderRadius(this.borderStyle);\n return (\n <Host\n class={classes([\n 'zonos--elements',\n this.open && 'open',\n this.isLoading && 'is-loading',\n this.noBorder && 'no-border',\n this.isMobile && 'mobile',\n ])}\n style={{\n '--border-radius': borderStyle,\n '--height': this.height || 'initial',\n '--width': this.width,\n }}\n >\n <div class=\"zonos--backdrop\"></div>\n <div\n aria-hidden=\"true\"\n class=\"zonos--dialog-layout\"\n onClick={this.clickOutsideDialogHandler}\n >\n <div class=\"zonos--dialog\">\n {this.isLoading && (\n <div class=\"zonos--loading\">\n <zonos-spinner size={30}></zonos-spinner>\n </div>\n )}\n {(this.headerText || !this.noCloseButton) && (\n <div class=\"zonos--header\">\n {this.headerText && (\n <h3 class=\"zonos--header-text\">{this.headerText}</h3>\n )}\n {!this.noCloseButton && (\n <zonos-button\n class=\"zonos--close-button\"\n icon={<zonos-icon content={RemoveIcon}></zonos-icon>}\n noBackground\n onClick={this.closeButtonHandler}\n ></zonos-button>\n )}\n </div>\n )}\n <div\n class={classes([\n 'zonos--body',\n this.noBodyPadding && 'zonos--no-body-padding',\n ])}\n >\n <slot />\n </div>\n {this.footerRightAction && (\n <div class=\"zonos--footer\">\n <div class=\"zonos--footer-right-action\">\n {this.footerRightAction}\n </div>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n","$filter-color: var(--filter-color);\n$width: var(--width);\n\n:host {\n display: inline-flex;\n img {\n filter: $filter-color;\n width: $width;\n }\n}\n","import { Component, getAssetPath, h, Host, Prop } from '@stencil/core';\n\nimport { classes } from 'src/components/utils/classes';\nimport type { ElementsUiTheme } from 'src/types';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-logo.scss',\n tag: 'zonos-logo',\n})\nexport class ZonosLogo {\n /**\n * Theme to change the color of the logo\n */\n @Prop() theme: ElementsUiTheme = 'LIGHT';\n\n /**\n * The width of the logo\n */\n @Prop() width: string = 'auto';\n\n /**\n * css class for the component\n */\n @Prop() class: string = '';\n\n render() {\n const filterColor =\n this.theme === 'DARK'\n ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'\n : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';\n\n return (\n <Host\n class={classes(['zonos--elements zonos--logo', this.class])}\n style={{\n '--filter-color': filterColor,\n '--width': this.width,\n }}\n >\n <img alt=\"Zonos Logo\" src={getAssetPath('./assets/ZonosLogo.png')} />\n </Host>\n );\n }\n}\n",":host {\n .zonos--total-pay {\n margin: $amino-space-16 0 $amino-space-32;\n }\n}\n\n:host(.mobile) {\n @include checkout-review-mobile;\n}\n","import { Component, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { translate } from 'src/components/store/translationStore';\nimport { zonosStore } from 'src/components/store/zonosStore';\nimport { isCheckoutMobile } from 'src/components/utils/checkout/isCheckoutMobile';\nimport { classes } from 'src/components/utils/classes';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n/** These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport ChevronDownIcon from './assets/ChevronDownIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport ChevronUpIcon from './assets/ChevronUpIcon.svg';\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-review.scss',\n tag: 'zonos-review',\n})\nexport class ZonosReview {\n /**\n * Whether or not the component is being rendered with mobile styles\n */\n @Prop() mobile: boolean = false;\n\n /**\n * Whether or not to show the collapse icon\n * This is controled from the collapsed state of the zonos-collapse component\n * to show the collapse icon\n */\n @Prop() collapsed: boolean = false;\n\n @State() isMobile: boolean = false;\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n this.isMobile = isCheckoutMobile(this.mobile);\n }\n\n componentWillLoad() {\n this.isMobile = isCheckoutMobile(this.mobile);\n }\n\n render() {\n const titleTextType = this.isMobile ? 'boldSubheader' : 'semiBoldLabel';\n const totalTextType = this.isMobile\n ? 'boldSubheader'\n : 'secondaryPageHeader';\n\n const titleTextColor = this.isMobile ? 'gray-1200' : 'gray-800';\n const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;\n const renderCollapseIcon = () => {\n // only display the collapse icon if the component is being rendered with mobile styles\n if (!this.isMobile) {\n return null;\n }\n\n if (!this.collapsed) {\n return (\n <zonos-icon color=\"gray-1200\" content={ChevronDownIcon}></zonos-icon>\n );\n }\n return (\n <zonos-icon color=\"gray-1200\" content={ChevronUpIcon}></zonos-icon>\n );\n };\n return (\n <Host\n class={classes([\n 'zonos--review zonos--elements',\n this.isMobile && 'mobile',\n ])}\n >\n <div class=\"zonos--title\">\n <zonos-text color={titleTextColor} type={titleTextType}>\n {translate('Pay')} {zonosStore.organizationName}\n </zonos-text>\n {renderCollapseIcon()}\n </div>\n <div class=\"zonos--total-pay\">\n <zonos-text type={totalTextType}>\n {formatCurrency({\n amount:\n // show total without taxes when step is shipping, show total with taxes when step is payment\n cartStore.step === 'shipping'\n ? totalWithoutTaxes\n : cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </div>\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .zonos--title {\n margin-bottom: $amino-space-24;\n }\n .zonos--shipping-method-title {\n margin-bottom: $amino-space-16;\n }\n\n .zonos-shipping-rich-radio {\n margin-bottom: $amino-space-24;\n }\n\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding-right: 5px;\n\n @include zonos--scrollbar;\n }\n\n zonos-button {\n width: 100%;\n }\n zonos-banner {\n margin-top: $amino-space-24;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport {\n cartStore,\n cartStoreGetShippingTransitInfo,\n cartStoreUpdateSelectedShippingOption,\n} from 'src/components/store/checkout/cart';\nimport { stripeStore } from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\nimport { submitGtag } from 'src/components/utils/submitGtag';\nimport type { ShippingRichRadioItem } from 'src/types';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-shipping.scss',\n tag: 'zonos-shipping',\n})\nexport class ZonosShipping {\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n @State() selectedShippingMethod: ShippingRichRadioItem | null = null;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-shipping-info');\n }\n }\n\n private handleRadioSelected = async (\n e: CustomEvent<ShippingRichRadioItem>,\n ) => {\n this.selectedShippingMethod = e.detail;\n if (!this.selectedShippingMethod) {\n return;\n }\n\n const selectedShippingOption =\n cartStore.shippingData?.find(\n item => item.id === this.selectedShippingMethod?.value,\n ) || null;\n if (!selectedShippingOption) {\n return;\n }\n\n // save selected shipping option to store\n const updateStatus = await cartStoreUpdateSelectedShippingOption(\n selectedShippingOption,\n );\n if (!updateStatus) {\n return;\n }\n\n this.disabled = false;\n };\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n const shipToCountry =\n stripeStore.stripeAddressEventData?.value.address.country;\n\n const serviceLevels = cartStore.shippingData?.flatMap(\n (item): ShippingRichRadioItem => {\n const { expectedDate, maxTransit, minTransit } =\n cartStoreGetShippingTransitInfo(item);\n const sublabel = expectedDate\n ? `${translate('Expected delivery')} ${expectedDate}`\n : '';\n const caption =\n minTransit && maxTransit\n ? `(${minTransit}-${maxTransit} ${translate('business days')})`\n : '';\n const shippingAmount =\n cartStore.landedCostData?.find(\n landedCostItem =>\n landedCostItem.landedCost?.shipmentRating.id === item.id,\n )?.subtotals.shipping || 0;\n return {\n caption,\n label: item.displayName,\n price: formatCurrency({\n amount: shippingAmount,\n currency: cartStore.currency,\n }),\n sublabel,\n value: item.id,\n };\n },\n );\n return (\n <Host class=\"zonos--shipping zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Shipping information')}\n </zonos-text>\n <zonos-text class=\"zonos--shipping-method-title\" type=\"semiBoldLabel\">\n {translate('Shipping method')}\n </zonos-text>\n {!serviceLevels?.length ? (\n <zonos-banner\n bannerTitle=\"No shipping methods found - try editing your address or contacting support if the error persists\"\n intent=\"error\"\n ></zonos-banner>\n ) : (\n <zonos-shipping-rich-radio\n items={serviceLevels || []}\n onRadioSelected={e => this.handleRadioSelected(e)}\n ></zonos-shipping-rich-radio>\n )}\n\n {cartStore.isSelectedShippingAboveDeminimis && (\n <zonos-banner intent=\"warning\">\n {translate('Above de minimis threshold for')} {shipToCountry}.{' '}\n {translate(\n 'Duties and taxes will be applied to items and shipping.',\n )}\n </zonos-banner>\n )}\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n is-disabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n {translate('Go to payment')}\n </zonos-button>\n </Host>\n );\n }\n}\n"],"mappings":"q1EAAO,IAAMA,eAAiB,SAACC,G,IAC7BC,EAAMD,EAAAC,OACNC,EAAQF,EAAAE,SACRC,EAAgBH,EAAAG,iBAMhB,OAAAA,EACI,GAAAC,OAAG,IAAIC,KAAKC,aAAa,QAAS,CAChCJ,SAAQA,EACRK,MAAO,aACNC,OAAOP,GAAO,KAAAG,OAAIF,GACrB,IAAIG,KAAKC,aAAa,QAAS,CAC7BJ,SAAQA,EACRK,MAAO,aACNC,OAAOP,EARd,ECTF,IAAMQ,kBAAoB,0oB,ICWbC,eAAc,W,wDACQ,E,CAEjCA,EAAAC,UAAAC,OAAA,eAAAC,EAAAC,KACE,IAAMC,EAAeC,aAAa,4BAClC,OACEC,EAACC,KAAI,CAACC,MAAM,qCACVF,EAAA,SAAOE,MAAM,qBACXF,EAAA,aACGG,UAAUC,MAAMC,KAAI,SAAAC,GACnB,IAAMC,EAAUD,EAAKE,SACrB,OACER,EAAA,MAAIE,MAAM,oBACRF,EAAA,MAAIE,MAAM,wCACPK,IAAYX,EAAKa,YAAYC,SAASH,GACrCP,EAAA,OACEW,IAAKL,EAAKM,KACVC,QAAS,WACPjB,EAAKa,YAAWK,4BAAA,GAAOlB,EAAKa,YAAW,OAAEF,GAA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QACfjM,EAAA,gBACEkM,YAAY,mGACZ3G,OAAO,UAGTvF,EAAA,6BACEI,MAAO6K,GAAiB,GACxBkB,gBAAiB,SAAA/B,GAAK,OAAAxK,EAAKuK,oBAAoBC,EAAzB,IAIzBjK,UAAUiC,kCACTpC,EAAA,gBAAcuF,OAAO,WAClB5D,UAAU,kCAAiC,IAAGmJ,EAAa,IAAG,IAC9DnJ,UACC,6DAKR3B,EAAA,gBACEwF,gBAAiB3F,KAAK4F,eAAc,cACvB5F,KAAKoF,SAClBS,QAAS7F,KAAK8F,gBACdjB,QAAS,WAAM,OAAA9E,EAAKkF,sBAAL,EACf3C,KAAK,KAELwC,QAAS9E,KAAK+F,eAEbjE,UAAU,kB,2IA9IK,G"}
|
|
1
|
+
{"version":3,"names":["formatCurrency","_d","amount","currency","showCurrencyText","concat","Intl","NumberFormat","style","format","zonosCartItemsCss","ZonosCartItems","prototype","render","_this","this","emptyItemImg","getAssetPath","rate","_a","cartStore","exchangeRate","h","Host","class","items","map","item","itemImg","imageUrl","errorImages","includes","alt","name","onError","__spreadArray","src","width","type","quantity","zonosCartSubtotalCss","ZonosCartSubtotal","totalWithoutTaxes","total","dutiesTaxFees","renderShippingInfo","selectedShippingOption","Fragment","translate","displayName","selectedShippingOptionTransitTime","subtotal","shipping","step","content","InfoIcon","size","isSelectedShippingAboveDeminimis","color","isSelectedShippingGuarantee","zonosCheckoutFinishCss","ZonosCheckoutFinish","checkPaymentStatus","__awaiter","isLoading","clientSecret","URLSearchParams","window","location","search","get","stripeStore","storybookForceStatus","stripeStoreRetrievePayment","_e","sent","error","messages","notificationType","notificationMessages","notificationTitle","submitGtag","stripeStoreReset","closeClickHandler","closeClick","emit","class_1","componentDidLoad","overrideNotification","title","getBorderRadius","borderRadius","SuccessIcon","RemoveIcon","message","onClick","variant","zonosCheckoutPaymentCss","ZonosCheckoutPayment","continueClickHandler","continueClicked","watchFormComplete","disabled","stripeElements","stripePaymentEventData","complete","paymentError","intent","backgroundColor","submitBtnColor","loading","continueLoading","submitBtnType","zonosCollapseCss","ZonosCollapse","el","scrollHeight","getElementHeight","fullHeight","height","collapsedHeight","collapseSize","collapsed","componentDidRender","_c","_b","shadowRoot","querySelector","contentWindow","addEventListener","tabindex","zonosCustomerInfoCss","ZonosCustomerInfo","stripeAddressEventData","stripeLinkEventData","titleText","defaultAddress","isDisabled","zonosDialogCss","ZonosDialog","isMobileMode","mobile","innerWidth","closeButtonHandler","closeDialog","clickOutsideDialogHandler","event","target","currentTarget","noClickOutside","handleWindowResize","isMobile","open","document","body","overflow","borderStyle","classes","noBorder","headerText","noCloseButton","icon","noBackground","noBodyPadding","footerRightAction","zonosLogoCss","ZonosLogo","filterColor","theme","zonosReviewCss","ZonosReview","isCheckoutMobile","componentWillLoad","titleTextType","totalTextType","titleTextColor","renderCollapseIcon","ChevronDownIcon","ChevronUpIcon","zonosStore","organizationName","zonosShippingCss","ZonosShipping","handleRadioSelected","e","selectedShippingMethod","detail","shippingData","find","id","value","cartStoreUpdateSelectedShippingOption","updateStatus","class_2","shipToCountry","address","country","serviceLevels","flatMap","cartStoreGetShippingTransitInfo","expectedDate","maxTransit","minTransit","sublabel","caption","shippingAmount","landedCostData","landedCostItem","landedCost","shipmentRating","subtotals","label","price","length","bannerTitle","onRadioSelected"],"sources":["src/components/utils/formatCurrency.ts","src/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.scss?tag=zonos-cart-items&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.tsx","src/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.scss?tag=zonos-cart-subtotal&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.tsx","src/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.scss?tag=zonos-checkout-finish&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.tsx","src/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.scss?tag=zonos-checkout-payment&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.tsx","src/components/common/zonos-collapse/zonos-collapse.scss?tag=zonos-collapse&encapsulation=shadow","src/components/common/zonos-collapse/zonos-collapse.tsx","src/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.scss?tag=zonos-customer-info&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.tsx","src/components/common/zonos-dialog/zonos-dialog.scss?tag=zonos-dialog&encapsulation=shadow","src/components/common/zonos-dialog/zonos-dialog.tsx","src/components/common/zonos-logo/zonos-logo.scss?tag=zonos-logo&encapsulation=shadow","src/components/common/zonos-logo/zonos-logo.tsx","src/components/checkout/zonos-checkout/zonos-review/zonos-review.scss?tag=zonos-review&encapsulation=shadow","src/components/checkout/zonos-checkout/zonos-review/zonos-review.tsx","src/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.scss?tag=zonos-shipping&encapsulation=scoped","src/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.tsx"],"sourcesContent":["export const formatCurrency = ({\n amount,\n currency,\n showCurrencyText,\n}: {\n amount: number;\n currency: string;\n showCurrencyText?: boolean;\n}) =>\n showCurrencyText\n ? `${new Intl.NumberFormat('en-US', {\n currency,\n style: 'currency',\n }).format(amount)} ${currency}`\n : new Intl.NumberFormat('en-US', {\n currency,\n style: 'currency',\n }).format(amount);\n",":host {\n .zonos--cart-table {\n width: 100%;\n border: none;\n border-collapse: collapse;\n overflow: auto;\n font-size: $amino-font-size-base;\n .zonos--column {\n padding: $amino-space-8;\n font-size: $amino-font-size-base;\n &:last-child {\n text-align: right;\n }\n &:first-child {\n width: 60px;\n }\n }\n }\n img {\n min-width: 40px;\n }\n}\n","import { Component, getAssetPath, h, Host, State } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-cart-items.scss',\n tag: 'zonos-cart-items',\n})\nexport class ZonosCartItems {\n @State() errorImages: string[] = [];\n\n render() {\n const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');\n const rate = cartStore.exchangeRate?.rate || 1;\n return (\n <Host class=\"zonos--cart-items zonos--elements\">\n <table class=\"zonos--cart-table\">\n <tbody>\n {cartStore.items.map(item => {\n const itemImg = item.imageUrl;\n return (\n <tr class=\"zonos--cart-item\">\n <td class=\"zonos--column zonos--cart-item-image\">\n {itemImg && !this.errorImages.includes(itemImg) ? (\n <img\n alt={item.name}\n onError={() => {\n this.errorImages = [...this.errorImages, itemImg];\n }}\n src={item.imageUrl}\n style={{\n 'min-width': '40px',\n }}\n width={40}\n />\n ) : (\n <img alt={item.name} src={emptyItemImg} width={40} />\n )}\n </td>\n <td class=\"zonos--column zonos--cart-item-name\">\n <zonos-text type=\"label\">{item.name}</zonos-text>\n </td>\n <td class=\"zonos--column zonos--cart-item-price\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount: item.amount * item.quantity * rate,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n </Host>\n );\n }\n}\n",":host {\n .zonos--cart-table {\n width: 100%;\n border: none;\n border-collapse: collapse;\n overflow: auto;\n font-size: $amino-font-size-base;\n .zonos--column {\n padding: $amino-space-20 $amino-space-8;\n vertical-align: top;\n &:last-child {\n text-align: right;\n }\n &:first-child {\n width: 60px;\n }\n }\n }\n .zonos--title-with-icon {\n display: flex;\n align-items: center;\n gap: $amino-space-8;\n }\n .zonos--cart-subtotal-title,\n .zonos--cart-subtotal-price {\n border-bottom: 1px solid $amino-gray-200;\n }\n\n .zonos--cart-subtotal-price {\n text-align: right;\n }\n}\n","import { Component, Fragment, h, Host } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n// These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport InfoIcon from './assets/InfoIcon.svg';\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-cart-subtotal.scss',\n tag: 'zonos-cart-subtotal',\n})\nexport class ZonosCartSubtotal {\n render() {\n const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;\n const renderShippingInfo = () => {\n if (!cartStore.selectedShippingOption) {\n return (\n <>\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Shipping')}\n </zonos-text>\n <zonos-text class=\"zonos--caption\" type=\"caption\">\n {translate('No shipping method selected')}\n </zonos-text>\n </>\n );\n }\n return (\n <>\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {cartStore.selectedShippingOption.displayName}\n </zonos-text>\n {cartStore.selectedShippingOptionTransitTime && (\n <zonos-text class=\"zonos--caption\" type=\"caption\">\n {cartStore.selectedShippingOptionTransitTime}{' '}\n {translate('business days')}\n </zonos-text>\n )}\n </>\n );\n };\n return (\n <Host class=\"zonos--cart-subtotal zonos--elements\">\n <table class=\"zonos--cart-table\">\n <tr class=\"zonos--row zonos--cart-subtotal\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n <zonos-text type=\"semiBoldLabel\">\n {translate('Cart subtotal')}\n </zonos-text>\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount: cartStore.subtotal,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n <tr class=\"zonos--row zonos--cart-shipping\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n {renderShippingInfo()}\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n {cartStore.shipping\n ? formatCurrency({\n amount: cartStore.shipping,\n currency: cartStore.currency,\n })\n : '-'}\n </td>\n </tr>\n {/* Only show fee row when step is payment */}\n {cartStore.step === 'payment' && (\n <tr class=\"zonos--row zonos--cart-duties\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column zonos--cart-subtotal-title\">\n <div class=\"zonos--title-with-icon\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Duties, taxes, and fees')}\n </zonos-text>\n <zonos-icon content={InfoIcon} size={16}></zonos-icon>\n </div>\n {!!cartStore.isSelectedShippingAboveDeminimis && (\n <zonos-text color=\"gray-800\" type=\"body\">\n {translate(\n 'Order is over the de minimis threshold for both duty and tax',\n )}\n </zonos-text>\n )}\n </td>\n <td class=\"zonos--column zonos--cart-subtotal-price\">\n {cartStore.dutiesTaxFees\n ? formatCurrency({\n amount: cartStore.dutiesTaxFees,\n currency: cartStore.currency,\n })\n : '-'}\n {cartStore.isSelectedShippingGuarantee && (\n <zonos-badge>{translate('Guaranteed')}</zonos-badge>\n )}\n </td>\n </tr>\n )}\n <tr class=\"zonos--row zonos--cart-pay-total\">\n <td class=\"zonos--column\"></td>\n <td class=\"zonos--column\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldLabel\">\n {translate('Order total')}\n </zonos-text>\n </td>\n <td class=\"zonos--column\">\n <zonos-text type=\"semiBoldLabel\">\n {formatCurrency({\n amount:\n // show total without taxes when step is shipping, show total with taxes when step is payment\n cartStore.step === 'shipping'\n ? totalWithoutTaxes\n : cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </td>\n </tr>\n </table>\n </Host>\n );\n }\n}\n","$border-radius: var(--border-radius, 10px);\n\n:host {\n display: flex;\n flex-direction: column;\n .zonos--group {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-bottom: $amino-space-24;\n border-radius: $border-radius;\n gap: $amino-space-24;\n max-width: 360px;\n width: auto;\n margin: auto;\n margin-top: $amino-space-24;\n background-color: $amino-gray-50;\n padding: $amino-space-20;\n }\n zonos-button {\n width: 100%;\n }\n .loading-wrapper {\n min-height: 300px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n Fragment,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\nimport type { PaymentIntent } from '@stripe/stripe-js';\n\nimport {\n stripeStore,\n stripeStoreReset,\n stripeStoreRetrievePayment,\n} from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { getBorderRadius } from 'src/components/utils/getBorderRadius';\nimport { submitGtag } from 'src/components/utils/submitGtag';\nimport type { ElementsUiStyle } from 'src/types';\n\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/RemoveIcon.svg';\n/* Need to use relative import because inline-svg-stencil couldn't resolve absolute path */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport SuccessIcon from './assets/SuccessIcon.svg';\n\ntype OverrideNotification = {\n messages: string[];\n title: string;\n type: 'success' | 'error';\n};\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-checkout-finish.scss',\n tag: 'zonos-checkout-finish',\n})\nexport class ZonosCheckoutFinish {\n /**\n * The border radius style of the dialog\n */\n @Prop() borderRadius: ElementsUiStyle = 'ROUNDED';\n\n /**\n * Force status to test the UI for storybook\n */\n @Prop() storybookForceStatus?: PaymentIntent['status'];\n\n /**\n * Override the notification message and title, bypass checking stripe payment status\n *\n */\n @Prop() overrideNotification?: OverrideNotification;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() closeClick!: EventEmitter<void>;\n\n @State() isLoading: boolean = true;\n @State() notificationType: 'success' | 'error' = 'success';\n @State() notificationTitle: string = '';\n @State() notificationMessages: string[] = [];\n\n private checkPaymentStatus = async () => {\n this.isLoading = true;\n const clientSecret =\n new URLSearchParams(window.location.search).get(\n 'payment_intent_client_secret',\n ) || stripeStore.clientSecret;\n if (clientSecret || this.storybookForceStatus) {\n const { error, messages } = await stripeStoreRetrievePayment({\n clientSecret,\n storybookForceStatus: this.storybookForceStatus,\n });\n this.notificationType = error ? 'error' : 'success';\n this.notificationMessages = messages || [];\n this.notificationTitle = error\n ? translate('Payment failed')\n : translate(\"You're all set!\");\n\n if (error) {\n submitGtag('zonos-checkout-payment-fail');\n } else {\n submitGtag('zonos-checkout-success');\n }\n }\n stripeStoreReset();\n this.isLoading = false;\n };\n\n private closeClickHandler = () => {\n this.closeClick.emit();\n };\n\n componentDidLoad() {\n if (this.overrideNotification) {\n // just show the notification and don't check any of the payment status\n this.notificationType = this.overrideNotification.type;\n this.notificationTitle = this.overrideNotification.title;\n this.notificationMessages = this.overrideNotification.messages;\n return;\n }\n void this.checkPaymentStatus();\n }\n\n render() {\n return (\n <Host\n class=\"zonos--checkout-finish zonos--elements\"\n style={{\n '--border-radius': getBorderRadius(this.borderRadius),\n }}\n >\n {this.isLoading && (\n <div class=\"loading-wrapper\">\n <zonos-spinner></zonos-spinner>\n </div>\n )}\n {!this.isLoading && (\n <div class=\"zonos--group\">\n {this.notificationType === 'success' ? (\n <zonos-icon\n color={'blue-800'}\n content={SuccessIcon}\n size={50}\n ></zonos-icon>\n ) : (\n <zonos-icon\n color={'red-800'}\n content={RemoveIcon}\n size={50}\n ></zonos-icon>\n )}\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {this.notificationTitle}\n </zonos-text>\n <zonos-text>\n {this.notificationMessages.map(message => (\n <>\n {message}\n <br />\n </>\n ))}\n </zonos-text>\n <zonos-button\n onClick={() => this.closeClickHandler()}\n size=\"md\"\n variant=\"primary\"\n >\n {translate('Keep shopping')}\n </zonos-button>\n </div>\n )}\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n .zonos--title {\n margin-bottom: $amino-space-24;\n }\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding: 0 5px;\n\n @include zonos--scrollbar;\n }\n\n .zonos--payment-error-banner {\n margin-bottom: $amino-space-8;\n }\n\n zonos-button {\n width: 100%;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { stripeStore } from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\nimport { submitGtag } from 'src/components/utils/submitGtag';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-checkout-payment.scss',\n tag: 'zonos-checkout-payment',\n})\nexport class ZonosCheckoutPayment {\n /**\n * Error occurred during payment\n */\n @Prop() paymentError: boolean = false;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-payment-info');\n }\n }\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n if (!stripeStore.stripeElements) {\n return null;\n }\n\n this.disabled = !stripeStore.stripePaymentEventData?.complete;\n\n return (\n <Host class=\"zonos--checkout-payment zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Payment method')}\n </zonos-text>\n {this.paymentError && (\n <zonos-banner class=\"zonos--payment-error-banner\" intent=\"error\">\n {translate(\n \"We couldn't complete your payment. Please verify the payment details and try again.\",\n )}\n </zonos-banner>\n )}\n <zonos-payment></zonos-payment>\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n is-disabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n Pay{' '}\n {formatCurrency({\n amount: cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-button>\n </Host>\n );\n }\n}\n",":host {\n transition: all 0.3s ease-in-out;\n overflow: hidden;\n div {\n position: relative;\n }\n iframe {\n width: 0;\n height: 100%;\n position: absolute;\n top: 0;\n border: 0;\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\nimport { Element, Host, State } from '@stencil/core/internal';\n\n@Component({\n shadow: true,\n styleUrl: 'zonos-collapse.scss',\n tag: 'zonos-collapse',\n})\nexport class ZonosCollapse {\n /**\n * Collapsed state of the element\n */\n @Prop() collapsed: boolean = false;\n /**\n * Collapsed size when collapsed\n */\n @Prop() collapseSize: number = 0;\n\n @Element() el!: HTMLZonosCollapseElement;\n\n @State() height: number = this.el.scrollHeight;\n\n private getElementHeight() {\n const fullHeight = `${this.height}px`;\n const collapsedHeight = `${this.collapseSize}px`;\n return this.collapsed ? collapsedHeight : fullHeight;\n }\n\n componentDidLoad() {\n this.height = this.el.scrollHeight;\n }\n\n componentDidRender() {\n this.el.shadowRoot\n ?.querySelector('iframe')\n ?.contentWindow?.addEventListener('resize', () => {\n this.height = this.el.scrollHeight;\n });\n }\n\n render() {\n this.height = this.el.scrollHeight;\n return (\n <Host\n class={'zonos--elements zonos--collapse'}\n style={{\n height: this.getElementHeight(),\n }}\n >\n <div>\n <iframe\n class=\"height-change-listener\"\n tabindex=\"-1\"\n title=\"collapse-height-change-listener\"\n ></iframe>\n <slot />\n </div>\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .zonos--title {\n margin-bottom: $amino-space-20;\n }\n .zonos--link-authentication {\n margin-bottom: $amino-space-32;\n }\n\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding: 0 5px;\n\n @include zonos--scrollbar;\n }\n\n zonos-button {\n width: 100%;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport {\n type ContactOption,\n stripeStore,\n} from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { submitGtag } from 'src/components/utils/submitGtag';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-customer-info.scss',\n tag: 'zonos-customer-info',\n})\nexport class ZonosCustomerInfo {\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Default address to use for the checkout (preview mode)\n */\n @Prop() defaultAddress: ContactOption | null = null;\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-customer-info');\n }\n }\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n if (!stripeStore.stripeElements) {\n return null;\n }\n // make sure data is valid\n this.disabled =\n !stripeStore.stripeAddressEventData?.complete ||\n !stripeStore.stripeLinkEventData?.complete;\n\n return (\n <Host class=\"zonos--customer-info zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Customer information')}\n </zonos-text>\n <zonos-link-authentication\n titleText={translate('Contact')}\n ></zonos-link-authentication>\n <zonos-address\n defaultAddress={this.defaultAddress}\n titleText={translate('Address')}\n type=\"shipping\"\n ></zonos-address>\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n isDisabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n {translate('Continue to shipping')}\n </zonos-button>\n </Host>\n );\n }\n}\n","$border-radius: var(--border-radius, $amino-radius-10);\n$height: var(--height, auto);\n$width: var(--width, auto);\n\n:host {\n .zonos--backdrop,\n .zonos--dialog-layout {\n opacity: 0;\n z-index: -999;\n visibility: hidden;\n transition: 0.3s all ease;\n }\n // close by default\n .zonos--backdrop {\n width: 100vw;\n height: 100vh;\n left: 0px;\n top: 0px;\n background: $amino-backdrop-color;\n z-index: -999;\n opacity: 0;\n visibility: hidden;\n position: fixed;\n }\n .zonos--loading {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1002;\n background: white;\n }\n\n // close by default\n .zonos--dialog-layout {\n width: 100vw;\n height: 100vh;\n left: 0;\n top: 0;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n color: $amino-text-color;\n visibility: hidden;\n }\n\n .zonos--dialog {\n position: relative;\n z-index: 1001;\n background: $amino-gray-0;\n max-width: calc(90vw);\n max-height: 90vh;\n min-height: 500px;\n height: $height;\n width: $width;\n border-radius: $border-radius;\n outline: none;\n box-shadow: $amino-v3-shadow-xxl;\n border: $amino-border;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .zonos--header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: $amino-space-16 $amino-space-24;\n\n .-zonos-stencil-library--header-text {\n flex-grow: 1;\n }\n\n .zonos--close-button {\n width: $amino-size-md;\n height: $amino-size-md;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: $amino-radius-10;\n &:hover {\n background: $amino-hover-color;\n }\n }\n }\n\n .zonos--body {\n padding: $amino-space-8 $amino-space-24;\n max-height: 100%;\n height: 100%;\n overflow: auto;\n &.zonos--no-body-padding {\n padding: 0;\n }\n }\n\n .zonos--footer {\n padding: $amino-space-16 $amino-space-24;\n }\n}\n\n:host(.open) {\n .zonos--dialog-layout,\n .zonos--backdrop {\n visibility: visible;\n }\n .zonos--backdrop {\n z-index: 1001;\n opacity: 0.65;\n }\n .zonos--dialog-layout {\n opacity: 1;\n z-index: 1002;\n transform: scale(1);\n }\n}\n\n:host(.no-border) {\n .zonos--dialog {\n border: none;\n }\n}\n\n:host(.mobile) {\n .zonos--dialog {\n max-width: 100vw;\n max-height: 100vh;\n height: 100%;\n width: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\n\nimport { classes } from 'src/components/utils/classes';\nimport { getBorderRadius } from 'src/components/utils/getBorderRadius';\nimport type { ElementsUiStyle } from 'src/types';\n\n/** These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/removeIcon.svg';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-dialog.scss',\n tag: 'zonos-dialog',\n})\nexport class ZonosDialog {\n /**\n * Whether or not the dialog is open\n * @default false\n */\n @Prop() open: boolean = false;\n /**\n * The header text for the dialog\n */\n @Prop() headerText: string = '';\n /**\n * The width of the dialog\n * @default 460px\n */\n @Prop() width: string = '460px';\n /**\n * The height of the dialog (max-wdith still 90vh)\n */\n @Prop() height?: string;\n /**\n * Whether or not to show the header\n * @default false\n */\n @Prop() noHeader: boolean = false;\n\n /**\n * Whether or not to have body padding\n * @default false\n */\n @Prop() noBodyPadding: boolean = false;\n\n /**\n * Whether or not to have body padding\n * @default false\n */\n @Prop() noBorder: boolean = false;\n\n /**\n * The right area for the action in the footer\n * @default null\n */\n @Prop() footerRightAction: HTMLElement | null = null;\n\n /**\n * The border style of the button\n * @default ROUNDED\n */\n @Prop() borderStyle?: ElementsUiStyle;\n\n /**\n * Close dialog button click\n */\n // @Prop() onCloseDialog!: () => void;\n\n /**\n * Whether or not to show the close button\n * @default false\n */\n @Prop() noCloseButton: boolean = false;\n\n /**\n * Whether or not to close the dialog when clicking outside of it\n * @default false\n */\n @Prop() noClickOutside: boolean = false;\n\n /**\n * Flag to determine if the checkout is on mobile\n */\n @Prop() mobile: boolean = false;\n\n /**\n * Load loading spinner for the dialog or not\n */\n @Prop() isLoading: boolean = true;\n\n @State() isMobile: boolean = false;\n\n /**\n * Close dialog button click\n */\n @Event() closeDialog!: EventEmitter<void>;\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n this.isMobile = this.isMobileMode();\n }\n\n private isMobileMode = () => {\n return this.mobile || window.innerWidth <= 768;\n };\n\n private closeButtonHandler = () => {\n this.closeDialog.emit();\n };\n\n private clickOutsideDialogHandler = (event: MouseEvent) => {\n if (event.target === event.currentTarget && !this.noClickOutside) {\n this.closeDialog.emit();\n }\n };\n\n componentDidLoad() {\n this.isMobile = this.isMobileMode();\n }\n\n render() {\n // disable scroll on the body when dialog is open\n if (this.open) {\n document.body.style.overflow = 'hidden';\n } else {\n document.body.style.overflow = 'auto';\n }\n\n const borderStyle = getBorderRadius(this.borderStyle);\n return (\n <Host\n class={classes([\n 'zonos--elements',\n this.open && 'open',\n this.isLoading && 'is-loading',\n this.noBorder && 'no-border',\n this.isMobile && 'mobile',\n ])}\n style={{\n '--border-radius': borderStyle,\n '--height': this.height || 'initial',\n '--width': this.width,\n }}\n >\n <div class=\"zonos--backdrop\"></div>\n <div\n aria-hidden=\"true\"\n class=\"zonos--dialog-layout\"\n onClick={this.clickOutsideDialogHandler}\n >\n <div class=\"zonos--dialog\">\n {this.isLoading && (\n <div class=\"zonos--loading\">\n <zonos-spinner size={30}></zonos-spinner>\n </div>\n )}\n {(this.headerText || !this.noCloseButton) && (\n <div class=\"zonos--header\">\n {this.headerText && (\n <h3 class=\"zonos--header-text\">{this.headerText}</h3>\n )}\n {!this.noCloseButton && (\n <zonos-button\n class=\"zonos--close-button\"\n icon={<zonos-icon content={RemoveIcon}></zonos-icon>}\n noBackground\n onClick={this.closeButtonHandler}\n ></zonos-button>\n )}\n </div>\n )}\n <div\n class={classes([\n 'zonos--body',\n this.noBodyPadding && 'zonos--no-body-padding',\n ])}\n >\n <slot />\n </div>\n {this.footerRightAction && (\n <div class=\"zonos--footer\">\n <div class=\"zonos--footer-right-action\">\n {this.footerRightAction}\n </div>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n","$filter-color: var(--filter-color);\n$width: var(--width);\n\n:host {\n display: inline-flex;\n img {\n filter: $filter-color;\n width: $width;\n }\n}\n","import { Component, getAssetPath, h, Host, Prop } from '@stencil/core';\n\nimport { classes } from 'src/components/utils/classes';\nimport type { ElementsUiTheme } from 'src/types';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-logo.scss',\n tag: 'zonos-logo',\n})\nexport class ZonosLogo {\n /**\n * Theme to change the color of the logo\n */\n @Prop() theme: ElementsUiTheme = 'LIGHT';\n\n /**\n * The width of the logo\n */\n @Prop() width: string = 'auto';\n\n /**\n * css class for the component\n */\n @Prop() class: string = '';\n\n render() {\n const filterColor =\n this.theme === 'DARK'\n ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'\n : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';\n\n return (\n <Host\n class={classes(['zonos--elements zonos--logo', this.class])}\n style={{\n '--filter-color': filterColor,\n '--width': this.width,\n }}\n >\n <img alt=\"Zonos Logo\" src={getAssetPath('./assets/ZonosLogo.png')} />\n </Host>\n );\n }\n}\n",":host {\n .zonos--total-pay {\n margin: $amino-space-16 0 $amino-space-32;\n }\n}\n\n:host(.mobile) {\n @include checkout-review-mobile;\n}\n","import { Component, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { cartStore } from 'src/components/store/checkout/cart';\nimport { translate } from 'src/components/store/translationStore';\nimport { zonosStore } from 'src/components/store/zonosStore';\nimport { isCheckoutMobile } from 'src/components/utils/checkout/isCheckoutMobile';\nimport { classes } from 'src/components/utils/classes';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\n\n/** These assets neet to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport ChevronDownIcon from './assets/ChevronDownIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport ChevronUpIcon from './assets/ChevronUpIcon.svg';\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-review.scss',\n tag: 'zonos-review',\n})\nexport class ZonosReview {\n /**\n * Whether or not the component is being rendered with mobile styles\n */\n @Prop() mobile: boolean = false;\n\n /**\n * Whether or not to show the collapse icon\n * This is controled from the collapsed state of the zonos-collapse component\n * to show the collapse icon\n */\n @Prop() collapsed: boolean = false;\n\n @State() isMobile: boolean = false;\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n this.isMobile = isCheckoutMobile(this.mobile);\n }\n\n componentWillLoad() {\n this.isMobile = isCheckoutMobile(this.mobile);\n }\n\n render() {\n const titleTextType = this.isMobile ? 'boldSubheader' : 'semiBoldLabel';\n const totalTextType = this.isMobile\n ? 'boldSubheader'\n : 'secondaryPageHeader';\n\n const titleTextColor = this.isMobile ? 'gray-1200' : 'gray-800';\n const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;\n const renderCollapseIcon = () => {\n // only display the collapse icon if the component is being rendered with mobile styles\n if (!this.isMobile) {\n return null;\n }\n\n if (!this.collapsed) {\n return (\n <zonos-icon color=\"gray-1200\" content={ChevronDownIcon}></zonos-icon>\n );\n }\n return (\n <zonos-icon color=\"gray-1200\" content={ChevronUpIcon}></zonos-icon>\n );\n };\n return (\n <Host\n class={classes([\n 'zonos--review zonos--elements',\n this.isMobile && 'mobile',\n ])}\n >\n <div class=\"zonos--title\">\n <zonos-text color={titleTextColor} type={titleTextType}>\n {translate('Pay')} {zonosStore.organizationName}\n </zonos-text>\n {renderCollapseIcon()}\n </div>\n <div class=\"zonos--total-pay\">\n <zonos-text type={totalTextType}>\n {formatCurrency({\n amount:\n // show total without taxes when step is shipping, show total with taxes when step is payment\n cartStore.step === 'shipping'\n ? totalWithoutTaxes\n : cartStore.total,\n currency: cartStore.currency,\n })}\n </zonos-text>\n </div>\n </Host>\n );\n }\n}\n",":host {\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .zonos--title {\n margin-bottom: $amino-space-24;\n }\n .zonos--shipping-method-title {\n margin-bottom: $amino-space-16;\n }\n\n .zonos-shipping-rich-radio {\n margin-bottom: $amino-space-24;\n }\n\n .zonos--group {\n margin-bottom: $amino-space-20;\n overflow: auto;\n padding-right: 5px;\n\n @include zonos--scrollbar;\n }\n\n zonos-button {\n width: 100%;\n }\n zonos-banner {\n margin-top: $amino-space-24;\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport {\n cartStore,\n cartStoreGetShippingTransitInfo,\n cartStoreUpdateSelectedShippingOption,\n} from 'src/components/store/checkout/cart';\nimport { stripeStore } from 'src/components/store/checkout/stripe';\nimport { translate } from 'src/components/store/translationStore';\nimport { formatCurrency } from 'src/components/utils/formatCurrency';\nimport { submitGtag } from 'src/components/utils/submitGtag';\nimport type { ShippingRichRadioItem } from 'src/types';\n\n@Component({\n /**\n * Use `scope` here just because this component is `zonos-address` which is using stripe elements and stripe\n * need to be able to inject iframe into this component from the DOM\n */\n scoped: true,\n styleUrl: 'zonos-shipping.scss',\n tag: 'zonos-shipping',\n})\nexport class ZonosShipping {\n /**\n * Whether or not the continue button is loading\n */\n @Prop() continueLoading: boolean = false;\n\n /**\n * Submit button main color\n */\n @Prop() submitBtnColor?: string;\n\n /**\n * Whether or not the checkout is in mobile mode\n */\n @Prop() submitBtnType?: HTMLZonosButtonElement['variant'];\n\n /**\n * Event to emit when the continue button is clicked\n */\n @Event() continueClicked!: EventEmitter<void>;\n\n @State() selectedShippingMethod: ShippingRichRadioItem | null = null;\n\n /**\n * Whether or not the continue button is disabled\n * @default true\n */\n @State() disabled: boolean = true;\n\n @Watch('disabled')\n watchFormComplete() {\n if (!this.disabled) {\n // submit google tag when the form is complete\n submitGtag('zonos-checkout-shipping-info');\n }\n }\n\n private handleRadioSelected = async (\n e: CustomEvent<ShippingRichRadioItem>,\n ) => {\n this.selectedShippingMethod = e.detail;\n if (!this.selectedShippingMethod) {\n return;\n }\n\n const selectedShippingOption =\n cartStore.shippingData?.find(\n item => item.id === this.selectedShippingMethod?.value,\n ) || null;\n if (!selectedShippingOption) {\n return;\n }\n\n // save selected shipping option to store\n const updateStatus = await cartStoreUpdateSelectedShippingOption(\n selectedShippingOption,\n );\n if (!updateStatus) {\n return;\n }\n\n this.disabled = false;\n };\n\n /**\n * handler for continue button click\n */\n private continueClickHandler = () => {\n this.continueClicked.emit();\n };\n\n render() {\n const shipToCountry =\n stripeStore.stripeAddressEventData?.value.address.country;\n\n const serviceLevels = cartStore.shippingData?.flatMap(\n (item): ShippingRichRadioItem => {\n const { expectedDate, maxTransit, minTransit } =\n cartStoreGetShippingTransitInfo(item);\n const sublabel = expectedDate\n ? `${translate('Expected delivery')} ${expectedDate}`\n : '';\n const caption =\n minTransit && maxTransit\n ? `(${minTransit}-${maxTransit} ${translate('business days')})`\n : '';\n const shippingAmount =\n cartStore.landedCostData?.find(\n landedCostItem =>\n landedCostItem.landedCost?.shipmentRating.id === item.id,\n )?.subtotals.shipping || 0;\n return {\n caption,\n label: item.displayName,\n price: formatCurrency({\n amount: shippingAmount,\n currency: cartStore.currency,\n }),\n sublabel,\n value: item.id,\n };\n },\n );\n return (\n <Host class=\"zonos--shipping zonos--elements\">\n <div class=\"zonos--group\">\n <zonos-text class=\"zonos--title\" type=\"semiBoldSubheader\">\n {translate('Shipping information')}\n </zonos-text>\n <zonos-text class=\"zonos--shipping-method-title\" type=\"semiBoldLabel\">\n {translate('Shipping method')}\n </zonos-text>\n {!serviceLevels?.length ? (\n <zonos-banner\n bannerTitle=\"No shipping methods found - try editing your address or contacting support if the error persists\"\n intent=\"error\"\n ></zonos-banner>\n ) : (\n <zonos-shipping-rich-radio\n items={serviceLevels || []}\n onRadioSelected={e => this.handleRadioSelected(e)}\n ></zonos-shipping-rich-radio>\n )}\n\n {cartStore.isSelectedShippingAboveDeminimis && (\n <zonos-banner intent=\"warning\">\n {translate('Above de minimis threshold for')} {shipToCountry}.{' '}\n {translate(\n 'Duties and taxes will be applied to items and shipping.',\n )}\n </zonos-banner>\n )}\n </div>\n <zonos-button\n backgroundColor={this.submitBtnColor}\n is-disabled={this.disabled}\n loading={this.continueLoading}\n onClick={() => this.continueClickHandler()}\n size=\"lg\"\n // use primary type when on mobile mode\n variant={this.submitBtnType}\n >\n {translate('Go to payment')}\n </zonos-button>\n </Host>\n );\n }\n}\n"],"mappings":"q1EAAO,IAAMA,eAAiB,SAACC,G,IAC7BC,EAAMD,EAAAC,OACNC,EAAQF,EAAAE,SACRC,EAAgBH,EAAAG,iBAMhB,OAAAA,EACI,GAAAC,OAAG,IAAIC,KAAKC,aAAa,QAAS,CAChCJ,SAAQA,EACRK,MAAO,aACNC,OAAOP,GAAO,KAAAG,OAAIF,GACrB,IAAIG,KAAKC,aAAa,QAAS,CAC7BJ,SAAQA,EACRK,MAAO,aACNC,OAAOP,EARd,ECTF,IAAMQ,kBAAoB,0oB,ICWbC,eAAc,W,wDACQ,E,CAEjCA,EAAAC,UAAAC,OAAA,eAAAC,EAAAC,K,MACE,IAAMC,EAAeC,aAAa,4BAClC,IAAMC,IAAOC,EAAAC,UAAUC,gBAAY,MAAAF,SAAA,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