@zonos/elements 1.3.31 → 1.3.33
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-62ff7ee7.js → cart-11b47252.js} +463 -43
- package/dist/cjs/index.cjs.js +12 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a5f8eaab.js → submitGtag-3a1d091e.js} +4 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +11 -11
- package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -3
- package/dist/cjs/zonos-card.cjs.entry.js +47 -0
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +53 -36
- package/dist/cjs/zonos-checkout.cjs.entry.js +21 -11
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-card_2.cjs.entry.js → zonos-language-select_2.cjs.entry.js} +23 -29
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_2.cjs.entry.js +123 -0
- package/dist/cjs/zonos-v-stack.cjs.entry.js +25 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +15 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +16 -15
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +20 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +9 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +20 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +10 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +6 -6
- package/dist/collection/components/common/zonos-button/zonos-button.js +28 -4
- package/dist/collection/components/common/zonos-card/zonos-card.css +3 -1
- package/dist/collection/components/common/zonos-card/zonos-card.js +61 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +1 -1
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +2 -1
- package/dist/collection/components/store/checkout/stripe.js +0 -1
- package/dist/collection/components/store/hello/localization.js +3 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +23 -2
- package/dist/collection/components/store/translationStore/strings.base.js +23 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +23 -2
- package/dist/collection/components/store/translationStore/strings.french.js +23 -2
- package/dist/collection/components/store/translationStore/strings.german.js +23 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +23 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +23 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +23 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/getIsTestMode.js +1 -0
- package/dist/collection/scripts/_zonosBase.js +8 -1
- package/dist/esm/{cart-b96aaa4f.js → cart-22ba08ec.js} +463 -43
- package/dist/esm/index.js +12 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-6e271d76.js → submitGtag-1435eec8.js} +4 -2
- package/dist/esm/zonos-address_8.entry.js +11 -11
- package/dist/esm/zonos-badge_2.entry.js +6 -6
- package/dist/esm/zonos-button_3.entry.js +6 -3
- package/dist/esm/zonos-card.entry.js +43 -0
- package/dist/esm/zonos-cart-items_12.entry.js +53 -36
- package/dist/esm/zonos-checkout.entry.js +21 -11
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +7 -7
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +56 -0
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_2.entry.js +118 -0
- package/dist/esm/zonos-v-stack.entry.js +21 -0
- package/dist/esm-es5/cart-22ba08ec.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-1435eec8.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -0
- 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-component.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_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -0
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_2.entry.js +1 -0
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -0
- package/dist/scripts/index.d.ts +39 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +2 -2
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +6 -1
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +10 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -0
- package/dist/types/components.d.ts +36 -6
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-11672829.js +1 -0
- package/dist/zonos-elements/p-22882fd6.entry.js +1 -0
- package/dist/zonos-elements/{p-b208fec6.system.entry.js → p-28e6963b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2a45c837.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c4e38b85.entry.js → p-3523c3b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-692816a7.entry.js → p-35604380.entry.js} +1 -1
- package/dist/zonos-elements/{p-78a839b8.entry.js → p-36bb4360.entry.js} +1 -1
- package/dist/zonos-elements/p-3b95a9a3.entry.js +1 -0
- package/dist/zonos-elements/p-450eb8ff.system.js +1 -0
- package/dist/zonos-elements/p-478357b0.system.entry.js +1 -0
- package/dist/zonos-elements/p-56152835.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6cb9812b.entry.js → p-63a27875.entry.js} +1 -1
- package/dist/zonos-elements/p-6c3390b7.entry.js +1 -0
- package/dist/zonos-elements/{p-9c32b924.entry.js → p-6f589755.entry.js} +1 -1
- package/dist/zonos-elements/{p-a90393e0.system.entry.js → p-71882ac9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-74bd6150.entry.js +1 -0
- package/dist/zonos-elements/{p-9b0aa65c.system.js → p-7624013b.system.js} +1 -1
- package/dist/zonos-elements/p-84997f2e.js +1 -0
- package/dist/zonos-elements/{p-2cb880e7.system.entry.js → p-88129ef9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-95d52a24.system.entry.js +1 -0
- package/dist/zonos-elements/{p-dda78e8e.system.entry.js → p-966ab4e7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3dc59d89.system.entry.js → p-9de374a7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-666d1605.system.entry.js → p-a0b17e0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7664dec5.entry.js → p-b5825bb7.entry.js} +1 -1
- package/dist/zonos-elements/p-b8a4b345.system.entry.js +1 -0
- package/dist/zonos-elements/{p-13454044.system.entry.js → p-b903af96.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c21802e9.entry.js +1 -0
- package/dist/zonos-elements/{p-d4724ac8.entry.js → p-c3619b3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cdfb51b.system.entry.js → p-cdb53aaf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-941a01be.system.entry.js → p-d2992457.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2701e08c.entry.js → p-d8c1eb99.entry.js} +1 -1
- package/dist/zonos-elements/p-da2e5289.system.entry.js +1 -0
- package/dist/zonos-elements/p-dafa2b79.system.js +1 -0
- package/dist/zonos-elements/p-ddb1cfe2.entry.js +1 -0
- package/dist/zonos-elements/{p-d8027710.system.entry.js → p-dec21ca2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e09df465.entry.js +1 -0
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/p-e3c014ae.entry.js +1 -0
- package/dist/zonos-elements/{p-10b9a681.system.entry.js → p-eb566457.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ed333de6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-725c2d57.entry.js → p-fa7e2a01.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a0cf47b.entry.js → p-fe296307.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +0 -72
- package/dist/cjs/zonos-payment.cjs.entry.js +0 -58
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +0 -45
- package/dist/esm/zonos-card_2.entry.js +0 -62
- package/dist/esm/zonos-notification.entry.js +0 -68
- package/dist/esm/zonos-payment.entry.js +0 -54
- package/dist/esm/zonos-select-dialog-header_2.entry.js +0 -40
- package/dist/esm-es5/cart-b96aaa4f.js +0 -1
- package/dist/esm-es5/submitGtag-6e271d76.js +0 -1
- package/dist/esm-es5/zonos-card_2.entry.js +0 -1
- package/dist/esm-es5/zonos-notification.entry.js +0 -1
- package/dist/esm-es5/zonos-payment.entry.js +0 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +0 -1
- package/dist/zonos-elements/p-087c83a5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1a40aaf4.system.js +0 -1
- package/dist/zonos-elements/p-2613b5d3.system.entry.js +0 -1
- package/dist/zonos-elements/p-27d648c3.system.entry.js +0 -1
- package/dist/zonos-elements/p-4e01d1ab.system.entry.js +0 -1
- package/dist/zonos-elements/p-5441b729.entry.js +0 -1
- package/dist/zonos-elements/p-5857ad65.entry.js +0 -1
- package/dist/zonos-elements/p-5d53f9a4.js +0 -1
- package/dist/zonos-elements/p-75ba695c.entry.js +0 -1
- package/dist/zonos-elements/p-89664e49.system.js +0 -1
- package/dist/zonos-elements/p-8c9e7980.entry.js +0 -1
- package/dist/zonos-elements/p-8f8baabf.system.entry.js +0 -1
- package/dist/zonos-elements/p-9f7c0472.entry.js +0 -1
- package/dist/zonos-elements/p-acfb9be6.system.entry.js +0 -1
- package/dist/zonos-elements/p-b468f941.js +0 -1
- package/dist/zonos-elements/p-bb5a9eaa.entry.js +0 -1
- package/dist/zonos-elements/p-be2b32f5.entry.js +0 -1
- package/dist/zonos-elements/p-c63a7dde.entry.js +0 -1
- package/dist/zonos-elements/p-f38fd0d9.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const e=async({response:e,shouldLog:o=!0,shouldThrow:t=!1})=>{try{return await e.json()}catch(e){if(t)throw e;return o&&console.error(e),null}};const o=async(o,t)=>{const n=(function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t})(t||{},[]),r=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",i=new URL(o);i.searchParams.set("zToken",(function(e){try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},n.headers),c=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:r,headers:a,method:s});return(async(o,t)=>{let n;try{n=await fetch(o,t)}catch(e){return e instanceof Error?{errors:[{message:e.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const r=n.headers.get("Zonos-Mode"),s=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&r&&s&&("production"===r&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===r&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),n.ok)return{errors:[],json:await e({response:n}),response:n};const i=n.status.toString();try{const o=await e({response:n,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(o)}`,type:i}],json:null,response:n}}catch(e){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),c)},t=(e,o,...t)=>{var n,r;if(!(!!(null===(n=window.Zonos)||void 0===n?void 0:n.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===o&&console.error(e,...t));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(o){case"warn":i.warn(e,...t);break;case"info":i.info(e,...t);break;case"error":i.error(e,...t);break;default:i.groupCollapsed(e,...t),i.trace(),i.groupEnd()}},n=(e,...o)=>{t(e,"error",...o)},r=async({endpoint:e,errors:t,metadata:n})=>{const r="userAgentData"in window.navigator?window.navigator.userAgentData:null,s={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:r&&r.brands.length>0?r:window.navigator.userAgent},n)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:s,method:"POST"})},s=({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),n=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:t}},i=["jsdelivr","unpkg","vercel"],a=e=>{const o=i.indexOf(e);return i[o+1]||null},c=()=>{if("undefined"==typeof window)return null;const e=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href);if(!e)return null;if("dev-elements"===e)return"https://dev.elements.zonos.com";const o=`https://${e}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,n=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",n),window.location.reload(),null})),o},l="https://js.stripe.com/v3",d=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,p="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let u=null;const m=e=>(null!==u||(u=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(p),window.Stripe)o(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${l}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&d.test(t.src))return t}return null})();r&&e?console.warn(p):r||(r=(e=>{const o=document.createElement("script");o.src=`${l}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),u),h=Promise.resolve().then((()=>m(null)));let y=!1;h.catch((e=>{y||console.warn(e)}));var g;const w=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:o,isWhiteListed:t}=s({loadScriptSrc:null==e?void 0:e.src});return t?o:null})(),f="https://v1.3.31.js.zonos.com",v=w||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.31",S="jsdelivr",C="https://rsms.me",b="https://fonts.googleapis.com",z=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;let j=class{};var L;g=j,j.doneInit=!1,j.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),j.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),j.isBigCommerce=!1,j.isNpm=!0,j.zonosQaUrl=null,j.version="v1.3.31",j.modeAlerted=!1,j.tempCartData=null,j.getCurrentTimestamp=()=>(new Date).getTime(),j.zonosController=null,j.init=async({appearance:e,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:a,storeId:c,zonosApiKey:l})=>{g.doneInit||(t(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),l?(g.zonosApiKey=l,g.storeId=c,t("init zonos"),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:e,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:a},zonosApiKey:l}),g.doneInit=!0):n("Missing Zonos API key"))},j.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},j.openHelloDialog=e=>{const o=document.querySelector("zonos-hello");o&&o.openHelloDialog(null==e||e)},j.showNotification=e=>{var o;null===(o=g.zonosController)||void 0===o||o.showNotification(e)},j.updateOrganizationName=e=>{var o;null===(o=g.zonosController)||void 0===o||o.updateOrganizationName(e)},j.disablePlaceOrderButtons=({autoEnable:e=!0,disable:o,placeOrderButtonSelector:t})=>{if(t){const n=document.querySelectorAll(t),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},j.injectController=({config:e,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=e.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const o=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{g.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=e,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async e=>{const{detail:o}=e;t("loading Stripe");const r=await(async(...e)=>{y=!0;const o=Date.now();return h.then((t=>((e,o,t)=>{if(null===e)return null;const n=e.apply(void 0,o);return((e,o)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:o})})(n,t),n})(t,e,o)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),g.zonosController=s,t("Zonos controller injected!")},j.injectScript=({cdnType:e,isModule:o,theRestUrl:r})=>{const s=`${g.getZonosUrl(e)}/${r}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{n(`Failed to load ${c.src}`);const t=a(e);t&&g.injectScript({cdnType:t,isModule:o,theRestUrl:r})},i.appendChild(c)},j.getZonosUrl=e=>{const o=()=>{switch(e){case"jsdelivr":return v;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.31";default:return f}};if(g.isNpm){return c()||o()}return o()},j.injectZonosCdn=()=>{g.injectScript({cdnType:S,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:S,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},j.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=g.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${f}/`,r.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${o}`,i.onerror=()=>{n(`Failed to load ${i.href}`);const t=a(e);t&&g.injectStylesheet({cdnType:t,theRestUrl:o})},r.appendChild(i)},j.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:S,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},j.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${C}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&!z.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=C,e.appendChild(o);const n=document.createElement("link");n.rel="stylesheet",n.href=`${C}/inter/inter.css`,e.appendChild(n),t("Zonos font injected!")},j.setupGoogleFont=e=>{var o;null===(o=g.zonosController)||void 0===o||o.setupGoogleFont(e)},j.injectSupportGoogleFont=e=>{var o;t(`[FONT] injecting ${e}`);const n=null===(o=e.match(/family=(.*?):/))||void 0===o?void 0:o[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${b}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=b,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,r.appendChild(s),t(`[FONT] ${n} font injected!`)};const U=c();class O{static get isNpm(){return!1}}L=O,O.isBigCommerce=!1,O.requested=!1,O.zonosQaUrl=null,O.tempCartData=null,O.zonosApiKey=null,O.isLegacyCheckout=!1,O.legacyStoreLogo=null,O.legacyStoreFavicon=null,O.parallelLoadTimes=[],O.paralellLoadState="off",O.loadScriptLogHandler=async({cdnLoadTime:e,fallbackLoadTime:o,isError:t,metadata:n,scriptLoadUrl:r,storeId:s,type:i})=>{try{const e=window.performance.getEntriesByType("resource").find((e=>{const o=e;return o.name.includes(r)&&"script"===o.initiatorType}));null==e||e.transferSize;(async e=>{})((e&&(null==e?void 0:e.duration)>0?parseFloat(e.duration.toFixed(2)):parseFloat(o.toFixed(2)),Object.assign({decodedBodySize:null==e?void 0:e.decodedBodySize,encodedBodySize:null==e?void 0:e.encodedBodySize,fallbackLoadTime:o,isError:!!t},n)))}catch(e){}},O.loadScriptLogParallelHandler=async e=>{try{if(L.parallelLoadTimes.push(e),2===L.parallelLoadTimes.length){const e=L.parallelLoadTimes.find((e=>"vercel"===e.type)),o=L.parallelLoadTimes.find((e=>"jsdelivr"===e.type));if(!e||!o)return;if(e.isError&&o.isError)return void r({endpoint:`<${e.scriptLoadUrl}> <${o.scriptLoadUrl}>`,errors:["Failed to fetch both Vercel and jsdelivr CDN. Perhaps network issue on customer site."],metadata:{cdnLoadTime:o.fallbackLoadTime,cdnType:o.type,vercelLoadTime:e.fallbackLoadTime}});L.loadScriptLogHandler({cdnLoadTime:o.fallbackLoadTime,fallbackLoadTime:e.fallbackLoadTime,isError:e.isError,metadata:{cdnScriptFallbackTime:o.fallbackLoadTime,cdnScriptIsError:!!o.isError,cdnScriptLoadUrl:o.scriptLoadUrl,cdnScriptType:o.type},scriptLoadUrl:e.scriptLoadUrl,storeId:e.storeId,type:e.type})}}catch(e){}},O.legacyCheckoutErrorHandler=({message:e,tempCartUUID:o})=>{n(`[ZONOS - loadZonos] ${e}`),r({endpoint:"LegacyCheckoutInit",errors:[e],metadata:{tempCartUUID:o}}),document.dispatchEvent(new CustomEvent("legacyCheckoutError",{detail:e}))},O.getGithubCdn=({type:e,version:o})=>{let t="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.31";"unpkg"===e&&(t="https://unpkg.com/@zonos/elements@1.3.31");return o&&"alpha"!==o?t.replace(/@zonos\/elements@(.+)/,`@zonos/elements@${o}`):t},O.injectZonos=({cdnType:e=S,initConfig:o,parallelLoaded:n,vercelUrl:s,version:c})=>{var l;const d="vercel"===e?s:L.getGithubCdn({type:e,version:c}),p=U||d,u=p.replace("https://","").replace("http://",""),m=document.createElement("script"),h=c&&c<"1.2.5"?"loadZonos.js":"zonos.js";m.src=`https://${u}/dist/scripts/${h}`,t(`[ZONOS - loadZonos] Injecting "${h}" from "${u}"`,"info");const y="4g"===(null===(l=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||t})())||void 0===l?void 0:l.effectiveType),g=["dev.elements.zonos.com","zonos.com"].some((e=>window.location.href.includes(e))),w=i[0]===e,f=i[1],v="on"===L.paralellLoadState&&y&&w&&f&&!g;v&&L.injectZonos({cdnType:f,initConfig:o,parallelLoaded:!0,vercelUrl:s,version:c});const C=performance.now();m.addEventListener("load",(()=>{if(v||n?L.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-C,scriptLoadUrl:m.src,storeId:L.storeId,type:e}):L.loadScriptLogHandler({fallbackLoadTime:performance.now()-C,scriptLoadUrl:m.src,storeId:L.storeId,type:e}),L.isBigCommerce||(L.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.isNpm=!1,window.Zonos.zonosQaUrl=U,window.Zonos.isBigCommerce=L.isBigCommerce,L.isLegacyCheckout){if(!L.zonosApiKey)throw L.legacyCheckoutErrorHandler({message:"zonosApiKey is required for legacy checkout",tempCartUUID:o.tempCartUUID}),new Error("zonosApiKey is required for legacy checkout");if(!L.tempCartData)throw L.legacyCheckoutErrorHandler({message:"tempCartData is required for legacy checkout",tempCartUUID:o.tempCartUUID}),new Error("zonosApiKey is required for legacy checkout");if(L.legacyStoreFavicon){const e=document.createElement("link");e.rel="shortcut icon",e.type="image/x-icon",e.href=L.legacyStoreFavicon,document.head.appendChild(e)}window.Zonos.tempCartData=L.tempCartData;const e=Object.assign(Object.assign({},o),{appearance:Object.assign(Object.assign({},o.appearance),{logoUrl:L.legacyStoreLogo||""}),checkoutSettings:Object.assign(Object.assign({},o.checkoutSettings),{successBehavior:"ZONOS_SUCCESS_PAGE",successRedirectUrl:L.tempCartData.contShoppingURL}),zonosApiKey:L.zonosApiKey});o=e}window.Zonos.version&&(t(`[ZONOS - loadZonos] Execute "Zonos.init" from "${h}" from "${u}"`,"info"),window.Zonos.init(o))})),m.addEventListener("error",(async()=>{if(!v&&!n){const t=a(e);if(!t)return;L.injectZonos({cdnType:t,initConfig:o,vercelUrl:s,version:c})}if(["localhost",".zonos.com"].some((e=>window.location.href.includes(e)))||U)return;if(v||n)return void L.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-C,isError:!0,scriptLoadUrl:m.src,storeId:L.storeId,type:e});["unpkg","vercel"].includes(e)?r({endpoint:m.src,errors:[`zonos.js - Failed to fetch ${e} CDN.`],metadata:{cdnLoadTime:performance.now()-C,cdnType:e,loadUrl:p,version:c}}):r({endpoint:m.src,errors:["[Info] Using alternative CDN. Failed to fetch script"],metadata:{cdnType:e,vercelLoadTime:performance.now()-C}})})),document.head.appendChild(m)},O.setupCartData=async e=>{const r=await(async e=>{const{errors:t,json:n}=await o("https://v1.route.js.zonos.com/api/bigcommerce/legacy-migration/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!n||t.length?null:n})(e);if(t("[ZONOS - loadZonos] getting temp cart data","info",r),!r)throw n("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),L.legacyCheckoutErrorHandler({message:"Error getting temp cart data",tempCartUUID:e}),new Error("Error getting temp cart data");return L.tempCartData=r.tempCart,L.legacyStoreLogo=r.storeLogoUrl,L.legacyStoreFavicon=r.storeFaviconUrl,{storeId:r.tempCart.storeId,zonosApiKey:r.zonosApiKey}},O.init=async e=>{var r;const i="https://v1.3.31.js.zonos.com",a=document.querySelector('script[src*="/zonos.js"]'),c=null===(r=document.querySelector("script[src*='/loadZonos.js']"))||void 0===r?void 0:r.src,l=null==c?void 0:c.includes("timestamp=");if(!(L.isNpm||c&&l))return void n("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(a||!c||L.requested)return void t("[ZONOS - loadZonos] script is already loaded or requested","info");L.requested=!0;let d=e.storeId;if(e.tempCartUUID){const o=await L.setupCartData(e.tempCartUUID);d=o.storeId,L.zonosApiKey=o.zonosApiKey,L.isLegacyCheckout=!0}if(!d)return t("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void L.injectZonos({initConfig:e,vercelUrl:i,version:null});L.storeId=d;const p=new URL("https://v1.route.js.zonos.com/api/get-store-version");p.searchParams.set("storeId",e.storeId.toString());const{errors:u,json:m}=await o(p.toString());if(u.length||!m)return t("[ZONOS - loadZonos] Error getting store version, loadding the latest version.","error"),void L.injectZonos({initConfig:e,vercelUrl:i,version:null});const{version:h}=m;if(!a){const{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r}=s({loadScriptSrc:c}),i=r&&!n?o:`${"alpha"===h?"alpha":`v${h}`}.js.zonos.com`,a=r&&!n?null:h;t("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r,loadUrl:i,loadVersion:a,version:h}),L.injectZonos({initConfig:e,vercelUrl:i,version:a})}},void 0===window.Zonos&&(window.Zonos=O)})();
|
|
1
|
+
(function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const e=async({response:e,shouldLog:o=!0,shouldThrow:t=!1})=>{try{return await e.json()}catch(e){if(t)throw e;return o&&console.error(e),null}};const o=async(o,t)=>{const n=(function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t})(t||{},[]),r=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",i=new URL(o);i.searchParams.set("zToken",(function(e){try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const a=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},n.headers),c=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:r,headers:a,method:s});return(async(o,t)=>{let n;try{n=await fetch(o,t)}catch(e){return e instanceof Error?{errors:[{message:e.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const r=n.headers.get("Zonos-Mode"),s=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&r&&s&&("production"===r&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===r&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),n.ok)return{errors:[],json:await e({response:n}),response:n};const i=n.status.toString();try{const o=await e({response:n,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(o)}`,type:i}],json:null,response:n}}catch(e){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),c)},t=(e,o,...t)=>{var n,r;if(!(!!(null===(n=window.Zonos)||void 0===n?void 0:n.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===o&&console.error(e,...t));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(o){case"warn":i.warn(e,...t);break;case"info":i.info(e,...t);break;case"error":i.error(e,...t);break;default:i.groupCollapsed(e,...t),i.trace(),i.groupEnd()}},n=(e,...o)=>{t(e,"error",...o)},r=async({endpoint:e,errors:t,metadata:n})=>{const r="userAgentData"in window.navigator?window.navigator.userAgentData:null,s={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:r&&r.brands.length>0?r:window.navigator.userAgent},n)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:s,method:"POST"})},s=({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),n=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:t}},i=["jsdelivr","unpkg","vercel"],a=e=>{const o=i.indexOf(e);return i[o+1]||null},c=()=>{if("undefined"==typeof window)return null;const e=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href);if(!e)return null;if("dev-elements"===e)return"https://dev.elements.zonos.com";const o=`https://${e}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,n=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",n),window.location.reload(),null})),o},l="https://js.stripe.com/v3",d=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,p="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let u=null;const m=e=>(null!==u||(u=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(p),window.Stripe)o(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${l}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&d.test(t.src))return t}return null})();r&&e?console.warn(p):r||(r=(e=>{const o=document.createElement("script");o.src=`${l}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),u),h=Promise.resolve().then((()=>m(null)));let y=!1;h.catch((e=>{y||console.warn(e)}));var g;const w=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:o,isWhiteListed:t}=s({loadScriptSrc:null==e?void 0:e.src});return t?o:null})(),f="https://v1.3.33.js.zonos.com",v=w||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.33",S="jsdelivr",b="https://rsms.me",C="https://fonts.googleapis.com",z=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;let j=class{};var L;g=j,j.doneInit=!1,j.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),j.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),j.isBigCommerce=!1,j.isNpm=!0,j.zonosQaUrl=null,j.version="v1.3.33",j.modeAlerted=!1,j.tempCartData=null,j.getCurrentTimestamp=()=>(new Date).getTime(),j.zonosController=null,j.init=async({appearance:e,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:a,storeId:c,zonosApiKey:l})=>{g.doneInit||(t(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),l?(g.zonosApiKey=l,g.storeId=c,t("init zonos"),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:e,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:a},zonosApiKey:l}),g.doneInit=!0):n("Missing Zonos API key"))},j.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},j.openHelloDialog=e=>{const o=document.querySelector("zonos-hello");o&&o.openHelloDialog(null==e||e)},j.showNotification=e=>{var o;null===(o=g.zonosController)||void 0===o||o.showNotification(e)},j.updateOrganizationName=e=>{var o;null===(o=g.zonosController)||void 0===o||o.updateOrganizationName(e)},j.disablePlaceOrderButtons=({autoEnable:e=!0,config:o,disable:t,placeOrderButtonSelector:n})=>{var r;if(!(null===(r=o.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},j.injectController=({config:e,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=e.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const o=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=e,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async e=>{const{detail:o}=e;t("loading Stripe");const r=await(async(...e)=>{y=!0;const o=Date.now();return h.then((t=>((e,o,t)=>{if(null===e)return null;const n=e.apply(void 0,o);return((e,o)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:o})})(n,t),n})(t,e,o)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),g.zonosController=s,t("Zonos controller injected!")},j.injectScript=({cdnType:e,isModule:o,theRestUrl:r})=>{const s=`${g.getZonosUrl(e)}/${r}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{n(`Failed to load ${c.src}`);const t=a(e);t&&g.injectScript({cdnType:t,isModule:o,theRestUrl:r})},i.appendChild(c)},j.getZonosUrl=e=>{const o=()=>{switch(e){case"jsdelivr":return v;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.33";default:return f}};if(g.isNpm){return c()||o()}return o()},j.injectZonosCdn=()=>{g.injectScript({cdnType:S,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:S,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},j.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=g.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${f}/`,r.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${o}`,i.onerror=()=>{n(`Failed to load ${i.href}`);const t=a(e);t&&g.injectStylesheet({cdnType:t,theRestUrl:o})},r.appendChild(i)},j.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:S,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},j.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${b}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&!z.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=b,e.appendChild(o);const n=document.createElement("link");n.rel="stylesheet",n.href=`${b}/inter/inter.css`,e.appendChild(n),t("Zonos font injected!")},j.setupGoogleFont=e=>{var o;null===(o=g.zonosController)||void 0===o||o.setupGoogleFont(e)},j.injectSupportGoogleFont=e=>{var o;t(`[FONT] injecting ${e}`);const n=null===(o=e.match(/family=(.*?):/))||void 0===o?void 0:o[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${C}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=C,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,r.appendChild(s),t(`[FONT] ${n} font injected!`)};const O=c();class U{static get isNpm(){return!1}}L=U,U.isBigCommerce=!1,U.requested=!1,U.zonosQaUrl=null,U.tempCartData=null,U.zonosApiKey=null,U.isLegacyCheckout=!1,U.legacyStoreLogo=null,U.legacyStoreFavicon=null,U.parallelLoadTimes=[],U.paralellLoadState="off",U.loadScriptLogHandler=async({cdnLoadTime:e,fallbackLoadTime:o,isError:t,metadata:n,scriptLoadUrl:r,storeId:s,type:i})=>{try{const e=window.performance.getEntriesByType("resource").find((e=>{const o=e;return o.name.includes(r)&&"script"===o.initiatorType}));null==e||e.transferSize;(async e=>{})((e&&(null==e?void 0:e.duration)>0?parseFloat(e.duration.toFixed(2)):parseFloat(o.toFixed(2)),Object.assign({decodedBodySize:null==e?void 0:e.decodedBodySize,encodedBodySize:null==e?void 0:e.encodedBodySize,fallbackLoadTime:o,isError:!!t},n)))}catch(e){}},U.loadScriptLogParallelHandler=async e=>{try{if(L.parallelLoadTimes.push(e),2===L.parallelLoadTimes.length){const e=L.parallelLoadTimes.find((e=>"vercel"===e.type)),o=L.parallelLoadTimes.find((e=>"jsdelivr"===e.type));if(!e||!o)return;if(e.isError&&o.isError)return void r({endpoint:`<${e.scriptLoadUrl}> <${o.scriptLoadUrl}>`,errors:["Failed to fetch both Vercel and jsdelivr CDN. Perhaps network issue on customer site."],metadata:{cdnLoadTime:o.fallbackLoadTime,cdnType:o.type,vercelLoadTime:e.fallbackLoadTime}});L.loadScriptLogHandler({cdnLoadTime:o.fallbackLoadTime,fallbackLoadTime:e.fallbackLoadTime,isError:e.isError,metadata:{cdnScriptFallbackTime:o.fallbackLoadTime,cdnScriptIsError:!!o.isError,cdnScriptLoadUrl:o.scriptLoadUrl,cdnScriptType:o.type},scriptLoadUrl:e.scriptLoadUrl,storeId:e.storeId,type:e.type})}}catch(e){}},U.legacyCheckoutErrorHandler=({message:e,tempCartUUID:o})=>{n(`[ZONOS - loadZonos] ${e}`),r({endpoint:"LegacyCheckoutInit",errors:[e],metadata:{tempCartUUID:o}}),document.dispatchEvent(new CustomEvent("legacyCheckoutError",{detail:e}))},U.getGithubCdn=({type:e,version:o})=>{let t="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.33";"unpkg"===e&&(t="https://unpkg.com/@zonos/elements@1.3.33");return o&&"alpha"!==o?t.replace(/@zonos\/elements@(.+)/,`@zonos/elements@${o}`):t},U.injectZonos=({cdnType:e=S,initConfig:o,parallelLoaded:n,vercelUrl:s,version:c})=>{var l;const d="vercel"===e?s:L.getGithubCdn({type:e,version:c}),p=O||d,u=p.replace("https://","").replace("http://",""),m=document.createElement("script"),h=c&&c<"1.2.5"?"loadZonos.js":"zonos.js";m.src=`https://${u}/dist/scripts/${h}`,t(`[ZONOS - loadZonos] Injecting "${h}" from "${u}"`,"info");const y="4g"===(null===(l=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||t})())||void 0===l?void 0:l.effectiveType),g=["dev.elements.zonos.com","zonos.com"].some((e=>window.location.href.includes(e))),w=i[0]===e,f=i[1],v="on"===L.paralellLoadState&&y&&w&&f&&!g;v&&L.injectZonos({cdnType:f,initConfig:o,parallelLoaded:!0,vercelUrl:s,version:c});const b=performance.now();m.addEventListener("load",(()=>{if(v||n?L.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-b,scriptLoadUrl:m.src,storeId:L.storeId,type:e}):L.loadScriptLogHandler({fallbackLoadTime:performance.now()-b,scriptLoadUrl:m.src,storeId:L.storeId,type:e}),L.isBigCommerce||(L.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.isNpm=!1,window.Zonos.zonosQaUrl=O,window.Zonos.isBigCommerce=L.isBigCommerce,L.isLegacyCheckout){if(!L.zonosApiKey)throw L.legacyCheckoutErrorHandler({message:"zonosApiKey is required for legacy checkout",tempCartUUID:o.tempCartUUID}),new Error("zonosApiKey is required for legacy checkout");if(!L.tempCartData)throw L.legacyCheckoutErrorHandler({message:"tempCartData is required for legacy checkout",tempCartUUID:o.tempCartUUID}),new Error("zonosApiKey is required for legacy checkout");if(L.legacyStoreFavicon){const e=document.createElement("link");e.rel="shortcut icon",e.type="image/x-icon",e.href=L.legacyStoreFavicon,document.head.appendChild(e)}window.Zonos.tempCartData=L.tempCartData;const e=Object.assign(Object.assign({},o),{appearance:Object.assign(Object.assign({},o.appearance),{logoUrl:L.legacyStoreLogo||""}),checkoutSettings:Object.assign(Object.assign({},o.checkoutSettings),{successBehavior:"ZONOS_SUCCESS_PAGE",successRedirectUrl:L.tempCartData.contShoppingURL}),zonosApiKey:L.zonosApiKey});o=e}window.Zonos.version&&(t(`[ZONOS - loadZonos] Execute "Zonos.init" from "${h}" from "${u}"`,"info"),window.Zonos.init(o))})),m.addEventListener("error",(async()=>{if(!v&&!n){const t=a(e);if(!t)return;L.injectZonos({cdnType:t,initConfig:o,vercelUrl:s,version:c})}if(["localhost",".zonos.com"].some((e=>window.location.href.includes(e)))||O)return;if(v||n)return void L.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-b,isError:!0,scriptLoadUrl:m.src,storeId:L.storeId,type:e});["unpkg","vercel"].includes(e)?r({endpoint:m.src,errors:[`zonos.js - Failed to fetch ${e} CDN.`],metadata:{cdnLoadTime:performance.now()-b,cdnType:e,loadUrl:p,version:c}}):r({endpoint:m.src,errors:["[Info] Using alternative CDN. Failed to fetch script"],metadata:{cdnType:e,vercelLoadTime:performance.now()-b}})})),document.head.appendChild(m)},U.setupCartData=async e=>{const r=await(async e=>{const{errors:t,json:n}=await o("https://v1.route.js.zonos.com/api/bigcommerce/legacy-migration/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!n||t.length?null:n})(e);if(t("[ZONOS - loadZonos] getting temp cart data","info",r),!r)throw n("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),L.legacyCheckoutErrorHandler({message:"Error getting temp cart data",tempCartUUID:e}),new Error("Error getting temp cart data");return L.tempCartData=r.tempCart,L.legacyStoreLogo=r.storeLogoUrl,L.legacyStoreFavicon=r.storeFaviconUrl,{storeId:r.tempCart.storeId,zonosApiKey:r.zonosApiKey}},U.init=async e=>{var r;const i="https://v1.3.33.js.zonos.com",a=document.querySelector('script[src*="/zonos.js"]'),c=null===(r=document.querySelector("script[src*='/loadZonos.js']"))||void 0===r?void 0:r.src,l=null==c?void 0:c.includes("timestamp=");if(!(L.isNpm||c&&l))return void n("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(a||!c||L.requested)return void t("[ZONOS - loadZonos] script is already loaded or requested","info");L.requested=!0;let d=e.storeId;if(e.tempCartUUID){const o=await L.setupCartData(e.tempCartUUID);d=o.storeId,L.zonosApiKey=o.zonosApiKey,L.isLegacyCheckout=!0}if(!d)return t("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void L.injectZonos({initConfig:e,vercelUrl:i,version:null});L.storeId=d;const p=new URL("https://v1.route.js.zonos.com/api/get-store-version");p.searchParams.set("storeId",e.storeId.toString());const{errors:u,json:m}=await o(p.toString());if(u.length||!m)return t("[ZONOS - loadZonos] Error getting store version, loadding the latest version.","error"),void L.injectZonos({initConfig:e,vercelUrl:i,version:null});const{version:h}=m;if(!a){const{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r}=s({loadScriptSrc:c}),i=r&&!n?o:`${"alpha"===h?"alpha":`v${h}`}.js.zonos.com`,a=r&&!n?null:h;t("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r,loadUrl:i,loadVersion:a,version:h}),L.injectZonos({initConfig:e,vercelUrl:i,version:a})}},void 0===window.Zonos&&(window.Zonos=U)})();
|
package/dist/scripts/zonos.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n=["jsdelivr","unpkg","vercel"],o=e=>{const t=n.indexOf(e);return n[t+1]||null},r=()=>{if("undefined"==typeof window)return null;const t=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const n=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${n}' for loading script`,"warn"),fetch(n).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${n}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,o=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),n},s="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,l="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let c=null;const d=e=>(null!==c||(c=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(l),window.Stripe)n(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&i.test(n.src))return n}return null})();r&&e?console.warn(l):r||(r=(e=>{const n=document.createElement("script");n.src=`${s}`;const o=document.head||document.body;return o?(o.appendChild(n),n):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),c),a=Promise.resolve().then((()=>d(null)));let u=!1;a.catch((e=>{u||console.warn(e)}));var p;const m=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})(),h="https://v1.3.
|
|
1
|
+
(function(){"use strict";const e=(e,t,...n)=>{var o,r;if(!(!!(null===(o=window.Zonos)||void 0===o?void 0:o.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...n));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...n);break;case"info":i.info(e,...n);break;case"error":i.error(e,...n);break;default:i.groupCollapsed(e,...n),i.trace(),i.groupEnd()}},t=(t,...n)=>{e(t,"error",...n)},n=["jsdelivr","unpkg","vercel"],o=e=>{const t=n.indexOf(e);return n[t+1]||null},r=()=>{if("undefined"==typeof window)return null;const t=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const n=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${n}' for loading script`,"warn"),fetch(n).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${n}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,o=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),n},s="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,l="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let c=null;const d=e=>(null!==c||(c=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(l),window.Stripe)n(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&i.test(n.src))return n}return null})();r&&e?console.warn(l):r||(r=(e=>{const n=document.createElement("script");n.src=`${s}`;const o=document.head||document.body;return o?(o.appendChild(n),n):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),c),a=Promise.resolve().then((()=>d(null)));let u=!1;a.catch((e=>{u||console.warn(e)}));var p;const m=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:n}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,n=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),o=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:o,isWhiteListed:n}})({loadScriptSrc:null==e?void 0:e.src});return n?t:null})(),h="https://v1.3.33.js.zonos.com",y=m||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.33",w="jsdelivr",f="https://rsms.me",g="https://fonts.googleapis.com",v=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class S{}p=S,S.doneInit=!1,S.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),S.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),S.isBigCommerce=!1,S.isNpm=!0,S.zonosQaUrl=null,S.version="v1.3.33",S.modeAlerted=!1,S.tempCartData=null,S.getCurrentTimestamp=()=>(new Date).getTime(),S.zonosController=null,S.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l,storeId:c,zonosApiKey:d})=>{p.doneInit||(e(`====== ZONOS DEBUG MODE: on (${p.version}) ======`),d?(p.zonosApiKey=d,p.storeId=c,e("init zonos"),p.injectZonosCdn(),p.injectZonosCss(),p.injectFonts(),p.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l},zonosApiKey:d}),p.doneInit=!0):t("Missing Zonos API key"))},S.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},S.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},S.showNotification=e=>{var t;null===(t=p.zonosController)||void 0===t||t.showNotification(e)},S.updateOrganizationName=e=>{var t;null===(t=p.zonosController)||void 0===t||t.updateOrganizationName(e)},S.disablePlaceOrderButtons=({autoEnable:e=!0,config:t,disable:n,placeOrderButtonSelector:o})=>{var r;if(!(null===(r=t.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&o){const t=document.querySelectorAll(o),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(n?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&n&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},S.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;p.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{p.disablePlaceOrderButtons({config:n,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{u=!0;const t=Date.now();return a.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),p.zonosController=s,e("Zonos controller injected!")},S.injectScript=({cdnType:n,isModule:r,theRestUrl:s})=>{const i=`${p.getZonosUrl(n)}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");r?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{t(`Failed to load ${c.src}`);const e=o(n);e&&p.injectScript({cdnType:e,isModule:r,theRestUrl:s})},l.appendChild(c)},S.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return y;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.33";default:return h}};if(p.isNpm){return r()||t()}return t()},S.injectZonosCdn=()=>{p.injectScript({cdnType:w,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),p.injectScript({cdnType:w,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},S.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const r=p.getZonosUrl(e),s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${h}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${r}/${n}`,l.onerror=()=>{t(`Failed to load ${l.href}`);const r=o(e);r&&p.injectStylesheet({cdnType:r,theRestUrl:n})},s.appendChild(l)},S.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(p.injectStylesheet({cdnType:w,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},S.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${f}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!v.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=f,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${f}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},S.setupGoogleFont=e=>{var t;null===(t=p.zonosController)||void 0===t||t.setupGoogleFont(e)},S.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${g}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=g,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=S)})();
|
|
@@ -119,6 +119,7 @@ export declare class ZonosCheckout {
|
|
|
119
119
|
handleWindowResize(): void;
|
|
120
120
|
handleMobileChange(): void;
|
|
121
121
|
handleAppearanceSettingsOverrideChange(): void;
|
|
122
|
+
handleAddressChange(): void;
|
|
122
123
|
componentWillLoad(): void;
|
|
123
124
|
disconnectedCallback(): void;
|
|
124
125
|
render(): any;
|
|
@@ -6,10 +6,10 @@ export declare class ZonosBadge {
|
|
|
6
6
|
*/
|
|
7
7
|
bold: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The color of the badge
|
|
10
10
|
* @default 24
|
|
11
11
|
*/
|
|
12
|
-
badgeColor: ColorPrefix;
|
|
12
|
+
badgeColor: ColorPrefix | 'transparent';
|
|
13
13
|
/**
|
|
14
14
|
* The icon element to display
|
|
15
15
|
* @default null
|
|
@@ -9,7 +9,7 @@ export declare class ZonosButton {
|
|
|
9
9
|
_placeholder?: never;
|
|
10
10
|
});
|
|
11
11
|
/**
|
|
12
|
-
* The color of the button
|
|
12
|
+
* The color of the button
|
|
13
13
|
* **NOTE**: If the button `variant` is set to 'standard', backgroundColor will be disregarded
|
|
14
14
|
*/
|
|
15
15
|
backgroundColor?: Color | (string & {
|
|
@@ -72,6 +72,11 @@ export declare class ZonosButton {
|
|
|
72
72
|
* Whether or not the button is loading
|
|
73
73
|
*/
|
|
74
74
|
loading: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* The content alignment within the button
|
|
77
|
+
* @default 'center'
|
|
78
|
+
*/
|
|
79
|
+
justifyContent: 'center' | 'flex-end' | 'flex-start';
|
|
75
80
|
/**
|
|
76
81
|
* The theme of the button
|
|
77
82
|
*/
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import type { Color } from "../../../types/index";
|
|
1
2
|
export declare class ZonosCard {
|
|
2
3
|
/**
|
|
3
4
|
* The actions to display in the header of the card
|
|
4
5
|
*/
|
|
5
6
|
actions?: HTMLElement;
|
|
7
|
+
/**
|
|
8
|
+
* The background color of the card
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: Color;
|
|
11
|
+
/**
|
|
12
|
+
* The border radius of the card
|
|
13
|
+
* @default 6
|
|
14
|
+
*/
|
|
15
|
+
borderRadius?: number;
|
|
6
16
|
/**
|
|
7
17
|
* The actions to display in the footer of the card
|
|
8
18
|
*/
|
|
@@ -26,12 +26,18 @@ export declare const stringsArabic: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsArabic: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsArabic: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsArabic: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsBase: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsBase: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsBase: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsBase: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsChinese: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsChinese: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsChinese: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsChinese: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsDanish: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsDanish: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsDanish: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsDanish: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsDutch: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsDutch: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsDutch: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsDutch: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsFrench: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsFrench: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsFrench: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsFrench: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|
|
@@ -26,12 +26,18 @@ export declare const stringsGerman: {
|
|
|
26
26
|
Cancel: {
|
|
27
27
|
value: string;
|
|
28
28
|
};
|
|
29
|
+
'Card number copied to clipboard': {
|
|
30
|
+
value: string;
|
|
31
|
+
};
|
|
29
32
|
'Cart subtotal': {
|
|
30
33
|
value: string;
|
|
31
34
|
};
|
|
32
35
|
City: {
|
|
33
36
|
value: string;
|
|
34
37
|
};
|
|
38
|
+
'Click to copy the card number. Use any future expiration date and three number CVC.': {
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
35
41
|
Close: {
|
|
36
42
|
value: string;
|
|
37
43
|
};
|
|
@@ -86,6 +92,9 @@ export declare const stringsGerman: {
|
|
|
86
92
|
'Expected delivery': {
|
|
87
93
|
value: string;
|
|
88
94
|
};
|
|
95
|
+
Failure: {
|
|
96
|
+
value: string;
|
|
97
|
+
};
|
|
89
98
|
'First name': {
|
|
90
99
|
value: string;
|
|
91
100
|
};
|
|
@@ -137,7 +146,10 @@ export declare const stringsGerman: {
|
|
|
137
146
|
'Orders to [countryName] must be over [threshold] to ship.': {
|
|
138
147
|
value: string;
|
|
139
148
|
};
|
|
140
|
-
Pay: {
|
|
149
|
+
'Pay [orderTotal]': {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
'Pay [organizationName]': {
|
|
141
153
|
value: string;
|
|
142
154
|
};
|
|
143
155
|
Payment: {
|
|
@@ -224,9 +236,18 @@ export declare const stringsGerman: {
|
|
|
224
236
|
'State/Province': {
|
|
225
237
|
value: string;
|
|
226
238
|
};
|
|
239
|
+
Success: {
|
|
240
|
+
value: string;
|
|
241
|
+
};
|
|
227
242
|
'Taxes will apply to all orders': {
|
|
228
243
|
value: string;
|
|
229
244
|
};
|
|
245
|
+
'Test cards': {
|
|
246
|
+
value: string;
|
|
247
|
+
};
|
|
248
|
+
'Test mode': {
|
|
249
|
+
value: string;
|
|
250
|
+
};
|
|
230
251
|
'The following items are unable to be shipped to your country and are not included in your cart total.': {
|
|
231
252
|
value: string;
|
|
232
253
|
};
|