@zonos/elements 1.3.14 → 1.3.15-alpha.0

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 (90) hide show
  1. package/dist/cjs/{cart-5d196917.js → cart-b1c89065.js} +32 -8
  2. package/dist/cjs/{sendErrorLog-3e181984.js → sendErrorLog-f7172707.js} +1 -1
  3. package/dist/cjs/{submitGtag-44e3a996.js → submitGtag-219f4e54.js} +1 -1
  4. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  5. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +4 -4
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
  8. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
  14. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
  15. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +3 -0
  16. package/dist/collection/components/store/checkout/cart.js +5 -10
  17. package/dist/collection/components/store/checkout/stripe.js +15 -8
  18. package/dist/components/stripe.js +32 -9
  19. package/dist/components/zonos-checkout-finish2.js +1 -1
  20. package/dist/components/zonos-checkout-progress-tabs2.js +1 -1
  21. package/dist/components/zonos-checkout.js +3 -1
  22. package/dist/components/zonos-controller.js +1 -1
  23. package/dist/components/zonos-hello-dialog2.js +1 -1
  24. package/dist/components/zonos-hello.js +1 -1
  25. package/dist/components/zonos-language-select2.js +1 -1
  26. package/dist/components/zonos-link-authentication2.js +1 -1
  27. package/dist/components/zonos-shipping2.js +1 -1
  28. package/dist/esm/{cart-515aac56.js → cart-1b0aaea9.js} +32 -9
  29. package/dist/esm/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
  30. package/dist/esm/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
  31. package/dist/esm/zonos-address_4.entry.js +2 -2
  32. package/dist/esm/zonos-card_2.entry.js +1 -1
  33. package/dist/esm/zonos-cart-items_10.entry.js +4 -4
  34. package/dist/esm/zonos-checkout.entry.js +5 -3
  35. package/dist/esm/zonos-controller.entry.js +1 -1
  36. package/dist/esm/zonos-country-flag.entry.js +1 -1
  37. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  38. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  39. package/dist/esm/zonos-hello.entry.js +1 -1
  40. package/dist/esm/zonos-payment.entry.js +1 -1
  41. package/dist/esm-es5/{cart-515aac56.js → cart-1b0aaea9.js} +1 -1
  42. package/dist/esm-es5/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
  43. package/dist/esm-es5/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
  44. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  45. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  46. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  47. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  48. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  49. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  50. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  51. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  52. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  53. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  54. package/dist/scripts/loadZonos.js +1 -1
  55. package/dist/scripts/zonos.js +1 -1
  56. package/dist/scripts/zonosBase.js +1 -1
  57. package/dist/types/components/store/checkout/cart.d.ts +2 -2
  58. package/dist/zonos-elements/{p-a583e3c6.system.entry.js → p-30d04ce6.system.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-4fbd0ce6.entry.js → p-3921d516.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-05f749dc.system.entry.js → p-393a8412.system.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-f48a613e.system.entry.js → p-4fbc3ea7.system.entry.js} +1 -1
  62. package/dist/zonos-elements/{p-3e38990b.entry.js → p-5247c5ab.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-816f1aee.js → p-659e81b2.js} +1 -1
  64. package/dist/zonos-elements/{p-bdd775f2.system.js → p-6847b4e8.system.js} +1 -1
  65. package/dist/zonos-elements/{p-ab06e5c8.system.entry.js → p-6a429588.system.entry.js} +1 -1
  66. package/dist/zonos-elements/p-6fd110c3.entry.js +1 -0
  67. package/dist/zonos-elements/p-78983c23.entry.js +1 -0
  68. package/dist/zonos-elements/{p-aa671fa6.entry.js → p-81df5a1b.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-3b4225b2.entry.js → p-85c2b823.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-2d404058.system.js → p-86867593.system.js} +1 -1
  71. package/dist/zonos-elements/{p-93698719.system.entry.js → p-8cfec6b6.system.entry.js} +1 -1
  72. package/dist/zonos-elements/p-94226f90.system.entry.js +1 -0
  73. package/dist/zonos-elements/{p-aa5e2f7c.system.entry.js → p-9ee65a0b.system.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-522294b9.system.entry.js → p-ac1bccb6.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-f6bbff95.entry.js → p-ae707165.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-7aef7d5d.system.entry.js → p-b5b09a07.system.entry.js} +1 -1
  77. package/dist/zonos-elements/p-b8e8330b.system.js +1 -1
  78. package/dist/zonos-elements/{p-d9aa8599.entry.js → p-c93c8ecc.entry.js} +1 -1
  79. package/dist/zonos-elements/{p-9da65d62.entry.js → p-d8c5b848.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-3f713699.entry.js → p-def5023c.entry.js} +1 -1
  81. package/dist/zonos-elements/{p-8ec3995a.system.entry.js → p-e412387c.system.entry.js} +1 -1
  82. package/dist/zonos-elements/p-ef8affe4.js +1 -0
  83. package/dist/zonos-elements/{p-882ec68e.system.js → p-f28970e2.system.js} +1 -1
  84. package/dist/zonos-elements/{p-f0b4e58a.js → p-fe83fc20.js} +1 -1
  85. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  86. package/package.json +1 -1
  87. package/dist/zonos-elements/p-17ded5a1.system.entry.js +0 -1
  88. package/dist/zonos-elements/p-418c056d.entry.js +0 -1
  89. package/dist/zonos-elements/p-ca6cf075.js +0 -1
  90. package/dist/zonos-elements/p-e9a41fd8.entry.js +0 -1
@@ -5355,15 +5355,22 @@ const stripeStoreReset = () => {
5355
5355
  * Purpose is to resend the request if the info used when fetching landed cost is different from the current info
5356
5356
  */
5357
5357
  const isPrefetchInfoOutdated = () => {
5358
- var _a, _b, _c, _d, _e, _f;
5359
- const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
5360
- JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
5361
- const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
5362
- JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
5358
+ var _a, _b, _c, _d, _e, _f, _g;
5359
+ // Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
5360
+ const isTotalAmountChanged = cartStore.landedCostData &&
5361
+ ((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
5362
+ cartStore.subtotal;
5363
+ const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
5364
+ JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
5365
+ const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
5366
+ JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
5363
5367
  const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
5364
- JSON.stringify((_e = stripeStore.stripeBillingAddressEventData) === null || _e === void 0 ? void 0 : _e.value) !==
5365
- JSON.stringify((_f = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _f === void 0 ? void 0 : _f.value);
5366
- return isLinkDataDirty || isAddressDataDirty || isBillingAddressDataDirty;
5368
+ JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
5369
+ JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
5370
+ return (isLinkDataDirty ||
5371
+ isAddressDataDirty ||
5372
+ isBillingAddressDataDirty ||
5373
+ isTotalAmountChanged);
5367
5374
  };
5368
5375
  const stripeStorePrefetchLandedCost = async () => {
5369
5376
  var _a, _b, _c, _d, _e, _f;
@@ -5804,6 +5811,17 @@ const cartStoreUpdateItems = async (items) => {
5804
5811
  });
5805
5812
  stripeStore.isFetchingSession = false;
5806
5813
  };
5814
+ const cartStoreResetSelectedShippingOption = () => {
5815
+ cartStore.selectedShippingOption = null;
5816
+ cartStore.isSelectedShippingAboveDeminimis = false;
5817
+ cartStore.isSelectedShippingGuarantee = false;
5818
+ cartStore.selectedShippingOptionExpectedDate = '';
5819
+ cartStore.selectedShippingOptionTransitTime = '';
5820
+ cartStore.dutiesTaxFees = 0;
5821
+ cartStore.shipping = 0;
5822
+ // reset total to subtotal
5823
+ cartStore.total = cartStore.subtotal;
5824
+ };
5807
5825
  const cartStoreNextStep = () => {
5808
5826
  if (cartStore.step === 'customer-info') {
5809
5827
  cartStore.step = 'shipping';
@@ -5819,11 +5837,17 @@ const cartStoreNextStep = () => {
5819
5837
  cartStore.step = 'finish';
5820
5838
  }
5821
5839
  };
5840
+ const cartStoreResetTabItems = () => {
5841
+ cartStore.step = 'customer-info';
5842
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
5843
+ cartStoreResetSelectedShippingOption();
5844
+ };
5822
5845
 
5823
5846
  exports.cartStore = cartStore;
5824
5847
  exports.cartStoreGetShippingTransitInfo = cartStoreGetShippingTransitInfo;
5825
5848
  exports.cartStoreNextStep = cartStoreNextStep;
5826
5849
  exports.cartStoreReset = cartStoreReset;
5850
+ exports.cartStoreResetTabItems = cartStoreResetTabItems;
5827
5851
  exports.cartStoreUpdateItems = cartStoreUpdateItems;
5828
5852
  exports.cartStoreUpdateSelectedShippingOption = cartStoreUpdateSelectedShippingOption;
5829
5853
  exports.cartStoreUpdateToErrorState = cartStoreUpdateToErrorState;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-5d196917.js');
3
+ const cart = require('./cart-b1c89065.js');
4
4
 
5
5
  const checkoutBreakpoint = 890;
6
6
  const isCheckoutMobile = (isMobile) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-5d196917.js');
3
+ const cart = require('./cart-b1c89065.js');
4
4
  const zonosStore = require('./zonosStore-aee974e0.js');
5
5
 
6
6
  const trackConversionEvent = async (eventName, metadata) => {
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
- const sendErrorLog = require('./sendErrorLog-3e181984.js');
8
+ const sendErrorLog = require('./sendErrorLog-f7172707.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
11
11
  const isDarkColor = require('./isDarkColor-f5473002.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-3b4816ef.js');
6
6
  const zonosStore = require('./zonosStore-aee974e0.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-5d196917.js');
8
+ const cart = require('./cart-b1c89065.js');
9
9
  const ILanguage = require('./ILanguage-d247b45b.js');
10
10
  require('./isDarkColor-f5473002.js');
11
11
  require('./getBorderRadius-c8cc2bb3.js');
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
- const submitGtag = require('./submitGtag-44e3a996.js');
8
+ const submitGtag = require('./submitGtag-219f4e54.js');
9
9
  const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
10
- const sendErrorLog = require('./sendErrorLog-3e181984.js');
10
+ const sendErrorLog = require('./sendErrorLog-f7172707.js');
11
11
  const classes = require('./classes-b7918f56.js');
12
12
  const ILanguage = require('./ILanguage-d247b45b.js');
13
13
  const isDarkColor = require('./isDarkColor-f5473002.js');
@@ -368,7 +368,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
368
368
  </svg>
369
369
  `;
370
370
 
371
- const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
371
+ const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
372
372
  const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
373
373
 
374
374
  const ZonosCheckoutProgressTabs = class {
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
- const submitGtag = require('./submitGtag-44e3a996.js');
9
- const sendErrorLog = require('./sendErrorLog-3e181984.js');
8
+ const submitGtag = require('./submitGtag-219f4e54.js');
9
+ const sendErrorLog = require('./sendErrorLog-f7172707.js');
10
10
  const classes = require('./classes-b7918f56.js');
11
11
  const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
12
12
  const isDarkColor = require('./isDarkColor-f5473002.js');
@@ -354,6 +354,8 @@ const ZonosCheckout = class {
354
354
  }
355
355
  // reset step to customer info
356
356
  cart.cartStore.step = 'customer-info';
357
+ // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
358
+ cart.cartStoreResetTabItems();
357
359
  }
358
360
  async buildCartAndInit() {
359
361
  // if tempCartUUID is provided, use it instead of buildCartDetail
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
8
  require('./isDarkColor-f5473002.js');
9
9
  require('./getBorderRadius-c8cc2bb3.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./isDarkColor-f5473002.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-f5473002.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  const zonosStore = require('./zonosStore-aee974e0.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
6
  const zonosStore = require('./zonosStore-aee974e0.js');
7
- const cart = require('./cart-5d196917.js');
7
+ const cart = require('./cart-b1c89065.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
10
10
  require('./isDarkColor-f5473002.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-3b4816ef.js');
6
- const cart = require('./cart-5d196917.js');
6
+ const cart = require('./cart-b1c89065.js');
7
7
  require('./zonosStore-aee974e0.js');
8
8
  require('./isDarkColor-f5473002.js');
9
9
  require('./getBorderRadius-c8cc2bb3.js');
@@ -1,5 +1,5 @@
1
1
  import { Fragment, h, Host, } from "@stencil/core";
2
- import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
2
+ import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreResetTabItems, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
3
3
  import { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
4
4
  import { localizationStore } from "../../store/hello/localization";
5
5
  import { translate } from "../../store/translationStore";
@@ -84,6 +84,8 @@ export class ZonosCheckout {
84
84
  }
85
85
  // reset step to customer info
86
86
  cartStore.step = 'customer-info';
87
+ // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
88
+ cartStoreResetTabItems();
87
89
  }
88
90
  async buildCartAndInit() {
89
91
  // if tempCartUUID is provided, use it instead of buildCartDetail
@@ -73,6 +73,9 @@
73
73
  border: 0;
74
74
  cursor: pointer;
75
75
  }
76
+ :host .zonos--tab-item:disabled {
77
+ cursor: not-allowed;
78
+ }
76
79
  :host .zonos--tab-item.done .zonos--tab-index-done-icon {
77
80
  top: 0;
78
81
  opacity: 1;
@@ -221,14 +221,9 @@ const cartStoreNextStep = () => {
221
221
  cartStore.step = 'finish';
222
222
  }
223
223
  };
224
- const cartStorePreviousStep = () => {
225
- if (cartStore.step === 'payment') {
226
- cartStore.step = 'shipping';
227
- }
228
- else if (cartStore.step === 'shipping') {
229
- cartStore.step = 'customer-info';
230
- // reset selected shipping option
231
- cartStoreResetSelectedShippingOption();
232
- }
224
+ const cartStoreResetTabItems = () => {
225
+ cartStore.step = 'customer-info';
226
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
227
+ cartStoreResetSelectedShippingOption();
233
228
  };
234
- export { cartStore, cartStoreApplySubtotals, cartStoreGetShippingTransitInfo, cartStoreNextStep, cartStorePreviousStep, cartStoreReCalculateTotal, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
229
+ export { cartStore, cartStoreApplySubtotals, cartStoreGetShippingTransitInfo, cartStoreNextStep, cartStoreReCalculateTotal, cartStoreReset, cartStoreResetTabItems, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
@@ -123,15 +123,22 @@ const stripeStoreReset = () => {
123
123
  * Purpose is to resend the request if the info used when fetching landed cost is different from the current info
124
124
  */
125
125
  const isPrefetchInfoOutdated = () => {
126
- var _a, _b, _c, _d, _e, _f;
127
- const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
128
- JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
129
- const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
130
- JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
126
+ var _a, _b, _c, _d, _e, _f, _g;
127
+ // Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
128
+ const isTotalAmountChanged = cartStore.landedCostData &&
129
+ ((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
130
+ cartStore.subtotal;
131
+ const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
132
+ JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
133
+ const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
134
+ JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
131
135
  const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
132
- JSON.stringify((_e = stripeStore.stripeBillingAddressEventData) === null || _e === void 0 ? void 0 : _e.value) !==
133
- JSON.stringify((_f = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _f === void 0 ? void 0 : _f.value);
134
- return isLinkDataDirty || isAddressDataDirty || isBillingAddressDataDirty;
136
+ JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
137
+ JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
138
+ return (isLinkDataDirty ||
139
+ isAddressDataDirty ||
140
+ isBillingAddressDataDirty ||
141
+ isTotalAmountChanged);
135
142
  };
136
143
  const stripeStorePrefetchLandedCost = async () => {
137
144
  var _a, _b, _c, _d, _e, _f;
@@ -5278,6 +5278,17 @@ const cartStoreUpdateItems = async (items) => {
5278
5278
  });
5279
5279
  stripeStore.isFetchingSession = false;
5280
5280
  };
5281
+ const cartStoreResetSelectedShippingOption = () => {
5282
+ cartStore.selectedShippingOption = null;
5283
+ cartStore.isSelectedShippingAboveDeminimis = false;
5284
+ cartStore.isSelectedShippingGuarantee = false;
5285
+ cartStore.selectedShippingOptionExpectedDate = '';
5286
+ cartStore.selectedShippingOptionTransitTime = '';
5287
+ cartStore.dutiesTaxFees = 0;
5288
+ cartStore.shipping = 0;
5289
+ // reset total to subtotal
5290
+ cartStore.total = cartStore.subtotal;
5291
+ };
5281
5292
  const cartStoreNextStep = () => {
5282
5293
  if (cartStore.step === 'customer-info') {
5283
5294
  cartStore.step = 'shipping';
@@ -5293,6 +5304,11 @@ const cartStoreNextStep = () => {
5293
5304
  cartStore.step = 'finish';
5294
5305
  }
5295
5306
  };
5307
+ const cartStoreResetTabItems = () => {
5308
+ cartStore.step = 'customer-info';
5309
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
5310
+ cartStoreResetSelectedShippingOption();
5311
+ };
5296
5312
 
5297
5313
  const prepCalculateLandedCost = () => {
5298
5314
  // maybe we don't need email now for prefetch the landed cost
@@ -5570,15 +5586,22 @@ const stripeStoreReset = () => {
5570
5586
  * Purpose is to resend the request if the info used when fetching landed cost is different from the current info
5571
5587
  */
5572
5588
  const isPrefetchInfoOutdated = () => {
5573
- var _a, _b, _c, _d, _e, _f;
5574
- const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
5575
- JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
5576
- const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
5577
- JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
5589
+ var _a, _b, _c, _d, _e, _f, _g;
5590
+ // Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
5591
+ const isTotalAmountChanged = cartStore.landedCostData &&
5592
+ ((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
5593
+ cartStore.subtotal;
5594
+ const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
5595
+ JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
5596
+ const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
5597
+ JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
5578
5598
  const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
5579
- JSON.stringify((_e = stripeStore.stripeBillingAddressEventData) === null || _e === void 0 ? void 0 : _e.value) !==
5580
- JSON.stringify((_f = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _f === void 0 ? void 0 : _f.value);
5581
- return isLinkDataDirty || isAddressDataDirty || isBillingAddressDataDirty;
5599
+ JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
5600
+ JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
5601
+ return (isLinkDataDirty ||
5602
+ isAddressDataDirty ||
5603
+ isBillingAddressDataDirty ||
5604
+ isTotalAmountChanged);
5582
5605
  };
5583
5606
  const stripeStorePrefetchLandedCost = async () => {
5584
5607
  var _a, _b, _c, _d, _e, _f;
@@ -5818,4 +5841,4 @@ onChange('clientSecret', clientSecret => {
5818
5841
  }
5819
5842
  });
5820
5843
 
5821
- export { getZCountryUrlParam as A, setZCountryUrlParam as B, currencyDisplay as C, currencyConvertAndFormat as D, currencyConvert as E, currencyFormat as F, localizationStore as a, log as b, cartStore as c, stripeStoreGetDomesticShippingSession as d, localizationStoreUpdateSelectedCountryCode as e, stripeStoreCleanupDomesticShippingSession as f, stripeStoreSaveDomesticShippingSession as g, handleFetch as h, initStripeElements as i, cartStoreUpdateItems as j, cartStoreReset as k, logError as l, stripeStoreInitCheckoutSession as m, cartStoreUpdateToErrorState as n, stripeStorePrefetchLandedCost as o, cartStoreNextStep as p, stripeStoreConfirmPayment as q, stripeStoreReset as r, stripeStore as s, translate as t, stripeStoreRetrievePayment as u, localizationStoreUpdateSelectedLocale as v, cartStoreUpdateSelectedShippingOption as w, cartStoreGetShippingTransitInfo as x, isValidSelector as y, initLocalizationStore as z };
5844
+ export { initLocalizationStore as A, getZCountryUrlParam as B, setZCountryUrlParam as C, currencyDisplay as D, currencyConvertAndFormat as E, currencyConvert as F, currencyFormat as G, localizationStore as a, log as b, cartStore as c, stripeStoreGetDomesticShippingSession as d, localizationStoreUpdateSelectedCountryCode as e, stripeStoreCleanupDomesticShippingSession as f, stripeStoreSaveDomesticShippingSession as g, handleFetch as h, initStripeElements as i, cartStoreUpdateItems as j, cartStoreReset as k, logError as l, cartStoreResetTabItems as m, stripeStoreInitCheckoutSession as n, cartStoreUpdateToErrorState as o, stripeStorePrefetchLandedCost as p, cartStoreNextStep as q, stripeStoreConfirmPayment as r, stripeStore as s, translate as t, stripeStoreReset as u, stripeStoreRetrievePayment as v, localizationStoreUpdateSelectedLocale as w, cartStoreUpdateSelectedShippingOption as x, cartStoreGetShippingTransitInfo as y, isValidSelector as z };
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
- import { h as handleFetch, r as stripeStoreReset, c as cartStore, s as stripeStore, u as stripeStoreRetrievePayment, t as translate } from './stripe.js';
2
+ import { h as handleFetch, u as stripeStoreReset, c as cartStore, s as stripeStore, v as stripeStoreRetrievePayment, t as translate } from './stripe.js';
3
3
  import { z as zonosStore } from './zonosStore.js';
4
4
  import { t as trackConversionEvent } from './trackConversionEvent.js';
5
5
  import { g as getBorderRadius } from './getBorderRadius.js';
@@ -27,7 +27,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
27
27
  </svg>
28
28
  `;
29
29
 
30
- const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
30
+ const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
31
31
  const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
32
32
 
33
33
  const ZonosCheckoutProgressTabs = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutProgressTabs extends HTMLElement {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
2
- import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, s as stripeStore, m as stripeStoreInitCheckoutSession, n as cartStoreUpdateToErrorState, t as translate, o as stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreConfirmPayment, r as stripeStoreReset } from './stripe.js';
2
+ import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, m as cartStoreResetTabItems, s as stripeStore, n as stripeStoreInitCheckoutSession, o as cartStoreUpdateToErrorState, t as translate, p as stripeStorePrefetchLandedCost, q as cartStoreNextStep, r as stripeStoreConfirmPayment, u as stripeStoreReset } from './stripe.js';
3
3
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
4
4
  import { t as trackConversionEvent } from './trackConversionEvent.js';
5
5
  import { i as isCheckoutMobile } from './isCheckoutMobile.js';
@@ -381,6 +381,8 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
381
381
  }
382
382
  // reset step to customer info
383
383
  cartStore.step = 'customer-info';
384
+ // reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
385
+ cartStoreResetTabItems();
384
386
  }
385
387
  async buildCartAndInit() {
386
388
  // if tempCartUUID is provided, use it instead of buildCartDetail
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { h as handleFetch, l as logError, y as isValidSelector, b as log, s as stripeStore, z as initLocalizationStore, e as localizationStoreUpdateSelectedCountryCode } from './stripe.js';
2
+ import { h as handleFetch, l as logError, z as isValidSelector, b as log, s as stripeStore, A as initLocalizationStore, e as localizationStoreUpdateSelectedCountryCode } from './stripe.js';
3
3
  import { z as zonosStore, d as zonosStoreInitSetting, a as zonosStoreFontFamily } from './zonosStore.js';
4
4
  import { d as defineCustomElement$3 } from './zonos-notification2.js';
5
5
  import { d as defineCustomElement$2 } from './zonos-text2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { F as currencyFormat, a as localizationStore, t as translate } from './stripe.js';
2
+ import { G as currencyFormat, a as localizationStore, t as translate } from './stripe.js';
3
3
  import { z as zonosStore } from './zonosStore.js';
4
4
  import { c as classes } from './classes.js';
5
5
  import { f as formatStringWithLinks, d as defineCustomElement$8 } from './zonos-custom-message2.js';
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
3
- import { h as handleFetch, l as logError, a as localizationStore, y as isValidSelector, t as translate, A as getZCountryUrlParam, B as setZCountryUrlParam, b as log, C as currencyDisplay, D as currencyConvertAndFormat, E as currencyConvert, F as currencyFormat } from './stripe.js';
3
+ import { h as handleFetch, l as logError, a as localizationStore, z as isValidSelector, t as translate, B as getZCountryUrlParam, C as setZCountryUrlParam, b as log, D as currencyDisplay, E as currencyConvertAndFormat, F as currencyConvert, G as currencyFormat } from './stripe.js';
4
4
  import { c as classes } from './classes.js';
5
5
  import { g as getHasMoreSpaceOnRight, d as defineCustomElement$9 } from './zonos-hello-dialog2.js';
6
6
  import { d as defineCustomElement$f } from './zonos-banner2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { v as localizationStoreUpdateSelectedLocale, t as translate, a as localizationStore } from './stripe.js';
2
+ import { w as localizationStoreUpdateSelectedLocale, t as translate, a as localizationStore } from './stripe.js';
3
3
  import { a as zonosStoreFontFamily } from './zonosStore.js';
4
4
  import { l as languages } from './ILanguage.js';
5
5
  import { d as defineCustomElement$6 } from './zonos-button2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { s as stripeStore, l as logError, o as stripeStorePrefetchLandedCost } from './stripe.js';
2
+ import { s as stripeStore, l as logError, p as stripeStorePrefetchLandedCost } from './stripe.js';
3
3
  import { d as defineCustomElement$1 } from './zonos-text2.js';
4
4
 
5
5
  const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { c as cartStore, w as cartStoreUpdateSelectedShippingOption, x as cartStoreGetShippingTransitInfo, t as translate } from './stripe.js';
2
+ import { c as cartStore, x as cartStoreUpdateSelectedShippingOption, y as cartStoreGetShippingTransitInfo, t as translate } from './stripe.js';
3
3
  import { t as trackConversionEvent } from './trackConversionEvent.js';
4
4
  import { f as formatCurrency } from './formatCurrency.js';
5
5
  import { s as submitGtag } from './submitGtag.js';
@@ -5353,15 +5353,22 @@ const stripeStoreReset = () => {
5353
5353
  * Purpose is to resend the request if the info used when fetching landed cost is different from the current info
5354
5354
  */
5355
5355
  const isPrefetchInfoOutdated = () => {
5356
- var _a, _b, _c, _d, _e, _f;
5357
- const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
5358
- JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
5359
- const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
5360
- JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
5356
+ var _a, _b, _c, _d, _e, _f, _g;
5357
+ // Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
5358
+ const isTotalAmountChanged = cartStore.landedCostData &&
5359
+ ((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
5360
+ cartStore.subtotal;
5361
+ const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
5362
+ JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
5363
+ const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
5364
+ JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
5361
5365
  const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
5362
- JSON.stringify((_e = stripeStore.stripeBillingAddressEventData) === null || _e === void 0 ? void 0 : _e.value) !==
5363
- JSON.stringify((_f = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _f === void 0 ? void 0 : _f.value);
5364
- return isLinkDataDirty || isAddressDataDirty || isBillingAddressDataDirty;
5366
+ JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
5367
+ JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
5368
+ return (isLinkDataDirty ||
5369
+ isAddressDataDirty ||
5370
+ isBillingAddressDataDirty ||
5371
+ isTotalAmountChanged);
5365
5372
  };
5366
5373
  const stripeStorePrefetchLandedCost = async () => {
5367
5374
  var _a, _b, _c, _d, _e, _f;
@@ -5802,6 +5809,17 @@ const cartStoreUpdateItems = async (items) => {
5802
5809
  });
5803
5810
  stripeStore.isFetchingSession = false;
5804
5811
  };
5812
+ const cartStoreResetSelectedShippingOption = () => {
5813
+ cartStore.selectedShippingOption = null;
5814
+ cartStore.isSelectedShippingAboveDeminimis = false;
5815
+ cartStore.isSelectedShippingGuarantee = false;
5816
+ cartStore.selectedShippingOptionExpectedDate = '';
5817
+ cartStore.selectedShippingOptionTransitTime = '';
5818
+ cartStore.dutiesTaxFees = 0;
5819
+ cartStore.shipping = 0;
5820
+ // reset total to subtotal
5821
+ cartStore.total = cartStore.subtotal;
5822
+ };
5805
5823
  const cartStoreNextStep = () => {
5806
5824
  if (cartStore.step === 'customer-info') {
5807
5825
  cartStore.step = 'shipping';
@@ -5817,5 +5835,10 @@ const cartStoreNextStep = () => {
5817
5835
  cartStore.step = 'finish';
5818
5836
  }
5819
5837
  };
5838
+ const cartStoreResetTabItems = () => {
5839
+ cartStore.step = 'customer-info';
5840
+ cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
5841
+ cartStoreResetSelectedShippingOption();
5842
+ };
5820
5843
 
5821
- export { currencyConvert as A, currencyFormat as B, stripeStoreRetrievePayment as C, cartStoreUpdateSelectedShippingOption as D, cartStoreGetShippingTransitInfo as E, localizationStoreUpdateSelectedLocale as F, log as a, localizationStoreUpdateSelectedCountryCode as b, stripeStoreCleanupDomesticShippingSession as c, logError as d, stripeStoreSaveDomesticShippingSession as e, cartStore as f, cartStoreUpdateItems as g, cartStoreReset as h, initStripeElements as i, stripeStore as j, stripeStoreInitCheckoutSession as k, localizationStore as l, cartStoreUpdateToErrorState as m, stripeStorePrefetchLandedCost as n, cartStoreNextStep as o, stripeStoreConfirmPayment as p, stripeStoreReset as q, handleFetch as r, stripeStoreGetDomesticShippingSession as s, translate as t, isValidSelector as u, initLocalizationStore as v, getZCountryUrlParam as w, setZCountryUrlParam as x, currencyDisplay as y, currencyConvertAndFormat as z };
5844
+ export { currencyConvertAndFormat as A, currencyConvert as B, currencyFormat as C, stripeStoreRetrievePayment as D, cartStoreUpdateSelectedShippingOption as E, cartStoreGetShippingTransitInfo as F, localizationStoreUpdateSelectedLocale as G, log as a, localizationStoreUpdateSelectedCountryCode as b, stripeStoreCleanupDomesticShippingSession as c, logError as d, stripeStoreSaveDomesticShippingSession as e, cartStore as f, cartStoreUpdateItems as g, cartStoreReset as h, initStripeElements as i, cartStoreResetTabItems as j, stripeStore as k, localizationStore as l, stripeStoreInitCheckoutSession as m, cartStoreUpdateToErrorState as n, stripeStorePrefetchLandedCost as o, cartStoreNextStep as p, stripeStoreConfirmPayment as q, stripeStoreReset as r, stripeStoreGetDomesticShippingSession as s, translate as t, handleFetch as u, isValidSelector as v, initLocalizationStore as w, getZCountryUrlParam as x, setZCountryUrlParam as y, currencyDisplay as z };
@@ -1,4 +1,4 @@
1
- import { r as handleFetch } from './cart-515aac56.js';
1
+ import { u as handleFetch } from './cart-1b0aaea9.js';
2
2
 
3
3
  const checkoutBreakpoint = 890;
4
4
  const isCheckoutMobile = (isMobile) => {
@@ -1,4 +1,4 @@
1
- import { r as handleFetch, f as cartStore, l as localizationStore, a as log } from './cart-515aac56.js';
1
+ import { u as handleFetch, f as cartStore, l as localizationStore, a as log } from './cart-1b0aaea9.js';
2
2
  import { z as zonosStore } from './zonosStore-f3eef64b.js';
3
3
 
4
4
  const trackConversionEvent = async (eventName, metadata) => {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-0e31d804.js';
2
- import { j as stripeStore, d as logError, l as localizationStore, t as translate, n as stripeStorePrefetchLandedCost } from './cart-515aac56.js';
2
+ import { k as stripeStore, d as logError, l as localizationStore, t as translate, o as stripeStorePrefetchLandedCost } from './cart-1b0aaea9.js';
3
3
  import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
4
- import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-e4546d7b.js';
4
+ import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-4e7a8e6e.js';
5
5
  import { c as classes } from './classes-0d95c529.js';
6
6
  import { g as getBorderRadius } from './getBorderRadius-8129b0cb.js';
7
7
  import { i as isDarkColor } from './isDarkColor-7a6d2d14.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-0e31d804.js';
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { F as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-515aac56.js';
4
+ import { G as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-1b0aaea9.js';
5
5
  import { l as languages } from './ILanguage-97790bee.js';
6
6
  import './isDarkColor-7a6d2d14.js';
7
7
  import './getBorderRadius-8129b0cb.js';