@zonos/elements 1.3.26 → 1.3.28

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.
Files changed (142) hide show
  1. package/dist/cjs/{cart-7e817cad.js → cart-62ff7ee7.js} +320 -200
  2. package/dist/cjs/index.cjs.js +3 -54
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{submitGtag-7e0065da.js → submitGtag-a5f8eaab.js} +1 -1
  5. package/dist/cjs/zonos-address_8.cjs.entry.js +3 -3
  6. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  7. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  9. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  10. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
  12. package/dist/cjs/zonos-elements.cjs.js +1 -1
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +59 -22
  14. package/dist/cjs/zonos-hello.cjs.entry.js +30 -3
  15. package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
  16. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +31 -3
  17. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  18. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +55 -21
  19. package/dist/collection/components/main/zonos-controller.js +1 -1
  20. package/dist/collection/components/store/translationStore/strings.arabic.js +16 -10
  21. package/dist/collection/components/store/translationStore/strings.base.js +16 -10
  22. package/dist/collection/components/store/translationStore/strings.chinese.js +16 -10
  23. package/dist/collection/components/store/translationStore/strings.danish.js +16 -10
  24. package/dist/collection/components/store/translationStore/strings.dutch.js +16 -10
  25. package/dist/collection/components/store/translationStore/strings.french.js +16 -10
  26. package/dist/collection/components/store/translationStore/strings.german.js +16 -10
  27. package/dist/collection/components/store/translationStore/strings.hebrew.js +16 -10
  28. package/dist/collection/components/store/translationStore/strings.indonesian.js +16 -10
  29. package/dist/collection/components/store/translationStore/strings.italian.js +16 -10
  30. package/dist/collection/components/store/translationStore/strings.japanese.js +16 -10
  31. package/dist/collection/components/store/translationStore/strings.korean.js +16 -10
  32. package/dist/collection/components/store/translationStore/strings.norwegian.js +16 -10
  33. package/dist/collection/components/store/translationStore/strings.polish.js +16 -10
  34. package/dist/collection/components/store/translationStore/strings.portuguese.js +16 -10
  35. package/dist/collection/components/store/translationStore/strings.russian.js +16 -10
  36. package/dist/collection/components/store/translationStore/strings.spanish.js +16 -10
  37. package/dist/collection/components/store/translationStore/strings.swedish.js +16 -10
  38. package/dist/collection/components/store/translationStore/strings.turkish.js +16 -10
  39. package/dist/collection/components/store/translationStore/strings.vietnamese.js +16 -10
  40. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  41. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  42. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  43. package/dist/collection/components/utils/wrapStringWithLink.js +3 -0
  44. package/dist/collection/scripts/_zonosBase.js +0 -51
  45. package/dist/esm/{cart-13e6a811.js → cart-b96aaa4f.js} +320 -200
  46. package/dist/esm/index.js +3 -54
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
  49. package/dist/esm/zonos-address_8.entry.js +3 -3
  50. package/dist/esm/zonos-card_2.entry.js +1 -1
  51. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  52. package/dist/esm/zonos-checkout.entry.js +2 -2
  53. package/dist/esm/zonos-controller.entry.js +2 -2
  54. package/dist/esm/zonos-country-flag.entry.js +1 -1
  55. package/dist/esm/zonos-country-select_3.entry.js +3 -3
  56. package/dist/esm/zonos-elements.js +1 -1
  57. package/dist/esm/zonos-hello-dialog.entry.js +59 -22
  58. package/dist/esm/zonos-hello.entry.js +30 -3
  59. package/dist/esm/zonos-payment.entry.js +2 -2
  60. package/dist/esm-es5/cart-b96aaa4f.js +1 -0
  61. package/dist/esm-es5/index.js +1 -1
  62. package/dist/esm-es5/loader.js +1 -1
  63. package/dist/esm-es5/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
  64. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  65. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  66. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  67. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  68. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  69. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  70. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  71. package/dist/esm-es5/zonos-elements.js +1 -1
  72. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  73. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  74. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  75. package/dist/scripts/index.d.ts +11 -3
  76. package/dist/scripts/index.js +1 -1
  77. package/dist/scripts/loadZonos.js +1 -1
  78. package/dist/scripts/zonos.js +1 -1
  79. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -0
  80. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +8 -0
  81. package/dist/types/components/store/translationStore/strings.arabic.d.ts +14 -8
  82. package/dist/types/components/store/translationStore/strings.base.d.ts +14 -8
  83. package/dist/types/components/store/translationStore/strings.chinese.d.ts +14 -8
  84. package/dist/types/components/store/translationStore/strings.danish.d.ts +14 -8
  85. package/dist/types/components/store/translationStore/strings.dutch.d.ts +14 -8
  86. package/dist/types/components/store/translationStore/strings.french.d.ts +14 -8
  87. package/dist/types/components/store/translationStore/strings.german.d.ts +14 -8
  88. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +14 -8
  89. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +14 -8
  90. package/dist/types/components/store/translationStore/strings.italian.d.ts +14 -8
  91. package/dist/types/components/store/translationStore/strings.japanese.d.ts +14 -8
  92. package/dist/types/components/store/translationStore/strings.korean.d.ts +14 -8
  93. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +14 -8
  94. package/dist/types/components/store/translationStore/strings.polish.d.ts +14 -8
  95. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +14 -8
  96. package/dist/types/components/store/translationStore/strings.russian.d.ts +14 -8
  97. package/dist/types/components/store/translationStore/strings.spanish.d.ts +14 -8
  98. package/dist/types/components/store/translationStore/strings.swedish.d.ts +14 -8
  99. package/dist/types/components/store/translationStore/strings.turkish.d.ts +14 -8
  100. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +14 -8
  101. package/dist/types/components/store/translationStore.d.ts +1 -1
  102. package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
  103. package/dist/types/scripts/_zonosBase.d.ts +0 -1
  104. package/dist/types/types/checkout/CheckoutConfig.d.ts +2 -2
  105. package/dist/types/types/hello/HelloConfig.d.ts +10 -1
  106. package/dist/zonos-elements/index.esm.js +1 -1
  107. package/dist/zonos-elements/{p-eea8111c.system.entry.js → p-087c83a5.system.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-d3e61deb.system.entry.js → p-10b9a681.system.entry.js} +1 -1
  109. package/dist/zonos-elements/p-1a40aaf4.system.js +1 -0
  110. package/dist/zonos-elements/{p-43c1dd27.system.entry.js → p-2613b5d3.system.entry.js} +1 -1
  111. package/dist/zonos-elements/p-2cb880e7.system.entry.js +1 -0
  112. package/dist/zonos-elements/p-3de62c84.entry.js +1 -0
  113. package/dist/zonos-elements/{p-492b8e12.entry.js → p-4a0cf47b.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-094c7343.system.entry.js → p-4e01d1ab.system.entry.js} +1 -1
  115. package/dist/zonos-elements/{p-452ed1a7.entry.js → p-5b4c1c09.entry.js} +1 -1
  116. package/dist/zonos-elements/p-5d53f9a4.js +1 -0
  117. package/dist/zonos-elements/{p-089c3737.system.entry.js → p-666d1605.system.entry.js} +1 -1
  118. package/dist/zonos-elements/{p-b88e52b5.entry.js → p-692816a7.entry.js} +1 -1
  119. package/dist/zonos-elements/p-725c2d57.entry.js +1 -0
  120. package/dist/zonos-elements/{p-e975b187.entry.js → p-7664dec5.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-2011cb03.entry.js → p-78a839b8.entry.js} +1 -1
  122. package/dist/zonos-elements/p-8b2125b3.system.js +1 -0
  123. package/dist/zonos-elements/{p-3e488bff.entry.js → p-8c9e7980.entry.js} +1 -1
  124. package/dist/zonos-elements/p-9b0aa65c.system.js +1 -0
  125. package/dist/zonos-elements/{p-cab01f64.system.entry.js → p-9cdfb51b.system.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-99da2348.entry.js → p-9f7c0472.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-58edaab6.system.entry.js → p-b208fec6.system.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-eabe2abc.js → p-b468f941.js} +1 -1
  129. package/dist/zonos-elements/{p-60621085.entry.js → p-c63a7dde.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-f7e2d33b.system.entry.js → p-d7b2a87f.system.entry.js} +1 -1
  131. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  132. package/dist/zonos-elements/{p-a5d823d3.system.entry.js → p-f69f1ec6.system.entry.js} +1 -1
  133. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  134. package/package.json +1 -1
  135. package/dist/esm-es5/cart-13e6a811.js +0 -1
  136. package/dist/zonos-elements/p-121be462.system.js +0 -1
  137. package/dist/zonos-elements/p-1f2077df.entry.js +0 -1
  138. package/dist/zonos-elements/p-3baf7a18.entry.js +0 -1
  139. package/dist/zonos-elements/p-74488e31.system.js +0 -1
  140. package/dist/zonos-elements/p-875a311d.js +0 -1
  141. package/dist/zonos-elements/p-d1771035.system.js +0 -1
  142. package/dist/zonos-elements/p-e80a5ed7.system.entry.js +0 -1
@@ -62,6 +62,9 @@ export declare const stringsNorwegian: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsNorwegian: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsNorwegian: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsNorwegian: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsNorwegian: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsNorwegian: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsPolish: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsPolish: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsPolish: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsPolish: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsPolish: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsPolish: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsPortuguese: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsPortuguese: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsPortuguese: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsPortuguese: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsPortuguese: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsPortuguese: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsRussian: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsRussian: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsRussian: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsRussian: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsRussian: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsRussian: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsSpanish: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsSpanish: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsSpanish: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsSpanish: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsSpanish: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsSpanish: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsSwedish: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsSwedish: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsSwedish: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsSwedish: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsSwedish: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsSwedish: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsTurkish: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsTurkish: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsTurkish: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsTurkish: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsTurkish: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsTurkish: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -62,6 +62,9 @@ export declare const stringsVietnamese: {
62
62
  "Don't close": {
63
63
  value: string;
64
64
  };
65
+ 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders': {
66
+ value: string;
67
+ };
65
68
  'Duties and taxes will be applied to items and shipping.': {
66
69
  value: string;
67
70
  };
@@ -104,6 +107,9 @@ export declare const stringsVietnamese: {
104
107
  'Last name': {
105
108
  value: string;
106
109
  };
110
+ 'Learn more.': {
111
+ value: string;
112
+ };
107
113
  'Missing required fields. Make sure all fields are completed.': {
108
114
  value: string;
109
115
  };
@@ -206,7 +212,10 @@ export declare const stringsVietnamese: {
206
212
  'Something went wrong.': {
207
213
  value: string;
208
214
  };
209
- Spend: {
215
+ 'Spend [threshold] duty free': {
216
+ value: string;
217
+ };
218
+ 'Spend [threshold] tax free': {
210
219
  value: string;
211
220
  };
212
221
  State: {
@@ -221,6 +230,9 @@ export declare const stringsVietnamese: {
221
230
  'The following items are unable to be shipped to your country and are not included in your cart total.': {
222
231
  value: string;
223
232
  };
233
+ 'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
234
+ value: string;
235
+ };
224
236
  "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
225
237
  value: string;
226
238
  };
@@ -248,7 +260,7 @@ export declare const stringsVietnamese: {
248
260
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
249
261
  value: string;
250
262
  };
251
- 'Welcome to [storeName]!': {
263
+ 'Welcome to [storeName]': {
252
264
  value: string;
253
265
  };
254
266
  'Welcome!': {
@@ -281,13 +293,7 @@ export declare const stringsVietnamese: {
281
293
  'click to learn more': {
282
294
  value: string;
283
295
  };
284
- 'duty free': {
285
- value: string;
286
- };
287
296
  'restricted items': {
288
297
  value: string;
289
298
  };
290
- 'tax free': {
291
- value: string;
292
- };
293
299
  };
@@ -30,5 +30,5 @@ type TranslateParams<T extends string> = ExtractVariables<T> extends never ? [T,
30
30
  * // No variables:
31
31
  * translate('Above de minimis threshold for')
32
32
  */
33
- declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Country" | "Customer" | "Hide" | "Delivery" | "Payment" | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Cart subtotal" | "City" | "Close" | "Contact" | "Continue to shipping" | "Couldn't place order" | "Customer information" | "Delivery options" | "Don't close" | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders" | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Missing required fields. Make sure all fields are completed." | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Reload" | "Restricted item" | "Restricted items found" | "Return to cart" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Session timed out" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend" | "State" | "State/Province" | "Taxes will apply to all orders" | "The following items are unable to be shipped to your country and are not included in your cart total." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Unable to check inventory. Please try again." | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]!" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your checkout session has expired. Please reload the page to continue." | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "duty free" | "restricted items" | "tax free">(...[key, replacement]: TranslateParams<T>) => string;
33
+ declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Country" | "Customer" | "Hide" | "Delivery" | "Payment" | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Cart subtotal" | "City" | "Close" | "Contact" | "Continue to shipping" | "Couldn't place order" | "Customer information" | "Delivery options" | "Don't close" | "Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders" | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders" | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Learn more." | "Missing required fields. Make sure all fields are completed." | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Reload" | "Restricted item" | "Restricted items found" | "Return to cart" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Session timed out" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend [threshold] duty free" | "Spend [threshold] tax free" | "State" | "State/Province" | "Taxes will apply to all orders" | "The following items are unable to be shipped to your country and are not included in your cart total." | "The low-value GST law passed July 1st, 2018 applies to this retailer." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Unable to check inventory. Please try again." | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your checkout session has expired. Please reload the page to continue." | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "restricted items">(...[key, replacement]: TranslateParams<T>) => string;
34
34
  export { translate, translationStore, translationStoreUpdateLanguage };
@@ -0,0 +1,4 @@
1
+ export declare const wrapStringWithLink: ({ href, text, }: {
2
+ href: string;
3
+ text: string;
4
+ }) => string;
@@ -158,7 +158,6 @@ export declare abstract class Zonos {
158
158
  static updateOrganizationName: (organizationName: string) => void;
159
159
  private static disablePlaceOrderButtons;
160
160
  private static injectController;
161
- private static injectSentryScript;
162
161
  private static injectScript;
163
162
  /**
164
163
  * We now support loading Zonos via npm. For clients using npm, `zonosBase` will always load from the server side. Therefore, the `zonosLoadUrl` defined earlier won't work since it lacks access to client-side APIs such as `window` and `document`.
@@ -100,8 +100,8 @@ export type CheckoutConfig = {
100
100
  * @param items - The cart items.
101
101
  * @returns {string | null} - The error message to display to the user. If the message is empty or null, the payment will proceed.
102
102
  * @example
103
- * onInventoryCheck: async (items) => {
104
- * // Check if all items are available from the server.
103
+ * onInventoryCheck: async ({ items }) => {
104
+ * // Check if all items are available from the server. If the fetch is throwing an error, we will show a generic error message "Unable to check inventory. Please try again.".
105
105
  * const itemsInfo = await fetch('https://yourserver.com/api/get-available-items', {
106
106
  * method: 'POST',
107
107
  * body: JSON.stringify({ items }),
@@ -1,4 +1,4 @@
1
- import type { CountryCode, HelloCurrencyBehavior, HelloMobileLocation, HelloPeekMessageBehavior, HelloRestrictionBehavior, Mode } from "../generated/graphql.customer.types";
1
+ import type { CountryCode, CurrencyCode, HelloCurrencyBehavior, HelloMobileLocation, HelloPeekMessageBehavior, HelloRestrictionBehavior, Mode } from "../generated/graphql.customer.types";
2
2
  export type CountryOverrideBehavior = 'URL_PARAM' | 'SESSION';
3
3
  export type ShowForCountries = 'ALL' | 'ONLY_SHIPPABLE' | CountryCode[];
4
4
  export type HelloConfig = {
@@ -29,4 +29,13 @@ export type HelloConfig = {
29
29
  * @default ONLY_SHIPPABLE
30
30
  */
31
31
  showForCountries?: ShowForCountries;
32
+ /**
33
+ * Callback function to run after the Hello widget has been initialized. This should be triggered only once when hello is attached to the DOM.
34
+ * **Note**: If hello is detached from the DOM and reattached, this callback will be called again.
35
+ * @param params - The parameters containing the country code and currency code that hello is initialized with.
36
+ */
37
+ onInitSucess?: (params: {
38
+ countryCode: CountryCode;
39
+ currencyCode: CurrencyCode;
40
+ }) => Promise<void>;
32
41
  };
@@ -1 +1 @@
1
- import{l as e,a as n}from"./p-eaa335e1.js";const o="https://js.stripe.com/v3",t=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let i=null;const r=Promise.resolve().then((()=>{return e=null,null!==i||(i=new Promise(((i,r)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(s),window.Stripe)i(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${o}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&t.test(o.src))return o}return null})();l&&e?console.warn(s):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",s=document.createElement("script");s.src=`${o}${t}`;const i=document.head||document.body;return i?(i.appendChild(s),s):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?i(window.Stripe):r(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{r(new Error("Failed to load Stripe.js"))}))}catch(e){return void r(e)}else i(null)}))),i;var e}));let l=!1;var c;r.catch((e=>{l||console.warn(e)}));const d=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})()||"https://v1.3.26.js.zonos.com",a="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.26",u="https://rsms.me",m="https://fonts.googleapis.com",p=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}c=w,w.doneInit=!1,w.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),w.isBigCommerce=!1,w.isNpm=!0,w.zonosQaUrl=null,w.version="v1.3.26",w.modeAlerted=!1,w.tempCartData=null,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l,storeId:d,zonosApiKey:a})=>{c.doneInit||(e(`====== ZONOS DEBUG MODE: on (${c.version}) ======`),a?(c.zonosApiKey=a,c.storeId=d,e("init zonos"),c.injectSentryScript(),c.injectZonosCdn(),c.injectZonosCss(),c.injectFonts(),c.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l},zonosApiKey:a}),c.doneInit=!0):n("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},w.showNotification=e=>{var n;null===(n=c.zonosController)||void 0===n||n.showNotification(e)},w.updateOrganizationName=e=>{var n;null===(n=c.zonosController)||void 0===n||n.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:n,placeOrderButtonSelector:o})=>{if(o){const t=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(n?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&n&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},w.injectController=({config:o,zonosApiKey:t})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=o.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const i=document.createElement("zonos-controller");i.config=o,i.zonosApiKey=t,i.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const s=await(async(...e)=>{l=!0;const n=Date.now();return r.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(t.publishableKey);s?(window.Zonos.stripe=s,i.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(i),c.zonosController=i,e("Zonos controller injected!")},w.injectSentryScript=()=>{const o="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${o}"]`))return void e("Sentry script already exists in the document","warn");const t=document.head||document.body,s=document.createElement("script");s.crossOrigin="anonymous",s.src=o,s.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",s.setAttribute("data-lazy","no"),s.onerror=()=>{n(`Failed to load ${s.src}`)},s.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({beforeSend(e){var n,o,t,s,i,r;const l=null===(r=null===(i=null===(s=null===(t=null===(o=null===(n=e.exception)||void 0===n?void 0:n.values)||void 0===o?void 0:o[0])||void 0===t?void 0:t.stacktrace)||void 0===s?void 0:s.frames)||void 0===i?void 0:i[0])||void 0===r?void 0:r.filename,c=(null==l?void 0:l.includes("js.zonos.com"))||(null==l?void 0:l.includes("@zonos/elements")),d=window.location.href.includes("dev.elements")||window.location.href.includes("route.js.zonos.com");return c&&!d?e:null},dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",ignoreErrors:["Failed to load Stripe.js"],release:`zonos-elements@${c.version}`,tracesSampler:()=>.01})},t.appendChild(s)},w.injectScript=({fallBackDomain:o,isModule:t,scriptDomain:s,theRestUrl:i})=>{const r=`${s}/${i}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const l=document.head||document.body,d=document.createElement("script");t?d.type="module":d.noModule=!0,d.src=r,d.crossOrigin="anonymous",d.onerror=()=>{/\/\/v\d+\./g.test(s)?(o&&c.injectScript({isModule:t,scriptDomain:o,theRestUrl:i}),n(`Failed to load ${d.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(d)},w.getZonosUrl=()=>c.isNpm&&(()=>{if("undefined"==typeof window)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href);if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const o=`https://${n}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),o})()||d,w.injectZonosCdn=()=>{const n=c.getZonosUrl();c.injectScript({fallBackDomain:a,isModule:!0,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),c.injectScript({fallBackDomain:a,isModule:!1,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:o,stylesheetDomain:t,theRestUrl:s})=>{const i=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${d}/`,i.appendChild(r);const l=document.createElement("link");l.rel="stylesheet",l.href=`${t}/${s}`,l.onerror=()=>{const i=/\/\/v\d+\./g.test(t);i?(o&&i&&c.injectStylesheet({stylesheetDomain:o,theRestUrl:s}),n(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},i.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(c.injectStylesheet({fallBackDomain:a,stylesheetDomain:d,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!p.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=u,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${u}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},w.setupGoogleFont=e=>{var n;null===(n=c.zonosController)||void 0===n||n.setupGoogleFont(e)},w.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${m}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=m,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${t} font injected!`)};export{w as Zonos}
1
+ import{l as e,a as n}from"./p-eaa335e1.js";const o="https://js.stripe.com/v3",t=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let i=null;const r=Promise.resolve().then((()=>{return e=null,null!==i||(i=new Promise(((i,r)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(s),window.Stripe)i(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${o}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&t.test(o.src))return o}return null})();l&&e?console.warn(s):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",s=document.createElement("script");s.src=`${o}${t}`;const i=document.head||document.body;return i?(i.appendChild(s),s):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?i(window.Stripe):r(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{r(new Error("Failed to load Stripe.js"))}))}catch(e){return void r(e)}else i(null)}))),i;var e}));let l=!1;var c;r.catch((e=>{l||console.warn(e)}));const d=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})()||"https://v1.3.28.js.zonos.com",a="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.28",u="https://rsms.me",m="https://fonts.googleapis.com",p=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}c=w,w.doneInit=!1,w.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),w.isBigCommerce=!1,w.isNpm=!0,w.zonosQaUrl=null,w.version="v1.3.28",w.modeAlerted=!1,w.tempCartData=null,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l,storeId:d,zonosApiKey:a})=>{c.doneInit||(e(`====== ZONOS DEBUG MODE: on (${c.version}) ======`),a?(c.zonosApiKey=a,c.storeId=d,e("init zonos"),c.injectZonosCdn(),c.injectZonosCss(),c.injectFonts(),c.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l},zonosApiKey:a}),c.doneInit=!0):n("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},w.showNotification=e=>{var n;null===(n=c.zonosController)||void 0===n||n.showNotification(e)},w.updateOrganizationName=e=>{var n;null===(n=c.zonosController)||void 0===n||n.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:n,placeOrderButtonSelector:o})=>{if(o){const t=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(n?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&n&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},w.injectController=({config:o,zonosApiKey:t})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=o.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const i=document.createElement("zonos-controller");i.config=o,i.zonosApiKey=t,i.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const s=await(async(...e)=>{l=!0;const n=Date.now();return r.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(t.publishableKey);s?(window.Zonos.stripe=s,i.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(i),c.zonosController=i,e("Zonos controller injected!")},w.injectScript=({fallBackDomain:o,isModule:t,scriptDomain:s,theRestUrl:i})=>{const r=`${s}/${i}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const l=document.head||document.body,d=document.createElement("script");t?d.type="module":d.noModule=!0,d.src=r,d.crossOrigin="anonymous",d.onerror=()=>{/\/\/v\d+\./g.test(s)?(o&&c.injectScript({isModule:t,scriptDomain:o,theRestUrl:i}),n(`Failed to load ${d.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(d)},w.getZonosUrl=()=>c.isNpm&&(()=>{if("undefined"==typeof window)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href);if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const o=`https://${n}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),o})()||d,w.injectZonosCdn=()=>{const n=c.getZonosUrl();c.injectScript({fallBackDomain:a,isModule:!0,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),c.injectScript({fallBackDomain:a,isModule:!1,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:o,stylesheetDomain:t,theRestUrl:s})=>{const i=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${d}/`,i.appendChild(r);const l=document.createElement("link");l.rel="stylesheet",l.href=`${t}/${s}`,l.onerror=()=>{const i=/\/\/v\d+\./g.test(t);i?(o&&i&&c.injectStylesheet({stylesheetDomain:o,theRestUrl:s}),n(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},i.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(c.injectStylesheet({fallBackDomain:a,stylesheetDomain:d,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!p.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=u,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${u}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},w.setupGoogleFont=e=>{var n;null===(n=c.zonosController)||void 0===n||n.setupGoogleFont(e)},w.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${m}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=m,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${t} font injected!`)};export{w as Zonos}