@zonos/elements 1.3.278 → 1.3.280
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-e8bc11a3.js → cart-0fa312a5.js} +1 -1
- package/dist/cjs/{collect-e6485168.js → collect-f9c4ca7c.js} +2 -2
- package/dist/cjs/formatStringWithLinks-c25b4018.js +24 -0
- package/dist/cjs/{hasInclusivePrice-798ce42d.js → hasInclusivePrice-95431bca.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-dff7ec81.js → invoice-ce757565.js} +2 -2
- package/dist/cjs/isSameHostCheckoutLink-6148cabb.js +28 -0
- package/dist/cjs/{localization-90650d7d.js → localization-7fded969.js} +40 -40
- package/dist/cjs/{paypal-77bd640c.js → paypal-57ab3ab6.js} +2 -2
- package/dist/cjs/{placeTestOrder-7767d119.js → placeTestOrder-35e0d3bd.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-66377cf5.js → renderCheckoutCurrency-41d48407.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +19 -7
- package/dist/cjs/zonos-checkout.cjs.entry.js +189 -13
- 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 +3 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -3
- 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-policy-consent_2.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +13 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +36 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +2 -2
- package/dist/collection/components/store/translationStore/strings.base.js +2 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +2 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +2 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +2 -2
- package/dist/collection/components/store/translationStore/strings.french.js +2 -2
- package/dist/collection/components/store/translationStore/strings.german.js +2 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +2 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +2 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +2 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +2 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +2 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +2 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +2 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +2 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +2 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +2 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +2 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +2 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +2 -2
- package/dist/collection/components/utils/checkout/buildBigcommerceRedirectUrl.js +6 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +144 -7
- package/dist/collection/components/utils/formatStringWithLinks.js +12 -6
- package/dist/collection/components/utils/isSameHostCheckoutLink.js +24 -0
- package/dist/collection/types/generated/graphql.internal.types.js +84 -0
- package/dist/esm/{cart-8b8dc79f.js → cart-4699e6ab.js} +2 -2
- package/dist/esm/{collect-f4965586.js → collect-24cc2e12.js} +2 -2
- package/dist/esm/formatStringWithLinks-0d48f183.js +22 -0
- package/dist/esm/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-f81ddcd6.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-b7a1fb14.js → invoice-575dc93d.js} +2 -2
- package/dist/esm/isSameHostCheckoutLink-c1b88ab7.js +26 -0
- package/dist/esm/{localization-d49867ed.js → localization-da2f407f.js} +40 -40
- package/dist/esm/{paypal-da551105.js → paypal-d4436abd.js} +2 -2
- package/dist/esm/{placeTestOrder-4309b170.js → placeTestOrder-d87b2c6a.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-08526996.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +19 -7
- package/dist/esm/zonos-checkout.entry.js +189 -13
- 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 +3 -2
- package/dist/esm/zonos-hello-dialog.entry.js +4 -3
- 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-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/{cart-8b8dc79f.js → cart-4699e6ab.js} +1 -1
- package/dist/esm-es5/{collect-f4965586.js → collect-24cc2e12.js} +1 -1
- package/dist/esm-es5/formatStringWithLinks-0d48f183.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-f81ddcd6.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-b7a1fb14.js → invoice-575dc93d.js} +1 -1
- package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +1 -0
- package/dist/esm-es5/localization-da2f407f.js +1 -0
- package/dist/esm-es5/{paypal-da551105.js → paypal-d4436abd.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-4309b170.js → placeTestOrder-d87b2c6a.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-08526996.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.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-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-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-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +1 -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/store/translationStore/strings.arabic.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +1 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +1 -1
- package/dist/types/components/utils/isSameHostCheckoutLink.d.ts +14 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +84 -0
- package/dist/types/types/generated/graphql.internal.types.ts +85 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-02065a08.system.js → p-016b5bde.system.js} +1 -1
- package/dist/zonos-elements/{p-6fae9835.system.entry.js → p-0adab1d5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0d2f81ce.system.js +1 -0
- package/dist/zonos-elements/p-11206fe2.js +1 -0
- package/dist/zonos-elements/{p-0402af0d.entry.js → p-12452213.entry.js} +1 -1
- package/dist/zonos-elements/{p-5827c868.entry.js → p-19f4e77a.entry.js} +1 -1
- package/dist/zonos-elements/{p-2aecc055.entry.js → p-1bb85ff1.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c76ef2a.js → p-275fa2da.js} +1 -1
- package/dist/zonos-elements/{p-8b42245d.entry.js → p-28b1c189.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/p-2b97f7ed.js +1 -0
- package/dist/zonos-elements/{p-647438d6.system.js → p-2dbdf883.system.js} +1 -1
- package/dist/zonos-elements/{p-5afea02c.system.entry.js → p-3068247c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7614ea6f.system.entry.js → p-362215b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-39e2642f.js +1 -0
- package/dist/zonos-elements/p-3f8f4c78.js +1 -0
- package/dist/zonos-elements/{p-d5945ddc.entry.js → p-3f90cb36.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf0148ae.system.js → p-40a0c1d3.system.js} +1 -1
- package/dist/zonos-elements/{p-abf61f6f.system.entry.js → p-43a14674.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7cb9ef6.system.entry.js → p-46f88c11.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-998f9df5.system.entry.js → p-564c7bb5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5b54f10c.entry.js +1 -0
- package/dist/zonos-elements/p-6197aa73.system.entry.js +1 -0
- package/dist/zonos-elements/{p-b36205f4.entry.js → p-6451537c.entry.js} +1 -1
- package/dist/zonos-elements/p-65fe75e1.entry.js +1 -0
- package/dist/zonos-elements/{p-5bc43687.system.entry.js → p-66223935.system.entry.js} +1 -1
- package/dist/zonos-elements/p-67426156.system.js +1 -0
- package/dist/zonos-elements/{p-2654556b.js → p-67b2e46c.js} +1 -1
- package/dist/zonos-elements/p-6bea1787.entry.js +1 -0
- package/dist/zonos-elements/{p-cd41b16b.system.entry.js → p-7237ec6f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0745e440.entry.js → p-72c1bd64.entry.js} +1 -1
- package/dist/zonos-elements/p-75da4ba0.entry.js +1 -0
- package/dist/zonos-elements/{p-3f380c8f.system.js → p-788a16bb.system.js} +1 -1
- package/dist/zonos-elements/p-79b6070a.js +1 -0
- package/dist/zonos-elements/{p-77fa437c.entry.js → p-807e7ebc.entry.js} +1 -1
- package/dist/zonos-elements/{p-43815edd.system.entry.js → p-81c4f04a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8bd37d3b.entry.js → p-85796e67.entry.js} +1 -1
- package/dist/zonos-elements/p-94329e56.js +1 -0
- package/dist/zonos-elements/{p-ed676ad1.system.entry.js → p-944148db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8c79850.js → p-96e7b465.js} +1 -1
- package/dist/zonos-elements/{p-32278945.system.js → p-a30f03d6.system.js} +1 -1
- package/dist/zonos-elements/{p-ac59f5c1.system.entry.js → p-a5afcea1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-293183c1.system.entry.js → p-a7f0e824.system.entry.js} +1 -1
- package/dist/zonos-elements/p-aff7112b.entry.js +1 -0
- package/dist/zonos-elements/p-b05da593.system.entry.js +1 -0
- package/dist/zonos-elements/p-b330e451.system.js +1 -0
- package/dist/zonos-elements/{p-12a08423.system.entry.js → p-b6049eef.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b6cd6e62.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7365e22c.system.js → p-b8c019b9.system.js} +1 -1
- package/dist/zonos-elements/p-c2014d57.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ee434a71.entry.js → p-c4a479ad.entry.js} +1 -1
- package/dist/zonos-elements/{p-4e6e9a3c.system.entry.js → p-cf0c8c77.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f44a3338.entry.js → p-db9cb522.entry.js} +1 -1
- package/dist/zonos-elements/{p-9beb2624.entry.js → p-dbd5be5d.entry.js} +1 -1
- package/dist/zonos-elements/p-dff1d3be.entry.js +1 -0
- package/dist/zonos-elements/{p-7e8aba66.system.entry.js → p-ec53c436.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-74ebd766.js → p-f3759c70.js} +1 -1
- package/dist/zonos-elements/{p-5e09c22d.system.js → p-f55a2352.system.js} +1 -1
- package/dist/zonos-elements/{p-8d87e748.entry.js → p-fc2d5dd9.entry.js} +1 -1
- package/dist/zonos-elements/p-fd2d4d04.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/formatStringWithLinks-52341fc7.js +0 -17
- package/dist/esm/formatStringWithLinks-9e819405.js +0 -15
- package/dist/esm-es5/formatStringWithLinks-9e819405.js +0 -1
- package/dist/esm-es5/localization-d49867ed.js +0 -1
- package/dist/zonos-elements/p-21d925d7.entry.js +0 -1
- package/dist/zonos-elements/p-2d6557ee.system.js +0 -1
- package/dist/zonos-elements/p-32704baa.js +0 -1
- package/dist/zonos-elements/p-3cf22558.entry.js +0 -1
- package/dist/zonos-elements/p-45e1c33b.entry.js +0 -1
- package/dist/zonos-elements/p-5d3ea491.system.entry.js +0 -1
- package/dist/zonos-elements/p-6b4ef7e0.entry.js +0 -1
- package/dist/zonos-elements/p-73d3fa61.entry.js +0 -1
- package/dist/zonos-elements/p-7522ec43.js +0 -1
- package/dist/zonos-elements/p-9fab45aa.system.js +0 -1
- package/dist/zonos-elements/p-a87561b8.js +0 -1
- package/dist/zonos-elements/p-c209e36d.js +0 -1
- package/dist/zonos-elements/p-d7bda14d.js +0 -1
- package/dist/zonos-elements/p-d93991c3.system.entry.js +0 -1
- package/dist/zonos-elements/p-e6165cc2.system.js +0 -1
- package/dist/zonos-elements/p-eb9369b9.system.entry.js +0 -1
- package/dist/zonos-elements/p-f3a73132.entry.js +0 -1
- package/dist/zonos-elements/p-ffbf87c8.system.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,F as t,a as s}from"./p-ce75b047.js";import{s as n,a as i,b as c,i as r,c as a,d,e as l,f as u,p as h,g as m,h as p,j as g,k as f,l as w,t as z,m as k,n as v,o as y,q as b,r as C,u as S,v as x,w as I,x as T,y as A,z as O,A as _,B as L,C as P,D as U,E as B,F as E,G as D,H as N,I as j}from"./p-2654556b.js";import{p as R,s as $,a as F,b as M}from"./p-a8c79850.js";import{f as H,a as K,b as Z,i as V,l as G,c as W,g as Q,s as Y,V as q,d as J,t as X,e as oo,h as eo}from"./p-d7bda14d.js";import{z as to,g as so,m as no}from"./p-9a417eeb.js";import{b as io}from"./p-83666056.js";import{h as co,g as ro,j as ao,l as lo,b as uo,s as ho,a as mo,i as po}from"./p-41dd1cb8.js";import{u as go}from"./p-1735a69b.js";import{l as fo,g as wo,b as zo}from"./p-0a377722.js";import{_ as ko,c as vo,a as yo,d as bo,g as Co}from"./p-b2d81c98.js";import{c as So}from"./p-b4b7f705.js";import{c as xo}from"./p-595f5dd2.js";import{g as Io}from"./p-f1aea919.js";import{i as To}from"./p-34d6eb83.js";import{s as Ao}from"./p-96d77739.js";import{R as Oo}from"./p-08e7107d.js";import"./p-6b361d2b.js";import"./p-5c30d04b.js";import"./p-3d28353a.js";import"./p-7bdce9d4.js";const _o="isInternationalCheckout",Lo=({action:o}={})=>{const e=new URL("/login.php",window.location.origin);o&&e.searchParams.set("action",o);const t=new URLSearchParams(window.location.search),s=t.get("zonosQaUrl");s&&e.searchParams.set("zonosQaUrl",s);const n=t.get("zonosQaUrlApi");return n&&e.searchParams.set("zonosQaUrlApi",n),ro()&&e.searchParams.set("zonosTestMode","1"),e.searchParams.set("from",(()=>{const o=new URLSearchParams;o.set(_o,"true");const e=new URLSearchParams(window.location.search),t=e.get("zonosQaUrl");t&&o.set("zonosQaUrl",t);const s=e.get("zonosQaUrlApi");return s&&o.set("zonosQaUrlApi",s),ro()&&o.set("zonosTestMode","1"),`cart.php?${o.toString()}`})()),e.toString()},Po=o=>{const e=new URL(o,window.location.origin),t=new URLSearchParams(window.location.search).get("zonosQaUrl");return t&&e.searchParams.set("zonosQaUrl",t),ro()&&e.searchParams.set("zonosTestMode","1"),e.toString()},Uo={customerGroupId:null,shouldBypass:!1};let Bo=null;const Eo=o=>{const e=(async o=>{var e,t,s,n;if(!window.Zonos.isBigCommerce)return{conclusive:!0,result:Uo};const i=null===(e=to.genericSettings)||void 0===e?void 0:e.bigcommerceBypassCustomerGroupIds;if(!(null==i?void 0:i.length))return to.loadedConfig?{conclusive:!0,result:Uo}:{conclusive:!1,result:Uo};const c=o?o.checkoutId:await K();if(!c)return fo("BigCommerce bypass check: no active cart yet, will retry on next call","info"),{conclusive:!1,result:Uo};const r=o?o.checkout:await Z(c);if(!r)return fo("BigCommerce bypass check: failed to fetch checkout data, will retry","info"),{conclusive:!1,result:Uo};const a=null!==(n=null===(s=null===(t=r.customer)||void 0===t?void 0:t.customerGroup)||void 0===s?void 0:s.id)&&void 0!==n?n:null;if(null===a)return fo("BigCommerce bypass check: no customer group found (guest user)","info"),{conclusive:!0,result:Uo};const d=i.includes(a),l={customerGroupId:a,shouldBypass:d};return fo(d?`BigCommerce bypass check: customer group ${String(a)} is in bypass list; caller should keep the user on BC native checkout`:`BigCommerce bypass check: customer group ${String(a)} is not in bypass list`,"info"),{conclusive:!0,result:l}})(o),t=e.then((({conclusive:o,result:e})=>(o||Bo!==t||(Bo=null),e)));return Bo=t,t},Do=async(o={})=>o.forceRefresh||!Bo?Eo(o.preFetched):Bo,No={guestCheckoutType:null},jo="zonos--bc-checkout-settings",Ro={redirectUrl:null,shouldForceLogin:!1};let $o=null;const Fo=()=>{if(!$o){const o=(async()=>{var o;if(!window.Zonos.isBigCommerce)return No;const e=null===(o=to.checkoutSettings.bigCommerceConfig)||void 0===o?void 0:o.storeHash;if(!e)return fo("BigCommerce checkout settings: no storeHash provided — skipping fetch","info"),No;const t=(o=>{try{const e=window.localStorage.getItem(jo);if(!e)return null;const t=ao(e);return t?t.storeHash!==o||t.expiresAt<Date.now()?null:{guestCheckoutType:t.guestCheckoutType}:null}catch(o){return null}})(e);if(t)return t;const{errors:s,json:n}=await co("/api/bigcommerce/checkout-settings",{body:{storeHash:e},method:"POST"});if(s.length||!n)return fo("BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior","info"),No;const i={guestCheckoutType:n.guestCheckoutType};return((o,e)=>{try{const t={expiresAt:Date.now()+36e5,guestCheckoutType:e.guestCheckoutType,storeHash:o};window.localStorage.setItem(jo,JSON.stringify(t))}catch(o){}})(e,i),i})().then((({guestCheckoutType:e})=>e?"no_guest_checkout"===e:($o===o&&($o=null),!1))).catch((()=>($o===o&&($o=null),!1)));$o=o}return $o},Mo=async({preFetched:o}={})=>{if(!window.Zonos.isBigCommerce)return Ro;if(!await Fo())return Ro;const e=o?o.checkoutId:await K();if(!e)return Ro;const t=o?o.checkout:await Z(e);return t?V(t)?Ro:(fo("BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php","info"),{redirectUrl:Lo(),shouldForceLogin:!0}):(fo("BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue","info"),Ro)},Ho="data-zonos-login-from-rewritten",Ko='a[href*="login.php?action=create_account"]:not(['+Ho+"])",Zo=()=>{const o=document.querySelectorAll(Ko);if(!o.length)return;const e=Lo({action:"create_account"});o.forEach((o=>{o.setAttribute("href",e),o.setAttribute(Ho,"true")}))},Vo=(o,e)=>{if(!o.address1||!o.countryCode)return null;const t=[o.firstName,o.lastName].filter(Boolean).join(" ").trim();return{address:{city:o.city||"",country:o.countryCode,line1:o.address1,line2:o.address2||"",postal_code:o.postalCode||"",state:o.stateOrProvinceCode||o.stateOrProvince||""},email:e,name:t,phone:o.phone||""}},Go=o=>[o.address.line1,o.address.line2||"",o.address.postal_code,o.address.country].join("|").toLowerCase(),Wo=(o=!0,e)=>{var t;if(!G.localizationLoaded)return!1;if(e){const s=!!(null===(t=G.shippingZoneCountries)||void 0===t?void 0:t[e])&&!to.disabledCountries.includes(e);return o&&!s&&fo(`Checkout: ${e} is not a shippable country: ${s}`),s}return!!G.isShippableCountry||(o&&fo("Checkout: not shippable country"),!1)},Qo='select[name="shippingAddress.countryCode"]';let Yo=0;const qo=o=>{var e;const t=null===(e=Y.enabledVariantTestKeys)||void 0===e?void 0:e.find((e=>e.testKey===o));return(null==t?void 0:t.selectedVariantKey)||null},Jo=async({cartId:o,retries:e})=>{const t=ro(),{errors:s,json:n}=await co("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(fo("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),Jo({cartId:o,retries:e-1})):i?null:n},Xo='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',oe=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.isRedirectAfterOrder=!1,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.isOverlayLoading=!1,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.shouldShowFedexShippingConsentDialog=!1,this.detectedDomesticCheckoutDialogOpen=!1,this.redirectToDomesticCheckoutDialogOpen=!1,this.loggedInIntlAddressConfirmDialogOpen=!1,this.loggedInIntlAddressResolver=null,this.clientSecret=c.clientSecret,this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||to.appearance.theme;await r({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:R()})},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${vo}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return fo("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(fo("Payment intent exist, checking stripe payment intent status"),!n)return fo("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:r,status:d}=await a({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(fo(r?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,Y.checkoutSessionId=i,c.clientSecret=n,this.setToFinishStep(d),{shouldAllowOrder:!1}):t?(fo("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(fo("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.initializeTestKeys=()=>{var o;Y.enabledVariantTestKeys=(null==(o=Y.enabledVariantTestKeys||[])?void 0:o.filter((o=>!(o.expiresAt&&o.expiresAt<Date.now()||!o.expiresAt))))||[];const e=to.enabledVariantTestKeys.map((o=>{var e;const t=null===(e=Y.enabledVariantTestKeys)||void 0===e?void 0:e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+q,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}}));return J(e),{allSelected:!1}},this.shouldAllowHostedVsNativeTest=()=>"function"==typeof to.checkoutSettings.createCartId&&!!to.enabledVariantTestKeys.includes("hosted_vs_native"),this.registerTestHostedVsNative=async()=>{if(!this.shouldAllowHostedVsNativeTest())return;fo("[TEST] - Registering hosted vs native test");const o=qo("hosted_vs_native");if(o)return void fo(`[TEST] - Hosted vs native test already has variant selected: ${o}`);const e=await(async({testKeys:o})=>{if(0===o.length)return null;const{errors:e,json:t}=await co("/api/zonos-elements/select-variance-test",{body:{testKeys:o},method:"POST"});return e.length||!t?null:H(t)})({testKeys:["hosted_vs_native"]});if(!e)return void fo("[TEST] - Failed to get selection for hosted vs native test");const t=(({baseTestObj:o,mergeTestObj:e})=>o.map((({testKey:o})=>{const t=e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+q,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}})))({baseTestObj:Y.enabledVariantTestKeys||[],mergeTestObj:e});J(t)},this.handleHostedVsNative=async()=>{var o;if(!this.shouldAllowHostedVsNativeTest())return{redirected:!1};const e=qo("hosted_vs_native");if(fo(`[TEST] - hosted_vs_native: ${e}`),"function"!=typeof to.checkoutSettings.createCartId)return fo("[TEST] - createCartId is not provided, skipping hosted vs native test"),{redirected:!1};if("hosted"!==e)return fo("[TEST] - Hosted vs native test is enabled for native, skipping"),{redirected:!1};if(!(null===(o=to.genericSettings)||void 0===o?void 0:o.hostedCheckoutUrl))return fo("[TEST] - Hosted checkout URL is not provided"),{redirected:!1};fo('"createCartId" is provided, start building cart');const t=await to.checkoutSettings.createCartId();let s,n=null;"object"==typeof t?(s=t.cartId,n=t.shippingData||null):s=t;const i=(()=>{const o=new URLSearchParams(window.location.search);fo("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:""},t=Q(o)||G.selectedCountryCode||"US",s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerPhone"),d=e("customerZip"),l=e("customerState");return{customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:e("customerFirstName"),customerLastName:e("customerLastName"),customerName:r,customerPhone:a,customerState:l,customerZip:d}})(),c=(({cartId:o,checkoutSessionId:e,customerAddress1:t,customerAddress2:s,customerCity:n,customerCountry:i,customerEmail:c,customerFirstName:r,customerLastName:a,customerPhone:d,customerState:l,customerZip:u,hostedCheckoutUrl:h,isTestMode:m,isVariantTest:p})=>{const g=new URLSearchParams;return g.set("tempCartUUID",o),r&&g.set("customerFirstName",r),a&&g.set("customerLastName",a),c&&g.set("customerEmail",c),d&&g.set("customerPhone",d),u&&g.set("customerZip",u),n&&g.set("customerCity",n),l&&g.set("customerState",l),i&&g.set("zCountry",i),t&&g.set("customerAddress1",t),s&&g.set("customerAddress2",s),m&&g.set("zonosTestMode","1"),e&&g.set("zonosCheckoutSessionId",e),p&&g.set("zonosVariantTest","1"),`${h}?${g.toString()}`})(Object.assign(Object.assign({cartId:s,checkoutSessionId:Y.checkoutSessionId||void 0,hostedCheckoutUrl:to.genericSettings.hostedCheckoutUrl,isTestMode:ro(),isVariantTest:!0},i),n));return fo(`[TEST] - Redirecting to: ${c}`),window.open(c,"_blank"),{redirected:!0}},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(d.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=d.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.prefillBigCommerceCustomerAddresses=async()=>{if(!window.Zonos.isBigCommerce)return;if(this.defaultCustomerProfileAddress.length)return;if(Array.isArray(this.defaultAddress)&&this.defaultAddress.length>0||!Array.isArray(this.defaultAddress)&&"object"==typeof this.defaultAddress&&null!==this.defaultAddress)return;const o=await K();if(!o)return;const e=await Z(o);if(!V(e))return;const t=((o,e)=>{var t,s,n,i;if(!(null===(t=null==o?void 0:o.customer)||void 0===t?void 0:t.id))return[];const{isShippable:c,selectedCountryCode:r}=e,a=o.customer.email||"",d=null!==(n=null===(s=o.consignments)||void 0===s?void 0:s.flatMap((o=>o.shippingAddress?[o.shippingAddress]:[])))&&void 0!==n?n:[],l=null!==(i=o.customer.addresses)&&void 0!==i?i:[],u=new Set,h=[];for(const o of[...l,...d]){const e=Vo(o,a);if(!e)continue;if(!c(e.address.country))continue;const t=Go(e);u.has(t)||(u.add(t),h.push(e))}return r?h.map(((o,e)=>({index:e,option:o}))).sort(((o,e)=>{const t=o.option.address.country===r;return t===(e.option.address.country===r)?o.index-e.index:t?-1:1})).map((o=>o.option)):h})(e,{isShippable:o=>Wo(!1,o),selectedCountryCode:G.selectedCountryCode||void 0});t.length&&(this.defaultCustomerProfileAddress.length||(this.defaultCustomerProfileAddress=t,fo(`Prefilled ${String(t.length)} BigCommerce customer address(es) for logged-in shopper`,"info")))},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.handleHostedOpenWindowCallback=o=>{var e;const t=null===(e=to.genericSettings)||void 0===e?void 0:e.hostedCheckoutUrl;if(!origin)return;const s=["dev.checkout.elements.zonos.com"].some((e=>o.origin.includes(e)));o.origin!==t&&!s||"zonos-checkout-session-update"!==o.data.type||(Y.checkoutSessionId=o.data.checkoutSessionId)},this.captureParamsRedirectedForVariantTest=()=>{const o=new URL(window.location.href);if("1"!==o.searchParams.get("zonosVariantTest"))return;const e=o.searchParams.get("zonosCheckoutSessionId");e&&(Y.checkoutSessionId=e);const t=Y.enabledVariantTestKeys||[];window.Zonos.isLegacyCheckout&&(qo("hosted_vs_native")?J(t.map((o=>"hosted_vs_native"===o.testKey?Object.assign(Object.assign({},o),{selectedVariantKey:"hosted"}):o))):(t.push({expiresAt:Date.now()+q,selectedVariantKey:"hosted",testKey:"hosted_vs_native"}),J(t))),o.searchParams.delete("zonosCheckoutSessionId"),o.searchParams.delete("zonosVariantTest"),window.history.replaceState({},"",o.toString())}}async initCartInfoHandler(o){l({adjustments:d.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,$({event:"zonos-checkout-close",metadata:{checkoutSessionId:Y.checkoutSessionId}}),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==d.step||u(),this.preview||h(),d.step="customer-info",m(),p(),null===(t=(e=to.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof to.checkoutSettings.createCartId){fo('"createCartId" is provided, start building cart'),d.customMessage=[];const o=await to.checkoutSettings.createCartId();let e;"object"==typeof o?(fo("object detected, use cartId and prefill address from createCartId","info",o),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),d.customerAuthenticationToken=o.customerAuthenticationToken||null,d.customMessage=Array.isArray(o.customMessage)?o.customMessage.filter((o=>"string"==typeof o)):[]):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=ko(o);if(!t&&!e)return lo("[ZONOS - loadZonos] invalid cart id"),null;const s=await Jo({cartId:o,retries:5});return fo("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(lo("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return lo("Failed to build cart, please try again."),!1;window.Zonos.cartData=s;const{adjustments:n,cartItems:i}=io(s);await l({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){fo("tempCartUUID is provided, start building cart");const{adjustments:o,cartItems:e}=io(window.Zonos.cartData);await l({adjustments:o,cartItems:e})}else if(to.checkoutSettings.buildCartDetail&&G.selectedCountryCode){fo("build cart detail");const o=await to.checkoutSettings.buildCartDetail({countryCode:G.selectedCountryCode,currencyCode:G.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0));fo("cartItems","info",{cartItems:o});const s=t.map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await l({adjustments:s,cartItems:e})}if(!Y.checkoutSessionId){const o=await g();if(fo(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}d.isStagingMode||f(),await this.applyStripeTheme();const{successBehavior:o,successRedirectUrl:e}=to.checkoutSettings;return this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===o||"CLOSE_MODAL"===o&&!!e||!!d.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=ao(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;fo(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return fo(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,fo("=== Showing order duplication confirmation","warn")}recordCheckoutInfo(){Y.checkoutSessionId&&go({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:Y.checkoutSessionId})}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,Y.checkoutSessionId&&go({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:Y.checkoutSessionId})}markTheSessionAsAbandonedCart(){Y.checkoutSessionId&&go({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:Y.checkoutSessionId})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||to.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=to.checkoutSettings.placeOrderButtonSelector,e=to.checkoutSettings.alwaysTriggerInternationalCheckoutSelector,t=!!document.querySelector(`#${vo}`);if(fo(`attach checkout ${o}`),fo(`attach checkout to always trigger international checkout selector: ${e}`),!(o||e||window.Zonos.cartData||t))return;const s=[o,e,`#${bo}`,`#${vo}`,`#${yo}`].filter(Boolean);document.querySelectorAll(s.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(fo(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s,n;const i=performance.now(),r=e&&t.matches(e),a=t.matches(`#${yo}`),l=t.matches(`#${bo}`)||t.matches(`#${vo}`);if(!window.Zonos.isLegacyCheckout&&(!Wo()||((o=!0)=>!G.localizationLoaded||!!G.isDisabledCountry&&(o&&fo("Checkout: disabled country"),!0))())&&!r&&!a&&!l)return;o.preventDefault(),o.stopPropagation(),fo("zonos checkout button clicked");const{shouldAllowOrder:u}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(u){if(window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;fo("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await co("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),Yo++,Yo>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),to.enabledVariantTestKeys.includes("hosted_vs_native")){this.isOverlayLoading=!0,await this.registerTestHostedVsNative();const{redirected:o}=await this.handleHostedVsNative();if(this.isOverlayLoading=!1,o)return}if(window.Zonos.isBigCommerce){const{shouldBypass:o}=await Do();if(o)return fo("Bypass customer group detected, redirecting to BigCommerce native checkout","info"),void(window.location.href=Po("/checkout"));const e=await Mo();if(e.shouldForceLogin&&e.redirectUrl)return void(window.location.href=e.redirectUrl)}c.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");null===(s=window.opener)||void 0===s||s.postMessage({checkoutSessionId:Y.checkoutSessionId,type:"zonos-checkout-session-update"},"*"),w({isPreview:this.preview,sessionTimeout:54e5}),$({event:"zonos-checkout-start",metadata:{checkoutSessionId:Y.checkoutSessionId}}),z({checkoutSessionId:Y.checkoutSessionId,eventName:"checkout_open"});const{enabled:o}=await(async()=>{const{errors:o,json:e}=await co("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(d.shouldHideDiscountInput=!o,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=wo(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:zo},uo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};co("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:zo},uo()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};co("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}this.recordCheckoutInfo(),Co()&&this.markTheSessionAsAbandonedCart()}catch(o){if(o instanceof Error&&"Cart is expired."===o.message&&(this.isCartExpired=!0),c.isFetchingSession=!1,lo(o),this.isCartExpired)return void(c.isFetchingSession=!0);ho({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:zo,cartId:window.Zonos.cartId,checkoutSessionBody:k(),href:window.location.href,storeBaseUrl:(null===(n=window.Zonos.cartData)||void 0===n?void 0:n.storeBaseUrl)||to.onlineStoreSettings.url}}),v({messages:[X("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:X("Error creating Checkout")})}}}),{capture:!0,passive:!1}),to.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${bo}`)&&(t.dispatchEvent(xo("click")),y(),t.remove()),t.matches(`#${vo}`)&&(t.dispatchEvent(xo("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;fo("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:n,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u}=o,h=new URLSearchParams(window.location.search),m=n||Q(h)||G.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:m,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:u})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);fo("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=Q(o)||G.selectedCountryCode,s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerFirstName"),d=e("customerLastName"),l=e("customerPhone"),u=e("customerZip"),h=e("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:a,customerLastName:d,customerName:r,customerPhone:l,customerState:h,customerZip:u})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",n=o.customerCity||"",i=o.customerEmail||"",c=o.customerFirstName&&o.customerLastName?`${o.customerFirstName} ${o.customerLastName}`:o.customerName||"",r=o.customerPhone||"",a=o.customerZip||"",d=o.customerState||"";e&&c&&r&&t?t&&G.shippingZoneCountries&&!(t in G.shippingZoneCountries)?fo(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:n||"",country:t,line1:e,line2:s,postal_code:a,state:d},email:i,name:c,phone:r}],fo("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):fo("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!r&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){d.isStagingMode=!!this.overrideStagingMode}async init(){c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,d.isStagingMode=mo(),void 0!==this.overrideStagingMode&&(d.isStagingMode=this.overrideStagingMode),(()=>{var o;if(!window.Zonos.isBigCommerce)return;const e=null===(o=to.genericSettings)||void 0===o?void 0:o.bigcommerceBypassCustomerGroupIds;(null==e?void 0:e.length)&&Eo()})(),window.Zonos.isBigCommerce&&Fo(),(()=>{if(!window.Zonos.isBigCommerce)return;if(!window.location.pathname.includes("/login.php"))return;Zo();const o=new MutationObserver((()=>{Zo()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>o.disconnect()),1e4)})(),this.handleBigcommerceInternationalResumeFlag(),this.prefillBigCommerceCustomerAddresses(),(({domesticRedirectedBtnSelector:o,onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const c=async o=>{var t;const s=document.querySelector((null===(t=to.genericSettings)||void 0===t?void 0:t.bigcommerceDomesticCheckoutCountrySelector)||Qo),n=(null==s?void 0:s.value)||o;if(!n)return!1;if(!Wo(!1,n))return!1;const c=await K(),r={checkout:c?await Z(c):null,checkoutId:c},{shouldBypass:a}=await Do({forceRefresh:!0,preFetched:r});if(a)return fo("Bypass customer group detected on BC checkout, stopping interval","info"),!0;const d=await Mo({preFetched:r});if(d.shouldForceLogin&&d.redirectUrl)return window.location.href=d.redirectUrl,!0;e&&await e(),W({isInitializing:!1,newSelectedCountryCode:n});const l={address1:"",address2:"",city:"",countryCode:n,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};return i({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),window.location.href=Po("/"),!0};let r=!1,a=!1,d=!1,l=!1,u=!1;const h=new MutationObserver((async()=>{var m;const p=document.querySelector(o),g=n();if(!p&&g){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(g),void h.disconnect()}if(!window.location.pathname.includes("/checkout")||!window.Zonos.isBigCommerce)return void h.disconnect();if(!l&&!d){d=!0,u=!0;try{const o=await(async({onInternationalCheckoutSelected:o,onLoggedInInternationalAddressDetected:e})=>{var t,s,n,c,r,a,d,l,u,h;const m=await K();if(!m)return"noAction";const p=await Z(m),g={checkout:p,checkoutId:m},{shouldBypass:f}=await Do({preFetched:g});if(f)return"noAction";const w=null===(s=null===(t=null==p?void 0:p.consignments)||void 0===t?void 0:t[0])||void 0===s?void 0:s.shippingAddress;if(!(null==w?void 0:w.countryCode))return"noAction";const z=w.countryCode;if(!Wo(!1,z))return"noAction";if(fo(e?`Logged-in user has international shipping address: ${z}, prompting user to choose checkout`:`Logged-in user has international shipping address: ${z}, redirecting automatically (legacy behavior)`,"info"),e&&"stay"===await e())return fo("User opted to stay on BigCommerce native checkout despite international default address","info"),"optedOut";const k=await Mo({preFetched:g});return k.shouldForceLogin&&k.redirectUrl?(window.location.href=k.redirectUrl,"redirected"):(o&&await o(),W({isInitializing:!1,newSelectedCountryCode:z}),i({address1:null!==(n=w.address1)&&void 0!==n?n:"",address2:null!==(c=w.address2)&&void 0!==c?c:"",city:null!==(r=w.city)&&void 0!==r?r:"",countryCode:z,firstName:null!==(a=w.firstName)&&void 0!==a?a:"",lastName:null!==(d=w.lastName)&&void 0!==d?d:"",phone:null!==(l=w.phone)&&void 0!==l?l:"",postalCode:null!==(u=w.postalCode)&&void 0!==u?u:"",state:null!==(h=w.stateOrProvince)&&void 0!==h?h:""}),window.location.href=Po("/"),"redirected")})({onInternationalCheckoutSelected:e,onLoggedInInternationalAddressDetected:t});if("redirected"===o)return void h.disconnect();"optedOut"===o&&(l=!0)}catch(o){lo("Error checking logged-in user shipping address",o)}finally{d=!1,u=!1}}const f=document.querySelector((null===(m=to.genericSettings)||void 0===m?void 0:m.bigcommerceDomesticCheckoutCountrySelector)||Qo);if(!f)return;if(fo("Domestic checkout found - Listening for shipping country change","info",{value:f.value}),a)return;a=!0,h.disconnect();const w=setInterval((async()=>{if(!r&&!u){r=!0;try{if(await c())return void clearInterval(w);r=!1}catch(o){r=!1}}}),1e3),z=setInterval((()=>{var o;if(!window.bcStripeElements)return void clearInterval(z);const e=null===(o=window.bcStripeElements)||void 0===o?void 0:o.getElement("address");e&&(clearInterval(z),e.on("change",(o=>{const e=o.value.address.country;e&&!u&&c(e)})))}),500)}));h.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:bo,onInternationalCheckoutSelected:async()=>{this.detectedDomesticCheckoutDialogOpen=!0,await new Promise((o=>setTimeout(o,2e3)))},onLoggedInInternationalAddressDetected:()=>new Promise((o=>{this.loggedInIntlAddressResolver=o,this.loggedInIntlAddressConfirmDialogOpen=!0})),onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(fo("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):fo("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}handleBigcommerceInternationalResumeFlag(){if(!window.Zonos.isBigCommerce)return;const o=new URL(window.location.href);if("true"!==o.searchParams.get(_o))return;o.searchParams.delete(_o),window.history.replaceState({},"",o.toString());const e=Date.now(),t=setInterval((()=>{if(!G.localizationLoaded||!G.selectedCountryCode)return void(Date.now()-e>15e3&&(clearInterval(t),fo("BigCommerce international checkout resume flag: localization did not initialize within 15s","info")));const o=document.querySelector(`#${yo}`);if(o)return clearInterval(t),void o.dispatchEvent(xo("click"));Date.now()-e>15e3&&(clearInterval(t),fo("BigCommerce international checkout resume flag: trigger button did not mount within 15s","info"))}),200)}async setToFinishStep(o){d.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){b(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${yo}`);o&&o.dispatchEvent(xo("click"))}async handleCustomerInfoContinue(){var o,e,t,s;$({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:Y.checkoutSessionId}}),z({checkoutSessionId:Y.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0;const{isRequestNotReady:n}=await C();n&&"stripe"===d.addressFormRenderType&&ho({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:null===(e=null===(o=c.stripeAddressEventData)||void 0===o?void 0:o.value)||void 0===e?void 0:e.address,billingAddress:null===(s=null===(t=c.stripeBillingAddressEventData)||void 0===t?void 0:t.value)||void 0===s?void 0:s.address,cartId:window.Zonos.cartId}});const i=o=>{"customer-info"===d.step?c.isFetchingLandedCost||(d.landedCostData&&(M({currency:d.currency}),S()),this.submitLoading=!1,o&&clearInterval(o)):clearInterval(o)};i();const r=setInterval((()=>{i(r)}),20);setTimeout((()=>{clearInterval(r)}),1e4)}async handleShippingContinue(){S()}handleInventoryCheckDialogConfirm(){d.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"===c.checkoutSettlementCurrency&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen)return void(this.payInUsdConfirmDialogOpen=!0);this.payInUsdConfirmDialogOpen=!1;const o=x();try{if(F.paypalErrorMessage=null,c.hasPaymentError=!1,this.submitLoading=!0,d.inventoryCheckErrorMessage=null,!await I())return c.hasPaymentError=!0,c.customErrorMessage=X("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:c.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{d.inventoryCheckErrorMessage=await T()}catch(o){d.inventoryCheckErrorMessage=X("Unable to check inventory. Please try again.")}if(d.inventoryCheckErrorMessage)return void(this.submitLoading=!1);if(j()>0){const o=await A();if(!o.success)return c.hasPaymentError=!0,c.customErrorMessage=o.error||X("Unable to apply store credit. Please try again."),void(this.submitLoading=!1)}if(O()){try{const o=await _();if(!o.valid)return c.hasPaymentError=!0,c.customErrorMessage=o.errorMessage,void(this.submitLoading=!1);const e=await L();if(!e.success)return c.hasPaymentError=!0,c.customErrorMessage=e.error||X("Unable to place order with store credit. Please try again."),void(this.submitLoading=!1);S(),p()}catch(o){lo(o),$({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:Y.checkoutSessionId}}),c.hasPaymentError=!0}return void(this.submitLoading=!1)}try{await P(),S(),p()}catch(o){lo(o),$({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:Y.checkoutSessionId}}),c.hasPaymentError=!0,c.shouldInventoryRefund&&(U(),c.shouldInventoryRefund=!1)}this.submitLoading=!1}finally{o&&(B.locked=!1)}}async handleFinishClick(){if(E(),this.preview)return d.step="customer-info",void await this.init();if(u(),h(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||to.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=po(this.mobile),this.applyStripeTheme(),fo(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=po(this.mobile),this.applyStripeTheme(),fo(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=so(this.appearanceSettingsOverride.theme))}handleAddressChange(){E()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return fo("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);fo("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=c.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=c.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){fo("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)window.Zonos.openHelloDialog(!1),e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=po(this.mobile),this.isIframed=window.self!==window.top,fo(`iframed: ${this.isIframed}`),window.Zonos.isLegacyCheckout&&this.captureParamsRedirectedForVariantTest(),this.handleAppearanceSettingsOverrideChange(),this.storeUnsubscribeList=[oo("selectedLocale",(()=>{this.applyStripeTheme()})),D("selectedShippingOption",(()=>{var o,e,t,s;const n=d.selectedShippingOption;(null===(o=to.genericSettings)||void 0===o?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&(null===(t=null===(e=null==n?void 0:n.shippingProfile)||void 0===e?void 0:e.serviceLevel.code)||void 0===t?void 0:t.toLowerCase().startsWith("fedex."))&&"CA"===(null===(s=c.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)&&(this.shouldShowFedexShippingConsentDialog=!0)})),N("stripeAddressEventData",(o=>{var e;if(!window.Zonos.isBigCommerce||!o||this.redirectToDomesticCheckoutDialogOpen||!(null===(e=to.genericSettings)||void 0===e?void 0:e.isBigcommerceDomesticCheckoutRedirectEnabled)||"USD"!==to.sourceCurrency)return;if(!this.open)return;if(window.location.pathname.includes("/checkout"))return;const t=o.value.address.country;t&&to.disabledCountries.includes(t)&&(this.redirectToDomesticCheckoutDialogOpen=!0,fo(`Domestic country ${t} selected in international checkout, redirecting to BigCommerce domestic checkout`,"info"),setTimeout((()=>{window.location.href=Po("/checkout")}),2e3))}))],this.initializeTestKeys(),window.addEventListener("message",this.handleHostedOpenWindowCallback),fo(`mobile: ${this.isMobile}`)}disconnectedCallback(){E(),u(),h(),this.storeUnsubscribeList.forEach((o=>o())),window.removeEventListener("message",this.handleHostedOpenWindowCallback)}render(){var o,n,i,r;this.customerProfile=c.customerProfile,this.clientSecret=c.clientSecret,c.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret);const a="finish"!==d.step&&"error"!==d.step&&!c.stripeElements||c.isFetchingSession,{colorPrimary:l,colorSecondary:u,logoUrl:h,style:m}=no(to.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===to.appearance.zonosAttribution,g=to.appearance.theme,f=l&&To(l)?"DARK":"LIGHT",w=this.isMobile?g:f,z=this.isMobile?void 0:u,{customMessages:k}=G,v=null===(o=k.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,y=this.getCurrentLocalePageEnum(),b=k.filter((o=>o.pageName===y)),C=this.getBaseCurrencySettlementInfo(),S=()=>{const o=this.preview?`${h}?timestamp=${Date.now()}`:h;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${to.organizationName} logo`,src:o}))},x=ro(),I=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||mo();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),x&&e("zonos-badge",{badgeColor:"orange",size:"small"},X("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},X("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),b.map((o=>e("zonos-custom-message",{icon:Xo,message:o.message}))))},T=()=>d.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:X("Your checkout session has expired. Please reload the page to continue."),restStateTitle:X("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},X("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Io({overrideBorderStyle:m})}},"finish"!==d.step&&"error"!==d.step&&e(t,null,e("div",{class:"zonos--left","data-theme":w,style:Ao({"--zonos--primary-color":this.isMobile?void 0:l})},!this.isMobile&&I(),"customer-info"===d.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:z}),"shipping"===d.step&&e("zonos-shipping",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:z}),"payment"===d.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:z})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&I(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Oo}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:z}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Xo,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Xo,message:v}))))),("finish"===d.step||"error"===d.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Oo}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:m,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===d.step&&d.error?Object.assign(Object.assign({},d.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:So(["zonos--checkout zonos--elements","payment"===d.step&&"zonos--processing-payment",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?T():e("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()),e("zonos-dialog",{isLoading:!0,loadingText:X("You will be redirected to international checkout shortly."),loadingTitle:X("We detected that you are shipping to an international address."),noClickOutside:!0,noCloseButton:!0,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-dialog",{isLoading:!0,loadingText:X("You will be redirected to domestic checkout shortly."),loadingTitle:X("We detected that you are shipping to a domestic address."),noClickOutside:!0,noCloseButton:!0,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-confirm-dialog",{class:"zonos--logged-in-intl-address-dialog",dialogCancelBtnText:X("Stay on this page"),dialogConfirmBtnText:X("Continue to international checkout"),dialogIntent:"info",dialogOpen:this.loggedInIntlAddressConfirmDialogOpen,dialogSubtitle:X("Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?"),dialogTitle:X("International shipping address detected"),dialogWidth:480,onCancelClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"stay"),this.loggedInIntlAddressResolver=null},onConfirmClicked:()=>{var o;this.loggedInIntlAddressConfirmDialogOpen=!1,null===(o=this.loggedInIntlAddressResolver)||void 0===o||o.call(this,"redirect"),this.loggedInIntlAddressResolver=null}}),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:X("Don't close"),dialogConfirmBtnText:X("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:X("Would you like to close checkout and return to the site?"),dialogTitle:X("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:X("Return to merchant site"),dialogConfirmBtnText:X("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(n=this.placedOrderInfo)||void 0===n?void 0:n.zonosOrderNumber)?X("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):X("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(i=this.placedOrderInfo)||void 0===i?void 0:i.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:X("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:X("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:e(t,null,X("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),e("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},X("View GAA Form."))),dialogTitle:X("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:()=>this.shouldShowFedexShippingConsentDialog=!1}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:X("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:X("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),C&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:X("Cancel"),dialogConfirmBtnText:X("Pay [orderTotal]",{orderTotal:eo({amount:C.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:X("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:X("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:X("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:X("You are being sent back to the shop to re-add items to your cart."),dialogTitle:X("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};oe.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";export{oe as zonos_checkout}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register([],(function(n){"use strict";return{execute:function(){var r=n("f",(function(n){var r=/\[([^\]]+)\]\((https?:\/\/[^\s\)]+)\)|(https?:\/\/[^\s]+)/g;var e=n.replace(r,(function(n,r,e,t){if(e){return'<zonos-link href="'.concat(e,'" target="_blank" rel="noopener noreferrer">').concat(r,"</zonos-link>")}else{return'<zonos-link href="'.concat(t,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")}}));return e}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as o}from"./p-2654556b.js";import{w as r,h as n}from"./p-d7bda14d.js";const u=({amount:u,isForeign:i})=>{var t,d;const a=(null===(t=o.exchangeRate)||void 0===t?void 0:t.rate)||1,s=i?u:r(u),v=o.currency;if((null===(d=o.items[0])||void 0===d?void 0:d.currencyCode)===v)return n({amount:s,currency:v});const c=o.displayBaseCurrency,e=(()=>{var r,n;return o.displayBaseCurrency&&(null===(r=o.exchangeRate)||void 0===r?void 0:r.sourceCurrencyCode)?null===(n=o.exchangeRate)||void 0===n?void 0:n.sourceCurrencyCode:o.currency})();return n(i?{amount:c?s/a:s,currency:e}:{amount:c?s:s*a,currency:e})};export{u as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,d as e,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as a,t as n,h as l}from"./p-d7bda14d.js";import{z as r}from"./p-9a417eeb.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{h as c,T as m,D as g}from"./p-c209e36d.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=a;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=a.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e?n("Spend up to [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend up to [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=a,l=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=a,f=n("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},t("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},t("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},t("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},f),t("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},t("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},t("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},t("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.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 .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,F as s,a as t,g as n}from"./p-ce75b047.js";import{_ as r,E as a,$ as i,a0 as l,a1 as c,S as d,a2 as m,a3 as p,I as z}from"./p-2654556b.js";import{l as h,t as g}from"./p-d7bda14d.js";import{z as x,f}from"./p-9a417eeb.js";import{r as u}from"./p-32704baa.js";import{g as y}from"./p-f1aea919.js";import"./p-0a377722.js";import"./p-41dd1cb8.js";import"./p-34d6eb83.js";import"./p-6b361d2b.js";const v="POLICIES",b=class{constructor(e){o(this,e)}render(){const o=r();if(!o.length)return null;const n=Intl.ListFormat,i=(n?new n(h.selectedLocale,{style:"long",type:"conjunction"}).formatToParts(o.map((o=>o.name))):o.flatMap(((o,e)=>0===e?[{type:"element",value:o.name}]:[{type:"literal",value:", "},{type:"element",value:o.name}]))).map((s=>{if("literal"===s.type)return s.value;const t=o.find((o=>o.name===s.value));return t?e("a",{href:t.url,onClick:o=>{o.preventDefault(),o.stopPropagation(),window.open(t.url,"_blank","noopener,noreferrer")},rel:"noopener noreferrer",target:"_blank"},s.value):s.value})),l=x.organizationName,c=l?g("I agree to [merchantName]'s [policies]",{merchantName:l,policies:v}):g("I agree to the [policies]",{policies:v}),[d="",m=""]=c.split(v),p=a.showError,z="zonos--policy-consent-error";return e(t,{class:"zonos--policy-consent-host"},e("div",{class:"zonos--policy-consent"+(p?" zonos--policy-consent--error":"")},e("label",{class:"zonos--policy-consent-label"},e("input",{"aria-describedby":p?z:void 0,"aria-invalid":p?"true":"false",checked:a.accepted,class:"zonos--policy-consent-checkbox",disabled:a.locked,onChange:o=>{const e=o.target.checked;a.accepted=e,e?(a.acceptedAt||(a.acceptedAt=(new Date).toISOString()),a.showError=!1):a.acceptedAt=null},type:"checkbox"}),e("span",{class:"zonos--policy-consent-text"},d,e(s,null,i),m))),p&&e("div",{class:"zonos--policy-consent-error",id:z,role:"alert"},g("You must accept the policies to place this order")))}};b.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:block;margin-top:20px}.zonos--policy-consent{background-color:var(--zonos-elements-gray-50);border:1px solid var(--zonos-elements-gray-200);border-radius:8px;padding:12px 14px;-webkit-transition:border-color 0.15s ease, background-color 0.15s ease;transition:border-color 0.15s ease, background-color 0.15s ease}.zonos--policy-consent:hover{border-color:var(--zonos-elements-gray-300)}.zonos--policy-consent--error{background-color:var(--zonos-elements-red-50);border-color:var(--zonos-elements-red-400)}.zonos--policy-consent-label{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;gap:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.zonos--policy-consent-checkbox{accent-color:var(--zonos-elements-blue-600);cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:18px;margin:0;width:18px}.zonos--policy-consent-text{color:var(--zonos-elements-gray-800);font-size:14px;line-height:1.45}.zonos--policy-consent-text a{color:var(--zonos-elements-blue-600);text-decoration:underline;text-underline-offset:2px}.zonos--policy-consent-text a:hover{color:var(--zonos-elements-blue-700)}.zonos--policy-consent-error{color:var(--zonos-elements-red-600);font-size:13px;line-height:1.4;margin-top:8px;padding:0 4px}";const k='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n <path fill="currentColor" fill-rule="evenodd" d="M4 5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3H4Zm16 2H4a1 1 0 0 0-1 1v1h18V8a1 1 0 0 0-1-1ZM2 11h20v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3Zm6 4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>\n</svg>\n',w="full",j="custom",C=class{constructor(e){o(this,e),this.enabled=!0,this.customAmountInput="",this.handleUseStoreCreditChange=o=>{i(o),o&&l(!0),c()},this.handleAmountModeChange=o=>{const e=o===w;l(e),e||(this.customAmountInput=""),c()},this.handleCustomAmountChange=o=>{this.customAmountInput=o,d.error=null},this.handleApplyCustomAmount=()=>{const o=parseFloat(this.customAmountInput);!isNaN(o)&&o>0?m(o):m(null),d.error||c()}}async componentWillLoad(){await p()}render(){if(!this.enabled)return null;const{colorPrimary:o}=x.appearance,n=y({}),r=d.availableBalance,a=null!==r&&r>0,i=d.isEnabled,l=d.useFullBalance,c=d.error,m=z(),p=u({amount:null!=r?r:0,isForeign:!0});return e(t,{class:"zonos--elements zonos--store-credit",style:{"--zonos--border-radius":n,"--zonos--font-family":f(),"--zonos--primary-color":o}},e("div",{class:"zonos--store-credit-container"},e("div",{class:"zonos--store-credit-header"},e("div",{class:"zonos--store-credit-title-row"},e("div",{class:"zonos--store-credit-title-left"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-title-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:22})),e("zonos-text",{type:"semiBoldLabel"},g("Store credit"))),a&&e("div",{class:"zonos--store-credit-balance-badge"},e("zonos-text",{textColor:"gray-600",type:"caption"},p)))),e(s,null,a?e("div",{class:"zonos--store-credit-content"},e("div",{class:"zonos--store-credit-checkbox"},e("zonos-checkbox",{isChecked:i,label:g("Use store credit"),onCheckboxSelected:o=>this.handleUseStoreCreditChange(o.detail),size:16})),i&&e("div",{class:"zonos--store-credit-options"},e("div",{class:"zonos--store-credit-toggle-row"},e("zonos-toggle",{onToggleChanged:o=>this.handleAmountModeChange(o.detail),options:[{label:g("Apply full balance"),value:w},{label:g("Enter amount"),value:j}],value:l?w:j})),!l&&e("div",{class:"zonos--store-credit-custom-amount"},e("div",{class:"zonos--store-credit-custom-amount-row"},e("zonos-input",{inputLabel:g("Enter amount"),inputValue:this.customAmountInput,isError:!!c,onInputChange:o=>this.handleCustomAmountChange(o.detail)}),e("zonos-button",{onClick:this.handleApplyCustomAmount,size:"sm",variant:"primary"},g("Apply")))),c&&e("div",{class:"zonos--store-credit-error"},e("zonos-text",{textColor:"red-600",type:"caption"},c)),e("div",{class:"zonos--store-credit-summary"},e("zonos-text",{textColor:"gray-800",type:"semiBoldLabel"},g("Amount to apply: [amount]",{amount:u({amount:m,isForeign:!0})}))))):e("div",{class:"zonos--store-credit-empty"},e("div",{"aria-hidden":"true",class:"zonos--store-credit-empty-icon"},e("zonos-icon",{content:k,iconColor:"gray-500",size:28})),e("zonos-text",{textColor:"gray-600",type:"caption"},g("No store credit available"))))))}get el(){return n(this)}};C.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:block;margin-bottom:var(--zonos-elements-font-size-xl)}:host .zonos--store-credit-container{background:-webkit-gradient(linear, left top, left bottom, from(var(--zonos-elements-gray-0)), to(var(--zonos-elements-gray-50)));background:linear-gradient(180deg, var(--zonos-elements-gray-0) 0%, var(--zonos-elements-gray-50) 100%);border:1px solid var(--zonos-elements-gray-200);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-8));-webkit-box-shadow:var(--zonos-elements-v3-shadow-base);box-shadow:var(--zonos-elements-v3-shadow-base);overflow:hidden;padding:0;position:relative}:host .zonos--store-credit-container::before{background:var(--zonos--primary-color, var(--zonos-elements-gray-400));content:"";height:3px;left:0;position:absolute;right:0;top:0}:host .zonos--store-credit-header{padding:var(--zonos-elements-radius-12) var(--zonos-elements-font-size-l) 0}:host .zonos--store-credit-title-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .zonos--store-credit-title-left{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-title-icon{-ms-flex-align:center;align-items:center;background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 14%, transparent);border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.75);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:22px;-ms-flex-pack:center;justify-content:center;width:22px}:host .zonos--store-credit-balance-badge{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 8%, var(--zonos-elements-gray-50));border:1px solid color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 22%, var(--zonos-elements-gray-200));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:2px var(--zonos-elements-font-size-s)}:host .zonos--store-credit-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-s) var(--zonos-elements-font-size-l) var(--zonos-elements-radius-12)}:host .zonos--store-credit-checkbox{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}:host .zonos--store-credit-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-toggle-row{display:-ms-flexbox;display:flex}:host .zonos--store-credit-custom-amount{max-width:240px}:host .zonos--store-credit-custom-amount-row{-ms-flex-align:end;align-items:flex-end;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-custom-amount-row zonos-input{-ms-flex:1;flex:1}:host .zonos--store-credit-error{margin-top:2px}:host .zonos--store-credit-summary{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 6%, var(--zonos-elements-gray-50));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:var(--zonos-elements-radius-10) var(--zonos-elements-font-size-s)}:host .zonos--store-credit-empty{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-xl) var(--zonos-elements-font-size-l) 22px;text-align:center}:host .zonos--store-credit-empty-icon{-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-100);border-radius:50%;display:-ms-flexbox;display:flex;height:52px;-ms-flex-pack:center;justify-content:center;opacity:0.95;width:52px}';export{b as zonos_policy_consent,C as zonos_store_credit}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(a,r)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(o){return l([e,o])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=o.call(e,t)}catch(e){r=[6,e];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,i=o.length,s;n<i;n++){if(s||!(n in o)){if(!s)s=Array.prototype.slice.call(o,0,n);s[n]=o[n]}}return e.concat(s||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-9fab45aa.system.js","./p-47a1d469.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-647438d6.system.js","./p-bc7bf53e.system.js","./p-2b8345d8.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var o,t,n,i,s,a,r,l,d,c,u,h,f,m,g,v;return{setters:[function(e){o=e.r;t=e.d;n=e.h;i=e.F;s=e.a},function(e){a=e.l;r=e.t;l=e.h},function(e){d=e.z},function(e){c=e.c},function(e){u=e.f},function(e){h=e.h;f=e.T;m=e.D},function(e){g=e.g},function(e){v=e.e},function(){},function(){}],execute:function(){var b=function(e){var o=e.getBoundingClientRect();var t=o.top;var n=window.innerHeight-o.bottom;return t>=n};var p=function(e){var o=e.href,t=e.text;return'<zonos-link href="'.concat(o,'" target="_blank" rel="noopener noreferrer">').concat(t,"</zonos-link>")};var w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var z='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var x='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>';var y='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var C='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var k='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var L=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var D=L;var S=e("zonos_hello_dialog",function(){function e(e){var s=this;o(this,e);this.closeDialog=t(this,"closeDialog",7);this.isOpen=false;this.setIsOpen=function(){};this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false;this.clickOutsideDialogHandler=function(e){if(!e.composedPath().includes(s.dialogRef)&&s.isOpen){s.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(d.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(e){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(o){this.showCountrySelect=e;return[2]}))}))};this.setShowLanguageSelect=function(e){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(o){this.showLanguageSelect=e;return[2]}))}))};this.hasTaxId=function(){var e;return(e=a.countryLandedCost)===null||e===void 0?void 0:e.hasTaxId};this.isDomesticCountry=function(){var e,o;var t=a.selectedCountryCode;return!!t&&!!((o=(e=d.genericSettings)===null||e===void 0?void 0:e.domesticCountries)===null||o===void 0?void 0:o.includes(t))};this.isNoThresholdCountry=function(e){if(!e||!s.hasTaxId()){return false}var o=__spreadArray(["AU","NZ","GB","NO","SG"],v,true);return o.includes(e)};this.getDutyMessage=function(){if(s.isDomesticCountry()){return null}var e=a.countryLandedCost;if(!(e===null||e===void 0?void 0:e.allowLowValueOrders)&&(e===null||e===void 0?void 0:e.countryCode)==="GB"){return r("Duties will apply to all orders.")}var o=(e===null||e===void 0?void 0:e.dutyDeminimus)?l({amount:e.dutyDeminimus}):null;return o?r("Spend up to [threshold] duty free.",{threshold:o}):r("Duties will apply to all orders.")};this.getTaxMessage=function(){var e=a.countryLandedCost;if(s.isDomesticCountry()){return null}if(!(e===null||e===void 0?void 0:e.allowLowValueOrders)&&(e===null||e===void 0?void 0:e.countryCode)==="GB"){return r("Taxes will apply to all orders.")}var o=(e===null||e===void 0?void 0:e.vatTaxDeminimus)?l({amount:e.vatTaxDeminimus}):null;return o&&!s.isNoThresholdCountry(e===null||e===void 0?void 0:e.countryCode)?r("Spend up to [threshold] tax free.",{threshold:o}):r("Taxes will apply to all orders.")};this.getEuDutyTaxMessage=function(e){return["".concat(r("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:r("Learn more.")}))]};this.getUkDutyTaxMessage=function(e){if(e.allowLowValueOrders){return["".concat(r("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:r("Learn more.")}))]}var o=e.dutyDeminimus;return[r("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o})})]};this.getAustraliaDutyTaxMessage=function(e){if(h()){return[]}return["".concat(r("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:r("Learn more.")}))]};this.getNewZealandDutyTaxMessge=function(e){if(h()){return null}return["".concat(r("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:r("Learn more.")}))]};this.getNorwayDutyTaxMessage=function(e){if(h()){return null}return["".concat(r("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:r("Learn more.")}))]};this.getSingaporeDutyTaxMessage=function(e){if(h()){return null}return["".concat(r("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:"".concat(e.vatTaxRate*100,"%")})," ").concat(p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:r("Learn more.")}))]};this.getInclusivePriceMessage=function(){var e=a.inclusivePricingConfigurations;var o=e===null||e===void 0?void 0:e.find(Boolean);var t=o===null||o===void 0?void 0:o.configurations[f];var n=o===null||o===void 0?void 0:o.configurations[m];if((t===null||t===void 0?void 0:t.status)==="DISABLED"&&(n===null||n===void 0?void 0:n.status)==="DISABLED"){return null}if((n===null||n===void 0?void 0:n.status)==="ENABLED"&&(t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"DUTIES_TAXES_AND_FEES",message:r("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}}if((n===null||n===void 0?void 0:n.status)==="ENABLED"){return{inclusiveType:"DUTIES_FEES",message:r("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}}if((t===null||t===void 0?void 0:t.status)==="ENABLED"){return{inclusiveType:"TAXES",message:r("Product prices already include taxes. No additional taxes will be added at checkout.")}}return null};this.renderHelloMessage=function(e){var o=e.dutyDeMinimisMessage,t=e.inclusivePriceMessage,s=e.taxDeMinimisMessage;if(h()&&t){switch(t.inclusiveType){case"DUTIES_FEES":{return n(i,null,t.message&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:x}),n("zonos-text",{"aria-label":"Duty inclusive pricing message"},t.message)),s&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis icon",content:C}),n("zonos-text",{"aria-label":"Tax de minimis message"},s)))}case"TAXES":{return n(i,null,t.message&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:x}),n("zonos-text",{"aria-label":"Tax inclusive pricing message"},t.message)),o&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis icon",content:z}),n("zonos-text",{"aria-label":"Duty de minimis message"},o)))}case"DUTIES_TAXES_AND_FEES":default:{return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:x}),n("zonos-text",null,t.message))}}}return n(i,null,o&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis icon",content:z}),n("zonos-text",{"aria-label":"Duty de minimis message"},o)),s&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis icon",content:C}),n("zonos-text",{"aria-label":"Tax de minimis message"},s)))};this.getAdditionalDutyTaxMessage=function(){if(!a.countryLandedCost){return null}if(s.isDomesticCountry()){return null}if(!s.hasTaxId()){return null}switch(a.countryLandedCost.countryCode){case"GB":return s.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return s.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return s.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return s.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return s.getSingaporeDutyTaxMessage(a.countryLandedCost);default:if(v.includes(a.countryLandedCost.countryCode)){return s.getEuDutyTaxMessage(a.countryLandedCost)}return null}}}e.prototype.globalClickHandler=function(e){this.clickOutsideDialogHandler(e)};e.prototype.isOpenHandler=function(e){if(!e){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};e.prototype.render=function(){var e=this;var o,t;var i=a.selectedCountryCode;var l=this.getAdditionalDutyTaxMessage();var h=(o=this.animateFromLeftOverride)!==null&&o!==void 0?o:this.dialogRef&&g(this.dialogRef);var f=this.dialogRef&&b(this.dialogRef);var m=a.customMessages;var v=r("Welcome to [storeName]",{storeName:d.organizationName});var p=((t=m.find((function(e){return e.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var z=u(p);var x=this.getCurrentPageEnum();var C=m.filter((function(e){return e.pageName===x}));var L=this.getDutyMessage();var D=this.getTaxMessage();var S=this.getInclusivePriceMessage();return n(s,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},n("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:c(["zonos--hello-dialog",h&&"zonos--hello-dialog-animate-from-left",f&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:function(o){return o&&(e.dialogRef=o)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},n("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},n("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:k}),noBackground:true,onClick:function(){return e.setIsOpen(false)}}),n("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},n("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:i}),n("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},v),n("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:z,textColor:"gray-800"})),n("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((function(e){var o;return e&&n("zonos-banner",{bannerTitle:e.name,intent:"error"},(o=e.itemRestrictions)===null||o===void 0?void 0:o.map((function(e){return n("zonos-text",{textColor:"red-800"},e===null||e===void 0?void 0:e.note)})))})),(L||D||S||!!(l===null||l===void 0?void 0:l.length))&&n("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},n("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:L,inclusivePriceMessage:S,taxDeMinimisMessage:D}),l===null||l===void 0?void 0:l.map((function(e){return n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:w}),n("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:e}))})))),C.map((function(e){return n("zonos-custom-message",{icon:y,message:e.message})}))))),n("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(o){return e.setShowCountrySelect(o)},setShowLanguageSelect:function(o){return e.setShowLanguageSelect(o)}})),this.showCountrySelect&&n("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},n("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:function(){return e.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},n("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:function(){return e.setShowLanguageSelect(false)}}))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return e}());S.style=D}}}));
|