@zonos/elements 1.3.226 → 1.3.228

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 (177) hide show
  1. package/dist/cjs/{cart-af017ac3.js → cart-ad82a680.js} +2 -2
  2. package/dist/cjs/index.cjs.js +7 -7
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{localization-21030292.js → localization-31e3dfe3.js} +1 -1
  5. package/dist/cjs/{paypal-2b22f0f5.js → paypal-88b5e878.js} +3 -3
  6. package/dist/cjs/{placeTestOrder-9cde1ca4.js → placeTestOrder-6aefbf9c.js} +2 -2
  7. package/dist/cjs/{renderFallback-9300dbaf.js → renderFallback-87c908ad.js} +2 -2
  8. package/dist/cjs/{translationStore-ce2c700d.js → translationStore-b8b25e9d.js} +240 -0
  9. package/dist/cjs/zonos-address_11.cjs.entry.js +3 -3
  10. package/dist/cjs/{zonos-cart-items_12.cjs.entry.js → zonos-cart-items_13.cjs.entry.js} +23 -5
  11. package/dist/cjs/zonos-checkout.cjs.entry.js +26 -15
  12. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
  15. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
  17. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-elements.cjs.js +1 -1
  20. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  23. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +25 -13
  25. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  26. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  27. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  28. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  29. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  30. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  31. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  32. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  33. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  34. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  35. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  36. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  37. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  38. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  39. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  40. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  41. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  42. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  43. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  44. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  45. package/dist/collection/types/generated/graphql.internal.types.js +29 -0
  46. package/dist/esm/{cart-11b87221.js → cart-c74f9aaa.js} +3 -3
  47. package/dist/esm/index.js +7 -7
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/{localization-9320a65d.js → localization-106476cb.js} +1 -1
  50. package/dist/esm/{paypal-338a4350.js → paypal-bf3a2bdd.js} +3 -3
  51. package/dist/esm/{placeTestOrder-d28f33c2.js → placeTestOrder-891295e8.js} +2 -2
  52. package/dist/esm/{renderFallback-28ef3364.js → renderFallback-ce0e238a.js} +2 -2
  53. package/dist/esm/{translationStore-7eebaa41.js → translationStore-766b7521.js} +240 -0
  54. package/dist/esm/zonos-address_11.entry.js +3 -3
  55. package/dist/esm/{zonos-cart-items_12.entry.js → zonos-cart-items_13.entry.js} +23 -6
  56. package/dist/esm/zonos-checkout.entry.js +27 -16
  57. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  58. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  59. package/dist/esm/zonos-collect.entry.js +5 -5
  60. package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
  61. package/dist/esm/zonos-controller.entry.js +3 -3
  62. package/dist/esm/zonos-country-flag.entry.js +2 -2
  63. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  64. package/dist/esm/zonos-elements.js +1 -1
  65. package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
  66. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  67. package/dist/esm/zonos-hello.entry.js +2 -2
  68. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  69. package/dist/esm-es5/{cart-11b87221.js → cart-c74f9aaa.js} +1 -1
  70. package/dist/esm-es5/index.js +1 -1
  71. package/dist/esm-es5/loader.js +1 -1
  72. package/dist/esm-es5/{localization-9320a65d.js → localization-106476cb.js} +1 -1
  73. package/dist/esm-es5/{paypal-338a4350.js → paypal-bf3a2bdd.js} +1 -1
  74. package/dist/esm-es5/placeTestOrder-891295e8.js +1 -0
  75. package/dist/esm-es5/{renderFallback-28ef3364.js → renderFallback-ce0e238a.js} +1 -1
  76. package/dist/esm-es5/translationStore-766b7521.js +1 -0
  77. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  78. package/dist/esm-es5/{zonos-cart-items_12.entry.js → zonos-cart-items_13.entry.js} +1 -1
  79. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  80. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  81. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  82. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  83. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  85. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  86. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  87. package/dist/esm-es5/zonos-elements.js +1 -1
  88. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  89. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  90. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  91. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  92. package/dist/scripts/index.d.ts +10 -0
  93. package/dist/scripts/index.js +1 -1
  94. package/dist/scripts/loadZonos.js +1 -1
  95. package/dist/scripts/zonos.js +1 -1
  96. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +5 -4
  97. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  98. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  99. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  100. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  101. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  102. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  103. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  104. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  105. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  106. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  107. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  108. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  109. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  110. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  111. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  112. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  113. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  114. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  115. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  116. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  117. package/dist/types/types/generated/graphql.internal.types.d.ts +71 -0
  118. package/dist/types/types/generated/graphql.internal.types.ts +79 -0
  119. package/dist/types/types/utils/ZonosSettings.d.ts +4 -0
  120. package/dist/zonos-elements/index.esm.js +1 -1
  121. package/dist/zonos-elements/{p-19305aa8.entry.js → p-053a042e.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-4ce3489a.entry.js → p-10894d36.entry.js} +1 -1
  123. package/dist/zonos-elements/p-1865e33b.system.entry.js +1 -0
  124. package/dist/zonos-elements/{p-1c5ba523.js → p-1d15662c.js} +1 -1
  125. package/dist/zonos-elements/{p-0260fd13.js → p-203c7fda.js} +1 -1
  126. package/dist/zonos-elements/{p-e00e5d64.system.entry.js → p-21b251f0.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-2657f099.system.entry.js → p-225a61c4.system.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-4004c838.system.entry.js → p-236e0144.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-9e03a145.system.entry.js → p-23f6a2fb.system.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-bfc0fc85.system.entry.js → p-288f5a5b.system.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-1ef793d0.entry.js → p-2b84039a.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-04c1dc63.system.entry.js → p-2db90c99.system.entry.js} +1 -1
  133. package/dist/zonos-elements/{p-f5e68547.system.js → p-33bd80d2.system.js} +1 -1
  134. package/dist/zonos-elements/p-35c247d9.entry.js +1 -0
  135. package/dist/zonos-elements/{p-ba334962.system.entry.js → p-3d2925c5.system.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-ae3e4f2b.entry.js → p-462f8857.entry.js} +1 -1
  137. package/dist/zonos-elements/{p-1868a283.entry.js → p-5608ac9d.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-0b6a3a09.system.entry.js → p-57ee34aa.system.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-d531b524.system.js → p-595668d7.system.js} +1 -1
  140. package/dist/zonos-elements/{p-67787bd4.entry.js → p-62803534.entry.js} +1 -1
  141. package/dist/zonos-elements/p-6497ce22.entry.js +1 -0
  142. package/dist/zonos-elements/{p-6092af05.entry.js → p-65db3219.entry.js} +1 -1
  143. package/dist/zonos-elements/{p-7cee0e68.system.entry.js → p-6c8e4f01.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-1b9cc0e2.system.entry.js → p-6f1024de.system.entry.js} +1 -1
  145. package/dist/zonos-elements/{p-0a92e3fd.entry.js → p-76f924b3.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-375994d1.system.entry.js → p-7a97e1cf.system.entry.js} +1 -1
  147. package/dist/zonos-elements/p-81b357f7.system.js +1 -1
  148. package/dist/zonos-elements/{p-4dfe97ad.js → p-964a4d85.js} +2 -2
  149. package/dist/zonos-elements/{p-2616ba72.entry.js → p-9972941a.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-bcf11c99.system.entry.js → p-ad7be556.system.entry.js} +1 -1
  151. package/dist/zonos-elements/{p-cb0e6468.entry.js → p-b0a75761.entry.js} +1 -1
  152. package/dist/zonos-elements/p-b4fe3604.system.js +1 -0
  153. package/dist/zonos-elements/p-b8293509.js +1 -0
  154. package/dist/zonos-elements/{p-873b6185.system.entry.js → p-bd373de0.system.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-7eb8e2d4.js → p-c3c3cd98.js} +1 -1
  156. package/dist/zonos-elements/{p-0ec82d78.system.js → p-c89e9d56.system.js} +1 -1
  157. package/dist/zonos-elements/{p-725605f6.system.js → p-cdaf52f4.system.js} +1 -1
  158. package/dist/zonos-elements/{p-b5b3f908.system.js → p-cef1e888.system.js} +1 -1
  159. package/dist/zonos-elements/{p-e60b988c.entry.js → p-cf56b990.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-112c6453.system.js → p-de984173.system.js} +1 -1
  161. package/dist/zonos-elements/p-eea0d8af.js +1 -0
  162. package/dist/zonos-elements/{p-252fa1da.entry.js → p-f4085c23.entry.js} +1 -1
  163. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  164. package/package.json +1 -1
  165. package/dist/cjs/zonos-link.cjs.entry.js +0 -24
  166. package/dist/esm/zonos-link.entry.js +0 -20
  167. package/dist/esm-es5/placeTestOrder-d28f33c2.js +0 -1
  168. package/dist/esm-es5/translationStore-7eebaa41.js +0 -1
  169. package/dist/esm-es5/zonos-link.entry.js +0 -1
  170. package/dist/zonos-elements/p-02667a58.entry.js +0 -1
  171. package/dist/zonos-elements/p-0d82e1fd.entry.js +0 -1
  172. package/dist/zonos-elements/p-182da73f.system.js +0 -1
  173. package/dist/zonos-elements/p-5c43ecdf.system.entry.js +0 -1
  174. package/dist/zonos-elements/p-820ad058.js +0 -1
  175. package/dist/zonos-elements/p-a800965d.system.entry.js +0 -1
  176. package/dist/zonos-elements/p-cc599cd9.entry.js +0 -1
  177. package/dist/zonos-elements/p-d42b5113.js +0 -1
@@ -260,6 +260,13 @@ export const billingCompanyAccountType = {
260
260
 
261
261
  export type BillingCompanyAccountType =
262
262
  (typeof billingCompanyAccountType)[keyof typeof billingCompanyAccountType];
263
+ export const billingCompanyBusinessUnit = {
264
+ Ecommerce: 'ECOMMERCE',
265
+ SupplyChain: 'SUPPLY_CHAIN',
266
+ } as const;
267
+
268
+ export type BillingCompanyBusinessUnit =
269
+ (typeof billingCompanyBusinessUnit)[keyof typeof billingCompanyBusinessUnit];
263
270
 
264
271
  export const billingOptionCode = {
265
272
  DdpAndDdu: 'DDP_AND_DDU',
@@ -379,6 +386,13 @@ export const carrierApiRatingSignatureOptionType = {
379
386
 
380
387
  export type CarrierApiRatingSignatureOptionType =
381
388
  (typeof carrierApiRatingSignatureOptionType)[keyof typeof carrierApiRatingSignatureOptionType];
389
+ export const carrierApiRatingSource = {
390
+ Cache: 'CACHE',
391
+ Live: 'LIVE',
392
+ } as const;
393
+
394
+ export type CarrierApiRatingSource =
395
+ (typeof carrierApiRatingSource)[keyof typeof carrierApiRatingSource];
382
396
  export type CarrierApiRatingSpecialServiceDetail = {
383
397
  batteryDetail?: InputMaybe<CarrierApiRatingBatteryDetail>;
384
398
  serviceTypes: Array<CarrierApiRatingSpecialServiceType>;
@@ -1504,6 +1518,7 @@ export const currencyCode = {
1504
1518
  } as const;
1505
1519
 
1506
1520
  export type CurrencyCode = (typeof currencyCode)[keyof typeof currencyCode];
1521
+
1507
1522
  export const currencyDefaultStatus = {
1508
1523
  Disabled: 'DISABLED',
1509
1524
  Enabled: 'ENABLED',
@@ -1529,6 +1544,7 @@ export type CustomsDocumentCarrier =
1529
1544
  (typeof customsDocumentCarrier)[keyof typeof customsDocumentCarrier];
1530
1545
 
1531
1546
  export const customsDocumentFileType = {
1547
+ Html: 'HTML',
1532
1548
  Jpg: 'JPG',
1533
1549
  Pdf: 'PDF',
1534
1550
  Png: 'PNG',
@@ -1541,6 +1557,7 @@ export type CustomsDocumentFileType =
1541
1557
  export const customsDocumentType = {
1542
1558
  CertificateOfOrigin: 'CERTIFICATE_OF_ORIGIN',
1543
1559
  CommercialInvoice: 'COMMERCIAL_INVOICE',
1560
+ ControlLogReceipt: 'CONTROL_LOG_RECEIPT',
1544
1561
  Other: 'OTHER',
1545
1562
  ProFormaInvoice: 'PRO_FORMA_INVOICE',
1546
1563
  } as const;
@@ -1849,6 +1866,17 @@ export const errorType = {
1849
1866
 
1850
1867
  export type ErrorType = (typeof errorType)[keyof typeof errorType];
1851
1868
 
1869
+ export const exchangeRateTargetType = {
1870
+ BillingCompany: 'BILLING_COMPANY',
1871
+ MerchantBase: 'MERCHANT_BASE',
1872
+ MerchantProvided: 'MERCHANT_PROVIDED',
1873
+ MerchantSettled: 'MERCHANT_SETTLED',
1874
+ ShopperPresented: 'SHOPPER_PRESENTED',
1875
+ ZonosBase: 'ZONOS_BASE',
1876
+ } as const;
1877
+
1878
+ export type ExchangeRateTargetType =
1879
+ (typeof exchangeRateTargetType)[keyof typeof exchangeRateTargetType];
1852
1880
  export const exchangeRateType = {
1853
1881
  Guaranteed: 'GUARANTEED',
1854
1882
  MidMarket: 'MID_MARKET',
@@ -2077,6 +2105,13 @@ export const inclusivePriceCatalogValidationJobComplianceStatus = {
2077
2105
 
2078
2106
  export type InclusivePriceCatalogValidationJobComplianceStatus =
2079
2107
  (typeof inclusivePriceCatalogValidationJobComplianceStatus)[keyof typeof inclusivePriceCatalogValidationJobComplianceStatus];
2108
+ export const inclusivePriceCheckoutStatus = {
2109
+ Disabled: 'DISABLED',
2110
+ Enabled: 'ENABLED',
2111
+ } as const;
2112
+
2113
+ export type InclusivePriceCheckoutStatus =
2114
+ (typeof inclusivePriceCheckoutStatus)[keyof typeof inclusivePriceCheckoutStatus];
2080
2115
 
2081
2116
  export const inclusivePriceConfigurationStatus = {
2082
2117
  Disabled: 'DISABLED',
@@ -2550,6 +2585,7 @@ export const landedCostBillingRuleDetailCategoryIdCreateType = {
2550
2585
  ShopifyGuaranteePercentInclusive: 'SHOPIFY_GUARANTEE_PERCENT_INCLUSIVE',
2551
2586
  ShopifyTransactionPercent: 'SHOPIFY_TRANSACTION_PERCENT',
2552
2587
  Tax: 'TAX',
2588
+ ZonosShipping: 'ZONOS_SHIPPING',
2553
2589
  } as const;
2554
2590
 
2555
2591
  export type LandedCostBillingRuleDetailCategoryIdCreateType =
@@ -2656,6 +2692,7 @@ export const landedCostQuoteType = {
2656
2692
 
2657
2693
  export type LandedCostQuoteType =
2658
2694
  (typeof landedCostQuoteType)[keyof typeof landedCostQuoteType];
2695
+
2659
2696
  export const landedCostTariffRate = {
2660
2697
  Exact: 'EXACT',
2661
2698
  Maximum: 'MAXIMUM',
@@ -4062,6 +4099,9 @@ export const webhookStatus = {
4062
4099
  export type WebhookStatus = (typeof webhookStatus)[keyof typeof webhookStatus];
4063
4100
  export const webhookType = {
4064
4101
  InclusivePriceConfigurationChanged: 'INCLUSIVE_PRICE_CONFIGURATION_CHANGED',
4102
+ InclusivePriceConfigurationCreated: 'INCLUSIVE_PRICE_CONFIGURATION_CREATED',
4103
+ InclusivePriceConfigurationDeleted: 'INCLUSIVE_PRICE_CONFIGURATION_DELETED',
4104
+ InclusivePriceConfigurationUpdated: 'INCLUSIVE_PRICE_CONFIGURATION_UPDATED',
4065
4105
  InclusivePriceSyncReady: 'INCLUSIVE_PRICE_SYNC_READY',
4066
4106
  InventoryCheck: 'INVENTORY_CHECK',
4067
4107
  InventoryRefund: 'INVENTORY_REFUND',
@@ -4447,6 +4487,7 @@ export type CartCalculateLandedCostMutation = {
4447
4487
  displayName: string;
4448
4488
  id: string;
4449
4489
  shippingProfile: {
4490
+ serviceLevel: { code: string };
4450
4491
  transitTime: {
4451
4492
  guaranteedDelivery: string | null;
4452
4493
  max: number | null;
@@ -4543,6 +4584,7 @@ export type CalculateLandedCostMutation = {
4543
4584
  displayName: string;
4544
4585
  id: string;
4545
4586
  shippingProfile: {
4587
+ serviceLevel: { code: string };
4546
4588
  transitTime: {
4547
4589
  guaranteedDelivery: string | null;
4548
4590
  max: number | null;
@@ -4625,6 +4667,7 @@ export type ShipmentRatingFragment = {
4625
4667
  displayName: string;
4626
4668
  id: string;
4627
4669
  shippingProfile: {
4670
+ serviceLevel: { code: string };
4628
4671
  transitTime: {
4629
4672
  guaranteedDelivery: string | null;
4630
4673
  max: number | null;
@@ -4837,6 +4880,7 @@ export type CheckoutSessionCreateMutation = {
4837
4880
  displayName: string;
4838
4881
  id: string;
4839
4882
  shippingProfile: {
4883
+ serviceLevel: { code: string };
4840
4884
  transitTime: {
4841
4885
  guaranteedDelivery: string | null;
4842
4886
  max: number | null;
@@ -4936,6 +4980,7 @@ export type CheckoutSessionPaymentIntentCreateMutation = {
4936
4980
  displayName: string;
4937
4981
  id: string;
4938
4982
  shippingProfile: {
4983
+ serviceLevel: { code: string };
4939
4984
  transitTime: {
4940
4985
  guaranteedDelivery: string | null;
4941
4986
  max: number | null;
@@ -4993,6 +5038,24 @@ export type ExchangeRateCreateMutation = {
4993
5038
  } | null;
4994
5039
  };
4995
5040
 
5041
+ export type CurrencyConversionCreateMutation = {
5042
+ currencyConversionCreate: {
5043
+ exchangeRate: {
5044
+ expiresAt: string;
5045
+ rate: number;
5046
+ targetFormat: {
5047
+ currencyCode: CurrencyCode;
5048
+ decimalDelimiter: string;
5049
+ scale: number;
5050
+ symbol: string;
5051
+ symbolLocation: CurrencySymbolLocation | null;
5052
+ thousandsDelimiter: string;
5053
+ } | null;
5054
+ type: ExchangeRateType;
5055
+ };
5056
+ };
5057
+ };
5058
+
4996
5059
  export type CartCheckoutWorkflowQuery = {
4997
5060
  cartCheckoutWorkflow: {
4998
5061
  appearanceSettings: {
@@ -5456,6 +5519,7 @@ export type CheckoutSessionDetailsFragment = {
5456
5519
  displayName: string;
5457
5520
  id: string;
5458
5521
  shippingProfile: {
5522
+ serviceLevel: { code: string };
5459
5523
  transitTime: {
5460
5524
  guaranteedDelivery: string | null;
5461
5525
  max: number | null;
@@ -5554,6 +5618,7 @@ export type CheckoutSessionUpdateMutation = {
5554
5618
  displayName: string;
5555
5619
  id: string;
5556
5620
  shippingProfile: {
5621
+ serviceLevel: { code: string };
5557
5622
  transitTime: {
5558
5623
  guaranteedDelivery: string | null;
5559
5624
  max: number | null;
@@ -6488,6 +6553,20 @@ export function getSdk(
6488
6553
  'mutation',
6489
6554
  );
6490
6555
  },
6556
+ currencyConversionCreate(
6557
+ variables?: { [x: string]: never },
6558
+ requestHeaders?: GraphQLClientRequestHeaders,
6559
+ ): Promise<CurrencyConversionCreateMutation> {
6560
+ return withWrapper(
6561
+ wrappedRequestHeaders =>
6562
+ client.request<CurrencyConversionCreateMutation>('', variables, {
6563
+ ...requestHeaders,
6564
+ ...wrappedRequestHeaders,
6565
+ }),
6566
+ 'currencyConversionCreate',
6567
+ 'mutation',
6568
+ );
6569
+ },
6491
6570
  deleteWebhook(
6492
6571
  variables?: { [x: string]: never },
6493
6572
  requestHeaders?: GraphQLClientRequestHeaders,
@@ -25,6 +25,10 @@ export type GenericZonosSettings = {
25
25
  * Use custom address fields in the checkout based on the country user is from.
26
26
  */
27
27
  shouldEnabledCustomAddress?: boolean;
28
+ /**
29
+ * Whether or not Canadian shopper has to consent that they are aware of some procedures must happen after checking out otherwise the order will be returned
30
+ */
31
+ shouldFedExShippingConsentForCanadianShopper?: boolean;
28
32
  /**
29
33
  * Signed token for Google Places API iframe access.
30
34
  */
@@ -1 +1 @@
1
- import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)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),o="https://v1.3.226.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' 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,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",z=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,j="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(j),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&z.test(o.src))return o}return null})();t&&e?console.warn(j):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const R=(()=>{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","dev.assets-checkout.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})(),$=Date.now(),Z="https://v1.3.226.js.zonos.com",L=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.226",U="https://fonts.googleapis.com",A=/^https:\/\/fonts\.googleapis\.com/;class C{}T=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1753472651489",C.isLegacyCheckout=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.226",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||h){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.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)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.226";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.226";case"vercel":return Z}};return T.isNpm&&S()||n()},C.injectZonosCdn=()=>{T.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!A.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}
1
+ import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)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),o="https://v1.3.228.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' 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,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",z=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,j="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(j),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&z.test(o.src))return o}return null})();t&&e?console.warn(j):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const R=(()=>{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","dev.assets-checkout.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})(),$=Date.now(),Z="https://v1.3.228.js.zonos.com",L=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.228",U="https://fonts.googleapis.com",A=/^https:\/\/fonts\.googleapis\.com/;class C{}T=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1753887982114",C.isLegacyCheckout=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.228",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||h){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.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)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.228";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.228";case"vercel":return Z}};return T.isNpm&&S()||n()},C.injectZonosCdn=()=>{T.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!A.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}