@thecb/components 7.12.2-beta.8 → 7.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -203,6 +203,63 @@ function _nonIterableRest() {
203
203
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
204
204
  }
205
205
 
206
+ function _createForOfIteratorHelper(o, allowArrayLike) {
207
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
208
+
209
+ if (!it) {
210
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
211
+ if (it) o = it;
212
+ var i = 0;
213
+
214
+ var F = function () {};
215
+
216
+ return {
217
+ s: F,
218
+ n: function () {
219
+ if (i >= o.length) return {
220
+ done: true
221
+ };
222
+ return {
223
+ done: false,
224
+ value: o[i++]
225
+ };
226
+ },
227
+ e: function (e) {
228
+ throw e;
229
+ },
230
+ f: F
231
+ };
232
+ }
233
+
234
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
235
+ }
236
+
237
+ var normalCompletion = true,
238
+ didErr = false,
239
+ err;
240
+ return {
241
+ s: function () {
242
+ it = it.call(o);
243
+ },
244
+ n: function () {
245
+ var step = it.next();
246
+ normalCompletion = step.done;
247
+ return step;
248
+ },
249
+ e: function (e) {
250
+ didErr = true;
251
+ err = e;
252
+ },
253
+ f: function () {
254
+ try {
255
+ if (!normalCompletion && it.return != null) it.return();
256
+ } finally {
257
+ if (didErr) throw err;
258
+ }
259
+ }
260
+ };
261
+ }
262
+
206
263
  /*! *****************************************************************************
207
264
  Copyright (c) Microsoft Corporation.
208
265
 
@@ -14119,6 +14176,7 @@ var TimeoutImage = function TimeoutImage() {
14119
14176
  };
14120
14177
 
14121
14178
  var AutopayOnIcon = function AutopayOnIcon() {
14179
+ var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SEA_GREEN;
14122
14180
  return /*#__PURE__*/React__default.createElement("svg", {
14123
14181
  xmlns: "http://www.w3.org/2000/svg",
14124
14182
  width: "12",
@@ -14131,7 +14189,7 @@ var AutopayOnIcon = function AutopayOnIcon() {
14131
14189
  strokeWidth: "1"
14132
14190
  }, /*#__PURE__*/React__default.createElement("path", {
14133
14191
  className: "autopayIcon",
14134
- fill: SEA_GREEN,
14192
+ fill: color,
14135
14193
  fillRule: "nonzero",
14136
14194
  d: "M1.898 5.75c.079 0 .141-.02.188-.059a.281.281 0 00.094-.152 3.825 3.825 0 011.394-2.144A3.838 3.838 0 016 2.563c.5 0 .98.09 1.441.27.461.179.88.44 1.254.784l-.984.985A.542.542 0 007.547 5c0 .156.055.29.164.398.11.11.242.165.398.165h3.141c.156 0 .289-.055.398-.165A.542.542 0 0011.812 5V1.86a.542.542 0 00-.164-.399.542.542 0 00-.398-.164.542.542 0 00-.398.164l-.844.844A5.699 5.699 0 006 .688c-.938 0-1.809.207-2.613.62-.805.415-1.48.981-2.028 1.7A5.726 5.726 0 00.281 5.422a.265.265 0 00.059.223c.055.07.129.105.222.105h1.336zM6 12.312c.937 0 1.809-.207 2.613-.62a5.919 5.919 0 002.028-1.7 5.726 5.726 0 001.078-2.414.265.265 0 00-.059-.223.267.267 0 00-.223-.105h-1.335c-.079 0-.141.02-.188.059a.281.281 0 00-.094.152 3.825 3.825 0 01-1.394 2.144c-.711.555-1.52.833-2.426.833-.5 0-.98-.09-1.441-.27a3.985 3.985 0 01-1.254-.785l.984-.985A.542.542 0 004.453 8a.542.542 0 00-.164-.398.542.542 0 00-.398-.164H.75a.542.542 0 00-.398.164A.542.542 0 00.187 8v3.14c0 .157.055.29.165.4.109.108.242.163.398.163.156 0 .29-.055.398-.164l.844-.844A5.699 5.699 0 006 12.312z"
14137
14195
  })));
@@ -17770,63 +17828,7 @@ var fallbackValues$4 = {
17770
17828
  link: link
17771
17829
  };
17772
17830
 
17773
- /*
17774
-
17775
- A utility function that can generate box-shadow values for components
17776
- Takes a string representing an rgb color value and returns an object
17777
- with values for standard, inset, and overlay shadows.
17778
-
17779
- The objects for standard and inset shadows contain versions approiate
17780
- for base, hover, and active interaction states.
17781
-
17782
- */
17783
-
17784
- /*
17785
- Function to convert string representing rgb color to rgba value with provided opacity
17786
- ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
17787
-
17788
- */
17789
- var rgbToRgba = function rgbToRgba() {
17790
- var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
17791
- var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
17792
-
17793
- if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
17794
- return "";
17795
- }
17796
-
17797
- return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
17798
- };
17799
-
17800
- var generateShadows = function generateShadows() {
17801
- var baseColorRGB = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(41, 42, 51)";
17802
- var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
17803
- var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
17804
- var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
17805
- var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
17806
- var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
17807
- var standard = {
17808
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17809
- hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
17810
- active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
17811
- };
17812
- var inset = {
17813
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17814
- hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
17815
- active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
17816
- };
17817
- var overlay = {
17818
- base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
17819
- };
17820
- return {
17821
- standard: standard,
17822
- inset: inset,
17823
- overlay: overlay
17824
- };
17825
- };
17826
-
17827
17831
  var Alert = function Alert(_ref) {
17828
- var _generateShadows, _generateShadows$inse;
17829
-
17830
17832
  var heading = _ref.heading,
17831
17833
  text = _ref.text,
17832
17834
  textOverride = _ref.textOverride,
@@ -17840,13 +17842,7 @@ var Alert = function Alert(_ref) {
17840
17842
  showQuitLink = _ref$showQuitLink === void 0 ? true : _ref$showQuitLink,
17841
17843
  themeValues = _ref.themeValues,
17842
17844
  extraStyles = _ref.extraStyles,
17843
- maxContentWidth = _ref.maxContentWidth,
17844
- _ref$noBorder = _ref.noBorder,
17845
- noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
17846
- _ref$enableBoxShadow = _ref.enableBoxShadow,
17847
- enableBoxShadow = _ref$enableBoxShadow === void 0 ? false : _ref$enableBoxShadow,
17848
- _ref$enableSmallText = _ref.enableSmallText,
17849
- enableSmallText = _ref$enableSmallText === void 0 ? false : _ref$enableSmallText;
17845
+ maxContentWidth = _ref.maxContentWidth;
17850
17846
  var Icon = AlertIcons[variant];
17851
17847
  var content = /*#__PURE__*/React__default.createElement(Sidebar, {
17852
17848
  width: "24px",
@@ -17876,7 +17872,7 @@ var Alert = function Alert(_ref) {
17876
17872
  fullHeight: true,
17877
17873
  childGap: "0.25rem"
17878
17874
  }, /*#__PURE__*/React__default.createElement(Text$1, {
17879
- variant: enableSmallText ? "pS" : "p",
17875
+ variant: "p",
17880
17876
  color: themeValues.text,
17881
17877
  weight: "600"
17882
17878
  }, heading), /*#__PURE__*/React__default.createElement(Text$1, {
@@ -17898,8 +17894,7 @@ var Alert = function Alert(_ref) {
17898
17894
  background: themeValues.background,
17899
17895
  borderRadius: "4px",
17900
17896
  borderColor: themeValues.border,
17901
- borderSize: noBorder ? "0px" : "1px",
17902
- boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
17897
+ borderSize: "1px",
17903
17898
  extraStyles: extraStyles
17904
17899
  }, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
17905
17900
  maxWidth: maxContentWidth
@@ -21442,7 +21437,7 @@ var check = function (it) {
21442
21437
 
21443
21438
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
21444
21439
  var global_1 =
21445
- // eslint-disable-next-line es-x/no-global-this -- safe
21440
+ // eslint-disable-next-line es/no-global-this -- safe
21446
21441
  check(typeof globalThis == 'object' && globalThis) ||
21447
21442
  check(typeof window == 'object' && window) ||
21448
21443
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -21461,12 +21456,12 @@ var fails = function (exec) {
21461
21456
 
21462
21457
  // Detect IE8's incomplete defineProperty implementation
21463
21458
  var descriptors = !fails(function () {
21464
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21459
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21465
21460
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
21466
21461
  });
21467
21462
 
21468
21463
  var functionBindNative = !fails(function () {
21469
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
21464
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
21470
21465
  var test = (function () { /* empty */ }).bind();
21471
21466
  // eslint-disable-next-line no-prototype-builtins -- safe
21472
21467
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -21479,7 +21474,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
21479
21474
  };
21480
21475
 
21481
21476
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
21482
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21477
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21483
21478
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
21484
21479
 
21485
21480
  // Nashorn ~ JDK8 bug
@@ -21506,25 +21501,29 @@ var createPropertyDescriptor = function (bitmap, value) {
21506
21501
  };
21507
21502
 
21508
21503
  var FunctionPrototype = Function.prototype;
21509
- var bind$1 = FunctionPrototype.bind;
21510
21504
  var call$1 = FunctionPrototype.call;
21511
- var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
21505
+ var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
21512
21506
 
21513
- var functionUncurryThis = functionBindNative ? function (fn) {
21514
- return fn && uncurryThis(fn);
21515
- } : function (fn) {
21516
- return fn && function () {
21507
+ var functionUncurryThisRaw = function (fn) {
21508
+ return functionBindNative ? uncurryThisWithBind(fn) : function () {
21517
21509
  return call$1.apply(fn, arguments);
21518
21510
  };
21519
21511
  };
21520
21512
 
21521
- var toString$2 = functionUncurryThis({}.toString);
21522
- var stringSlice = functionUncurryThis(''.slice);
21513
+ var toString$2 = functionUncurryThisRaw({}.toString);
21514
+ var stringSlice = functionUncurryThisRaw(''.slice);
21523
21515
 
21524
21516
  var classofRaw = function (it) {
21525
21517
  return stringSlice(toString$2(it), 8, -1);
21526
21518
  };
21527
21519
 
21520
+ var functionUncurryThis = function (fn) {
21521
+ // Nashorn bug:
21522
+ // https://github.com/zloirock/core-js/issues/1128
21523
+ // https://github.com/zloirock/core-js/issues/1130
21524
+ if (classofRaw(fn) === 'Function') return functionUncurryThisRaw(fn);
21525
+ };
21526
+
21528
21527
  var $Object = Object;
21529
21528
  var split = functionUncurryThis(''.split);
21530
21529
 
@@ -21537,12 +21536,18 @@ var indexedObject = fails(function () {
21537
21536
  return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
21538
21537
  } : $Object;
21539
21538
 
21539
+ // we can't use just `it == null` since of `document.all` special case
21540
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
21541
+ var isNullOrUndefined = function (it) {
21542
+ return it === null || it === undefined;
21543
+ };
21544
+
21540
21545
  var $TypeError = TypeError;
21541
21546
 
21542
21547
  // `RequireObjectCoercible` abstract operation
21543
21548
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
21544
21549
  var requireObjectCoercible = function (it) {
21545
- if (it == undefined) throw $TypeError("Can't call method on " + it);
21550
+ if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
21546
21551
  return it;
21547
21552
  };
21548
21553
 
@@ -21554,13 +21559,31 @@ var toIndexedObject = function (it) {
21554
21559
  return indexedObject(requireObjectCoercible(it));
21555
21560
  };
21556
21561
 
21562
+ var documentAll = typeof document == 'object' && document.all;
21563
+
21564
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
21565
+ var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
21566
+
21567
+ var documentAll_1 = {
21568
+ all: documentAll,
21569
+ IS_HTMLDDA: IS_HTMLDDA
21570
+ };
21571
+
21572
+ var documentAll$1 = documentAll_1.all;
21573
+
21557
21574
  // `IsCallable` abstract operation
21558
21575
  // https://tc39.es/ecma262/#sec-iscallable
21559
- var isCallable = function (argument) {
21576
+ var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
21577
+ return typeof argument == 'function' || argument === documentAll$1;
21578
+ } : function (argument) {
21560
21579
  return typeof argument == 'function';
21561
21580
  };
21562
21581
 
21563
- var isObject = function (it) {
21582
+ var documentAll$2 = documentAll_1.all;
21583
+
21584
+ var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
21585
+ return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
21586
+ } : function (it) {
21564
21587
  return typeof it == 'object' ? it !== null : isCallable(it);
21565
21588
  };
21566
21589
 
@@ -21601,12 +21624,12 @@ if (!version && engineUserAgent) {
21601
21624
 
21602
21625
  var engineV8Version = version;
21603
21626
 
21604
- /* eslint-disable es-x/no-symbol -- required for testing */
21627
+ /* eslint-disable es/no-symbol -- required for testing */
21605
21628
 
21606
21629
 
21607
21630
 
21608
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
21609
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
21631
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
21632
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
21610
21633
  var symbol = Symbol();
21611
21634
  // Chrome 38 Symbol has incorrect toString conversion
21612
21635
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -21615,10 +21638,10 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
21615
21638
  !Symbol.sham && engineV8Version && engineV8Version < 41;
21616
21639
  });
21617
21640
 
21618
- /* eslint-disable es-x/no-symbol -- required for testing */
21641
+ /* eslint-disable es/no-symbol -- required for testing */
21619
21642
 
21620
21643
 
21621
- var useSymbolAsUid = nativeSymbol
21644
+ var useSymbolAsUid = symbolConstructorDetection
21622
21645
  && !Symbol.sham
21623
21646
  && typeof Symbol.iterator == 'symbol';
21624
21647
 
@@ -21653,7 +21676,7 @@ var aCallable = function (argument) {
21653
21676
  // https://tc39.es/ecma262/#sec-getmethod
21654
21677
  var getMethod = function (V, P) {
21655
21678
  var func = V[P];
21656
- return func == null ? undefined : aCallable(func);
21679
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
21657
21680
  };
21658
21681
 
21659
21682
  var $TypeError$2 = TypeError;
@@ -21668,7 +21691,7 @@ var ordinaryToPrimitive = function (input, pref) {
21668
21691
  throw $TypeError$2("Can't convert object to primitive value");
21669
21692
  };
21670
21693
 
21671
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
21694
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
21672
21695
  var defineProperty = Object.defineProperty;
21673
21696
 
21674
21697
  var defineGlobalProperty = function (key, value) {
@@ -21688,10 +21711,10 @@ var shared = createCommonjsModule(function (module) {
21688
21711
  (module.exports = function (key, value) {
21689
21712
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
21690
21713
  })('versions', []).push({
21691
- version: '3.24.1',
21714
+ version: '3.25.5',
21692
21715
  mode: 'global',
21693
21716
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
21694
- license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
21717
+ license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
21695
21718
  source: 'https://github.com/zloirock/core-js'
21696
21719
  });
21697
21720
  });
@@ -21708,7 +21731,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
21708
21731
 
21709
21732
  // `HasOwnProperty` abstract operation
21710
21733
  // https://tc39.es/ecma262/#sec-hasownproperty
21711
- // eslint-disable-next-line es-x/no-object-hasown -- safe
21734
+ // eslint-disable-next-line es/no-object-hasown -- safe
21712
21735
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
21713
21736
  return hasOwnProperty(toObject(it), key);
21714
21737
  };
@@ -21727,9 +21750,9 @@ var symbolFor = Symbol$1 && Symbol$1['for'];
21727
21750
  var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
21728
21751
 
21729
21752
  var wellKnownSymbol = function (name) {
21730
- if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
21753
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(symbolConstructorDetection || typeof WellKnownSymbolsStore[name] == 'string')) {
21731
21754
  var description = 'Symbol.' + name;
21732
- if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
21755
+ if (symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)) {
21733
21756
  WellKnownSymbolsStore[name] = Symbol$1[name];
21734
21757
  } else if (useSymbolAsUid && symbolFor) {
21735
21758
  WellKnownSymbolsStore[name] = symbolFor(description);
@@ -21775,13 +21798,13 @@ var documentCreateElement = function (it) {
21775
21798
 
21776
21799
  // Thanks to IE8 for its funny defineProperty
21777
21800
  var ie8DomDefine = !descriptors && !fails(function () {
21778
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21801
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21779
21802
  return Object.defineProperty(documentCreateElement('div'), 'a', {
21780
21803
  get: function () { return 7; }
21781
21804
  }).a != 7;
21782
21805
  });
21783
21806
 
21784
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21807
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21785
21808
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
21786
21809
 
21787
21810
  // `Object.getOwnPropertyDescriptor` method
@@ -21802,7 +21825,7 @@ var objectGetOwnPropertyDescriptor = {
21802
21825
  // V8 ~ Chrome 36-
21803
21826
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
21804
21827
  var v8PrototypeDefineBug = descriptors && fails(function () {
21805
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21828
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21806
21829
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
21807
21830
  value: 42,
21808
21831
  writable: false
@@ -21819,9 +21842,9 @@ var anObject = function (argument) {
21819
21842
  };
21820
21843
 
21821
21844
  var $TypeError$5 = TypeError;
21822
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
21845
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
21823
21846
  var $defineProperty = Object.defineProperty;
21824
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21847
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21825
21848
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
21826
21849
  var ENUMERABLE = 'enumerable';
21827
21850
  var CONFIGURABLE = 'configurable';
@@ -21868,7 +21891,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
21868
21891
  };
21869
21892
 
21870
21893
  var FunctionPrototype$1 = Function.prototype;
21871
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21894
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21872
21895
  var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
21873
21896
 
21874
21897
  var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
@@ -21895,7 +21918,7 @@ var inspectSource = sharedStore.inspectSource;
21895
21918
 
21896
21919
  var WeakMap$1 = global_1.WeakMap;
21897
21920
 
21898
- var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
21921
+ var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
21899
21922
 
21900
21923
  var keys$1 = shared('keys');
21901
21924
 
@@ -21923,28 +21946,30 @@ var getterFor = function (TYPE) {
21923
21946
  };
21924
21947
  };
21925
21948
 
21926
- if (nativeWeakMap || sharedStore.state) {
21949
+ if (weakMapBasicDetection || sharedStore.state) {
21927
21950
  var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
21928
- var wmget = functionUncurryThis(store$1.get);
21929
- var wmhas = functionUncurryThis(store$1.has);
21930
- var wmset = functionUncurryThis(store$1.set);
21951
+ /* eslint-disable no-self-assign -- prototype methods protection */
21952
+ store$1.get = store$1.get;
21953
+ store$1.has = store$1.has;
21954
+ store$1.set = store$1.set;
21955
+ /* eslint-enable no-self-assign -- prototype methods protection */
21931
21956
  set = function (it, metadata) {
21932
- if (wmhas(store$1, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
21957
+ if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
21933
21958
  metadata.facade = it;
21934
- wmset(store$1, it, metadata);
21959
+ store$1.set(it, metadata);
21935
21960
  return metadata;
21936
21961
  };
21937
21962
  get = function (it) {
21938
- return wmget(store$1, it) || {};
21963
+ return store$1.get(it) || {};
21939
21964
  };
21940
21965
  has = function (it) {
21941
- return wmhas(store$1, it);
21966
+ return store$1.has(it);
21942
21967
  };
21943
21968
  } else {
21944
21969
  var STATE = sharedKey('state');
21945
21970
  hiddenKeys[STATE] = true;
21946
21971
  set = function (it, metadata) {
21947
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
21972
+ if (hasOwnProperty_1(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
21948
21973
  metadata.facade = it;
21949
21974
  createNonEnumerableProperty(it, STATE, metadata);
21950
21975
  return metadata;
@@ -21972,7 +21997,7 @@ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
21972
21997
 
21973
21998
  var enforceInternalState = internalState.enforce;
21974
21999
  var getInternalState = internalState.get;
21975
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
22000
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
21976
22001
  var defineProperty = Object.defineProperty;
21977
22002
 
21978
22003
  var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
@@ -22041,7 +22066,7 @@ var floor = Math.floor;
22041
22066
 
22042
22067
  // `Math.trunc` method
22043
22068
  // https://tc39.es/ecma262/#sec-math.trunc
22044
- // eslint-disable-next-line es-x/no-math-trunc -- safe
22069
+ // eslint-disable-next-line es/no-math-trunc -- safe
22045
22070
  var mathTrunc = Math.trunc || function trunc(x) {
22046
22071
  var n = +x;
22047
22072
  return (n > 0 ? floor : ceil)(n);
@@ -22142,7 +22167,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
22142
22167
 
22143
22168
  // `Object.getOwnPropertyNames` method
22144
22169
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
22145
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
22170
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
22146
22171
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
22147
22172
  return objectKeysInternal(O, hiddenKeys$1);
22148
22173
  };
@@ -22151,7 +22176,7 @@ var objectGetOwnPropertyNames = {
22151
22176
  f: f$3
22152
22177
  };
22153
22178
 
22154
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
22179
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
22155
22180
  var f$4 = Object.getOwnPropertySymbols;
22156
22181
 
22157
22182
  var objectGetOwnPropertySymbols = {
@@ -22295,7 +22320,7 @@ var toString_1 = function (argument) {
22295
22320
  var charAt = functionUncurryThis(''.charAt);
22296
22321
 
22297
22322
  var FORCED = fails(function () {
22298
- // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
22323
+ // eslint-disable-next-line es/no-array-string-prototype-at -- safe
22299
22324
  return '𠮷'.at(-2) !== '\uD842';
22300
22325
  });
22301
22326
 
@@ -22313,14 +22338,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
22313
22338
 
22314
22339
  // `Object.keys` method
22315
22340
  // https://tc39.es/ecma262/#sec-object.keys
22316
- // eslint-disable-next-line es-x/no-object-keys -- safe
22341
+ // eslint-disable-next-line es/no-object-keys -- safe
22317
22342
  var objectKeys = Object.keys || function keys(O) {
22318
22343
  return objectKeysInternal(O, enumBugKeys);
22319
22344
  };
22320
22345
 
22321
22346
  // `Object.defineProperties` method
22322
22347
  // https://tc39.es/ecma262/#sec-object.defineproperties
22323
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
22348
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
22324
22349
  var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
22325
22350
  anObject(O);
22326
22351
  var props = toIndexedObject(Properties);
@@ -22409,7 +22434,7 @@ hiddenKeys[IE_PROTO] = true;
22409
22434
 
22410
22435
  // `Object.create` method
22411
22436
  // https://tc39.es/ecma262/#sec-object.create
22412
- // eslint-disable-next-line es-x/no-object-create -- safe
22437
+ // eslint-disable-next-line es/no-object-create -- safe
22413
22438
  var objectCreate = Object.create || function create(O, Properties) {
22414
22439
  var result;
22415
22440
  if (O !== null) {
@@ -22455,13 +22480,13 @@ _export({ target: 'Array', proto: true }, {
22455
22480
 
22456
22481
  addToUnscopables('at');
22457
22482
 
22458
- // eslint-disable-next-line es-x/no-typed-arrays -- safe
22459
- var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
22483
+ // eslint-disable-next-line es/no-typed-arrays -- safe
22484
+ var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
22460
22485
 
22461
22486
  var correctPrototypeGetter = !fails(function () {
22462
22487
  function F() { /* empty */ }
22463
22488
  F.prototype.constructor = null;
22464
- // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
22489
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
22465
22490
  return Object.getPrototypeOf(new F()) !== F.prototype;
22466
22491
  });
22467
22492
 
@@ -22471,7 +22496,7 @@ var ObjectPrototype = $Object$4.prototype;
22471
22496
 
22472
22497
  // `Object.getPrototypeOf` method
22473
22498
  // https://tc39.es/ecma262/#sec-object.getprototypeof
22474
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
22499
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
22475
22500
  var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
22476
22501
  var object = toObject(O);
22477
22502
  if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
@@ -22497,13 +22522,13 @@ var aPossiblePrototype = function (argument) {
22497
22522
  // `Object.setPrototypeOf` method
22498
22523
  // https://tc39.es/ecma262/#sec-object.setprototypeof
22499
22524
  // Works with __proto__ only. Old v8 can't work with null proto objects.
22500
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
22525
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
22501
22526
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
22502
22527
  var CORRECT_SETTER = false;
22503
22528
  var test = {};
22504
22529
  var setter;
22505
22530
  try {
22506
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22531
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22507
22532
  setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
22508
22533
  setter(test, []);
22509
22534
  CORRECT_SETTER = test instanceof Array;
@@ -22540,7 +22565,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
22540
22565
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
22541
22566
  var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
22542
22567
  // Fixing native typed arrays in Opera Presto crashes the browser, see #595
22543
- var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
22568
+ var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
22544
22569
  var TYPED_ARRAY_TAG_REQUIRED = false;
22545
22570
  var NAME, Constructor, Prototype;
22546
22571
 
@@ -25644,7 +25669,7 @@ var fallbackValues$q = {
25644
25669
  var SpinnerSvgAnimation = styled__default.svg.withConfig({
25645
25670
  displayName: "Spinner__SpinnerSvgAnimation",
25646
25671
  componentId: "sc-vhupl9-0"
25647
- })(["animation:rotate 2s linear infinite;margin:-25px 0 0 -25px;width:", "px;height:", "px;& .path{stroke:", ";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}", ""], function (_ref) {
25672
+ })(["animation:rotate 2s linear infinite;margin:-25px 0 0 -25px;width:", "px;height:", "px;& .path{stroke:", ";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"], function (_ref) {
25648
25673
  var size = _ref.size;
25649
25674
  return size;
25650
25675
  }, function (_ref2) {
@@ -25653,36 +25678,19 @@ var SpinnerSvgAnimation = styled__default.svg.withConfig({
25653
25678
  }, function (_ref3) {
25654
25679
  var color = _ref3.color;
25655
25680
  return color;
25656
- }, function (_ref4) {
25657
- var centerSpinner = _ref4.centerSpinner;
25658
- return centerSpinner ? styled.css(["margin:0;"]) : "";
25659
25681
  });
25660
25682
  var SpinnerContainer$2 = styled__default.div.withConfig({
25661
25683
  displayName: "Spinner__SpinnerContainer",
25662
25684
  componentId: "sc-vhupl9-1"
25663
- })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;", ""], function (_ref5) {
25664
- var centerSpinner = _ref5.centerSpinner,
25665
- size = _ref5.size;
25666
- return centerSpinner ? styled.css(["width:", "px;height:", "px;"], size, size) : "";
25667
- });
25668
- /*
25669
- `centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
25670
- containers. Default is false to preserve legacy behavior for past uses.
25671
- */
25685
+ })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"]);
25672
25686
 
25673
- var Spinner$1 = function Spinner(_ref6) {
25674
- var _ref6$size = _ref6.size,
25675
- size = _ref6$size === void 0 ? "24" : _ref6$size,
25676
- _ref6$centerSpinner = _ref6.centerSpinner,
25677
- centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
25678
- themeValues = _ref6.themeValues;
25679
- return /*#__PURE__*/React__default.createElement(SpinnerContainer$2, {
25680
- centerSpinner: centerSpinner,
25681
- size: size
25682
- }, /*#__PURE__*/React__default.createElement(SpinnerSvgAnimation, {
25687
+ var Spinner$1 = function Spinner(_ref4) {
25688
+ var _ref4$size = _ref4.size,
25689
+ size = _ref4$size === void 0 ? "24" : _ref4$size,
25690
+ themeValues = _ref4.themeValues;
25691
+ return /*#__PURE__*/React__default.createElement(SpinnerContainer$2, null, /*#__PURE__*/React__default.createElement(SpinnerSvgAnimation, {
25683
25692
  size: size,
25684
- color: themeValues.color,
25685
- centerSpinner: centerSpinner
25693
+ color: themeValues.color
25686
25694
  }, /*#__PURE__*/React__default.createElement("circle", {
25687
25695
  className: "path",
25688
25696
  cx: "50",
@@ -37546,49 +37554,624 @@ var TableHeading_styled = styled__default.th.withConfig({
37546
37554
  return extraStyles;
37547
37555
  });
37548
37556
 
37549
- const validatorToPredicate = (validatorFn, emptyCase) => (
37550
- value,
37551
- ...rest
37552
- ) => (value === "" ? emptyCase : validatorFn(value, ...rest));
37557
+ var validatorToPredicate = function validatorToPredicate(validatorFn, emptyCase) {
37558
+ return function (value) {
37559
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
37560
+ rest[_key - 1] = arguments[_key];
37561
+ }
37562
+
37563
+ return value === "" ? emptyCase : validatorFn.apply(void 0, [value].concat(rest));
37564
+ };
37565
+ };
37553
37566
 
37554
37567
  var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
37555
37568
 
37556
- var dayjs_min = {exports: {}};
37569
+ function getDefaultExportFromCjs(x) {
37570
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
37571
+ }
37572
+
37573
+ var dayjs_min = {
37574
+ exports: {}
37575
+ };
37557
37576
 
37558
37577
  (function (module, exports) {
37559
- !function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
37560
- }(dayjs_min));
37578
+ !function (t, e) {
37579
+ module.exports = e();
37580
+ }(commonjsGlobal$1, function () {
37581
+ var t = 1e3,
37582
+ e = 6e4,
37583
+ n = 36e5,
37584
+ r = "millisecond",
37585
+ i = "second",
37586
+ s = "minute",
37587
+ u = "hour",
37588
+ a = "day",
37589
+ o = "week",
37590
+ f = "month",
37591
+ h = "quarter",
37592
+ c = "year",
37593
+ d = "date",
37594
+ $ = "Invalid Date",
37595
+ l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
37596
+ y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
37597
+ M = {
37598
+ name: "en",
37599
+ weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
37600
+ months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_")
37601
+ },
37602
+ m = function m(t, e, n) {
37603
+ var r = String(t);
37604
+ return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
37605
+ },
37606
+ g = {
37607
+ s: m,
37608
+ z: function z(t) {
37609
+ var e = -t.utcOffset(),
37610
+ n = Math.abs(e),
37611
+ r = Math.floor(n / 60),
37612
+ i = n % 60;
37613
+ return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
37614
+ },
37615
+ m: function t(e, n) {
37616
+ if (e.date() < n.date()) return -t(n, e);
37617
+ var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
37618
+ i = e.clone().add(r, f),
37619
+ s = n - i < 0,
37620
+ u = e.clone().add(r + (s ? -1 : 1), f);
37621
+ return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
37622
+ },
37623
+ a: function a(t) {
37624
+ return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
37625
+ },
37626
+ p: function p(t) {
37627
+ return {
37628
+ M: f,
37629
+ y: c,
37630
+ w: o,
37631
+ d: a,
37632
+ D: d,
37633
+ h: u,
37634
+ m: s,
37635
+ s: i,
37636
+ ms: r,
37637
+ Q: h
37638
+ }[t] || String(t || "").toLowerCase().replace(/s$/, "");
37639
+ },
37640
+ u: function u(t) {
37641
+ return void 0 === t;
37642
+ }
37643
+ },
37644
+ D = "en",
37645
+ v = {};
37561
37646
 
37562
- var dayjs = dayjs_min.exports;
37647
+ v[D] = M;
37563
37648
 
37564
- var customParseFormat$1 = {exports: {}};
37649
+ var p = function p(t) {
37650
+ return t instanceof _;
37651
+ },
37652
+ S = function S(t, e, n) {
37653
+ var r;
37654
+ if (!t) return D;
37655
+ if ("string" == typeof t) v[t] && (r = t), e && (v[t] = e, r = t);else {
37656
+ var i = t.name;
37657
+ v[i] = t, r = i;
37658
+ }
37659
+ return !n && r && (D = r), r || !n && D;
37660
+ },
37661
+ w = function w(t, e) {
37662
+ if (p(t)) return t.clone();
37663
+ var n = "object" == _typeof(e) ? e : {};
37664
+ return n.date = t, n.args = arguments, new _(n);
37665
+ },
37666
+ O = g;
37667
+
37668
+ O.l = S, O.i = p, O.w = function (t, e) {
37669
+ return w(t, {
37670
+ locale: e.$L,
37671
+ utc: e.$u,
37672
+ x: e.$x,
37673
+ $offset: e.$offset
37674
+ });
37675
+ };
37565
37676
 
37566
- (function (module, exports) {
37567
- !function(t,e){module.exports=e();}(commonjsGlobal$1,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
37568
- }(customParseFormat$1));
37677
+ var _ = function () {
37678
+ function M(t) {
37679
+ this.$L = S(t.locale, null, !0), this.parse(t);
37680
+ }
37681
+
37682
+ var m = M.prototype;
37683
+ return m.parse = function (t) {
37684
+ this.$d = function (t) {
37685
+ var e = t.date,
37686
+ n = t.utc;
37687
+ if (null === e) return new Date(NaN);
37688
+ if (O.u(e)) return new Date();
37689
+ if (e instanceof Date) return new Date(e);
37690
+
37691
+ if ("string" == typeof e && !/Z$/i.test(e)) {
37692
+ var r = e.match(l);
37693
+
37694
+ if (r) {
37695
+ var i = r[2] - 1 || 0,
37696
+ s = (r[7] || "0").substring(0, 3);
37697
+ return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
37698
+ }
37699
+ }
37700
+
37701
+ return new Date(e);
37702
+ }(t), this.$x = t.x || {}, this.init();
37703
+ }, m.init = function () {
37704
+ var t = this.$d;
37705
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
37706
+ }, m.$utils = function () {
37707
+ return O;
37708
+ }, m.isValid = function () {
37709
+ return !(this.$d.toString() === $);
37710
+ }, m.isSame = function (t, e) {
37711
+ var n = w(t);
37712
+ return this.startOf(e) <= n && n <= this.endOf(e);
37713
+ }, m.isAfter = function (t, e) {
37714
+ return w(t) < this.startOf(e);
37715
+ }, m.isBefore = function (t, e) {
37716
+ return this.endOf(e) < w(t);
37717
+ }, m.$g = function (t, e, n) {
37718
+ return O.u(t) ? this[e] : this.set(n, t);
37719
+ }, m.unix = function () {
37720
+ return Math.floor(this.valueOf() / 1e3);
37721
+ }, m.valueOf = function () {
37722
+ return this.$d.getTime();
37723
+ }, m.startOf = function (t, e) {
37724
+ var n = this,
37725
+ r = !!O.u(e) || e,
37726
+ h = O.p(t),
37727
+ $ = function $(t, e) {
37728
+ var i = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
37729
+ return r ? i : i.endOf(a);
37730
+ },
37731
+ l = function l(t, e) {
37732
+ return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n);
37733
+ },
37734
+ y = this.$W,
37735
+ M = this.$M,
37736
+ m = this.$D,
37737
+ g = "set" + (this.$u ? "UTC" : "");
37738
+
37739
+ switch (h) {
37740
+ case c:
37741
+ return r ? $(1, 0) : $(31, 11);
37742
+
37743
+ case f:
37744
+ return r ? $(1, M) : $(0, M + 1);
37745
+
37746
+ case o:
37747
+ var D = this.$locale().weekStart || 0,
37748
+ v = (y < D ? y + 7 : y) - D;
37749
+ return $(r ? m - v : m + (6 - v), M);
37750
+
37751
+ case a:
37752
+ case d:
37753
+ return l(g + "Hours", 0);
37754
+
37755
+ case u:
37756
+ return l(g + "Minutes", 1);
37757
+
37758
+ case s:
37759
+ return l(g + "Seconds", 2);
37760
+
37761
+ case i:
37762
+ return l(g + "Milliseconds", 3);
37763
+
37764
+ default:
37765
+ return this.clone();
37766
+ }
37767
+ }, m.endOf = function (t) {
37768
+ return this.startOf(t, !1);
37769
+ }, m.$set = function (t, e) {
37770
+ var n,
37771
+ o = O.p(t),
37772
+ h = "set" + (this.$u ? "UTC" : ""),
37773
+ $ = (n = {}, n[a] = h + "Date", n[d] = h + "Date", n[f] = h + "Month", n[c] = h + "FullYear", n[u] = h + "Hours", n[s] = h + "Minutes", n[i] = h + "Seconds", n[r] = h + "Milliseconds", n)[o],
37774
+ l = o === a ? this.$D + (e - this.$W) : e;
37775
+
37776
+ if (o === f || o === c) {
37777
+ var y = this.clone().set(d, 1);
37778
+ y.$d[$](l), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
37779
+ } else $ && this.$d[$](l);
37780
+
37781
+ return this.init(), this;
37782
+ }, m.set = function (t, e) {
37783
+ return this.clone().$set(t, e);
37784
+ }, m.get = function (t) {
37785
+ return this[O.p(t)]();
37786
+ }, m.add = function (r, h) {
37787
+ var d,
37788
+ $ = this;
37789
+ r = Number(r);
37790
+
37791
+ var l = O.p(h),
37792
+ y = function y(t) {
37793
+ var e = w($);
37794
+ return O.w(e.date(e.date() + Math.round(t * r)), $);
37795
+ };
37796
+
37797
+ if (l === f) return this.set(f, this.$M + r);
37798
+ if (l === c) return this.set(c, this.$y + r);
37799
+ if (l === a) return y(1);
37800
+ if (l === o) return y(7);
37801
+ var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[l] || 1,
37802
+ m = this.$d.getTime() + r * M;
37803
+ return O.w(m, this);
37804
+ }, m.subtract = function (t, e) {
37805
+ return this.add(-1 * t, e);
37806
+ }, m.format = function (t) {
37807
+ var e = this,
37808
+ n = this.$locale();
37809
+ if (!this.isValid()) return n.invalidDate || $;
37810
+
37811
+ var r = t || "YYYY-MM-DDTHH:mm:ssZ",
37812
+ i = O.z(this),
37813
+ s = this.$H,
37814
+ u = this.$m,
37815
+ a = this.$M,
37816
+ o = n.weekdays,
37817
+ f = n.months,
37818
+ h = function h(t, n, i, s) {
37819
+ return t && (t[n] || t(e, r)) || i[n].substr(0, s);
37820
+ },
37821
+ c = function c(t) {
37822
+ return O.s(s % 12 || 12, t, "0");
37823
+ },
37824
+ d = n.meridiem || function (t, e, n) {
37825
+ var r = t < 12 ? "AM" : "PM";
37826
+ return n ? r.toLowerCase() : r;
37827
+ },
37828
+ l = {
37829
+ YY: String(this.$y).slice(-2),
37830
+ YYYY: this.$y,
37831
+ M: a + 1,
37832
+ MM: O.s(a + 1, 2, "0"),
37833
+ MMM: h(n.monthsShort, a, f, 3),
37834
+ MMMM: h(f, a),
37835
+ D: this.$D,
37836
+ DD: O.s(this.$D, 2, "0"),
37837
+ d: String(this.$W),
37838
+ dd: h(n.weekdaysMin, this.$W, o, 2),
37839
+ ddd: h(n.weekdaysShort, this.$W, o, 3),
37840
+ dddd: o[this.$W],
37841
+ H: String(s),
37842
+ HH: O.s(s, 2, "0"),
37843
+ h: c(1),
37844
+ hh: c(2),
37845
+ a: d(s, u, !0),
37846
+ A: d(s, u, !1),
37847
+ m: String(u),
37848
+ mm: O.s(u, 2, "0"),
37849
+ s: String(this.$s),
37850
+ ss: O.s(this.$s, 2, "0"),
37851
+ SSS: O.s(this.$ms, 3, "0"),
37852
+ Z: i
37853
+ };
37569
37854
 
37570
- var customParseFormat = customParseFormat$1.exports;
37855
+ return r.replace(y, function (t, e) {
37856
+ return e || l[t] || i.replace(":", "");
37857
+ });
37858
+ }, m.utcOffset = function () {
37859
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
37860
+ }, m.diff = function (r, d, $) {
37861
+ var l,
37862
+ y = O.p(d),
37863
+ M = w(r),
37864
+ m = (M.utcOffset() - this.utcOffset()) * e,
37865
+ g = this - M,
37866
+ D = O.m(this, M);
37867
+ return D = (l = {}, l[c] = D / 12, l[f] = D, l[h] = D / 3, l[o] = (g - m) / 6048e5, l[a] = (g - m) / 864e5, l[u] = g / n, l[s] = g / e, l[i] = g / t, l)[y] || g, $ ? D : O.a(D);
37868
+ }, m.daysInMonth = function () {
37869
+ return this.endOf(f).$D;
37870
+ }, m.$locale = function () {
37871
+ return v[this.$L];
37872
+ }, m.locale = function (t, e) {
37873
+ if (!t) return this.$L;
37874
+ var n = this.clone(),
37875
+ r = S(t, e, !0);
37876
+ return r && (n.$L = r), n;
37877
+ }, m.clone = function () {
37878
+ return O.w(this.$d, this);
37879
+ }, m.toDate = function () {
37880
+ return new Date(this.valueOf());
37881
+ }, m.toJSON = function () {
37882
+ return this.isValid() ? this.toISOString() : null;
37883
+ }, m.toISOString = function () {
37884
+ return this.$d.toISOString();
37885
+ }, m.toString = function () {
37886
+ return this.$d.toUTCString();
37887
+ }, M;
37888
+ }(),
37889
+ b = _.prototype;
37890
+
37891
+ return w.prototype = b, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function (t) {
37892
+ b[t[1]] = function (e) {
37893
+ return this.$g(e, t[0], t[1]);
37894
+ };
37895
+ }), w.extend = function (t, e) {
37896
+ return t.$i || (t(e, _, w), t.$i = !0), w;
37897
+ }, w.locale = S, w.isDayjs = p, w.unix = function (t) {
37898
+ return w(1e3 * t);
37899
+ }, w.en = v[D], w.Ls = v, w.p = {}, w;
37900
+ });
37901
+ })(dayjs_min);
37571
37902
 
37572
- var isSameOrBefore$1 = {exports: {}};
37903
+ var dayjs_minExports = dayjs_min.exports;
37904
+ var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
37905
+ var customParseFormat$1 = {
37906
+ exports: {}
37907
+ };
37573
37908
 
37574
37909
  (function (module, exports) {
37575
- !function(e,i){module.exports=i();}(commonjsGlobal$1,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
37576
- }(isSameOrBefore$1));
37910
+ !function (t, e) {
37911
+ module.exports = e();
37912
+ }(commonjsGlobal$1, function () {
37913
+ var t = {
37914
+ LTS: "h:mm:ss A",
37915
+ LT: "h:mm A",
37916
+ L: "MM/DD/YYYY",
37917
+ LL: "MMMM D, YYYY",
37918
+ LLL: "MMMM D, YYYY h:mm A",
37919
+ LLLL: "dddd, MMMM D, YYYY h:mm A"
37920
+ },
37921
+ e = /(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,
37922
+ n = /\d\d/,
37923
+ r = /\d\d?/,
37924
+ i = /\d*[^\s\d-_:/()]+/,
37925
+ o = {},
37926
+ s = function s(t) {
37927
+ return (t = +t) + (t > 68 ? 1900 : 2e3);
37928
+ };
37577
37929
 
37578
- var isSameOrBefore = isSameOrBefore$1.exports;
37930
+ var a = function a(t) {
37931
+ return function (e) {
37932
+ this[t] = +e;
37933
+ };
37934
+ },
37935
+ f = [/[+-]\d\d:?(\d\d)?|Z/, function (t) {
37936
+ (this.zone || (this.zone = {})).offset = function (t) {
37937
+ if (!t) return 0;
37938
+ if ("Z" === t) return 0;
37939
+ var e = t.match(/([+-]|\d\d)/g),
37940
+ n = 60 * e[1] + (+e[2] || 0);
37941
+ return 0 === n ? 0 : "+" === e[0] ? -n : n;
37942
+ }(t);
37943
+ }],
37944
+ u = function u(t) {
37945
+ var e = o[t];
37946
+ return e && (e.indexOf ? e : e.s.concat(e.f));
37947
+ },
37948
+ h = function h(t, e) {
37949
+ var n,
37950
+ r = o.meridiem;
37951
+
37952
+ if (r) {
37953
+ for (var i = 1; i <= 24; i += 1) {
37954
+ if (t.indexOf(r(i, 0, e)) > -1) {
37955
+ n = i > 12;
37956
+ break;
37957
+ }
37958
+ }
37959
+ } else n = t === (e ? "pm" : "PM");
37960
+
37961
+ return n;
37962
+ },
37963
+ d = {
37964
+ A: [i, function (t) {
37965
+ this.afternoon = h(t, !1);
37966
+ }],
37967
+ a: [i, function (t) {
37968
+ this.afternoon = h(t, !0);
37969
+ }],
37970
+ S: [/\d/, function (t) {
37971
+ this.milliseconds = 100 * +t;
37972
+ }],
37973
+ SS: [n, function (t) {
37974
+ this.milliseconds = 10 * +t;
37975
+ }],
37976
+ SSS: [/\d{3}/, function (t) {
37977
+ this.milliseconds = +t;
37978
+ }],
37979
+ s: [r, a("seconds")],
37980
+ ss: [r, a("seconds")],
37981
+ m: [r, a("minutes")],
37982
+ mm: [r, a("minutes")],
37983
+ H: [r, a("hours")],
37984
+ h: [r, a("hours")],
37985
+ HH: [r, a("hours")],
37986
+ hh: [r, a("hours")],
37987
+ D: [r, a("day")],
37988
+ DD: [n, a("day")],
37989
+ Do: [i, function (t) {
37990
+ var e = o.ordinal,
37991
+ n = t.match(/\d+/);
37992
+ if (this.day = n[0], e) for (var r = 1; r <= 31; r += 1) {
37993
+ e(r).replace(/\[|\]/g, "") === t && (this.day = r);
37994
+ }
37995
+ }],
37996
+ M: [r, a("month")],
37997
+ MM: [n, a("month")],
37998
+ MMM: [i, function (t) {
37999
+ var e = u("months"),
38000
+ n = (u("monthsShort") || e.map(function (t) {
38001
+ return t.substr(0, 3);
38002
+ })).indexOf(t) + 1;
38003
+ if (n < 1) throw new Error();
38004
+ this.month = n % 12 || n;
38005
+ }],
38006
+ MMMM: [i, function (t) {
38007
+ var e = u("months").indexOf(t) + 1;
38008
+ if (e < 1) throw new Error();
38009
+ this.month = e % 12 || e;
38010
+ }],
38011
+ Y: [/[+-]?\d+/, a("year")],
38012
+ YY: [n, function (t) {
38013
+ this.year = s(t);
38014
+ }],
38015
+ YYYY: [/\d{4}/, a("year")],
38016
+ Z: f,
38017
+ ZZ: f
38018
+ };
37579
38019
 
37580
- var isSameOrAfter$1 = {exports: {}};
38020
+ function c(n) {
38021
+ var r, i;
38022
+ r = n, i = o && o.formats;
38023
+
38024
+ for (var s = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (e, n, r) {
38025
+ var o = r && r.toUpperCase();
38026
+ return n || i[r] || t[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (t, e, n) {
38027
+ return e || n.slice(1);
38028
+ });
38029
+ })).match(e), a = s.length, f = 0; f < a; f += 1) {
38030
+ var u = s[f],
38031
+ h = d[u],
38032
+ c = h && h[0],
38033
+ l = h && h[1];
38034
+ s[f] = l ? {
38035
+ regex: c,
38036
+ parser: l
38037
+ } : u.replace(/^\[|\]$/g, "");
38038
+ }
38039
+
38040
+ return function (t) {
38041
+ for (var e = {}, n = 0, r = 0; n < a; n += 1) {
38042
+ var i = s[n];
38043
+ if ("string" == typeof i) r += i.length;else {
38044
+ var o = i.regex,
38045
+ f = i.parser,
38046
+ u = t.substr(r),
38047
+ h = o.exec(u)[0];
38048
+ f.call(e, h), t = t.replace(h, "");
38049
+ }
38050
+ }
38051
+
38052
+ return function (t) {
38053
+ var e = t.afternoon;
38054
+
38055
+ if (void 0 !== e) {
38056
+ var n = t.hours;
38057
+ e ? n < 12 && (t.hours += 12) : 12 === n && (t.hours = 0), delete t.afternoon;
38058
+ }
38059
+ }(e), e;
38060
+ };
38061
+ }
38062
+
38063
+ return function (t, e, n) {
38064
+ n.p.customParseFormat = !0, t && t.parseTwoDigitYear && (s = t.parseTwoDigitYear);
38065
+ var r = e.prototype,
38066
+ i = r.parse;
38067
+
38068
+ r.parse = function (t) {
38069
+ var e = t.date,
38070
+ r = t.utc,
38071
+ s = t.args;
38072
+ this.$u = r;
38073
+ var a = s[1];
38074
+
38075
+ if ("string" == typeof a) {
38076
+ var f = !0 === s[2],
38077
+ u = !0 === s[3],
38078
+ h = f || u,
38079
+ d = s[2];
38080
+ u && (d = s[2]), o = this.$locale(), !f && d && (o = n.Ls[d]), this.$d = function (t, e, n) {
38081
+ try {
38082
+ if (["x", "X"].indexOf(e) > -1) return new Date(("X" === e ? 1e3 : 1) * t);
38083
+ var r = c(e)(t),
38084
+ i = r.year,
38085
+ o = r.month,
38086
+ s = r.day,
38087
+ a = r.hours,
38088
+ f = r.minutes,
38089
+ u = r.seconds,
38090
+ h = r.milliseconds,
38091
+ d = r.zone,
38092
+ l = new Date(),
38093
+ m = s || (i || o ? 1 : l.getDate()),
38094
+ M = i || l.getFullYear(),
38095
+ Y = 0;
38096
+ i && !o || (Y = o > 0 ? o - 1 : l.getMonth());
38097
+ var p = a || 0,
38098
+ v = f || 0,
38099
+ D = u || 0,
38100
+ g = h || 0;
38101
+ return d ? new Date(Date.UTC(M, Y, m, p, v, D, g + 60 * d.offset * 1e3)) : n ? new Date(Date.UTC(M, Y, m, p, v, D, g)) : new Date(M, Y, m, p, v, D, g);
38102
+ } catch (t) {
38103
+ return new Date("");
38104
+ }
38105
+ }(e, a, r), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), h && e != this.format(a) && (this.$d = new Date("")), o = {};
38106
+ } else if (a instanceof Array) for (var l = a.length, m = 1; m <= l; m += 1) {
38107
+ s[1] = a[m - 1];
38108
+ var M = n.apply(this, s);
38109
+
38110
+ if (M.isValid()) {
38111
+ this.$d = M.$d, this.$L = M.$L, this.init();
38112
+ break;
38113
+ }
38114
+
38115
+ m === l && (this.$d = new Date(""));
38116
+ } else i.call(this, t);
38117
+ };
38118
+ };
38119
+ });
38120
+ })(customParseFormat$1);
38121
+
38122
+ var customParseFormatExports = customParseFormat$1.exports;
38123
+ var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
38124
+ var isSameOrBefore$1 = {
38125
+ exports: {}
38126
+ };
37581
38127
 
37582
38128
  (function (module, exports) {
37583
- !function(e,t){module.exports=t();}(commonjsGlobal$1,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
37584
- }(isSameOrAfter$1));
38129
+ !function (e, i) {
38130
+ module.exports = i();
38131
+ }(commonjsGlobal$1, function () {
38132
+ return function (e, i) {
38133
+ i.prototype.isSameOrBefore = function (e, i) {
38134
+ return this.isSame(e, i) || this.isBefore(e, i);
38135
+ };
38136
+ };
38137
+ });
38138
+ })(isSameOrBefore$1);
37585
38139
 
37586
- var isSameOrAfter = isSameOrAfter$1.exports;
38140
+ var isSameOrBeforeExports = isSameOrBefore$1.exports;
38141
+ var isSameOrBefore = /*@__PURE__*/getDefaultExportFromCjs(isSameOrBeforeExports);
38142
+ var isSameOrAfter$1 = {
38143
+ exports: {}
38144
+ };
38145
+
38146
+ (function (module, exports) {
38147
+ !function (e, t) {
38148
+ module.exports = t();
38149
+ }(commonjsGlobal$1, function () {
38150
+ return function (e, t) {
38151
+ t.prototype.isSameOrAfter = function (e, t) {
38152
+ return this.isSame(e, t) || this.isAfter(e, t);
38153
+ };
38154
+ };
38155
+ });
38156
+ })(isSameOrAfter$1);
37587
38157
 
38158
+ var isSameOrAfterExports = isSameOrAfter$1.exports;
38159
+ var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
37588
38160
  /* eslint-disable no-unused-vars */
37589
38161
 
37590
- const createValidator = (type, error) => {
37591
- let validator = (...args) => ({ type, args, error });
38162
+ var createValidator = function createValidator(type, error) {
38163
+ var validator = function validator() {
38164
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
38165
+ args[_key2] = arguments[_key2];
38166
+ }
38167
+
38168
+ return {
38169
+ type: type,
38170
+ args: args,
38171
+ error: error
38172
+ };
38173
+ };
38174
+
37592
38175
  validator.error = error;
37593
38176
  return validator;
37594
38177
  };
@@ -37596,30 +38179,38 @@ const createValidator = (type, error) => {
37596
38179
  dayjs.extend(customParseFormat);
37597
38180
  dayjs.extend(isSameOrBefore);
37598
38181
  dayjs.extend(isSameOrAfter);
38182
+ var validatorFns = {};
38183
+ var INCLUDED_IN = "validator/INCLUDED_IN";
38184
+ var INCLUDED_IN_ERROR = "error/INCLUDED_IN";
38185
+ var includedIn = createValidator(INCLUDED_IN, INCLUDED_IN_ERROR);
37599
38186
 
37600
- let validatorFns = {};
38187
+ validatorFns[INCLUDED_IN] = function (value, args, form) {
38188
+ return Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
38189
+ };
37601
38190
 
37602
- const INCLUDED_IN = "validator/INCLUDED_IN";
37603
- const INCLUDED_IN_ERROR = "error/INCLUDED_IN";
37604
- const includedIn = createValidator(INCLUDED_IN, INCLUDED_IN_ERROR);
37605
- validatorFns[INCLUDED_IN] = (value, args, form) =>
37606
- Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
38191
+ var REQUIRED = "validator/REQUIRED";
38192
+ var REQUIRED_ERROR = "error/REQUIRED";
38193
+ var required = createValidator(REQUIRED, REQUIRED_ERROR);
37607
38194
 
37608
- const REQUIRED = "validator/REQUIRED";
37609
- const REQUIRED_ERROR = "error/REQUIRED";
37610
- const required = createValidator(REQUIRED, REQUIRED_ERROR);
37611
- validatorFns[REQUIRED] = (value, args, form) => value !== "";
38195
+ validatorFns[REQUIRED] = function (value, args, form) {
38196
+ return value !== "";
38197
+ };
37612
38198
 
37613
- const ONLY_INTEGERS = "validator/ONLY_INTEGERS";
37614
- const ONLY_INTEGERS_ERROR = "error/ONLY_INTEGERS";
37615
- const onlyIntegers = createValidator(ONLY_INTEGERS, ONLY_INTEGERS_ERROR);
37616
- validatorFns[ONLY_INTEGERS] = (value, args, form) => /^(-?\d+)?$/.test(value);
38199
+ var ONLY_INTEGERS = "validator/ONLY_INTEGERS";
38200
+ var ONLY_INTEGERS_ERROR = "error/ONLY_INTEGERS";
38201
+ var onlyIntegers = createValidator(ONLY_INTEGERS, ONLY_INTEGERS_ERROR);
37617
38202
 
37618
- const ONLY_NATURALS = "validator/ONLY_NATURALS";
37619
- const ONLY_NATURALS_ERROR = "error/ONLY_NATURALS";
37620
- const onlyNaturals = createValidator(ONLY_NATURALS, ONLY_NATURALS_ERROR);
37621
- validatorFns[ONLY_NATURALS] = (value, args, form) => /^(\d+)?$/.test(value);
38203
+ validatorFns[ONLY_INTEGERS] = function (value, args, form) {
38204
+ return /^(-?\d+)?$/.test(value);
38205
+ };
37622
38206
 
38207
+ var ONLY_NATURALS = "validator/ONLY_NATURALS";
38208
+ var ONLY_NATURALS_ERROR = "error/ONLY_NATURALS";
38209
+ var onlyNaturals = createValidator(ONLY_NATURALS, ONLY_NATURALS_ERROR);
38210
+
38211
+ validatorFns[ONLY_NATURALS] = function (value, args, form) {
38212
+ return /^(\d+)?$/.test(value);
38213
+ };
37623
38214
  /*
37624
38215
  07/22: experimental expiration date constraint
37625
38216
  should allow entry of expiration date using "/" character
@@ -37629,439 +38220,464 @@ not tested as validation function
37629
38220
  to validate exp date instead use combo of:
37630
38221
  required(), hasLength(), isValidMonth(), dateAfterToday()
37631
38222
  */
37632
- const ONLY_EXPIRATION_DATE = "validator/ONLY_EXPIRATION_DATE";
37633
- const ONLY_EXPIRATION_DATE_ERROR = "error/ONLY_EXPIRATION_DATE";
37634
- const onlyExpirationDate = createValidator(
37635
- ONLY_EXPIRATION_DATE,
37636
- ONLY_EXPIRATION_DATE_ERROR
37637
- );
37638
- validatorFns[ONLY_EXPIRATION_DATE] = (value, args, form) =>
37639
- /^(\d?\d?\/?\d?\d?)?$/.test(value);
37640
-
37641
- const NUMBER_LESS_THAN = "validator/NUMBER_LESS_THAN";
37642
- const NUMBER_LESS_THAN_ERROR = "error/NUMBER_LESS_THAN";
37643
- const numberLessThan = createValidator(
37644
- NUMBER_LESS_THAN,
37645
- NUMBER_LESS_THAN_ERROR
37646
- );
37647
- validatorFns[NUMBER_LESS_THAN] = (value, args, form) => {
38223
+
38224
+
38225
+ var ONLY_EXPIRATION_DATE = "validator/ONLY_EXPIRATION_DATE";
38226
+ var ONLY_EXPIRATION_DATE_ERROR = "error/ONLY_EXPIRATION_DATE";
38227
+ var onlyExpirationDate = createValidator(ONLY_EXPIRATION_DATE, ONLY_EXPIRATION_DATE_ERROR);
38228
+
38229
+ validatorFns[ONLY_EXPIRATION_DATE] = function (value, args, form) {
38230
+ return /^(\d?\d?\/?\d?\d?)?$/.test(value);
38231
+ };
38232
+
38233
+ var NUMBER_LESS_THAN = "validator/NUMBER_LESS_THAN";
38234
+ var NUMBER_LESS_THAN_ERROR = "error/NUMBER_LESS_THAN";
38235
+ var numberLessThan = createValidator(NUMBER_LESS_THAN, NUMBER_LESS_THAN_ERROR);
38236
+
38237
+ validatorFns[NUMBER_LESS_THAN] = function (value, args, form) {
37648
38238
  if (value === "") {
37649
38239
  return true;
37650
38240
  }
38241
+
37651
38242
  return Number(value) < args[0];
37652
38243
  };
37653
38244
 
37654
- const NUMBER_LESS_THAN_OR_EQUAL_TO =
37655
- "validator/NUMBER_LESS_THAN_OR_EQUAL_TO";
37656
- const NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR =
37657
- "error/NUMBER_LESS_THAN_OR_EQUAL_TO";
37658
- const numberLessThanOrEqualTo = createValidator(
37659
- NUMBER_LESS_THAN_OR_EQUAL_TO,
37660
- NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR
37661
- );
37662
- validatorFns[NUMBER_LESS_THAN_OR_EQUAL_TO] = (value, args, form) => {
38245
+ var NUMBER_LESS_THAN_OR_EQUAL_TO = "validator/NUMBER_LESS_THAN_OR_EQUAL_TO";
38246
+ var NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR = "error/NUMBER_LESS_THAN_OR_EQUAL_TO";
38247
+ var numberLessThanOrEqualTo = createValidator(NUMBER_LESS_THAN_OR_EQUAL_TO, NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR);
38248
+
38249
+ validatorFns[NUMBER_LESS_THAN_OR_EQUAL_TO] = function (value, args, form) {
37663
38250
  if (value === "") {
37664
38251
  return true;
37665
38252
  }
38253
+
37666
38254
  return Number(value) <= args[0];
37667
38255
  };
37668
38256
 
37669
- const NUMBER_GREATER_THAN = "validator/NUMBER_GREATER_THAN";
37670
- const NUMBER_GREATER_THAN_ERROR = "error/NUMBER_GREATER_THAN";
37671
- const numberGreaterThan = createValidator(
37672
- NUMBER_GREATER_THAN,
37673
- NUMBER_GREATER_THAN_ERROR
37674
- );
37675
- validatorFns[NUMBER_GREATER_THAN] = (value, args, form) => {
38257
+ var NUMBER_GREATER_THAN = "validator/NUMBER_GREATER_THAN";
38258
+ var NUMBER_GREATER_THAN_ERROR = "error/NUMBER_GREATER_THAN";
38259
+ var numberGreaterThan = createValidator(NUMBER_GREATER_THAN, NUMBER_GREATER_THAN_ERROR);
38260
+
38261
+ validatorFns[NUMBER_GREATER_THAN] = function (value, args, form) {
37676
38262
  if (value === "") {
37677
38263
  return true;
37678
38264
  }
38265
+
37679
38266
  return Number(value) > args[0];
37680
38267
  };
37681
38268
 
37682
- const NUMBER_GREATER_THAN_OR_EQUAL_TO =
37683
- "validator/NUMBER_GREATER_THAN_OR_EQUAL_TO";
37684
- const NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR =
37685
- "error/NUMBER_GREATER_THAN_OR_EQUAL_TO";
37686
- const numberGreaterThanOrEqualTo = createValidator(
37687
- NUMBER_GREATER_THAN_OR_EQUAL_TO,
37688
- NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR
37689
- );
37690
- validatorFns[NUMBER_GREATER_THAN_OR_EQUAL_TO] = (value, args, form) => {
38269
+ var NUMBER_GREATER_THAN_OR_EQUAL_TO = "validator/NUMBER_GREATER_THAN_OR_EQUAL_TO";
38270
+ var NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR = "error/NUMBER_GREATER_THAN_OR_EQUAL_TO";
38271
+ var numberGreaterThanOrEqualTo = createValidator(NUMBER_GREATER_THAN_OR_EQUAL_TO, NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR);
38272
+
38273
+ validatorFns[NUMBER_GREATER_THAN_OR_EQUAL_TO] = function (value, args, form) {
37691
38274
  if (value === "") {
37692
38275
  return true;
37693
38276
  }
38277
+
37694
38278
  return Number(value) >= args[0];
37695
38279
  };
37696
38280
 
37697
- const MATCHES_FIELD = "validator/MATCHES_FIELD";
37698
- const MATCHES_FIELD_ERROR$1 = "error/MATCHES_FIELD";
37699
- const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR$1);
37700
- validatorFns[MATCHES_FIELD] = (value, args, form) => {
37701
- const dependentField = form[args[0]];
38281
+ var MATCHES_FIELD = "validator/MATCHES_FIELD";
38282
+ var MATCHES_FIELD_ERROR$1 = "error/MATCHES_FIELD";
38283
+ var matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR$1);
38284
+
38285
+ validatorFns[MATCHES_FIELD] = function (value, args, form) {
38286
+ var dependentField = form[args[0]];
38287
+
37702
38288
  if (dependentField === undefined) {
37703
- throw new Error(
37704
- `${args[0]} was passed to matchesField, but that field does not exist in the form`
37705
- );
38289
+ throw new Error("".concat(args[0], " was passed to matchesField, but that field does not exist in the form"));
37706
38290
  }
37707
- const dependentFieldValue = dependentField.rawValue;
38291
+
38292
+ var dependentFieldValue = dependentField.rawValue;
37708
38293
  return value === dependentFieldValue;
37709
38294
  };
37710
38295
 
37711
- const validateWhenErrorMessage = type =>
37712
- `${type} was passed to validateWhen, but that validator type does not exist.
37713
- Please check that you are only calling validator creator functions exported from
37714
- redux-freeform in your form config and that you didn't forget to
37715
- invoke the validator creator (you cannot pass the functions themselves to
37716
- createFormState). Also make sure you aren't passing validateWhen() to validateWhen
37717
- as the primary validator.`;
37718
-
37719
- const VALIDATE_WHEN = "validator/VALIDATE_WHEN";
37720
- const VALIDATE_WHEN_ERROR = "error/VALIDATE_WHEN";
37721
- const validateWhen = (
37722
- dependentValidator,
37723
- primaryValidator,
37724
- optionalFieldName
37725
- ) => ({
37726
- type: VALIDATE_WHEN,
37727
- args: [dependentValidator, primaryValidator, optionalFieldName],
37728
- error: dependentValidator.error
37729
- });
38296
+ var validateWhenErrorMessage = function validateWhenErrorMessage(type) {
38297
+ return "".concat(type, " was passed to validateWhen, but that validator type does not exist.\n Please check that you are only calling validator creator functions exported from\n redux-freeform in your form config and that you didn't forget to\n invoke the validator creator (you cannot pass the functions themselves to\n createFormState). Also make sure you aren't passing validateWhen() to validateWhen\n as the primary validator.");
38298
+ };
38299
+
38300
+ var VALIDATE_WHEN = "validator/VALIDATE_WHEN";
38301
+ var VALIDATE_WHEN_ERROR = "error/VALIDATE_WHEN";
38302
+
38303
+ var validateWhen = function validateWhen(dependentValidator, primaryValidator, optionalFieldName) {
38304
+ return {
38305
+ type: VALIDATE_WHEN,
38306
+ args: [dependentValidator, primaryValidator, optionalFieldName],
38307
+ error: dependentValidator.error
38308
+ };
38309
+ };
38310
+
37730
38311
  validateWhen.error = VALIDATE_WHEN_ERROR;
37731
- validatorFns[VALIDATE_WHEN] = (value, args, form) => {
37732
- const [dependentValidator, primaryValidator, optionalFieldName] = args;
37733
- const dependsOnOtherField = typeof optionalFieldName === "string";
37734
-
37735
- if (
37736
- primaryValidator.type === undefined ||
37737
- typeof validatorFns[primaryValidator.type] !== "function"
37738
- ) {
38312
+
38313
+ validatorFns[VALIDATE_WHEN] = function (value, args, form) {
38314
+ var _args = _slicedToArray(args, 3),
38315
+ dependentValidator = _args[0],
38316
+ primaryValidator = _args[1],
38317
+ optionalFieldName = _args[2];
38318
+
38319
+ var dependsOnOtherField = typeof optionalFieldName === "string";
38320
+
38321
+ if (primaryValidator.type === undefined || typeof validatorFns[primaryValidator.type] !== "function") {
37739
38322
  throw new Error(validateWhenErrorMessage(primaryValidator.type));
37740
38323
  }
38324
+
37741
38325
  if (dependsOnOtherField && form[optionalFieldName] === undefined) {
37742
- throw new Error(
37743
- `${args[2]} was passed to matchesField, but that field does not exist in the form`
37744
- );
38326
+ throw new Error("".concat(args[2], " was passed to matchesField, but that field does not exist in the form"));
37745
38327
  }
37746
38328
 
37747
- const primaryPredicate = validatorToPredicate(
37748
- validatorFns[primaryValidator.type],
37749
- false
37750
- );
37751
- const primaryValue = dependsOnOtherField
37752
- ? form[optionalFieldName].rawValue
37753
- : value;
37754
- const primaryPredicatePassed = primaryPredicate(
37755
- primaryValue,
37756
- primaryValidator.args,
37757
- form
37758
- );
37759
-
37760
- return primaryPredicatePassed
37761
- ? validatorFns[dependentValidator.type](
37762
- value,
37763
- dependentValidator.args,
37764
- form
37765
- )
37766
- : true;
37767
- };
37768
-
37769
- const validateSumErrorMessage = type =>
37770
- `${type} was passed to validateSum, but that validator type does not exist.
37771
- Please check that you are only calling validator creator functions exported from
37772
- redux-freeform in your form config and that you didn't forget to
37773
- invoke the validator creator (you cannot pass the functions themselves to
37774
- createFormState).`;
37775
- const VALIDATE_SUM = "validator/VALIDATE_SUM";
37776
- const VALIDATE_SUM_ERROR = "error/VALIDATE_SUM";
37777
- const validateSum = (validator, fieldNamesArray) => ({
37778
- type: VALIDATE_SUM,
37779
- args: [validator, fieldNamesArray],
37780
- error: validator.error
37781
- });
38329
+ var primaryPredicate = validatorToPredicate(validatorFns[primaryValidator.type], false);
38330
+ var primaryValue = dependsOnOtherField ? form[optionalFieldName].rawValue : value;
38331
+ var primaryPredicatePassed = primaryPredicate(primaryValue, primaryValidator.args, form);
38332
+ return primaryPredicatePassed ? validatorFns[dependentValidator.type](value, dependentValidator.args, form) : true;
38333
+ };
38334
+
38335
+ var validateSumErrorMessage = function validateSumErrorMessage(type) {
38336
+ return "".concat(type, " was passed to validateSum, but that validator type does not exist.\n Please check that you are only calling validator creator functions exported from\n redux-freeform in your form config and that you didn't forget to\n invoke the validator creator (you cannot pass the functions themselves to\n createFormState).");
38337
+ };
38338
+
38339
+ var VALIDATE_SUM = "validator/VALIDATE_SUM";
38340
+ var VALIDATE_SUM_ERROR = "error/VALIDATE_SUM";
38341
+
38342
+ var validateSum = function validateSum(validator, fieldNamesArray) {
38343
+ return {
38344
+ type: VALIDATE_SUM,
38345
+ args: [validator, fieldNamesArray],
38346
+ error: validator.error
38347
+ };
38348
+ };
38349
+
37782
38350
  validateSum.error = VALIDATE_SUM_ERROR;
37783
- validatorFns[VALIDATE_SUM] = (value, args, form) => {
37784
- const [validator, fieldNamesArray] = args;
37785
38351
 
37786
- if (
37787
- validator.type === undefined ||
37788
- typeof validatorFns[validator.type] !== "function"
37789
- ) {
38352
+ validatorFns[VALIDATE_SUM] = function (value, args, form) {
38353
+ var _args2 = _slicedToArray(args, 2),
38354
+ validator = _args2[0],
38355
+ fieldNamesArray = _args2[1];
38356
+
38357
+ if (validator.type === undefined || typeof validatorFns[validator.type] !== "function") {
37790
38358
  throw new Error(validateSumErrorMessage(validator.type));
37791
38359
  }
37792
38360
 
37793
- for (const fieldName of fieldNamesArray) {
37794
- if (form[fieldName] === undefined) {
37795
- throw new Error(
37796
- `${fieldName} was passed to matchesField, but that field does not exist in the form`
37797
- );
38361
+ var _iterator = _createForOfIteratorHelper(fieldNamesArray),
38362
+ _step;
38363
+
38364
+ try {
38365
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
38366
+ var fieldName = _step.value;
38367
+
38368
+ if (form[fieldName] === undefined) {
38369
+ throw new Error("".concat(fieldName, " was passed to matchesField, but that field does not exist in the form"));
38370
+ }
37798
38371
  }
38372
+ } catch (err) {
38373
+ _iterator.e(err);
38374
+ } finally {
38375
+ _iterator.f();
37799
38376
  }
37800
38377
 
37801
- const sum = fieldNamesArray.reduce(
37802
- (acc, curr) => acc + Number(form[curr].rawValue),
37803
- Number(value)
37804
- );
37805
-
38378
+ var sum = fieldNamesArray.reduce(function (acc, curr) {
38379
+ return acc + Number(form[curr].rawValue);
38380
+ }, Number(value));
37806
38381
  return validatorFns[validator.type](sum, validator.args, form);
37807
38382
  };
37808
38383
 
37809
- const HAS_LENGTH = "validator/HAS_LENGTH";
37810
- const HAS_LENGTH_ERROR = "error/HAS_LENGTH";
37811
- const hasLength = createValidator(HAS_LENGTH, HAS_LENGTH_ERROR);
37812
- validatorFns[HAS_LENGTH] = (value, args, form) => {
38384
+ var HAS_LENGTH = "validator/HAS_LENGTH";
38385
+ var HAS_LENGTH_ERROR = "error/HAS_LENGTH";
38386
+ var hasLength = createValidator(HAS_LENGTH, HAS_LENGTH_ERROR);
38387
+
38388
+ validatorFns[HAS_LENGTH] = function (value, args, form) {
37813
38389
  if (value === "") {
37814
38390
  return true;
37815
38391
  }
37816
- const min = args[0];
37817
- const max = args[1];
38392
+
38393
+ var min = args[0];
38394
+ var max = args[1];
38395
+
37818
38396
  if (max == undefined || min == undefined) {
37819
- throw new Error(
37820
- "Max and min need to be defined for hasLength, both or one of them is undefined"
37821
- );
38397
+ throw new Error("Max and min need to be defined for hasLength, both or one of them is undefined");
37822
38398
  }
38399
+
37823
38400
  if (max < min) {
37824
- throw new Error(
37825
- "hasLength validator was passed a min greater than the max"
37826
- );
38401
+ throw new Error("hasLength validator was passed a min greater than the max");
37827
38402
  }
37828
- const valueLength = value.length;
38403
+
38404
+ var valueLength = value.length;
37829
38405
  return max >= valueLength && valueLength >= min;
37830
38406
  };
37831
38407
 
37832
- const DATE_BEFORE_TODAY = "validator/DATE_BEFORE_TODAY";
37833
- const DATE_BEFORE_TODAY_ERROR = "error/DATE_BEFORE_TODAY";
37834
- const dateBeforeToday = createValidator(
37835
- DATE_BEFORE_TODAY,
37836
- DATE_BEFORE_TODAY_ERROR
37837
- );
37838
- validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
38408
+ var DATE_BEFORE_TODAY = "validator/DATE_BEFORE_TODAY";
38409
+ var DATE_BEFORE_TODAY_ERROR = "error/DATE_BEFORE_TODAY";
38410
+ var dateBeforeToday = createValidator(DATE_BEFORE_TODAY, DATE_BEFORE_TODAY_ERROR);
38411
+
38412
+ validatorFns[DATE_BEFORE_TODAY] = function (value, args, form) {
37839
38413
  if (value === "") {
37840
38414
  return true;
37841
38415
  }
37842
- const dateFormat = args[0];
37843
- const unit = args[1];
37844
- const inclusive = args[2] || false;
38416
+
38417
+ var dateFormat = args[0];
38418
+ var unit = args[1];
38419
+ var inclusive = args[2] || false;
37845
38420
 
37846
38421
  if (dateFormat == undefined || unit == undefined) {
37847
- throw new Error(
37848
- "Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
37849
- );
38422
+ throw new Error("Date format and unit need to be defined for dateBeforeToday, one or both are undefined");
37850
38423
  }
37851
- const now = dayjs();
37852
- const dateValue = dayjs(value, dateFormat);
38424
+
38425
+ var now = dayjs();
38426
+ var dateValue = dayjs(value, dateFormat);
37853
38427
 
37854
38428
  if (inclusive === true) {
37855
38429
  return dateValue.isSameOrBefore(now, unit);
37856
38430
  }
38431
+
37857
38432
  return dateValue.isBefore(now, unit);
37858
38433
  };
37859
38434
 
37860
- const DATE_AFTER_TODAY = "validator/DATE_AFTER_TODAY";
37861
- const DATE_AFTER_TODAY_ERROR = "error/DATE_AFTER_TODAY";
37862
- const dateAfterToday = createValidator(
37863
- DATE_AFTER_TODAY,
37864
- DATE_AFTER_TODAY_ERROR
37865
- );
37866
- validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
38435
+ var DATE_AFTER_TODAY = "validator/DATE_AFTER_TODAY";
38436
+ var DATE_AFTER_TODAY_ERROR = "error/DATE_AFTER_TODAY";
38437
+ var dateAfterToday = createValidator(DATE_AFTER_TODAY, DATE_AFTER_TODAY_ERROR);
38438
+
38439
+ validatorFns[DATE_AFTER_TODAY] = function (value, args, form) {
37867
38440
  if (value === "") {
37868
38441
  return true;
37869
38442
  }
37870
- const dateFormat = args[0];
37871
- const unit = args[1];
37872
- const inclusive = args[2] || false;
38443
+
38444
+ var dateFormat = args[0];
38445
+ var unit = args[1];
38446
+ var inclusive = args[2] || false;
37873
38447
 
37874
38448
  if (dateFormat == undefined || unit == undefined) {
37875
- throw new Error(
37876
- "Date format and unit need to be defined for dateAfterToday, one or both are undefined"
37877
- );
38449
+ throw new Error("Date format and unit need to be defined for dateAfterToday, one or both are undefined");
37878
38450
  }
37879
- const now = dayjs();
37880
- const dateValue = dayjs(value, dateFormat);
38451
+
38452
+ var now = dayjs();
38453
+ var dateValue = dayjs(value, dateFormat);
37881
38454
 
37882
38455
  if (inclusive === true) {
37883
38456
  return dateValue.isSameOrAfter(now, unit);
37884
38457
  }
38458
+
37885
38459
  return dateValue.isAfter(now, unit);
37886
38460
  };
37887
38461
 
37888
- const IS_VALID_MONTH = "validator/IS_VALID_MONTH";
37889
- const IS_VALID_MONTH_ERROR = "error/IS_VALID_MONTH";
37890
- const isValidMonth = createValidator(
37891
- IS_VALID_MONTH,
37892
- IS_VALID_MONTH_ERROR
37893
- );
37894
- validatorFns[IS_VALID_MONTH] = (value, args, form) => {
38462
+ var IS_VALID_MONTH = "validator/IS_VALID_MONTH";
38463
+ var IS_VALID_MONTH_ERROR = "error/IS_VALID_MONTH";
38464
+ var isValidMonth = createValidator(IS_VALID_MONTH, IS_VALID_MONTH_ERROR);
38465
+
38466
+ validatorFns[IS_VALID_MONTH] = function (value, args, form) {
37895
38467
  if (value === "") {
37896
38468
  return true;
37897
- }
37898
- // Function takes one argument representing the character position
38469
+ } // Function takes one argument representing the character position
37899
38470
  // In a date string to identify where the month is
37900
38471
  // Eg "10/21/2021" - start position is 0
37901
38472
  // Or "18/03/1990" - start position is 3
37902
38473
  // Only works with two digit months (01, 02, 03, etc)
37903
- const monthStartPosition = parseInt(args[0]);
37904
- const monthEndPosition = monthStartPosition + 2;
37905
- if (monthStartPosition === NaN) {
38474
+
38475
+
38476
+ var monthStartPosition = parseInt(args[0]);
38477
+ var monthEndPosition = monthStartPosition + 2;
38478
+
38479
+ if (isNaN(monthStartPosition)) {
37906
38480
  throw new Error("Month start position has to be a valid integer string");
37907
38481
  }
37908
- const month = parseInt(value.slice(monthStartPosition, monthEndPosition));
37909
- if (month === NaN) {
38482
+
38483
+ var month = parseInt(value.slice(monthStartPosition, monthEndPosition));
38484
+
38485
+ if (isNaN(month)) {
37910
38486
  return false;
37911
38487
  }
38488
+
37912
38489
  return month >= 1 && month <= 12;
37913
38490
  };
37914
38491
 
37915
- const MATCHES_REGEX = "validator/MATCHES_REGEX";
37916
- const MATCHES_REGEX_ERROR = "error/MATCHES_REGEX";
37917
- const matchesRegex = createValidator(MATCHES_REGEX, MATCHES_REGEX_ERROR);
37918
- validatorFns[MATCHES_REGEX] = (value, args, form) => {
38492
+ var MATCHES_REGEX = "validator/MATCHES_REGEX";
38493
+ var MATCHES_REGEX_ERROR = "error/MATCHES_REGEX";
38494
+ var matchesRegex = createValidator(MATCHES_REGEX, MATCHES_REGEX_ERROR);
38495
+
38496
+ validatorFns[MATCHES_REGEX] = function (value, args, form) {
37919
38497
  if (value === "") {
37920
38498
  return true;
37921
38499
  }
38500
+
37922
38501
  return new RegExp(args[0]).test(value); // new RexExp never throws an error, no matter the input
37923
- };
38502
+ }; // based on http://www.brainjar.com/js/validation/
37924
38503
 
37925
- // based on http://www.brainjar.com/js/validation/
37926
- const IS_ROUTING_NUMBER = "validator/IS_ROUTING_NUMBER";
37927
- const IS_ROUTING_NUMBER_ERROR = "error/IS_ROUTING_NUMBER";
37928
- const isRoutingNumber = createValidator(
37929
- IS_ROUTING_NUMBER,
37930
- IS_ROUTING_NUMBER_ERROR
37931
- );
37932
- validatorFns[IS_ROUTING_NUMBER] = (value, args, form) => {
38504
+
38505
+ var IS_ROUTING_NUMBER = "validator/IS_ROUTING_NUMBER";
38506
+ var IS_ROUTING_NUMBER_ERROR = "error/IS_ROUTING_NUMBER";
38507
+ var isRoutingNumber = createValidator(IS_ROUTING_NUMBER, IS_ROUTING_NUMBER_ERROR);
38508
+
38509
+ validatorFns[IS_ROUTING_NUMBER] = function (value, args, form) {
37933
38510
  if (value === "") {
37934
38511
  return true;
37935
38512
  }
38513
+
37936
38514
  if (value.length != 9) {
37937
38515
  return false;
37938
38516
  }
37939
- const sum = value
37940
- .split("")
37941
- .map(ch => parseInt(ch))
37942
- .reduce((acc, cur, idx) => {
37943
- switch (idx % 3) {
37944
- case 0:
37945
- return acc + 3 * cur;
37946
- case 1:
37947
- return acc + 7 * cur;
37948
- case 2:
37949
- return acc + 1 * cur;
37950
- }
37951
- }, 0);
38517
+
38518
+ var sum = value.split("").map(function (ch) {
38519
+ return parseInt(ch);
38520
+ }).reduce(function (acc, cur, idx) {
38521
+ switch (idx % 3) {
38522
+ case 0:
38523
+ return acc + 3 * cur;
38524
+
38525
+ case 1:
38526
+ return acc + 7 * cur;
38527
+
38528
+ case 2:
38529
+ return acc + 1 * cur;
38530
+ }
38531
+ }, 0);
37952
38532
  return sum != 0 && sum % 10 == 0;
37953
38533
  };
37954
38534
 
37955
- const HAS_NUMBER = "validator/HAS_NUMBER";
37956
- const HAS_NUMBER_ERROR$1 = "error/HAS_NUMBER";
37957
- const hasNumber = createValidator(HAS_NUMBER, HAS_NUMBER_ERROR$1);
37958
- validatorFns[HAS_NUMBER] = (value, args, form) => {
38535
+ var HAS_NUMBER = "validator/HAS_NUMBER";
38536
+ var HAS_NUMBER_ERROR$1 = "error/HAS_NUMBER";
38537
+ var hasNumber = createValidator(HAS_NUMBER, HAS_NUMBER_ERROR$1);
38538
+
38539
+ validatorFns[HAS_NUMBER] = function (value, args, form) {
37959
38540
  if (value === "") {
37960
38541
  return true;
37961
38542
  }
38543
+
37962
38544
  return new RegExp(/[0-9]/).test(value);
37963
38545
  };
37964
38546
 
37965
- const HAS_LOWERCASE_LETTER = "validator/HAS_LOWERCASE_LETTER";
37966
- const HAS_LOWERCASE_LETTER_ERROR$1 = "error/HAS_LOWERCASE_LETTER";
37967
- const hasLowercaseLetter = createValidator(
37968
- HAS_LOWERCASE_LETTER,
37969
- HAS_LOWERCASE_LETTER_ERROR$1
37970
- );
37971
- validatorFns[HAS_LOWERCASE_LETTER] = (value, args, form) => {
38547
+ var HAS_LOWERCASE_LETTER = "validator/HAS_LOWERCASE_LETTER";
38548
+ var HAS_LOWERCASE_LETTER_ERROR$1 = "error/HAS_LOWERCASE_LETTER";
38549
+ var hasLowercaseLetter = createValidator(HAS_LOWERCASE_LETTER, HAS_LOWERCASE_LETTER_ERROR$1);
38550
+
38551
+ validatorFns[HAS_LOWERCASE_LETTER] = function (value, args, form) {
37972
38552
  if (value === "") {
37973
38553
  return true;
37974
38554
  }
38555
+
37975
38556
  return new RegExp(/[a-z]/).test(value);
37976
38557
  };
37977
38558
 
37978
- const HAS_UPPERCASE_LETTER = "validator/HAS_UPPERCASE_LETTER";
37979
- const HAS_UPPERCASE_LETTER_ERROR$1 = "error/HAS_UPPERCASE_LETTER";
37980
- const hasUppercaseLetter = createValidator(
37981
- HAS_UPPERCASE_LETTER,
37982
- HAS_UPPERCASE_LETTER_ERROR$1
37983
- );
37984
- validatorFns[HAS_UPPERCASE_LETTER] = (value, args, form) => {
38559
+ var HAS_UPPERCASE_LETTER = "validator/HAS_UPPERCASE_LETTER";
38560
+ var HAS_UPPERCASE_LETTER_ERROR$1 = "error/HAS_UPPERCASE_LETTER";
38561
+ var hasUppercaseLetter = createValidator(HAS_UPPERCASE_LETTER, HAS_UPPERCASE_LETTER_ERROR$1);
38562
+
38563
+ validatorFns[HAS_UPPERCASE_LETTER] = function (value, args, form) {
37985
38564
  if (value === "") {
37986
38565
  return true;
37987
38566
  }
38567
+
37988
38568
  return new RegExp(/[A-Z]/).test(value);
37989
38569
  };
37990
38570
 
37991
- const HAS_SPECIAL_CHARACTER = "validator/HAS_SPECIAL_CHARACTER";
37992
- const HAS_SPECIAL_CHARACTER_ERROR$1 = "error/HAS_SPECIAL_CHARACTER";
37993
- const hasSpecialCharacter = createValidator(
37994
- HAS_SPECIAL_CHARACTER,
37995
- HAS_SPECIAL_CHARACTER_ERROR$1
37996
- );
37997
- validatorFns[HAS_SPECIAL_CHARACTER] = (value, args, form) => {
38571
+ var HAS_SPECIAL_CHARACTER = "validator/HAS_SPECIAL_CHARACTER";
38572
+ var HAS_SPECIAL_CHARACTER_ERROR$1 = "error/HAS_SPECIAL_CHARACTER";
38573
+ var hasSpecialCharacter = createValidator(HAS_SPECIAL_CHARACTER, HAS_SPECIAL_CHARACTER_ERROR$1);
38574
+
38575
+ validatorFns[HAS_SPECIAL_CHARACTER] = function (value, args, form) {
37998
38576
  if (value === "") {
37999
38577
  return true;
38000
38578
  }
38579
+
38001
38580
  return new RegExp(/[!@#$%^&*.?]/).test(value);
38002
38581
  };
38003
38582
 
38004
- const IS_PROBABLY_EMAIL = "validator/IS_PROBABLY_EMAIL";
38005
- const IS_PROBABLY_EMAIL_ERROR = "error/IS_PROBABLY_EMAIL";
38006
- const isProbablyEmail = createValidator(
38007
- IS_PROBABLY_EMAIL,
38008
- IS_PROBABLY_EMAIL_ERROR
38009
- );
38010
- validatorFns[IS_PROBABLY_EMAIL] = (value, args, form) => {
38583
+ var IS_PROBABLY_EMAIL = "validator/IS_PROBABLY_EMAIL";
38584
+ var IS_PROBABLY_EMAIL_ERROR = "error/IS_PROBABLY_EMAIL";
38585
+ var isProbablyEmail = createValidator(IS_PROBABLY_EMAIL, IS_PROBABLY_EMAIL_ERROR);
38586
+
38587
+ validatorFns[IS_PROBABLY_EMAIL] = function (value, args, form) {
38011
38588
  if (value === "") {
38012
38589
  return true;
38013
38590
  }
38591
+
38014
38592
  return new RegExp(/^\S+@\S+\.\S+$/).test(value);
38015
38593
  };
38016
38594
 
38017
- const runValidatorErrorMessage = type =>
38018
- `${type} was passed to runValidator, but that validator type does not exist.
38019
- Please check that you are only calling validator creator functions exported from
38020
- redux-freeform in your form config and that you didn't forget to
38021
- invoke the validator creator (you cannot pass the functions themselves to
38022
- createFormState)`;
38595
+ var runValidatorErrorMessage = function runValidatorErrorMessage(type) {
38596
+ return "".concat(type, " was passed to runValidator, but that validator type does not exist. \n Please check that you are only calling validator creator functions exported from \n redux-freeform in your form config and that you didn't forget to \n invoke the validator creator (you cannot pass the functions themselves to \n createFormState)");
38597
+ };
38598
+
38599
+ var runValidator = function runValidator(validator, value, form) {
38600
+ var validatorFn = validatorFns[validator.type];
38023
38601
 
38024
- const runValidator = (validator, value, form) => {
38025
- const validatorFn = validatorFns[validator.type];
38026
38602
  if (validatorFn === undefined) {
38027
38603
  throw new Error(runValidatorErrorMessage(validator.type));
38028
38604
  }
38605
+
38029
38606
  return validatorFn(value, validator.args, form) ? null : validator.error;
38030
38607
  };
38031
38608
 
38032
- const _computeErrors = (fieldName, form, validators) => {
38033
- return validators
38034
- .map(v => runValidator(v, form[fieldName].rawValue, form))
38035
- .filter(x => x !== null);
38609
+ var runFormValidators = function runFormValidators(fieldName, form, validators) {
38610
+ return validators.map(function (v) {
38611
+ return runValidator(v, form[fieldName].rawValue, form);
38612
+ }).filter(function (x) {
38613
+ return x !== null;
38614
+ });
38615
+ };
38616
+
38617
+ var computeConstraints = function computeConstraints(fieldName, form) {
38618
+ var constraints = form[fieldName].constraints;
38619
+ return runFormValidators(fieldName, form, constraints);
38036
38620
  };
38037
38621
 
38038
- const computeConstraints = (fieldName, form) => {
38039
- const constraints = form[fieldName].constraints;
38040
- return _computeErrors(fieldName, form, constraints);
38622
+ var computeErrors = function computeErrors(fieldName, form) {
38623
+ var validators = form[fieldName].validators;
38624
+ return runFormValidators(fieldName, form, validators);
38041
38625
  };
38042
38626
 
38043
- const computeErrors = (fieldName, form) => {
38044
- const validators = form[fieldName].validators;
38045
- return _computeErrors(fieldName, form, validators);
38627
+ var computeErrorEntries = function computeErrorEntries(formState) {
38628
+ var fields = Object.entries(formState);
38629
+
38630
+ for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {
38631
+ var entry = _fields[_i];
38632
+ var fieldName = entry[0];
38633
+ var errors = computeErrors(fieldName, formState);
38634
+ formState[fieldName].errors = errors;
38635
+ formState[fieldName].hasErrors = errors.length > 0;
38636
+ }
38637
+ };
38638
+
38639
+ var computeDirtyEntries = function computeDirtyEntries(formState, changedFieldName) {
38640
+ var fields = Object.entries(formState);
38641
+
38642
+ for (var _i2 = 0, _fields2 = fields; _i2 < _fields2.length; _i2++) {
38643
+ var entry = _fields2[_i2];
38644
+ var fieldName = entry[0];
38645
+ var field = entry[1];
38646
+ var dirty = fieldName === changedFieldName ? true : field.dirty;
38647
+ formState[fieldName].dirty = dirty;
38648
+ }
38046
38649
  };
38047
38650
 
38048
38651
  var obj;
38049
- var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : ( obj = {}, obj["immer-nothing"] = true, obj );
38050
- var DRAFTABLE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-draftable") : "__$immer_draftable";
38051
- var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol.for ? Symbol.for("immer-state") : "__$immer_state";
38652
+ var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : (obj = {}, obj["immer-nothing"] = true, obj);
38653
+ var DRAFTABLE = typeof Symbol !== "undefined" && Symbol["for"] ? Symbol["for"]("immer-draftable") : "__$immer_draftable";
38654
+ var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol["for"] ? Symbol["for"]("immer-state") : "__$immer_state";
38655
+
38052
38656
  function isDraft(value) {
38053
38657
  return !!value && !!value[DRAFT_STATE];
38054
38658
  }
38659
+
38055
38660
  function isDraftable(value) {
38056
- if (!value) { return false; }
38661
+ if (!value) {
38662
+ return false;
38663
+ }
38664
+
38057
38665
  return isPlainObject(value) || !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE];
38058
38666
  }
38667
+
38059
38668
  function isPlainObject(value) {
38060
- if (!value || typeof value !== "object") { return false; }
38061
- if (Array.isArray(value)) { return true; }
38669
+ if (!value || _typeof(value) !== "object") {
38670
+ return false;
38671
+ }
38672
+
38673
+ if (Array.isArray(value)) {
38674
+ return true;
38675
+ }
38676
+
38062
38677
  var proto = Object.getPrototypeOf(value);
38063
38678
  return !proto || proto === Object.prototype;
38064
38679
  }
38680
+
38065
38681
  var assign = Object.assign || function assign(target, value) {
38066
38682
  for (var key in value) {
38067
38683
  if (has$1(value, key)) {
@@ -38071,11 +38687,18 @@ var assign = Object.assign || function assign(target, value) {
38071
38687
 
38072
38688
  return target;
38073
38689
  };
38074
- var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
38690
+
38691
+ var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) {
38692
+ return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
38693
+ } : Object.getOwnPropertyNames;
38694
+
38075
38695
  function shallowCopy(base, invokeGetters) {
38076
- if ( invokeGetters === void 0 ) invokeGetters = false;
38696
+ if (invokeGetters === void 0) invokeGetters = false;
38697
+
38698
+ if (Array.isArray(base)) {
38699
+ return base.slice();
38700
+ }
38077
38701
 
38078
- if (Array.isArray(base)) { return base.slice(); }
38079
38702
  var clone = Object.create(Object.getPrototypeOf(base));
38080
38703
  ownKeys$2(base).forEach(function (key) {
38081
38704
  if (key === DRAFT_STATE) {
@@ -38105,20 +38728,28 @@ function shallowCopy(base, invokeGetters) {
38105
38728
  });
38106
38729
  return clone;
38107
38730
  }
38731
+
38108
38732
  function each(value, cb) {
38109
38733
  if (Array.isArray(value)) {
38110
- for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
38734
+ for (var i = 0; i < value.length; i++) {
38735
+ cb(i, value[i], value);
38736
+ }
38111
38737
  } else {
38112
- ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
38738
+ ownKeys$2(value).forEach(function (key) {
38739
+ return cb(key, value[key], value);
38740
+ });
38113
38741
  }
38114
38742
  }
38743
+
38115
38744
  function isEnumerable(base, prop) {
38116
38745
  var desc = Object.getOwnPropertyDescriptor(base, prop);
38117
38746
  return !!desc && desc.enumerable;
38118
38747
  }
38748
+
38119
38749
  function has$1(thing, prop) {
38120
38750
  return Object.prototype.hasOwnProperty.call(thing, prop);
38121
38751
  }
38752
+
38122
38753
  function is(x, y) {
38123
38754
  // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
38124
38755
  if (x === y) {
@@ -38127,18 +38758,27 @@ function is(x, y) {
38127
38758
  return x !== x && y !== y;
38128
38759
  }
38129
38760
  }
38761
+
38130
38762
  function clone(obj) {
38131
- if (!isDraftable(obj)) { return obj; }
38132
- if (Array.isArray(obj)) { return obj.map(clone); }
38763
+ if (!isDraftable(obj)) {
38764
+ return obj;
38765
+ }
38766
+
38767
+ if (Array.isArray(obj)) {
38768
+ return obj.map(clone);
38769
+ }
38770
+
38133
38771
  var cloned = Object.create(Object.getPrototypeOf(obj));
38134
38772
 
38135
- for (var key in obj) { cloned[key] = clone(obj[key]); }
38773
+ for (var key in obj) {
38774
+ cloned[key] = clone(obj[key]);
38775
+ }
38136
38776
 
38137
38777
  return cloned;
38138
38778
  }
38139
-
38140
38779
  /** Each scope represents a `produce` call. */
38141
38780
 
38781
+
38142
38782
  var ImmerScope = function ImmerScope(parent) {
38143
38783
  this.drafts = [];
38144
38784
  this.parent = parent; // Whenever the modified draft contains a draft from another scope, we
@@ -38149,7 +38789,7 @@ var ImmerScope = function ImmerScope(parent) {
38149
38789
  this.patches = null;
38150
38790
  };
38151
38791
 
38152
- ImmerScope.prototype.usePatches = function usePatches (patchListener) {
38792
+ ImmerScope.prototype.usePatches = function usePatches(patchListener) {
38153
38793
  if (patchListener) {
38154
38794
  this.patches = [];
38155
38795
  this.inversePatches = [];
@@ -38157,17 +38797,18 @@ ImmerScope.prototype.usePatches = function usePatches (patchListener) {
38157
38797
  }
38158
38798
  };
38159
38799
 
38160
- ImmerScope.prototype.revoke = function revoke$1 () {
38800
+ ImmerScope.prototype.revoke = function revoke$1() {
38161
38801
  this.leave();
38162
38802
  this.drafts.forEach(revoke);
38163
38803
  this.drafts = null; // Make draft-related methods throw.
38164
38804
  };
38165
38805
 
38166
- ImmerScope.prototype.leave = function leave () {
38806
+ ImmerScope.prototype.leave = function leave() {
38167
38807
  if (this === ImmerScope.current) {
38168
38808
  ImmerScope.current = this.parent;
38169
38809
  }
38170
38810
  };
38811
+
38171
38812
  ImmerScope.current = null;
38172
38813
 
38173
38814
  ImmerScope.enter = function () {
@@ -38176,11 +38817,11 @@ ImmerScope.enter = function () {
38176
38817
 
38177
38818
  function revoke(draft) {
38178
38819
  draft[DRAFT_STATE].revoke();
38179
- }
38820
+ } // but share them all instead
38180
38821
 
38181
- // but share them all instead
38182
38822
 
38183
38823
  var descriptors$1 = {};
38824
+
38184
38825
  function willFinalize(scope, result, isReplaced) {
38185
38826
  scope.drafts.forEach(function (draft) {
38186
38827
  draft[DRAFT_STATE].finalizing = true;
@@ -38195,9 +38836,10 @@ function willFinalize(scope, result, isReplaced) {
38195
38836
  markChangesSweep(scope.drafts);
38196
38837
  } // When a child draft is returned, look for changes.
38197
38838
  else if (isDraft(result) && result[DRAFT_STATE].scope === scope) {
38198
- markChangesSweep(scope.drafts);
38199
- }
38839
+ markChangesSweep(scope.drafts);
38840
+ }
38200
38841
  }
38842
+
38201
38843
  function createProxy(base, parent) {
38202
38844
  var isArray = Array.isArray(base);
38203
38845
  var draft = clonePotentialDraft(base);
@@ -38251,7 +38893,11 @@ function peek(draft, prop) {
38251
38893
  function get$1(state, prop) {
38252
38894
  assertUnrevoked(state);
38253
38895
  var value = peek(source(state), prop);
38254
- if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
38896
+
38897
+ if (state.finalizing) {
38898
+ return value;
38899
+ } // Create a draft if the value is unmodified.
38900
+
38255
38901
 
38256
38902
  if (value === peek(state.base, prop) && isDraftable(value)) {
38257
38903
  prepareCopy(state);
@@ -38266,7 +38912,10 @@ function set$1(state, prop, value) {
38266
38912
  state.assigned[prop] = true;
38267
38913
 
38268
38914
  if (!state.modified) {
38269
- if (is(value, peek(source(state), prop))) { return; }
38915
+ if (is(value, peek(source(state), prop))) {
38916
+ return;
38917
+ }
38918
+
38270
38919
  markChanged(state);
38271
38920
  prepareCopy(state);
38272
38921
  }
@@ -38277,12 +38926,17 @@ function set$1(state, prop, value) {
38277
38926
  function markChanged(state) {
38278
38927
  if (!state.modified) {
38279
38928
  state.modified = true;
38280
- if (state.parent) { markChanged(state.parent); }
38929
+
38930
+ if (state.parent) {
38931
+ markChanged(state.parent);
38932
+ }
38281
38933
  }
38282
38934
  }
38283
38935
 
38284
38936
  function prepareCopy(state) {
38285
- if (!state.copy) { state.copy = clonePotentialDraft(state.base); }
38937
+ if (!state.copy) {
38938
+ state.copy = clonePotentialDraft(state.base);
38939
+ }
38286
38940
  }
38287
38941
 
38288
38942
  function clonePotentialDraft(base) {
@@ -38307,15 +38961,12 @@ function proxyProperty(draft, prop, enumerable) {
38307
38961
  descriptors$1[prop] = desc = {
38308
38962
  configurable: true,
38309
38963
  enumerable: enumerable,
38310
-
38311
38964
  get: function get$1$1() {
38312
38965
  return get$1(this[DRAFT_STATE], prop);
38313
38966
  },
38314
-
38315
38967
  set: function set$1$1(value) {
38316
38968
  set$1(this[DRAFT_STATE], prop, value);
38317
38969
  }
38318
-
38319
38970
  };
38320
38971
  }
38321
38972
 
@@ -38323,7 +38974,9 @@ function proxyProperty(draft, prop, enumerable) {
38323
38974
  }
38324
38975
 
38325
38976
  function assertUnrevoked(state) {
38326
- if (state.revoked === true) { throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(source(state))); }
38977
+ if (state.revoked === true) {
38978
+ throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(source(state)));
38979
+ }
38327
38980
  } // This looks expensive, but only proxies are visited, and only objects without known changes are scanned.
38328
38981
 
38329
38982
 
@@ -38337,16 +38990,27 @@ function markChangesSweep(drafts) {
38337
38990
 
38338
38991
  if (!state.modified) {
38339
38992
  if (Array.isArray(state.base)) {
38340
- if (hasArrayChanges(state)) { markChanged(state); }
38341
- } else if (hasObjectChanges(state)) { markChanged(state); }
38993
+ if (hasArrayChanges(state)) {
38994
+ markChanged(state);
38995
+ }
38996
+ } else if (hasObjectChanges(state)) {
38997
+ markChanged(state);
38998
+ }
38342
38999
  }
38343
39000
  }
38344
39001
  }
38345
39002
 
38346
39003
  function markChangesRecursively(object) {
38347
- if (!object || typeof object !== "object") { return; }
39004
+ if (!object || _typeof(object) !== "object") {
39005
+ return;
39006
+ }
39007
+
38348
39008
  var state = object[DRAFT_STATE];
38349
- if (!state) { return; }
39009
+
39010
+ if (!state) {
39011
+ return;
39012
+ }
39013
+
38350
39014
  var base = state.base;
38351
39015
  var draft = state.draft;
38352
39016
  var assigned = state.assigned;
@@ -38376,14 +39040,20 @@ function markChangesRecursively(object) {
38376
39040
  assigned.length = true;
38377
39041
 
38378
39042
  if (draft.length < base.length) {
38379
- for (var i = draft.length; i < base.length; i++) { assigned[i] = false; }
39043
+ for (var i = draft.length; i < base.length; i++) {
39044
+ assigned[i] = false;
39045
+ }
38380
39046
  } else {
38381
- for (var i$1 = base.length; i$1 < draft.length; i$1++) { assigned[i$1] = true; }
39047
+ for (var i$1 = base.length; i$1 < draft.length; i$1++) {
39048
+ assigned[i$1] = true;
39049
+ }
38382
39050
  }
38383
39051
 
38384
39052
  for (var i$2 = 0; i$2 < draft.length; i$2++) {
38385
39053
  // Only untouched indices trigger recursion.
38386
- if (assigned[i$2] === undefined) { markChangesRecursively(draft[i$2]); }
39054
+ if (assigned[i$2] === undefined) {
39055
+ markChangesRecursively(draft[i$2]);
39056
+ }
38387
39057
  }
38388
39058
  }
38389
39059
  }
@@ -38404,13 +39074,13 @@ function hasObjectChanges(state) {
38404
39074
  } // Once a base key is deleted, future changes go undetected, because its
38405
39075
  // descriptor is erased. This branch detects any missed changes.
38406
39076
  else {
38407
- var value = draft[key];
38408
- var state$1 = value && value[DRAFT_STATE];
39077
+ var value = draft[key];
39078
+ var state$1 = value && value[DRAFT_STATE];
38409
39079
 
38410
- if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
38411
- return true;
38412
- }
39080
+ if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
39081
+ return true;
38413
39082
  }
39083
+ }
38414
39084
  } // At this point, no keys were added or changed.
38415
39085
  // Compare key count to determine if keys were deleted.
38416
39086
 
@@ -38420,7 +39090,10 @@ function hasObjectChanges(state) {
38420
39090
 
38421
39091
  function hasArrayChanges(state) {
38422
39092
  var draft = state.draft;
38423
- if (draft.length !== state.base.length) { return true; } // See #116
39093
+
39094
+ if (draft.length !== state.base.length) {
39095
+ return true;
39096
+ } // See #116
38424
39097
  // If we first shorten the length, our array interceptors will be removed.
38425
39098
  // If after that new items are added, result in the same original length,
38426
39099
  // those last items will have no intercepting property.
@@ -38428,9 +39101,13 @@ function hasArrayChanges(state) {
38428
39101
  // N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check
38429
39102
  // the last one
38430
39103
 
39104
+
38431
39105
  var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)
38432
39106
 
38433
- if (descriptor && !descriptor.get) { return true; } // For all other cases, we don't have to compare, as they would have been picked up by the index setters
39107
+ if (descriptor && !descriptor.get) {
39108
+ return true;
39109
+ } // For all other cases, we don't have to compare, as they would have been picked up by the index setters
39110
+
38434
39111
 
38435
39112
  return false;
38436
39113
  }
@@ -38444,11 +39121,12 @@ function createHiddenProperty(target, prop, value) {
38444
39121
  }
38445
39122
 
38446
39123
  var legacyProxy = /*#__PURE__*/Object.freeze({
38447
- willFinalize: willFinalize,
38448
- createProxy: createProxy
39124
+ willFinalize: willFinalize,
39125
+ createProxy: createProxy
38449
39126
  });
38450
39127
 
38451
39128
  function willFinalize$1() {}
39129
+
38452
39130
  function createProxy$1(base, parent) {
38453
39131
  var scope = parent ? parent.scope : ImmerScope.current;
38454
39132
  var state = {
@@ -38483,33 +39161,27 @@ function createProxy$1(base, parent) {
38483
39161
  scope.drafts.push(proxy);
38484
39162
  return proxy;
38485
39163
  }
39164
+
38486
39165
  var objectTraps = {
38487
39166
  get: get$1$1,
38488
-
38489
39167
  has: function has(target, prop) {
38490
39168
  return prop in source$1(target);
38491
39169
  },
38492
-
38493
39170
  ownKeys: function ownKeys(target) {
38494
39171
  return Reflect.ownKeys(source$1(target));
38495
39172
  },
38496
-
38497
39173
  set: set$1$1,
38498
39174
  deleteProperty: deleteProperty,
38499
39175
  getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
38500
-
38501
39176
  defineProperty: function defineProperty() {
38502
39177
  throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
38503
39178
  },
38504
-
38505
39179
  getPrototypeOf: function getPrototypeOf(target) {
38506
39180
  return Object.getPrototypeOf(target.base);
38507
39181
  },
38508
-
38509
39182
  setPrototypeOf: function setPrototypeOf() {
38510
39183
  throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore
38511
39184
  }
38512
-
38513
39185
  };
38514
39186
  var arrayTraps = {};
38515
39187
  each(objectTraps, function (key, fn) {
@@ -38548,7 +39220,10 @@ function peek$1(draft, prop) {
38548
39220
  }
38549
39221
 
38550
39222
  function get$1$1(state, prop) {
38551
- if (prop === DRAFT_STATE) { return state; }
39223
+ if (prop === DRAFT_STATE) {
39224
+ return state;
39225
+ }
39226
+
38552
39227
  var drafts = state.drafts; // Check for existing draft in unmodified state.
38553
39228
 
38554
39229
  if (!state.modified && has$1(drafts, prop)) {
@@ -38564,7 +39239,10 @@ function get$1$1(state, prop) {
38564
39239
 
38565
39240
  if (state.modified) {
38566
39241
  // Assigned values are never drafted. This catches any drafts we created, too.
38567
- if (value !== peek$1(state.base, prop)) { return value; } // Store drafts on the copy (when one exists).
39242
+ if (value !== peek$1(state.base, prop)) {
39243
+ return value;
39244
+ } // Store drafts on the copy (when one exists).
39245
+
38568
39246
 
38569
39247
  drafts = state.copy;
38570
39248
  }
@@ -38579,7 +39257,11 @@ function set$1$1(state, prop, value) {
38579
39257
  // values may be drafts, but falsy values are never drafts.
38580
39258
 
38581
39259
  var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base;
38582
- if (isUnchanged) { return true; }
39260
+
39261
+ if (isUnchanged) {
39262
+ return true;
39263
+ }
39264
+
38583
39265
  markChanged$1(state);
38584
39266
  }
38585
39267
 
@@ -38598,7 +39280,10 @@ function deleteProperty(state, prop) {
38598
39280
  delete state.assigned[prop];
38599
39281
  }
38600
39282
 
38601
- if (state.copy) { delete state.copy[prop]; }
39283
+ if (state.copy) {
39284
+ delete state.copy[prop];
39285
+ }
39286
+
38602
39287
  return true;
38603
39288
  } // Note: We never coerce `desc.value` into an Immer draft, because we can't make
38604
39289
  // the same guarantee in ES5 mode.
@@ -38621,13 +39306,16 @@ function markChanged$1(state) {
38621
39306
  state.modified = true;
38622
39307
  state.copy = assign(shallowCopy(state.base), state.drafts);
38623
39308
  state.drafts = null;
38624
- if (state.parent) { markChanged$1(state.parent); }
39309
+
39310
+ if (state.parent) {
39311
+ markChanged$1(state.parent);
39312
+ }
38625
39313
  }
38626
39314
  }
38627
39315
 
38628
39316
  var modernProxy = /*#__PURE__*/Object.freeze({
38629
- willFinalize: willFinalize$1,
38630
- createProxy: createProxy$1
39317
+ willFinalize: willFinalize$1,
39318
+ createProxy: createProxy$1
38631
39319
  });
38632
39320
 
38633
39321
  function generatePatches(state, basePath, patches, inversePatches) {
@@ -38636,14 +39324,13 @@ function generatePatches(state, basePath, patches, inversePatches) {
38636
39324
 
38637
39325
  function generateArrayPatches(state, basePath, patches, inversePatches) {
38638
39326
  var assign, assign$1;
38639
-
38640
39327
  var base = state.base;
38641
39328
  var copy = state.copy;
38642
39329
  var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer.
38643
39330
 
38644
39331
  if (copy.length < base.length) {
38645
- (assign = [copy, base], base = assign[0], copy = assign[1]);
38646
- (assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1]);
39332
+ assign = [copy, base], base = assign[0], copy = assign[1];
39333
+ assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1];
38647
39334
  }
38648
39335
 
38649
39336
  var delta = copy.length - base.length; // Find the first replaced index.
@@ -38701,7 +39388,11 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
38701
39388
  var origValue = base[key];
38702
39389
  var value = copy[key];
38703
39390
  var op = !assignedValue ? "remove" : key in base ? "replace" : "add";
38704
- if (origValue === value && op === "replace") { return; }
39391
+
39392
+ if (origValue === value && op === "replace") {
39393
+ return;
39394
+ }
39395
+
38705
39396
  var path = basePath.concat(key);
38706
39397
  patches.push(op === "remove" ? {
38707
39398
  op: op,
@@ -38726,20 +39417,26 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
38726
39417
  });
38727
39418
  }
38728
39419
 
38729
- var applyPatches = function (draft, patches) {
39420
+ var applyPatches = function applyPatches(draft, patches) {
38730
39421
  for (var i$1 = 0, list = patches; i$1 < list.length; i$1 += 1) {
38731
39422
  var patch = list[i$1];
38732
-
38733
39423
  var path = patch.path;
38734
39424
  var op = patch.op;
38735
39425
  var value = clone(patch.value); // used to clone patch to ensure original patch is not modified, see #411
38736
39426
 
38737
- if (!path.length) { throw new Error("Illegal state"); }
39427
+ if (!path.length) {
39428
+ throw new Error("Illegal state");
39429
+ }
39430
+
38738
39431
  var base = draft;
38739
39432
 
38740
39433
  for (var i = 0; i < path.length - 1; i++) {
38741
39434
  base = base[path[i]];
38742
- if (!base || typeof base !== "object") { throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/")); } // prettier-ignore
39435
+
39436
+ if (!base || _typeof(base) !== "object") {
39437
+ throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/"));
39438
+ } // prettier-ignore
39439
+
38743
39440
  }
38744
39441
 
38745
39442
  var key = path[path.length - 1];
@@ -38788,27 +39485,33 @@ var configDefaults = {
38788
39485
  onDelete: null,
38789
39486
  onCopy: null
38790
39487
  };
39488
+
38791
39489
  var Immer = function Immer(config) {
38792
39490
  assign(this, configDefaults, config);
38793
39491
  this.setUseProxies(this.useProxies);
38794
39492
  this.produce = this.produce.bind(this);
38795
39493
  };
38796
39494
 
38797
- Immer.prototype.produce = function produce (base, recipe, patchListener) {
38798
- var this$1$1 = this;
39495
+ Immer.prototype.produce = function produce(base, recipe, patchListener) {
39496
+ var this$1$1 = this; // curried invocation
38799
39497
 
38800
- // curried invocation
38801
39498
  if (typeof base === "function" && typeof recipe !== "function") {
38802
39499
  var defaultBase = recipe;
38803
39500
  recipe = base;
38804
39501
  var self = this;
38805
39502
  return function curriedProduce(base) {
38806
- var this$1$1 = this;
38807
- if ( base === void 0 ) base = defaultBase;
38808
- var args = [], len = arguments.length - 1;
38809
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
39503
+ var this$1$1 = this;
39504
+ if (base === void 0) base = defaultBase;
39505
+ var args = [],
39506
+ len = arguments.length - 1;
38810
39507
 
38811
- return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
39508
+ while (len-- > 0) {
39509
+ args[len] = arguments[len + 1];
39510
+ }
39511
+
39512
+ return self.produce(base, function (draft) {
39513
+ return recipe.call.apply(recipe, [this$1$1, draft].concat(args));
39514
+ }); // prettier-ignore
38812
39515
  };
38813
39516
  } // prettier-ignore
38814
39517
 
@@ -38834,7 +39537,11 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
38834
39537
  hasError = false;
38835
39538
  } finally {
38836
39539
  // finally instead of catch + rethrow better preserves original stack
38837
- if (hasError) { scope.revoke(); }else { scope.leave(); }
39540
+ if (hasError) {
39541
+ scope.revoke();
39542
+ } else {
39543
+ scope.leave();
39544
+ }
38838
39545
  }
38839
39546
 
38840
39547
  if (result instanceof Promise) {
@@ -38851,25 +39558,38 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
38851
39558
  return this.processResult(result, scope);
38852
39559
  } else {
38853
39560
  result = recipe(base);
38854
- if (result === undefined) { return base; }
39561
+
39562
+ if (result === undefined) {
39563
+ return base;
39564
+ }
39565
+
38855
39566
  return result !== NOTHING ? result : undefined;
38856
39567
  }
38857
39568
  };
38858
39569
 
38859
- Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
38860
- var this$1$1 = this;
39570
+ Immer.prototype.produceWithPatches = function produceWithPatches(arg1, arg2, arg3) {
39571
+ var this$1$1 = this;
38861
39572
 
38862
39573
  if (typeof arg1 === "function") {
38863
39574
  return function (state) {
38864
- var args = [], len = arguments.length - 1;
38865
- while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
39575
+ var args = [],
39576
+ len = arguments.length - 1;
38866
39577
 
38867
- return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
38868
- };
39578
+ while (len-- > 0) {
39579
+ args[len] = arguments[len + 1];
39580
+ }
39581
+
39582
+ return this$1$1.produceWithPatches(state, function (draft) {
39583
+ return arg1.apply(void 0, [draft].concat(args));
39584
+ });
39585
+ };
38869
39586
  } // non-curried form
38870
39587
 
38871
39588
 
38872
- if (arg3) { throw new Error("A patch listener cannot be passed to produceWithPatches"); }
39589
+ if (arg3) {
39590
+ throw new Error("A patch listener cannot be passed to produceWithPatches");
39591
+ }
39592
+
38873
39593
  var patches, inversePatches;
38874
39594
  var nextState = this.produce(arg1, arg2, function (p, ip) {
38875
39595
  patches = p;
@@ -38878,7 +39598,7 @@ Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, ar
38878
39598
  return [nextState, patches, inversePatches];
38879
39599
  };
38880
39600
 
38881
- Immer.prototype.createDraft = function createDraft (base) {
39601
+ Immer.prototype.createDraft = function createDraft(base) {
38882
39602
  if (!isDraftable(base)) {
38883
39603
  throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore
38884
39604
  }
@@ -38890,7 +39610,7 @@ Immer.prototype.createDraft = function createDraft (base) {
38890
39610
  return proxy;
38891
39611
  };
38892
39612
 
38893
- Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
39613
+ Immer.prototype.finishDraft = function finishDraft(draft, patchListener) {
38894
39614
  var state = draft && draft[DRAFT_STATE];
38895
39615
 
38896
39616
  if (!state || !state.isManual) {
@@ -38906,16 +39626,16 @@ Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
38906
39626
  return this.processResult(undefined, scope);
38907
39627
  };
38908
39628
 
38909
- Immer.prototype.setAutoFreeze = function setAutoFreeze (value) {
39629
+ Immer.prototype.setAutoFreeze = function setAutoFreeze(value) {
38910
39630
  this.autoFreeze = value;
38911
39631
  };
38912
39632
 
38913
- Immer.prototype.setUseProxies = function setUseProxies (value) {
39633
+ Immer.prototype.setUseProxies = function setUseProxies(value) {
38914
39634
  this.useProxies = value;
38915
39635
  assign(this, value ? modernProxy : legacyProxy);
38916
39636
  };
38917
39637
 
38918
- Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
39638
+ Immer.prototype.applyPatches = function applyPatches$1(base, patches) {
38919
39639
  // If a patch replaces the entire state, take that replacement as base
38920
39640
  // before applying patches
38921
39641
  var i;
@@ -38935,12 +39655,14 @@ Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
38935
39655
  } // Otherwise, produce a copy of the base state.
38936
39656
 
38937
39657
 
38938
- return this.produce(base, function (draft) { return applyPatches(draft, patches.slice(i + 1)); });
39658
+ return this.produce(base, function (draft) {
39659
+ return applyPatches(draft, patches.slice(i + 1));
39660
+ });
38939
39661
  };
38940
39662
  /** @internal */
38941
39663
 
38942
39664
 
38943
- Immer.prototype.processResult = function processResult (result, scope) {
39665
+ Immer.prototype.processResult = function processResult(result, scope) {
38944
39666
  var baseDraft = scope.drafts[0];
38945
39667
  var isReplaced = result !== undefined && result !== baseDraft;
38946
39668
  this.willFinalize(scope, result, isReplaced);
@@ -38988,13 +39710,15 @@ Immer.prototype.processResult = function processResult (result, scope) {
38988
39710
  */
38989
39711
 
38990
39712
 
38991
- Immer.prototype.finalize = function finalize (draft, path, scope) {
38992
- var this$1$1 = this;
38993
-
39713
+ Immer.prototype.finalize = function finalize(draft, path, scope) {
39714
+ var this$1$1 = this;
38994
39715
  var state = draft[DRAFT_STATE];
38995
39716
 
38996
39717
  if (!state) {
38997
- if (Object.isFrozen(draft)) { return draft; }
39718
+ if (Object.isFrozen(draft)) {
39719
+ return draft;
39720
+ }
39721
+
38998
39722
  return this.finalizeTree(draft, null, scope);
38999
39723
  } // Never finalize drafts owned by another scope.
39000
39724
 
@@ -39017,13 +39741,17 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
39017
39741
  var assigned = state.assigned;
39018
39742
 
39019
39743
  for (var prop in assigned) {
39020
- if (!assigned[prop]) { this.onDelete(state, prop); }
39744
+ if (!assigned[prop]) {
39745
+ this.onDelete(state, prop);
39746
+ }
39021
39747
  }
39022
39748
  } else {
39023
39749
  var base = state.base;
39024
- var copy = state.copy;
39750
+ var copy = state.copy;
39025
39751
  each(base, function (prop) {
39026
- if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
39752
+ if (!has$1(copy, prop)) {
39753
+ this$1$1.onDelete(state, prop);
39754
+ }
39027
39755
  });
39028
39756
  }
39029
39757
  }
@@ -39051,9 +39779,8 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
39051
39779
  */
39052
39780
 
39053
39781
 
39054
- Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
39055
- var this$1$1 = this;
39056
-
39782
+ Immer.prototype.finalizeTree = function finalizeTree(root, rootPath, scope) {
39783
+ var this$1$1 = this;
39057
39784
  var state = root[DRAFT_STATE];
39058
39785
 
39059
39786
  if (state) {
@@ -39067,7 +39794,7 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
39067
39794
 
39068
39795
  var needPatches = !!rootPath && !!scope.patches;
39069
39796
 
39070
- var finalizeProperty = function (prop, value, parent) {
39797
+ var finalizeProperty = function finalizeProperty(prop, value, parent) {
39071
39798
  if (value === parent) {
39072
39799
  throw Error("Immer forbids circular references");
39073
39800
  } // In the `finalizeTree` method, only the `root` object may be a draft.
@@ -39094,14 +39821,16 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
39094
39821
  } // Unchanged drafts are never passed to the `onAssign` hook.
39095
39822
 
39096
39823
 
39097
- if (isDraftProp && value === state.base[prop]) { return; }
39824
+ if (isDraftProp && value === state.base[prop]) {
39825
+ return;
39826
+ }
39098
39827
  } // Unchanged draft properties are ignored.
39099
39828
  else if (isDraftProp && is(value, state.base[prop])) {
39100
- return;
39101
- } // Search new objects for unfinalized drafts. Frozen objects should never contain drafts.
39102
- else if (isDraftable(value) && !Object.isFrozen(value)) {
39103
- each(value, finalizeProperty);
39104
- }
39829
+ return;
39830
+ } // Search new objects for unfinalized drafts. Frozen objects should never contain drafts.
39831
+ else if (isDraftable(value) && !Object.isFrozen(value)) {
39832
+ each(value, finalizeProperty);
39833
+ }
39105
39834
 
39106
39835
  if (isDraftProp && this$1$1.onAssign) {
39107
39836
  this$1$1.onAssign(state, prop, value);
@@ -39179,127 +39908,223 @@ immer.createDraft.bind(immer);
39179
39908
 
39180
39909
  immer.finishDraft.bind(immer);
39181
39910
 
39182
- const createInitialState = formConfig => {
39183
- let initialForm = {};
39184
- const formConfigKeys = Object.keys(formConfig);
39185
- for (let formKey of formConfigKeys) {
39911
+ var createInitialState = function createInitialState(formConfig) {
39912
+ var initialForm = {};
39913
+ var formConfigKeys = Object.keys(formConfig);
39914
+
39915
+ for (var _i3 = 0, _formConfigKeys = formConfigKeys; _i3 < _formConfigKeys.length; _i3++) {
39916
+ var formKey = _formConfigKeys[_i3];
39186
39917
  initialForm[formKey] = {
39187
39918
  dirty: false,
39188
39919
  rawValue: formConfig[formKey].defaultValue || "",
39189
39920
  validators: formConfig[formKey].validators || [],
39190
39921
  constraints: formConfig[formKey].constraints || []
39191
39922
  };
39192
- }
39193
- // Because validators require the entire form we have to do a
39923
+ } // Because validators require the entire form we have to do a
39194
39924
  // second pass to add errors once the initial form has been
39195
39925
  // constructed
39196
- for (let formKey of formConfigKeys) {
39197
- let errors = computeErrors(formKey, initialForm);
39198
- initialForm[formKey].errors = errors;
39199
- initialForm[formKey].hasErrors = errors.length > 0;
39926
+
39927
+
39928
+ for (var _i4 = 0, _formConfigKeys2 = formConfigKeys; _i4 < _formConfigKeys2.length; _i4++) {
39929
+ var _formKey = _formConfigKeys2[_i4];
39930
+ var errors = computeErrors(_formKey, initialForm);
39931
+ initialForm[_formKey].errors = errors;
39932
+ initialForm[_formKey].hasErrors = errors.length > 0;
39200
39933
  }
39934
+
39201
39935
  return initialForm;
39202
39936
  };
39203
39937
 
39204
- const SET = "field/SET";
39205
- const set$2 = fieldName => value => ({
39206
- type: SET,
39207
- payload: { fieldName, value }
39208
- });
39938
+ var SET = "field/SET";
39209
39939
 
39210
- const CLEAR = "form/CLEAR";
39211
- const clear = () => ({ type: CLEAR });
39940
+ var _set = function set(fieldName) {
39941
+ return function (value) {
39942
+ return {
39943
+ type: SET,
39944
+ payload: {
39945
+ fieldName: fieldName,
39946
+ value: value
39947
+ }
39948
+ };
39949
+ };
39950
+ };
39212
39951
 
39213
- const ADD_VALIDATOR = "field/ADD_VALIDATOR";
39214
- const addValidator = fieldName => validator => ({
39215
- type: ADD_VALIDATOR,
39216
- payload: { fieldName, validator }
39217
- });
39952
+ var CLEAR = "form/CLEAR";
39953
+
39954
+ var _clear = function clear() {
39955
+ return {
39956
+ type: CLEAR
39957
+ };
39958
+ };
39959
+
39960
+ var ADD_VALIDATOR = "field/ADD_VALIDATOR";
39961
+
39962
+ var _addValidator = function addValidator(fieldName) {
39963
+ return function (validator) {
39964
+ return {
39965
+ type: ADD_VALIDATOR,
39966
+ payload: {
39967
+ fieldName: fieldName,
39968
+ validator: validator
39969
+ }
39970
+ };
39971
+ };
39972
+ };
39973
+
39974
+ var REMOVE_VALIDATOR = "field/REMOVE_VALIDATOR";
39975
+
39976
+ var _removeValidator = function removeValidator(fieldName) {
39977
+ return function (validator) {
39978
+ return {
39979
+ type: REMOVE_VALIDATOR,
39980
+ payload: {
39981
+ fieldName: fieldName,
39982
+ validator: validator
39983
+ }
39984
+ };
39985
+ };
39986
+ };
39987
+
39988
+ var CLEAR_FIELD_VALIDATORS = "field/CLEAR_FIELD_VALIDATORS";
39989
+
39990
+ var clearFieldValidators = function clearFieldValidators(fieldName) {
39991
+ return function () {
39992
+ return {
39993
+ type: CLEAR_FIELD_VALIDATORS,
39994
+ payload: {
39995
+ fieldName: fieldName
39996
+ }
39997
+ };
39998
+ };
39999
+ };
40000
+
40001
+ var createFormReducer = function createFormReducer(formConfig) {
40002
+ return function () {
40003
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createInitialState(formConfig);
40004
+ var action = arguments.length > 1 ? arguments[1] : undefined;
39218
40005
 
39219
- const createFormReducer = formConfig => (
39220
- state = createInitialState(formConfig),
39221
- action
39222
- ) => {
39223
- switch (action.type) {
39224
- case SET:
39225
- const changedFieldName = action.payload.fieldName;
39226
- const newRawValue = action.payload.value;
39227
-
39228
- return produce(state, draftState => {
39229
- let originalValue = draftState[changedFieldName].rawValue;
39230
- draftState[changedFieldName].rawValue = newRawValue;
39231
- if (computeConstraints(changedFieldName, draftState).length > 0) {
39232
- // If the change violates constraints, revert the change
39233
- draftState[changedFieldName].rawValue = originalValue;
39234
- return draftState;
40006
+ switch (action.type) {
40007
+ case SET:
40008
+ {
40009
+ var changedFieldName = action.payload.fieldName;
40010
+ var newRawValue = action.payload.value;
40011
+ return produce(state, function (draftState) {
40012
+ var originalValue = draftState[changedFieldName].rawValue;
40013
+ draftState[changedFieldName].rawValue = newRawValue;
40014
+
40015
+ if (computeConstraints(changedFieldName, draftState).length > 0) {
40016
+ // If the change violates constraints, revert the change
40017
+ draftState[changedFieldName].rawValue = originalValue;
40018
+ return draftState;
40019
+ }
40020
+
40021
+ computeDirtyEntries(draftState, changedFieldName);
40022
+ computeErrorEntries(draftState);
40023
+ });
39235
40024
  }
39236
40025
 
39237
- const fields = Object.entries(draftState);
39238
- for (let entry of fields) {
39239
- let fieldName = entry[0];
39240
- let field = entry[1];
39241
- let errors = computeErrors(fieldName, draftState);
39242
- let dirty = fieldName === changedFieldName ? true : field.dirty;
39243
- draftState[fieldName].errors = errors;
39244
- draftState[fieldName].dirty = dirty;
39245
- draftState[fieldName].hasErrors = errors.length > 0;
40026
+ case CLEAR:
40027
+ return createInitialState(formConfig);
40028
+
40029
+ case ADD_VALIDATOR:
40030
+ {
40031
+ var fieldWithOverride = action.payload.fieldName;
40032
+ var newValidator = action.payload.validator;
40033
+ return produce(state, function (draftState) {
40034
+ draftState[fieldWithOverride].validators.push(newValidator);
40035
+ computeErrorEntries(draftState);
40036
+ });
39246
40037
  }
39247
- });
39248
- case CLEAR:
39249
- return createInitialState(formConfig);
39250
- case ADD_VALIDATOR:
39251
- const fieldWithOverride = action.payload.fieldName;
39252
- const newValidator = action.payload.validator;
39253
-
39254
- return produce(state, draftState => {
39255
- draftState[fieldWithOverride].validators.push(newValidator);
39256
- const fields = Object.entries(draftState);
39257
- for (let entry of fields) {
39258
- let fieldName = entry[0];
39259
- let field = entry[1];
39260
- let errors = computeErrors(fieldName, draftState);
39261
- let dirty = field.dirty;
39262
- draftState[fieldName].errors = errors;
39263
- draftState[fieldName].dirty = dirty;
39264
- draftState[fieldName].hasErrors = errors.length > 0;
40038
+
40039
+ case REMOVE_VALIDATOR:
40040
+ {
40041
+ var fieldToOverride = action.payload.fieldName;
40042
+ var targetValidator = action.payload.validator;
40043
+ return produce(state, function (draftState) {
40044
+ var fieldValidators = draftState[fieldToOverride].validators;
40045
+ draftState[fieldToOverride].validators = fieldValidators.filter(function (validator) {
40046
+ return validator.type !== targetValidator.type;
40047
+ });
40048
+ computeErrorEntries(draftState);
40049
+ });
39265
40050
  }
39266
- });
39267
- default:
39268
- return state;
39269
- }
40051
+
40052
+ case CLEAR_FIELD_VALIDATORS:
40053
+ {
40054
+ var fieldToClear = action.payload.fieldName;
40055
+ return produce(state, function (draftState) {
40056
+ draftState[fieldToClear].validators = [];
40057
+ computeErrorEntries(draftState);
40058
+ });
40059
+ }
40060
+
40061
+ default:
40062
+ return state;
40063
+ }
40064
+ };
39270
40065
  };
39271
40066
 
39272
- const createMapDispatchToProps = formConfig => {
40067
+ var createMapDispatchToProps = function createMapDispatchToProps(formConfig) {
39273
40068
  // Do memo-ization
39274
- let cachedDispatch;
39275
- let cacheValue;
39276
- return dispatch => {
40069
+ var cachedDispatch;
40070
+ var cacheValue;
40071
+ return function (dispatch) {
39277
40072
  if (dispatch == cachedDispatch) {
39278
40073
  return cacheValue;
39279
40074
  }
39280
- let dispatchObj = {};
40075
+
40076
+ var dispatchObj = {};
39281
40077
  dispatchObj.fields = {};
39282
- const keys = Object.keys(formConfig);
39283
- for (let fieldName of keys) {
40078
+ var keys = Object.keys(formConfig);
40079
+
40080
+ var _loop = function _loop() {
40081
+ var fieldName = _keys[_i5];
39284
40082
  dispatchObj.fields[fieldName] = {
39285
- set: value => dispatch(set$2(fieldName)(value)),
39286
- addValidator: validator => dispatch(addValidator(fieldName)(validator))
40083
+ set: function set(value) {
40084
+ return dispatch(_set(fieldName)(value));
40085
+ },
40086
+ addValidator: function addValidator(validator) {
40087
+ return dispatch(_addValidator(fieldName)(validator));
40088
+ },
40089
+ removeValidator: function removeValidator(validator) {
40090
+ return dispatch(_removeValidator(fieldName)(validator));
40091
+ },
40092
+ clear: function clear() {
40093
+ return dispatch(clearFieldValidators(fieldName)());
40094
+ }
39287
40095
  };
40096
+ };
40097
+
40098
+ for (var _i5 = 0, _keys = keys; _i5 < _keys.length; _i5++) {
40099
+ _loop();
39288
40100
  }
39289
- dispatchObj.form = { clear: () => dispatch(clear()) };
40101
+
40102
+ dispatchObj.form = {
40103
+ clear: function clear() {
40104
+ return dispatch(_clear());
40105
+ }
40106
+ };
39290
40107
  cachedDispatch = dispatch;
39291
- cacheValue = { actions: dispatchObj };
40108
+ cacheValue = {
40109
+ actions: dispatchObj
40110
+ };
39292
40111
  return cacheValue;
39293
40112
  };
39294
40113
  };
39295
40114
 
39296
- const mapStateToProps = state => ({ fields: state });
40115
+ var mapStateToProps = function mapStateToProps(state) {
40116
+ return {
40117
+ fields: state
40118
+ };
40119
+ };
39297
40120
 
39298
- const createFormState = formConfig => ({
39299
- reducer: createFormReducer(formConfig),
39300
- mapDispatchToProps: createMapDispatchToProps(formConfig),
39301
- mapStateToProps: mapStateToProps
39302
- });
40121
+ var createFormState = function createFormState(formConfig) {
40122
+ return {
40123
+ reducer: createFormReducer(formConfig),
40124
+ mapDispatchToProps: createMapDispatchToProps(formConfig),
40125
+ mapStateToProps: mapStateToProps
40126
+ };
40127
+ };
39303
40128
 
39304
40129
  var AddressForm = function AddressForm(_ref) {
39305
40130
  var _zipErrorMessages;
@@ -46910,7 +47735,9 @@ var Pagination = function Pagination(_ref3) {
46910
47735
  var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$J);
46911
47736
 
46912
47737
  var PaymentButtonBar = function PaymentButtonBar(_ref) {
46913
- var _ref$forwardButtonTex = _ref.forwardButtonText,
47738
+ var _ref$isForwardButtonD = _ref.isForwardButtonDisabled,
47739
+ isForwardButtonDisabled = _ref$isForwardButtonD === void 0 ? false : _ref$isForwardButtonD,
47740
+ _ref$forwardButtonTex = _ref.forwardButtonText,
46914
47741
  forwardButtonText = _ref$forwardButtonTex === void 0 ? "Next" : _ref$forwardButtonTex,
46915
47742
  forwardButtonAction = _ref.forwardButtonAction,
46916
47743
  forwardButtonLoading = _ref.forwardButtonLoading,
@@ -46952,14 +47779,16 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
46952
47779
  text: redirectText,
46953
47780
  variant: forwardButtonVariant,
46954
47781
  extraStyles: isMobile && "flex-grow: 1",
46955
- dataQa: redirectText
47782
+ dataQa: redirectText,
47783
+ disabled: isForwardButtonDisabled
46956
47784
  }) : forwardButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46957
47785
  text: forwardButtonText,
46958
47786
  variant: forwardButtonVariant,
46959
47787
  action: forwardButtonAction,
46960
47788
  isLoading: forwardButtonLoading,
46961
47789
  extraStyles: isMobile && "flex-grow: 1",
46962
- dataQa: forwardButtonText
47790
+ dataQa: forwardButtonText,
47791
+ disabled: isForwardButtonDisabled
46963
47792
  });
46964
47793
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
46965
47794
  padding: "1.25rem 0"
@@ -47064,67 +47893,12 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
47064
47893
  }));
47065
47894
  };
47066
47895
 
47067
- var LoadingDetails = function LoadingDetails() {
47068
- return /*#__PURE__*/React__default.createElement(Box, {
47069
- padding: "0",
47070
- background: GRECIAN_GREY,
47071
- borderRadius: "4px",
47072
- minHeight: "196px"
47073
- }, /*#__PURE__*/React__default.createElement(Cover, {
47074
- minHeight: "196px",
47075
- singleChild: true,
47076
- fillCenter: true
47077
- }, /*#__PURE__*/React__default.createElement(Center, {
47078
- intrinsic: true
47079
- }, /*#__PURE__*/React__default.createElement(Box, {
47080
- padding: "0",
47081
- extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
47082
- }, /*#__PURE__*/React__default.createElement(Spinner$2, {
47083
- size: "100",
47084
- centerSpinner: true
47085
- })))));
47086
- };
47087
-
47088
- var ErrorDetails = function ErrorDetails() {
47089
- return /*#__PURE__*/React__default.createElement(Box, {
47090
- padding: "0"
47091
- }, /*#__PURE__*/React__default.createElement(Alert$1, {
47092
- variant: "error",
47093
- heading: "Error Loading Payment",
47094
- text: "Please go back and try again.",
47095
- showQuitLink: false,
47096
- maxContentWidth: "350px",
47097
- padding: "0",
47098
- noBorder: true,
47099
- enableBoxShadow: true,
47100
- extraStyles: "min-height: 67px; height: 67px;",
47101
- enableSmallText: true
47102
- }));
47103
- };
47104
-
47105
- var getLoadingOrErrorContent = function getLoadingOrErrorContent() {
47106
- var isLoading = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
47107
- var isError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
47108
-
47109
- if (isLoading) {
47110
- return /*#__PURE__*/React__default.createElement(LoadingDetails, null);
47111
- } else if (isError) {
47112
- return /*#__PURE__*/React__default.createElement(ErrorDetails, null);
47113
- }
47114
-
47115
- return /*#__PURE__*/React__default.createElement(React.Fragment, null);
47116
- };
47117
-
47118
47896
  var Collapsible = function Collapsible(_ref2) {
47119
47897
  var content = _ref2.content,
47120
47898
  title = _ref2.title,
47121
47899
  supportsTouch = _ref2.supportsTouch,
47122
47900
  isOpen = _ref2.isOpen,
47123
- setIsOpen = _ref2.setIsOpen,
47124
- _ref2$isLoading = _ref2.isLoading,
47125
- isLoading = _ref2$isLoading === void 0 ? false : _ref2$isLoading,
47126
- _ref2$isError = _ref2.isError,
47127
- isError = _ref2$isError === void 0 ? false : _ref2$isError;
47901
+ setIsOpen = _ref2.setIsOpen;
47128
47902
  return /*#__PURE__*/React__default.createElement(CollapsibleSection$1, {
47129
47903
  isMobile: true,
47130
47904
  supportsTouch: supportsTouch,
@@ -47147,17 +47921,13 @@ var Collapsible = function Collapsible(_ref2) {
47147
47921
  },
47148
47922
  positionTransition: true,
47149
47923
  initial: "closed"
47150
- }, isLoading || isError ? getLoadingOrErrorContent(isLoading, isError) : content));
47924
+ }, content));
47151
47925
  };
47152
47926
 
47153
47927
  var NonCollapsible = function NonCollapsible(_ref3) {
47154
47928
  var title = _ref3.title,
47155
- content = _ref3.content,
47156
- _ref3$isLoading = _ref3.isLoading,
47157
- isLoading = _ref3$isLoading === void 0 ? false : _ref3$isLoading,
47158
- _ref3$isError = _ref3.isError,
47159
- isError = _ref3$isError === void 0 ? false : _ref3$isError;
47160
- return /*#__PURE__*/React__default.createElement(Stack, null, title, isLoading || isError ? getLoadingOrErrorContent(isLoading, isError) : content);
47929
+ content = _ref3.content;
47930
+ return /*#__PURE__*/React__default.createElement(Stack, null, title, content);
47161
47931
  };
47162
47932
 
47163
47933
  var PaymentDetails = function PaymentDetails(_ref4) {
@@ -47187,11 +47957,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
47187
47957
  _ref4$voidableAmountP = _ref4.voidableAmountPaid,
47188
47958
  voidableAmountPaid = _ref4$voidableAmountP === void 0 ? 0 : _ref4$voidableAmountP,
47189
47959
  _ref4$remainingBalanc = _ref4.remainingBalance,
47190
- remainingBalance = _ref4$remainingBalanc === void 0 ? false : _ref4$remainingBalanc,
47191
- _ref4$isLoading = _ref4.isLoading,
47192
- isLoading = _ref4$isLoading === void 0 ? false : _ref4$isLoading,
47193
- _ref4$isError = _ref4.isError,
47194
- isError = _ref4$isError === void 0 ? false : _ref4$isError;
47960
+ remainingBalance = _ref4$remainingBalanc === void 0 ? false : _ref4$remainingBalanc;
47195
47961
 
47196
47962
  var _useState = React.useState(initiallyOpen),
47197
47963
  _useState2 = _slicedToArray(_useState, 2),
@@ -47294,14 +48060,10 @@ var PaymentDetails = function PaymentDetails(_ref4) {
47294
48060
  isOpen: isOpen,
47295
48061
  setIsOpen: setIsOpen,
47296
48062
  isMobile: isMobile,
47297
- supportsTouch: supportsTouch,
47298
- isLoading: isLoading,
47299
- isError: isError
48063
+ supportsTouch: supportsTouch
47300
48064
  }) : /*#__PURE__*/React__default.createElement(NonCollapsible, {
47301
48065
  title: title,
47302
- content: content,
47303
- isLoading: isLoading,
47304
- isError: isError
48066
+ content: content
47305
48067
  });
47306
48068
  };
47307
48069
 
@@ -47512,6 +48274,59 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47512
48274
  })))));
47513
48275
  };
47514
48276
 
48277
+ /*
48278
+
48279
+ A utility function that can generate box-shadow values for components
48280
+ Takes a string representing an rgb color value and returns an object
48281
+ with values for standard, inset, and overlay shadows.
48282
+
48283
+ The objects for standard and inset shadows contain versions approiate
48284
+ for base, hover, and active interaction states.
48285
+
48286
+ */
48287
+
48288
+ /*
48289
+ Function to convert string representing rgb color to rgba value with provided opacity
48290
+ ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
48291
+
48292
+ */
48293
+ var rgbToRgba = function rgbToRgba() {
48294
+ var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
48295
+ var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
48296
+
48297
+ if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
48298
+ return "";
48299
+ }
48300
+
48301
+ return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
48302
+ };
48303
+
48304
+ var generateShadows = function generateShadows(baseColorRGB) {
48305
+ var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
48306
+ var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
48307
+ var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
48308
+ var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
48309
+ var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
48310
+ var standard = {
48311
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
48312
+ hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
48313
+ active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
48314
+ };
48315
+ var inset = {
48316
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
48317
+ hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
48318
+ active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
48319
+ };
48320
+ var overlay = {
48321
+ base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
48322
+ };
48323
+ return {
48324
+ standard: standard,
48325
+ inset: inset,
48326
+ overlay: overlay
48327
+ };
48328
+ };
48329
+
47515
48330
  /*
47516
48331
  Hook that takes an ID selector for an element on the screen
47517
48332
  And optionally values for top position, left position, smooth behavior