@shipengine/elements 0.25.0 → 0.26.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 (53) hide show
  1. package/index.cjs +1101 -640
  2. package/index.js +1108 -654
  3. package/package.json +12 -4
  4. package/src/components/field/field.styles.d.ts +2 -12
  5. package/src/components/index.d.ts +1 -0
  6. package/src/components/label-layout/label-layout-settings.d.ts +3 -1
  7. package/src/components/powered-by-shipengine/index.d.ts +1 -0
  8. package/src/components/powered-by-shipengine/powered-by-shipengine.d.ts +1 -0
  9. package/src/components/powered-by-shipengine/powered-by-shipengine.styles.d.ts +11 -0
  10. package/src/components/save-status/index.d.ts +2 -0
  11. package/src/components/save-status/save-status-styles.d.ts +43 -0
  12. package/src/components/save-status/save-status.d.ts +6 -0
  13. package/src/components/templates/index.d.ts +0 -1
  14. package/src/components/templates/rate-form/rate-form.d.ts +1 -0
  15. package/src/constants/shipengine/address.d.ts +2 -0
  16. package/src/elements/list-carriers/list-carriers.d.ts +26 -14
  17. package/src/elements/manage-warehouses/manage-warehouses.d.ts +26 -14
  18. package/src/elements/onboarding/onboarding.d.ts +26 -14
  19. package/src/elements/purchase-label/hooks/use-load-or-create-shipment.d.ts +6 -0
  20. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +5 -2
  21. package/src/elements/purchase-label/purchase-label.d.ts +38 -20
  22. package/src/elements/view-shipment/view-shipment.d.ts +26 -14
  23. package/src/{components/templates/void-label/void-label.d.ts → elements/void-label/components/actions/actions.d.ts} +3 -3
  24. package/src/elements/void-label/components/actions/index.d.ts +1 -0
  25. package/src/elements/void-label/components/index.d.ts +2 -0
  26. package/src/elements/void-label/components/message/index.d.ts +1 -0
  27. package/src/elements/void-label/components/message/message.d.ts +6 -0
  28. package/src/elements/void-label/void-label.d.ts +26 -14
  29. package/src/hooks/options/index.d.ts +1 -0
  30. package/src/hooks/options/use-package-options.d.ts +1 -1
  31. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  32. package/src/hooks/options/use-shipment-metadata.d.ts +8 -0
  33. package/src/hooks/options/use-shipping-presets-options.d.ts +2 -1
  34. package/src/hooks/use-get-or-create-shipment.d.ts +2 -0
  35. package/src/locales/en/index.d.ts +26 -14
  36. package/src/mocks/server.d.ts +1 -0
  37. package/src/testing/extensions/index.d.ts +2 -0
  38. package/src/testing/extensions/matchers/extend-matchers.d.ts +8 -0
  39. package/src/testing/extensions/matchers/index.d.ts +1 -0
  40. package/src/testing/extensions/matchers/matchers.d.ts +1 -0
  41. package/src/testing/extensions/matchers/to-have-loading-spinner.d.ts +2 -0
  42. package/src/testing/extensions/queries/by-icon-name.d.ts +4 -0
  43. package/src/testing/extensions/queries/index.d.ts +57 -0
  44. package/src/testing/extensions/queries/queries.d.ts +1 -0
  45. package/src/testing/index.d.ts +1 -1
  46. package/src/testing/test-utils.d.ts +292 -0
  47. package/src/utilities/error.d.ts +13 -0
  48. package/src/utilities/i18nDateUtils.d.ts +16 -0
  49. package/src/utilities/shipengine/address.d.ts +4 -0
  50. package/src/utilities/shipengine/carrier.d.ts +1 -0
  51. package/src/components/templates/void-label/index.d.ts +0 -1
  52. package/src/public-sdk.d.ts +0 -38
  53. package/src/testing/render.d.ts +0 -6
package/index.cjs CHANGED
@@ -15,8 +15,10 @@ var react = require('@emotion/react');
15
15
  var humps = require('humps');
16
16
  var ReactDatePicker = require('react-datepicker');
17
17
  var gigerTheme = require('@packlink/giger-theme');
18
+ var dateFns = require('date-fns');
19
+ var Locales = require('date-fns/locale');
18
20
  var css = require('@emotion/css');
19
- var _$2 = require('lodash');
21
+ var _$3 = require('lodash');
20
22
  var reactDom = require('react-dom');
21
23
  var min$3 = require('libphonenumber-js/min');
22
24
  var copy = require('copy-to-clipboard');
@@ -24,6 +26,7 @@ var jsBase64 = require('js-base64');
24
26
  var cardValidator = require('card-validator');
25
27
  var reactQuery = require('react-query');
26
28
  var brands = require('@packlink/brands');
29
+ var reactApi = require('@shipengine/react-api');
27
30
 
28
31
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
29
32
 
@@ -49,7 +52,8 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
49
52
  var alchemy__default = /*#__PURE__*/_interopDefaultLegacy(alchemy);
50
53
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
51
54
  var ReactDatePicker__default = /*#__PURE__*/_interopDefaultLegacy(ReactDatePicker);
52
- var ___default = /*#__PURE__*/_interopDefaultLegacy(_$2);
55
+ var Locales__namespace = /*#__PURE__*/_interopNamespace(Locales);
56
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_$3);
53
57
  var copy__default = /*#__PURE__*/_interopDefaultLegacy(copy);
54
58
  var cardValidator__default = /*#__PURE__*/_interopDefaultLegacy(cardValidator);
55
59
 
@@ -99,10 +103,10 @@ var functionBindNative = !fails$o(function () {
99
103
 
100
104
  var NATIVE_BIND$3 = functionBindNative;
101
105
 
102
- var call$j = Function.prototype.call;
106
+ var call$k = Function.prototype.call;
103
107
 
104
- var functionCall = NATIVE_BIND$3 ? call$j.bind(call$j) : function () {
105
- return call$j.apply(call$j, arguments);
108
+ var functionCall = NATIVE_BIND$3 ? call$k.bind(call$k) : function () {
109
+ return call$k.apply(call$k, arguments);
106
110
  };
107
111
 
108
112
  var objectPropertyIsEnumerable = {};
@@ -133,30 +137,30 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
133
137
  var NATIVE_BIND$2 = functionBindNative;
134
138
 
135
139
  var FunctionPrototype$2 = Function.prototype;
136
- var call$i = FunctionPrototype$2.call;
137
- var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$i, call$i);
140
+ var call$j = FunctionPrototype$2.call;
141
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$j, call$j);
138
142
 
139
143
  var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
140
144
  return function () {
141
- return call$i.apply(fn, arguments);
145
+ return call$j.apply(fn, arguments);
142
146
  };
143
147
  };
144
148
 
145
- var uncurryThis$q = functionUncurryThis;
149
+ var uncurryThis$r = functionUncurryThis;
146
150
 
147
- var toString$d = uncurryThis$q({}.toString);
148
- var stringSlice$6 = uncurryThis$q(''.slice);
151
+ var toString$e = uncurryThis$r({}.toString);
152
+ var stringSlice$7 = uncurryThis$r(''.slice);
149
153
 
150
154
  var classofRaw$2 = function (it) {
151
- return stringSlice$6(toString$d(it), 8, -1);
155
+ return stringSlice$7(toString$e(it), 8, -1);
152
156
  };
153
157
 
154
- var uncurryThis$p = functionUncurryThis;
158
+ var uncurryThis$q = functionUncurryThis;
155
159
  var fails$n = fails$q;
156
160
  var classof$8 = classofRaw$2;
157
161
 
158
162
  var $Object$4 = Object;
159
- var split = uncurryThis$p(''.split);
163
+ var split = uncurryThis$q(''.split);
160
164
 
161
165
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
162
166
  var indexedObject = fails$n(function () {
@@ -169,27 +173,27 @@ var indexedObject = fails$n(function () {
169
173
 
170
174
  // we can't use just `it == null` since of `document.all` special case
171
175
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
172
- var isNullOrUndefined$6 = function (it) {
176
+ var isNullOrUndefined$7 = function (it) {
173
177
  return it === null || it === undefined;
174
178
  };
175
179
 
176
- var isNullOrUndefined$5 = isNullOrUndefined$6;
180
+ var isNullOrUndefined$6 = isNullOrUndefined$7;
177
181
 
178
- var $TypeError$h = TypeError;
182
+ var $TypeError$i = TypeError;
179
183
 
180
184
  // `RequireObjectCoercible` abstract operation
181
185
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
182
- var requireObjectCoercible$8 = function (it) {
183
- if (isNullOrUndefined$5(it)) throw $TypeError$h("Can't call method on " + it);
186
+ var requireObjectCoercible$9 = function (it) {
187
+ if (isNullOrUndefined$6(it)) throw $TypeError$i("Can't call method on " + it);
184
188
  return it;
185
189
  };
186
190
 
187
191
  // toObject with fallback for non-array-like ES3 strings
188
192
  var IndexedObject$2 = indexedObject;
189
- var requireObjectCoercible$7 = requireObjectCoercible$8;
193
+ var requireObjectCoercible$8 = requireObjectCoercible$9;
190
194
 
191
195
  var toIndexedObject$5 = function (it) {
192
- return IndexedObject$2(requireObjectCoercible$7(it));
196
+ return IndexedObject$2(requireObjectCoercible$8(it));
193
197
  };
194
198
 
195
199
  var documentAll$2 = typeof document == 'object' && document.all;
@@ -208,37 +212,37 @@ var documentAll$1 = $documentAll$1.all;
208
212
 
209
213
  // `IsCallable` abstract operation
210
214
  // https://tc39.es/ecma262/#sec-iscallable
211
- var isCallable$n = $documentAll$1.IS_HTMLDDA ? function (argument) {
215
+ var isCallable$o = $documentAll$1.IS_HTMLDDA ? function (argument) {
212
216
  return typeof argument == 'function' || argument === documentAll$1;
213
217
  } : function (argument) {
214
218
  return typeof argument == 'function';
215
219
  };
216
220
 
217
- var isCallable$m = isCallable$n;
221
+ var isCallable$n = isCallable$o;
218
222
  var $documentAll = documentAll_1;
219
223
 
220
224
  var documentAll = $documentAll.all;
221
225
 
222
226
  var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
223
- return typeof it == 'object' ? it !== null : isCallable$m(it) || it === documentAll;
227
+ return typeof it == 'object' ? it !== null : isCallable$n(it) || it === documentAll;
224
228
  } : function (it) {
225
- return typeof it == 'object' ? it !== null : isCallable$m(it);
229
+ return typeof it == 'object' ? it !== null : isCallable$n(it);
226
230
  };
227
231
 
228
232
  var global$o = global$p;
229
- var isCallable$l = isCallable$n;
233
+ var isCallable$m = isCallable$o;
230
234
 
231
235
  var aFunction = function (argument) {
232
- return isCallable$l(argument) ? argument : undefined;
236
+ return isCallable$m(argument) ? argument : undefined;
233
237
  };
234
238
 
235
239
  var getBuiltIn$8 = function (namespace, method) {
236
240
  return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
237
241
  };
238
242
 
239
- var uncurryThis$o = functionUncurryThis;
243
+ var uncurryThis$p = functionUncurryThis;
240
244
 
241
- var objectIsPrototypeOf = uncurryThis$o({}.isPrototypeOf);
245
+ var objectIsPrototypeOf = uncurryThis$p({}.isPrototypeOf);
242
246
 
243
247
  var getBuiltIn$7 = getBuiltIn$8;
244
248
 
@@ -296,7 +300,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
296
300
  && typeof Symbol.iterator == 'symbol';
297
301
 
298
302
  var getBuiltIn$6 = getBuiltIn$8;
299
- var isCallable$k = isCallable$n;
303
+ var isCallable$l = isCallable$o;
300
304
  var isPrototypeOf$4 = objectIsPrototypeOf;
301
305
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
302
306
 
@@ -306,7 +310,7 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
306
310
  return typeof it == 'symbol';
307
311
  } : function (it) {
308
312
  var $Symbol = getBuiltIn$6('Symbol');
309
- return isCallable$k($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$3(it));
313
+ return isCallable$l($Symbol) && isPrototypeOf$4($Symbol.prototype, $Object$3(it));
310
314
  };
311
315
 
312
316
  var $String$4 = String;
@@ -319,41 +323,41 @@ var tryToString$5 = function (argument) {
319
323
  }
320
324
  };
321
325
 
322
- var isCallable$j = isCallable$n;
326
+ var isCallable$k = isCallable$o;
323
327
  var tryToString$4 = tryToString$5;
324
328
 
325
- var $TypeError$g = TypeError;
329
+ var $TypeError$h = TypeError;
326
330
 
327
331
  // `Assert: IsCallable(argument) is true`
328
332
  var aCallable$a = function (argument) {
329
- if (isCallable$j(argument)) return argument;
330
- throw $TypeError$g(tryToString$4(argument) + ' is not a function');
333
+ if (isCallable$k(argument)) return argument;
334
+ throw $TypeError$h(tryToString$4(argument) + ' is not a function');
331
335
  };
332
336
 
333
337
  var aCallable$9 = aCallable$a;
334
- var isNullOrUndefined$4 = isNullOrUndefined$6;
338
+ var isNullOrUndefined$5 = isNullOrUndefined$7;
335
339
 
336
340
  // `GetMethod` abstract operation
337
341
  // https://tc39.es/ecma262/#sec-getmethod
338
- var getMethod$5 = function (V, P) {
342
+ var getMethod$6 = function (V, P) {
339
343
  var func = V[P];
340
- return isNullOrUndefined$4(func) ? undefined : aCallable$9(func);
344
+ return isNullOrUndefined$5(func) ? undefined : aCallable$9(func);
341
345
  };
342
346
 
343
- var call$h = functionCall;
344
- var isCallable$i = isCallable$n;
347
+ var call$i = functionCall;
348
+ var isCallable$j = isCallable$o;
345
349
  var isObject$9 = isObject$a;
346
350
 
347
- var $TypeError$f = TypeError;
351
+ var $TypeError$g = TypeError;
348
352
 
349
353
  // `OrdinaryToPrimitive` abstract operation
350
354
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
351
355
  var ordinaryToPrimitive$1 = function (input, pref) {
352
356
  var fn, val;
353
- if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
354
- if (isCallable$i(fn = input.valueOf) && !isObject$9(val = call$h(fn, input))) return val;
355
- if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$9(val = call$h(fn, input))) return val;
356
- throw $TypeError$f("Can't convert object to primitive value");
357
+ if (pref === 'string' && isCallable$j(fn = input.toString) && !isObject$9(val = call$i(fn, input))) return val;
358
+ if (isCallable$j(fn = input.valueOf) && !isObject$9(val = call$i(fn, input))) return val;
359
+ if (pref !== 'string' && isCallable$j(fn = input.toString) && !isObject$9(val = call$i(fn, input))) return val;
360
+ throw $TypeError$g("Can't convert object to primitive value");
357
361
  };
358
362
 
359
363
  var shared$4 = {exports: {}};
@@ -391,20 +395,20 @@ var store$2 = sharedStore;
391
395
  source: 'https://github.com/zloirock/core-js'
392
396
  });
393
397
 
394
- var requireObjectCoercible$6 = requireObjectCoercible$8;
398
+ var requireObjectCoercible$7 = requireObjectCoercible$9;
395
399
 
396
400
  var $Object$2 = Object;
397
401
 
398
402
  // `ToObject` abstract operation
399
403
  // https://tc39.es/ecma262/#sec-toobject
400
404
  var toObject$7 = function (argument) {
401
- return $Object$2(requireObjectCoercible$6(argument));
405
+ return $Object$2(requireObjectCoercible$7(argument));
402
406
  };
403
407
 
404
- var uncurryThis$n = functionUncurryThis;
408
+ var uncurryThis$o = functionUncurryThis;
405
409
  var toObject$6 = toObject$7;
406
410
 
407
- var hasOwnProperty = uncurryThis$n({}.hasOwnProperty);
411
+ var hasOwnProperty = uncurryThis$o({}.hasOwnProperty);
408
412
 
409
413
  // `HasOwnProperty` abstract operation
410
414
  // https://tc39.es/ecma262/#sec-hasownproperty
@@ -413,14 +417,14 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
413
417
  return hasOwnProperty(toObject$6(it), key);
414
418
  };
415
419
 
416
- var uncurryThis$m = functionUncurryThis;
420
+ var uncurryThis$n = functionUncurryThis;
417
421
 
418
422
  var id = 0;
419
423
  var postfix = Math.random();
420
- var toString$c = uncurryThis$m(1.0.toString);
424
+ var toString$d = uncurryThis$n(1.0.toString);
421
425
 
422
426
  var uid$2 = function (key) {
423
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$c(++id + postfix, 36);
427
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$d(++id + postfix, 36);
424
428
  };
425
429
 
426
430
  var global$k = global$p;
@@ -435,7 +439,7 @@ var Symbol$3 = global$k.Symbol;
435
439
  var symbolFor = Symbol$3 && Symbol$3['for'];
436
440
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid$1;
437
441
 
438
- var wellKnownSymbol$j = function (name) {
442
+ var wellKnownSymbol$k = function (name) {
439
443
  if (!hasOwn$b(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
440
444
  var description = 'Symbol.' + name;
441
445
  if (NATIVE_SYMBOL$1 && hasOwn$b(Symbol$3, name)) {
@@ -448,27 +452,27 @@ var wellKnownSymbol$j = function (name) {
448
452
  } return WellKnownSymbolsStore[name];
449
453
  };
450
454
 
451
- var call$g = functionCall;
455
+ var call$h = functionCall;
452
456
  var isObject$8 = isObject$a;
453
457
  var isSymbol$1 = isSymbol$2;
454
- var getMethod$4 = getMethod$5;
458
+ var getMethod$5 = getMethod$6;
455
459
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
456
- var wellKnownSymbol$i = wellKnownSymbol$j;
460
+ var wellKnownSymbol$j = wellKnownSymbol$k;
457
461
 
458
- var $TypeError$e = TypeError;
459
- var TO_PRIMITIVE = wellKnownSymbol$i('toPrimitive');
462
+ var $TypeError$f = TypeError;
463
+ var TO_PRIMITIVE = wellKnownSymbol$j('toPrimitive');
460
464
 
461
465
  // `ToPrimitive` abstract operation
462
466
  // https://tc39.es/ecma262/#sec-toprimitive
463
467
  var toPrimitive$1 = function (input, pref) {
464
468
  if (!isObject$8(input) || isSymbol$1(input)) return input;
465
- var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
469
+ var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
466
470
  var result;
467
471
  if (exoticToPrim) {
468
472
  if (pref === undefined) pref = 'default';
469
- result = call$g(exoticToPrim, input, pref);
473
+ result = call$h(exoticToPrim, input, pref);
470
474
  if (!isObject$8(result) || isSymbol$1(result)) return result;
471
- throw $TypeError$e("Can't convert object to primitive value");
475
+ throw $TypeError$f("Can't convert object to primitive value");
472
476
  }
473
477
  if (pref === undefined) pref = 'number';
474
478
  return ordinaryToPrimitive(input, pref);
@@ -508,7 +512,7 @@ var ie8DomDefine = !DESCRIPTORS$b && !fails$l(function () {
508
512
  });
509
513
 
510
514
  var DESCRIPTORS$a = descriptors;
511
- var call$f = functionCall;
515
+ var call$g = functionCall;
512
516
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
513
517
  var createPropertyDescriptor$3 = createPropertyDescriptor$4;
514
518
  var toIndexedObject$4 = toIndexedObject$5;
@@ -527,7 +531,7 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 :
527
531
  if (IE8_DOM_DEFINE$1) try {
528
532
  return $getOwnPropertyDescriptor$1(O, P);
529
533
  } catch (error) { /* empty */ }
530
- if (hasOwn$a(O, P)) return createPropertyDescriptor$3(!call$f(propertyIsEnumerableModule$1.f, O, P), O[P]);
534
+ if (hasOwn$a(O, P)) return createPropertyDescriptor$3(!call$g(propertyIsEnumerableModule$1.f, O, P), O[P]);
531
535
  };
532
536
 
533
537
  var objectDefineProperty = {};
@@ -548,12 +552,12 @@ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$k(function () {
548
552
  var isObject$6 = isObject$a;
549
553
 
550
554
  var $String$3 = String;
551
- var $TypeError$d = TypeError;
555
+ var $TypeError$e = TypeError;
552
556
 
553
557
  // `Assert: Type(argument) is Object`
554
558
  var anObject$f = function (argument) {
555
559
  if (isObject$6(argument)) return argument;
556
- throw $TypeError$d($String$3(argument) + ' is not an object');
560
+ throw $TypeError$e($String$3(argument) + ' is not an object');
557
561
  };
558
562
 
559
563
  var DESCRIPTORS$8 = descriptors;
@@ -562,7 +566,7 @@ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
562
566
  var anObject$e = anObject$f;
563
567
  var toPropertyKey$1 = toPropertyKey$3;
564
568
 
565
- var $TypeError$c = TypeError;
569
+ var $TypeError$d = TypeError;
566
570
  // eslint-disable-next-line es/no-object-defineproperty -- safe
567
571
  var $defineProperty = Object.defineProperty;
568
572
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -595,7 +599,7 @@ objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
595
599
  if (IE8_DOM_DEFINE) try {
596
600
  return $defineProperty(O, P, Attributes);
597
601
  } catch (error) { /* empty */ }
598
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$c('Accessors not supported');
602
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$d('Accessors not supported');
599
603
  if ('value' in Attributes) O[P] = Attributes.value;
600
604
  return O;
601
605
  };
@@ -631,14 +635,14 @@ var functionName = {
631
635
  CONFIGURABLE: CONFIGURABLE
632
636
  };
633
637
 
634
- var uncurryThis$l = functionUncurryThis;
635
- var isCallable$h = isCallable$n;
638
+ var uncurryThis$m = functionUncurryThis;
639
+ var isCallable$i = isCallable$o;
636
640
  var store$1 = sharedStore;
637
641
 
638
- var functionToString = uncurryThis$l(Function.toString);
642
+ var functionToString = uncurryThis$m(Function.toString);
639
643
 
640
644
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
641
- if (!isCallable$h(store$1.inspectSource)) {
645
+ if (!isCallable$i(store$1.inspectSource)) {
642
646
  store$1.inspectSource = function (it) {
643
647
  return functionToString(it);
644
648
  };
@@ -647,11 +651,11 @@ if (!isCallable$h(store$1.inspectSource)) {
647
651
  var inspectSource$3 = store$1.inspectSource;
648
652
 
649
653
  var global$i = global$p;
650
- var isCallable$g = isCallable$n;
654
+ var isCallable$h = isCallable$o;
651
655
 
652
656
  var WeakMap$1 = global$i.WeakMap;
653
657
 
654
- var weakMapBasicDetection = isCallable$g(WeakMap$1) && /native code/.test(String(WeakMap$1));
658
+ var weakMapBasicDetection = isCallable$h(WeakMap$1) && /native code/.test(String(WeakMap$1));
655
659
 
656
660
  var shared$2 = shared$4.exports;
657
661
  var uid = uid$2;
@@ -736,7 +740,7 @@ var internalState = {
736
740
  };
737
741
 
738
742
  var fails$j = fails$q;
739
- var isCallable$f = isCallable$n;
743
+ var isCallable$g = isCallable$o;
740
744
  var hasOwn$7 = hasOwnProperty_1;
741
745
  var DESCRIPTORS$5 = descriptors;
742
746
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -782,10 +786,10 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
782
786
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
783
787
  // eslint-disable-next-line no-extend-native -- required
784
788
  Function.prototype.toString = makeBuiltIn$1(function toString() {
785
- return isCallable$f(this) && getInternalState$2(this).source || inspectSource$2(this);
789
+ return isCallable$g(this) && getInternalState$2(this).source || inspectSource$2(this);
786
790
  }, 'toString');
787
791
 
788
- var isCallable$e = isCallable$n;
792
+ var isCallable$f = isCallable$o;
789
793
  var definePropertyModule$4 = objectDefineProperty;
790
794
  var makeBuiltIn = makeBuiltIn$2.exports;
791
795
  var defineGlobalProperty$1 = defineGlobalProperty$3;
@@ -794,7 +798,7 @@ var defineBuiltIn$7 = function (O, key, value, options) {
794
798
  if (!options) options = {};
795
799
  var simple = options.enumerable;
796
800
  var name = options.name !== undefined ? options.name : key;
797
- if (isCallable$e(value)) makeBuiltIn(value, name, options);
801
+ if (isCallable$f(value)) makeBuiltIn(value, name, options);
798
802
  if (options.global) {
799
803
  if (simple) O[key] = value;
800
804
  else defineGlobalProperty$1(key, value);
@@ -838,7 +842,7 @@ var toIntegerOrInfinity$6 = function (argument) {
838
842
 
839
843
  var toIntegerOrInfinity$5 = toIntegerOrInfinity$6;
840
844
 
841
- var max$2 = Math.max;
845
+ var max$3 = Math.max;
842
846
  var min$2 = Math.min;
843
847
 
844
848
  // Helper for a popular repeating case of the spec:
@@ -846,7 +850,7 @@ var min$2 = Math.min;
846
850
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
847
851
  var toAbsoluteIndex$2 = function (index, length) {
848
852
  var integer = toIntegerOrInfinity$5(index);
849
- return integer < 0 ? max$2(integer + length, 0) : min$2(integer, length);
853
+ return integer < 0 ? max$3(integer + length, 0) : min$2(integer, length);
850
854
  };
851
855
 
852
856
  var toIntegerOrInfinity$4 = toIntegerOrInfinity$6;
@@ -900,13 +904,13 @@ var arrayIncludes = {
900
904
  indexOf: createMethod$3(false)
901
905
  };
902
906
 
903
- var uncurryThis$k = functionUncurryThis;
907
+ var uncurryThis$l = functionUncurryThis;
904
908
  var hasOwn$6 = hasOwnProperty_1;
905
909
  var toIndexedObject$2 = toIndexedObject$5;
906
- var indexOf$1 = arrayIncludes.indexOf;
910
+ var indexOf$2 = arrayIncludes.indexOf;
907
911
  var hiddenKeys$2 = hiddenKeys$4;
908
912
 
909
- var push$2 = uncurryThis$k([].push);
913
+ var push$2 = uncurryThis$l([].push);
910
914
 
911
915
  var objectKeysInternal = function (object, names) {
912
916
  var O = toIndexedObject$2(object);
@@ -916,7 +920,7 @@ var objectKeysInternal = function (object, names) {
916
920
  for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$2(result, key);
917
921
  // Don't enum bug & hidden keys
918
922
  while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
919
- ~indexOf$1(result, key) || push$2(result, key);
923
+ ~indexOf$2(result, key) || push$2(result, key);
920
924
  }
921
925
  return result;
922
926
  };
@@ -950,12 +954,12 @@ var objectGetOwnPropertySymbols = {};
950
954
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
951
955
 
952
956
  var getBuiltIn$5 = getBuiltIn$8;
953
- var uncurryThis$j = functionUncurryThis;
957
+ var uncurryThis$k = functionUncurryThis;
954
958
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
955
959
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
956
960
  var anObject$d = anObject$f;
957
961
 
958
- var concat$2 = uncurryThis$j([].concat);
962
+ var concat$2 = uncurryThis$k([].concat);
959
963
 
960
964
  // all object keys, includes non-enumerable and symbols
961
965
  var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
@@ -982,7 +986,7 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
982
986
  };
983
987
 
984
988
  var fails$i = fails$q;
985
- var isCallable$d = isCallable$n;
989
+ var isCallable$e = isCallable$o;
986
990
 
987
991
  var replacement = /#|\.prototype\./;
988
992
 
@@ -990,7 +994,7 @@ var isForced$2 = function (feature, detection) {
990
994
  var value = data[normalize(feature)];
991
995
  return value == POLYFILL ? true
992
996
  : value == NATIVE ? false
993
- : isCallable$d(detection) ? fails$i(detection)
997
+ : isCallable$e(detection) ? fails$i(detection)
994
998
  : !!detection;
995
999
  };
996
1000
 
@@ -1070,8 +1074,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
1070
1074
  };
1071
1075
 
1072
1076
  var DESCRIPTORS$4 = descriptors;
1073
- var uncurryThis$i = functionUncurryThis;
1074
- var call$e = functionCall;
1077
+ var uncurryThis$j = functionUncurryThis;
1078
+ var call$f = functionCall;
1075
1079
  var fails$h = fails$q;
1076
1080
  var objectKeys$1 = objectKeys$2;
1077
1081
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
@@ -1083,7 +1087,7 @@ var IndexedObject$1 = indexedObject;
1083
1087
  var $assign = Object.assign;
1084
1088
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1085
1089
  var defineProperty$4 = Object.defineProperty;
1086
- var concat$1 = uncurryThis$i([].concat);
1090
+ var concat$1 = uncurryThis$j([].concat);
1087
1091
 
1088
1092
  // `Object.assign` method
1089
1093
  // https://tc39.es/ecma262/#sec-object.assign
@@ -1121,18 +1125,18 @@ var objectAssign = !$assign || fails$h(function () {
1121
1125
  var key;
1122
1126
  while (length > j) {
1123
1127
  key = keys[j++];
1124
- if (!DESCRIPTORS$4 || call$e(propertyIsEnumerable, S, key)) T[key] = S[key];
1128
+ if (!DESCRIPTORS$4 || call$f(propertyIsEnumerable, S, key)) T[key] = S[key];
1125
1129
  }
1126
1130
  } return T;
1127
1131
  } : $assign;
1128
1132
 
1129
- var $$j = _export;
1133
+ var $$k = _export;
1130
1134
  var assign = objectAssign;
1131
1135
 
1132
1136
  // `Object.assign` method
1133
1137
  // https://tc39.es/ecma262/#sec-object.assign
1134
1138
  // eslint-disable-next-line es/no-object-assign -- required for testing
1135
- $$j({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1139
+ $$k({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1136
1140
  assign: assign
1137
1141
  });
1138
1142
 
@@ -1178,7 +1182,7 @@ var toObject$4 = toObject$7;
1178
1182
  var IndexedObject = indexedObject;
1179
1183
  var lengthOfArrayLike$5 = lengthOfArrayLike$7;
1180
1184
 
1181
- var $TypeError$b = TypeError;
1185
+ var $TypeError$c = TypeError;
1182
1186
 
1183
1187
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
1184
1188
  var createMethod$2 = function (IS_RIGHT) {
@@ -1197,7 +1201,7 @@ var createMethod$2 = function (IS_RIGHT) {
1197
1201
  }
1198
1202
  index += i;
1199
1203
  if (IS_RIGHT ? index < 0 : length <= index) {
1200
- throw $TypeError$b('Reduce of empty array with no initial value');
1204
+ throw $TypeError$c('Reduce of empty array with no initial value');
1201
1205
  }
1202
1206
  }
1203
1207
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -1231,7 +1235,7 @@ var global$f = global$p;
1231
1235
 
1232
1236
  var engineIsNode = classof$7(global$f.process) == 'process';
1233
1237
 
1234
- var $$i = _export;
1238
+ var $$j = _export;
1235
1239
  var $reduce = arrayReduce.left;
1236
1240
  var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
1237
1241
  var CHROME_VERSION = engineV8Version;
@@ -1244,7 +1248,7 @@ var CHROME_BUG = !IS_NODE$4 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1244
1248
 
1245
1249
  // `Array.prototype.reduce` method
1246
1250
  // https://tc39.es/ecma262/#sec-array.prototype.reduce
1247
- $$i({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || CHROME_BUG }, {
1251
+ $$j({ target: 'Array', proto: true, forced: !STRICT_METHOD$1 || CHROME_BUG }, {
1248
1252
  reduce: function reduce(callbackfn /* , initialValue */) {
1249
1253
  var length = arguments.length;
1250
1254
  return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
@@ -1371,11 +1375,11 @@ var objectCreate = Object.create || function create(O, Properties) {
1371
1375
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1372
1376
  };
1373
1377
 
1374
- var wellKnownSymbol$h = wellKnownSymbol$j;
1378
+ var wellKnownSymbol$i = wellKnownSymbol$k;
1375
1379
  var create$2 = objectCreate;
1376
1380
  var defineProperty$3 = objectDefineProperty.f;
1377
1381
 
1378
- var UNSCOPABLES = wellKnownSymbol$h('unscopables');
1382
+ var UNSCOPABLES = wellKnownSymbol$i('unscopables');
1379
1383
  var ArrayPrototype$1 = Array.prototype;
1380
1384
 
1381
1385
  // Array.prototype[@@unscopables]
@@ -1404,7 +1408,7 @@ var correctPrototypeGetter = !fails$f(function () {
1404
1408
  });
1405
1409
 
1406
1410
  var hasOwn$4 = hasOwnProperty_1;
1407
- var isCallable$c = isCallable$n;
1411
+ var isCallable$d = isCallable$o;
1408
1412
  var toObject$3 = toObject$7;
1409
1413
  var sharedKey = sharedKey$3;
1410
1414
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
@@ -1420,19 +1424,19 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1420
1424
  var object = toObject$3(O);
1421
1425
  if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
1422
1426
  var constructor = object.constructor;
1423
- if (isCallable$c(constructor) && object instanceof constructor) {
1427
+ if (isCallable$d(constructor) && object instanceof constructor) {
1424
1428
  return constructor.prototype;
1425
1429
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1426
1430
  };
1427
1431
 
1428
1432
  var fails$e = fails$q;
1429
- var isCallable$b = isCallable$n;
1433
+ var isCallable$c = isCallable$o;
1430
1434
  var isObject$4 = isObject$a;
1431
1435
  var getPrototypeOf$1 = objectGetPrototypeOf;
1432
1436
  var defineBuiltIn$5 = defineBuiltIn$7;
1433
- var wellKnownSymbol$g = wellKnownSymbol$j;
1437
+ var wellKnownSymbol$h = wellKnownSymbol$k;
1434
1438
 
1435
- var ITERATOR$7 = wellKnownSymbol$g('iterator');
1439
+ var ITERATOR$7 = wellKnownSymbol$h('iterator');
1436
1440
  var BUGGY_SAFARI_ITERATORS$1 = false;
1437
1441
 
1438
1442
  // `%IteratorPrototype%` object
@@ -1460,7 +1464,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1460
1464
 
1461
1465
  // `%IteratorPrototype%[@@iterator]()` method
1462
1466
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1463
- if (!isCallable$b(IteratorPrototype$2[ITERATOR$7])) {
1467
+ if (!isCallable$c(IteratorPrototype$2[ITERATOR$7])) {
1464
1468
  defineBuiltIn$5(IteratorPrototype$2, ITERATOR$7, function () {
1465
1469
  return this;
1466
1470
  });
@@ -1473,9 +1477,9 @@ var iteratorsCore = {
1473
1477
 
1474
1478
  var defineProperty$2 = objectDefineProperty.f;
1475
1479
  var hasOwn$3 = hasOwnProperty_1;
1476
- var wellKnownSymbol$f = wellKnownSymbol$j;
1480
+ var wellKnownSymbol$g = wellKnownSymbol$k;
1477
1481
 
1478
- var TO_STRING_TAG$3 = wellKnownSymbol$f('toStringTag');
1482
+ var TO_STRING_TAG$3 = wellKnownSymbol$g('toStringTag');
1479
1483
 
1480
1484
  var setToStringTag$3 = function (target, TAG, STATIC) {
1481
1485
  if (target && !STATIC) target = target.prototype;
@@ -1500,19 +1504,19 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
1500
1504
  return IteratorConstructor;
1501
1505
  };
1502
1506
 
1503
- var isCallable$a = isCallable$n;
1507
+ var isCallable$b = isCallable$o;
1504
1508
 
1505
1509
  var $String$2 = String;
1506
- var $TypeError$a = TypeError;
1510
+ var $TypeError$b = TypeError;
1507
1511
 
1508
1512
  var aPossiblePrototype$1 = function (argument) {
1509
- if (typeof argument == 'object' || isCallable$a(argument)) return argument;
1510
- throw $TypeError$a("Can't set " + $String$2(argument) + ' as a prototype');
1513
+ if (typeof argument == 'object' || isCallable$b(argument)) return argument;
1514
+ throw $TypeError$b("Can't set " + $String$2(argument) + ' as a prototype');
1511
1515
  };
1512
1516
 
1513
1517
  /* eslint-disable no-proto -- safe */
1514
1518
 
1515
- var uncurryThis$h = functionUncurryThis;
1519
+ var uncurryThis$i = functionUncurryThis;
1516
1520
  var anObject$a = anObject$f;
1517
1521
  var aPossiblePrototype = aPossiblePrototype$1;
1518
1522
 
@@ -1526,7 +1530,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1526
1530
  var setter;
1527
1531
  try {
1528
1532
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1529
- setter = uncurryThis$h(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1533
+ setter = uncurryThis$i(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1530
1534
  setter(test, []);
1531
1535
  CORRECT_SETTER = test instanceof Array;
1532
1536
  } catch (error) { /* empty */ }
@@ -1539,17 +1543,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1539
1543
  };
1540
1544
  }() : undefined);
1541
1545
 
1542
- var $$h = _export;
1543
- var call$d = functionCall;
1546
+ var $$i = _export;
1547
+ var call$e = functionCall;
1544
1548
  var FunctionName = functionName;
1545
- var isCallable$9 = isCallable$n;
1549
+ var isCallable$a = isCallable$o;
1546
1550
  var createIteratorConstructor = iteratorCreateConstructor;
1547
1551
  var getPrototypeOf = objectGetPrototypeOf;
1548
1552
  var setPrototypeOf$1 = objectSetPrototypeOf;
1549
1553
  var setToStringTag$1 = setToStringTag$3;
1550
1554
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1551
1555
  var defineBuiltIn$4 = defineBuiltIn$7;
1552
- var wellKnownSymbol$e = wellKnownSymbol$j;
1556
+ var wellKnownSymbol$f = wellKnownSymbol$k;
1553
1557
  var Iterators$3 = iterators;
1554
1558
  var IteratorsCore = iteratorsCore;
1555
1559
 
@@ -1557,7 +1561,7 @@ var PROPER_FUNCTION_NAME$2 = FunctionName.PROPER;
1557
1561
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1558
1562
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1559
1563
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1560
- var ITERATOR$6 = wellKnownSymbol$e('iterator');
1564
+ var ITERATOR$6 = wellKnownSymbol$f('iterator');
1561
1565
  var KEYS = 'keys';
1562
1566
  var VALUES = 'values';
1563
1567
  var ENTRIES = 'entries';
@@ -1594,7 +1598,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1594
1598
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1595
1599
  if (setPrototypeOf$1) {
1596
1600
  setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1597
- } else if (!isCallable$9(CurrentIteratorPrototype[ITERATOR$6])) {
1601
+ } else if (!isCallable$a(CurrentIteratorPrototype[ITERATOR$6])) {
1598
1602
  defineBuiltIn$4(CurrentIteratorPrototype, ITERATOR$6, returnThis);
1599
1603
  }
1600
1604
  }
@@ -1609,7 +1613,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1609
1613
  createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1610
1614
  } else {
1611
1615
  INCORRECT_VALUES_NAME = true;
1612
- defaultIterator = function values() { return call$d(nativeIterator, this); };
1616
+ defaultIterator = function values() { return call$e(nativeIterator, this); };
1613
1617
  }
1614
1618
  }
1615
1619
 
@@ -1624,7 +1628,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1624
1628
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1625
1629
  defineBuiltIn$4(IterablePrototype, KEY, methods[KEY]);
1626
1630
  }
1627
- } else $$h({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1631
+ } else $$i({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1628
1632
  }
1629
1633
 
1630
1634
  // define iterator
@@ -1752,10 +1756,10 @@ var DOMIterables = domIterables;
1752
1756
  var DOMTokenListPrototype = domTokenListPrototype;
1753
1757
  var ArrayIteratorMethods = es_array_iterator;
1754
1758
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1755
- var wellKnownSymbol$d = wellKnownSymbol$j;
1759
+ var wellKnownSymbol$e = wellKnownSymbol$k;
1756
1760
 
1757
- var ITERATOR$5 = wellKnownSymbol$d('iterator');
1758
- var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1761
+ var ITERATOR$5 = wellKnownSymbol$e('iterator');
1762
+ var TO_STRING_TAG$2 = wellKnownSymbol$e('toStringTag');
1759
1763
  var ArrayValues = ArrayIteratorMethods.values;
1760
1764
 
1761
1765
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
@@ -1874,6 +1878,18 @@ const createCodedErrors = err => {
1874
1878
  message: err.message
1875
1879
  }];
1876
1880
  };
1881
+ /**
1882
+ * Joins a list of error-like object's messages and throws them as a single error.
1883
+ */
1884
+ function throwJoinedMessages(errors) {
1885
+ throw new Error(errors.map(e => e.message).join(", "));
1886
+ }
1887
+ /**
1888
+ * If any CodedErrors exist, throw them all as a single error, otherwise assert errors is null.
1889
+ */
1890
+ function throwAny(errors) {
1891
+ if (errors) throwJoinedMessages(errors);
1892
+ }
1877
1893
 
1878
1894
  /**
1879
1895
  * @description
@@ -1911,9 +1927,9 @@ const formLogger = {
1911
1927
  })
1912
1928
  };
1913
1929
 
1914
- var wellKnownSymbol$c = wellKnownSymbol$j;
1930
+ var wellKnownSymbol$d = wellKnownSymbol$k;
1915
1931
 
1916
- var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
1932
+ var TO_STRING_TAG$1 = wellKnownSymbol$d('toStringTag');
1917
1933
  var test$1 = {};
1918
1934
 
1919
1935
  test$1[TO_STRING_TAG$1] = 'z';
@@ -1921,11 +1937,11 @@ test$1[TO_STRING_TAG$1] = 'z';
1921
1937
  var toStringTagSupport = String(test$1) === '[object z]';
1922
1938
 
1923
1939
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1924
- var isCallable$8 = isCallable$n;
1940
+ var isCallable$9 = isCallable$o;
1925
1941
  var classofRaw$1 = classofRaw$2;
1926
- var wellKnownSymbol$b = wellKnownSymbol$j;
1942
+ var wellKnownSymbol$c = wellKnownSymbol$k;
1927
1943
 
1928
- var TO_STRING_TAG = wellKnownSymbol$b('toStringTag');
1944
+ var TO_STRING_TAG = wellKnownSymbol$c('toStringTag');
1929
1945
  var $Object = Object;
1930
1946
 
1931
1947
  // ES3 wrong here
@@ -1947,14 +1963,14 @@ var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1947
1963
  // builtinTag case
1948
1964
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
1949
1965
  // ES3 arguments fallback
1950
- : (result = classofRaw$1(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
1966
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$9(O.callee) ? 'Arguments' : result;
1951
1967
  };
1952
1968
 
1953
1969
  var classof$5 = classof$6;
1954
1970
 
1955
1971
  var $String$1 = String;
1956
1972
 
1957
- var toString$b = function (argument) {
1973
+ var toString$c = function (argument) {
1958
1974
  if (classof$5(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1959
1975
  return $String$1(argument);
1960
1976
  };
@@ -1963,12 +1979,12 @@ var toString$b = function (argument) {
1963
1979
  var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1964
1980
  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1965
1981
 
1966
- var uncurryThis$g = functionUncurryThis;
1967
- var requireObjectCoercible$5 = requireObjectCoercible$8;
1968
- var toString$a = toString$b;
1982
+ var uncurryThis$h = functionUncurryThis;
1983
+ var requireObjectCoercible$6 = requireObjectCoercible$9;
1984
+ var toString$b = toString$c;
1969
1985
  var whitespaces$3 = whitespaces$4;
1970
1986
 
1971
- var replace$3 = uncurryThis$g(''.replace);
1987
+ var replace$3 = uncurryThis$h(''.replace);
1972
1988
  var whitespace = '[' + whitespaces$3 + ']';
1973
1989
  var ltrim = RegExp('^' + whitespace + whitespace + '*');
1974
1990
  var rtrim = RegExp(whitespace + whitespace + '*$');
@@ -1976,7 +1992,7 @@ var rtrim = RegExp(whitespace + whitespace + '*$');
1976
1992
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1977
1993
  var createMethod$1 = function (TYPE) {
1978
1994
  return function ($this) {
1979
- var string = toString$a(requireObjectCoercible$5($this));
1995
+ var string = toString$b(requireObjectCoercible$6($this));
1980
1996
  if (TYPE & 1) string = replace$3(string, ltrim, '');
1981
1997
  if (TYPE & 2) string = replace$3(string, rtrim, '');
1982
1998
  return string;
@@ -2011,13 +2027,13 @@ var stringTrimForced = function (METHOD_NAME) {
2011
2027
  });
2012
2028
  };
2013
2029
 
2014
- var $$g = _export;
2030
+ var $$h = _export;
2015
2031
  var $trim = stringTrim.trim;
2016
2032
  var forcedStringTrimMethod = stringTrimForced;
2017
2033
 
2018
2034
  // `String.prototype.trim` method
2019
2035
  // https://tc39.es/ecma262/#sec-string.prototype.trim
2020
- $$g({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2036
+ $$h({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2021
2037
  trim: function trim() {
2022
2038
  return $trim(this);
2023
2039
  }
@@ -2097,9 +2113,9 @@ var regexpUnsupportedNcg = fails$a(function () {
2097
2113
 
2098
2114
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2099
2115
  /* eslint-disable regexp/no-useless-quantifier -- testing */
2100
- var call$c = functionCall;
2101
- var uncurryThis$f = functionUncurryThis;
2102
- var toString$9 = toString$b;
2116
+ var call$d = functionCall;
2117
+ var uncurryThis$g = functionUncurryThis;
2118
+ var toString$a = toString$c;
2103
2119
  var regexpFlags = regexpFlags$1;
2104
2120
  var stickyHelpers = regexpStickyHelpers;
2105
2121
  var shared = shared$4.exports;
@@ -2111,16 +2127,16 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2111
2127
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
2112
2128
  var nativeExec = RegExp.prototype.exec;
2113
2129
  var patchedExec = nativeExec;
2114
- var charAt$4 = uncurryThis$f(''.charAt);
2115
- var indexOf = uncurryThis$f(''.indexOf);
2116
- var replace$2 = uncurryThis$f(''.replace);
2117
- var stringSlice$5 = uncurryThis$f(''.slice);
2130
+ var charAt$4 = uncurryThis$g(''.charAt);
2131
+ var indexOf$1 = uncurryThis$g(''.indexOf);
2132
+ var replace$2 = uncurryThis$g(''.replace);
2133
+ var stringSlice$6 = uncurryThis$g(''.slice);
2118
2134
 
2119
2135
  var UPDATES_LAST_INDEX_WRONG = (function () {
2120
2136
  var re1 = /a/;
2121
2137
  var re2 = /b*/g;
2122
- call$c(nativeExec, re1, 'a');
2123
- call$c(nativeExec, re2, 'a');
2138
+ call$d(nativeExec, re1, 'a');
2139
+ call$d(nativeExec, re2, 'a');
2124
2140
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2125
2141
  })();
2126
2142
 
@@ -2135,31 +2151,31 @@ if (PATCH) {
2135
2151
  patchedExec = function exec(string) {
2136
2152
  var re = this;
2137
2153
  var state = getInternalState(re);
2138
- var str = toString$9(string);
2154
+ var str = toString$a(string);
2139
2155
  var raw = state.raw;
2140
2156
  var result, reCopy, lastIndex, match, i, object, group;
2141
2157
 
2142
2158
  if (raw) {
2143
2159
  raw.lastIndex = re.lastIndex;
2144
- result = call$c(patchedExec, raw, str);
2160
+ result = call$d(patchedExec, raw, str);
2145
2161
  re.lastIndex = raw.lastIndex;
2146
2162
  return result;
2147
2163
  }
2148
2164
 
2149
2165
  var groups = state.groups;
2150
2166
  var sticky = UNSUPPORTED_Y && re.sticky;
2151
- var flags = call$c(regexpFlags, re);
2167
+ var flags = call$d(regexpFlags, re);
2152
2168
  var source = re.source;
2153
2169
  var charsAdded = 0;
2154
2170
  var strCopy = str;
2155
2171
 
2156
2172
  if (sticky) {
2157
2173
  flags = replace$2(flags, 'y', '');
2158
- if (indexOf(flags, 'g') === -1) {
2174
+ if (indexOf$1(flags, 'g') === -1) {
2159
2175
  flags += 'g';
2160
2176
  }
2161
2177
 
2162
- strCopy = stringSlice$5(str, re.lastIndex);
2178
+ strCopy = stringSlice$6(str, re.lastIndex);
2163
2179
  // Support anchored sticky behavior.
2164
2180
  if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
2165
2181
  source = '(?: ' + source + ')';
@@ -2176,12 +2192,12 @@ if (PATCH) {
2176
2192
  }
2177
2193
  if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2178
2194
 
2179
- match = call$c(nativeExec, sticky ? reCopy : re, strCopy);
2195
+ match = call$d(nativeExec, sticky ? reCopy : re, strCopy);
2180
2196
 
2181
2197
  if (sticky) {
2182
2198
  if (match) {
2183
- match.input = stringSlice$5(match.input, charsAdded);
2184
- match[0] = stringSlice$5(match[0], charsAdded);
2199
+ match.input = stringSlice$6(match.input, charsAdded);
2200
+ match[0] = stringSlice$6(match[0], charsAdded);
2185
2201
  match.index = re.lastIndex;
2186
2202
  re.lastIndex += match[0].length;
2187
2203
  } else re.lastIndex = 0;
@@ -2191,7 +2207,7 @@ if (PATCH) {
2191
2207
  if (NPCG_INCLUDED && match && match.length > 1) {
2192
2208
  // Fix browsers whose `exec` methods don't consistently return `undefined`
2193
2209
  // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2194
- call$c(nativeReplace, match[0], reCopy, function () {
2210
+ call$d(nativeReplace, match[0], reCopy, function () {
2195
2211
  for (i = 1; i < arguments.length - 2; i++) {
2196
2212
  if (arguments[i] === undefined) match[i] = undefined;
2197
2213
  }
@@ -2212,12 +2228,12 @@ if (PATCH) {
2212
2228
 
2213
2229
  var regexpExec$2 = patchedExec;
2214
2230
 
2215
- var $$f = _export;
2231
+ var $$g = _export;
2216
2232
  var exec$2 = regexpExec$2;
2217
2233
 
2218
2234
  // `RegExp.prototype.exec` method
2219
2235
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2220
- $$f({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2236
+ $$g({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
2221
2237
  exec: exec$2
2222
2238
  });
2223
2239
 
@@ -2225,37 +2241,37 @@ var NATIVE_BIND$1 = functionBindNative;
2225
2241
 
2226
2242
  var FunctionPrototype = Function.prototype;
2227
2243
  var apply$2 = FunctionPrototype.apply;
2228
- var call$b = FunctionPrototype.call;
2244
+ var call$c = FunctionPrototype.call;
2229
2245
 
2230
2246
  // eslint-disable-next-line es/no-reflect -- safe
2231
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$b.bind(apply$2) : function () {
2232
- return call$b.apply(apply$2, arguments);
2247
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$c.bind(apply$2) : function () {
2248
+ return call$c.apply(apply$2, arguments);
2233
2249
  });
2234
2250
 
2235
2251
  var classofRaw = classofRaw$2;
2236
- var uncurryThis$e = functionUncurryThis;
2252
+ var uncurryThis$f = functionUncurryThis;
2237
2253
 
2238
2254
  var functionUncurryThisClause = function (fn) {
2239
2255
  // Nashorn bug:
2240
2256
  // https://github.com/zloirock/core-js/issues/1128
2241
2257
  // https://github.com/zloirock/core-js/issues/1130
2242
- if (classofRaw(fn) === 'Function') return uncurryThis$e(fn);
2258
+ if (classofRaw(fn) === 'Function') return uncurryThis$f(fn);
2243
2259
  };
2244
2260
 
2245
2261
  // TODO: Remove from `core-js@4` since it's moved to entry points
2246
2262
 
2247
- var uncurryThis$d = functionUncurryThisClause;
2263
+ var uncurryThis$e = functionUncurryThisClause;
2248
2264
  var defineBuiltIn$3 = defineBuiltIn$7;
2249
2265
  var regexpExec$1 = regexpExec$2;
2250
2266
  var fails$9 = fails$q;
2251
- var wellKnownSymbol$a = wellKnownSymbol$j;
2267
+ var wellKnownSymbol$b = wellKnownSymbol$k;
2252
2268
  var createNonEnumerableProperty = createNonEnumerableProperty$5;
2253
2269
 
2254
- var SPECIES$4 = wellKnownSymbol$a('species');
2270
+ var SPECIES$4 = wellKnownSymbol$b('species');
2255
2271
  var RegExpPrototype$2 = RegExp.prototype;
2256
2272
 
2257
2273
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2258
- var SYMBOL = wellKnownSymbol$a(KEY);
2274
+ var SYMBOL = wellKnownSymbol$b(KEY);
2259
2275
 
2260
2276
  var DELEGATES_TO_SYMBOL = !fails$9(function () {
2261
2277
  // String methods call symbol-named RegEp methods
@@ -2293,9 +2309,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2293
2309
  !DELEGATES_TO_EXEC ||
2294
2310
  FORCED
2295
2311
  ) {
2296
- var uncurriedNativeRegExpMethod = uncurryThis$d(/./[SYMBOL]);
2312
+ var uncurriedNativeRegExpMethod = uncurryThis$e(/./[SYMBOL]);
2297
2313
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2298
- var uncurriedNativeMethod = uncurryThis$d(nativeMethod);
2314
+ var uncurriedNativeMethod = uncurryThis$e(nativeMethod);
2299
2315
  var $exec = regexp.exec;
2300
2316
  if ($exec === regexpExec$1 || $exec === RegExpPrototype$2.exec) {
2301
2317
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
@@ -2316,18 +2332,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2316
2332
  if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
2317
2333
  };
2318
2334
 
2319
- var uncurryThis$c = functionUncurryThis;
2335
+ var uncurryThis$d = functionUncurryThis;
2320
2336
  var toIntegerOrInfinity$3 = toIntegerOrInfinity$6;
2321
- var toString$8 = toString$b;
2322
- var requireObjectCoercible$4 = requireObjectCoercible$8;
2337
+ var toString$9 = toString$c;
2338
+ var requireObjectCoercible$5 = requireObjectCoercible$9;
2323
2339
 
2324
- var charAt$3 = uncurryThis$c(''.charAt);
2325
- var charCodeAt = uncurryThis$c(''.charCodeAt);
2326
- var stringSlice$4 = uncurryThis$c(''.slice);
2340
+ var charAt$3 = uncurryThis$d(''.charAt);
2341
+ var charCodeAt = uncurryThis$d(''.charCodeAt);
2342
+ var stringSlice$5 = uncurryThis$d(''.slice);
2327
2343
 
2328
2344
  var createMethod = function (CONVERT_TO_STRING) {
2329
2345
  return function ($this, pos) {
2330
- var S = toString$8(requireObjectCoercible$4($this));
2346
+ var S = toString$9(requireObjectCoercible$5($this));
2331
2347
  var position = toIntegerOrInfinity$3(pos);
2332
2348
  var size = S.length;
2333
2349
  var first, second;
@@ -2339,7 +2355,7 @@ var createMethod = function (CONVERT_TO_STRING) {
2339
2355
  ? charAt$3(S, position)
2340
2356
  : first
2341
2357
  : CONVERT_TO_STRING
2342
- ? stringSlice$4(S, position, position + 2)
2358
+ ? stringSlice$5(S, position, position + 2)
2343
2359
  : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
2344
2360
  };
2345
2361
  };
@@ -2361,19 +2377,19 @@ var advanceStringIndex$2 = function (S, index, unicode) {
2361
2377
  return index + (unicode ? charAt$2(S, index).length : 1);
2362
2378
  };
2363
2379
 
2364
- var uncurryThis$b = functionUncurryThis;
2380
+ var uncurryThis$c = functionUncurryThis;
2365
2381
  var toObject$2 = toObject$7;
2366
2382
 
2367
2383
  var floor$2 = Math.floor;
2368
- var charAt$1 = uncurryThis$b(''.charAt);
2369
- var replace$1 = uncurryThis$b(''.replace);
2370
- var stringSlice$3 = uncurryThis$b(''.slice);
2384
+ var charAt$1 = uncurryThis$c(''.charAt);
2385
+ var replace$1 = uncurryThis$c(''.replace);
2386
+ var stringSlice$4 = uncurryThis$c(''.slice);
2371
2387
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2372
2388
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2373
2389
 
2374
2390
  // `GetSubstitution` abstract operation
2375
2391
  // https://tc39.es/ecma262/#sec-getsubstitution
2376
- var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
2392
+ var getSubstitution$2 = function (matched, str, position, captures, namedCaptures, replacement) {
2377
2393
  var tailPos = position + matched.length;
2378
2394
  var m = captures.length;
2379
2395
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
@@ -2386,10 +2402,10 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2386
2402
  switch (charAt$1(ch, 0)) {
2387
2403
  case '$': return '$';
2388
2404
  case '&': return matched;
2389
- case '`': return stringSlice$3(str, 0, position);
2390
- case "'": return stringSlice$3(str, tailPos);
2405
+ case '`': return stringSlice$4(str, 0, position);
2406
+ case "'": return stringSlice$4(str, tailPos);
2391
2407
  case '<':
2392
- capture = namedCaptures[stringSlice$3(ch, 1, -1)];
2408
+ capture = namedCaptures[stringSlice$4(ch, 1, -1)];
2393
2409
  break;
2394
2410
  default: // \d\d?
2395
2411
  var n = +ch;
@@ -2406,52 +2422,52 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2406
2422
  });
2407
2423
  };
2408
2424
 
2409
- var call$a = functionCall;
2425
+ var call$b = functionCall;
2410
2426
  var anObject$8 = anObject$f;
2411
- var isCallable$7 = isCallable$n;
2427
+ var isCallable$8 = isCallable$o;
2412
2428
  var classof$4 = classofRaw$2;
2413
2429
  var regexpExec = regexpExec$2;
2414
2430
 
2415
- var $TypeError$9 = TypeError;
2431
+ var $TypeError$a = TypeError;
2416
2432
 
2417
2433
  // `RegExpExec` abstract operation
2418
2434
  // https://tc39.es/ecma262/#sec-regexpexec
2419
2435
  var regexpExecAbstract = function (R, S) {
2420
2436
  var exec = R.exec;
2421
- if (isCallable$7(exec)) {
2422
- var result = call$a(exec, R, S);
2437
+ if (isCallable$8(exec)) {
2438
+ var result = call$b(exec, R, S);
2423
2439
  if (result !== null) anObject$8(result);
2424
2440
  return result;
2425
2441
  }
2426
- if (classof$4(R) === 'RegExp') return call$a(regexpExec, R, S);
2427
- throw $TypeError$9('RegExp#exec called on incompatible receiver');
2442
+ if (classof$4(R) === 'RegExp') return call$b(regexpExec, R, S);
2443
+ throw $TypeError$a('RegExp#exec called on incompatible receiver');
2428
2444
  };
2429
2445
 
2430
2446
  var apply$1 = functionApply;
2431
- var call$9 = functionCall;
2432
- var uncurryThis$a = functionUncurryThis;
2447
+ var call$a = functionCall;
2448
+ var uncurryThis$b = functionUncurryThis;
2433
2449
  var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
2434
2450
  var fails$8 = fails$q;
2435
2451
  var anObject$7 = anObject$f;
2436
- var isCallable$6 = isCallable$n;
2437
- var isNullOrUndefined$3 = isNullOrUndefined$6;
2452
+ var isCallable$7 = isCallable$o;
2453
+ var isNullOrUndefined$4 = isNullOrUndefined$7;
2438
2454
  var toIntegerOrInfinity$2 = toIntegerOrInfinity$6;
2439
2455
  var toLength$1 = toLength$3;
2440
- var toString$7 = toString$b;
2441
- var requireObjectCoercible$3 = requireObjectCoercible$8;
2456
+ var toString$8 = toString$c;
2457
+ var requireObjectCoercible$4 = requireObjectCoercible$9;
2442
2458
  var advanceStringIndex$1 = advanceStringIndex$2;
2443
- var getMethod$3 = getMethod$5;
2444
- var getSubstitution = getSubstitution$1;
2459
+ var getMethod$4 = getMethod$6;
2460
+ var getSubstitution$1 = getSubstitution$2;
2445
2461
  var regExpExec$1 = regexpExecAbstract;
2446
- var wellKnownSymbol$9 = wellKnownSymbol$j;
2462
+ var wellKnownSymbol$a = wellKnownSymbol$k;
2447
2463
 
2448
- var REPLACE = wellKnownSymbol$9('replace');
2449
- var max$1 = Math.max;
2464
+ var REPLACE$1 = wellKnownSymbol$a('replace');
2465
+ var max$2 = Math.max;
2450
2466
  var min = Math.min;
2451
- var concat = uncurryThis$a([].concat);
2452
- var push$1 = uncurryThis$a([].push);
2453
- var stringIndexOf$1 = uncurryThis$a(''.indexOf);
2454
- var stringSlice$2 = uncurryThis$a(''.slice);
2467
+ var concat = uncurryThis$b([].concat);
2468
+ var push$1 = uncurryThis$b([].push);
2469
+ var stringIndexOf$2 = uncurryThis$b(''.indexOf);
2470
+ var stringSlice$3 = uncurryThis$b(''.slice);
2455
2471
 
2456
2472
  var maybeToString = function (it) {
2457
2473
  return it === undefined ? it : String(it);
@@ -2466,8 +2482,8 @@ var REPLACE_KEEPS_$0 = (function () {
2466
2482
 
2467
2483
  // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2468
2484
  var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2469
- if (/./[REPLACE]) {
2470
- return /./[REPLACE]('a', '$0') === '';
2485
+ if (/./[REPLACE$1]) {
2486
+ return /./[REPLACE$1]('a', '$0') === '';
2471
2487
  }
2472
2488
  return false;
2473
2489
  })();
@@ -2491,29 +2507,29 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2491
2507
  // `String.prototype.replace` method
2492
2508
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2493
2509
  function replace(searchValue, replaceValue) {
2494
- var O = requireObjectCoercible$3(this);
2495
- var replacer = isNullOrUndefined$3(searchValue) ? undefined : getMethod$3(searchValue, REPLACE);
2510
+ var O = requireObjectCoercible$4(this);
2511
+ var replacer = isNullOrUndefined$4(searchValue) ? undefined : getMethod$4(searchValue, REPLACE$1);
2496
2512
  return replacer
2497
- ? call$9(replacer, searchValue, O, replaceValue)
2498
- : call$9(nativeReplace, toString$7(O), searchValue, replaceValue);
2513
+ ? call$a(replacer, searchValue, O, replaceValue)
2514
+ : call$a(nativeReplace, toString$8(O), searchValue, replaceValue);
2499
2515
  },
2500
2516
  // `RegExp.prototype[@@replace]` method
2501
2517
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2502
2518
  function (string, replaceValue) {
2503
2519
  var rx = anObject$7(this);
2504
- var S = toString$7(string);
2520
+ var S = toString$8(string);
2505
2521
 
2506
2522
  if (
2507
2523
  typeof replaceValue == 'string' &&
2508
- stringIndexOf$1(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2509
- stringIndexOf$1(replaceValue, '$<') === -1
2524
+ stringIndexOf$2(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2525
+ stringIndexOf$2(replaceValue, '$<') === -1
2510
2526
  ) {
2511
2527
  var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
2512
2528
  if (res.done) return res.value;
2513
2529
  }
2514
2530
 
2515
- var functionalReplace = isCallable$6(replaceValue);
2516
- if (!functionalReplace) replaceValue = toString$7(replaceValue);
2531
+ var functionalReplace = isCallable$7(replaceValue);
2532
+ if (!functionalReplace) replaceValue = toString$8(replaceValue);
2517
2533
 
2518
2534
  var global = rx.global;
2519
2535
  if (global) {
@@ -2528,7 +2544,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2528
2544
  push$1(results, result);
2529
2545
  if (!global) break;
2530
2546
 
2531
- var matchStr = toString$7(result[0]);
2547
+ var matchStr = toString$8(result[0]);
2532
2548
  if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
2533
2549
  }
2534
2550
 
@@ -2537,8 +2553,8 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2537
2553
  for (var i = 0; i < results.length; i++) {
2538
2554
  result = results[i];
2539
2555
 
2540
- var matched = toString$7(result[0]);
2541
- var position = max$1(min(toIntegerOrInfinity$2(result.index), S.length), 0);
2556
+ var matched = toString$8(result[0]);
2557
+ var position = max$2(min(toIntegerOrInfinity$2(result.index), S.length), 0);
2542
2558
  var captures = [];
2543
2559
  // NOTE: This is equivalent to
2544
2560
  // captures = result.slice(1).map(maybeToString)
@@ -2550,16 +2566,16 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
2550
2566
  if (functionalReplace) {
2551
2567
  var replacerArgs = concat([matched], captures, position, S);
2552
2568
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2553
- var replacement = toString$7(apply$1(replaceValue, undefined, replacerArgs));
2569
+ var replacement = toString$8(apply$1(replaceValue, undefined, replacerArgs));
2554
2570
  } else {
2555
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2571
+ replacement = getSubstitution$1(matched, S, position, captures, namedCaptures, replaceValue);
2556
2572
  }
2557
2573
  if (position >= nextSourcePosition) {
2558
- accumulatedResult += stringSlice$2(S, nextSourcePosition, position) + replacement;
2574
+ accumulatedResult += stringSlice$3(S, nextSourcePosition, position) + replacement;
2559
2575
  nextSourcePosition = position + matched.length;
2560
2576
  }
2561
2577
  }
2562
- return accumulatedResult + stringSlice$2(S, nextSourcePosition);
2578
+ return accumulatedResult + stringSlice$3(S, nextSourcePosition);
2563
2579
  }
2564
2580
  ];
2565
2581
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
@@ -2619,16 +2635,18 @@ const hasEuCustomsRules = true,
2619
2635
  // United States territories that ship domestic but require customs
2620
2636
  // https://blog.stamps.com/2015/09/23/how-to-ship-packages-to-u-s-territories/
2621
2637
  isUnitedStatesTerritory$1 = true,
2638
+ isUnsupportedByUps$1 = true,
2622
2639
  supportsByoa = true;
2623
2640
  class Country {
2624
2641
  constructor(name, code, rules = {}) {
2625
- var _a, _b, _c, _d;
2642
+ var _a, _b, _c, _d, _e;
2626
2643
  this.name = name;
2627
2644
  this.code = code;
2628
2645
  this.hasEuCustomsRules = (_a = rules.hasEuCustomsRules) !== null && _a !== void 0 ? _a : false;
2629
2646
  this.hasProvinces = (_b = rules.hasProvinces) !== null && _b !== void 0 ? _b : false;
2630
2647
  this.isUnitedStatesTerritory = (_c = rules.isUnitedStatesTerritory) !== null && _c !== void 0 ? _c : false;
2631
2648
  this.supportsByoa = (_d = rules.supportsByoa) !== null && _d !== void 0 ? _d : false;
2649
+ this.isUnsupportedByUps = (_e = rules.isUnsupportedByUps) !== null && _e !== void 0 ? _e : false;
2632
2650
  }
2633
2651
  }
2634
2652
  const countries = [new Country("Afghanistan", "AF"), new Country("Aland Islands", "AX"), new Country("Albania", "AL"), new Country("Algeria", "DZ"), new Country("American Samoa", "AS", {
@@ -2649,7 +2667,9 @@ const countries = [new Country("Afghanistan", "AF"), new Country("Aland Islands"
2649
2667
  supportsByoa
2650
2668
  }), new Country("Burkina Faso", "BF"), new Country("Burundi", "BI"), new Country("Canada", "CA", {
2651
2669
  hasProvinces
2652
- }), new Country("Cambodia", "KH"), new Country("Cameroon", "CM"), new Country("Cape Verde Islands", "CV"), new Country("Cayman Islands", "KY"), new Country("Central African Republic", "CF"), new Country("Chad", "TD"), new Country("Chile", "CL"), new Country("China", "CN"), new Country("Christmas Island", "CX"), new Country("Cocos(Keeling) Islands", "CC"), new Country("Colombia", "CO"), new Country("Comoros", "KM"), new Country("Congo", "CG"), new Country("Congo, The Democratic Republic of", "CD"), new Country("Cook Islands", "CK"), new Country("Costa Rica", "CR"), new Country("Croatia", "HR", {
2670
+ }), new Country("Cambodia", "KH", {
2671
+ isUnsupportedByUps: isUnsupportedByUps$1
2672
+ }), new Country("Cameroon", "CM"), new Country("Cape Verde Islands", "CV"), new Country("Cayman Islands", "KY"), new Country("Central African Republic", "CF"), new Country("Chad", "TD"), new Country("Chile", "CL"), new Country("China", "CN"), new Country("Christmas Island", "CX"), new Country("Cocos(Keeling) Islands", "CC"), new Country("Colombia", "CO"), new Country("Comoros", "KM"), new Country("Congo", "CG"), new Country("Congo, The Democratic Republic of", "CD"), new Country("Cook Islands", "CK"), new Country("Costa Rica", "CR"), new Country("Croatia", "HR", {
2653
2673
  hasEuCustomsRules,
2654
2674
  supportsByoa
2655
2675
  }), new Country("Cuba", "CU"), new Country("Curacao", "CW"), new Country("Cyprus", "CY", {
@@ -2710,7 +2730,9 @@ const countries = [new Country("Afghanistan", "AF"), new Country("Aland Islands"
2710
2730
  }), new Country("Moldova", "MD"), new Country("Monaco", "MC"), new Country("Mongolia", "MN"), new Country("Montenegro", "ME"), new Country("Montserrat", "MS"), new Country("Morocco", "MA"), new Country("Mozambique", "MZ"), new Country("Myanmar", "MM"), new Country("Namibia", "NA"), new Country("Nauru", "NR"), new Country("Nepal", "NP"), new Country("Netherlands", "NL", {
2711
2731
  hasEuCustomsRules,
2712
2732
  supportsByoa
2713
- }), new Country("Netherlands Antilles", "AN"), new Country("New Caledonia", "NC"), new Country("New Zealand", "NZ", {
2733
+ }), new Country("Netherlands Antilles", "AN"), new Country("New Caledonia", "NC", {
2734
+ isUnsupportedByUps: isUnsupportedByUps$1
2735
+ }), new Country("New Zealand", "NZ", {
2714
2736
  supportsByoa
2715
2737
  }), new Country("Nicaragua", "NI"), new Country("Niger", "NE"), new Country("Nigeria", "NG"), new Country("Niue", "NU"), new Country("Norfolk Island", "NF"), new Country("North Korea", "KP"), new Country("Northern Mariana Islands", "MP", {
2716
2738
  isUnitedStatesTerritory: isUnitedStatesTerritory$1
@@ -2827,6 +2849,13 @@ const isUnitedStatesTerritory = address => {
2827
2849
  var _a, _b;
2828
2850
  return !!(((_a = countries.find(c => c.code === address.countryCode)) === null || _a === void 0 ? void 0 : _a.isUnitedStatesTerritory) || ((_b = usStates.find(s => s.code === address.stateProvince)) === null || _b === void 0 ? void 0 : _b.isUnitedStatesTerritory));
2829
2851
  };
2852
+ /**
2853
+ * @category Utilities
2854
+ */
2855
+ const isUnsupportedByUps = address => {
2856
+ var _a;
2857
+ return !!((_a = countries.find(c => c.code === address.countryCode)) === null || _a === void 0 ? void 0 : _a.isUnsupportedByUps);
2858
+ };
2830
2859
  const PO_BOX_REGEX =
2831
2860
  // eslint-disable-next-line no-useless-escape
2832
2861
  /^(((p[\s\.\'\,]?[o\s][\.\'\,]?)\s?)|(post\s?office\s?))((box|bin|bo|b\.?)?\s?(num|number|#)?\s?\d+)/i;
@@ -2839,7 +2868,7 @@ const isPoBox = addressLine => PO_BOX_REGEX.test(addressLine);
2839
2868
  */
2840
2869
  const isPoBoxAddress = address => !!(isPoBox(address.addressLine1) || address.addressLine2 && isPoBox(address.addressLine2));
2841
2870
 
2842
- var $$e = _export;
2871
+ var $$f = _export;
2843
2872
  var $includes = arrayIncludes.includes;
2844
2873
  var fails$7 = fails$q;
2845
2874
  var addToUnscopables$1 = addToUnscopables$3;
@@ -2851,7 +2880,7 @@ var BROKEN_ON_SPARSE = fails$7(function () {
2851
2880
 
2852
2881
  // `Array.prototype.includes` method
2853
2882
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2854
- $$e({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2883
+ $$f({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2855
2884
  includes: function includes(el /* , fromIndex = 0 */) {
2856
2885
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2857
2886
  }
@@ -2862,6 +2891,7 @@ addToUnscopables$1('includes');
2862
2891
 
2863
2892
  const USPS_CARRIER_CODES = ["usps", "stamps_com"];
2864
2893
  const isUspsCarrier = carrierCode => USPS_CARRIER_CODES.includes(carrierCode);
2894
+ const isUpsCarrier = carrierCode => carrierCode === "ups";
2865
2895
 
2866
2896
  function convertDimensions(dimensions, {
2867
2897
  allowAllZeroes
@@ -2926,10 +2956,10 @@ const getSalesOrderItemsFromSalesOrderOrShipment = ({
2926
2956
 
2927
2957
  var tryToString$3 = tryToString$5;
2928
2958
 
2929
- var $TypeError$8 = TypeError;
2959
+ var $TypeError$9 = TypeError;
2930
2960
 
2931
2961
  var deletePropertyOrThrow$1 = function (O, P) {
2932
- if (!delete O[P]) throw $TypeError$8('Cannot delete property ' + tryToString$3(P) + ' of ' + tryToString$3(O));
2962
+ if (!delete O[P]) throw $TypeError$9('Cannot delete property ' + tryToString$3(P) + ' of ' + tryToString$3(O));
2933
2963
  };
2934
2964
 
2935
2965
  var toPropertyKey = toPropertyKey$3;
@@ -2947,13 +2977,13 @@ var lengthOfArrayLike$4 = lengthOfArrayLike$7;
2947
2977
  var createProperty$1 = createProperty$2;
2948
2978
 
2949
2979
  var $Array$1 = Array;
2950
- var max = Math.max;
2980
+ var max$1 = Math.max;
2951
2981
 
2952
2982
  var arraySliceSimple = function (O, start, end) {
2953
2983
  var length = lengthOfArrayLike$4(O);
2954
2984
  var k = toAbsoluteIndex(start, length);
2955
2985
  var fin = toAbsoluteIndex(end === undefined ? length : end, length);
2956
- var result = $Array$1(max(fin - k, 0));
2986
+ var result = $Array$1(max$1(fin - k, 0));
2957
2987
  for (var n = 0; k < fin; k++, n++) createProperty$1(result, n, O[k]);
2958
2988
  result.length = n;
2959
2989
  return result;
@@ -3020,13 +3050,13 @@ var webkit = userAgent$3.match(/AppleWebKit\/(\d+)\./);
3020
3050
 
3021
3051
  var engineWebkitVersion = !!webkit && +webkit[1];
3022
3052
 
3023
- var $$d = _export;
3024
- var uncurryThis$9 = functionUncurryThis;
3053
+ var $$e = _export;
3054
+ var uncurryThis$a = functionUncurryThis;
3025
3055
  var aCallable$7 = aCallable$a;
3026
3056
  var toObject$1 = toObject$7;
3027
3057
  var lengthOfArrayLike$3 = lengthOfArrayLike$7;
3028
3058
  var deletePropertyOrThrow = deletePropertyOrThrow$1;
3029
- var toString$6 = toString$b;
3059
+ var toString$7 = toString$c;
3030
3060
  var fails$6 = fails$q;
3031
3061
  var internalSort = arraySort;
3032
3062
  var arrayMethodIsStrict = arrayMethodIsStrict$2;
@@ -3036,8 +3066,8 @@ var V8 = engineV8Version;
3036
3066
  var WEBKIT = engineWebkitVersion;
3037
3067
 
3038
3068
  var test = [];
3039
- var nativeSort = uncurryThis$9(test.sort);
3040
- var push = uncurryThis$9(test.push);
3069
+ var nativeSort = uncurryThis$a(test.sort);
3070
+ var push = uncurryThis$a(test.push);
3041
3071
 
3042
3072
  // IE8-
3043
3073
  var FAILS_ON_UNDEFINED = fails$6(function () {
@@ -3092,13 +3122,13 @@ var getSortCompare = function (comparefn) {
3092
3122
  if (y === undefined) return -1;
3093
3123
  if (x === undefined) return 1;
3094
3124
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
3095
- return toString$6(x) > toString$6(y) ? 1 : -1;
3125
+ return toString$7(x) > toString$7(y) ? 1 : -1;
3096
3126
  };
3097
3127
  };
3098
3128
 
3099
3129
  // `Array.prototype.sort` method
3100
3130
  // https://tc39.es/ecma262/#sec-array.prototype.sort
3101
- $$d({ target: 'Array', proto: true, forced: FORCED$3 }, {
3131
+ $$e({ target: 'Array', proto: true, forced: FORCED$3 }, {
3102
3132
  sort: function sort(comparefn) {
3103
3133
  if (comparefn !== undefined) aCallable$7(comparefn);
3104
3134
 
@@ -3176,9 +3206,9 @@ function formatFractionalWeight(weight) {
3176
3206
 
3177
3207
  var isObject$3 = isObject$a;
3178
3208
  var classof$3 = classofRaw$2;
3179
- var wellKnownSymbol$8 = wellKnownSymbol$j;
3209
+ var wellKnownSymbol$9 = wellKnownSymbol$k;
3180
3210
 
3181
- var MATCH$1 = wellKnownSymbol$8('match');
3211
+ var MATCH$1 = wellKnownSymbol$9('match');
3182
3212
 
3183
3213
  // `IsRegExp` abstract operation
3184
3214
  // https://tc39.es/ecma262/#sec-isregexp
@@ -3187,19 +3217,19 @@ var isRegexp = function (it) {
3187
3217
  return isObject$3(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$3(it) == 'RegExp');
3188
3218
  };
3189
3219
 
3190
- var isRegExp = isRegexp;
3220
+ var isRegExp$1 = isRegexp;
3191
3221
 
3192
- var $TypeError$7 = TypeError;
3222
+ var $TypeError$8 = TypeError;
3193
3223
 
3194
3224
  var notARegexp = function (it) {
3195
- if (isRegExp(it)) {
3196
- throw $TypeError$7("The method doesn't accept regular expressions");
3225
+ if (isRegExp$1(it)) {
3226
+ throw $TypeError$8("The method doesn't accept regular expressions");
3197
3227
  } return it;
3198
3228
  };
3199
3229
 
3200
- var wellKnownSymbol$7 = wellKnownSymbol$j;
3230
+ var wellKnownSymbol$8 = wellKnownSymbol$k;
3201
3231
 
3202
- var MATCH = wellKnownSymbol$7('match');
3232
+ var MATCH = wellKnownSymbol$8('match');
3203
3233
 
3204
3234
  var correctIsRegexpLogic = function (METHOD_NAME) {
3205
3235
  var regexp = /./;
@@ -3213,22 +3243,22 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
3213
3243
  } return false;
3214
3244
  };
3215
3245
 
3216
- var $$c = _export;
3217
- var uncurryThis$8 = functionUncurryThis;
3246
+ var $$d = _export;
3247
+ var uncurryThis$9 = functionUncurryThis;
3218
3248
  var notARegExp = notARegexp;
3219
- var requireObjectCoercible$2 = requireObjectCoercible$8;
3220
- var toString$5 = toString$b;
3249
+ var requireObjectCoercible$3 = requireObjectCoercible$9;
3250
+ var toString$6 = toString$c;
3221
3251
  var correctIsRegExpLogic = correctIsRegexpLogic;
3222
3252
 
3223
- var stringIndexOf = uncurryThis$8(''.indexOf);
3253
+ var stringIndexOf$1 = uncurryThis$9(''.indexOf);
3224
3254
 
3225
3255
  // `String.prototype.includes` method
3226
3256
  // https://tc39.es/ecma262/#sec-string.prototype.includes
3227
- $$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3257
+ $$d({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3228
3258
  includes: function includes(searchString /* , position = 0 */) {
3229
- return !!~stringIndexOf(
3230
- toString$5(requireObjectCoercible$2(this)),
3231
- toString$5(notARegExp(searchString)),
3259
+ return !!~stringIndexOf$1(
3260
+ toString$6(requireObjectCoercible$3(this)),
3261
+ toString$6(notARegExp(searchString)),
3232
3262
  arguments.length > 1 ? arguments[1] : undefined
3233
3263
  );
3234
3264
  }
@@ -3547,6 +3577,16 @@ const CheckboxInput = _a => {
3547
3577
  };
3548
3578
 
3549
3579
  const getOverrideStyles = theme => ({
3580
+ "&& .react-datepicker__aria-live": {
3581
+ // Hide aria alerts that are for screen readers in a way screen readers can still read them
3582
+ clip: "rect(0 0 0 0)",
3583
+ clipPath: "inset(50%)",
3584
+ height: "1px",
3585
+ overflow: "hidden",
3586
+ position: "absolute",
3587
+ whiteSpace: "nowrap",
3588
+ width: "1px"
3589
+ },
3550
3590
  "&& input, && span[role='button']": {
3551
3591
  cursor: "auto",
3552
3592
  fontWeight: theme.typography.fontWeight.normal
@@ -3594,6 +3634,130 @@ const CreditCardInput = fieldProps => jsxRuntime.jsx(CreditCardInputController,
3594
3634
  }
3595
3635
  }));
3596
3636
 
3637
+ var call$9 = functionCall;
3638
+ var hasOwn$2 = hasOwnProperty_1;
3639
+ var isPrototypeOf$3 = objectIsPrototypeOf;
3640
+ var regExpFlags = regexpFlags$1;
3641
+
3642
+ var RegExpPrototype$1 = RegExp.prototype;
3643
+
3644
+ var regexpGetFlags = function (R) {
3645
+ var flags = R.flags;
3646
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$2(R, 'flags') && isPrototypeOf$3(RegExpPrototype$1, R)
3647
+ ? call$9(regExpFlags, R) : flags;
3648
+ };
3649
+
3650
+ var $$c = _export;
3651
+ var call$8 = functionCall;
3652
+ var uncurryThis$8 = functionUncurryThis;
3653
+ var requireObjectCoercible$2 = requireObjectCoercible$9;
3654
+ var isCallable$6 = isCallable$o;
3655
+ var isNullOrUndefined$3 = isNullOrUndefined$7;
3656
+ var isRegExp = isRegexp;
3657
+ var toString$5 = toString$c;
3658
+ var getMethod$3 = getMethod$6;
3659
+ var getRegExpFlags$1 = regexpGetFlags;
3660
+ var getSubstitution = getSubstitution$2;
3661
+ var wellKnownSymbol$7 = wellKnownSymbol$k;
3662
+
3663
+ var REPLACE = wellKnownSymbol$7('replace');
3664
+ var $TypeError$7 = TypeError;
3665
+ var indexOf = uncurryThis$8(''.indexOf);
3666
+ uncurryThis$8(''.replace);
3667
+ var stringSlice$2 = uncurryThis$8(''.slice);
3668
+ var max = Math.max;
3669
+
3670
+ var stringIndexOf = function (string, searchValue, fromIndex) {
3671
+ if (fromIndex > string.length) return -1;
3672
+ if (searchValue === '') return fromIndex;
3673
+ return indexOf(string, searchValue, fromIndex);
3674
+ };
3675
+
3676
+ // `String.prototype.replaceAll` method
3677
+ // https://tc39.es/ecma262/#sec-string.prototype.replaceall
3678
+ $$c({ target: 'String', proto: true }, {
3679
+ replaceAll: function replaceAll(searchValue, replaceValue) {
3680
+ var O = requireObjectCoercible$2(this);
3681
+ var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
3682
+ var position = 0;
3683
+ var endOfLastMatch = 0;
3684
+ var result = '';
3685
+ if (!isNullOrUndefined$3(searchValue)) {
3686
+ IS_REG_EXP = isRegExp(searchValue);
3687
+ if (IS_REG_EXP) {
3688
+ flags = toString$5(requireObjectCoercible$2(getRegExpFlags$1(searchValue)));
3689
+ if (!~indexOf(flags, 'g')) throw $TypeError$7('`.replaceAll` does not allow non-global regexes');
3690
+ }
3691
+ replacer = getMethod$3(searchValue, REPLACE);
3692
+ if (replacer) {
3693
+ return call$8(replacer, searchValue, O, replaceValue);
3694
+ }
3695
+ }
3696
+ string = toString$5(O);
3697
+ searchString = toString$5(searchValue);
3698
+ functionalReplace = isCallable$6(replaceValue);
3699
+ if (!functionalReplace) replaceValue = toString$5(replaceValue);
3700
+ searchLength = searchString.length;
3701
+ advanceBy = max(1, searchLength);
3702
+ position = stringIndexOf(string, searchString, 0);
3703
+ while (position !== -1) {
3704
+ replacement = functionalReplace
3705
+ ? toString$5(replaceValue(searchString, position, string))
3706
+ : getSubstitution(searchString, string, position, [], undefined, replaceValue);
3707
+ result += stringSlice$2(string, endOfLastMatch, position) + replacement;
3708
+ endOfLastMatch = position + searchLength;
3709
+ position = stringIndexOf(string, searchString, position + advanceBy);
3710
+ }
3711
+ if (endOfLastMatch < string.length) {
3712
+ result += stringSlice$2(string, endOfLastMatch);
3713
+ }
3714
+ return result;
3715
+ }
3716
+ });
3717
+
3718
+ let _LOCALE = navigator.language;
3719
+ const loadableLocale = _LOCALE.replaceAll("-", "");
3720
+ const loadableBackupLocale = _LOCALE.split("-")[0];
3721
+ let intlLocale = undefined;
3722
+ if (loadableLocale in Locales__namespace || loadableBackupLocale) {
3723
+ const targetLocale = loadableLocale in Locales__namespace ? loadableLocale : loadableBackupLocale;
3724
+ const l = Locales__namespace[targetLocale];
3725
+ ReactDatePicker.registerLocale(_LOCALE, l);
3726
+ intlLocale = l;
3727
+ ReactDatePicker.setDefaultLocale(_LOCALE);
3728
+ } else {
3729
+ // Really should never happen but this SHOULD revert to un-localized
3730
+ console.log(`User's navigator.language locale ${_LOCALE} could not be loaded because it was not found in date-fns.
3731
+ Backup attempt to load ${loadableBackupLocale} failed as well.
3732
+ Reverting to en-US.`);
3733
+ _LOCALE = "en-US";
3734
+ }
3735
+ const usaLocale = Locales__namespace["enUS"];
3736
+ const LOCALE = _LOCALE;
3737
+ /**
3738
+ * Parse a string in the CURRENT locale into a Date object.
3739
+ * current locale is determined by navigator.language for now
3740
+ * @param dateString
3741
+ */
3742
+ const parseLocaleDate = dateString => dateString ? dateFns.parse(dateString, "P", new Date(), intlLocale ? {
3743
+ locale: intlLocale
3744
+ } : undefined) : null;
3745
+ const parseUSADate = dateString => dateString ? dateFns.parse(dateString, "P", new Date(), {
3746
+ locale: usaLocale
3747
+ }) : null;
3748
+ /**
3749
+ *
3750
+ * Format a date into a string in the CURRENT locale.
3751
+ * current locale is determined by navigator.language for now
3752
+ * @param date
3753
+ */
3754
+ const formatLocaleDate = date => date ? dateFns.format(date, "P", {
3755
+ locale: intlLocale
3756
+ }) : null;
3757
+ const formatUSADate = date => date ? dateFns.format(date, "P", {
3758
+ locale: usaLocale
3759
+ }) : null;
3760
+
3597
3761
  function _EMOTION_STRINGIFIED_CSS_ERROR__$4() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3598
3762
  const getPopperStyles = theme => /*#__PURE__*/css.css("padding-top:10px;z-index:10;.react-datepicker{background-color:", theme.palette.white, ";border-radius:0.25rem;box-shadow:", theme.getElevation("above").boxShadow, ";display:inline-block;font-size:1rem;position:relative;&__month-container{float:left;}&__header{border-top-left-radius:", theme.borderRadius.M, ";border-top-right-radius:", theme.borderRadius.M, ";padding:", theme.spacing(2), "px 0 ", theme.spacing(1), "px 0;position:relative;text-align:center;}&__current-month{color:", theme.palette.black, ";font-size:1rem;font-weight:600;line-height:1.25rem;margin-bottom:", theme.spacing(2), "px;}&__navigation{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:32px;justify-content:center;overflow:hidden;position:absolute;text-align:center;text-indent:-999em;top:0.688rem;width:32px;z-index:1;&--previous{left:1rem;}&--next{right:1rem;}&:hover *::before{border-color:", theme.palette.gray.light, ";}&-icon{position:relative;top:-0.125rem;width:0;&::before{border-color:", theme.palette.gray.main, ";border-style:solid;border-width:2.5px 2.5px 0 0;content:\"\";display:block;height:6px;position:absolute;top:6px;width:6px;}&--previous{right:0rem;&::before{right:-0.438rem;transform:rotate(225deg);}}&--next{left:0rem;&::before{left:-0.438rem;transform:rotate(45deg);}}}} &__month{padding:0 1rem 1rem 1rem;text-align:center;}&__week{white-space:nowrap;} &__day{color:", theme.palette.black, ";cursor:pointer;display:inline-block;font-size:1rem;line-height:2rem;margin:0.25rem;text-align:center;width:2rem;&:hover[aria-selected=\"false\"]:not(&--disabled){background-color:", theme.palette.gray.ultraLight, ";border-radius:0.25rem;}&-name{color:", theme.palette.gray.main, ";display:inline-block;font-size:0.75rem;font-weight:600;line-height:1rem;margin:0 0.25rem;text-align:center;width:2rem;}&-names{white-space:nowrap;}&--disabled{color:", theme.palette.gray.main, ";cursor:default;&:hover{background-color:transparent;}}&--today[aria-selected=\"false\"]{position:relative;&::before{border-bottom:0.125rem solid ", theme.palette.primary.main, ";content:\"\";display:block;inset:0;position:absolute;}}&--highlighted{background-color:#3dcc4a;border-radius:0.25rem;color:#fff;&:hover{background-color:", theme.palette.secondary.main, ";}&-custom-1{color:magenta;}&-custom-2{color:green;}}&--selected,&--in-selecting-range,&--in-range{background-color:", theme.palette.primary.main, ";border-radius:0.25rem;color:#fff;&[aria-selected=\"true\"]{cursor:default;}&[aria-selected=\"false\"]:hover{background-color:", theme.palette.primary.dark, ";}}&--in-selecting-range:not(&--in-range){background-color:rgba(33, 107, 165, 0.5);}&--keyboard-selected{border-radius:0.25rem;outline:0.125rem solid ", theme.palette.primary.main, ";} &--selected:not(&--keyboard-selected):focus-visible{outline:0.125rem solid ", theme.palette.primary.main, ";}} &__input-container{display:inline-block;position:relative;width:100%;}}" + (process.env.NODE_ENV === "production" ? "" : ";label:getPopperStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRhdGUtcGlja2VyLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDOEMiLCJmaWxlIjoiZGF0ZS1waWNrZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL2Nzc1wiO1xyXG5leHBvcnQgY29uc3QgZ2V0UG9wcGVyU3R5bGVzID0gKHRoZW1lKSA9PiBjc3MgYFxuICBwYWRkaW5nLXRvcDogMTBweDtcbiAgei1pbmRleDogMTA7XG4gIC5yZWFjdC1kYXRlcGlja2VyIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAke3RoZW1lLnBhbGV0dGUud2hpdGV9O1xuICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgYm94LXNoYWRvdzogJHt0aGVtZS5nZXRFbGV2YXRpb24oXCJhYm92ZVwiKS5ib3hTaGFkb3d9O1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBmb250LXNpemU6IDFyZW07XG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICZfX21vbnRoLWNvbnRhaW5lciB7XG4gICAgICBmbG9hdDogbGVmdDtcbiAgICB9XG4gICAgJl9faGVhZGVyIHtcbiAgICAgIGJvcmRlci10b3AtbGVmdC1yYWRpdXM6ICR7dGhlbWUuYm9yZGVyUmFkaXVzLk19O1xuICAgICAgYm9yZGVyLXRvcC1yaWdodC1yYWRpdXM6ICR7dGhlbWUuYm9yZGVyUmFkaXVzLk19O1xuICAgICAgcGFkZGluZzogJHt0aGVtZS5zcGFjaW5nKDIpfXB4IDAgJHt0aGVtZS5zcGFjaW5nKDEpfXB4IDA7XG4gICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgfVxuICAgICZfX2N1cnJlbnQtbW9udGgge1xuICAgICAgY29sb3I6ICR7dGhlbWUucGFsZXR0ZS5ibGFja307XG4gICAgICBmb250LXNpemU6IDFyZW07XG4gICAgICBmb250LXdlaWdodDogNjAwO1xuICAgICAgbGluZS1oZWlnaHQ6IDEuMjVyZW07XG4gICAgICBtYXJnaW4tYm90dG9tOiAke3RoZW1lLnNwYWNpbmcoMil9cHg7XG4gICAgfVxuICAgICZfX25hdmlnYXRpb24ge1xuICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgIGJhY2tncm91bmQ6IG5vbmU7XG4gICAgICBib3JkZXI6IG5vbmU7XG4gICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgaGVpZ2h0OiAzMnB4O1xuICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgICAgdGV4dC1pbmRlbnQ6IC05OTllbTtcbiAgICAgIHRvcDogMC42ODhyZW07XG4gICAgICB3aWR0aDogMzJweDtcbiAgICAgIHotaW5kZXg6IDE7XG4gICAgICAmLS1wcmV2aW91cyB7XG4gICAgICAgIGxlZnQ6IDFyZW07XG4gICAgICB9XG4gICAgICAmLS1uZXh0IHtcbiAgICAgICAgcmlnaHQ6IDFyZW07XG4gICAgICB9XG4gICAgICAmOmhvdmVyICo6OmJlZm9yZSB7XG4gICAgICAgIGJvcmRlci1jb2xvcjogJHt0aGVtZS5wYWxldHRlLmdyYXkubGlnaHR9O1xuICAgICAgfVxuICAgICAgJi1pY29uIHtcbiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICB0b3A6IC0wLjEyNXJlbTtcbiAgICAgICAgd2lkdGg6IDA7XG4gICAgICAgICY6OmJlZm9yZSB7XG4gICAgICAgICAgYm9yZGVyLWNvbG9yOiAke3RoZW1lLnBhbGV0dGUuZ3JheS5tYWlufTtcbiAgICAgICAgICBib3JkZXItc3R5bGU6IHNvbGlkO1xuICAgICAgICAgIGJvcmRlci13aWR0aDogMi41cHggMi41cHggMCAwO1xuICAgICAgICAgIGNvbnRlbnQ6IFwiXCI7XG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgaGVpZ2h0OiA2cHg7XG4gICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgIHRvcDogNnB4O1xuICAgICAgICAgIHdpZHRoOiA2cHg7XG4gICAgICAgIH1cbiAgICAgICAgJi0tcHJldmlvdXMge1xuICAgICAgICAgIHJpZ2h0OiAwcmVtO1xuICAgICAgICAgICY6OmJlZm9yZSB7XG4gICAgICAgICAgICByaWdodDogLTAuNDM4cmVtO1xuICAgICAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMjI1ZGVnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgJi0tbmV4dCB7XG4gICAgICAgICAgbGVmdDogMHJlbTtcbiAgICAgICAgICAmOjpiZWZvcmUge1xuICAgICAgICAgICAgbGVmdDogLTAuNDM4cmVtO1xuICAgICAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoNDVkZWcpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICAkeyAvKiAjZW5kcmVnaW9uICovXCJcIn1cbiAgICAmX19tb250aCB7XG4gICAgICBwYWRkaW5nOiAwIDFyZW0gMXJlbSAxcmVtO1xuICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIH1cbiAgICAmX193ZWVrIHtcbiAgICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gICAgfVxuICAgICR7IC8qICNyZWdpb24gWyByZ2JhKDEyMCw1MCwxNTAsMC4xKSBdIERheXMgKi9cIlwifVxuICAgICZfX2RheSB7XG4gICAgICBjb2xvcjogJHt0aGVtZS5wYWxldHRlLmJsYWNrfTtcbiAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgIGZvbnQtc2l6ZTogMXJlbTtcbiAgICAgIGxpbmUtaGVpZ2h0OiAycmVtO1xuICAgICAgbWFyZ2luOiAwLjI1cmVtO1xuICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgICAgd2lkdGg6IDJyZW07XG4gICAgICAmOmhvdmVyW2FyaWEtc2VsZWN0ZWQ9XCJmYWxzZVwiXTpub3QoJi0tZGlzYWJsZWQpIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHt0aGVtZS5wYWxldHRlLmdyYXkudWx0cmFMaWdodH07XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgICB9XG4gICAgICAmLW5hbWUge1xuICAgICAgICBjb2xvcjogJHt0aGVtZS5wYWxldHRlLmdyYXkubWFpbn07XG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgICAgZm9udC1zaXplOiAwLjc1cmVtO1xuICAgICAgICBmb250LXdlaWdodDogNjAwO1xuICAgICAgICBsaW5lLWhlaWdodDogMXJlbTtcbiAgICAgICAgbWFyZ2luOiAwIDAuMjVyZW07XG4gICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICAgICAgd2lkdGg6IDJyZW07XG4gICAgICB9XG4gICAgICAmLW5hbWVzIHtcbiAgICAgICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgICAgIH1cbiAgICAgICYtLWRpc2FibGVkIHtcbiAgICAgICAgY29sb3I6ICR7dGhlbWUucGFsZXR0ZS5ncmF5Lm1haW59O1xuICAgICAgICBjdXJzb3I6IGRlZmF1bHQ7XG4gICAgICAgICY6aG92ZXIge1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAmLS10b2RheVthcmlhLXNlbGVjdGVkPVwiZmFsc2VcIl0ge1xuICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICY6OmJlZm9yZSB7XG4gICAgICAgICAgYm9yZGVyLWJvdHRvbTogMC4xMjVyZW0gc29saWQgJHt0aGVtZS5wYWxldHRlLnByaW1hcnkubWFpbn07XG4gICAgICAgICAgY29udGVudDogXCJcIjtcbiAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICBpbnNldDogMDtcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgICYtLWhpZ2hsaWdodGVkIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzNkY2M0YTtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgICAgICAgY29sb3I6ICNmZmY7XG4gICAgICAgICY6aG92ZXIge1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7dGhlbWUucGFsZXR0ZS5zZWNvbmRhcnkubWFpbn07XG4gICAgICAgIH1cbiAgICAgICAgJi1jdXN0b20tMSB7XG4gICAgICAgICAgY29sb3I6IG1hZ2VudGE7XG4gICAgICAgIH1cbiAgICAgICAgJi1jdXN0b20tMiB7XG4gICAgICAgICAgY29sb3I6IGdyZWVuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAmLS1zZWxlY3RlZCxcbiAgICAgICYtLWluLXNlbGVjdGluZy1yYW5nZSxcbiAgICAgICYtLWluLXJhbmdlIHtcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHt0aGVtZS5wYWxldHRlLnByaW1hcnkubWFpbn07XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgICAgIGNvbG9yOiAjZmZmO1xuICAgICAgICAmW2FyaWEtc2VsZWN0ZWQ9XCJ0cnVlXCJdIHtcbiAgICAgICAgICBjdXJzb3I6IGRlZmF1bHQ7XG4gICAgICAgIH1cbiAgICAgICAgJlthcmlhLXNlbGVjdGVkPVwiZmFsc2VcIl06aG92ZXIge1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7dGhlbWUucGFsZXR0ZS5wcmltYXJ5LmRhcmt9O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICAmLS1pbi1zZWxlY3RpbmctcmFuZ2U6bm90KCYtLWluLXJhbmdlKSB7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMzMsIDEwNywgMTY1LCAwLjUpO1xuICAgICAgfVxuICAgICAgJi0ta2V5Ym9hcmQtc2VsZWN0ZWQge1xuICAgICAgICBib3JkZXItcmFkaXVzOiAwLjI1cmVtO1xuICAgICAgICBvdXRsaW5lOiAwLjEyNXJlbSBzb2xpZCAke3RoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWlufTtcbiAgICAgIH1cbiAgICAgICR7XHJcbi8qIFJEUCBkb2Vzbid0IGF0dGFjaCB0aGUgLS1rZXlib2FyZC1zZWxlY3RlZCBjbGFzcyBpZiB5b3UgYXJyb3ctbmF2aWdhdGUgdG8gdGhlIGN1cnJlbnRseVxyXG4gICAgIHNlbGVjdGVkIGRhdGUsIHdoaWNoIHdvdWxkIHJlc3VsdCBpbiBhIGRlZmF1bHQgYnJvd3NlciBmb2N1cy1yaW5nICovIFwiXCJ9XG4gICAgICAmLS1zZWxlY3RlZDpub3QoJi0ta2V5Ym9hcmQtc2VsZWN0ZWQpOmZvY3VzLXZpc2libGUge1xuICAgICAgICBvdXRsaW5lOiAwLjEyNXJlbSBzb2xpZCAke3RoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWlufTtcbiAgICAgIH1cbiAgICB9XG4gICAgJHsgLyogI2VuZHJlZ2lvbiAqL1wiXCJ9XG4gICAgJl9faW5wdXQtY29udGFpbmVyIHtcbiAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgIH1cbiAgfVxuYDtcclxuZXhwb3J0IGNvbnN0IGdldFdyYXBwZXJTdHlsZXMgPSAodGhlbWUpID0+IGNzcyBgXG4gIGJvcmRlcjogMDtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBwYWRkaW5nOiAwO1xuICB3aWR0aDogMTAwJTtcbiAgei1pbmRleDogMjAwO1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGF0ZS1waWNrZXIuc3R5bGVzLmpzLm1hcCJdfQ== */");
3599
3763
  const getWrapperStyles = theme => /*#__PURE__*/css.css(process.env.NODE_ENV === "production" ? {
@@ -3612,28 +3776,43 @@ const DatePicker = fieldProps => {
3612
3776
  const datePickerRef = React.useRef(null);
3613
3777
  return jsxRuntime.jsx(DatePickerController, Object.assign({}, fieldProps, {
3614
3778
  children: _a => {
3615
- var {
3616
- ref
3617
- } = _a,
3618
- datePickerProps = __rest(_a, ["ref"]);
3779
+ var _datePickerProps = __rest(_a, ["ref"]);
3780
+ // Lens the form's usa date string into a locale date string
3781
+ // for the now localized date picker
3782
+ const onChange = date => {
3783
+ var _a;
3784
+ (_a = _datePickerProps.onChange) === null || _a === void 0 ? void 0 : _a.call(_datePickerProps, formatUSADate(parseLocaleDate(date)));
3785
+ };
3786
+ const value = formatLocaleDate(parseUSADate(_datePickerProps.value));
3787
+ const datePickerProps = Object.assign(Object.assign({}, _datePickerProps), {
3788
+ onChange,
3789
+ value
3790
+ });
3619
3791
  return jsxRuntime.jsx("div", Object.assign({
3620
- css: getOverrideStyles
3792
+ css: getOverrideStyles(theme)
3621
3793
  }, {
3622
- children: jsxRuntime.jsx(ReactDatePicker__default["default"], Object.assign({}, datePickerProps, {
3623
- customInput: /*#__PURE__*/React.createElement(function InputWrapper(_a) {
3794
+ children: jsxRuntime.jsx(ReactDatePicker__default["default"], Object.assign({
3795
+ locale: LOCALE
3796
+ }, datePickerProps, {
3797
+ customInput: /*#__PURE__*/React.createElement( /*#__PURE__*/React.forwardRef(function InputWrapper(_a, forwardedRef) {
3624
3798
  var _b;
3625
3799
  var {
3626
3800
  value
3627
3801
  } = _a,
3628
- props = __rest(_a, ["value"]);
3629
- const innerRef = React.useRef(null);
3630
- const refInterceptor = React.useCallback(node => {
3631
- ref(node);
3632
- innerRef.current = node;
3633
- }, []);
3634
- const isFocused = (_b = innerRef === null || innerRef === void 0 ? void 0 : innerRef.current) === null || _b === void 0 ? void 0 : _b.contains(document.activeElement);
3635
- return jsxRuntime.jsx(giger.Input, Object.assign({}, props, {
3636
- ref: refInterceptor,
3802
+ inputProps = __rest(_a, ["value"]);
3803
+ if (typeof forwardedRef !== "function") throw new Error("DatePicker requires a callback-ref and should always be passing one (this should never happen)");
3804
+ // The forwarded ref that RDP supplies is a callback ref; we need a *mutable* ref in order to check if the DOM element is focused
3805
+ const mutableRef = React.useRef(null);
3806
+ // We wrap RDP's forwarded ref in order to setup our own mutable ref
3807
+ const callbackRef = React.useCallback(node => {
3808
+ // Invoke RDP's forwarded ref
3809
+ forwardedRef(node);
3810
+ // Setup our mutable ref
3811
+ if (node) mutableRef.current = node;
3812
+ }, [forwardedRef]);
3813
+ const isFocused = (_b = mutableRef.current) === null || _b === void 0 ? void 0 : _b.contains(document.activeElement);
3814
+ return jsxRuntime.jsx(giger.Input, Object.assign({}, inputProps, {
3815
+ ref: callbackRef,
3637
3816
  rightContent: jsxRuntime.jsx(giger.Icon
3638
3817
  // Internally, RDP applies this class to the Input, but the Icon is absolute / in its own context
3639
3818
  , {
@@ -3648,9 +3827,9 @@ const DatePicker = fieldProps => {
3648
3827
  return (_a = datePickerRef.current) === null || _a === void 0 ? void 0 : _a.setOpen(!datePickerRef.current.isCalendarOpen());
3649
3828
  }
3650
3829
  }),
3651
- value: isFocused || value !== new Date().toLocaleDateString("en-US") ? value : datePickerProps.placeholderText
3830
+ value: isFocused || value !== formatLocaleDate(new Date()) ? value : datePickerProps.placeholderText
3652
3831
  }));
3653
- }),
3832
+ })),
3654
3833
  "data-testid": fieldProps.name ? humps.camelize(fieldProps.name) : "date",
3655
3834
  onCalendarOpen: () => {
3656
3835
  var _a;
@@ -3659,13 +3838,13 @@ const DatePicker = fieldProps => {
3659
3838
  onChange: (date, event) => {
3660
3839
  var _a;
3661
3840
  event === null || event === void 0 ? void 0 : event.preventDefault();
3662
- (_a = datePickerProps.onChange) === null || _a === void 0 ? void 0 : _a.call(datePickerProps, date ? date.toLocaleDateString("en-US") : null);
3841
+ (_a = datePickerProps.onChange) === null || _a === void 0 ? void 0 : _a.call(datePickerProps, date ? formatLocaleDate(date) : null);
3663
3842
  },
3664
3843
  popperClassName: getPopperStyles(theme),
3665
3844
  popperPlacement: "bottom-end",
3666
3845
  preventOpenOnFocus: true,
3667
3846
  ref: datePickerRef,
3668
- selected: datePickerProps.value ? new Date(datePickerProps.value) : null,
3847
+ selected: parseLocaleDate(datePickerProps.value),
3669
3848
  showPopperArrow: false,
3670
3849
  wrapperClassName: getWrapperStyles()
3671
3850
  }))
@@ -3775,7 +3954,7 @@ var flattenIntoArray_1 = flattenIntoArray$1;
3775
3954
 
3776
3955
  var uncurryThis$6 = functionUncurryThis;
3777
3956
  var fails$5 = fails$q;
3778
- var isCallable$5 = isCallable$n;
3957
+ var isCallable$5 = isCallable$o;
3779
3958
  var classof$1 = classof$6;
3780
3959
  var getBuiltIn$3 = getBuiltIn$8;
3781
3960
  var inspectSource$1 = inspectSource$3;
@@ -3829,7 +4008,7 @@ var isConstructor$2 = !construct || fails$5(function () {
3829
4008
  var isArray = isArray$2;
3830
4009
  var isConstructor$1 = isConstructor$2;
3831
4010
  var isObject$2 = isObject$a;
3832
- var wellKnownSymbol$6 = wellKnownSymbol$j;
4011
+ var wellKnownSymbol$6 = wellKnownSymbol$k;
3833
4012
 
3834
4013
  var SPECIES$3 = wellKnownSymbol$6('species');
3835
4014
  var $Array = Array;
@@ -4010,8 +4189,8 @@ var uncurryThis$5 = functionUncurryThis;
4010
4189
  var thisNumberValue$1 = uncurryThis$5(1.0.valueOf);
4011
4190
 
4012
4191
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$6;
4013
- var toString$4 = toString$b;
4014
- var requireObjectCoercible$1 = requireObjectCoercible$8;
4192
+ var toString$4 = toString$c;
4193
+ var requireObjectCoercible$1 = requireObjectCoercible$9;
4015
4194
 
4016
4195
  var $RangeError$1 = RangeError;
4017
4196
 
@@ -4160,7 +4339,7 @@ $$a({ target: 'Number', proto: true, forced: FORCED$2 }, {
4160
4339
  var global$a = global$p;
4161
4340
  var fails$3 = fails$q;
4162
4341
  var uncurryThis$3 = functionUncurryThis;
4163
- var toString$3 = toString$b;
4342
+ var toString$3 = toString$c;
4164
4343
  var trim$1 = stringTrim.trim;
4165
4344
  var whitespaces$1 = whitespaces$4;
4166
4345
 
@@ -4320,7 +4499,7 @@ const MoneyInput = _a => {
4320
4499
  var global$9 = global$p;
4321
4500
  var fails$2 = fails$q;
4322
4501
  var uncurryThis$2 = functionUncurryThis;
4323
- var toString$2 = toString$b;
4502
+ var toString$2 = toString$c;
4324
4503
  var trim = stringTrim.trim;
4325
4504
  var whitespaces = whitespaces$4;
4326
4505
 
@@ -4393,23 +4572,10 @@ const NumberInput = _a => {
4393
4572
  }));
4394
4573
  };
4395
4574
 
4396
- var call$8 = functionCall;
4397
- var hasOwn$2 = hasOwnProperty_1;
4398
- var isPrototypeOf$3 = objectIsPrototypeOf;
4399
- var regExpFlags = regexpFlags$1;
4400
-
4401
- var RegExpPrototype$1 = RegExp.prototype;
4402
-
4403
- var regexpGetFlags = function (R) {
4404
- var flags = R.flags;
4405
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$2(R, 'flags') && isPrototypeOf$3(RegExpPrototype$1, R)
4406
- ? call$8(regExpFlags, R) : flags;
4407
- };
4408
-
4409
4575
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4410
4576
  var defineBuiltIn$2 = defineBuiltIn$7;
4411
4577
  var anObject$6 = anObject$f;
4412
- var $toString = toString$b;
4578
+ var $toString = toString$c;
4413
4579
  var fails$1 = fails$q;
4414
4580
  var getRegExpFlags = regexpGetFlags;
4415
4581
 
@@ -5208,17 +5374,43 @@ const useInsuranceProviderOptions = (insuranceAccount, features) => {
5208
5374
  }), [t, insuranceAccount, features === null || features === void 0 ? void 0 : features.includeThirdPartyInsurance, features === null || features === void 0 ? void 0 : features.includeShipsuranceInsurance]);
5209
5375
  };
5210
5376
 
5211
- let _$1 = t => t,
5212
- _t$1,
5213
- _t2$1;
5377
+ const useShipmentMetadata = shipment => {
5378
+ const isInternational = React.useMemo(() => {
5379
+ return shipment ? getIsInternationalShipment(shipment) : false;
5380
+ }, [shipment]);
5381
+ const isPoBox = React.useMemo(() => (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo) && isPoBoxAddress(shipment.shipTo), [shipment === null || shipment === void 0 ? void 0 : shipment.shipTo]);
5382
+ const isUnsupportedUpsCountry = React.useMemo(() => (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo) && isUnsupportedByUps(shipment.shipTo), [shipment === null || shipment === void 0 ? void 0 : shipment.shipTo]);
5383
+ const isCustomsRequired = React.useMemo(() => {
5384
+ return shipment ? getIsCustomsRequiredForShipment(shipment) : false;
5385
+ }, [shipment]);
5386
+ const isContentDescriptionRequired = React.useMemo(() => {
5387
+ var _a;
5388
+ return shipment && ((_a = shipment.shipFrom) === null || _a === void 0 ? void 0 : _a.countryCode) === "MX" || (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo.countryCode) === "MX";
5389
+ }, [shipment]);
5390
+ return {
5391
+ isContentDescriptionRequired,
5392
+ isCustomsRequired,
5393
+ isInternational,
5394
+ isPoBox,
5395
+ isUnsupportedUpsCountry
5396
+ };
5397
+ };
5398
+
5399
+ let _$2 = t => t,
5400
+ _t$2,
5401
+ _t2$2;
5214
5402
  const findGenericPackageFromCarriers = carriers => {
5215
5403
  const carrier = carriers.find(c => c.packages.some(p => p.packageCode === "package"));
5216
5404
  return carrier === null || carrier === void 0 ? void 0 : carrier.packages.find(p => p.packageCode === "package");
5217
5405
  };
5218
- const usePackageOptions = (carriers, customPackageTypes, poBox) => {
5406
+ const usePackageOptions = (carriers, customPackageTypes, shipment) => {
5219
5407
  const {
5220
5408
  t
5221
5409
  } = reactI18next.useTranslation("common");
5410
+ const {
5411
+ isPoBox,
5412
+ isUnsupportedUpsCountry
5413
+ } = useShipmentMetadata(shipment);
5222
5414
  return React.useMemo(() => {
5223
5415
  if (!carriers) return undefined;
5224
5416
  // Dictionary to lookup the uniqueness of each carrierCode
@@ -5227,7 +5419,7 @@ const usePackageOptions = (carriers, customPackageTypes, poBox) => {
5227
5419
  }));
5228
5420
  const genericPackage = findGenericPackageFromCarriers(carriers);
5229
5421
  const packageOptions = [...(genericPackage ? [{
5230
- label: t(_t$1 || (_t$1 = _$1`packageCategories.browseRates`)),
5422
+ label: t(_t$2 || (_t$2 = _$2`packageCategories.browseRates`)),
5231
5423
  options: [{
5232
5424
  label: t("packageCodes.package"),
5233
5425
  value: {
@@ -5235,7 +5427,7 @@ const usePackageOptions = (carriers, customPackageTypes, poBox) => {
5235
5427
  }
5236
5428
  }]
5237
5429
  }] : []), ...((customPackageTypes === null || customPackageTypes === void 0 ? void 0 : customPackageTypes.length) ? [{
5238
- label: t(_t2$1 || (_t2$1 = _$1`packageCategories.myCustomPackages`)),
5430
+ label: t(_t2$2 || (_t2$2 = _$2`packageCategories.myCustomPackages`)),
5239
5431
  options: customPackageTypes.sort((a, b) => a.name.localeCompare(b.name)).map(({
5240
5432
  dimensions,
5241
5433
  name,
@@ -5252,7 +5444,8 @@ const usePackageOptions = (carriers, customPackageTypes, poBox) => {
5252
5444
  return carriers.reduce((options, carrier) => {
5253
5445
  if (carrier.packages.length === 0) return options;
5254
5446
  // Filter out non-USPS packages for PO Box shipments
5255
- if (!isUspsCarrier(carrier.carrierCode) && poBox) return options;
5447
+ // Filter out UPS packages for unsupported countries
5448
+ if (!isUspsCarrier(carrier.carrierCode) && isPoBox || isUpsCarrier(carrier.carrierCode) && isUnsupportedUpsCountry) return options;
5256
5449
  return [...options, {
5257
5450
  // Check the uniqueness of the carrierCode, if unique default to friendlyName and if non-unique use nickname.
5258
5451
  label: isUniqueByCarrierCode[carrier.carrierCode] ? carrier.friendlyName : carrier.nickname,
@@ -5268,24 +5461,27 @@ const usePackageOptions = (carriers, customPackageTypes, poBox) => {
5268
5461
  value: carrier.carrierId
5269
5462
  }];
5270
5463
  }, packageOptions);
5271
- }, [carriers, customPackageTypes, poBox, t]);
5464
+ }, [carriers, customPackageTypes, isPoBox, isUnsupportedUpsCountry, t]);
5272
5465
  };
5273
5466
 
5274
5467
  const useRateOptions = (rates, carriers, shipment, enableGlobalPostFiltering) => {
5275
- const isInternationalShipment = React.useMemo(() => {
5276
- return shipment ? getIsInternationalShipment(shipment) : false;
5277
- }, [shipment]);
5278
- const isPoBoxShipment = React.useMemo(() => (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo) && isPoBoxAddress(shipment.shipTo), [shipment === null || shipment === void 0 ? void 0 : shipment.shipTo]);
5279
5468
  const carriersById = React.useMemo(() => createDictionary(carriers, c => ({
5280
5469
  [c.carrierId]: c
5281
5470
  })), [carriers]);
5471
+ const {
5472
+ isInternational,
5473
+ isPoBox,
5474
+ isUnsupportedUpsCountry
5475
+ } = useShipmentMetadata(shipment);
5282
5476
  return React.useMemo(() => {
5283
5477
  return (rates !== null && rates !== void 0 ? rates : []).filter(r => {
5284
5478
  const carrier = carriersById[r.carrierId];
5285
5479
  const service = carrier === null || carrier === void 0 ? void 0 : carrier.services.find(s => s.serviceCode === r.serviceCode);
5286
- return (service === null || service === void 0 ? void 0 : service.domestic) === !isInternationalShipment && (!enableGlobalPostFiltering || !r.serviceCode.includes("globalpost_")) && (
5480
+ return (service === null || service === void 0 ? void 0 : service.domestic) === !isInternational && (!enableGlobalPostFiltering || !r.serviceCode.includes("globalpost_")) && (
5287
5481
  // Filter out non-USPS carriers for PO Box shipments
5288
- service && isUspsCarrier(service.carrierCode) || !isPoBoxShipment);
5482
+ service && isUspsCarrier(service.carrierCode) || !isPoBox) && (
5483
+ // Filter out UPS for unsupported countries
5484
+ service && !isUpsCarrier(service.carrierCode) || !isUnsupportedUpsCountry);
5289
5485
  }).sort((a, b) => getTotalRateAmount(a) - getTotalRateAmount(b)).map(r => {
5290
5486
  var _a, _b;
5291
5487
  const balance = (_a = carriersById[r.carrierId]) === null || _a === void 0 ? void 0 : _a.balance;
@@ -5297,18 +5493,25 @@ const useRateOptions = (rates, carriers, shipment, enableGlobalPostFiltering) =>
5297
5493
  requiresFundedAmount
5298
5494
  });
5299
5495
  });
5300
- }, [carriersById, enableGlobalPostFiltering, isInternationalShipment, isPoBoxShipment, rates]);
5496
+ }, [carriersById, enableGlobalPostFiltering, isInternational, isPoBox, isUnsupportedUpsCountry, rates]);
5301
5497
  };
5302
5498
 
5303
- const useServiceCodeOptions = (carriers, domestic, poBox) => {
5499
+ const useServiceCodeOptions = (carriers, shipment) => {
5500
+ const {
5501
+ isInternational,
5502
+ isPoBox,
5503
+ isUnsupportedUpsCountry
5504
+ } = useShipmentMetadata(shipment);
5304
5505
  return React.useMemo(() => {
5305
5506
  // Dictionary to lookup the uniqueness of each carrierCode
5306
5507
  const isUniqueByCarrierCode = createDictionary(carriers, (c, partialResults) => ({
5307
5508
  [c.carrierCode]: partialResults[c.carrierCode] === undefined
5308
5509
  }));
5309
5510
  return (carriers !== null && carriers !== void 0 ? carriers : []).reduce((options, carrier) => {
5310
- if (!isUspsCarrier(carrier.carrierCode) && poBox) return options;
5311
- const services = carrier.services.filter(s => s.domestic === domestic &&
5511
+ // Filter out non-USPS service for PO Box shipments
5512
+ // Filter out UPS service for unsupported countries
5513
+ if (!isUspsCarrier(carrier.carrierCode) && isPoBox || isUpsCarrier(carrier.carrierCode) && isUnsupportedUpsCountry) return options;
5514
+ const services = carrier.services.filter(s => s.domestic === !isInternational &&
5312
5515
  // TODO: Pending LMNT-418, GlobalPost filtering should be wrapped in FF
5313
5516
  !s.serviceCode.includes("globalpost_"));
5314
5517
  if (services.length === 0) return options;
@@ -5326,7 +5529,7 @@ const useServiceCodeOptions = (carriers, domestic, poBox) => {
5326
5529
  value: carrier.carrierId
5327
5530
  }];
5328
5531
  }, []);
5329
- }, [carriers, domestic, poBox]);
5532
+ }, [carriers, isInternational, isPoBox, isUnsupportedUpsCountry]);
5330
5533
  };
5331
5534
 
5332
5535
  const getContainerStyles = theme => /*#__PURE__*/react.css({
@@ -5385,13 +5588,16 @@ const createCategoryFromShippingPresets = (categoryName, presets) => presets ? [
5385
5588
  const useShippingPresetsOptions = ({
5386
5589
  platform,
5387
5590
  user
5388
- } = {}, isInternationalShipment) => {
5591
+ } = {}, shipment) => {
5389
5592
  const {
5390
5593
  t
5391
5594
  } = reactI18next.useTranslation();
5392
- return React.useMemo(() => [...createCategoryFromShippingPresets(t("shippingPresets.user"), isInternationalShipment ? user === null || user === void 0 ? void 0 : user.international : user === null || user === void 0 ? void 0 : user.domestic),
5595
+ const {
5596
+ isInternational
5597
+ } = useShipmentMetadata(shipment);
5598
+ return React.useMemo(() => [...createCategoryFromShippingPresets(t("shippingPresets.user"), isInternational ? user === null || user === void 0 ? void 0 : user.international : user === null || user === void 0 ? void 0 : user.domestic),
5393
5599
  // TODO - platform name should probably be a platform-specific environmental variable ?
5394
- ...createCategoryFromShippingPresets(t("shippingPresets.platform"), isInternationalShipment ? platform === null || platform === void 0 ? void 0 : platform.international : platform === null || platform === void 0 ? void 0 : platform.domestic)], [isInternationalShipment, platform, t, user]);
5600
+ ...createCategoryFromShippingPresets(t("shippingPresets.platform"), isInternational ? platform === null || platform === void 0 ? void 0 : platform.international : platform === null || platform === void 0 ? void 0 : platform.domestic)], [isInternational, platform, t, user]);
5395
5601
  };
5396
5602
 
5397
5603
  const useStateCodeOptions = domestic => React.useMemo(() => usStates.flatMap(v => !domestic || !v.isMilitary && !v.isUnitedStatesTerritory ? {
@@ -5668,7 +5874,7 @@ const useRunOnceOnTrue = conditionalEffect => {
5668
5874
  */
5669
5875
  const useToggle = (initialValue = false) => React.useReducer((prev, next) => next !== undefined && typeof next !== "object" ? next : !prev, initialValue);
5670
5876
 
5671
- var wellKnownSymbol$5 = wellKnownSymbol$j;
5877
+ var wellKnownSymbol$5 = wellKnownSymbol$k;
5672
5878
  var Iterators$1 = iterators;
5673
5879
 
5674
5880
  var ITERATOR$2 = wellKnownSymbol$5('iterator');
@@ -5680,10 +5886,10 @@ var isArrayIteratorMethod$1 = function (it) {
5680
5886
  };
5681
5887
 
5682
5888
  var classof = classof$6;
5683
- var getMethod$2 = getMethod$5;
5684
- var isNullOrUndefined$2 = isNullOrUndefined$6;
5889
+ var getMethod$2 = getMethod$6;
5890
+ var isNullOrUndefined$2 = isNullOrUndefined$7;
5685
5891
  var Iterators = iterators;
5686
- var wellKnownSymbol$4 = wellKnownSymbol$j;
5892
+ var wellKnownSymbol$4 = wellKnownSymbol$k;
5687
5893
 
5688
5894
  var ITERATOR$1 = wellKnownSymbol$4('iterator');
5689
5895
 
@@ -5709,7 +5915,7 @@ var getIterator$1 = function (argument, usingIterator) {
5709
5915
 
5710
5916
  var call$6 = functionCall;
5711
5917
  var anObject$4 = anObject$f;
5712
- var getMethod$1 = getMethod$5;
5918
+ var getMethod$1 = getMethod$6;
5713
5919
 
5714
5920
  var iteratorClose$1 = function (iterator, kind, value) {
5715
5921
  var innerResult, innerError;
@@ -5957,7 +6163,7 @@ const AddressParser = ({
5957
6163
  }));
5958
6164
  };
5959
6165
 
5960
- const styles$m = createStyles({
6166
+ const styles$o = createStyles({
5961
6167
  grow: {
5962
6168
  flexGrow: 1
5963
6169
  },
@@ -6057,13 +6263,13 @@ const AddressFields = ({
6057
6263
  },
6058
6264
  options: countryCodeOptions
6059
6265
  }), jsxRuntime.jsxs("div", Object.assign({
6060
- css: styles$m.stateZipWrapper
6266
+ css: styles$o.stateZipWrapper
6061
6267
  }, {
6062
6268
  children: [jsxRuntime.jsx("div", Object.assign({
6063
- css: styles$m.stateWrapper
6269
+ css: styles$o.stateWrapper
6064
6270
  }, {
6065
6271
  children: jsxRuntime.jsx("div", Object.assign({
6066
- css: styles$m.grow
6272
+ css: styles$o.grow
6067
6273
  }, {
6068
6274
  children: watchCountryCode === "US" ?
6069
6275
  // Domestic States
@@ -6088,10 +6294,10 @@ const AddressFields = ({
6088
6294
  })
6089
6295
  }))
6090
6296
  })), jsxRuntime.jsx("div", Object.assign({
6091
- css: styles$m.zipWrapper
6297
+ css: styles$o.zipWrapper
6092
6298
  }, {
6093
6299
  children: jsxRuntime.jsx("div", Object.assign({
6094
- css: styles$m.grow
6300
+ css: styles$o.grow
6095
6301
  }, {
6096
6302
  children: jsxRuntime.jsx(TextInput, {
6097
6303
  control: form.control,
@@ -6131,11 +6337,11 @@ const extendZod = () => {
6131
6337
  var call$4 = functionCall;
6132
6338
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
6133
6339
  var anObject$2 = anObject$f;
6134
- var isNullOrUndefined$1 = isNullOrUndefined$6;
6340
+ var isNullOrUndefined$1 = isNullOrUndefined$7;
6135
6341
  var toLength = toLength$3;
6136
- var toString$1 = toString$b;
6137
- var requireObjectCoercible = requireObjectCoercible$8;
6138
- var getMethod = getMethod$5;
6342
+ var toString$1 = toString$c;
6343
+ var requireObjectCoercible = requireObjectCoercible$9;
6344
+ var getMethod = getMethod$6;
6139
6345
  var advanceStringIndex = advanceStringIndex$2;
6140
6346
  var regExpExec = regexpExecAbstract;
6141
6347
 
@@ -6263,7 +6469,7 @@ const AddressForm = ({
6263
6469
  children: [jsxRuntime.jsxs("div", Object.assign({
6264
6470
  css: theme => ({
6265
6471
  display: "flex",
6266
- justifyContent: isAddressParserOpen ? "normal" : "flex-end",
6472
+ flexDirection: isAddressParserOpen ? "column" : "row",
6267
6473
  paddingBottom: theme.spacing(4),
6268
6474
  width: "100%"
6269
6475
  })
@@ -6329,7 +6535,7 @@ const AddressForm = ({
6329
6535
  }));
6330
6536
  };
6331
6537
 
6332
- const styles$l = createStyles({
6538
+ const styles$n = createStyles({
6333
6539
  agreement: {
6334
6540
  alignItems: "center",
6335
6541
  display: "flex",
@@ -6399,10 +6605,10 @@ const DisplayCarrierTerms = c => {
6399
6605
  const listCarrierLinks = () => {
6400
6606
  return c.carrierTerms.links.map((term, index) => {
6401
6607
  return jsxRuntime.jsx("li", Object.assign({
6402
- css: styles$l.listItems
6608
+ css: styles$n.listItems
6403
6609
  }, {
6404
6610
  children: jsxRuntime.jsx(giger.Link, Object.assign({
6405
- css: styles$l.link,
6611
+ css: styles$n.link,
6406
6612
  href: term.url,
6407
6613
  isExternal: true,
6408
6614
  target: "_blank"
@@ -6418,18 +6624,18 @@ const DisplayCarrierTerms = c => {
6418
6624
  };
6419
6625
  const listCarrierTerms = () => {
6420
6626
  return jsxRuntime.jsxs("div", Object.assign({
6421
- css: styles$l.terms
6627
+ css: styles$n.terms
6422
6628
  }, {
6423
6629
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
6424
6630
  variant: "subtitle1"
6425
6631
  }, {
6426
6632
  children: c.carrierTerms.title
6427
6633
  })), jsxRuntime.jsx("div", Object.assign({
6428
- css: styles$l.terms
6634
+ css: styles$n.terms
6429
6635
  }, {
6430
6636
  children: listCarrierContent()
6431
6637
  })), jsxRuntime.jsx("ul", Object.assign({
6432
- css: styles$l.links
6638
+ css: styles$n.links
6433
6639
  }, {
6434
6640
  children: listCarrierLinks()
6435
6641
  }))]
@@ -6659,7 +6865,7 @@ const AddressDisplay = ({
6659
6865
  }));
6660
6866
  };
6661
6867
 
6662
- const styles$k = createStyles({
6868
+ const styles$m = createStyles({
6663
6869
  container: theme => ({
6664
6870
  display: "flex",
6665
6871
  gap: theme.spacing()
@@ -6697,13 +6903,13 @@ const Disclosure = ({
6697
6903
  }, [open]);
6698
6904
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6699
6905
  children: [jsxRuntime.jsxs("div", Object.assign({
6700
- css: styles$k.container
6906
+ css: styles$m.container
6701
6907
  }, {
6702
6908
  children: [jsxRuntime.jsx("div", {
6703
6909
  children: label
6704
6910
  }), _showToggle && jsxRuntime.jsx("button", Object.assign({
6705
6911
  "aria-expanded": isOpen,
6706
- css: styles$k.toggle,
6912
+ css: styles$m.toggle,
6707
6913
  onClick: () => {
6708
6914
  setIsOpen(!isOpen);
6709
6915
  onToggle(!isOpen);
@@ -6711,12 +6917,12 @@ const Disclosure = ({
6711
6917
  type: "button"
6712
6918
  }, {
6713
6919
  children: jsxRuntime.jsx(giger.Icon, {
6714
- css: styles$k.icon,
6920
+ css: styles$m.icon,
6715
6921
  name: isOpen ? gigerTheme.IconNames.CHEVRON_TOP : gigerTheme.IconNames.CHEVRON_BOTTOM
6716
6922
  })
6717
6923
  }))]
6718
6924
  })), isOpen && jsxRuntime.jsx("div", Object.assign({
6719
- css: styles$k.content
6925
+ css: styles$m.content
6720
6926
  }, {
6721
6927
  children: typeof children === "function" ? children(() => setIsOpen(!isOpen)) : children
6722
6928
  }))]
@@ -6756,14 +6962,10 @@ const AddressPreferenceDisplay = ({
6756
6962
  }), [addressPreference, onChangePreference]);
6757
6963
  const disclosureContentTitle = React.useMemo(() => addressPreference.status === "verified" ? t(`address.preference.${addressPreference.alternativeSource}`) : t("address.preference.addressNotValidated"), [addressPreference, t]);
6758
6964
  const isVerified = React.useMemo(() => {
6759
- if (isDomesticAddress(addressPreference.selection) || addressPreference.selectionSource === "matchedAddress") {
6760
- return addressPreference.status === "verified";
6761
- }
6762
- // If the address is international and is modified, We might get "verified" even though we are displaying original "not verified" address
6763
- if (addressPreference.isModified) {
6764
- return false;
6965
+ if (addressPreference.status === "verified" && addressPreference.selectionSource === "matchedAddress") {
6966
+ return true;
6765
6967
  }
6766
- return addressPreference.status === "verified";
6968
+ return false;
6767
6969
  }, [addressPreference]);
6768
6970
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6769
6971
  children: [jsxRuntime.jsx(AddressDisplay, {
@@ -6866,7 +7068,7 @@ const getCarrierRecoverySchema = requiresAddress => zod.z.object({
6866
7068
  address: requiresAddress ? baseSchema : baseSchema.optional()
6867
7069
  });
6868
7070
 
6869
- const styles$j = createStyles({
7071
+ const styles$l = createStyles({
6870
7072
  grid: theme => ({
6871
7073
  margin: theme.spacing(4)
6872
7074
  }),
@@ -6909,7 +7111,7 @@ const CarrierRecoveryForm = ({
6909
7111
  onSubmit: formLogger.capture(handleSubmit)
6910
7112
  }, {
6911
7113
  children: jsxRuntime.jsxs(giger.Grid, Object.assign({
6912
- css: styles$j.grid,
7114
+ css: styles$l.grid,
6913
7115
  noPadding: true
6914
7116
  }, {
6915
7117
  children: [requiresAddress && jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -6917,14 +7119,14 @@ const CarrierRecoveryForm = ({
6917
7119
  colSpan: 12
6918
7120
  }, {
6919
7121
  children: jsxRuntime.jsx(giger.Typography, Object.assign({
6920
- css: styles$j.heading,
7122
+ css: styles$l.heading,
6921
7123
  variant: "heading4"
6922
7124
  }, {
6923
7125
  children: t("register-wallet:sections.carriers.title")
6924
7126
  }))
6925
7127
  })), jsxRuntime.jsx(giger.GridChild, Object.assign({
6926
7128
  colSpan: 12,
6927
- css: styles$j.subtitle
7129
+ css: styles$l.subtitle
6928
7130
  }, {
6929
7131
  children: jsxRuntime.jsx(giger.Typography, Object.assign({
6930
7132
  variant: "subtitle1"
@@ -7010,7 +7212,7 @@ const CarrierTermsForm = ({
7010
7212
  onSubmit(payload.agreement);
7011
7213
  }));
7012
7214
  return jsxRuntime.jsxs("div", Object.assign({
7013
- css: styles$l.termsForm,
7215
+ css: styles$n.termsForm,
7014
7216
  "data-testid": "carrier-terms-form"
7015
7217
  }, {
7016
7218
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
@@ -7026,7 +7228,7 @@ const CarrierTermsForm = ({
7026
7228
  })), jsxRuntime.jsx(Spacer, {
7027
7229
  multiplier: 1
7028
7230
  }), jsxRuntime.jsx("div", Object.assign({
7029
- css: styles$l.carrierLogos
7231
+ css: styles$n.carrierLogos
7030
7232
  }, {
7031
7233
  children: metadatas.map(({
7032
7234
  name,
@@ -7042,7 +7244,7 @@ const CarrierTermsForm = ({
7042
7244
  onSubmit: formLogger.capture(handleSubmit)
7043
7245
  }, {
7044
7246
  children: jsxRuntime.jsxs("div", Object.assign({
7045
- css: styles$l.agreement
7247
+ css: styles$n.agreement
7046
7248
  }, {
7047
7249
  children: [jsxRuntime.jsx("div", {
7048
7250
  children: jsxRuntime.jsx(CheckboxInput, {
@@ -7069,12 +7271,12 @@ const CarrierTermsForm = ({
7069
7271
  name: "agreement"
7070
7272
  })
7071
7273
  }), showTerms && jsxRuntime.jsxs("div", Object.assign({
7072
- css: styles$l.well
7274
+ css: styles$n.well
7073
7275
  }, {
7074
7276
  children: [terms.map(t => jsxRuntime.jsx(DisplayCarrierTerms, {
7075
7277
  carrierTerms: t
7076
7278
  }, t.title)), jsxRuntime.jsx("div", Object.assign({
7077
- css: styles$l.close
7279
+ css: styles$n.close
7078
7280
  }, {
7079
7281
  children: jsxRuntime.jsx(giger.Button, Object.assign({
7080
7282
  onClick: () => setShowTerms(false),
@@ -7106,9 +7308,9 @@ var DESCRIPTORS$1 = descriptors;
7106
7308
  var global$8 = global$p;
7107
7309
  var uncurryThis$1 = functionUncurryThis;
7108
7310
  var hasOwn$1 = hasOwnProperty_1;
7109
- var isCallable$4 = isCallable$n;
7311
+ var isCallable$4 = isCallable$o;
7110
7312
  var isPrototypeOf$1 = objectIsPrototypeOf;
7111
- var toString = toString$b;
7313
+ var toString = toString$c;
7112
7314
  var defineProperty = objectDefineProperty.f;
7113
7315
  var copyConstructorProperties = copyConstructorProperties$2;
7114
7316
 
@@ -7395,7 +7597,7 @@ const CopyButton = ({
7395
7597
  }));
7396
7598
  };
7397
7599
 
7398
- const styles$i = createStyles({
7600
+ const styles$k = createStyles({
7399
7601
  trackingNumber: theme => ({
7400
7602
  alignItems: "center",
7401
7603
  display: "flex"
@@ -7441,10 +7643,10 @@ const Label = ({
7441
7643
  shippingAmount: label.shipmentCost
7442
7644
  }, {
7443
7645
  children: label.trackingNumber && jsxRuntime.jsxs("div", Object.assign({
7444
- css: styles$i.trackingNumber
7646
+ css: styles$k.trackingNumber
7445
7647
  }, {
7446
7648
  children: [jsxRuntime.jsx("div", Object.assign({
7447
- css: styles$i.truncatedTrackingNumber
7649
+ css: styles$k.truncatedTrackingNumber
7448
7650
  }, {
7449
7651
  children: label.trackingNumber.toString()
7450
7652
  })), jsxRuntime.jsx(CopyButton, {
@@ -7556,7 +7758,7 @@ const LandingPageForm = ({
7556
7758
  }));
7557
7759
  };
7558
7760
 
7559
- const styles$h = createStyles({
7761
+ const styles$j = createStyles({
7560
7762
  container: theme => ({
7561
7763
  padding: theme.spacing(2)
7562
7764
  }),
@@ -7578,11 +7780,11 @@ const LandingPage = ({
7578
7780
  t
7579
7781
  } = reactI18next.useTranslation();
7580
7782
  return jsxRuntime.jsxs("div", Object.assign({
7581
- css: styles$h.container,
7783
+ css: styles$j.container,
7582
7784
  "data-testid": "landing-page"
7583
7785
  }, {
7584
7786
  children: [jsxRuntime.jsxs("div", Object.assign({
7585
- css: styles$h.header
7787
+ css: styles$j.header
7586
7788
  }, {
7587
7789
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
7588
7790
  variant: "heading4"
@@ -7600,7 +7802,7 @@ const LandingPage = ({
7600
7802
  })), jsxRuntime.jsx(LandingPageForm, {
7601
7803
  onSubmit: onSubmit
7602
7804
  }), jsxRuntime.jsxs("div", Object.assign({
7603
- css: styles$h.header
7805
+ css: styles$j.header
7604
7806
  }, {
7605
7807
  children: [jsxRuntime.jsx(Spacer, {
7606
7808
  multiplier: 6
@@ -7611,14 +7813,14 @@ const LandingPage = ({
7611
7813
  })), jsxRuntime.jsx(Spacer, {
7612
7814
  multiplier: 2
7613
7815
  }), jsxRuntime.jsx(giger.Typography, Object.assign({
7614
- css: styles$h.description,
7816
+ css: styles$j.description,
7615
7817
  variant: "body1"
7616
7818
  }, {
7617
7819
  children: t("onboarding:landing.messageLine1")
7618
7820
  })), jsxRuntime.jsx(Spacer, {
7619
7821
  multiplier: 2
7620
7822
  }), jsxRuntime.jsx(giger.Typography, Object.assign({
7621
- css: styles$h.description,
7823
+ css: styles$j.description,
7622
7824
  variant: "body1"
7623
7825
  }, {
7624
7826
  children: t("onboarding:landing.messageLine2")
@@ -7629,7 +7831,7 @@ const LandingPage = ({
7629
7831
  }));
7630
7832
  };
7631
7833
 
7632
- const styles$g = createStyles({
7834
+ const styles$i = createStyles({
7633
7835
  icon: theme => ({
7634
7836
  color: theme.palette.primary.main,
7635
7837
  marginRight: theme.spacing(2)
@@ -7674,10 +7876,10 @@ const Section = _a => {
7674
7876
  rest = __rest(_a, ["bold", "title", "children", "rightContent"]);
7675
7877
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
7676
7878
  children: [title && jsxRuntime.jsx("summary", Object.assign({
7677
- css: styles$g.summary
7879
+ css: styles$i.summary
7678
7880
  }, {
7679
7881
  children: jsxRuntime.jsxs("div", Object.assign({
7680
- css: styles$g.summaryWrapper
7882
+ css: styles$i.summaryWrapper
7681
7883
  }, {
7682
7884
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
7683
7885
  bold: bold,
@@ -7685,20 +7887,20 @@ const Section = _a => {
7685
7887
  }, {
7686
7888
  children: title
7687
7889
  })), rightContent && jsxRuntime.jsx("div", Object.assign({
7688
- css: styles$g.rightContentWrapper
7890
+ css: styles$i.rightContentWrapper
7689
7891
  }, {
7690
7892
  children: rightContent
7691
7893
  }))]
7692
7894
  }))
7693
7895
  })), jsxRuntime.jsx("section", Object.assign({
7694
- css: styles$g.section
7896
+ css: styles$i.section
7695
7897
  }, rest, {
7696
7898
  children: children
7697
7899
  }))]
7698
7900
  });
7699
7901
  };
7700
7902
 
7701
- const styles$f = createStyles({
7903
+ const styles$h = createStyles({
7702
7904
  container: {
7703
7905
  display: "flex",
7704
7906
  flexDirection: "column"
@@ -7758,14 +7960,14 @@ const ListCarriersRow = ({
7758
7960
  setIsSubmitting(false);
7759
7961
  });
7760
7962
  return jsxRuntime.jsxs("div", Object.assign({
7761
- css: styles$f.container,
7963
+ css: styles$h.container,
7762
7964
  "data-testid": "carrier-row"
7763
7965
  }, {
7764
7966
  children: [jsxRuntime.jsxs("div", Object.assign({
7765
- css: styles$f.rowContainer
7967
+ css: styles$h.rowContainer
7766
7968
  }, {
7767
7969
  children: [jsxRuntime.jsxs("div", Object.assign({
7768
- css: styles$f.logoContainer
7970
+ css: styles$h.logoContainer
7769
7971
  }, {
7770
7972
  children: [jsxRuntime.jsx("div", {
7771
7973
  children: jsxRuntime.jsx("img", {
@@ -7783,7 +7985,7 @@ const ListCarriersRow = ({
7783
7985
  css: _ref
7784
7986
  }, {
7785
7987
  children: jsxRuntime.jsx(LinkAction, {
7786
- css: styles$f.getConnectButton(isConnected),
7988
+ css: styles$h.getConnectButton(isConnected),
7787
7989
  isDisabled: isConnected || showDropDown,
7788
7990
  isLoading: isSubmitting,
7789
7991
  onClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -7801,7 +8003,7 @@ const ListCarriersRow = ({
7801
8003
  }));
7802
8004
  };
7803
8005
 
7804
- const styles$e = createStyles({
8006
+ const styles$g = createStyles({
7805
8007
  carriersList: theme => ({
7806
8008
  "& > li:not(:last-of-type)": {
7807
8009
  borderBottom: `1px solid ${theme.palette.gray.light}`
@@ -7854,7 +8056,7 @@ const ListCarriers = ({
7854
8056
  }))
7855
8057
  })), jsxRuntime.jsx(Spacer, {})]
7856
8058
  }), jsxRuntime.jsx("ul", Object.assign({
7857
- css: styles$e.carriersList,
8059
+ css: styles$g.carriersList,
7858
8060
  "data-testid": "carriers-list"
7859
8061
  }, {
7860
8062
  children: isLoading ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -7876,11 +8078,11 @@ const ListCarriers = ({
7876
8078
  };
7877
8079
  const LoadingSkeletonRow = () => {
7878
8080
  return jsxRuntime.jsxs("div", Object.assign({
7879
- css: styles$e.skeletonRow,
8081
+ css: styles$g.skeletonRow,
7880
8082
  "data-testid": "skeleton-carrier-row"
7881
8083
  }, {
7882
8084
  children: [jsxRuntime.jsxs("div", Object.assign({
7883
- css: styles$e.skeletonLogoContainer
8085
+ css: styles$g.skeletonLogoContainer
7884
8086
  }, {
7885
8087
  children: [jsxRuntime.jsx(giger.Skeleton, {
7886
8088
  animation: giger.SkeletonAnimation.WAVE,
@@ -8187,7 +8389,7 @@ const useAddressPreference = () => {
8187
8389
  return context;
8188
8390
  };
8189
8391
 
8190
- const styles$d = createStyles({
8392
+ const styles$f = createStyles({
8191
8393
  body: theme => ({
8192
8394
  borderTop: `1px solid ${theme.palette.gray.light}`,
8193
8395
  color: theme.palette.black,
@@ -8238,14 +8440,14 @@ const SettingsCard = ({
8238
8440
  verticallyAligned
8239
8441
  }) => {
8240
8442
  return jsxRuntime.jsxs("div", Object.assign({
8241
- css: verticallyAligned ? styles$d.verticalContainer : styles$d.container,
8443
+ css: verticallyAligned ? styles$f.verticalContainer : styles$f.container,
8242
8444
  "data-testid": "settingsCard"
8243
8445
  }, {
8244
8446
  children: [jsxRuntime.jsxs("div", Object.assign({
8245
- css: styles$d.header
8447
+ css: styles$f.header
8246
8448
  }, {
8247
8449
  children: [jsxRuntime.jsxs("div", Object.assign({
8248
- css: styles$d.title
8450
+ css: styles$f.title
8249
8451
  }, {
8250
8452
  children: [typeof title === "string" ? jsxRuntime.jsx(giger.Typography, Object.assign({
8251
8453
  variant: "subtitle2"
@@ -8280,7 +8482,7 @@ const SettingsCard = ({
8280
8482
  }))
8281
8483
  }))]
8282
8484
  })), children && jsxRuntime.jsx("div", Object.assign({
8283
- css: styles$d.body
8485
+ css: styles$f.body
8284
8486
  }, {
8285
8487
  children: jsxRuntime.jsxs("div", {
8286
8488
  children: [children, accessoryAction && jsxRuntime.jsx(ButtonGroup, Object.assign({
@@ -8416,7 +8618,7 @@ const WarehouseForm = ({
8416
8618
  returnAddress: Object.assign(Object.assign({}, warehouse.returnAddress), {
8417
8619
  countryCode: warehouse.returnAddress.countryCode
8418
8620
  }),
8419
- returnToAddressIsDifferent: !_$2.isEqual(warehouse.originAddress, warehouse.returnAddress)
8621
+ returnToAddressIsDifferent: !_$3.isEqual(warehouse.originAddress, warehouse.returnAddress)
8420
8622
  }) : {
8421
8623
  isDefault: _isOnboarding ? true : false,
8422
8624
  originAddress: {
@@ -8536,7 +8738,7 @@ const WarehouseForm = ({
8536
8738
  }));
8537
8739
  };
8538
8740
 
8539
- const styles$c = createStyles({
8741
+ const styles$e = createStyles({
8540
8742
  cardSpacing: theme => ({
8541
8743
  display: "flex",
8542
8744
  flexDirection: "column",
@@ -8566,9 +8768,9 @@ const ManageWarehouses = ({
8566
8768
  const [showAddNewWarehouseForm, toggleShowAddNewWarehouseForm] = useToggle(false);
8567
8769
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
8568
8770
  children: [showAddNewWarehouseForm ? jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
8569
- css: styles$c.well,
8771
+ css: styles$e.well,
8570
8772
  formHeader: jsxRuntime.jsxs("div", Object.assign({
8571
- css: styles$c.header
8773
+ css: styles$e.header
8572
8774
  }, {
8573
8775
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
8574
8776
  variant: "subtitle1"
@@ -8613,14 +8815,14 @@ const ManageWarehouses = ({
8613
8815
  })]
8614
8816
  }))
8615
8817
  })), jsxRuntime.jsx("div", Object.assign({
8616
- css: styles$c.cardSpacing
8818
+ css: styles$e.cardSpacing
8617
8819
  }, {
8618
8820
  children: warehouses.map(warehouse => {
8619
8821
  if (editWarehouseId && editWarehouseId === warehouse.warehouseId) {
8620
8822
  return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
8621
- css: styles$c.well,
8823
+ css: styles$e.well,
8622
8824
  formHeader: jsxRuntime.jsxs("div", Object.assign({
8623
- css: styles$c.header
8825
+ css: styles$e.header
8624
8826
  }, {
8625
8827
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
8626
8828
  variant: "subtitle1"
@@ -8678,7 +8880,7 @@ const ManageWarehouses = ({
8678
8880
 
8679
8881
  var getBuiltIn$2 = getBuiltIn$8;
8680
8882
  var definePropertyModule = objectDefineProperty;
8681
- var wellKnownSymbol$3 = wellKnownSymbol$j;
8883
+ var wellKnownSymbol$3 = wellKnownSymbol$k;
8682
8884
  var DESCRIPTORS = descriptors;
8683
8885
 
8684
8886
  var SPECIES$2 = wellKnownSymbol$3('species');
@@ -8717,8 +8919,8 @@ var aConstructor$1 = function (argument) {
8717
8919
 
8718
8920
  var anObject$1 = anObject$f;
8719
8921
  var aConstructor = aConstructor$1;
8720
- var isNullOrUndefined = isNullOrUndefined$6;
8721
- var wellKnownSymbol$2 = wellKnownSymbol$j;
8922
+ var isNullOrUndefined = isNullOrUndefined$7;
8923
+ var wellKnownSymbol$2 = wellKnownSymbol$k;
8722
8924
 
8723
8925
  var SPECIES$1 = wellKnownSymbol$2('species');
8724
8926
 
@@ -8748,7 +8950,7 @@ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
8748
8950
  var global$7 = global$p;
8749
8951
  var apply = functionApply;
8750
8952
  var bind$2 = functionBindContext;
8751
- var isCallable$3 = isCallable$n;
8953
+ var isCallable$3 = isCallable$o;
8752
8954
  var hasOwn = hasOwnProperty_1;
8753
8955
  var fails = fails$q;
8754
8956
  var html = html$2;
@@ -9015,10 +9217,10 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
9015
9217
 
9016
9218
  var global$2 = global$p;
9017
9219
  var NativePromiseConstructor$3 = promiseNativeConstructor;
9018
- var isCallable$2 = isCallable$n;
9220
+ var isCallable$2 = isCallable$o;
9019
9221
  var isForced = isForced_1;
9020
9222
  var inspectSource = inspectSource$3;
9021
- var wellKnownSymbol$1 = wellKnownSymbol$j;
9223
+ var wellKnownSymbol$1 = wellKnownSymbol$k;
9022
9224
  var IS_BROWSER = engineIsBrowser;
9023
9225
  var IS_DENO = engineIsDeno;
9024
9226
  var V8_VERSION = engineV8Version;
@@ -9090,7 +9292,7 @@ var setPrototypeOf = objectSetPrototypeOf;
9090
9292
  var setToStringTag = setToStringTag$3;
9091
9293
  var setSpecies = setSpecies$1;
9092
9294
  var aCallable$2 = aCallable$a;
9093
- var isCallable$1 = isCallable$n;
9295
+ var isCallable$1 = isCallable$o;
9094
9296
  var isObject$1 = isObject$a;
9095
9297
  var anInstance = anInstance$1;
9096
9298
  var speciesConstructor = speciesConstructor$1;
@@ -9368,7 +9570,7 @@ $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTR
9368
9570
  setToStringTag(PromiseConstructor, PROMISE, false);
9369
9571
  setSpecies(PROMISE);
9370
9572
 
9371
- var wellKnownSymbol = wellKnownSymbol$j;
9573
+ var wellKnownSymbol = wellKnownSymbol$k;
9372
9574
 
9373
9575
  var ITERATOR = wellKnownSymbol('iterator');
9374
9576
  var SAFE_CLOSING = false;
@@ -9458,7 +9660,7 @@ var $$3 = _export;
9458
9660
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
9459
9661
  var NativePromiseConstructor = promiseNativeConstructor;
9460
9662
  var getBuiltIn$1 = getBuiltIn$8;
9461
- var isCallable = isCallable$n;
9663
+ var isCallable = isCallable$o;
9462
9664
  var defineBuiltIn = defineBuiltIn$7;
9463
9665
 
9464
9666
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
@@ -9798,7 +10000,7 @@ const EditWalletAddressForm = ({
9798
10000
  }));
9799
10001
  };
9800
10002
 
9801
- const styles$b = createStyles({
10003
+ const styles$d = createStyles({
9802
10004
  grid: theme => ({
9803
10005
  margin: theme.spacing(4)
9804
10006
  })
@@ -9860,7 +10062,7 @@ const WalletForm = ({
9860
10062
  onSubmit: formLogger.capture(handleSubmit)
9861
10063
  }, {
9862
10064
  children: jsxRuntime.jsxs(giger.Grid, Object.assign({
9863
- css: styles$b.grid,
10065
+ css: styles$d.grid,
9864
10066
  noPadding: true
9865
10067
  }, {
9866
10068
  children: [jsxRuntime.jsx(giger.GridChild, Object.assign({
@@ -9942,7 +10144,7 @@ const WalletForm = ({
9942
10144
  }));
9943
10145
  };
9944
10146
 
9945
- const styles$a = createStyles({
10147
+ const styles$c = createStyles({
9946
10148
  container: theme => ({
9947
10149
  padding: theme.spacing(2)
9948
10150
  }),
@@ -10118,10 +10320,10 @@ const Onboarding = ({
10118
10320
  const defaultWarehouse = (_a = warehouses.find(w => w.isDefault)) !== null && _a !== void 0 ? _a : warehouses[0];
10119
10321
  return jsxRuntime.jsx(AddressPreferenceProvider, Object.assign({
10120
10322
  formHeader: jsxRuntime.jsxs("div", Object.assign({
10121
- css: styles$a.walletFormHeader
10323
+ css: styles$c.walletFormHeader
10122
10324
  }, {
10123
10325
  children: [jsxRuntime.jsxs("div", Object.assign({
10124
- css: styles$a.walletFormTitle
10326
+ css: styles$c.walletFormTitle
10125
10327
  }, {
10126
10328
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({
10127
10329
  variant: "heading4"
@@ -10198,38 +10400,38 @@ const Onboarding = ({
10198
10400
  });
10199
10401
  };
10200
10402
  return jsxRuntime.jsxs("div", Object.assign({
10201
- css: styles$a.container
10403
+ css: styles$c.container
10202
10404
  }, {
10203
10405
  children: [jsxRuntime.jsxs(giger.Stepper, Object.assign({
10204
10406
  currentStep: currentStep
10205
10407
  }, {
10206
10408
  children: [jsxRuntime.jsx(giger.Step, {
10207
- css: styles$a.step,
10409
+ css: styles$c.step,
10208
10410
  label: t("onboarding:steps.login")
10209
10411
  }), jsxRuntime.jsx(giger.Step, {
10210
- css: styles$a.step,
10412
+ css: styles$c.step,
10211
10413
  label: t("onboarding:steps.carriers")
10212
10414
  }), jsxRuntime.jsx(giger.Step, {
10213
- css: styles$a.step,
10415
+ css: styles$c.step,
10214
10416
  label: t("onboarding:steps.addresses")
10215
10417
  }), jsxRuntime.jsx(giger.Step, {
10216
- css: styles$a.step,
10418
+ css: styles$c.step,
10217
10419
  label: t("onboarding:steps.payment")
10218
10420
  })]
10219
- })), renderStep()]
10421
+ })), renderStep(), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(PoweredByShipEngine, {})]
10220
10422
  }));
10221
10423
  };
10222
10424
 
10223
- let _ = t => t,
10224
- _t,
10225
- _t2;
10425
+ let _$1 = t => t,
10426
+ _t$1,
10427
+ _t2$1;
10226
10428
  const Cube = _a => {
10227
10429
  var {
10228
10430
  animate = false
10229
10431
  } = _a,
10230
10432
  props = __rest(_a, ["animate"]);
10231
10433
  const theme = react.useTheme();
10232
- const bounce = react.keyframes(_t || (_t = _`
10434
+ const bounce = react.keyframes(_t$1 || (_t$1 = _$1`
10233
10435
  0%, 100% {
10234
10436
  transform: translateY(-25%);
10235
10437
  animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
@@ -10239,7 +10441,7 @@ const Cube = _a => {
10239
10441
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
10240
10442
  }
10241
10443
  `));
10242
- const spin = react.keyframes(_t2 || (_t2 = _`
10444
+ const spin = react.keyframes(_t2$1 || (_t2$1 = _$1`
10243
10445
  from {
10244
10446
  transform: rotate(0deg);
10245
10447
  }
@@ -10342,12 +10544,12 @@ const Loader = props => {
10342
10544
  }
10343
10545
  }, {
10344
10546
  children: jsxRuntime.jsx(giger.Spinner, Object.assign({}, props, {
10345
- size: giger.SpinnerSize.SIZE_LARGE
10547
+ size: props.size || giger.SpinnerSize.SIZE_LARGE
10346
10548
  }))
10347
10549
  }));
10348
10550
  };
10349
10551
 
10350
- const styles$9 = createStyles({
10552
+ const styles$b = createStyles({
10351
10553
  chipList: theme => ({
10352
10554
  gap: theme.spacing(1)
10353
10555
  }),
@@ -10458,7 +10660,7 @@ const AddFundsForm = ({
10458
10660
  })), jsxRuntime.jsx(Spacer, {
10459
10661
  multiplier: 2
10460
10662
  }), jsxRuntime.jsx(giger.ChipList, Object.assign({
10461
- css: styles$9.chipList,
10663
+ css: styles$b.chipList,
10462
10664
  onChange: idx => {
10463
10665
  const chip = chips[idx];
10464
10666
  setSelectedChip(chip);
@@ -10473,7 +10675,7 @@ const AddFundsForm = ({
10473
10675
  }
10474
10676
  }, {
10475
10677
  children: chips.map(chip => jsxRuntime.jsx(giger.Chip, Object.assign({
10476
- css: styles$9.getChip({
10678
+ css: styles$b.getChip({
10477
10679
  isDisabled: chip.value < _minimumAmount,
10478
10680
  isSelected: chip.value === selectedChip.value
10479
10681
  }),
@@ -10490,7 +10692,7 @@ const AddFundsForm = ({
10490
10692
  multiplier: 1
10491
10693
  }), jsxRuntime.jsx(MoneyInput, {
10492
10694
  control: form.control,
10493
- css: styles$9.fundsInput,
10695
+ css: styles$b.fundsInput,
10494
10696
  defaultValue: {
10495
10697
  amount: undefined,
10496
10698
  currency: alchemy.SE.Currency.USD
@@ -10543,7 +10745,7 @@ const AddFundsForm = ({
10543
10745
  });
10544
10746
  };
10545
10747
 
10546
- const styles$8 = isLabelRight => createStyles({
10748
+ const styles$a = isLabelRight => createStyles({
10547
10749
  inlineContainer: theme => ({
10548
10750
  alignItems: "center",
10549
10751
  display: "flex",
@@ -10558,14 +10760,14 @@ const InlineLabel = ({
10558
10760
  isLabelRight,
10559
10761
  labelProps: _labelProps = {}
10560
10762
  }) => jsxRuntime.jsxs("div", Object.assign({
10561
- css: styles$8(isLabelRight).inlineContainer
10763
+ css: styles$a(isLabelRight).inlineContainer
10562
10764
  }, {
10563
10765
  children: [jsxRuntime.jsx(giger.Typography, Object.assign({}, _labelProps, {
10564
10766
  children: label
10565
10767
  })), children]
10566
10768
  }));
10567
10769
 
10568
- const styles$7 = createStyles({
10770
+ const styles$9 = createStyles({
10569
10771
  getBalanceText: balance => theme => ({
10570
10772
  color: balance === undefined ? theme.palette.alert.main : balance >= 0 ? theme.palette.secondary.dark : theme.palette.error.main
10571
10773
  })
@@ -10588,7 +10790,7 @@ const CarrierBalance = ({
10588
10790
  }, {
10589
10791
  children: isLoadingCarrier || isRefetchingCarrier ? jsxRuntime.jsx(giger.Spinner, {}) : jsxRuntime.jsx(giger.Typography, Object.assign({
10590
10792
  bold: true,
10591
- css: styles$7.getBalanceText(balance)
10793
+ css: styles$9.getBalanceText(balance)
10592
10794
  }, {
10593
10795
  children: balance === undefined ? t("manage-funding:errors.balanceUnknown") : formatMoney({
10594
10796
  amount: balance,
@@ -10610,7 +10812,7 @@ const Spread = ({
10610
10812
  children: children
10611
10813
  }));
10612
10814
 
10613
- const styles$6 = createStyles({
10815
+ const styles$8 = createStyles({
10614
10816
  balanceText: theme => ({
10615
10817
  color: theme.palette.secondary.dark
10616
10818
  }),
@@ -10678,7 +10880,7 @@ const FundAndPurchase = ({
10678
10880
  }, {
10679
10881
  children: [jsxRuntime.jsx(giger.Button, Object.assign({
10680
10882
  bold: false,
10681
- css: styles$6.saveRateButton,
10883
+ css: styles$8.saveRateButton,
10682
10884
  disabled: disabled || !carrierId || addFundsForm.isSubmitting || isRateFormSubmitting,
10683
10885
  isLoading: isSavingRate,
10684
10886
  onClick: handleSaveRate,
@@ -10698,7 +10900,7 @@ const FundAndPurchase = ({
10698
10900
  // don't show balance or funding form
10699
10901
  if (!isFundingRequired) return jsxRuntime.jsx("div", Object.assign({
10700
10902
  className: className,
10701
- css: styles$6.container
10903
+ css: styles$8.container
10702
10904
  }, {
10703
10905
  children: renderActionButtons()
10704
10906
  }));
@@ -10711,7 +10913,7 @@ const FundAndPurchase = ({
10711
10913
  // show balance, but not the funding form.
10712
10914
  if (!isFundingEnabled) return jsxRuntime.jsxs("div", Object.assign({
10713
10915
  className: className,
10714
- css: styles$6.container
10916
+ css: styles$8.container
10715
10917
  }, {
10716
10918
  children: [jsxRuntime.jsx(CarrierBalance, {
10717
10919
  carrierId: carrierId
@@ -10723,7 +10925,7 @@ const FundAndPurchase = ({
10723
10925
  // show balance and funding form
10724
10926
  return jsxRuntime.jsxs("div", Object.assign({
10725
10927
  className: className,
10726
- css: styles$6.container
10928
+ css: styles$8.container
10727
10929
  }, {
10728
10930
  children: [jsxRuntime.jsxs(Spread, {
10729
10931
  children: [jsxRuntime.jsx(CarrierBalance, {
@@ -10754,13 +10956,13 @@ const FundAndPurchase = ({
10754
10956
  var _a, _b;
10755
10957
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
10756
10958
  children: [jsxRuntime.jsxs("section", Object.assign({
10757
- css: styles$6.getFormExtension(addFundsForm.isCustomAmount)
10959
+ css: styles$8.getFormExtension(addFundsForm.isCustomAmount)
10758
10960
  }, {
10759
10961
  children: [jsxRuntime.jsx(InlineLabel, Object.assign({
10760
10962
  label: t("manage-funding:fundAndPurchase.newBalance")
10761
10963
  }, {
10762
10964
  children: jsxRuntime.jsx(giger.Typography, Object.assign({
10763
- css: styles$6.balanceText
10965
+ css: styles$8.balanceText
10764
10966
  }, {
10765
10967
  children: formatMoney({
10766
10968
  amount: balance + ((_a = addFundsForm.selectedAmount) !== null && _a !== void 0 ? _a : 0),
@@ -10771,7 +10973,7 @@ const FundAndPurchase = ({
10771
10973
  label: t("manage-funding:fundAndPurchase.finalBalance")
10772
10974
  }, {
10773
10975
  children: jsxRuntime.jsx(giger.Typography, Object.assign({
10774
- css: styles$6.balanceText
10976
+ css: styles$8.balanceText
10775
10977
  }, {
10776
10978
  children: formatMoney({
10777
10979
  amount: balance + ((_b = addFundsForm.selectedAmount) !== null && _b !== void 0 ? _b : 0) - purchaseAmount,
@@ -10844,7 +11046,135 @@ const LabelLayoutPurchase = ({
10844
11046
  });
10845
11047
  };
10846
11048
 
10847
- const styles$5 = createStyles({
11049
+ let _ = t => t,
11050
+ _t,
11051
+ _t2,
11052
+ _t3;
11053
+ const stroke = react.keyframes(_t || (_t = _`
11054
+ 100% {
11055
+ stroke-dashoffset: 0;
11056
+ }
11057
+ `));
11058
+ const fadeInOut = react.keyframes(_t2 || (_t2 = _`
11059
+ 0%, 100% {
11060
+ opacity: 0;
11061
+ }
11062
+ 20% {
11063
+ opacity: 1;
11064
+ }
11065
+ 85% {
11066
+ opacity: 1;
11067
+ }
11068
+ `));
11069
+ const fill = react.keyframes(_t3 || (_t3 = _`
11070
+ 100% {
11071
+ box-shadow: inset 0px 0px 0px 30px #3F8200;
11072
+ `));
11073
+ const colors = {
11074
+ green: "#3F8200",
11075
+ grey: "#706F6F",
11076
+ red: "#EE3B3F"
11077
+ };
11078
+ const styles$7 = createStyles({
11079
+ checkmark: () => ({
11080
+ animation: `${fill} forwards`,
11081
+ borderRadius: "50%",
11082
+ height: "20px,",
11083
+ stroke: "#fff",
11084
+ width: "20px"
11085
+ }),
11086
+ checkmarkCheck: () => ({
11087
+ animation: `${stroke} 1s forwards`,
11088
+ strokeDasharray: "48",
11089
+ strokeDashoffset: "48"
11090
+ }),
11091
+ container: theme => ({
11092
+ alignItems: "center",
11093
+ animation: `${fadeInOut} 2.5s ease-in-out forwards`,
11094
+ display: "flex",
11095
+ justifyContent: "flex-start",
11096
+ padding: `0 ${theme.spacing(2)}px 0 0`
11097
+ }),
11098
+ saved: theme => ({
11099
+ color: colors.green,
11100
+ marginLeft: `${theme.spacing(1)}px`
11101
+ }),
11102
+ saving: theme => ({
11103
+ marginLeft: `${theme.spacing(1)}px`
11104
+ }),
11105
+ savingContainer: () => ({
11106
+ alignItems: "center",
11107
+ color: colors.grey,
11108
+ display: "flex",
11109
+ justifyContent: "flex-start"
11110
+ }),
11111
+ savingFailed: theme => ({
11112
+ color: "#EE3B3F",
11113
+ marginLeft: `${theme.spacing(1)}px`
11114
+ })
11115
+ });
11116
+
11117
+ const SaveStatus = ({
11118
+ errors,
11119
+ isSaving
11120
+ }) => {
11121
+ const {
11122
+ t
11123
+ } = reactI18next.useTranslation(["manage-defaults"]);
11124
+ if (isSaving) {
11125
+ return jsxRuntime.jsxs("div", Object.assign({
11126
+ css: styles$7.savingContainer
11127
+ }, {
11128
+ children: [jsxRuntime.jsx(Loader, {
11129
+ color: colors.grey,
11130
+ css: {
11131
+ color: colors.grey
11132
+ },
11133
+ size: giger.SpinnerSize.SIZE_SMALL
11134
+ }), jsxRuntime.jsx(giger.Typography, Object.assign({
11135
+ css: styles$7.saving
11136
+ }, {
11137
+ children: t("manage-defaults:status.saving")
11138
+ }))]
11139
+ }));
11140
+ }
11141
+ return !isSaving && !errors ? jsxRuntime.jsxs("div", Object.assign({
11142
+ css: styles$7.container
11143
+ }, {
11144
+ children: [jsxRuntime.jsx("svg", Object.assign({
11145
+ css: styles$7.checkmark,
11146
+ viewBox: "0 0 52 52"
11147
+ }, {
11148
+ children: jsxRuntime.jsx("path", {
11149
+ css: styles$7.checkmarkCheck,
11150
+ d: "M14.1 27.2l7.1 7.2 16.7-16.8",
11151
+ fill: "none",
11152
+ strokeWidth: "5px"
11153
+ })
11154
+ })), jsxRuntime.jsx(giger.Typography, Object.assign({
11155
+ css: styles$7.saved
11156
+ }, {
11157
+ children: t("manage-defaults:status.saved")
11158
+ }))]
11159
+ })) : jsxRuntime.jsxs("div", Object.assign({
11160
+ css: [styles$7.container, {
11161
+ padding: "0"
11162
+ }]
11163
+ }, {
11164
+ children: [jsxRuntime.jsx(giger.Icon, {
11165
+ css: {
11166
+ color: colors.red
11167
+ },
11168
+ name: gigerTheme.IconNames.CANCEL_FILLED
11169
+ }), jsxRuntime.jsx(giger.Typography, Object.assign({
11170
+ css: styles$7.savingFailed
11171
+ }, {
11172
+ children: t("manage-defaults:status.savingFailed")
11173
+ }))]
11174
+ }));
11175
+ };
11176
+
11177
+ const styles$6 = createStyles({
10848
11178
  button: theme => ({
10849
11179
  backgroundColor: "transparent",
10850
11180
  padding: 0
@@ -10870,10 +11200,10 @@ const styles$5 = createStyles({
10870
11200
  cursor: "pointer",
10871
11201
  display: "flex",
10872
11202
  flexDirection: "column",
10873
- height: theme.spacing(32),
11203
+ height: theme.spacing(31),
10874
11204
  marginRight: theme.spacing(3.5),
10875
11205
  position: "relative",
10876
- width: theme.spacing(24)
11206
+ width: theme.spacing(22)
10877
11207
  }),
10878
11208
  letterInner: theme => ({
10879
11209
  backgroundColor: "white",
@@ -10898,10 +11228,10 @@ const styles$5 = createStyles({
10898
11228
  cursor: "pointer",
10899
11229
  display: "flex",
10900
11230
  flexDirection: "column",
10901
- height: theme.spacing(32),
11231
+ height: theme.spacing(31),
10902
11232
  marginRight: theme.spacing(3.5),
10903
11233
  position: "relative",
10904
- width: theme.spacing(24)
11234
+ width: theme.spacing(22)
10905
11235
  }),
10906
11236
  selectedThermal: theme => ({
10907
11237
  alignItems: "center",
@@ -10912,9 +11242,9 @@ const styles$5 = createStyles({
10912
11242
  cursor: "pointer",
10913
11243
  display: "flex",
10914
11244
  flexDirection: "column",
10915
- height: theme.spacing(32),
11245
+ height: theme.spacing(31),
10916
11246
  position: "relative",
10917
- width: theme.spacing(24)
11247
+ width: theme.spacing(22)
10918
11248
  }),
10919
11249
  thermal: theme => ({
10920
11250
  ":hover": {
@@ -10926,9 +11256,9 @@ const styles$5 = createStyles({
10926
11256
  cursor: "pointer",
10927
11257
  display: "flex",
10928
11258
  flexDirection: "column",
10929
- height: theme.spacing(32),
11259
+ height: theme.spacing(31),
10930
11260
  position: "relative",
10931
- width: theme.spacing(24)
11261
+ width: theme.spacing(22)
10932
11262
  }),
10933
11263
  thermalIcon: theme => ({
10934
11264
  backgroundColor: "#95C2E0",
@@ -10952,6 +11282,8 @@ const styles$5 = createStyles({
10952
11282
  });
10953
11283
 
10954
11284
  const LabelLayoutSettings = ({
11285
+ errors,
11286
+ isSaving,
10955
11287
  onChange
10956
11288
  }) => {
10957
11289
  var _a;
@@ -10964,13 +11296,17 @@ const LabelLayoutSettings = ({
10964
11296
  const labelLayout = (_a = accountSettings === null || accountSettings === void 0 ? void 0 : accountSettings.defaultLabelLayout) === null || _a === void 0 ? void 0 : _a.toLowerCase();
10965
11297
  return jsxRuntime.jsx(Section, Object.assign({
10966
11298
  bold: true,
11299
+ rightContent: jsxRuntime.jsx(SaveStatus, {
11300
+ errors: errors,
11301
+ isSaving: isSaving
11302
+ }),
10967
11303
  title: t("manage-defaults:label.title")
10968
11304
  }, {
10969
11305
  children: jsxRuntime.jsxs("div", Object.assign({
10970
- css: styles$5.buttonContainer
11306
+ css: styles$6.buttonContainer
10971
11307
  }, {
10972
11308
  children: [jsxRuntime.jsx("button", Object.assign({
10973
- css: styles$5.button,
11309
+ css: styles$6.button,
10974
11310
  id: "letter",
10975
11311
  onClick: () => {
10976
11312
  onChange("Letter");
@@ -10978,16 +11314,16 @@ const LabelLayoutSettings = ({
10978
11314
  value: "letter"
10979
11315
  }, {
10980
11316
  children: jsxRuntime.jsxs("div", Object.assign({
10981
- css: labelLayout === "letter" ? styles$5.selectedLetter : styles$5.letter
11317
+ css: labelLayout === "letter" ? styles$6.selectedLetter : styles$6.letter
10982
11318
  }, {
10983
11319
  children: [labelLayout === "letter" && jsxRuntime.jsx(giger.Icon, {
10984
- css: styles$5.icon,
11320
+ css: styles$6.icon,
10985
11321
  name: brands.IconNames.CHECK_FILLED
10986
11322
  }), jsxRuntime.jsx("div", Object.assign({
10987
- css: styles$5.letterInner
11323
+ css: styles$6.letterInner
10988
11324
  }, {
10989
11325
  children: jsxRuntime.jsx("div", {
10990
- css: styles$5.letterLabel
11326
+ css: styles$6.letterLabel
10991
11327
  })
10992
11328
  })), jsxRuntime.jsx(giger.Typography, {
10993
11329
  children: t("manage-defaults:label.letter.title")
@@ -11002,7 +11338,7 @@ const LabelLayoutSettings = ({
11002
11338
  }))]
11003
11339
  }))
11004
11340
  })), jsxRuntime.jsx("button", Object.assign({
11005
- css: styles$5.button,
11341
+ css: styles$6.button,
11006
11342
  id: "4x6",
11007
11343
  onClick: e => {
11008
11344
  onChange(e.currentTarget.value);
@@ -11010,16 +11346,16 @@ const LabelLayoutSettings = ({
11010
11346
  value: "4x6"
11011
11347
  }, {
11012
11348
  children: jsxRuntime.jsxs("div", Object.assign({
11013
- css: labelLayout === "4x6" ? styles$5.selectedThermal : styles$5.thermal
11349
+ css: labelLayout === "4x6" ? styles$6.selectedThermal : styles$6.thermal
11014
11350
  }, {
11015
11351
  children: [labelLayout === "4x6" && jsxRuntime.jsx(giger.Icon, {
11016
- css: styles$5.icon,
11352
+ css: styles$6.icon,
11017
11353
  name: brands.IconNames.CHECK_FILLED
11018
11354
  }), jsxRuntime.jsx("div", Object.assign({
11019
- css: styles$5.thermalInner
11355
+ css: styles$6.thermalInner
11020
11356
  }, {
11021
11357
  children: jsxRuntime.jsx("div", {
11022
- css: styles$5.thermalLabel
11358
+ css: styles$6.thermalLabel
11023
11359
  })
11024
11360
  })), jsxRuntime.jsx(giger.Typography, {
11025
11361
  children: t("manage-defaults:label.thermal.title")
@@ -11042,6 +11378,8 @@ const LabelLayout = ({
11042
11378
  display
11043
11379
  }) => {
11044
11380
  const {
11381
+ error: updateAccountSettingsErrors,
11382
+ isLoading: updatingAccountSettings,
11045
11383
  mutateAsync: updateAccountSettings
11046
11384
  } = alchemy.useUpdateAccountSettings();
11047
11385
  const {
@@ -11059,6 +11397,8 @@ const LabelLayout = ({
11059
11397
  });
11060
11398
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
11061
11399
  children: [display === "settings" && jsxRuntime.jsx(LabelLayoutSettings, {
11400
+ errors: updateAccountSettingsErrors,
11401
+ isSaving: updatingAccountSettings,
11062
11402
  onChange: handleSubmitUpdateAccountSettings
11063
11403
  }), display === "purchase" && jsxRuntime.jsx(LabelLayoutPurchase, {
11064
11404
  onChange: handleSubmitUpdateAccountSettings
@@ -11066,7 +11406,7 @@ const LabelLayout = ({
11066
11406
  });
11067
11407
  };
11068
11408
 
11069
- const styles$4 = createStyles({
11409
+ const styles$5 = createStyles({
11070
11410
  fundAndPurchase: theme => ({
11071
11411
  borderTop: `1px solid ${theme.palette.gray.ultraLight}`
11072
11412
  }),
@@ -11090,6 +11430,50 @@ const rateSchema = zod.z.object({
11090
11430
  })
11091
11431
  }).transform(schema => schema.rate.rateId);
11092
11432
 
11433
+ var _path, _path2;
11434
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11435
+ var SvgShipengineLogo = function SvgShipengineLogo(props) {
11436
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
11437
+ width: 244,
11438
+ height: 31,
11439
+ fill: "none",
11440
+ xmlns: "http://www.w3.org/2000/svg"
11441
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
11442
+ d: "M25.038 15.5c0-.954-.357-1.789-1.073-2.504-.715-.715-1.55-1.073-2.503-1.073-.954 0-1.789.358-2.504 1.073-.716.715-1.073 1.55-1.073 2.504s.357 1.788 1.073 2.504c.715.715 1.55 1.073 2.504 1.073.953 0 1.788-.358 2.503-1.073.716-.716 1.073-1.55 1.073-2.504zm7.154-1.55v3.1c0 .12 0 .238-.119.358l-.238.238-2.623.358c-.12.477-.358.954-.597 1.192.358.477.835 1.073 1.55 1.908.12.12.12.238.12.358 0 .119 0 .238-.12.357-.238.358-.715.835-1.311 1.55-.596.716-1.073.954-1.312.954-.119 0-.238 0-.357-.12l-2.027-1.55c-.358.24-.835.359-1.312.478-.12 1.311-.238 2.146-.358 2.623 0 .357-.238.477-.476.477h-3.1c-.12 0-.239 0-.358-.12-.12-.119-.12-.238-.12-.357l-.357-2.623c-.477-.12-.835-.358-1.312-.477l-2.027 1.55c-.119.12-.238.12-.357.12-.12 0-.239 0-.358-.12-1.192-1.073-1.908-1.789-2.265-2.385-.12-.119-.12-.238-.12-.357 0-.12 0-.239.12-.358.119-.239.357-.477.715-.954s.596-.715.715-.954c-.238-.477-.477-.954-.596-1.43l-2.504-.358c-.119 0-.238-.12-.238-.12s-.12-.119-.12-.238v-3.1c0-.12 0-.239.12-.358l.238-.238 2.623-.358c.12-.477.358-.835.597-1.311-.358-.477-.835-1.193-1.55-1.908-.12-.12-.12-.239-.12-.358s0-.238.12-.357c.238-.358.715-.835 1.43-1.55.716-.716 1.073-.954 1.312-.954.12 0 .238 0 .358.119l1.907 1.55c.358-.239.835-.358 1.312-.477.12-1.312.238-2.146.358-2.623.119-.239.238-.358.477-.358h3.1c.119 0 .238 0 .357.12.12.119.12.238.12.357l.357 2.623c.477.12.835.358 1.312.477l2.027-1.55c.119-.12.238-.12.357-.12.12 0 .239 0 .358.12 1.192 1.073 2.027 1.908 2.265 2.385.12.119.12.119.12.357 0 .12 0 .239-.12.358-.119.239-.357.477-.715.954s-.596.715-.715.954c.238.477.477.954.596 1.311l2.504.358c.119 0 .238.12.238.12s.12.238.12.357z",
11443
+ fill: "#45AAF2"
11444
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
11445
+ d: "M0 16.335v-1.789a1.7 1.7 0 0 0 1.43-.715c.358-.477.478-1.073.478-1.789V4.77c0-1.43.477-2.623 1.311-3.457C4.173.358 5.127 0 6.32 0h2.146v2.027H6.32c-.596 0-1.192.238-1.669.835-.477.596-.715 1.192-.715 2.026V12.4c0 1.67-.597 2.623-1.67 3.1 1.073.477 1.67 1.55 1.67 3.1v7.63c0 .835.238 1.55.715 2.028.477.596 1.073.834 1.67.834h2.145V31H6.32c-1.192 0-2.265-.477-3.1-1.311-.954-.835-1.311-2.027-1.311-3.458v-7.393c0-.715-.12-1.311-.477-1.788A1.7 1.7 0 0 0 0 16.335zm34.577 12.638h2.146c.596 0 1.192-.238 1.67-.834.476-.597.715-1.193.715-2.027V18.6c0-1.67.596-2.742 1.669-3.1-1.073-.477-1.67-1.55-1.67-3.1V4.888c0-.834-.238-1.55-.715-2.026-.477-.597-1.073-.835-1.669-.835h-2.146V0h2.146c1.192 0 2.265.477 3.1 1.312.835.834 1.312 2.026 1.312 3.457v7.273c0 .716.119 1.312.477 1.789.357.477.834.715 1.311.715v1.789c-.477 0-.835.238-1.192.715-.358.477-.477 1.073-.477 1.788v7.393c0 1.43-.477 2.504-1.312 3.457-.954.835-2.027 1.312-3.219 1.312h-2.146v-2.027zm17.884-7.75 1.193-1.55c.596.716 1.311 1.192 2.146 1.67.835.476 1.788.596 2.861.596.716 0 1.312-.12 1.789-.239.477-.12.954-.358 1.192-.715.358-.12.596-.477.716-.716.119-.357.238-.596.238-.954 0-.477-.12-.834-.358-1.192a2.784 2.784 0 0 0-.834-.835c-.358-.238-.835-.357-1.312-.596-.477-.238-.954-.357-1.55-.477-.596-.119-1.073-.238-1.55-.476a8.281 8.281 0 0 1-1.55-.597c-.477-.238-.954-.477-1.311-.834-.358-.358-.716-.716-.835-1.193-.238-.476-.358-1.073-.358-1.669 0-1.311.477-2.384 1.55-3.22 1.073-.834 2.385-1.191 3.935-1.191 2.385 0 4.292.715 5.723 2.265l-1.192 1.43c-1.193-1.31-2.743-1.907-4.65-1.907-.954 0-1.789.239-2.385.715-.596.477-.954 1.073-.954 1.789 0 .358.12.715.358 1.073s.477.477.835.715c.357.239.834.358 1.311.477.477.12.954.239 1.55.477.596.239 1.073.477 1.55.596a8.28 8.28 0 0 1 1.55.597c.477.238.954.476 1.312.834.357.358.715.715.834 1.192.12.477.358 1.073.358 1.67 0 .477-.12.954-.239 1.43-.119.477-.357.835-.596 1.312l-1.073 1.073a3.562 3.562 0 0 1-1.669.715c-.835.239-1.55.358-2.385.358-2.623 0-4.65-.834-6.2-2.623zm18.958 2.385V7.512h2.027v6.796h9.42V7.392h2.026v16.096h-2.027v-7.392h-9.419v7.392h-2.027v.12zm20.985 0V7.512h2.027v16.096h-2.027zm9.657 0V7.512h6.439c1.55 0 2.742.476 3.696 1.43.954.954 1.312 2.146 1.312 3.458a5.193 5.193 0 0 1-1.312 3.458c-.954.834-2.146 1.311-3.696 1.311h-4.531v6.439h-1.908zm2.027-8.227h4.173c.954 0 1.67-.239 2.385-.835.715-.596.954-1.311.954-2.265 0-.954-.358-1.67-.954-2.266-.596-.596-1.431-.834-2.385-.834h-4.173v6.2zm15.5 8.227V7.512h11.804v3.577h-7.631v2.503h7.512v3.577h-7.512v2.742h7.631v3.577h-11.804v.12zm18.123 0V7.512h4.174l6.557 8.823V7.512h4.173v16.096h-4.054l-6.796-9.3v9.3h-4.054zm20.866-8.108c0-1.192.238-2.385.715-3.458.477-1.073 1.073-1.907 1.908-2.623.835-.715 1.669-1.311 2.742-1.669 1.073-.358 2.146-.596 3.458-.596.835 0 1.669.12 2.385.358.715.238 1.43.476 1.907.834.596.358 1.073.835 1.431 1.192l1.073 1.431-3.458 1.789a4.103 4.103 0 0 0-1.43-1.431c-.597-.358-1.312-.596-2.027-.596-1.312 0-2.385.477-3.22 1.311-.834.835-1.311 2.027-1.311 3.339 0 1.311.477 2.384 1.311 3.338.835.835 1.908 1.312 3.22 1.312.596 0 1.073-.12 1.669-.239.596-.238.954-.477 1.311-.715v-1.192h-3.576v-3.577h7.75v6.438c-1.908 2.146-4.293 3.1-7.154 3.1-1.193 0-2.385-.238-3.458-.596a7.074 7.074 0 0 1-2.742-1.67c-.835-.715-1.431-1.55-1.908-2.622-.358-1.073-.596-2.266-.596-3.458zm22.058 8.108V7.512h4.173v16.096h-4.173zm10.85 0V7.512h4.292l6.558 8.823V7.512h4.173v16.096h-4.054l-6.796-9.3v9.3h-4.173zm21.7 0V7.512h11.803v3.577h-7.63v2.503h7.511v3.577h-7.511v2.742h7.63v3.577h-11.803v.12zm18.123-13.712c0-.715.238-1.43.834-1.908.596-.476 1.193-.834 1.908-.834.477 0 .954.12 1.431.358.477.238.715.596.954.953.238.358.357.835.357 1.431 0 .715-.238 1.43-.834 1.908-.597.477-1.193.835-1.908.835-.715 0-1.431-.239-1.908-.835-.477-.596-.834-1.193-.834-1.908zm.477 0c0 .596.238 1.192.715 1.67.477.476 1.073.715 1.669.715.596 0 1.192-.239 1.669-.716a2.353 2.353 0 0 0 .716-1.669c0-.715-.239-1.192-.716-1.67a2.356 2.356 0 0 0-1.669-.714c-.715 0-1.192.238-1.669.715-.477.358-.715.954-.715 1.67zm1.311 1.55v-3.1h1.312c.238 0 .477.12.715.239s.238.357.238.715-.119.596-.238.715c-.119.12-.358.239-.477.239l.835 1.311h-.596l-.835-1.311h-.596v1.311h-.358v-.119zm.358-1.55h.834c.12 0 .239 0 .358-.12.239-.238.239-.357.239-.476 0-.12 0-.358-.12-.477-.119-.12-.238-.12-.357-.12h-.835v1.193h-.119z",
11446
+ fill: "#162948"
11447
+ })));
11448
+ };
11449
+
11450
+ const styles$4 = createStyles({
11451
+ poweredByShipEngine: {
11452
+ display: "flex",
11453
+ alignItems: "center",
11454
+ justifyContent: "center",
11455
+ textAlign: "center",
11456
+ margin: "1rem 0",
11457
+ gap: "1rem",
11458
+ color: "#818F9C"
11459
+ }
11460
+ });
11461
+
11462
+ const PoweredByShipEngine = () => {
11463
+ const {
11464
+ t
11465
+ } = reactI18next.useTranslation();
11466
+ return jsxRuntime.jsxs("div", Object.assign({
11467
+ css: styles$4.poweredByShipEngine
11468
+ }, {
11469
+ children: [jsxRuntime.jsx(giger.Typography, Object.assign({
11470
+ variant: "subtitle1"
11471
+ }, {
11472
+ children: t("powered-by")
11473
+ })), jsxRuntime.jsx(SvgShipengineLogo, {})]
11474
+ }));
11475
+ };
11476
+
11093
11477
  const RateForm = ({
11094
11478
  carriers,
11095
11479
  disabled,
@@ -11110,6 +11494,7 @@ const RateForm = ({
11110
11494
  }) => {
11111
11495
  features = Object.assign({
11112
11496
  enableGlobalPostFiltering: false,
11497
+ labelLayout: false,
11113
11498
  nicknameRate: true,
11114
11499
  saveRate: true
11115
11500
  }, features !== null && features !== void 0 ? features : {});
@@ -11174,6 +11559,14 @@ const RateForm = ({
11174
11559
  index < 5 && rateOptions.length <= 6 || !option.requiresAcknowledgement && index < 6 && rateOptions.length > 6 || option.rateId === selectedRateId), [rateOptions, selectedRateId]);
11175
11560
  // When rateOptions update, handle scrolling and single-rate auto-selection and form reset
11176
11561
  React.useEffect(() => {
11562
+ if (!(rateOptions === null || rateOptions === void 0 ? void 0 : rateOptions.length)) {
11563
+ form.setValue("rate", {
11564
+ isAcknowledged: false,
11565
+ rateId: ""
11566
+ }, {
11567
+ shouldDirty: true
11568
+ });
11569
+ }
11177
11570
  if (rateOptions.length === 1) {
11178
11571
  form.setValue("rate", {
11179
11572
  isAcknowledged: !rateOptions[0].requiresAcknowledgement,
@@ -11207,6 +11600,7 @@ const RateForm = ({
11207
11600
  children: [!isLoading && !!rateOptions.length ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
11208
11601
  children: [jsxRuntime.jsx(RateSelect, {
11209
11602
  control: form.control,
11603
+ displayErrors: false,
11210
11604
  label: "Rate",
11211
11605
  name: "rate",
11212
11606
  nicknameFeature:
@@ -11215,7 +11609,7 @@ const RateForm = ({
11215
11609
  onClick: onSelectRate,
11216
11610
  options: showHiddenRates ? rateOptions : filteredRateOptions
11217
11611
  }), rateOptions.some(option => option.requiresAcknowledgement) && rateOptions.length > 5 && jsxRuntime.jsx(giger.Link, Object.assign({
11218
- css: styles$4.showMoreOrLessRatesButton,
11612
+ css: styles$5.showMoreOrLessRatesButton,
11219
11613
  onClick: () => {
11220
11614
  var _a;
11221
11615
  setShowHiddenRates(!showHiddenRates);
@@ -11236,7 +11630,7 @@ const RateForm = ({
11236
11630
  }))
11237
11631
  }))]
11238
11632
  }) : !isLoading && !!allDisplayableErrors.length ? null : jsxRuntime.jsxs("article", Object.assign({
11239
- css: styles$4.ratesInterstitial,
11633
+ css: styles$5.ratesInterstitial,
11240
11634
  role: "presentation"
11241
11635
  }, {
11242
11636
  children: [jsxRuntime.jsx(Cube, {
@@ -11250,7 +11644,7 @@ const RateForm = ({
11250
11644
  children: [displayableErrors, outOfBandDisplayableErrors, displayableLabelErrors]
11251
11645
  })
11252
11646
  }))]
11253
- })), !labelsLoading && !(labels === null || labels === void 0 ? void 0 : labels.length) && jsxRuntime.jsx(Section, Object.assign({
11647
+ })), features.labelLayout && !labelsLoading && !(labels === null || labels === void 0 ? void 0 : labels.length) && jsxRuntime.jsx(Section, Object.assign({
11254
11648
  title: t("manage-defaults:label.title")
11255
11649
  }, {
11256
11650
  children: jsxRuntime.jsx(LabelLayout, {
@@ -11259,14 +11653,14 @@ const RateForm = ({
11259
11653
  })), jsxRuntime.jsx(FundAndPurchase, {
11260
11654
  carrierId: selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.carrierId,
11261
11655
  control: form.control,
11262
- css: styles$4.fundAndPurchase,
11656
+ css: styles$5.fundAndPurchase,
11263
11657
  disabled: disabled,
11264
11658
  isFundingEnabled: features === null || features === void 0 ? void 0 : features.enableFunding,
11265
11659
  isFundingRequired: (selectedRate === null || selectedRate === void 0 ? void 0 : selectedRate.balance) !== undefined && !!selectedRate.requiresFundedAmount,
11266
11660
  onPurchase: handleSubmit,
11267
11661
  onSave: handleSaveRate,
11268
11662
  purchaseAmount: getTotalRateAmount(selectedRate)
11269
- })]
11663
+ }), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(PoweredByShipEngine, {})]
11270
11664
  }));
11271
11665
  };
11272
11666
 
@@ -11831,13 +12225,10 @@ const ShipmentForm = ({
11831
12225
  } = reactI18next.useTranslation(["purchase-label"]);
11832
12226
  const [requireMeasurements, setRequireMeasurements] = React.useState(true);
11833
12227
  const [insuranceEnabled, setInsuranceEnabled] = React.useState(false);
11834
- const isCustomsRequired = React.useMemo(() => {
11835
- return shipment ? getIsCustomsRequiredForShipment(shipment) : false;
11836
- }, [shipment]);
11837
- const isContentDescriptionRequired = React.useMemo(() => {
11838
- var _a;
11839
- return shipment && ((_a = shipment.shipFrom) === null || _a === void 0 ? void 0 : _a.countryCode) === "MX" || (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo.countryCode) === "MX";
11840
- }, [shipment]);
12228
+ const {
12229
+ isContentDescriptionRequired,
12230
+ isCustomsRequired
12231
+ } = useShipmentMetadata(shipment);
11841
12232
  const shipmentSchema = React.useMemo(() => getShipmentSchema({
11842
12233
  isContentDescriptionRequired,
11843
12234
  isCustomsRequired,
@@ -11848,7 +12239,7 @@ const ShipmentForm = ({
11848
12239
  const form = reactHookForm.useForm({
11849
12240
  defaultValues: {
11850
12241
  __mode: features.browseRates ? "browse_rates" : "select_service",
11851
- shipDate: minimumShipDate.toLocaleDateString("en-US")
12242
+ shipDate: formatUSADate(minimumShipDate || new Date())
11852
12243
  },
11853
12244
  resolver: validationResolver(shipmentSchema)
11854
12245
  });
@@ -11873,10 +12264,6 @@ const ShipmentForm = ({
11873
12264
  return (carriers !== null && carriers !== void 0 ? carriers : []).filter(c => carrierIds.includes(c.carrierId));
11874
12265
  }, [carrierIds, carriers, selectedMode]);
11875
12266
  const nonAddressValidationErrors = errors === null || errors === void 0 ? void 0 : errors.filter(e => e.errorCode !== "invalid_address");
11876
- const isInternationalShipment = React.useMemo(() => {
11877
- return shipment ? getIsInternationalShipment(shipment) : false;
11878
- }, [shipment]);
11879
- const isPoBoxShipment = React.useMemo(() => (shipment === null || shipment === void 0 ? void 0 : shipment.shipTo) && isPoBoxAddress(shipment.shipTo), [shipment === null || shipment === void 0 ? void 0 : shipment.shipTo]);
11880
12267
  const confirmationOptions = useConfirmationOptions();
11881
12268
  const customsContentsOptions = useCustomsContentsOptions();
11882
12269
  const customsNonDeliveryOptions = useCustomsNonDeliveryOptions();
@@ -11884,9 +12271,9 @@ const ShipmentForm = ({
11884
12271
  includeShipsuranceInsurance: features === null || features === void 0 ? void 0 : features.includeShipsuranceInsurance,
11885
12272
  includeThirdPartyInsurance: features === null || features === void 0 ? void 0 : features.includeThirdPartyInsurance
11886
12273
  });
11887
- const packageOptions = usePackageOptions(selectedCarriers, customPackageTypes, isPoBoxShipment);
11888
- const serviceCodeOptions = useServiceCodeOptions(carriers, !isInternationalShipment, isPoBoxShipment);
11889
- const shippingPresetOptions = useShippingPresetsOptions(shippingPresets, isInternationalShipment);
12274
+ const packageOptions = usePackageOptions(selectedCarriers, customPackageTypes, shipment);
12275
+ const serviceCodeOptions = useServiceCodeOptions(carriers, shipment);
12276
+ const shippingPresetOptions = useShippingPresetsOptions(shippingPresets, shipment);
11890
12277
  const warehouseOptions = useWarehouseOptions(warehouses);
11891
12278
  const [showItems, setShowItems] = React.useState(false);
11892
12279
  const [showApplyPreset, setShowApplyPreset] = React.useState(false);
@@ -11984,7 +12371,7 @@ const ShipmentForm = ({
11984
12371
  carrierId: updatedShipment.carrierId,
11985
12372
  serviceCode: updatedShipment.serviceCode
11986
12373
  } : undefined,
11987
- shipDate: mostRecent(omitTime(updatedShipment.shipDate), minimumShipDate).toLocaleDateString("en-US"),
12374
+ shipDate: formatUSADate(mostRecent(omitTime(updatedShipment.shipDate), minimumShipDate)),
11988
12375
  shipmentId: updatedShipment.shipmentId,
11989
12376
  warehouseId: updatedShipment.warehouseId
11990
12377
  }));
@@ -12146,6 +12533,7 @@ const ShipmentForm = ({
12146
12533
  });
12147
12534
  if (errors) throw new Error(errors.map(e => e.message).join(", "));
12148
12535
  if (!shipment) throw new Error("errorMessages.unableToLoad.shipment");
12536
+ const isEmptyShipTo = Object.entries(shipment.shipTo).every(([key, value]) => key === "countryCode" || [null, "", "unknown"].includes(value));
12149
12537
  return jsxRuntime.jsxs("form", Object.assign({
12150
12538
  id: "shipment-form",
12151
12539
  onSubmit: formLogger.capture(handleSubmit)
@@ -12169,7 +12557,12 @@ const ShipmentForm = ({
12169
12557
  }), jsxRuntime.jsx(FieldLabel, Object.assign({
12170
12558
  label: !isEditShipFormToOpen ? "purchase-label:fields.shipTo" : ""
12171
12559
  }, {
12172
- children: !isEditShipFormToOpen && (addressPreference ? jsxRuntime.jsx(AddressPreferenceDisplay, {
12560
+ children: !isEditShipFormToOpen && (isEmptyShipTo ? jsxRuntime.jsx(giger.Button, Object.assign({
12561
+ onClick: toggleIsEditShipFormToOpen,
12562
+ variant: giger.ButtonVariant.OUTLINED
12563
+ }, {
12564
+ children: t("purchase-label:fields:addShipToAddress")
12565
+ })) : addressPreference ? jsxRuntime.jsx(AddressPreferenceDisplay, {
12173
12566
  addressPreference: addressPreference,
12174
12567
  onChangePreference: handleChangePreference,
12175
12568
  onEditAddress: () => {
@@ -12774,7 +13167,7 @@ const Shipment = ({
12774
13167
  })), "representative."]
12775
13168
  }))
12776
13169
  }))
12777
- }))]
13170
+ })), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(PoweredByShipEngine, {})]
12778
13171
  });
12779
13172
  };
12780
13173
 
@@ -12802,115 +13195,6 @@ const SuspendShipment = ({
12802
13195
  }));
12803
13196
  };
12804
13197
 
12805
- const VoidLabel = ({
12806
- onComplete,
12807
- onSubmit,
12808
- onViewShipment,
12809
- shipment,
12810
- voidRequest
12811
- }) => {
12812
- const {
12813
- t
12814
- } = reactI18next.useTranslation(["common", "void-label"]);
12815
- const [isSubmitting, setIsSubmitting] = React.useState(false);
12816
- const handleSubmit = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
12817
- setIsSubmitting(true);
12818
- yield onSubmit();
12819
- setIsSubmitting(false);
12820
- }), [onSubmit]);
12821
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
12822
- children: [jsxRuntime.jsx(Section, {
12823
- children: voidRequest ? jsxRuntime.jsxs("section", Object.assign({
12824
- css: {
12825
- textAlign: "center",
12826
- width: "100%"
12827
- }
12828
- }, {
12829
- children: [jsxRuntime.jsx(giger.Icon, {
12830
- css: theme => ({
12831
- color: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? theme.palette.success.main : theme.palette.error.main
12832
- }),
12833
- name: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? gigerTheme.IconNames.CHECK_FILLED : gigerTheme.IconNames.ALERT,
12834
- size: giger.IconSize.SIZE_LARGE
12835
- }), (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
12836
- children: [jsxRuntime.jsx(giger.Typography, Object.assign({
12837
- component: "h2"
12838
- }, {
12839
- children: t("void-label:resultTitles.approved")
12840
- })), jsxRuntime.jsx(giger.Typography, Object.assign({
12841
- variant: "body1"
12842
- }, {
12843
- children: t("void-label:resultMessages.approved")
12844
- }))]
12845
- }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
12846
- children: [jsxRuntime.jsx(giger.Typography, Object.assign({
12847
- component: "h2"
12848
- }, {
12849
- children: t("void-label:resultTitles.rejected")
12850
- })), jsxRuntime.jsx(giger.Typography, Object.assign({
12851
- variant: "body1"
12852
- }, {
12853
- children: jsxRuntime.jsx("p", {
12854
- dangerouslySetInnerHTML: {
12855
- __html: t("void-label:resultMessages.rejected")
12856
- }
12857
- })
12858
- }))]
12859
- })]
12860
- })) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
12861
- children: [jsxRuntime.jsx(giger.Typography, Object.assign({
12862
- variant: "body1"
12863
- }, {
12864
- children: t("void-label:refund_process")
12865
- })), jsxRuntime.jsx(giger.Typography, Object.assign({
12866
- component: "p",
12867
- variant: "body1"
12868
- }, {
12869
- children: t("void-label:refund_rules")
12870
- }))]
12871
- })
12872
- }), jsxRuntime.jsx(giger.BottomSheet, Object.assign({
12873
- alwaysVisible: true,
12874
- css: theme => ({
12875
- borderTop: `1px solid ${theme.palette.gray.ultraLight}`,
12876
- boxShadow: "none",
12877
- position: "static"
12878
- })
12879
- }, {
12880
- children: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ?
12881
- // Label has been voided
12882
- jsxRuntime.jsxs(ButtonGroup, {
12883
- children: [jsxRuntime.jsx(giger.Button, Object.assign({
12884
- bold: false,
12885
- onClick: () => shipment && onComplete(voidRequest, shipment),
12886
- type: "button",
12887
- variant: giger.ButtonVariant.OUTLINED
12888
- }, {
12889
- children: t("void-label:actions.complete")
12890
- })), jsxRuntime.jsx(giger.Button, Object.assign({
12891
- bold: false,
12892
- isFullWidth: true,
12893
- onClick: () => shipment && onViewShipment(shipment),
12894
- type: "button"
12895
- }, {
12896
- children: t("void-label:actions.viewShipment")
12897
- }))]
12898
- }) :
12899
- // Label has not yet been voided
12900
- jsxRuntime.jsx(giger.Button, Object.assign({
12901
- bold: false,
12902
- disabled: isSubmitting,
12903
- isFullWidth: true,
12904
- isLoading: isSubmitting,
12905
- onClick: handleSubmit,
12906
- type: "submit"
12907
- }, {
12908
- children: t("void-label:actions.confirmVoid")
12909
- }))
12910
- }))]
12911
- });
12912
- };
12913
-
12914
13198
  var index = /*#__PURE__*/Object.freeze({
12915
13199
  __proto__: null,
12916
13200
  AddCarrierForm: AddCarrierForm,
@@ -12943,9 +13227,8 @@ var index = /*#__PURE__*/Object.freeze({
12943
13227
  Shipment: Shipment,
12944
13228
  SuspendShipment: SuspendShipment,
12945
13229
  WarehouseForm: WarehouseForm,
12946
- VoidLabel: VoidLabel,
12947
13230
  WalletForm: WalletForm,
12948
- styles: styles$b,
13231
+ styles: styles$d,
12949
13232
  billingAddressSchema: billingAddressSchema,
12950
13233
  walletSchema: walletSchema,
12951
13234
  BillingFields: BillingFields,
@@ -13230,6 +13513,7 @@ const DateRangeCombo = ({
13230
13513
  dateFormat: "MM/dd/yyyy",
13231
13514
  isClearable: true,
13232
13515
  label: t("wallet-history:actions.chooseDate"),
13516
+ locale: LOCALE,
13233
13517
  maxDate: new Date(),
13234
13518
  onClickConfirm: dates => {
13235
13519
  if (Array.isArray(dates) && dates.length === 2 && dates[1] !== null) handleConfirmCustomRange(dates);
@@ -13496,6 +13780,7 @@ var common = {
13496
13780
  autoFundingSettings: "Unable to load auto funding settings",
13497
13781
  carrier: "Unable to load carrier",
13498
13782
  carriers: "Unable to load carriers",
13783
+ label: "Unable to load label",
13499
13784
  salesOrder: "Unable to load order",
13500
13785
  shipment: "Unable to load shipment",
13501
13786
  warehouses: "Unable to load warehouses"
@@ -13526,6 +13811,7 @@ var common = {
13526
13811
  carriers: "Loading carriers...",
13527
13812
  data: "Loading...",
13528
13813
  importingSalesOrder: "Importing order...",
13814
+ label: "Loading label...",
13529
13815
  onboarding: "Loading onboarding...",
13530
13816
  salesOrder: "Loading order...",
13531
13817
  shipment: "Loading shipment...",
@@ -13552,6 +13838,7 @@ var common = {
13552
13838
  packageCodes: {
13553
13839
  "package": "Custom"
13554
13840
  },
13841
+ "powered-by": "Powered by",
13555
13842
  schema: {
13556
13843
  optionalLabel: "{{fieldLabel}} (optional)"
13557
13844
  },
@@ -13622,21 +13909,8 @@ var listCarriers$1 = {
13622
13909
 
13623
13910
  var manageDefaults = {
13624
13911
  "manage-defaults": {
13625
- units: {
13626
- title: "Units of Measure",
13627
- dimensions: {
13628
- title: "Dimensions",
13629
- standard: "Inches",
13630
- metric: "Centimeters"
13631
- },
13632
- weight: {
13633
- title: "Weight",
13634
- standard: "Pounds & Ounces",
13635
- g: "Grams",
13636
- kg: "Kilograms"
13637
- }
13638
- },
13639
13912
  label: {
13913
+ title: "Label Printing",
13640
13914
  letter: {
13641
13915
  title: "Letter (8.5 x 11 inch)",
13642
13916
  description: "For desktop printers"
@@ -13648,8 +13922,26 @@ var manageDefaults = {
13648
13922
  thermal: {
13649
13923
  title: "Thermal (4 x 6 inch)",
13650
13924
  description: "For label printers"
13925
+ }
13926
+ },
13927
+ status: {
13928
+ saving: "Saving...",
13929
+ saved: "Saved",
13930
+ savingFailed: "Saving Failed"
13931
+ },
13932
+ units: {
13933
+ title: "Units of Measure",
13934
+ dimensions: {
13935
+ title: "Dimensions",
13936
+ standard: "Inches",
13937
+ metric: "Centimeters"
13651
13938
  },
13652
- title: "Shipping Label Layout"
13939
+ weight: {
13940
+ title: "Weight",
13941
+ standard: "Pounds & Ounces",
13942
+ g: "Grams",
13943
+ kg: "Kilograms"
13944
+ }
13653
13945
  }
13654
13946
  }
13655
13947
  };
@@ -13810,6 +14102,7 @@ var purchaseLabel$1 = {
13810
14102
  shipDate: "Ship Date",
13811
14103
  service: "Service",
13812
14104
  shipTo: "Ship To",
14105
+ addShipToAddress: "Add Ship To Address",
13813
14106
  warehouse: "Ship From",
13814
14107
  weight: {
13815
14108
  whole: "Pounds",
@@ -13945,6 +14238,9 @@ var voidLabel$1 = {
13945
14238
  confirmVoid: "Confirm Void",
13946
14239
  viewShipment: "View Shipment"
13947
14240
  },
14241
+ errorMessages: {
14242
+ labelIdRequired: "A label id is required"
14243
+ },
13948
14244
  resultMessages: {
13949
14245
  approved: "Your refund request has been submitted to the carrier.",
13950
14246
  rejected: "Your label may have already been scanned by the carrier or the label type is ineligible for voiding.<br /><br />Contact your carrier for assistance with shipments currently in transit."
@@ -15111,15 +15407,61 @@ const PurchaseLabelBySalesOrder = _a => {
15111
15407
  }));
15112
15408
  };
15113
15409
 
15114
- const useLoadShipment = ({
15115
- shipmentId
15116
- }) => {
15410
+ let shipmentsCreated = 0;
15411
+ const useGetOrCreateShipment = shipmentId => {
15412
+ const {
15413
+ client
15414
+ } = alchemy.useShipEngine();
15415
+ const shipmentCreation = React.useMemo(() => {
15416
+ return ++shipmentsCreated;
15417
+ },
15418
+ // eslint-disable-next-line react-hooks/exhaustive-deps
15419
+ []);
15420
+ return reactQuery.useQuery({
15421
+ onError: reactApi.onError,
15422
+ retry: shipmentId !== undefined,
15423
+ queryFn: () => __awaiter(void 0, void 0, void 0, function* () {
15424
+ var _a;
15425
+ if (shipmentId) {
15426
+ return (yield client.salesOrderShipments.get(shipmentId)).data;
15427
+ } else {
15428
+ const warehouses = (yield client.warehouses.list()).data.warehouses;
15429
+ const defaultOrFirstWarehouse = (_a = warehouses.find(warehouse => warehouse.isDefault)) !== null && _a !== void 0 ? _a : warehouses[0];
15430
+ if (defaultOrFirstWarehouse === undefined) {
15431
+ throw [alchemy.CodedError.fromObject({
15432
+ message: "errorMessages.noWarehouses",
15433
+ errorType: "unknown",
15434
+ errorCode: "unknown",
15435
+ errorSource: "client"
15436
+ })];
15437
+ }
15438
+ const shipTo = {
15439
+ addressLine1: "",
15440
+ cityLocality: "",
15441
+ countryCode: "",
15442
+ name: "",
15443
+ phone: "",
15444
+ postalCode: "",
15445
+ stateProvince: ""
15446
+ };
15447
+ const newShipment = yield client.shipments.create({
15448
+ shipTo: shipTo,
15449
+ warehouseId: defaultOrFirstWarehouse.warehouseId
15450
+ });
15451
+ return newShipment.data.shipments[0];
15452
+ }
15453
+ }),
15454
+ queryKey: ["useGetOrCreateShipment", shipmentId || `--${shipmentCreation}`]
15455
+ });
15456
+ };
15457
+
15458
+ const useLoadOrCreateShipment = shipmentId => {
15117
15459
  const {
15118
15460
  data: shipment,
15119
15461
  error: loadShipmentErrors,
15120
15462
  refetch: refetchShipment,
15121
15463
  isLoading
15122
- } = alchemy.useGetShipment(shipmentId);
15464
+ } = useGetOrCreateShipment(shipmentId);
15123
15465
  const errors = [...(loadShipmentErrors !== null && loadShipmentErrors !== void 0 ? loadShipmentErrors : [])];
15124
15466
  return {
15125
15467
  errors: errors.length > 0 ? errors : undefined,
@@ -15131,15 +15473,12 @@ const useLoadShipment = ({
15131
15473
 
15132
15474
  const PurchaseLabelByShipment = _a => {
15133
15475
  var {
15134
- shipmentId,
15135
15476
  onLoad,
15136
15477
  onShipmentUpdated,
15137
15478
  features
15138
15479
  } = _a,
15139
- props = __rest(_a, ["shipmentId", "onLoad", "onShipmentUpdated", "features"]);
15140
- const _b = useLoadShipment({
15141
- shipmentId
15142
- }),
15480
+ props = __rest(_a, ["onLoad", "onShipmentUpdated", "features"]);
15481
+ const _b = useLoadOrCreateShipment("shipmentId" in props ? props.shipmentId : undefined),
15143
15482
  {
15144
15483
  shipment
15145
15484
  } = _b,
@@ -15171,16 +15510,11 @@ const PurchaseLabelByShipment = _a => {
15171
15510
  };
15172
15511
 
15173
15512
  const Component$2 = _a => {
15174
- var {
15175
- shipmentId
15176
- } = _a,
15177
- props = __rest(_a, ["shipmentId"]);
15178
- if (shipmentId) {
15179
- return jsxRuntime.jsx(PurchaseLabelByShipment, Object.assign({
15180
- shipmentId: shipmentId
15181
- }, props));
15182
- } else {
15513
+ var props = __rest(_a, []);
15514
+ if ("salesOrderId" in props) {
15183
15515
  return jsxRuntime.jsx(PurchaseLabelBySalesOrder, Object.assign({}, props));
15516
+ } else {
15517
+ return jsxRuntime.jsx(PurchaseLabelByShipment, Object.assign({}, props));
15184
15518
  }
15185
15519
  };
15186
15520
  const Element$2 = alchemy__default["default"].createElement(Component$2, ErrorFallback, {
@@ -15254,6 +15588,111 @@ var viewShipment = /*#__PURE__*/Object.freeze({
15254
15588
  Element: Element$1
15255
15589
  });
15256
15590
 
15591
+ const Actions = ({
15592
+ onComplete,
15593
+ onSubmit,
15594
+ onViewShipment,
15595
+ shipment,
15596
+ voidRequest
15597
+ }) => {
15598
+ const {
15599
+ t
15600
+ } = reactI18next.useTranslation(["common", "void-label"]);
15601
+ const [isSubmitting, setIsSubmitting] = React.useState(false);
15602
+ const handleSubmit = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
15603
+ setIsSubmitting(true);
15604
+ yield onSubmit();
15605
+ setIsSubmitting(false);
15606
+ }), [onSubmit]);
15607
+ return jsxRuntime.jsx(giger.BottomSheet, Object.assign({
15608
+ alwaysVisible: true,
15609
+ css: theme => ({
15610
+ borderTop: `1px solid ${theme.palette.gray.ultraLight}`,
15611
+ boxShadow: "none",
15612
+ position: "static"
15613
+ })
15614
+ }, {
15615
+ children: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ?
15616
+ // The void request has been approved
15617
+ jsxRuntime.jsxs(ButtonGroup, {
15618
+ children: [jsxRuntime.jsx(giger.Button, Object.assign({
15619
+ bold: false,
15620
+ onClick: () => onComplete(voidRequest, shipment),
15621
+ variant: giger.ButtonVariant.OUTLINED
15622
+ }, {
15623
+ children: t("void-label:actions.complete")
15624
+ })), jsxRuntime.jsx(giger.Button, Object.assign({
15625
+ bold: false,
15626
+ isFullWidth: true,
15627
+ onClick: () => onViewShipment(shipment)
15628
+ }, {
15629
+ children: t("void-label:actions.viewShipment")
15630
+ }))]
15631
+ }) :
15632
+ // The void request has yet to be made or was rejected
15633
+ jsxRuntime.jsx(giger.Button, Object.assign({
15634
+ bold: false,
15635
+ isFullWidth: true,
15636
+ isLoading: isSubmitting,
15637
+ onClick: handleSubmit
15638
+ }, {
15639
+ children: t("void-label:actions.confirmVoid")
15640
+ }))
15641
+ }));
15642
+ };
15643
+
15644
+ const Message = ({
15645
+ voidRequest
15646
+ }) => {
15647
+ const {
15648
+ t
15649
+ } = reactI18next.useTranslation(["common", "void-label"]);
15650
+ return jsxRuntime.jsx(Section, {
15651
+ children: voidRequest ? jsxRuntime.jsxs("section", Object.assign({
15652
+ css: {
15653
+ textAlign: "center",
15654
+ width: "100%"
15655
+ }
15656
+ }, {
15657
+ children: [jsxRuntime.jsx(giger.Icon, {
15658
+ css: theme => ({
15659
+ color: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? theme.palette.success.main : theme.palette.error.main
15660
+ }),
15661
+ name: (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? gigerTheme.IconNames.CHECK_FILLED : gigerTheme.IconNames.ALERT,
15662
+ size: giger.IconSize.SIZE_LARGE
15663
+ }), (voidRequest === null || voidRequest === void 0 ? void 0 : voidRequest.approved) ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
15664
+ children: [jsxRuntime.jsx(giger.Typography, Object.assign({
15665
+ component: "h2"
15666
+ }, {
15667
+ children: t("void-label:resultTitles.approved")
15668
+ })), jsxRuntime.jsx(giger.Typography, {
15669
+ children: t("void-label:resultMessages.approved")
15670
+ })]
15671
+ }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
15672
+ children: [jsxRuntime.jsx(giger.Typography, Object.assign({
15673
+ component: "h2"
15674
+ }, {
15675
+ children: t("void-label:resultTitles.rejected")
15676
+ })), jsxRuntime.jsx(giger.Typography, {
15677
+ children: jsxRuntime.jsx("p", {
15678
+ dangerouslySetInnerHTML: {
15679
+ __html: t("void-label:resultMessages.rejected")
15680
+ }
15681
+ })
15682
+ })]
15683
+ })]
15684
+ })) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
15685
+ children: [jsxRuntime.jsx(giger.Typography, {
15686
+ children: t("void-label:refund_process")
15687
+ }), jsxRuntime.jsx(giger.Typography, Object.assign({
15688
+ component: "p"
15689
+ }, {
15690
+ children: t("void-label:refund_rules")
15691
+ }))]
15692
+ })
15693
+ });
15694
+ };
15695
+
15257
15696
  const Component = ({
15258
15697
  labelId,
15259
15698
  onComplete,
@@ -15261,24 +15700,40 @@ const Component = ({
15261
15700
  onViewShipment
15262
15701
  }) => {
15263
15702
  var _a;
15703
+ // TODO [LMNT-910] - labelId should be a required prop
15704
+ if (!labelId) throw new Error("void-label:errorMessages.labelIdRequired");
15705
+ const {
15706
+ t
15707
+ } = reactI18next.useTranslation();
15264
15708
  const label = alchemy.useGetLabel(labelId);
15265
15709
  const shipment = alchemy.useGetSalesOrderShipment((_a = label.data) === null || _a === void 0 ? void 0 : _a.shipmentId);
15266
15710
  const voidLabel = alchemy.useVoidLabel();
15711
+ if (label.isLoading) return jsxRuntime.jsx(Loader, {
15712
+ message: t("loading.label")
15713
+ });
15714
+ if (shipment.isLoading) return jsxRuntime.jsx(Loader, {
15715
+ message: t("loading.shipment")
15716
+ });
15717
+ throwAny(label.error);
15718
+ throwAny(shipment.error);
15719
+ if (!label.data) throw new Error("errorMessages.unableToLoad.label");
15720
+ if (!shipment.data) throw new Error("errorMessages.unableToLoad.shipment");
15267
15721
  const handleVoidLabelSubmit = () => __awaiter(void 0, void 0, void 0, function* () {
15268
- if (!labelId) throw new Error("labelId is required");
15269
15722
  const result = yield voidLabel.mutateAsync(labelId);
15270
- // We should always have label.data and shipment.data if the request was approved,
15271
- // but we aren't using Suspense so we still need to check.
15272
- if ((result === null || result === void 0 ? void 0 : result.approved) && label.data && shipment.data) {
15723
+ if (result.approved) {
15273
15724
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(label.data, shipment.data);
15274
15725
  }
15275
15726
  });
15276
- return jsxRuntime.jsx(VoidLabel, {
15277
- onComplete: onComplete,
15278
- onSubmit: handleVoidLabelSubmit,
15279
- onViewShipment: onViewShipment,
15280
- shipment: shipment.data,
15281
- voidRequest: voidLabel.data
15727
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
15728
+ children: [jsxRuntime.jsx(Message, {
15729
+ voidRequest: voidLabel.data
15730
+ }), jsxRuntime.jsx(Actions, {
15731
+ onComplete: onComplete,
15732
+ onSubmit: handleVoidLabelSubmit,
15733
+ onViewShipment: onViewShipment,
15734
+ shipment: shipment.data,
15735
+ voidRequest: voidLabel.data
15736
+ }), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsx(PoweredByShipEngine, {})]
15282
15737
  });
15283
15738
  };
15284
15739
  const Element = alchemy__default["default"].createElement(Component, ErrorFallback, {
@@ -15321,6 +15776,7 @@ exports.ManageWarehouses = manageWarehouses;
15321
15776
  exports.Onboarding = onboarding;
15322
15777
  exports.PageLayoutProvider = PageLayoutProvider;
15323
15778
  exports.Portal = Portal;
15779
+ exports.PoweredByShipEngine = PoweredByShipEngine;
15324
15780
  exports.PurchaseLabel = purchaseLabel;
15325
15781
  exports.RootPortalProvider = RootPortalProvider;
15326
15782
  exports.Section = Section;
@@ -15374,6 +15830,8 @@ exports.isPoBox = isPoBox;
15374
15830
  exports.isPoBoxAddress = isPoBoxAddress;
15375
15831
  exports.isString = isString;
15376
15832
  exports.isUnitedStatesTerritory = isUnitedStatesTerritory;
15833
+ exports.isUnsupportedByUps = isUnsupportedByUps;
15834
+ exports.isUpsCarrier = isUpsCarrier;
15377
15835
  exports.isUspsCarrier = isUspsCarrier;
15378
15836
  exports.moneySchema = moneySchema;
15379
15837
  exports.mostRecent = mostRecent;
@@ -15384,6 +15842,8 @@ exports.phoneSchema = phoneSchema;
15384
15842
  exports.phoneSchemaUnvalidated = phoneSchemaUnvalidated;
15385
15843
  exports.postalCodeRegex = postalCodeRegex$3;
15386
15844
  exports.sortByCreationDate = sortByCreationDate;
15845
+ exports.throwAny = throwAny;
15846
+ exports.throwJoinedMessages = throwJoinedMessages;
15387
15847
  exports.usCities = usCities;
15388
15848
  exports.usStateCodes = usStateCodes;
15389
15849
  exports.usStates = usStates;
@@ -15403,6 +15863,7 @@ exports.useRateOptions = useRateOptions;
15403
15863
  exports.useRootPortal = useRootPortal;
15404
15864
  exports.useRunOnceOnTrue = useRunOnceOnTrue;
15405
15865
  exports.useServiceCodeOptions = useServiceCodeOptions;
15866
+ exports.useShipmentMetadata = useShipmentMetadata;
15406
15867
  exports.useShippingPresetsOptions = useShippingPresetsOptions;
15407
15868
  exports.useStateCodeOptions = useStateCodeOptions;
15408
15869
  exports.useToggle = useToggle;