@zonos/elements 1.3.249 → 1.3.250
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-eca56521.js → cart-fcd1359c.js} +318 -19
- package/dist/cjs/{hasInclusivePrice-e7d67b45.js → hasInclusivePrice-745a8f29.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-918f2c2b.js → invoice-f040e147.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-89911215.js → isCollectMobileTablet-cf92852e.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-878ef681.js → localization-523b793a.js} +660 -0
- package/dist/cjs/{paypal-6acca678.js → paypal-8c98c0a1.js} +29 -2
- package/dist/cjs/{placeTestOrder-f1c1e939.js → placeTestOrder-9b1e09f0.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-d9590e81.js → renderCheckoutCurrency-94b6e51d.js} +2 -2
- package/dist/cjs/{zonos-address-display_9.cjs.entry.js → zonos-address-display_8.cjs.entry.js} +3 -79
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +74 -20
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +113 -0
- package/dist/cjs/zonos-checkout.cjs.entry.js +52 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-store-credit.cjs.entry.js +113 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +49 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +18 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/assets/StoreCreditIcon.svg +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.css +139 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +137 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -1
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +62 -4
- package/dist/collection/components/store/checkout/paypal.js +28 -0
- package/dist/collection/components/store/checkout/storeCredit.js +237 -0
- package/dist/collection/components/store/checkout/stripe.js +2 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +33 -0
- package/dist/collection/components/store/translationStore/strings.base.js +33 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +33 -0
- package/dist/collection/components/store/translationStore/strings.french.js +33 -0
- package/dist/collection/components/store/translationStore/strings.german.js +33 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +33 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +33 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +33 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +33 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +33 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +33 -0
- package/dist/collection/types/generated/graphql.internal.types.js +589 -0
- package/dist/esm/{cart-efb30253.js → cart-6e465f7b.js} +309 -21
- package/dist/esm/{hasInclusivePrice-565ddbe5.js → hasInclusivePrice-c49d384d.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-0e462fcc.js → invoice-d416ba65.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-0bcba25a.js → isCollectMobileTablet-48040572.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-c1aff677.js → localization-f4a7fb5a.js} +660 -0
- package/dist/esm/{paypal-06b67be0.js → paypal-6af6b978.js} +29 -2
- package/dist/esm/{placeTestOrder-6c9a6c8a.js → placeTestOrder-d19ac166.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-910fea67.js → renderCheckoutCurrency-c8aa8e7e.js} +2 -2
- package/dist/esm/{zonos-address-display_9.entry.js → zonos-address-display_8.entry.js} +4 -79
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +74 -20
- package/dist/esm/zonos-checkbox_2.entry.js +108 -0
- package/dist/esm/zonos-checkout.entry.js +52 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-store-credit.entry.js +109 -0
- package/dist/esm-es5/cart-6e465f7b.js +1 -0
- package/dist/esm-es5/hasInclusivePrice-c49d384d.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-0e462fcc.js → invoice-d416ba65.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-0bcba25a.js → isCollectMobileTablet-48040572.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-f4a7fb5a.js +1 -0
- package/dist/esm-es5/paypal-6af6b978.js +17 -0
- package/dist/esm-es5/{placeTestOrder-6c9a6c8a.js → placeTestOrder-d19ac166.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-910fea67.js → renderCheckoutCurrency-c8aa8e7e.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +1 -0
- package/dist/scripts/index.d.ts +58 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.d.ts +17 -0
- package/dist/types/components/store/checkout/cart.d.ts +8 -1
- package/dist/types/components/store/checkout/storeCredit.d.ts +111 -0
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +33 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +33 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +713 -4
- package/dist/types/types/generated/graphql.internal.types.ts +956 -4
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-456c0e52.js → p-13ed3789.js} +1 -1
- package/dist/zonos-elements/{p-0a2abbab.system.entry.js → p-17fbfda0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8a424412.entry.js → p-1b56814d.entry.js} +1 -1
- package/dist/zonos-elements/p-1e6509d7.js +1 -0
- package/dist/zonos-elements/{p-3ad2a9a3.system.entry.js → p-1f63615f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2435f196.entry.js +1 -0
- package/dist/zonos-elements/{p-4d4b7faa.entry.js → p-26848428.entry.js} +1 -1
- package/dist/zonos-elements/p-28d62fc8.system.entry.js +1 -0
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/p-2b7ef406.system.js +18 -0
- package/dist/zonos-elements/{p-54c95926.entry.js → p-3827041d.entry.js} +1 -1
- package/dist/zonos-elements/{p-321d2963.js → p-48228d76.js} +1 -1
- package/dist/zonos-elements/p-4d5932ac.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4d081ce8.entry.js → p-59fe8416.entry.js} +1 -1
- package/dist/zonos-elements/{p-101226f3.system.entry.js → p-5ca50862.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36bea5d5.system.entry.js → p-5fceccc3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64ad0854.entry.js +1 -0
- package/dist/zonos-elements/{p-c87d3d50.system.js → p-65892fa7.system.js} +1 -1
- package/dist/zonos-elements/{p-b9a4430c.entry.js → p-66e1dc55.entry.js} +1 -1
- package/dist/zonos-elements/{p-09110bb7.system.entry.js → p-7042c6da.system.entry.js} +1 -1
- package/dist/zonos-elements/p-741e07e1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0aeba2c7.system.js → p-77113201.system.js} +1 -1
- package/dist/zonos-elements/{p-6d37f669.entry.js → p-77c0a02b.entry.js} +1 -1
- package/dist/zonos-elements/{p-a75b3efc.system.entry.js → p-85529818.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f1ab25c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1b5f89d5.system.js → p-90b8c428.system.js} +1 -1
- package/dist/zonos-elements/p-997b7eef.js +1 -0
- package/dist/zonos-elements/{p-4c087a8e.system.entry.js → p-9bc5e944.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9c6917ab.system.js +1 -0
- package/dist/zonos-elements/{p-358dfb9e.entry.js → p-9d64783a.entry.js} +1 -1
- package/dist/zonos-elements/{p-1f1bf95c.system.entry.js → p-9f49e35a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ece0f96.system.entry.js → p-a026b5ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a395eea.system.entry.js → p-a1a3657e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-079bc009.system.entry.js → p-a1b0e9a5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a6a401e5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-302b7105.system.entry.js → p-b07da3e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f31fbbf0.entry.js → p-b08bf843.entry.js} +1 -1
- package/dist/zonos-elements/p-b334c76c.entry.js +1 -0
- package/dist/zonos-elements/{p-bc6b33fa.entry.js → p-b9581a92.entry.js} +1 -1
- package/dist/zonos-elements/p-c30a155e.js +1 -0
- package/dist/zonos-elements/{p-9c64ca98.system.entry.js → p-cad67b10.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cc78c9d4.js +17 -0
- package/dist/zonos-elements/{p-5eaa0de1.entry.js → p-d2301d8a.entry.js} +1 -1
- package/dist/zonos-elements/p-d46484aa.entry.js +1 -0
- package/dist/zonos-elements/{p-b589f621.system.entry.js → p-d634f954.system.entry.js} +1 -1
- package/dist/zonos-elements/p-df316670.system.js +1 -0
- package/dist/zonos-elements/p-e331a235.js +1 -0
- package/dist/zonos-elements/p-e4d58bd7.js +1 -0
- package/dist/zonos-elements/{p-8d1efd7b.entry.js → p-e9ca4447.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9e3bc98.system.js → p-f0855df3.system.js} +1 -1
- package/dist/zonos-elements/{p-06e2bc14.entry.js → p-f25e7f5a.entry.js} +1 -1
- package/dist/zonos-elements/{p-b360ee5b.entry.js → p-f4cc124f.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd004403.system.js → p-fa0139c3.system.js} +1 -1
- package/dist/zonos-elements/{p-8b206982.system.js → p-fa5767c3.system.js} +1 -1
- package/dist/zonos-elements/{p-26718a78.entry.js → p-fbfaa4f9.entry.js} +1 -1
- package/dist/zonos-elements/p-fe6cc354.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +0 -35
- package/dist/esm/zonos-toggle.entry.js +0 -31
- package/dist/esm-es5/cart-efb30253.js +0 -1
- package/dist/esm-es5/hasInclusivePrice-565ddbe5.js +0 -1
- package/dist/esm-es5/localization-c1aff677.js +0 -1
- package/dist/esm-es5/paypal-06b67be0.js +0 -17
- package/dist/esm-es5/zonos-address-display_9.entry.js +0 -1
- package/dist/esm-es5/zonos-toggle.entry.js +0 -1
- package/dist/zonos-elements/p-096182f0.system.js +0 -1
- package/dist/zonos-elements/p-127e0395.js +0 -17
- package/dist/zonos-elements/p-197d9b23.system.entry.js +0 -1
- package/dist/zonos-elements/p-25dd58f8.system.entry.js +0 -1
- package/dist/zonos-elements/p-445072f8.js +0 -1
- package/dist/zonos-elements/p-507f00d2.js +0 -1
- package/dist/zonos-elements/p-5fd0cd66.system.js +0 -1
- package/dist/zonos-elements/p-661cd4ce.system.entry.js +0 -1
- package/dist/zonos-elements/p-777e0a81.entry.js +0 -1
- package/dist/zonos-elements/p-7e77b055.system.entry.js +0 -1
- package/dist/zonos-elements/p-80524eac.entry.js +0 -1
- package/dist/zonos-elements/p-9eea270b.entry.js +0 -1
- package/dist/zonos-elements/p-c4e358f2.js +0 -1
- package/dist/zonos-elements/p-cda52300.js +0 -1
- package/dist/zonos-elements/p-d233ef0d.entry.js +0 -1
- package/dist/zonos-elements/p-f8f7d491.js +0 -1
- package/dist/zonos-elements/p-fc0aa91e.system.js +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,r,e){function i(n){return n instanceof r?n:new r((function(t){t(n)}))}return new(r||(r=Promise))((function(r,o){function u(n){try{c(e.next(n))}catch(n){o(n)}}function s(n){try{c(e["throw"](n))}catch(n){o(n)}}function c(n){n.done?r(n.value):i(n.value).then(u,s)}c((e=e.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,i,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(t){return c([n,t])}}function c(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(e=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(n,r)}catch(n){s=[6,n];i=0}finally{e=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,r,e){function i(n){return n instanceof r?n:new r((function(t){t(n)}))}return new(r||(r=Promise))((function(r,o){function u(n){try{c(e.next(n))}catch(n){o(n)}}function s(n){try{c(e["throw"](n))}catch(n){o(n)}}function c(n){n.done?r(n.value):i(n.value).then(u,s)}c((e=e.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,i,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(t){return c([n,t])}}function c(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(e=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(n,r)}catch(n){s=[6,n];i=0}finally{e=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-df316670.system.js","./p-9c6917ab.system.js","./p-01174496.system.js"],(function(n){"use strict";var t,r,e,i;return{setters:[function(n){t=n.d},function(n){r=n.s},function(n){e=n.l;i=n.h}],execute:function(){var o=this;var u=n("p",(function(){return __awaiter(o,void 0,void 0,(function(){var n,o,u,s,c,a,f,l,d;return __generator(this,(function(h){switch(h.label){case 0:u=(n=t.partiesData.find((function(n){return n.type==="DESTINATION"})))===null||n===void 0?void 0:n.id;s=(o=t.partiesData.find((function(n){return n.type==="PAYOR"})))===null||o===void 0?void 0:o.id;c=r.checkoutSessionId;if(!c||!s||!u){e("Missing required data",{billToPartyId:s,checkoutSessionId:c,shipToPartyId:u});return[2,{errors:["Missing required data"],json:null}]}a={billToPartyId:s,checkoutSessionId:c,shipToPartyId:u};return[4,i("/api/zonos-elements/place-test-order",{body:a,method:"POST"})];case 1:f=h.sent(),l=f.errors,d=f.json;if(l.length||!d){e("Error occurs when placing test order",l);return[2,{errors:l.map((function(n){return n.message})),json:null}]}return[2,{errors:[],json:d}]}}))}))}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,d as e,h as t,F as s,a as n,g as l}from"./p-ce75b047.js";import{b as a,c as i,t as c,H as r,y as d,I as h,d as p,r as m,z as f}from"./p-c4e358f2.js";import{c as b,a as u,b as z}from"./p-127e0395.js";import{t as y,s as g,l as x,p as v}from"./p-507f00d2.js";import{z as w}from"./p-058f6124.js";import{h as k,s as C,g as L,i as I,a as S}from"./p-41dd1cb8.js";import{c as H}from"./p-595f5dd2.js";import{g as j}from"./p-f830f800.js";import{l as _,b as M}from"./p-0a377722.js";import{s as Z}from"./p-4f7d64f6.js";import{i as P,a as W,e as D}from"./p-456c0e52.js";import{c as B}from"./p-b4b7f705.js";import{l as F}from"./p-97aceb11.js";import{r as U}from"./p-cda52300.js";import{p as V}from"./p-445072f8.js";import{r as T}from"./p-1b8771bb.js";import"./p-67897a0d.js";import"./p-def2d465.js";const $=class{constructor(t){o(this,t),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const t=g.checkoutSessionId,s=new URLSearchParams;s.set("checkoutSessionId",t||"");const{baseUrl:n,errors:l,json:a}=await k(`/api/zonos-elements/get-order?${s.toString()}`);return l.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,t;0===o&&_("=== Start to poll for order info","info");const{baseUrl:s,order:n}=await this.pullOrder(),l=!!(null===(t=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),a=g.checkoutSessionId,i=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;_(`=== Polling order (${o} attemps)`,"info"),n?(_("=== CollectOrder info found","info"),o>10&&C({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Collect order found after ${o} attempts`],metadata:{allLogs:M,checkoutSessionId:g.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&l||!(o<i)?C({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Collect order not found after ${i} attempts`],metadata:{allLogs:M,checkoutSessionId:g.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:t,status:s}=await i({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===s||e;this.notificationType=n?"error":"success",this.notificationMessages=t||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),_("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:t,status:s});const l=new URL(window.location.href);if(l.searchParams.delete("payment_intent_client_secret"),l.searchParams.delete("payment_intent"),l.searchParams.delete("redirect_status"),l.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",l.toString()),e&&(null==t?void 0:t.length))Z({event:"zonos-checkout-payment-fail"}),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${s} - checkout session: ${g.checkoutSessionId}`],metadata:{allLogs:M,credentialToken:window.Zonos.zonosApiKey}});else{Z({event:"zonos-checkout-success"}),c({checkoutSessionId:g.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=H("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,r(),d(),g.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),r(),d(),b(),g.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(Z({event:"zonos-checkout-success"}),c({checkoutSessionId:g.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),r(),d(),b(),g.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const t=new URLSearchParams(window.location.search).get("zonosQaUrl");return t&&e.searchParams.set("zonosQaUrl",t),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return t(n,{key:"c085862ecf1f50752634fb44f99b5cb5d82a9e24",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":j({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"9b30b12c817c3422b355a2f544bbf2908f736c80",class:"zonos--finish-details"},t("div",{key:"697fff3258a6e74d99500ec25f5d3923f8c7cfc2",class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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(--zonos-elements-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>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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(--zonos-elements-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>',iconColor:"red-800",size:50}),t("zonos-text",{key:"8457c0c9b22c2fb6374b60e492099981026d2690",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"21ab18878abb37a2c37d873c494d71aee3d4ed71",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"389918dd57e6ce5744b7192baa3c06c6db3f70cd",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(s,null,o,t("br",null))))),this.order&&o&&t("div",{key:"cca6b625a6bea62b788cf8dd6bb9e03e6505d81c",class:"zonos--button-container"},t("zonos-button",{key:"0f45987515ae99045e5b449b5b1aaae11d70d9fb",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};$.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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;height:100%}: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:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}: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}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const R=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=W(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=W(this.tablet)}render(){var o;const e=null===(o=F.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,s="gray-1000";return t(n,{key:"9509e7325ad0153d2f5c9ba3b5689fdb3ad6313e",class:B(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"250716798bf30901678b16e1ac159810f1d7a6ad",class:"zonos--collect-footer"},t("div",{key:"ab61803d4b5348b8978e7dfcb16a5733cca5dd29",class:"zonos--collect-locale-wrapper"},t("zonos-button",{key:"6c5dcd25d5ef73b2098269d840e291343d30cb81",buttonColor:s,class:"zonos--collect-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:s}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},e),t("div",{key:"d1a367cd19b36f1a0f49ccfe78e750218b50a03e",class:B(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{key:"02f446b8f4e3dc875f78d5ac2f0b9aa6dd071f1c",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"b713a78cbd3d3f131c6c473bb1d979899d40b13b",class:"zonos--collect-footer-icon-wrapper"},t("div",{key:"97eab5909d556f13fa2acc0628d583d49f13d3a2",class:"zonos--collect-footer-logo"},t("zonos-text",{key:"a6488e084f153305eed8d6f65341d7ab00297adb",textColor:s},"Powered by"),t("a",{key:"c63a6e1064dbd733add1cc3b1df1456484e2f103",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"081cae2c34e58478a8c20f0f9a9f20dc0b47c9b7",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),t("div",{key:"0862a11838e62f425d38066230b01f445999d751",class:"dot"}),t("a",{key:"b13f3af014b5d970e45f88cbb0ef669a0f9aa2ac",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"a675218a36da83427c2ce517a15b1ed5ea5910d6",textColor:s},"Privacy policy")))))}get el(){return l(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};R.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";const O=class{constructor(t){o(this,t),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}renderShippingAddress(){if(D.isFetchingShippingInfo)return t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},t("zonos-skeleton",{skeletonWidth:"99px"})),t("div",{class:"zonos--collect-order-shipping-info"},t("zonos-skeleton",{skeletonWidth:"152px"}),t("zonos-h-stack",{spacing:8},t("zonos-skeleton",{skeletonWidth:"75px"}),t("zonos-skeleton",{skeletonWidth:"75px"})),t("zonos-skeleton",{skeletonWidth:"50px"})));const o=D.shippingAddress;return o?t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Shipping address")),t("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((o=>t("zonos-text",null,o))))):null}render(){return t(n,{class:B(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},t("zonos-text",{type:"semiBoldLabel"},y("Order details")),(()=>t("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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>',iconColor:"gray-1200"}))()),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--collect-order-details-content"},t("zonos-collect-cart-items",null),t("div",{class:"zonos--collect-order-info"},t("div",{class:"zonos--collect-order-details-row"},null!==D.amountTotalPaid&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Total paid")),t("zonos-text",null,U({amount:D.amountTotalPaid||0,isForeign:!0}))),D.originCompanyName&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Ordered from")),t("zonos-text",null,D.originCompanyName||""))),this.renderShippingAddress()))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};O.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(t){o(this,t),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,t;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(t=a.stripeElements)||void 0===t||t.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,Z({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await V();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{z({currency:p.currency})}))],z({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),l=p.isStagingMode||S(),i="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(l){const o=w.appearance.theme;return t(s,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||D.isFetchingShippingInfo?null:t(s,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!i&&t(s,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):_("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:i?"block":"none"}})),e&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},y("Test cards")),t("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return l(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";const E=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=W(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return t(n,{key:"6432c5dd5afd628e33ba26385ecfecb470f1757e",class:B(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"e4d113ff1268c36119e1f80164b6cfd702c67f75",class:"zonos--title"},t("zonos-text",{key:"aad9ad9b526ac65d97a88df516e8e7b34fc3d2b1",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:w.organizationName}))),t("div",{key:"fcdaebc734a270742fbe21ff932550994e522ea6",class:"zonos--total-pay"},T({content:t("zonos-text",{type:"secondaryPageHeader"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};E.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';const Y=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.subtotals={},this.initSubtotalData=()=>{var o;const e=null===(o=p.checkoutSession)||void 0===o?void 0:o.subtotals;if(!e)return;const t=y("Duties"),s=y("Taxes"),n=y("Fees"),l={[t]:0,[n]:0,[s]:0},a=e.duties,i=e.taxes,c=e.fees;void 0!==a&&(l[t]||(l[t]=0),l[t]+=a),void 0!==i&&(l[s]||(l[s]=0),l[s]+=i),void 0!==c&&(l[n]||(l[n]=0),l[n]+=c),this.subtotals=l}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[f("checkoutSession",this.initSubtotalData),v("translatedChunks",this.initSubtotalData)]}render(){return this.initSubtotalData(),t(n,{key:"ab687a6e1ec67f6609081036a75e9905ff34c6b1",class:"zonos--collect-subtotal zonos--elements"},t("table",{key:"303b8c49983e9f7aea4d31400fed53d858eb078d",class:"zonos--collect-table"},!!this.subtotals[y("Duties")]&&t("tr",{key:"a60fa4f1f1afacef0144b86c054f44572576f7af",class:"zonos--row zonos--collect-duty"},t("td",{key:"aeaf798e26bbd482196d7208eb05657a1d15dad8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"835d817709ae3b7e2d888d618e0856fb2e637e4d",type:"semiBoldLabel"},y("Duties"))),t("td",{key:"5bb47a115ea61fa897a3f48bbd10c5f78af3703e",class:"zonos--column"}),t("td",{key:"32632c4beb855ca687c615f5e6c63c82e2e05c80",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Duties")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Taxes")]&&t("tr",{key:"055bb237dafaea8de18b127641c8fd7e1ece563b",class:"zonos--row zonos--collect-tax"},t("td",{key:"1e73b140c2c9090ccfb91ce4efca483e8fb56e9e",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"a3375ecd77460c78c7c5f59bf7b9b8612cd53e41",type:"semiBoldLabel"},y("Taxes"))),t("td",{key:"20685646be29873967c2f335c775046068248ad3",class:"zonos--column"}),t("td",{key:"2e2c6af2c1a7840df03351178ddf3107fcc36494",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Taxes")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Fees")]&&t("tr",{key:"8157aba5c6a23680b0bc681adc127747f01a2973",class:"zonos--row zonos--collect-fee"},t("td",{key:"8266654f9e65003f297222bb935013a8b9b3b430",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"8399000a5f61e4737764b68b89799b409dce6034",type:"semiBoldLabel"},y("Fees"))),t("td",{key:"2a9763f2401967ea1bdfa2c17514d18e2a4e0db6",class:"zonos--column"}),t("td",{key:"ac2f275312c2ba69888e6e57dde8b4b451839b86",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Fees")]||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"a293d1b9342251f7326c1ac68e2bab83eae2ed80",class:"zonos--row zonos--collect-spacing"},t("td",{key:"c136b1b807f32dc21c131326d70500d2e2c64efe",class:"zonos--column",colSpan:3})),t("tr",{key:"59747101f1a9ef7c8fad60e90ea5b8c31015438c",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},t("td",{key:"96d201ba6f3e571adac265127229c94cdc96be2a",class:"zonos--column"}),t("td",{key:"f2f4cb751e35fc0ebaa803659f26a2314d8bf639",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"b4f89ea1e523af8a5aead4ef007a6f0dc7e7f441",type:"label"},y("Subtotal"))),t("td",{key:"28b6aea6363b2bef1d072ad77f409ae77976305c",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"f0072cdd200e8483421265af39a90fb655fb2ef0",class:"zonos--row zonos--collect-total"},t("td",{key:"88a007048d33c919a6c5f87cf7cd071f83e7448b",class:"zonos--column"}),t("td",{key:"24bba9e9b81ff443dd5ca4832c3169e3605a93b8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"594d4e96bec3a2153f6622c6842970ebee5bb463",type:"semiBoldLabel"},y("Customs fees total"))),t("td",{key:"b3ffd6dcae747dd2ed68ae16fb60d9655f7669dc",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"semiBoldLabel"},U({amount:D.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:D.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};Y.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";export{$ as zonos_collect_finish,R as zonos_collect_footer,O as zonos_collect_order_details,N as zonos_collect_payment,E as zonos_collect_review,Y as zonos_collect_subtotal}
|
|
1
|
+
import{r as o,d as e,h as t,F as s,a as n,g as l}from"./p-ce75b047.js";import{b as a,c as i,t as c,L as r,C as d,M as h,d as p,r as m,D as f}from"./p-e331a235.js";import{c as b,a as u,b as z}from"./p-cc78c9d4.js";import{t as y,s as g,l as x,p as v}from"./p-e4d58bd7.js";import{z as w}from"./p-058f6124.js";import{h as k,s as C,g as L,i as S,a as I}from"./p-41dd1cb8.js";import{c as H}from"./p-595f5dd2.js";import{g as j}from"./p-f830f800.js";import{l as M,b as _}from"./p-0a377722.js";import{s as Z}from"./p-4f7d64f6.js";import{i as P,a as D,e as W}from"./p-13ed3789.js";import{c as B}from"./p-b4b7f705.js";import{l as F}from"./p-97aceb11.js";import{r as U}from"./p-c30a155e.js";import{p as V}from"./p-997b7eef.js";import{r as T}from"./p-1b8771bb.js";import"./p-67897a0d.js";import"./p-def2d465.js";const $=class{constructor(t){o(this,t),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const t=g.checkoutSessionId,s=new URLSearchParams;s.set("checkoutSessionId",t||"");const{baseUrl:n,errors:l,json:a}=await k(`/api/zonos-elements/get-order?${s.toString()}`);return l.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,t;0===o&&M("=== Start to poll for order info","info");const{baseUrl:s,order:n}=await this.pullOrder(),l=!!(null===(t=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),a=g.checkoutSessionId,i=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;M(`=== Polling order (${o} attemps)`,"info"),n?(M("=== CollectOrder info found","info"),o>10&&C({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Collect order found after ${o} attempts`],metadata:{allLogs:_,checkoutSessionId:g.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&l||!(o<i)?C({endpoint:`${s}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Collect order not found after ${i} attempts`],metadata:{allLogs:_,checkoutSessionId:g.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:t,status:s}=await i({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===s||e;this.notificationType=n?"error":"success",this.notificationMessages=t||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),M("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:t,status:s});const l=new URL(window.location.href);if(l.searchParams.delete("payment_intent_client_secret"),l.searchParams.delete("payment_intent"),l.searchParams.delete("redirect_status"),l.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",l.toString()),e&&(null==t?void 0:t.length))Z({event:"zonos-checkout-payment-fail"}),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${s} - checkout session: ${g.checkoutSessionId}`],metadata:{allLogs:_,credentialToken:window.Zonos.zonosApiKey}});else{Z({event:"zonos-checkout-success"}),c({checkoutSessionId:g.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=H("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,r(),d(),g.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),r(),d(),b(),g.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(Z({event:"zonos-checkout-success"}),c({checkoutSessionId:g.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),r(),d(),b(),g.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const t=new URLSearchParams(window.location.search).get("zonosQaUrl");return t&&e.searchParams.set("zonosQaUrl",t),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return t(n,{key:"c085862ecf1f50752634fb44f99b5cb5d82a9e24",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":j({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"9b30b12c817c3422b355a2f544bbf2908f736c80",class:"zonos--finish-details"},t("div",{key:"697fff3258a6e74d99500ec25f5d3923f8c7cfc2",class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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(--zonos-elements-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>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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(--zonos-elements-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>',iconColor:"red-800",size:50}),t("zonos-text",{key:"8457c0c9b22c2fb6374b60e492099981026d2690",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"21ab18878abb37a2c37d873c494d71aee3d4ed71",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"389918dd57e6ce5744b7192baa3c06c6db3f70cd",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(s,null,o,t("br",null))))),this.order&&o&&t("div",{key:"cca6b625a6bea62b788cf8dd6bb9e03e6505d81c",class:"zonos--button-container"},t("zonos-button",{key:"0f45987515ae99045e5b449b5b1aaae11d70d9fb",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};$.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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;height:100%}: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:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}: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}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const R=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=D(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=D(this.tablet)}render(){var o;const e=null===(o=F.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,s="gray-1000";return t(n,{key:"9509e7325ad0153d2f5c9ba3b5689fdb3ad6313e",class:B(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"250716798bf30901678b16e1ac159810f1d7a6ad",class:"zonos--collect-footer"},t("div",{key:"ab61803d4b5348b8978e7dfcb16a5733cca5dd29",class:"zonos--collect-locale-wrapper"},t("zonos-button",{key:"6c5dcd25d5ef73b2098269d840e291343d30cb81",buttonColor:s,class:"zonos--collect-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:s}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},e),t("div",{key:"d1a367cd19b36f1a0f49ccfe78e750218b50a03e",class:B(["zonos--collect-language-dialog",this.showLanguageDialog&&"zonos--collect-language-dialog-open"])},t("zonos-language-select",{key:"02f446b8f4e3dc875f78d5ac2f0b9aa6dd071f1c",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"b713a78cbd3d3f131c6c473bb1d979899d40b13b",class:"zonos--collect-footer-icon-wrapper"},t("div",{key:"97eab5909d556f13fa2acc0628d583d49f13d3a2",class:"zonos--collect-footer-logo"},t("zonos-text",{key:"a6488e084f153305eed8d6f65341d7ab00297adb",textColor:s},"Powered by"),t("a",{key:"c63a6e1064dbd733add1cc3b1df1456484e2f103",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"081cae2c34e58478a8c20f0f9a9f20dc0b47c9b7",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),t("div",{key:"0862a11838e62f425d38066230b01f445999d751",class:"dot"}),t("a",{key:"b13f3af014b5d970e45f88cbb0ef669a0f9aa2ac",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"a675218a36da83427c2ce517a15b1ed5ea5910d6",textColor:s},"Privacy policy")))))}get el(){return l(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};R.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--collect-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper .zonos--collect-footer-logo a{line-height:0}:host .zonos--collect-footer .zonos--collect-footer-icon-wrapper a{text-decoration:none}:host .zonos--collect-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--collect-footer .zonos--collect-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--collect-footer .zonos--collect-locale-wrapper{gap:4px}}:host .zonos--collect-footer .zonos--collect-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--collect-footer .zonos--collect-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--collect-footer .zonos--collect-language-dialog.zonos--collect-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--collect-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile) .zonos--collect-locale-wrapper{display:none}:host(.mobile) .zonos--collect-footer{-ms-flex-pack:center;justify-content:center}";const O=class{constructor(t){o(this,t),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=S(this.mobile)}componentWillLoad(){this.handleWindowResize()}renderShippingAddress(){if(W.isFetchingShippingInfo)return t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},t("zonos-skeleton",{skeletonWidth:"99px"})),t("div",{class:"zonos--collect-order-shipping-info"},t("zonos-skeleton",{skeletonWidth:"152px"}),t("zonos-h-stack",{spacing:8},t("zonos-skeleton",{skeletonWidth:"75px"}),t("zonos-skeleton",{skeletonWidth:"75px"})),t("zonos-skeleton",{skeletonWidth:"50px"})));const o=W.shippingAddress;return o?t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Shipping address")),t("div",{class:"zonos--collect-order-shipping-info"},[[o.location.line1,o.location.line2].filter(Boolean).join(" "),[o.location.locality,o.location.administrativeAreaCode,o.location.postalCode].filter(Boolean).join(", "),o.location.countryCode].map((o=>t("zonos-text",null,o))))):null}render(){return t(n,{class:B(["zonos--collect-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},t("zonos-text",{type:"semiBoldLabel"},y("Order details")),(()=>t("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://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>',iconColor:"gray-1200"}))()),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--collect-order-details-content"},t("zonos-collect-cart-items",null),t("div",{class:"zonos--collect-order-info"},t("div",{class:"zonos--collect-order-details-row"},null!==W.amountTotalPaid&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Total paid")),t("zonos-text",null,U({amount:W.amountTotalPaid||0,isForeign:!0}))),W.originCompanyName&&t("div",{class:"zonos--collect-order-details-column"},t("zonos-text",{type:"smallHeader"},y("Ordered from")),t("zonos-text",null,W.originCompanyName||""))),this.renderShippingAddress()))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};O.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--collect-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:28px}:host .zonos--collect-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--collect-order-info .zonos--collect-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--collect-order-info .zonos--collect-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--collect-order-info .zonos--collect-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--collect-order-info .zonos--collect-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(t){o(this,t),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,t;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(t=a.stripeElements)||void 0===t||t.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,Z({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await V();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{z({currency:p.currency})}))],z({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),l=p.isStagingMode||I(),i="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(l){const o=w.appearance.theme;return t(s,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||W.isFetchingShippingInfo?null:t(s,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!i&&t(s,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):M("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:i?"block":"none"}})),e&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},y("Test cards")),t("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return l(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";const E=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=D(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return t(n,{key:"6432c5dd5afd628e33ba26385ecfecb470f1757e",class:B(["zonos--collect-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"e4d113ff1268c36119e1f80164b6cfd702c67f75",class:"zonos--title"},t("zonos-text",{key:"aad9ad9b526ac65d97a88df516e8e7b34fc3d2b1",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:w.organizationName}))),t("div",{key:"fcdaebc734a270742fbe21ff932550994e522ea6",class:"zonos--total-pay"},T({content:t("zonos-text",{type:"secondaryPageHeader"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};E.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';const Y=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.subtotals={},this.initSubtotalData=()=>{var o;const e=null===(o=p.checkoutSession)||void 0===o?void 0:o.subtotals;if(!e)return;const t=y("Duties"),s=y("Taxes"),n=y("Fees"),l={[t]:0,[n]:0,[s]:0},a=e.duties,i=e.taxes,c=e.fees;void 0!==a&&(l[t]||(l[t]=0),l[t]+=a),void 0!==i&&(l[s]||(l[s]=0),l[s]+=i),void 0!==c&&(l[n]||(l[n]=0),l[n]+=c),this.subtotals=l}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[f("checkoutSession",this.initSubtotalData),v("translatedChunks",this.initSubtotalData)]}render(){return this.initSubtotalData(),t(n,{key:"ab687a6e1ec67f6609081036a75e9905ff34c6b1",class:"zonos--collect-subtotal zonos--elements"},t("table",{key:"303b8c49983e9f7aea4d31400fed53d858eb078d",class:"zonos--collect-table"},!!this.subtotals[y("Duties")]&&t("tr",{key:"a60fa4f1f1afacef0144b86c054f44572576f7af",class:"zonos--row zonos--collect-duty"},t("td",{key:"aeaf798e26bbd482196d7208eb05657a1d15dad8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"835d817709ae3b7e2d888d618e0856fb2e637e4d",type:"semiBoldLabel"},y("Duties"))),t("td",{key:"5bb47a115ea61fa897a3f48bbd10c5f78af3703e",class:"zonos--column"}),t("td",{key:"32632c4beb855ca687c615f5e6c63c82e2e05c80",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Duties")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Taxes")]&&t("tr",{key:"055bb237dafaea8de18b127641c8fd7e1ece563b",class:"zonos--row zonos--collect-tax"},t("td",{key:"1e73b140c2c9090ccfb91ce4efca483e8fb56e9e",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"a3375ecd77460c78c7c5f59bf7b9b8612cd53e41",type:"semiBoldLabel"},y("Taxes"))),t("td",{key:"20685646be29873967c2f335c775046068248ad3",class:"zonos--column"}),t("td",{key:"2e2c6af2c1a7840df03351178ddf3107fcc36494",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Taxes")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),!!this.subtotals[y("Fees")]&&t("tr",{key:"8157aba5c6a23680b0bc681adc127747f01a2973",class:"zonos--row zonos--collect-fee"},t("td",{key:"8266654f9e65003f297222bb935013a8b9b3b430",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"8399000a5f61e4737764b68b89799b409dce6034",type:"semiBoldLabel"},y("Fees"))),t("td",{key:"2a9763f2401967ea1bdfa2c17514d18e2a4e0db6",class:"zonos--column"}),t("td",{key:"ac2f275312c2ba69888e6e57dde8b4b451839b86",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:this.subtotals[y("Fees")]||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"a293d1b9342251f7326c1ac68e2bab83eae2ed80",class:"zonos--row zonos--collect-spacing"},t("td",{key:"c136b1b807f32dc21c131326d70500d2e2c64efe",class:"zonos--column",colSpan:3})),t("tr",{key:"59747101f1a9ef7c8fad60e90ea5b8c31015438c",class:"zonos--row zonos--collect-total zonos--collect-total-subtotal"},t("td",{key:"96d201ba6f3e571adac265127229c94cdc96be2a",class:"zonos--column"}),t("td",{key:"f2f4cb751e35fc0ebaa803659f26a2314d8bf639",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"b4f89ea1e523af8a5aead4ef007a6f0dc7e7f441",type:"label"},y("Subtotal"))),t("td",{key:"28b6aea6363b2bef1d072ad77f409ae77976305c",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"label"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"}))),t("tr",{key:"f0072cdd200e8483421265af39a90fb655fb2ef0",class:"zonos--row zonos--collect-total"},t("td",{key:"88a007048d33c919a6c5f87cf7cd071f83e7448b",class:"zonos--column"}),t("td",{key:"24bba9e9b81ff443dd5ca4832c3169e3605a93b8",class:"zonos--column zonos--collect-subtotal-title"},t("zonos-text",{key:"594d4e96bec3a2153f6622c6842970ebee5bb463",type:"semiBoldLabel"},y("Customs fees total"))),t("td",{key:"b3ffd6dcae747dd2ed68ae16fb60d9655f7669dc",class:"zonos--column zonos--collect-subtotal-price"},T({content:t("zonos-text",{type:"semiBoldLabel"},U({amount:W.amountDutyTaxFeeTotal||0,isForeign:!0})),isLoading:W.isFetchingShippingInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};Y.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--collect-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--collect-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--collect-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--collect-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--collect-subtotal-price{text-align:right}:host .zonos--collect-subtotal-price zonos-text{white-space:nowrap}:host .zonos--collect-total .zonos--column{padding:16px 0}:host .zonos--collect-total-subtotal .zonos--collect-subtotal-title,:host .zonos--collect-total-subtotal .zonos--collect-subtotal-price{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--collect-subtotal-price zonos-text,:host .zonos--collect-pay-total zonos-text{white-space:nowrap}";export{$ as zonos_collect_finish,R as zonos_collect_footer,O as zonos_collect_order_details,N as zonos_collect_payment,E as zonos_collect_review,Y as zonos_collect_subtotal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-df316670.system.js","./p-9c6917ab.system.js","./p-fa5767c3.system.js","./p-23e7c655.system.js","./p-90b8c428.system.js","./p-45bd8072.system.js","./p-ac30b7a8.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-d18a2b2c.system.js","./p-7501c637.system.js"],(function(o){"use strict";var t,s,e,n,i,a,c,l,r;return{setters:[function(o){t=o.r;s=o.h;e=o.a},function(o){n=o.d},function(o){i=o.t},function(o){a=o.r},function(o){c=o.c},function(o){l=o.c},function(o){r=o.r},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var f=h;var d=o("zonos_invoice_cart_items",function(){function o(o){t(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=n.items.filter((function(o){return!o.isRestricted}));return s(e,{key:"33a10486833e881dd8405984cfc59611b064bef5",class:c(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},s("table",{key:"c6c3a6017050cc385bc5944e83ca8db1f2564884",class:"zonos--cart-table"},s("tbody",{key:"6a232dbdf2e6e6c58b65d6360c9190d720c7dc1f"},t.map((function(t){var e,n,c,l;var r=(n=(e=t.attributes)===null||e===void 0?void 0:e.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||n===void 0?void 0:n.value;var h=(l=(c=t.attributes)===null||c===void 0?void 0:c.find((function(o){return o.key==="invoiceCreatedAt"})))===null||l===void 0?void 0:l.value;var f=h&&o.locale?new Date(h).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var d=r?"https://dashboard.zonos.com/billing/invoices/".concat(r):null;return s("tr",{class:"zonos--invoice-cart-item"},s("td",{class:"zonos--column zonos--cart-item-title"},s("zonos-text",{type:"semiBoldLabel"},i("Invoice:"))),s("td",{class:"zonos--column zonos--cart-item-link"},d&&r&&s("zonos-link",{href:d},r),o.isMobile&&s("zonos-text",{type:"caption"},f)),s("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&s("zonos-text",{type:"label"},f)),s("td",{class:"zonos--column zonos--cart-item-price"},s("zonos-text",{type:"label"},a({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());d.style=f;var b=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var m=b;var u=o("zonos_invoice_subtotal",function(){function o(o){t(this,o);this.isMobile=false}o.prototype.render=function(){return s(e,{key:"99eaf74026ee26cc11ab78adf57f1b7eb55309d3",class:c(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},s("table",{key:"a3f9a029a979fd4afeaee02c55a49c4e6547e483",class:"zonos--invoice-table"},s("tr",{key:"bf8594623c4eb7492899647fbe3bc4fa0a8b1973",class:"zonos--row zonos--invoice-total"},s("td",{key:"b967b527461161244479ff8ac5ae40bdbd7f2b38",class:"zonos--column"}),s("td",{key:"4af6f40176c19c0aad1109a8be722a2b41fc66e9",class:"zonos--column zonos--invoice-subtotal-title"},s("zonos-text",{key:"0b01c51ddabd61c0abaf8214e05db2fe6a650941",type:"semiBoldLabel"},i("Payment total"))),s("td",{key:"00109c0948f0110c478643461a0a70a7cc2441ba",class:"zonos--column zonos--invoice-subtotal-price"},r({content:s("zonos-text",{type:"semiBoldLabel"},a({amount:l.amountTotalDue||0,isForeign:true})),isLoading:l.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());u.style=m}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-ac30b7a8.system.js","./p-23e7c655.system.js","./p-7501c637.system.js","./p-d18a2b2c.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var e,s,t,n,a,i,r,l;return{setters:[function(o){e=o.r;s=o.d;t=o.h;n=o.a},function(o){a=o.f},function(o){i=o.c},function(o){r=o.g},function(o){l=o.i},function(){}],execute:function(){var c=["blue","cyan","green","orange","purple","red","gray","glass"];var h=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var d=h;var f=0;var b=o("zonos_checkbox",function(){function o(o){e(this,o);this.checkboxSelected=s(this,"checkboxSelected",7);this.inputId="zonos--checkbox-".concat(++f);this.backgroundColor="blue";this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base"}o.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};o.prototype.render=function(){var o=this;var e=c.includes(this.backgroundColor);var s=e?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var h=e?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!l(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var d=r({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return t(n,{key:"c2a9023becafd6d19ad769d449383924c85c641f",class:i(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":d,"--zonos--font-family":a(),"--zonos--size":"".concat(this.size,"px")}},t("label",{key:"352e8bda93f1ac9a7a55ba7038e922626c3a9594",class:i([this.isDisabled&&"disabled"]),htmlFor:this.inputId},t("input",{key:"71d664f9d83345ad4c143f71209bdb0a2cb16745",checked:this.isChecked,disabled:this.isDisabled,hidden:true,id:this.inputId,onChange:function(e){o.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),t("span",{key:"c772c4e8dbbbef8035874616a0254fb4114a97c8",class:"checkmark-container"},t("svg",{key:"d497191975edeca268cc014431535f4befdd7b2c",class:"checkmark",color:h,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"15b26fdf72a058e81d4472d0c757a725c04e3f47","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&t("zonos-text",{key:"2d6015d16eda08dc39eff677f4858d2aed620891",size:this.fontSize},this.label)))};return o}());b.style=d;var u=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}: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 .wrapper{position:relative;border-radius:6px;background-color:var(--zonos-elements-gray-50);display:-ms-flexbox;display:flex}:host .zonos--toggle-selected-slider{z-index:1;position:absolute;background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}:host .zonos--option{background:transparent;border:0;z-index:2;cursor:pointer;padding:4px 12px;border-radius:6px;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-size:var(--zonos-elements-font-size-base);font-weight:500;color:var(--zonos-elements-text-color-secondary)}:host .zonos--option:focus{outline:none}:host .zonos--option:hover:not(.selected){color:var(--zonos-elements-text-color)}:host .zonos--option.selected{color:var(--zonos-elements-text-color);background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}";var m=u;var p=o("zonos_toggle",function(){function o(o){e(this,o);this.toggleChanged=s(this,"toggleChanged",7);this.options=[]}o.prototype.render=function(){var o=this;return t(n,{key:"e6be1b38ea1fd978a231a1c3dc85a92c1d86a24b",class:i(["zonos--elements zonos--toggle"]),style:{"--zonos--font-family":a()}},t("div",{key:"e9ccac29c3f653e3e9d81d336089d6aaea6bbf6c",class:"wrapper"},this.options.map((function(e){var s=e.value===o.value;return t("button",{class:i(["zonos--option",s&&"selected"]),key:e.value,onClick:function(){o.toggleChanged.emit(e.value)}},e.label)}))))};return o}());p.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ac30b7a8.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-ac30b7a8.system.js","./p-df316670.system.js","./p-9c6917ab.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var t,n,r,i,o,a,s,u,d,c,l;return{setters:[function(e){t=e.c;n=e.z},function(e){r=e.b;i=e.G;o=e.d;a=e.H},function(e){s=e.s},function(e){u=e.h;d=e.s;c=e.l},function(e){l=e.b}],execute:function(){var f=this;var v=t((function(){return{amountTotalDue:null,isFetchingPayorInfo:true,landedCostShortId:null,partyBillingId:null,payorAddress:null}})),h=v.reset,p=v.state;e("c",p);var _=e("a",(function(e){return __awaiter(f,[e],void 0,(function(e){var t,r,i,a,s;var c=e.landedCostId,l=e.retries,f=l===void 0?5:l;return __generator(this,(function(e){switch(e.label){case 0:p.isFetchingPayorInfo=true;return[4,u("/api/zonos-elements/invoice/get-payor-info-by-lc-id",{body:{landedCostId:c},method:"POST"})];case 1:a=e.sent();if(!a.errors.length)return[3,4];if(!(f>0))return[3,3];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:e.sent();return[2,_({landedCostId:c,retries:f-1})];case 3:return[2,null];case 4:p.landedCostShortId=((t=a.json)===null||t===void 0?void 0:t.landedCostShortId)||null;p.isFetchingPayorInfo=false;p.payorAddress=((r=a.json)===null||r===void 0?void 0:r.payor)||null;s=(i=o.checkoutSession)===null||i===void 0?void 0:i.subtotals;p.amountTotalDue=(s===null||s===void 0?void 0:s.items)||0;if(p.amountTotalDue===0){void d({endpoint:"INVOICE_NO_TOTAL_DUE",errors:[],metadata:{landedCostId:c,organizationId:n.organizationId}})}return[2]}}))}))}));var I=e("b",(function(){return __awaiter(f,void 0,void 0,(function(){var e,t,n,a,f,v,h,_,I,y;return __generator(this,(function(m){switch(m.label){case 0:if(!((e=r.stripeBillingAddressEventData)===null||e===void 0?void 0:e.complete)){return[2,{partiesCreated:false}]}f=(n=(t=o.checkoutSession)===null||t===void 0?void 0:t.landedCost)===null||n===void 0?void 0:n.rootId;if(!f){void d({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:l,cartId:window.Zonos.cartId,checkoutSessionId:s.checkoutSessionId}});return[2,{partiesCreated:false}]}if(!s.checkoutSessionId){void d({endpoint:"INVOICE_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:l,cartId:window.Zonos.cartId,landedCostRootId:f}});return[2,{partiesCreated:false}]}v=i({address:r.stripeBillingAddressEventData.value.address,firstName:r.stripeBillingAddressEventData.value.firstName,lastName:r.stripeBillingAddressEventData.value.lastName,name:r.stripeBillingAddressEventData.value.name,phone:r.stripeBillingAddressEventData.value.phone});h=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,u("/api/zonos-elements/create-billing-party",{body:{billingAddress:v,checkoutSessionId:s.checkoutSessionId,companyName:r.companyName,email:((a=r.stripeLinkEventData)===null||a===void 0?void 0:a.value.email)||"",isTest:h,rootId:f},method:"POST"})];case 1:_=m.sent(),I=_.errors,y=_.json;if(I.length||!y){c("Error occurs when creating billing party",JSON.stringify(I,null,2));void d({endpoint:"INVOICE_BILLING_PARTY_CREATE_FAILED",errors:["[INVOICE] Failed to create billing party"],metadata:{allLogs:l,cartId:window.Zonos.cartId,checkoutSessionId:s.checkoutSessionId,errors:I,json:y}});return[2,{partiesCreated:false}]}p.partyBillingId=y.billToPartyId;return[2,{partiesCreated:true}]}}))}))}));var y=e("i",(function(e){return __awaiter(f,void 0,void 0,(function(){var t;return __generator(this,(function(n){t=e.landedCost;if(!t){return[2,false]}o.landedCostData=[Object.assign(Object.assign({},e),{landedCost:Object.assign({},t),landedCostId:t.id})];return[2,a({applySubtotalsOnly:true,landedCostId:t.id,selectedShippingOption:t.shipmentRating})]}))}))}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as r}from"./p-e331a235.js";import{s as o}from"./p-e4d58bd7.js";import{l as s,h as e}from"./p-41dd1cb8.js";const t=async()=>{var t,d;const i=null===(t=r.partiesData.find((r=>"DESTINATION"===r.type)))||void 0===t?void 0:t.id,n=null===(d=r.partiesData.find((r=>"PAYOR"===r.type)))||void 0===d?void 0:d.id,a=o.checkoutSessionId;if(!a||!n||!i)return s("Missing required data",{billToPartyId:n,checkoutSessionId:a,shipToPartyId:i}),{errors:["Missing required data"],json:null};const l={billToPartyId:n,checkoutSessionId:a,shipToPartyId:i},{errors:c,json:p}=await e("/api/zonos-elements/place-test-order",{body:l,method:"POST"});return c.length||!p?(s("Error occurs when placing test order",c),{errors:c.map((r=>r.message)),json:null}):{errors:[],json:p}};export{t as p}
|