@zonos/elements 1.3.15 → 1.3.16
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/RemoveIcon-081ac073.js +5 -0
- package/dist/cjs/{cart-db549f04.js → cart-d25723e7.js} +2 -1
- package/dist/cjs/{isColorVariable-fff5e469.js → isColorVariable-6f5a9608.js} +2 -2
- package/dist/cjs/{submitGtag-fd8acad5.js → submitGtag-484eaf9d.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +13 -13
- package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-card_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +27 -24
- package/dist/cjs/zonos-checkout.cjs.entry.js +16 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -17
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-input.cjs.entry.js +1 -1
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +3 -3
- package/dist/collection/__mocks__/vercel-app/zonos-hello.entry.js +1 -1
- package/dist/collection/__mocks__/zonos-url/zonos-hello.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/assets/LeftArrow.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/assets/RemoveIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/RemoveIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/SuccessIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +6 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/chevronDownIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/globe.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +8 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +10 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +13 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronDownIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronUpIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -3
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +4 -4
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +30 -30
- package/dist/collection/components/common/zonos-banner/zonos-banner.css +10 -10
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +2 -2
- package/dist/collection/components/common/zonos-button/zonos-button.css +63 -63
- package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
- package/dist/collection/components/common/zonos-card/zonos-card.css +7 -7
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +3 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +7 -7
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -4
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +8 -8
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +12 -12
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +1 -1
- package/dist/collection/components/common/zonos-input/zonos-input.css +22 -22
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +4 -4
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +7 -7
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +2 -2
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +14 -14
- package/dist/collection/components/common/zonos-text/zonos-text.css +7 -7
- package/dist/collection/components/common/zonos-text/zonos-text.js +1 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +30 -30
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/chevronDownIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/globe.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +379 -371
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +11 -11
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +7 -15
- package/dist/collection/components/store/hello/localization.js +2 -2
- package/dist/collection/components/utils/getButtonTheme.js +1 -1
- package/dist/collection/components/utils/isColorVariable.js +2 -2
- package/dist/components/isColorVariable.js +2 -2
- package/dist/components/stripe.js +2 -2
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/zonos-address-display2.js +1 -1
- package/dist/components/zonos-address-update-dialog2.js +2 -2
- package/dist/components/zonos-badge2.js +1 -1
- package/dist/components/zonos-banner2.js +3 -3
- package/dist/components/zonos-button2.js +6 -6
- package/dist/components/zonos-card2.js +1 -1
- package/dist/components/zonos-cart-items2.js +1 -1
- package/dist/components/zonos-cart-subtotal2.js +1 -1
- package/dist/components/zonos-checkbox2.js +8 -8
- package/dist/components/zonos-checkout-finish2.js +10 -7
- package/dist/components/zonos-checkout-footer2.js +3 -3
- package/dist/components/zonos-checkout-payment2.js +1 -1
- package/dist/components/zonos-checkout-progress-tabs2.js +4 -4
- package/dist/components/zonos-checkout.js +14 -3
- package/dist/components/zonos-controller.js +1 -1
- package/dist/components/zonos-country-select2.js +1 -1
- package/dist/components/zonos-custom-message2.js +1 -1
- package/dist/components/zonos-customer-info2.js +2 -2
- package/dist/components/zonos-dialog2.js +1 -1
- package/dist/components/zonos-hello-dialog-footer2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +9 -17
- package/dist/components/zonos-hello.js +2 -2
- package/dist/components/zonos-icon2.js +1 -1
- package/dist/components/zonos-input2.js +1 -1
- package/dist/components/zonos-language-select2.js +2 -2
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-notification2.js +1 -1
- package/dist/components/zonos-review2.js +3 -3
- package/dist/components/zonos-select-dialog-header2.js +1 -1
- package/dist/components/zonos-shipping-rich-radio2.js +3 -3
- package/dist/components/zonos-shipping2.js +2 -2
- package/dist/components/zonos-spinner2.js +1 -1
- package/dist/components/zonos-text2.js +2 -2
- package/dist/components/zonos-tooltip2.js +1 -1
- package/dist/esm/RemoveIcon-9dc5dd1a.js +3 -0
- package/dist/esm/{cart-462e89a6.js → cart-02f5c2ea.js} +2 -2
- package/dist/esm/{isColorVariable-fbf2d80d.js → isColorVariable-82457bef.js} +2 -2
- package/dist/esm/{submitGtag-ac7c3c89.js → submitGtag-ba38e1ac.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +13 -13
- package/dist/esm/zonos-badge_2.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +9 -9
- package/dist/esm/zonos-card_2.entry.js +3 -3
- package/dist/esm/zonos-cart-items_9.entry.js +27 -24
- package/dist/esm/zonos-checkout.entry.js +16 -5
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +6 -6
- package/dist/esm/zonos-hello-dialog.entry.js +9 -17
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-input.entry.js +1 -1
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +1 -1
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +3 -3
- package/dist/esm-es5/RemoveIcon-9dc5dd1a.js +1 -0
- package/dist/esm-es5/{cart-462e89a6.js → cart-02f5c2ea.js} +1 -1
- package/dist/esm-es5/isColorVariable-82457bef.js +1 -0
- package/dist/esm-es5/{submitGtag-ac7c3c89.js → submitGtag-ba38e1ac.js} +1 -1
- 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-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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-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-link.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +4 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/types/checkout/CheckoutConfig.d.ts +4 -1
- package/dist/zonos-elements/assets/ChevronDownIcon.svg +1 -1
- package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -1
- package/dist/zonos-elements/assets/LeftArrow.svg +1 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/assets/SuccessIcon.svg +1 -1
- package/dist/zonos-elements/{p-a6d7ac46.js → p-0265da6f.js} +1 -1
- package/dist/zonos-elements/p-0267a969.entry.js +1 -0
- package/dist/zonos-elements/p-08e7107d.js +1 -0
- package/dist/zonos-elements/p-154aaf95.system.js +1 -1
- package/dist/zonos-elements/{p-df192668.system.js → p-168e5b5f.system.js} +1 -1
- package/dist/zonos-elements/p-17e265c3.system.entry.js +1 -0
- package/dist/zonos-elements/p-1b8082dd.entry.js +1 -0
- package/dist/zonos-elements/p-1ba4cf64.entry.js +1 -0
- package/dist/zonos-elements/p-239cc943.system.entry.js +1 -0
- package/dist/zonos-elements/p-246133d3.entry.js +1 -0
- package/dist/zonos-elements/p-2770ba48.system.js +1 -0
- package/dist/zonos-elements/p-305f27c7.entry.js +1 -0
- package/dist/zonos-elements/p-3638e2ed.entry.js +1 -0
- package/dist/zonos-elements/p-36a461a6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-df24d548.system.entry.js → p-47e00966.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4a107b6f.system.js +1 -0
- package/dist/zonos-elements/p-4dca5484.system.entry.js +1 -0
- package/dist/zonos-elements/p-532995a4.system.entry.js +1 -0
- package/dist/zonos-elements/p-54004793.system.entry.js +1 -0
- package/dist/zonos-elements/p-54a32fd7.entry.js +1 -0
- package/dist/zonos-elements/{p-5f9c066d.system.entry.js → p-572a4de2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-baee62a4.entry.js → p-57adc7f8.entry.js} +1 -1
- package/dist/zonos-elements/{p-094c0ee8.entry.js → p-582d8b27.entry.js} +1 -1
- package/dist/zonos-elements/p-5d13795a.system.entry.js +1 -0
- package/dist/zonos-elements/p-5e33aab7.system.entry.js +1 -0
- package/dist/zonos-elements/p-66eb66d1.js +1 -0
- package/dist/zonos-elements/p-6dec476d.system.entry.js +1 -0
- package/dist/zonos-elements/p-6ece23b9.entry.js +1 -0
- package/dist/zonos-elements/p-835c8928.entry.js +1 -0
- package/dist/zonos-elements/p-83fecb2a.entry.js +1 -0
- package/dist/zonos-elements/{p-11f1b78c.entry.js → p-905d842b.entry.js} +1 -1
- package/dist/zonos-elements/{p-5d993965.js → p-981bf71a.js} +1 -1
- package/dist/zonos-elements/p-9da0562e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a93f2e84.entry.js → p-a889c1bc.entry.js} +1 -1
- package/dist/zonos-elements/p-ad088d46.system.entry.js +1 -0
- package/dist/zonos-elements/p-b98bdbcc.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3d8667a7.entry.js → p-cf0f8e32.entry.js} +1 -1
- package/dist/zonos-elements/p-d7acc81c.entry.js +1 -0
- package/dist/zonos-elements/{p-578f0aad.system.js → p-e0e66004.system.js} +1 -1
- package/dist/zonos-elements/p-e108e5ed.system.entry.js +1 -0
- package/dist/zonos-elements/p-ed7d251d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a6eeb4bd.system.entry.js → p-f124e659.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f71489e5.system.entry.js +1 -0
- package/dist/zonos-elements/p-f99eb5e7.entry.js +1 -0
- package/dist/zonos-elements/p-fd49d864.entry.js +1 -0
- package/dist/zonos-elements/p-fe246229.system.entry.js +1 -0
- package/dist/zonos-elements/p-ff403840.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.css +17 -9
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/RemoveIcon-6c79a2a1.js +0 -5
- package/dist/esm/RemoveIcon-f6715b36.js +0 -3
- package/dist/esm-es5/RemoveIcon-f6715b36.js +0 -1
- package/dist/esm-es5/isColorVariable-fbf2d80d.js +0 -1
- package/dist/zonos-elements/p-029f11dd.system.entry.js +0 -1
- package/dist/zonos-elements/p-11504442.entry.js +0 -1
- package/dist/zonos-elements/p-11bef836.system.entry.js +0 -1
- package/dist/zonos-elements/p-1e934274.entry.js +0 -1
- package/dist/zonos-elements/p-20582e58.system.entry.js +0 -1
- package/dist/zonos-elements/p-2439c82f.system.entry.js +0 -1
- package/dist/zonos-elements/p-321226b0.entry.js +0 -1
- package/dist/zonos-elements/p-3221530d.system.entry.js +0 -1
- package/dist/zonos-elements/p-32d27535.entry.js +0 -1
- package/dist/zonos-elements/p-3d10866d.entry.js +0 -1
- package/dist/zonos-elements/p-3f05d130.system.entry.js +0 -1
- package/dist/zonos-elements/p-430eefd4.entry.js +0 -1
- package/dist/zonos-elements/p-49825866.system.entry.js +0 -1
- package/dist/zonos-elements/p-5525b740.entry.js +0 -1
- package/dist/zonos-elements/p-58a8ef6c.entry.js +0 -1
- package/dist/zonos-elements/p-60e262f0.system.entry.js +0 -1
- package/dist/zonos-elements/p-64b594f4.js +0 -1
- package/dist/zonos-elements/p-66471df6.entry.js +0 -1
- package/dist/zonos-elements/p-80d78980.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a61a04f.system.entry.js +0 -1
- package/dist/zonos-elements/p-8b32f560.system.entry.js +0 -1
- package/dist/zonos-elements/p-94b15a5e.system.entry.js +0 -1
- package/dist/zonos-elements/p-9a45fae5.system.entry.js +0 -1
- package/dist/zonos-elements/p-9db2f9d1.system.js +0 -1
- package/dist/zonos-elements/p-b19d51e0.entry.js +0 -1
- package/dist/zonos-elements/p-b9652402.system.entry.js +0 -1
- package/dist/zonos-elements/p-cd1cc224.entry.js +0 -1
- package/dist/zonos-elements/p-d1b63cec.system.entry.js +0 -1
- package/dist/zonos-elements/p-d6b103d5.system.js +0 -1
- package/dist/zonos-elements/p-da6767d8.entry.js +0 -1
- package/dist/zonos-elements/p-dde1383b.entry.js +0 -1
- package/dist/zonos-elements/p-e28ed57c.js +0 -1
- package/dist/zonos-elements/p-f3d3c754.system.entry.js +0 -1
- package/dist/zonos-elements/p-f79682b5.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var isColorVariable=function(r){var i=r&&(/--zonos-elements-/gi.test(r)||/(\-*)\w+-\d+/gi.test(r));return!!i&&!r.includes("(")&&!r.includes("#")};export{isColorVariable as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function r(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function u(t){try{c(e["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):r(t.value).then(a,u)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,r,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(n){return c([t,n])}}function c(u){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(o=0)),o)try{if(e=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:o.label++;return{value:u[1],done:false};case 5:o.label++;r=u[1];u=[0];continue;case 7:u=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1];i=u;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(u);break}if(i[2])o.ops.pop();o.trys.pop();continue}u=n.call(t,o)}catch(t){u=[6,t];r=0}finally{e=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function r(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,i){function a(t){try{c(e.next(t))}catch(t){i(t)}}function u(t){try{c(e["throw"](t))}catch(t){i(t)}}function c(t){t.done?o(t.value):r(t.value).then(a,u)}c((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},e,r,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(n){return c([t,n])}}function c(u){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(o=0)),o)try{if(e=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:o.label++;return{value:u[1],done:false};case 5:o.label++;r=u[1];u=[0];continue;case 7:u=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1];i=u;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(u);break}if(i[2])o.ops.pop();o.trys.pop();continue}u=n.call(t,o)}catch(t){u=[6,t];r=0}finally{e=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{v as handleFetch,f as cartStore,l as localizationStore,a as log}from"./cart-02f5c2ea.js";import{z as zonosStore}from"./zonosStore-33ff08ff.js";var trackConversionEvent=function(t,n){return __awaiter(void 0,void 0,void 0,(function(){var o,e,r,i,a,u,c,s;return __generator(this,(function(f){switch(f.label){case 0:r=window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||!!((o=window.Zonos)===null||o===void 0?void 0:o.zonosQaUrl)||!!((e=window.Zonos)===null||e===void 0?void 0:e.debug);if(r&&!window.Zonos.zonosConversionTest){return[2]}i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");a=localizationStore.selectedCountryCode;u=zonosStore.organizationId;c=cartStore.checkoutSessionId;if(!c){return[2]}s={checkoutSessionId:c,countryCode:a,eventName:t,metadata:n,organizationId:u};return[4,handleFetch(i,{body:s,method:"POST"})];case 1:f.sent();return[2]}}))}))};var createCustomEvent=function(t,n){return new CustomEvent(t,{detail:n})};var sendErrorLog=function(t){return __awaiter(void 0,[t],void 0,(function(t){var n,o;var e=t.endpoint,r=t.errors,i=t.metadata;return __generator(this,(function(t){n="userAgentData"in window.navigator?window.navigator.userAgentData:null;o={endpoint:e,errors:r,metadata:Object.assign({href:window.location.href,userAgent:n&&n.brands.length>0?n:window.navigator.userAgent},i)};void handleFetch("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:o,method:"POST"});return[2]}))}))};var submitGtag=function(t){var n=zonosStore.checkoutSettings.analyticsProviders.find((function(t){return t.type==="GOOGLE_ANALYTICS"}));if(!n||(n===null||n===void 0?void 0:n.status)==="DISABLED"){return}if(typeof window.gtag==="function"){log("Zonos submits gtag event","log",t);window.gtag("event",t,{})}};export{submitGtag as a,createCustomEvent as c,sendErrorLog as s,trackConversionEvent as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,s,e,t){function n(o){return o instanceof e?o:new e((function(s){s(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{d(t.next(o))}catch(o){i(o)}}function r(o){try{d(t["throw"](o))}catch(o){i(o)}}function d(o){o.done?e(o.value):n(o.value).then(a,r)}d((t=t.apply(o,s||[])).next())}))};var __generator=this&&this.__generator||function(o,s){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(s){return d([o,s])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(t=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;n=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=s.call(o,e)}catch(o){r=[6,o];n=0}finally{t=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-e063389c.js";import{k as stripeStore,d as logError,l as localizationStore,t as translate}from"./cart-462e89a6.js";import{i as isCheckoutMobile}from"./isCheckoutMobile-8846dccb.js";import{i as isTextContainsNonLatinChars,c as containsNonLatinChars}from"./containsNonLatinChars-2d8810c3.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{R as RemoveIcon$1}from"./RemoveIcon-f6715b36.js";import{g as getBorderRadius}from"./getBorderRadius-567f1786.js";import{i as isDarkColor}from"./isDarkColor-7f62035a.js";var zonosAddressCss=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function o(o){registerInstance(this,o);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}o.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};o.prototype.updateAddressEventData=function(o){var s=o.event,e=o.type;switch(e){case"billing":stripeStore.stripeBillingAddressEventData=s;break;default:stripeStore.stripeAddressEventData=s;break}};o.prototype.updateAddressElement=function(o){var s=o.stripeAddressElement,e=o.type;if(e==="shipping"){stripeStore.stripeAddressElement=s;return}stripeStore.stripeBillingAddressElement=s};o.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var o,s,e,t,n,i,a,r,d;var l=this;return __generator(this,(function(c){this.stripe=window.Zonos.stripe;e=this.getStripeAddressInstance(),t=e.stripeAddressEventData,n=e.stripeElements;if(!this.stripe||!n){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(o=this.defaultAddress)===null||o===void 0?void 0:o.phone;if(!i){(s=this.defaultAddress)===null||s===void 0?true:delete s.phone}a=localizationStore.shippingZoneCountries;r=a?Object.values(a).map((function(o){return o.code})):[];d=n.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress&&!t?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:(t===null||t===void 0?void 0:t.value.address.country)||localizationStore.selectedCountryCode||"AL"}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));d.on("change",(function(o){var s=o.value;if(!l.isDirtyAddress&&s.address.line1.length>=3){l.isDirtyAddress=true;setTimeout((function(){if(isCheckoutMobile()){l.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var o=l.type==="shipping"?100:600;var s=l.el.closest(".zonos--group");var e=l.el.getBoundingClientRect().top+o;s===null||s===void 0?void 0:s.scrollTo({behavior:"smooth",top:e})}}),600)}l.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:l.type,elementType:"address",value:Object.assign(Object.assign({},s),{firstName:s.firstName||s.name.split(" ")[0],lastName:s.lastName||s.name.split(" ")[1]})}),type:l.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};o.prototype.disconnectedCallback=function(){var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.destroy()};o.prototype.componentDidLoad=function(){var o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0;void this.watchInitStripe()};o.prototype.render=function(){return h(Host,{key:"f45a7bbe9d6b5ffac15671a862b3ad4f2eb4a87b",class:"zonos--address zonos--elements"},h("zonos-text",{key:"a9119e6e0c4e5c81a7d17ebe4d6bec925404a3dd",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"7dc12043c6e75ebabd646490c390bafdc2cd4a1d",class:"zonos--address-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return o}();ZonosAddress.style=ZonosAddressStyle0;var zonosAddressDisplayCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--amino-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var ZonosAddressDisplayStyle0=zonosAddressDisplayCss;var ZonosAddressDisplay=function(){function o(o){registerInstance(this,o);this.currentAddress=undefined;this.addressType=undefined}o.prototype.render=function(){var o;var s=this.currentAddress,e=s.city,t=s.country,n=s.email,i=s.line1,a=s.line2,r=s.name,d=s.phone,l=s.postal_code,c=s.state;var f=(o=localizationStore.shippingZoneCountries)===null||o===void 0?void 0:o[t];var u=function(o){var s=o.bold,e=o.content;var t=isTextContainsNonLatinChars(e)?"red-600":"gray-1200";return h("zonos-text",{textColor:t,type:s?"boldLabel":"body"},e)};return h(Host,{class:"zonos--address-form zonos--elements"},h("div",{class:"zonos--title"},h("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?translate("Shipping"):translate("Billing"))),h("div",{class:"zonos--address-group"},r&&h("div",{class:"zonos--address-line"},u({bold:true,content:r})),n&&h("div",{class:"zonos--address-line"},u({content:n})),d&&h("div",{class:"zonos--address-line"},u({content:d})),i&&h("div",{class:"zonos--address-line"},u({content:i})),a&&h("div",{class:"zonos--address-line"},u({content:a})),h("div",{class:"zonos--address-line"},e&&u({content:e}),c&&u({content:c}),l&&u({content:l})),f&&h("div",{class:"zonos--address-line"},h("zonos-country-flag",{class:"zonos--country-flag",countryCode:f.code})," ",u({content:f.displayName}))))};return o}();ZonosAddressDisplay.style=ZonosAddressDisplayStyle0;var zonosAddressFormCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var ZonosAddressFormStyle0=zonosAddressFormCss;var ZonosAddressForm=function(){function o(o){var s=this;registerInstance(this,o);this.addressChange=createEvent(this,"addressChange",7);this.onInputChange=function(o){var e;var t=o.key,n=o.value;s.addressChange.emit(Object.assign(Object.assign({},s.localAddress),(e={},e[t]=n,e)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}o.prototype.watchCurrentAddress=function(){var o,s,e,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,f=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((o=this.translatedAddress.city)===null||o===void 0?void 0:o[r])||r,line1:((s=this.translatedAddress.line1)===null||s===void 0?void 0:s[d])||d,line2:((e=this.translatedAddress.line2)===null||e===void 0?void 0:e[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[f])||f})};o.prototype.componentWillLoad=function(){this.watchCurrentAddress()};o.prototype.render=function(){var o=this;var s=this.localAddress,e=s.city,t=s.country,n=s.line1,i=s.line2,a=s.name,r=s.phone,d=s.postal_code,l=s.state;var c=a.split(" ")[0]||"";var f=a.split(" ")[1]||"";return h(Host,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},h("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},h("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?translate("Shipping"):translate("Billing"))),h("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},h("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},h("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},translate("Contact")),h("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:translate("Email"),inputValue:this.currentAddress.email,isDisabled:true}),h("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},h("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:translate("First name"),inputValue:c,isError:isTextContainsNonLatinChars(c),onInputChange:function(s){return o.onInputChange({key:"name",value:"".concat(s.detail," ").concat(f)})}}),h("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:translate("Last name"),inputValue:f,isError:isTextContainsNonLatinChars(f),onInputChange:function(s){return o.onInputChange({key:"name",value:"".concat(c," ").concat(s.detail)})}}))),h("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},h("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},translate("Address")),h("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:translate("Country"),inputValue:t,isDisabled:true}),h("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:translate("Address line 1"),inputValue:n,isError:isTextContainsNonLatinChars(n),onInputChange:function(s){return o.onInputChange({key:"line1",value:s.detail})}}),h("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:translate("Address line 2"),inputValue:i,isError:isTextContainsNonLatinChars(i),onInputChange:function(s){return o.onInputChange({key:"line2",value:s.detail})}}),h("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},h("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:translate("City"),inputValue:e,isError:isTextContainsNonLatinChars(e),onInputChange:function(s){return o.onInputChange({key:"city",value:s.detail})}}),h("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:translate("State/Province"),inputValue:l,isError:isTextContainsNonLatinChars(l),onInputChange:function(s){return o.onInputChange({key:"state",value:s.detail})}})),h("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:translate("Postal code"),inputValue:d,isError:isTextContainsNonLatinChars(d),onInputChange:function(s){return o.onInputChange({key:"postal_code",value:s.detail})}}),h("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:translate("Phone number"),inputValue:r,onInputChange:function(s){return o.onInputChange({key:"phone",value:s.detail})}}))))};Object.defineProperty(o,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return o}();ZonosAddressForm.style=ZonosAddressFormStyle0;var zonosAddressUpdateDialogCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--amino-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--amino-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--amino-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var ZonosAddressUpdateDialogStyle0=zonosAddressUpdateDialogCss;var ZonosAddressUpdateDialog=function(){function o(o){var s=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.continueClicked=createEvent(this,"continueClicked",7);this.closeDialogHandler=function(){s.closeDialog.emit()};this.getTranslatedAddress=function(o){var s=o.currentAddress,e=o.translatedAddress;var t,n,i,a,r,d;var l=s.city,c=s.line1,h=s.line2,f=s.name,u=s.postal_code,b=s.state;return{city:((t=e.city)===null||t===void 0?void 0:t[l])||l,line1:((n=e.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=e.line2)===null||i===void 0?void 0:i[h])||h,name:((a=e.name)===null||a===void 0?void 0:a[f])||f,postal_code:((r=e.postal_code)===null||r===void 0?void 0:r[u])||u,state:((d=e.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(s,void 0,void 0,(function(){var o,s,e,t,n,i,a,r,d,l,c,h,f;return __generator(this,(function(u){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=containsNonLatinChars(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&containsNonLatinChars(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];f=((s=c===null||c===void 0?void 0:c.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"))||((e=h===null||h===void 0?void 0:h.shadowRoot)===null||e===void 0?void 0:e.querySelector(".has-error"));if(f){f.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(o){var s,e,t,n,i,a;var r=o.currentAddress,d=o.translatedAddress;var l=r.city,c=r.line1,h=r.line2,f=r.name,u=r.postal_code,b=r.state;return{city:(s={},s[l]=d.city,s),line1:(e={},e[c]=d.line1,e),line2:(t={},t[h]=d.line2,t),name:(n={},n[f]=d.name,n),postal_code:(i={},i[u]=d.postal_code,i),state:(a={},a[b]=d.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}o.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};o.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};o.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};o.prototype.render=function(){var o=this;var s=this.submitBtnColor||zonosStore.appearance.colorSecondary;var e=s==="#ffffff"?"outline":this.submitBtnType||"standard";var t=this.billingAddress;var n=this.shippingAddress;return h(Host,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:classes(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},h("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialog.emit()},open:this.dialogOpen,width:"568px"},h("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},h("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},h("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},h("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},translate("Update your address")),h("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon$1}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),h("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},translate("To ensure delivery all address details must be in Latin characters."))),h("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},h("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},translate("What you entered")),h("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},h("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:n}),t&&h("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:t})),h("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},h("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},translate("Translated address")),h("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:n,onAddressChange:function(s){var e=s.detail;o.translatedShippingAddressState=o.buildTranslateAddressState({currentAddress:n,translatedAddress:e})},translatedAddress:this.translatedShippingAddressState}),t&&h("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:t,onAddressChange:function(s){var e=s.detail;o.translatedBillingAddressState=o.buildTranslateAddressState({currentAddress:t,translatedAddress:e})},translatedAddress:this.translatedBillingAddressState}))),h("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},h("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},h("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:function(){return o.closeDialogHandler()},variant:"subtle"},translate("Cancel")),h("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"sm",variant:e},translate("Update address")))))))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return o}();ZonosAddressUpdateDialog.style=ZonosAddressUpdateDialogStyle0;var colorPrefixes=["blue","cyan","green","orange","purple","red","gray","glass"];var zonosCheckboxCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosCheckboxStyle0=zonosCheckboxCss;var ZonosCheckbox=function(){function o(o){registerInstance(this,o);this.checkboxSelected=createEvent(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}o.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};o.prototype.render=function(){var o=this;var s=colorPrefixes.includes(this.backgroundColor);var e=s?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var t=s?"var(--amino-".concat(this.backgroundColor,"-200)"):!isDarkColor(e)?"var(--amino-gray-800)":"var(--amino-gray-0)";var n=getBorderRadius({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return h(Host,{key:"8a3d5f66a7fb956dcb063f1b375bfb80856a80c4",class:classes(["zonos--elements zonos--checkbox"]),style:{"--background-color":e,"--border-radius":n,"--font-family":zonosStoreFontFamily(),"--size":"".concat(this.size,"px")}},h("label",{key:"95dc70a3821652e588706b570b40272a5f124b7f",class:classes([this.isDisabled&&"disabled"])},h("input",{key:"ef61adbd2246fbb934a17b31ea62cd5ce4ff88f7",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(s){o.checkboxSelected.emit(s.target.checked)},type:"checkbox"}),h("span",{key:"0587bf8dc5ee1477d91360e20d521efd9853c554",class:"checkmark-container"},h("svg",{key:"3b7abf05f170aa2c4a31f76763c79ce975a543bc",class:"checkmark",color:t,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"7d16a3850fbdca9fd3af7fa1f64a1715497b9c7b","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&h("zonos-text",{key:"305600e6860aeba8dfa0f3019d51d1bf91498310",size:this.fontSize},this.label)))};return o}();ZonosCheckbox.style=ZonosCheckboxStyle0;var zonosCollapseCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function o(o){registerInstance(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var s="".concat(this.collapseSize,"px");return this.collapsed?s:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var s,e,t;this.iframe=((s=this.el.shadowRoot)===null||s===void 0?void 0:s.querySelector("iframe"))||null;(t=(e=this.iframe)===null||e===void 0?void 0:e.contentWindow)===null||t===void 0?void 0:t.addEventListener("resize",(function(){if(!o.iframe){return}o.height=parseFloat(getComputedStyle(o.iframe).height)}))};o.prototype.render=function(){var o=this;if(!this.collapsed){setTimeout((function(){if(!o.collapsed){o.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"514e75d41d29d70b4ca60230288ae183200b1e12",class:"zonos--elements zonos--collapse",style:{"--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"068aee1d13bde4c83ea8582b34844da7452c907c"},h("iframe",{key:"b22fd8ad898a098c244cb817dc6951854505efca",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"b54783376005085e379c7b8d43218ead1bf8e8ac"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCollapse.style=ZonosCollapseStyle0;var RemoveIcon='<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 zonosDialogCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:var(--amino-gray-0);border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var ZonosDialogStyle0=zonosDialogCss;var ZonosDialog=function(){function o(o){var s=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isMobileMode=function(){return s.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){s.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!s.noClickOutside){s.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=getBorderRadius({overrideBorderStyle:this.borderStyle});return h(Host,{key:"48eb2701a74a7973d3502fd1fdc65ce85a6d71ed",class:classes(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":zonosStoreFontFamily(),"--height":this.height||"initial","--width":this.width}},h("div",{key:"b408d792740d8854bab8ea60bd50ce894a75a836",class:"zonos--backdrop"}),h("div",{key:"04affcf48e0b209fa8dacc74039dad536ed9cd9b","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},h("div",{key:"c615792a60b2fa51a74af265b7c944a64e9ff18d",class:"zonos--dialog"},this.isLoading&&h("div",{key:"78d3b571f75c6037fdd694b4621fb9eae48d8ce0",class:"zonos--loading"},h("zonos-spinner",{key:"bd96037d5fe1717ebeae5b1ba27b96aa9ec9253d",size:30})),(this.headerText||!this.noCloseButton)&&h("div",{key:"cc057cbed99107d7d234d08d38e67cbf0140dc66",class:"zonos--header"},this.headerText&&h("h3",{key:"587fff6b04981f1c24b44736b3b40044480f68ba",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&h("zonos-button",{key:"9a1944508996cd8ccb87f68ae175564528af3c4c",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close dialog",content:RemoveIcon}),noBackground:true,onClick:this.closeButtonHandler})),h("div",{key:"b563c1939c32489b63516cd4dd14df58a32a08cf",class:classes(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},h("slot",{key:"39d66d136f630afbac7ced146d3a8ac60d3c9672"})),h("slot",{key:"5bace66c84150024d0203f89fbf8f5c263cb7472",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosDialog.style=ZonosDialogStyle0;var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var ZonosLinkAuthentication=function(){function o(o){registerInstance(this,o);this.titleText=undefined;this.defaultEmail=null;this.stripe=stripeStore.stripe}o.prototype.watchInitStripe=function(){if(!this.stripe||!stripeStore.stripeElements){return}var o=this.defaultEmail?{email:this.defaultEmail}:undefined;var s=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication",{defaultValues:o||undefined});var e=this.el.querySelector(".zonos--link-authentication-component");if(!e){logError("Cannot find container element for linkAuthenticationElement");return}s.mount(e);s.on("change",(function(o){stripeStore.stripeLinkEventData=o}));stripeStore.stripeLinkElement=s};o.prototype.componentDidLoad=function(){this.watchInitStripe()};o.prototype.render=function(){return h(Host,{key:"4a7b9eb534e938f791f70e04756aa9fb1c39f2c7",class:"zonos--link-authentication zonos--elements"},h("zonos-text",{key:"cc4fe49ed6d4bd7cec502ef739b9e835e9e26584",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"f04a438d04e6ccd608d7ff61ac300fb09da4f0ce",class:"zonos--link-authentication-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return o}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;export{ZonosAddress as zonos_address,ZonosAddressDisplay as zonos_address_display,ZonosAddressForm as zonos_address_form,ZonosAddressUpdateDialog as zonos_address_update_dialog,ZonosCheckbox as zonos_checkbox,ZonosCollapse as zonos_collapse,ZonosDialog as zonos_dialog,ZonosLinkAuthentication as zonos_link_authentication};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,s,t){function n(o){return o instanceof s?o:new s((function(e){e(o)}))}return new(s||(s=Promise))((function(s,i){function a(o){try{d(t.next(o))}catch(o){i(o)}}function r(o){try{d(t["throw"](o))}catch(o){i(o)}}function d(o){o.done?s(o.value):n(o.value).then(a,r)}d((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return d([o,e])}}function d(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(s=0)),s)try{if(t=1,n&&(i=r[0]&2?n["return"]:r[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;if(n=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:s.label++;return{value:r[1],done:false};case 5:s.label++;n=r[1];r=[0];continue;case 7:r=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){s=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){s.label=r[1];break}if(r[0]===6&&s.label<i[1]){s.label=i[1];i=r;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(r);break}if(i[2])s.ops.pop();s.trys.pop();continue}r=e.call(o,s)}catch(o){r=[6,o];n=0}finally{t=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,d as getElement}from"./index-e063389c.js";import{k as stripeStore,d as logError,l as localizationStore,t as translate}from"./cart-02f5c2ea.js";import{i as isCheckoutMobile}from"./isCheckoutMobile-8846dccb.js";import{i as isTextContainsNonLatinChars,c as containsNonLatinChars}from"./containsNonLatinChars-2d8810c3.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{R as RemoveIcon$1}from"./RemoveIcon-9dc5dd1a.js";import{g as getBorderRadius}from"./getBorderRadius-567f1786.js";import{i as isDarkColor}from"./isDarkColor-7f62035a.js";var zonosAddressCss=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var ZonosAddressStyle0=zonosAddressCss;var ZonosAddress=function(){function o(o){registerInstance(this,o);this.invalidCharacters=createEvent(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}o.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:stripeStore.stripeBillingAddressElement,stripeAddressEventData:stripeStore.stripeBillingAddressEventData,stripeElements:stripeStore.stripeElementsForBillingAddress}}return{stripeAddressElement:stripeStore.stripeAddressElement,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeElements:stripeStore.stripeElements}};o.prototype.updateAddressEventData=function(o){var e=o.event,s=o.type;switch(s){case"billing":stripeStore.stripeBillingAddressEventData=e;break;default:stripeStore.stripeAddressEventData=e;break}};o.prototype.updateAddressElement=function(o){var e=o.stripeAddressElement,s=o.type;if(s==="shipping"){stripeStore.stripeAddressElement=e;return}stripeStore.stripeBillingAddressElement=e};o.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d;var l=this;return __generator(this,(function(c){this.stripe=window.Zonos.stripe;s=this.getStripeAddressInstance(),t=s.stripeAddressEventData,n=s.stripeElements;if(!this.stripe||!n){logError("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(o=this.defaultAddress)===null||o===void 0?void 0:o.phone;if(!i){(e=this.defaultAddress)===null||e===void 0?true:delete e.phone}a=localizationStore.shippingZoneCountries;r=a?Object.values(a).map((function(o){return o.code})):[];d=n.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress&&!t?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:(t===null||t===void 0?void 0:t.value.address.country)||localizationStore.selectedCountryCode||"AL"}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));d.on("change",(function(o){var e=o.value;if(!l.isDirtyAddress&&e.address.line1.length>=3){l.isDirtyAddress=true;setTimeout((function(){if(isCheckoutMobile()){l.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var o=l.type==="shipping"?100:600;var e=l.el.closest(".zonos--group");var s=l.el.getBoundingClientRect().top+o;e===null||e===void 0?void 0:e.scrollTo({behavior:"smooth",top:s})}}),600)}l.updateAddressEventData({event:Object.assign(Object.assign({},o),{elementMode:l.type,elementType:"address",value:Object.assign(Object.assign({},e),{firstName:e.firstName||e.name.split(" ")[0],lastName:e.lastName||e.name.split(" ")[1]})}),type:l.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};o.prototype.disconnectedCallback=function(){var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.destroy()};o.prototype.componentDidLoad=function(){var o=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!o&&o.value.address.line1.length>0;void this.watchInitStripe()};o.prototype.render=function(){return h(Host,{key:"f45a7bbe9d6b5ffac15671a862b3ad4f2eb4a87b",class:"zonos--address zonos--elements"},h("zonos-text",{key:"a9119e6e0c4e5c81a7d17ebe4d6bec925404a3dd",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"7dc12043c6e75ebabd646490c390bafdc2cd4a1d",class:"zonos--address-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return o}();ZonosAddress.style=ZonosAddressStyle0;var zonosAddressDisplayCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1200);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var ZonosAddressDisplayStyle0=zonosAddressDisplayCss;var ZonosAddressDisplay=function(){function o(o){registerInstance(this,o);this.currentAddress=undefined;this.addressType=undefined}o.prototype.render=function(){var o;var e=this.currentAddress,s=e.city,t=e.country,n=e.email,i=e.line1,a=e.line2,r=e.name,d=e.phone,l=e.postal_code,c=e.state;var f=(o=localizationStore.shippingZoneCountries)===null||o===void 0?void 0:o[t];var u=function(o){var e=o.bold,s=o.content;var t=isTextContainsNonLatinChars(s)?"red-600":"gray-1200";return h("zonos-text",{textColor:t,type:e?"boldLabel":"body"},s)};return h(Host,{class:"zonos--address-form zonos--elements"},h("div",{class:"zonos--title"},h("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?translate("Shipping"):translate("Billing"))),h("div",{class:"zonos--address-group"},r&&h("div",{class:"zonos--address-line"},u({bold:true,content:r})),n&&h("div",{class:"zonos--address-line"},u({content:n})),d&&h("div",{class:"zonos--address-line"},u({content:d})),i&&h("div",{class:"zonos--address-line"},u({content:i})),a&&h("div",{class:"zonos--address-line"},u({content:a})),h("div",{class:"zonos--address-line"},s&&u({content:s}),c&&u({content:c}),l&&u({content:l})),f&&h("div",{class:"zonos--address-line"},h("zonos-country-flag",{class:"zonos--country-flag",countryCode:f.code})," ",u({content:f.displayName}))))};return o}();ZonosAddressDisplay.style=ZonosAddressDisplayStyle0;var zonosAddressFormCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}";var ZonosAddressFormStyle0=zonosAddressFormCss;var ZonosAddressForm=function(){function o(o){var e=this;registerInstance(this,o);this.addressChange=createEvent(this,"addressChange",7);this.onInputChange=function(o){var s;var t=o.key,n=o.value;e.addressChange.emit(Object.assign(Object.assign({},e.localAddress),(s={},s[t]=n,s)))};this.currentAddress=undefined;this.translatedAddress=undefined;this.addressType=undefined;this.localAddress=this.currentAddress}o.prototype.watchCurrentAddress=function(){var o,e,s,t,n,i;var a=this.currentAddress,r=a.city,d=a.line1,l=a.line2,c=a.name,h=a.postal_code,f=a.state;this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((o=this.translatedAddress.city)===null||o===void 0?void 0:o[r])||r,line1:((e=this.translatedAddress.line1)===null||e===void 0?void 0:e[d])||d,line2:((s=this.translatedAddress.line2)===null||s===void 0?void 0:s[l])||l,name:((t=this.translatedAddress.name)===null||t===void 0?void 0:t[c])||c,postal_code:((n=this.translatedAddress.postal_code)===null||n===void 0?void 0:n[h])||h,state:((i=this.translatedAddress.state)===null||i===void 0?void 0:i[f])||f})};o.prototype.componentWillLoad=function(){this.watchCurrentAddress()};o.prototype.render=function(){var o=this;var e=this.localAddress,s=e.city,t=e.country,n=e.line1,i=e.line2,a=e.name,r=e.phone,d=e.postal_code,l=e.state;var c=a.split(" ")[0]||"";var f=a.split(" ")[1]||"";return h(Host,{key:"9c1ee87200d1f90e9dfac58c49aabba1777373a9",class:"zonos--address-form zonos--elements"},h("div",{key:"eec3416268ff2324fd751408552705086905423d",class:"zonos--title"},h("zonos-text",{key:"a4c254f78420dcfc712e1a83b20dd3ac9e64c460",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?translate("Shipping"):translate("Billing"))),h("div",{key:"b8109545d282fb8c06a2e791c30088018d6ffec0",class:"zonos--address-group"},h("div",{key:"833a395984cd75242e5d97697fd6566f11932d1b",class:"zonos--contact"},h("zonos-text",{key:"e60f574e95162aabf6465b878fc9b16c708e8029",type:"label"},translate("Contact")),h("zonos-input",{key:"24cd24a362a1bbc76d0c91718c48ae32baa20ae6",class:"zonos--form-email",inputLabel:translate("Email"),inputValue:this.currentAddress.email,isDisabled:true}),h("div",{key:"84e64ef44eb3b39ac7ab542e07d7a52a95377cae",class:"zonos--name zonos--address-row"},h("zonos-input",{key:"26621aca0d57a7fee743874b8d11af5f58c91b69",class:"zonos--form-first-name",inputLabel:translate("First name"),inputValue:c,isError:isTextContainsNonLatinChars(c),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(e.detail," ").concat(f)})}}),h("zonos-input",{key:"01e3e5038b4a4311dd5874a1213f936451dc300d",class:"zonos--form-last-name",inputLabel:translate("Last name"),inputValue:f,isError:isTextContainsNonLatinChars(f),onInputChange:function(e){return o.onInputChange({key:"name",value:"".concat(c," ").concat(e.detail)})}}))),h("div",{key:"eb42dece28082ff16a453110b3208de5b44b9fdb",class:"zonos--address"},h("zonos-text",{key:"3557122c716533be7b36a8bd395ea616a7061665",type:"label"},translate("Address")),h("zonos-input",{key:"bcc7d84d530f2f3a10537117eb6ef143df7cc8e2",class:"zonos--form-country",inputLabel:translate("Country"),inputValue:t,isDisabled:true}),h("zonos-input",{key:"6ce78e25151a129b69b501cf768604134a395e85",class:"zonos--form-line1",inputLabel:translate("Address line 1"),inputValue:n,isError:isTextContainsNonLatinChars(n),onInputChange:function(e){return o.onInputChange({key:"line1",value:e.detail})}}),h("zonos-input",{key:"6f7a18010e2d8131327154a31ba58544df56768c",class:"zonos--form-line2",inputLabel:translate("Address line 2"),inputValue:i,isError:isTextContainsNonLatinChars(i),onInputChange:function(e){return o.onInputChange({key:"line2",value:e.detail})}}),h("div",{key:"48afbf7a3cbd26fddfea4f2799005a51b1c3d3c6",class:"zonos--address-row"},h("zonos-input",{key:"6decf8c430d8d25b2c555b110009da74e0ac9e5f",class:"zonos--form-city",inputLabel:translate("City"),inputValue:s,isError:isTextContainsNonLatinChars(s),onInputChange:function(e){return o.onInputChange({key:"city",value:e.detail})}}),h("zonos-input",{key:"065e1be213d3cfec7749ab32890f96b0b484a25a",class:"zonos--form-state",inputLabel:translate("State/Province"),inputValue:l,isError:isTextContainsNonLatinChars(l),onInputChange:function(e){return o.onInputChange({key:"state",value:e.detail})}})),h("zonos-input",{key:"a69244bf84c9fd007c9ad4aad2b6cc6d44420775",class:"zonos--form-postal-code",inputLabel:translate("Postal code"),inputValue:d,isError:isTextContainsNonLatinChars(d),onInputChange:function(e){return o.onInputChange({key:"postal_code",value:e.detail})}}),h("zonos-input",{key:"0bcc89de1ecc4aae8a69d74eff42dfd117ada40b",class:"zonos--form-phone",inputLabel:translate("Phone number"),inputValue:r,onInputChange:function(e){return o.onInputChange({key:"phone",value:e.detail})}}))))};Object.defineProperty(o,"watchers",{get:function(){return{translatedAddress:["watchCurrentAddress"]}},enumerable:false,configurable:true});return o}();ZonosAddressForm.style=ZonosAddressFormStyle0;var zonosAddressUpdateDialogCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}";var ZonosAddressUpdateDialogStyle0=zonosAddressUpdateDialogCss;var ZonosAddressUpdateDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.continueClicked=createEvent(this,"continueClicked",7);this.closeDialogHandler=function(){e.closeDialog.emit()};this.getTranslatedAddress=function(o){var e=o.currentAddress,s=o.translatedAddress;var t,n,i,a,r,d;var l=e.city,c=e.line1,h=e.line2,f=e.name,u=e.postal_code,b=e.state;return{city:((t=s.city)===null||t===void 0?void 0:t[l])||l,line1:((n=s.line1)===null||n===void 0?void 0:n[c])||c,line2:((i=s.line2)===null||i===void 0?void 0:i[h])||h,name:((a=s.name)===null||a===void 0?void 0:a[f])||f,postal_code:((r=s.postal_code)===null||r===void 0?void 0:r[u])||u,state:((d=s.state)===null||d===void 0?void 0:d[b])||b}};this.continueClickHandler=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,s,t,n,i,a,r,d,l,c,h,f;return __generator(this,(function(u){this.continueLoading=true;t=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;n=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});i=containsNonLatinChars(Object.assign(Object.assign({},n),{country:this.shippingAddress.country}));a=t&&this.billingAddress&&containsNonLatinChars(Object.assign(Object.assign({},t),{country:this.billingAddress.country}));r=!!Object.keys(i).length;d=!!a&&!!Object.keys(a).length;if(r||d){l=(o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("zonos-address-form");c=l===null||l===void 0?void 0:l[0];h=l===null||l===void 0?void 0:l[1];f=((e=c===null||c===void 0?void 0:c.shadowRoot)===null||e===void 0?void 0:e.querySelector(".has-error"))||((s=h===null||h===void 0?void 0:h.shadowRoot)===null||s===void 0?void 0:s.querySelector(".has-error"));if(f){f.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2]}this.continueClicked.emit({billingAddress:t,shippingAddress:n});return[2]}))}))};this.buildTranslateAddressState=function(o){var e,s,t,n,i,a;var r=o.currentAddress,d=o.translatedAddress;var l=r.city,c=r.line1,h=r.line2,f=r.name,u=r.postal_code,b=r.state;return{city:(e={},e[l]=d.city,e),line1:(s={},s[c]=d.line1,s),line2:(t={},t[h]=d.line2,t),name:(n={},n[f]=d.name,n),postal_code:(i={},i[u]=d.postal_code,i),state:(a={},a[b]=d.state,a)}};this.continueLoading=false;this.dialogLoading=undefined;this.dialogOpen=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.isMobile=false;this.shippingAddress=undefined;this.billingAddress=undefined;this.translatedShippingAddress=undefined;this.translatedBillingAddress=undefined;this.showErrorBanner=false;this.translatedShippingAddressState={};this.translatedBillingAddressState={}}o.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};o.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};o.prototype.componentWillLoad=function(){this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};o.prototype.render=function(){var o=this;var e=this.submitBtnColor||zonosStore.appearance.colorSecondary;var s=e==="#ffffff"?"outline":this.submitBtnType||"standard";var t=this.billingAddress;var n=this.shippingAddress;return h(Host,{key:"03535edacb348258592641baa349e9dcf14bf78c",class:classes(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},h("zonos-dialog",{key:"c16871425dffe955d422ffa5b9aee1ece0da2890",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialog.emit()},open:this.dialogOpen,width:"568px"},h("div",{key:"e4fad501f7cfedc5783774d8b1bf785d6947d3c8",class:"zonos--body"},h("div",{key:"973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0",class:"zonos--dialog-header"},h("div",{key:"89c82b6ff3723056d161560da22bd16a992afee7",class:"zonos--dialog-title"},h("zonos-text",{key:"bf92ef0b40ea67a492164fedb95dd68b7d023e85",type:"title"},translate("Update your address")),h("zonos-button",{key:"4e7a1905c976cec396db5c34f633b383bba0d55a",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon$1}),noBackground:true,onClick:function(){return o.closeDialogHandler()}})),h("zonos-text",{key:"47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38"},translate("To ensure delivery all address details must be in Latin characters."))),h("div",{key:"28d9804f0a18f143ce541c2c511cbfa21a2a416f",class:"zonos--group"},h("zonos-text",{key:"43ec5a9fc8594d065b256952ca8e9392fba03839",class:"zonos--what-you-entered",type:"semiBoldLabel"},translate("What you entered")),h("div",{key:"b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1",class:"zonos--address-display-group"},h("zonos-address-display",{key:"152c53176a46575677723ca47386e484c659927a",addressType:"shipping",currentAddress:n}),t&&h("zonos-address-display",{key:"6c7ac2b49d121c26ce45f09a1eac9ef456d45910",addressType:"billing",currentAddress:t})),h("div",{key:"2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d",class:"zonos--address-form-section"},h("zonos-text",{key:"87d3380072a049ccde71ba1b752aedd36830348b",type:"semiBoldLabel"},translate("Translated address")),h("zonos-address-form",{key:"2cb36251c6549da05e272183b2c37478b4166fea",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:n,onAddressChange:function(e){var s=e.detail;o.translatedShippingAddressState=o.buildTranslateAddressState({currentAddress:n,translatedAddress:s})},translatedAddress:this.translatedShippingAddressState}),t&&h("zonos-address-form",{key:"9bf5ebd6fb08851716a72c855451bfeb3ee0ed68",addressType:"billing",class:"zonos--billing-address-form",currentAddress:t,onAddressChange:function(e){var s=e.detail;o.translatedBillingAddressState=o.buildTranslateAddressState({currentAddress:t,translatedAddress:s})},translatedAddress:this.translatedBillingAddressState}))),h("div",{key:"621df9c8919973b37c62aca5727bde3635086a6b",class:"zonos--group-btn"},h("div",{key:"95e9fd31418abc8e89ceef24af7cc251ee45ac93",class:"zonos--button-wrapper"},h("zonos-button",{key:"bef31fc81e7cc0f2b3f7ab875a29978b07865b6a",class:"zonos--cancel-btn",onClick:function(){return o.closeDialogHandler()},variant:"subtle"},translate("Cancel")),h("zonos-button",{key:"9d183153541766b421c3420681c1159ffa599682",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"sm",variant:s},translate("Update address")))))))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}},enumerable:false,configurable:true});return o}();ZonosAddressUpdateDialog.style=ZonosAddressUpdateDialogStyle0;var colorPrefixes=["blue","cyan","green","orange","purple","red","gray","glass"];var zonosCheckboxCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosCheckboxStyle0=zonosCheckboxCss;var ZonosCheckbox=function(){function o(o){registerInstance(this,o);this.checkboxSelected=createEvent(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}o.prototype.onClick=function(){if(this.isDisabled){return}this.checkboxSelected.emit(!this.isChecked)};o.prototype.render=function(){var o=this;var e=colorPrefixes.includes(this.backgroundColor);var s=e?"var(--zonos-elements-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var t=e?"var(--zonos-elements-".concat(this.backgroundColor,"-200)"):!isDarkColor(s)?"var(--zonos-elements-gray-800)":"var(--zonos-elements-gray-0)";var n=getBorderRadius({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return h(Host,{key:"be29586ffd5ae5227614622cfb402686ff5e0583",class:classes(["zonos--elements zonos--checkbox"]),style:{"--background-color":s,"--border-radius":n,"--font-family":zonosStoreFontFamily(),"--size":"".concat(this.size,"px")}},h("label",{key:"091c2388668a94962d7b2bde4496856805f675e8",class:classes([this.isDisabled&&"disabled"])},h("input",{key:"c0f66d11f63591b03631cb1c970c0db201d435e2",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(e){o.checkboxSelected.emit(e.target.checked)},type:"checkbox"}),h("span",{key:"ab6c4847d006a812829bd8e871520455da91c7b0",class:"checkmark-container"},h("svg",{key:"617693bef302910db463cdf95b10700b72ea8d44",class:"checkmark",color:t,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"410728b7d5edf27966e660e598f166ce8292015e","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&h("zonos-text",{key:"1b9a21e7ef15ad34684453bc25cb3744ba183cd0",size:this.fontSize},this.label)))};return o}();ZonosCheckbox.style=ZonosCheckboxStyle0;var zonosCollapseCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function o(o){registerInstance(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var e="".concat(this.collapseSize,"px");return this.collapsed?e:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var e,s,t;this.iframe=((e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("iframe"))||null;(t=(s=this.iframe)===null||s===void 0?void 0:s.contentWindow)===null||t===void 0?void 0:t.addEventListener("resize",(function(){if(!o.iframe){return}o.height=parseFloat(getComputedStyle(o.iframe).height)}))};o.prototype.render=function(){var o=this;if(!this.collapsed){setTimeout((function(){if(!o.collapsed){o.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"514e75d41d29d70b4ca60230288ae183200b1e12",class:"zonos--elements zonos--collapse",style:{"--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"068aee1d13bde4c83ea8582b34844da7452c907c"},h("iframe",{key:"b22fd8ad898a098c244cb817dc6951854505efca",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"b54783376005085e379c7b8d43218ead1bf8e8ac"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCollapse.style=ZonosCollapseStyle0;var RemoveIcon='<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 zonosDialogCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:var(--zonos-elements-gray-0);border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{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;border-radius:var(--zonos-elements-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var ZonosDialogStyle0=zonosDialogCss;var ZonosDialog=function(){function o(o){var e=this;registerInstance(this,o);this.closeDialog=createEvent(this,"closeDialog",7);this.isMobileMode=function(){return e.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){e.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!e.noClickOutside){e.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=getBorderRadius({overrideBorderStyle:this.borderStyle});return h(Host,{key:"48eb2701a74a7973d3502fd1fdc65ce85a6d71ed",class:classes(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":zonosStoreFontFamily(),"--height":this.height||"initial","--width":this.width}},h("div",{key:"b408d792740d8854bab8ea60bd50ce894a75a836",class:"zonos--backdrop"}),h("div",{key:"04affcf48e0b209fa8dacc74039dad536ed9cd9b","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},h("div",{key:"c615792a60b2fa51a74af265b7c944a64e9ff18d",class:"zonos--dialog"},this.isLoading&&h("div",{key:"78d3b571f75c6037fdd694b4621fb9eae48d8ce0",class:"zonos--loading"},h("zonos-spinner",{key:"bd96037d5fe1717ebeae5b1ba27b96aa9ec9253d",size:30})),(this.headerText||!this.noCloseButton)&&h("div",{key:"cc057cbed99107d7d234d08d38e67cbf0140dc66",class:"zonos--header"},this.headerText&&h("h3",{key:"587fff6b04981f1c24b44736b3b40044480f68ba",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&h("zonos-button",{key:"9a1944508996cd8ccb87f68ae175564528af3c4c",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close dialog",content:RemoveIcon}),noBackground:true,onClick:this.closeButtonHandler})),h("div",{key:"b563c1939c32489b63516cd4dd14df58a32a08cf",class:classes(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},h("slot",{key:"39d66d136f630afbac7ced146d3a8ac60d3c9672"})),h("slot",{key:"5bace66c84150024d0203f89fbf8f5c263cb7472",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosDialog.style=ZonosDialogStyle0;var zonosLinkAuthenticationCss=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}";var ZonosLinkAuthenticationStyle0=zonosLinkAuthenticationCss;var ZonosLinkAuthentication=function(){function o(o){registerInstance(this,o);this.titleText=undefined;this.defaultEmail=null;this.stripe=stripeStore.stripe}o.prototype.watchInitStripe=function(){if(!this.stripe||!stripeStore.stripeElements){return}var o=this.defaultEmail?{email:this.defaultEmail}:undefined;var e=stripeStore.stripeLinkElement||stripeStore.stripeElements.create("linkAuthentication",{defaultValues:o||undefined});var s=this.el.querySelector(".zonos--link-authentication-component");if(!s){logError("Cannot find container element for linkAuthenticationElement");return}e.mount(s);e.on("change",(function(o){stripeStore.stripeLinkEventData=o}));stripeStore.stripeLinkElement=e};o.prototype.componentDidLoad=function(){this.watchInitStripe()};o.prototype.render=function(){return h(Host,{key:"4a7b9eb534e938f791f70e04756aa9fb1c39f2c7",class:"zonos--link-authentication zonos--elements"},h("zonos-text",{key:"cc4fe49ed6d4bd7cec502ef739b9e835e9e26584",class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"f04a438d04e6ccd608d7ff61ac300fb09da4f0ce",class:"zonos--link-authentication-component"}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return o}();ZonosLinkAuthentication.style=ZonosLinkAuthenticationStyle0;export{ZonosAddress as zonos_address,ZonosAddressDisplay as zonos_address_display,ZonosAddressForm as zonos_address_form,ZonosAddressUpdateDialog as zonos_address_update_dialog,ZonosCheckbox as zonos_checkbox,ZonosCollapse as zonos_collapse,ZonosDialog as zonos_dialog,ZonosLinkAuthentication as zonos_link_authentication};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";var zonosBadgeCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";var zonosBadgeCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}";var ZonosBadgeStyle0=zonosBadgeCss;var ZonosBadge=function(){function o(o){registerInstance(this,o);this.bold=false;this.badgeColor="gray";this.icon=undefined;this.iconRight=false;this.size="default";this.rounded=false}o.prototype.render=function(){return h(Host,{key:"c68ba6ef2bcb35c94ecf2b11379be748aa998198",class:classes(["zonos--elements zonos--badge"]),style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"7f200effb42296a21829c292101ef3300b041327",class:classes(["zonos--badge-content",this.badgeColor,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,h("zonos-text",{key:"4358e95cb29ec6a82e32213b268612aadf8772c6"},h("slot",{key:"ab76831e3691a896179e06896d33ed771e4bbdf9"}))))};return o}();ZonosBadge.style=ZonosBadgeStyle0;var zonosTooltipCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1200);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var ZonosTooltipStyle0=zonosTooltipCss;var ZonosTooltip=function(){function o(o){registerInstance(this,o);this.label="";this.subtitle="";this.showTooltip=false}o.prototype.render=function(){var o=this;return h(Host,{key:"39503dadb0422477303a6715a744478d765e6ecf",class:"zonos--elements"},h("div",{key:"834be19e46353d018bf827327f418d3e82502cf5",class:"zonos--tooltip",onMouseEnter:function(){return o.showTooltip=true},onMouseLeave:function(){return o.showTooltip=false}},h("slot",{key:"7c8f731f548d1bcf750615be450d93004e83a369"}),h("div",{key:"b7f02a3057f2d2f6eeb65715e64783b48cab71ea",class:classes([this.showTooltip&&"zonos--show-tooltip","zonos--tooltip-content"])},h("zonos-text",{key:"f65ede18a38c299d389403400a4ae00a0387e2cb",size:"s",textColor:"gray-0",type:"boldLabel"},this.label),h("zonos-text",{key:"eb69da57b2e4f0e9be31801101c079618ac30148",size:"xs",textColor:"gray-0"},this.subtitle))))};return o}();ZonosTooltip.style=ZonosTooltipStyle0;export{ZonosBadge as zonos_badge,ZonosTooltip as zonos_tooltip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";var zonosBannerCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{border-radius:var(--
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";var zonosBannerCss=':host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{border-radius:var(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}';var ZonosBannerStyle0=zonosBannerCss;var ZonosBanner=function(){function o(o){var e=this;registerInstance(this,o);this.handleSlotChange=function(){e.hasContent=true};this.bannerTitle=undefined;this.intent=undefined;this.hasContent=false}o.prototype.render=function(){var o=this;var e=function(e){var s=e.color;var r="var(--zonos-elements-".concat(s,"-800)");var n="var(--zonos-elements-".concat(s,"-300)");var t=[o.bannerTitle,h("slot",{onSlotchange:o.handleSlotChange})].filter(Boolean),a=t[0],l=t[1];var i=s==="gray"?"gray-1200":"".concat(s,"-800");return h("div",{class:classes(["zonos--container"])},h("div",{class:"zonos--icon-wrapper"},h("svg",{color:r,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},h("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:n,"fill-rule":"evenodd"}),h("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),h("div",{class:"zonos--header-wrapper"},h("zonos-text",{textColor:i,type:"label",weight:600},a)),l&&h("div",{class:"zonos--content-wrapper"},h("zonos-text",{textColor:i},l)))};var s=classes(["zonos--elements zonos--banner",this.intent]);var r=zonosStoreFontFamily();switch(this.intent){case"error":return h(Host,{class:s,style:{"--font-family":r}},e({color:"red"}));case"info":return h(Host,{class:s,style:{"--font-family":r}},e({color:"blue"}));case"success":return h(Host,{class:s,style:{"--font-family":r}},e({color:"green"}));case"warning":return h(Host,{class:s,style:{"--font-family":r}},e({color:"orange"}));default:return h(Host,{class:s,style:{"--font-family":r}},e({color:"gray"}))}};return o}();ZonosBanner.style=ZonosBannerStyle0;export{ZonosBanner as zonos_banner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,d as getElement}from"./index-e063389c.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-567f1786.js";import{i as isColorVariable}from"./isColorVariable-fbf2d80d.js";import{i as isDarkColor}from"./isDarkColor-7f62035a.js";var getButtonTheme=function(o){var t=o||zonosStore.appearance.colorSecondary;var n=t&&isColorVariable(t)?"var(--amino-".concat(t,")"):t;var r=n&&isDarkColor(n)?"DARK":"LIGHT";return r};var styles=function(o){return Object.entries(o).reduce((function(o,t){var n=t[0],r=t[1];if(r){o[n]=r}return o}),{})};var zonosButtonCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--color, var(--amino-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--amino-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-500);color:var(--amino-gray-0)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--amino-radius-4);width:24px}";var ZonosButtonStyle0=zonosButtonCss;var ZonosButton=function(){function o(o){var t=this;registerInstance(this,o);this.handleSlotChange=function(){t.hasContent=true};this.buttonColor=undefined;this.backgroundColor=undefined;this.borderStyle=undefined;this.isDisabled=false;this.icon=null;this.iconRight=false;this.size="sm";this.variant="standard";this.noBackground=false;this.noPaddingLeft=false;this.noPaddingRight=false;this.loading=false;this.theme=undefined;this.hasIcon=!!this.icon;this.hasContent=false}o.prototype.iconChangeHandler=function(){this.hasIcon=!!this.icon};o.prototype.clickHandler=function(o){if(this.loading||this.isDisabled){o.preventDefault();o.stopPropagation()}};o.prototype.componentWillLoad=function(){this.iconChangeHandler()};o.prototype.render=function(){var o=this.loading||this.isDisabled;var t=this.variant||"standard";var n=this.backgroundColor||zonosStore.appearance.colorSecondary;var r=t==="standard"?getButtonTheme(n):undefined;var a=getBorderRadius({overrideBorderStyle:this.borderStyle});var e=isColorVariable(n)&&n?window.getComputedStyle(this.ele).getPropertyValue(n):n;var s=this.buttonColor&&isColorVariable(this.buttonColor)?"var(--amino-".concat(this.buttonColor,")"):this.buttonColor;var i=this.variant!=="subtle"&&e&&isDarkColor(e)?"white":s;var d=e&&isDarkColor(e)?"white":"black";return h(Host,{key:"10bfc0423b83cc231fb22fdc430a1e5de66705fc",class:classes(["zonos--elements"]),"data-theme":this.theme||r,disabled:o,style:styles({"--background-color":n,"--border-radius":a,"--color":i,"--font-family":zonosStoreFontFamily()})},h("button",{key:"1feab99eec063d35c53ed8c308ac7675988e565c",class:classes([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",t,this.size,n&&t==="standard"&&"override-background"]),disabled:o},this.loading&&h("div",{key:"4c7ad847266e626638762aeecfec011fbac3189b",class:"zonos--spinner-wrapper"},h("zonos-spinner",{key:"d433f729bb10922694c27314a31d5159095ef4a9",size:16,spinnerColor:d})),!this.loading&&!this.iconRight&&this.icon,h("slot",{key:"06f32dc6cb7e10b1acbbde8bf1a0f663ea458608",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{icon:["iconChangeHandler"]}},enumerable:false,configurable:true});return o}();ZonosButton.style=ZonosButtonStyle0;var zonosIconCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";var ZonosIconStyle0=zonosIconCss;var ZonosIcon=function(){function o(o){registerInstance(this,o);this.autoHeight=false;this.iconColor="gray-1200";this.content=undefined;this.size=24}o.prototype.render=function(){if(!this.content||!this.el.shadowRoot){return null}var o=isColorVariable(this.iconColor)?"var(--amino-".concat(this.iconColor,")"):this.iconColor;this.el.shadowRoot.innerHTML=this.content;return h(Host,{class:"zonos--elements",style:{"--color":o,"--font-family":zonosStoreFontFamily(),"--height":"".concat(this.autoHeight?"auto":"".concat(this.size,"px")),"--width":"".concat(this.size,"px")}})};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosIcon.style=ZonosIconStyle0;var zonosSpinnerCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--amino-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--amino-spinner-track-black)}:host(.white) circle{stroke:var(--amino-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--amino-spinner-track-white)}:host(.info) circle{stroke:var(--amino-blue-600)}:host(.info) circle.track{stroke:var(--amino-blue-100)}:host(.success) circle{stroke:var(--amino-green-600)}:host(.success) circle.track{stroke:var(--amino-green-100)}:host(.danger) circle{stroke:var(--amino-red-600)}:host(.danger) circle.track{stroke:var(--amino-red-100)}:host(.warning) circle{stroke:var(--amino-orange-600)}:host(.warning) circle.track{stroke:var(--amino-orange-100)}";var ZonosSpinnerStyle0=zonosSpinnerCss;var ZonosSpinner=function(){function o(o){registerInstance(this,o);this.size=32;this.spinnerColor=undefined}o.prototype.render=function(){if(!this.el.shadowRoot){return null}return h(Host,{class:classes(["zonos--elements",this.spinnerColor]),style:{"--size":"".concat(this.size,"px")}},h("svg",{viewBox:"0 0 50 50"},h("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),h("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosSpinner.style=ZonosSpinnerStyle0;export{ZonosButton as zonos_button,ZonosIcon as zonos_icon,ZonosSpinner as zonos_spinner};
|
|
1
|
+
import{r as registerInstance,h,H as Host,d as getElement}from"./index-e063389c.js";import{z as zonosStore,d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-567f1786.js";import{i as isColorVariable}from"./isColorVariable-82457bef.js";import{i as isDarkColor}from"./isDarkColor-7f62035a.js";var getButtonTheme=function(o){var e=o||zonosStore.appearance.colorSecondary;var t=e&&isColorVariable(e)?"var(--zonos-elements-".concat(e,")"):e;var n=t&&isDarkColor(t)?"DARK":"LIGHT";return n};var styles=function(o){return Object.entries(o).reduce((function(o,e){var t=e[0],n=e[1];if(n){o[t]=n}return o}),{})};var zonosButtonCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--zonos-elements-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--zonos-elements-surface-color);border:none;outline:1px solid var(--zonos-elements-surface-color);border-radius:var(--border-radius, var(--zonos-elements-radius-10));-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--color, var(--zonos-elements-gray-1200));margin:1px;}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--zonos-elements-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--zonos-elements-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--zonos-elements-size-sm);line-height:var(--zonos-elements-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--zonos-elements-size-md);line-height:var(--zonos-elements-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--zonos-elements-size-lg);line-height:var(--zonos-elements-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--zonos-elements-font-size-s)}}:host button.override-background{background-color:var(--background-color, var(--zonos-elements-gray-0));color:var(--color, var(--zonos-elements-gray-1200));outline:1px solid var(--background-color, var(--zonos-elements-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--zonos-elements-blue-600);outline:1px solid var(--zonos-elements-blue-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--zonos-elements-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--zonos-elements-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-600)}:host button:not(.override-background).success{background:var(--zonos-elements-green-600);outline:1px solid var(--zonos-elements-green-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--zonos-elements-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--zonos-elements-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--zonos-elements-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-green-400)}:host button:not(.override-background).danger{background:var(--zonos-elements-red-600);outline:1px solid var(--zonos-elements-red-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--zonos-elements-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--zonos-elements-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--zonos-elements-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-red-400)}:host button:not(.override-background).warning{background:var(--zonos-elements-orange-600);outline:1px solid var(--zonos-elements-orange-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--zonos-elements-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--zonos-elements-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--zonos-elements-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color);outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--zonos-elements-gray-500);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--zonos-elements-button-focus-ring);box-shadow:var(--zonos-elements-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--zonos-elements-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--zonos-elements-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host .zonos--footer-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;border-radius:var(--zonos-elements-radius-4);width:24px}";var ZonosButtonStyle0=zonosButtonCss;var ZonosButton=function(){function o(o){var e=this;registerInstance(this,o);this.handleSlotChange=function(){e.hasContent=true};this.buttonColor=undefined;this.backgroundColor=undefined;this.borderStyle=undefined;this.isDisabled=false;this.icon=null;this.iconRight=false;this.size="sm";this.variant="standard";this.noBackground=false;this.noPaddingLeft=false;this.noPaddingRight=false;this.loading=false;this.theme=undefined;this.hasIcon=!!this.icon;this.hasContent=false}o.prototype.iconChangeHandler=function(){this.hasIcon=!!this.icon};o.prototype.clickHandler=function(o){if(this.loading||this.isDisabled){o.preventDefault();o.stopPropagation()}};o.prototype.componentWillLoad=function(){this.iconChangeHandler()};o.prototype.render=function(){var o=this.loading||this.isDisabled;var e=this.variant||"standard";var t=this.backgroundColor||zonosStore.appearance.colorSecondary;var n=e==="standard"?getButtonTheme(t):undefined;var s=getBorderRadius({overrideBorderStyle:this.borderStyle});var r=isColorVariable(t)&&t?window.getComputedStyle(this.ele).getPropertyValue(t):t;var a=this.buttonColor&&isColorVariable(this.buttonColor)?"var(--zonos-elements-".concat(this.buttonColor,")"):this.buttonColor;var i=this.variant!=="subtle"&&r&&isDarkColor(r)?"white":a;var d=r&&isDarkColor(r)?"white":"black";return h(Host,{key:"f5fd039f9ceeacae2448a09228bacc1bd6476be7",class:classes(["zonos--elements"]),"data-theme":this.theme||n,disabled:o,style:styles({"--background-color":t,"--border-radius":s,"--color":i,"--font-family":zonosStoreFontFamily()})},h("button",{key:"bcd3c7bf52464dd1e7485cdac6b0e3defbf63af3",class:classes([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",e,this.size,t&&e==="standard"&&"override-background"]),disabled:o},this.loading&&h("div",{key:"ea73d8c4b4973f3a8ed6e5b85c2236c0f20b4c6f",class:"zonos--spinner-wrapper"},h("zonos-spinner",{key:"cdbe444e0aee0e64facd757a1b5ebd74208359e0",size:16,spinnerColor:d})),!this.loading&&!this.iconRight&&this.icon,h("slot",{key:"e7a46cced38d7916873e5dea8aff4c33e137cdf6",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{icon:["iconChangeHandler"]}},enumerable:false,configurable:true});return o}();ZonosButton.style=ZonosButtonStyle0;var zonosIconCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--width);height:var(--height);fill:var(--color);color:var(--color)}";var ZonosIconStyle0=zonosIconCss;var ZonosIcon=function(){function o(o){registerInstance(this,o);this.autoHeight=false;this.iconColor="gray-1200";this.content=undefined;this.size=24}o.prototype.render=function(){if(!this.content||!this.el.shadowRoot){return null}var o=isColorVariable(this.iconColor)?"var(--zonos-elements-".concat(this.iconColor,")"):this.iconColor;this.el.shadowRoot.innerHTML=this.content;return h(Host,{class:"zonos--elements",style:{"--color":o,"--font-family":zonosStoreFontFamily(),"--height":"".concat(this.autoHeight?"auto":"".concat(this.size,"px")),"--width":"".concat(this.size,"px")}})};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosIcon.style=ZonosIconStyle0;var zonosSpinnerCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--zonos-elements-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--zonos-elements-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--zonos-elements-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--zonos-elements-spinner-track-black)}:host(.white) circle{stroke:var(--zonos-elements-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--zonos-elements-spinner-track-white)}:host(.info) circle{stroke:var(--zonos-elements-blue-600)}:host(.info) circle.track{stroke:var(--zonos-elements-blue-100)}:host(.success) circle{stroke:var(--zonos-elements-green-600)}:host(.success) circle.track{stroke:var(--zonos-elements-green-100)}:host(.danger) circle{stroke:var(--zonos-elements-red-600)}:host(.danger) circle.track{stroke:var(--zonos-elements-red-100)}:host(.warning) circle{stroke:var(--zonos-elements-orange-600)}:host(.warning) circle.track{stroke:var(--zonos-elements-orange-100)}";var ZonosSpinnerStyle0=zonosSpinnerCss;var ZonosSpinner=function(){function o(o){registerInstance(this,o);this.size=32;this.spinnerColor=undefined}o.prototype.render=function(){if(!this.el.shadowRoot){return null}return h(Host,{class:classes(["zonos--elements",this.spinnerColor]),style:{"--size":"".concat(this.size,"px")}},h("svg",{viewBox:"0 0 50 50"},h("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),h("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosSpinner.style=ZonosSpinnerStyle0;export{ZonosButton as zonos_button,ZonosIcon as zonos_icon,ZonosSpinner as zonos_spinner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-e063389c.js";import{d as zonosStoreFontFamily}from"./zonosStore-33ff08ff.js";import{c as classes}from"./classes-0d95c529.js";import{I as localizationStoreUpdateSelectedLocale,t as translate,l as localizationStore}from"./cart-02f5c2ea.js";import{l as languages}from"./ILanguage-97790bee.js";import"./isDarkColor-7f62035a.js";import"./getBorderRadius-567f1786.js";var zonosCardCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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 .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos-elements-radius-6);padding:var(--spacing, 24px);text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";var ZonosCardStyle0=zonosCardCss;var ZonosCard=function(){function e(e){registerInstance(this,e);this.actions=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}e.prototype.render=function(){return h(Host,{key:"206169280db67be5e74382c5beccfad87ec9068a",style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"4a1c7eab9b5420295ce3ec30cfd59985be35d912",class:classes(["styled-card"]),style:{padding:this.spacing}},this.label&&h("header",{key:"75454e5d9eacdfdf842a9a220deab467625e497b",class:"card-header",style:{padding:this.spacing}},h("zonos-text",{key:"bc9c7d3500cef41237dbe53f27ab398103be55dd",type:"subheader"},this.label),h("h-stack",{key:"29d68a483bfc61ddfb9deeb63272a8221759513c",spacing:8},this.actions)),h("slot",{key:"0ad416c6cdb0b1fc2c922b8569cf35a4009263cc"}),(this.footerActions||this.footerContent)&&h("footer",{key:"469110ce0f0f81cbee4ef67e79d3be17933bcf2e",class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},h("div",{key:"9044d9f3c81935119f668deb188f16cb1cb243bb"},this.footerContent),h("h-stack",{key:"3f258ed6b07b8973b0bf753c7ab6427d67bf210c",spacing:8},this.footerActions))))};return e}();ZonosCard.style=ZonosCardStyle0;var GreenCheckDuotoneIcon='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var zonosLanguageSelectCss=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var ZonosLanguageSelectStyle0=zonosLanguageSelectCss;var ZonosLanguageSelect=function(){function e(e){var t=this;registerInstance(this,e);this.languageSelected=function(e){void localizationStoreUpdateSelectedLocale(e);t.handleOnClose()};this.handleOnClose=function(){}}e.prototype.render=function(){var e=this;var t=localizationStore.selectedLocale;return h(Host,{key:"e1943addb44b8e06d5b4534865f403a721175cdd",class:"zonos--elements",style:{"--font-family":zonosStoreFontFamily()}},h("div",{key:"888a410d444424f4ffb06dd28e5151bca9269de2",class:"zonos--language-select"},h("zonos-select-dialog-header",{key:"59aa5ae5e685f65baa1c7b1a19c1000ab8cdac74",handleOnClose:function(){return e.handleOnClose()},label:translate("Select a language")}),h("div",{key:"854c44fefe28f22fdd37b251d482ca6db46b0895",class:"zonos--language-select-content"},languages.map((function(o){return h("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(o.code)}},h("zonos-text",{textColor:"gray-800"},o.translatedLabel),o.code===t&&h("zonos-icon",{content:GreenCheckDuotoneIcon,size:16}))})))))};return e}();ZonosLanguageSelect.style=ZonosLanguageSelectStyle0;export{ZonosCard as zonos_card,ZonosLanguageSelect as zonos_language_select};
|