@thecb/components 7.12.2-beta.9 → 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 +1543 -730
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1543 -730
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +4 -17
- package/src/components/atoms/icons/AutopayOnIcon.js +2 -2
- package/src/components/atoms/spinner/Spinner.js +4 -26
- package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +3 -0
- package/src/components/molecules/payment-details/PaymentDetails.js +9 -84
- package/src/util/generateShadows.js +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/molecules/.DS_Store +0 -0
- /package/src/components/atoms/icons/{ExternalLinkicon.js → ExternalLinkIcon.js} +0 -0
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:
|
|
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,17 +17842,8 @@ 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,
|
|
17850
|
-
_ref$innerContentPadd = _ref.innerContentPadding,
|
|
17851
|
-
innerContentPadding = _ref$innerContentPadd === void 0 ? "1rem" : _ref$innerContentPadd;
|
|
17845
|
+
maxContentWidth = _ref.maxContentWidth;
|
|
17852
17846
|
var Icon = AlertIcons[variant];
|
|
17853
|
-
var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
|
|
17854
17847
|
var content = /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
17855
17848
|
width: "24px",
|
|
17856
17849
|
childGap: "0rem"
|
|
@@ -17871,7 +17864,7 @@ var Alert = function Alert(_ref) {
|
|
|
17871
17864
|
width: "24px",
|
|
17872
17865
|
childGap: "0rem"
|
|
17873
17866
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
17874
|
-
padding:
|
|
17867
|
+
padding: maxContentWidth ? "".concat(padding, " 1rem") : "1rem"
|
|
17875
17868
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
17876
17869
|
justify: "flex-start",
|
|
17877
17870
|
align: "center"
|
|
@@ -17879,7 +17872,7 @@ var Alert = function Alert(_ref) {
|
|
|
17879
17872
|
fullHeight: true,
|
|
17880
17873
|
childGap: "0.25rem"
|
|
17881
17874
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
17882
|
-
variant:
|
|
17875
|
+
variant: "p",
|
|
17883
17876
|
color: themeValues.text,
|
|
17884
17877
|
weight: "600"
|
|
17885
17878
|
}, heading), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -17901,8 +17894,7 @@ var Alert = function Alert(_ref) {
|
|
|
17901
17894
|
background: themeValues.background,
|
|
17902
17895
|
borderRadius: "4px",
|
|
17903
17896
|
borderColor: themeValues.border,
|
|
17904
|
-
borderSize:
|
|
17905
|
-
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",
|
|
17906
17898
|
extraStyles: extraStyles
|
|
17907
17899
|
}, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
|
|
17908
17900
|
maxWidth: maxContentWidth
|
|
@@ -21445,7 +21437,7 @@ var check = function (it) {
|
|
|
21445
21437
|
|
|
21446
21438
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
21447
21439
|
var global_1 =
|
|
21448
|
-
// eslint-disable-next-line es
|
|
21440
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
21449
21441
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
21450
21442
|
check(typeof window == 'object' && window) ||
|
|
21451
21443
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -21464,12 +21456,12 @@ var fails = function (exec) {
|
|
|
21464
21456
|
|
|
21465
21457
|
// Detect IE8's incomplete defineProperty implementation
|
|
21466
21458
|
var descriptors = !fails(function () {
|
|
21467
|
-
// eslint-disable-next-line es
|
|
21459
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
21468
21460
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
21469
21461
|
});
|
|
21470
21462
|
|
|
21471
21463
|
var functionBindNative = !fails(function () {
|
|
21472
|
-
// eslint-disable-next-line es
|
|
21464
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
21473
21465
|
var test = (function () { /* empty */ }).bind();
|
|
21474
21466
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
21475
21467
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -21482,7 +21474,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
|
21482
21474
|
};
|
|
21483
21475
|
|
|
21484
21476
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
21485
|
-
// eslint-disable-next-line es
|
|
21477
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
21486
21478
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
21487
21479
|
|
|
21488
21480
|
// Nashorn ~ JDK8 bug
|
|
@@ -21509,25 +21501,29 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
21509
21501
|
};
|
|
21510
21502
|
|
|
21511
21503
|
var FunctionPrototype = Function.prototype;
|
|
21512
|
-
var bind$1 = FunctionPrototype.bind;
|
|
21513
21504
|
var call$1 = FunctionPrototype.call;
|
|
21514
|
-
var
|
|
21505
|
+
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
21515
21506
|
|
|
21516
|
-
var
|
|
21517
|
-
return
|
|
21518
|
-
} : function (fn) {
|
|
21519
|
-
return fn && function () {
|
|
21507
|
+
var functionUncurryThisRaw = function (fn) {
|
|
21508
|
+
return functionBindNative ? uncurryThisWithBind(fn) : function () {
|
|
21520
21509
|
return call$1.apply(fn, arguments);
|
|
21521
21510
|
};
|
|
21522
21511
|
};
|
|
21523
21512
|
|
|
21524
|
-
var toString$2 =
|
|
21525
|
-
var stringSlice =
|
|
21513
|
+
var toString$2 = functionUncurryThisRaw({}.toString);
|
|
21514
|
+
var stringSlice = functionUncurryThisRaw(''.slice);
|
|
21526
21515
|
|
|
21527
21516
|
var classofRaw = function (it) {
|
|
21528
21517
|
return stringSlice(toString$2(it), 8, -1);
|
|
21529
21518
|
};
|
|
21530
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
|
+
|
|
21531
21527
|
var $Object = Object;
|
|
21532
21528
|
var split = functionUncurryThis(''.split);
|
|
21533
21529
|
|
|
@@ -21540,12 +21536,18 @@ var indexedObject = fails(function () {
|
|
|
21540
21536
|
return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
|
|
21541
21537
|
} : $Object;
|
|
21542
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
|
+
|
|
21543
21545
|
var $TypeError = TypeError;
|
|
21544
21546
|
|
|
21545
21547
|
// `RequireObjectCoercible` abstract operation
|
|
21546
21548
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
21547
21549
|
var requireObjectCoercible = function (it) {
|
|
21548
|
-
if (it
|
|
21550
|
+
if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
|
|
21549
21551
|
return it;
|
|
21550
21552
|
};
|
|
21551
21553
|
|
|
@@ -21557,13 +21559,31 @@ var toIndexedObject = function (it) {
|
|
|
21557
21559
|
return indexedObject(requireObjectCoercible(it));
|
|
21558
21560
|
};
|
|
21559
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
|
+
|
|
21560
21574
|
// `IsCallable` abstract operation
|
|
21561
21575
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
21562
|
-
var isCallable = function (argument) {
|
|
21576
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
21577
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
21578
|
+
} : function (argument) {
|
|
21563
21579
|
return typeof argument == 'function';
|
|
21564
21580
|
};
|
|
21565
21581
|
|
|
21566
|
-
var
|
|
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) {
|
|
21567
21587
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
21568
21588
|
};
|
|
21569
21589
|
|
|
@@ -21604,12 +21624,12 @@ if (!version && engineUserAgent) {
|
|
|
21604
21624
|
|
|
21605
21625
|
var engineV8Version = version;
|
|
21606
21626
|
|
|
21607
|
-
/* eslint-disable es
|
|
21627
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
21608
21628
|
|
|
21609
21629
|
|
|
21610
21630
|
|
|
21611
|
-
// eslint-disable-next-line es
|
|
21612
|
-
var
|
|
21631
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
21632
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
21613
21633
|
var symbol = Symbol();
|
|
21614
21634
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
21615
21635
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -21618,10 +21638,10 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
|
21618
21638
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
21619
21639
|
});
|
|
21620
21640
|
|
|
21621
|
-
/* eslint-disable es
|
|
21641
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
21622
21642
|
|
|
21623
21643
|
|
|
21624
|
-
var useSymbolAsUid =
|
|
21644
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
21625
21645
|
&& !Symbol.sham
|
|
21626
21646
|
&& typeof Symbol.iterator == 'symbol';
|
|
21627
21647
|
|
|
@@ -21656,7 +21676,7 @@ var aCallable = function (argument) {
|
|
|
21656
21676
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
21657
21677
|
var getMethod = function (V, P) {
|
|
21658
21678
|
var func = V[P];
|
|
21659
|
-
return func
|
|
21679
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
21660
21680
|
};
|
|
21661
21681
|
|
|
21662
21682
|
var $TypeError$2 = TypeError;
|
|
@@ -21671,7 +21691,7 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
21671
21691
|
throw $TypeError$2("Can't convert object to primitive value");
|
|
21672
21692
|
};
|
|
21673
21693
|
|
|
21674
|
-
// eslint-disable-next-line es
|
|
21694
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
21675
21695
|
var defineProperty = Object.defineProperty;
|
|
21676
21696
|
|
|
21677
21697
|
var defineGlobalProperty = function (key, value) {
|
|
@@ -21691,10 +21711,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
21691
21711
|
(module.exports = function (key, value) {
|
|
21692
21712
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
21693
21713
|
})('versions', []).push({
|
|
21694
|
-
version: '3.
|
|
21714
|
+
version: '3.25.5',
|
|
21695
21715
|
mode: 'global',
|
|
21696
21716
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
21697
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
21717
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
|
|
21698
21718
|
source: 'https://github.com/zloirock/core-js'
|
|
21699
21719
|
});
|
|
21700
21720
|
});
|
|
@@ -21711,7 +21731,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
|
21711
21731
|
|
|
21712
21732
|
// `HasOwnProperty` abstract operation
|
|
21713
21733
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
21714
|
-
// eslint-disable-next-line es
|
|
21734
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
21715
21735
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
21716
21736
|
return hasOwnProperty(toObject(it), key);
|
|
21717
21737
|
};
|
|
@@ -21730,9 +21750,9 @@ var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
|
21730
21750
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
21731
21751
|
|
|
21732
21752
|
var wellKnownSymbol = function (name) {
|
|
21733
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(
|
|
21753
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(symbolConstructorDetection || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
21734
21754
|
var description = 'Symbol.' + name;
|
|
21735
|
-
if (
|
|
21755
|
+
if (symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)) {
|
|
21736
21756
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
21737
21757
|
} else if (useSymbolAsUid && symbolFor) {
|
|
21738
21758
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -21778,13 +21798,13 @@ var documentCreateElement = function (it) {
|
|
|
21778
21798
|
|
|
21779
21799
|
// Thanks to IE8 for its funny defineProperty
|
|
21780
21800
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
21781
|
-
// eslint-disable-next-line es
|
|
21801
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
21782
21802
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
21783
21803
|
get: function () { return 7; }
|
|
21784
21804
|
}).a != 7;
|
|
21785
21805
|
});
|
|
21786
21806
|
|
|
21787
|
-
// eslint-disable-next-line es
|
|
21807
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
21788
21808
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
21789
21809
|
|
|
21790
21810
|
// `Object.getOwnPropertyDescriptor` method
|
|
@@ -21805,7 +21825,7 @@ var objectGetOwnPropertyDescriptor = {
|
|
|
21805
21825
|
// V8 ~ Chrome 36-
|
|
21806
21826
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
21807
21827
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
21808
|
-
// eslint-disable-next-line es
|
|
21828
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
21809
21829
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
21810
21830
|
value: 42,
|
|
21811
21831
|
writable: false
|
|
@@ -21822,9 +21842,9 @@ var anObject = function (argument) {
|
|
|
21822
21842
|
};
|
|
21823
21843
|
|
|
21824
21844
|
var $TypeError$5 = TypeError;
|
|
21825
|
-
// eslint-disable-next-line es
|
|
21845
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
21826
21846
|
var $defineProperty = Object.defineProperty;
|
|
21827
|
-
// eslint-disable-next-line es
|
|
21847
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
21828
21848
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
21829
21849
|
var ENUMERABLE = 'enumerable';
|
|
21830
21850
|
var CONFIGURABLE = 'configurable';
|
|
@@ -21871,7 +21891,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
21871
21891
|
};
|
|
21872
21892
|
|
|
21873
21893
|
var FunctionPrototype$1 = Function.prototype;
|
|
21874
|
-
// eslint-disable-next-line es
|
|
21894
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
21875
21895
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
21876
21896
|
|
|
21877
21897
|
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
@@ -21898,7 +21918,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
21898
21918
|
|
|
21899
21919
|
var WeakMap$1 = global_1.WeakMap;
|
|
21900
21920
|
|
|
21901
|
-
var
|
|
21921
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
21902
21922
|
|
|
21903
21923
|
var keys$1 = shared('keys');
|
|
21904
21924
|
|
|
@@ -21926,28 +21946,30 @@ var getterFor = function (TYPE) {
|
|
|
21926
21946
|
};
|
|
21927
21947
|
};
|
|
21928
21948
|
|
|
21929
|
-
if (
|
|
21949
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
21930
21950
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
|
|
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 */
|
|
21934
21956
|
set = function (it, metadata) {
|
|
21935
|
-
if (
|
|
21957
|
+
if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
21936
21958
|
metadata.facade = it;
|
|
21937
|
-
|
|
21959
|
+
store$1.set(it, metadata);
|
|
21938
21960
|
return metadata;
|
|
21939
21961
|
};
|
|
21940
21962
|
get = function (it) {
|
|
21941
|
-
return
|
|
21963
|
+
return store$1.get(it) || {};
|
|
21942
21964
|
};
|
|
21943
21965
|
has = function (it) {
|
|
21944
|
-
return
|
|
21966
|
+
return store$1.has(it);
|
|
21945
21967
|
};
|
|
21946
21968
|
} else {
|
|
21947
21969
|
var STATE = sharedKey('state');
|
|
21948
21970
|
hiddenKeys[STATE] = true;
|
|
21949
21971
|
set = function (it, metadata) {
|
|
21950
|
-
if (hasOwnProperty_1(it, STATE)) throw
|
|
21972
|
+
if (hasOwnProperty_1(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
21951
21973
|
metadata.facade = it;
|
|
21952
21974
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
21953
21975
|
return metadata;
|
|
@@ -21975,7 +21997,7 @@ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
|
21975
21997
|
|
|
21976
21998
|
var enforceInternalState = internalState.enforce;
|
|
21977
21999
|
var getInternalState = internalState.get;
|
|
21978
|
-
// eslint-disable-next-line es
|
|
22000
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
21979
22001
|
var defineProperty = Object.defineProperty;
|
|
21980
22002
|
|
|
21981
22003
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
@@ -22044,7 +22066,7 @@ var floor = Math.floor;
|
|
|
22044
22066
|
|
|
22045
22067
|
// `Math.trunc` method
|
|
22046
22068
|
// https://tc39.es/ecma262/#sec-math.trunc
|
|
22047
|
-
// eslint-disable-next-line es
|
|
22069
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
22048
22070
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
22049
22071
|
var n = +x;
|
|
22050
22072
|
return (n > 0 ? floor : ceil)(n);
|
|
@@ -22145,7 +22167,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
|
22145
22167
|
|
|
22146
22168
|
// `Object.getOwnPropertyNames` method
|
|
22147
22169
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
22148
|
-
// eslint-disable-next-line es
|
|
22170
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
22149
22171
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
22150
22172
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
22151
22173
|
};
|
|
@@ -22154,7 +22176,7 @@ var objectGetOwnPropertyNames = {
|
|
|
22154
22176
|
f: f$3
|
|
22155
22177
|
};
|
|
22156
22178
|
|
|
22157
|
-
// eslint-disable-next-line es
|
|
22179
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
22158
22180
|
var f$4 = Object.getOwnPropertySymbols;
|
|
22159
22181
|
|
|
22160
22182
|
var objectGetOwnPropertySymbols = {
|
|
@@ -22298,7 +22320,7 @@ var toString_1 = function (argument) {
|
|
|
22298
22320
|
var charAt = functionUncurryThis(''.charAt);
|
|
22299
22321
|
|
|
22300
22322
|
var FORCED = fails(function () {
|
|
22301
|
-
// eslint-disable-next-line es
|
|
22323
|
+
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
|
|
22302
22324
|
return '𠮷'.at(-2) !== '\uD842';
|
|
22303
22325
|
});
|
|
22304
22326
|
|
|
@@ -22316,14 +22338,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
|
|
|
22316
22338
|
|
|
22317
22339
|
// `Object.keys` method
|
|
22318
22340
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
22319
|
-
// eslint-disable-next-line es
|
|
22341
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
22320
22342
|
var objectKeys = Object.keys || function keys(O) {
|
|
22321
22343
|
return objectKeysInternal(O, enumBugKeys);
|
|
22322
22344
|
};
|
|
22323
22345
|
|
|
22324
22346
|
// `Object.defineProperties` method
|
|
22325
22347
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
22326
|
-
// eslint-disable-next-line es
|
|
22348
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
22327
22349
|
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
22328
22350
|
anObject(O);
|
|
22329
22351
|
var props = toIndexedObject(Properties);
|
|
@@ -22412,7 +22434,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
22412
22434
|
|
|
22413
22435
|
// `Object.create` method
|
|
22414
22436
|
// https://tc39.es/ecma262/#sec-object.create
|
|
22415
|
-
// eslint-disable-next-line es
|
|
22437
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
22416
22438
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
22417
22439
|
var result;
|
|
22418
22440
|
if (O !== null) {
|
|
@@ -22458,13 +22480,13 @@ _export({ target: 'Array', proto: true }, {
|
|
|
22458
22480
|
|
|
22459
22481
|
addToUnscopables('at');
|
|
22460
22482
|
|
|
22461
|
-
// eslint-disable-next-line es
|
|
22462
|
-
var
|
|
22483
|
+
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
22484
|
+
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
22463
22485
|
|
|
22464
22486
|
var correctPrototypeGetter = !fails(function () {
|
|
22465
22487
|
function F() { /* empty */ }
|
|
22466
22488
|
F.prototype.constructor = null;
|
|
22467
|
-
// eslint-disable-next-line es
|
|
22489
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
22468
22490
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
22469
22491
|
});
|
|
22470
22492
|
|
|
@@ -22474,7 +22496,7 @@ var ObjectPrototype = $Object$4.prototype;
|
|
|
22474
22496
|
|
|
22475
22497
|
// `Object.getPrototypeOf` method
|
|
22476
22498
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
22477
|
-
// eslint-disable-next-line es
|
|
22499
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
22478
22500
|
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
22479
22501
|
var object = toObject(O);
|
|
22480
22502
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
@@ -22500,13 +22522,13 @@ var aPossiblePrototype = function (argument) {
|
|
|
22500
22522
|
// `Object.setPrototypeOf` method
|
|
22501
22523
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
22502
22524
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
22503
|
-
// eslint-disable-next-line es
|
|
22525
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
22504
22526
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
22505
22527
|
var CORRECT_SETTER = false;
|
|
22506
22528
|
var test = {};
|
|
22507
22529
|
var setter;
|
|
22508
22530
|
try {
|
|
22509
|
-
// eslint-disable-next-line es
|
|
22531
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22510
22532
|
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
22511
22533
|
setter(test, []);
|
|
22512
22534
|
CORRECT_SETTER = test instanceof Array;
|
|
@@ -22543,7 +22565,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
|
22543
22565
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
22544
22566
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
22545
22567
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
22546
|
-
var NATIVE_ARRAY_BUFFER_VIEWS =
|
|
22568
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
22547
22569
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
22548
22570
|
var NAME, Constructor, Prototype;
|
|
22549
22571
|
|
|
@@ -25647,7 +25669,7 @@ var fallbackValues$q = {
|
|
|
25647
25669
|
var SpinnerSvgAnimation = styled__default.svg.withConfig({
|
|
25648
25670
|
displayName: "Spinner__SpinnerSvgAnimation",
|
|
25649
25671
|
componentId: "sc-vhupl9-0"
|
|
25650
|
-
})(["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;}}"
|
|
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) {
|
|
25651
25673
|
var size = _ref.size;
|
|
25652
25674
|
return size;
|
|
25653
25675
|
}, function (_ref2) {
|
|
@@ -25656,36 +25678,19 @@ var SpinnerSvgAnimation = styled__default.svg.withConfig({
|
|
|
25656
25678
|
}, function (_ref3) {
|
|
25657
25679
|
var color = _ref3.color;
|
|
25658
25680
|
return color;
|
|
25659
|
-
}, function (_ref4) {
|
|
25660
|
-
var centerSpinner = _ref4.centerSpinner;
|
|
25661
|
-
return centerSpinner ? styled.css(["margin:0;"]) : "";
|
|
25662
25681
|
});
|
|
25663
25682
|
var SpinnerContainer$2 = styled__default.div.withConfig({
|
|
25664
25683
|
displayName: "Spinner__SpinnerContainer",
|
|
25665
25684
|
componentId: "sc-vhupl9-1"
|
|
25666
|
-
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"
|
|
25667
|
-
var centerSpinner = _ref5.centerSpinner,
|
|
25668
|
-
size = _ref5.size;
|
|
25669
|
-
return centerSpinner ? styled.css(["width:", "px;height:", "px;"], size, size) : "";
|
|
25670
|
-
});
|
|
25671
|
-
/*
|
|
25672
|
-
`centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
|
|
25673
|
-
containers. Default is false to preserve legacy behavior for past uses.
|
|
25674
|
-
*/
|
|
25685
|
+
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"]);
|
|
25675
25686
|
|
|
25676
|
-
var Spinner$1 = function Spinner(
|
|
25677
|
-
var
|
|
25678
|
-
size =
|
|
25679
|
-
|
|
25680
|
-
|
|
25681
|
-
themeValues = _ref6.themeValues;
|
|
25682
|
-
return /*#__PURE__*/React__default.createElement(SpinnerContainer$2, {
|
|
25683
|
-
centerSpinner: centerSpinner,
|
|
25684
|
-
size: size
|
|
25685
|
-
}, /*#__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, {
|
|
25686
25692
|
size: size,
|
|
25687
|
-
color: themeValues.color
|
|
25688
|
-
centerSpinner: centerSpinner
|
|
25693
|
+
color: themeValues.color
|
|
25689
25694
|
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
25690
25695
|
className: "path",
|
|
25691
25696
|
cx: "50",
|
|
@@ -37549,49 +37554,624 @@ var TableHeading_styled = styled__default.th.withConfig({
|
|
|
37549
37554
|
return extraStyles;
|
|
37550
37555
|
});
|
|
37551
37556
|
|
|
37552
|
-
|
|
37553
|
-
value
|
|
37554
|
-
|
|
37555
|
-
|
|
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
|
+
};
|
|
37556
37566
|
|
|
37557
37567
|
var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
37558
37568
|
|
|
37559
|
-
|
|
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
|
+
};
|
|
37560
37576
|
|
|
37561
37577
|
(function (module, exports) {
|
|
37562
|
-
!function
|
|
37563
|
-
|
|
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 = {};
|
|
37564
37646
|
|
|
37565
|
-
|
|
37647
|
+
v[D] = M;
|
|
37566
37648
|
|
|
37567
|
-
var
|
|
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
|
+
};
|
|
37568
37676
|
|
|
37569
|
-
|
|
37570
|
-
|
|
37571
|
-
|
|
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
|
+
};
|
|
37572
37854
|
|
|
37573
|
-
|
|
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);
|
|
37574
37902
|
|
|
37575
|
-
var
|
|
37903
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
37904
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
37905
|
+
var customParseFormat$1 = {
|
|
37906
|
+
exports: {}
|
|
37907
|
+
};
|
|
37576
37908
|
|
|
37577
37909
|
(function (module, exports) {
|
|
37578
|
-
!function(
|
|
37579
|
-
|
|
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
|
+
};
|
|
37580
37929
|
|
|
37581
|
-
var
|
|
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
|
+
};
|
|
37582
38019
|
|
|
37583
|
-
|
|
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
|
+
};
|
|
37584
38127
|
|
|
37585
38128
|
(function (module, exports) {
|
|
37586
|
-
!function(e,
|
|
37587
|
-
|
|
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);
|
|
37588
38139
|
|
|
37589
|
-
var
|
|
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);
|
|
37590
38157
|
|
|
38158
|
+
var isSameOrAfterExports = isSameOrAfter$1.exports;
|
|
38159
|
+
var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
|
|
37591
38160
|
/* eslint-disable no-unused-vars */
|
|
37592
38161
|
|
|
37593
|
-
|
|
37594
|
-
|
|
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
|
+
|
|
37595
38175
|
validator.error = error;
|
|
37596
38176
|
return validator;
|
|
37597
38177
|
};
|
|
@@ -37599,30 +38179,38 @@ const createValidator = (type, error) => {
|
|
|
37599
38179
|
dayjs.extend(customParseFormat);
|
|
37600
38180
|
dayjs.extend(isSameOrBefore);
|
|
37601
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);
|
|
37602
38186
|
|
|
37603
|
-
|
|
38187
|
+
validatorFns[INCLUDED_IN] = function (value, args, form) {
|
|
38188
|
+
return Array.isArray(args[0]) ? args[0].includes(value) : args[0] === value;
|
|
38189
|
+
};
|
|
37604
38190
|
|
|
37605
|
-
|
|
37606
|
-
|
|
37607
|
-
|
|
37608
|
-
validatorFns[INCLUDED_IN] = (value, args, form) =>
|
|
37609
|
-
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);
|
|
37610
38194
|
|
|
37611
|
-
|
|
37612
|
-
|
|
37613
|
-
|
|
37614
|
-
validatorFns[REQUIRED] = (value, args, form) => value !== "";
|
|
38195
|
+
validatorFns[REQUIRED] = function (value, args, form) {
|
|
38196
|
+
return value !== "";
|
|
38197
|
+
};
|
|
37615
38198
|
|
|
37616
|
-
|
|
37617
|
-
|
|
37618
|
-
|
|
37619
|
-
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);
|
|
37620
38202
|
|
|
37621
|
-
|
|
37622
|
-
|
|
37623
|
-
|
|
37624
|
-
validatorFns[ONLY_NATURALS] = (value, args, form) => /^(\d+)?$/.test(value);
|
|
38203
|
+
validatorFns[ONLY_INTEGERS] = function (value, args, form) {
|
|
38204
|
+
return /^(-?\d+)?$/.test(value);
|
|
38205
|
+
};
|
|
37625
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
|
+
};
|
|
37626
38214
|
/*
|
|
37627
38215
|
07/22: experimental expiration date constraint
|
|
37628
38216
|
should allow entry of expiration date using "/" character
|
|
@@ -37632,439 +38220,464 @@ not tested as validation function
|
|
|
37632
38220
|
to validate exp date instead use combo of:
|
|
37633
38221
|
required(), hasLength(), isValidMonth(), dateAfterToday()
|
|
37634
38222
|
*/
|
|
37635
|
-
|
|
37636
|
-
|
|
37637
|
-
|
|
37638
|
-
|
|
37639
|
-
|
|
37640
|
-
|
|
37641
|
-
validatorFns[ONLY_EXPIRATION_DATE] = (value, args, form)
|
|
37642
|
-
/^(\d?\d?\/?\d?\d?)?$/.test(value);
|
|
37643
|
-
|
|
37644
|
-
|
|
37645
|
-
|
|
37646
|
-
|
|
37647
|
-
|
|
37648
|
-
|
|
37649
|
-
)
|
|
37650
|
-
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) {
|
|
37651
38238
|
if (value === "") {
|
|
37652
38239
|
return true;
|
|
37653
38240
|
}
|
|
38241
|
+
|
|
37654
38242
|
return Number(value) < args[0];
|
|
37655
38243
|
};
|
|
37656
38244
|
|
|
37657
|
-
|
|
37658
|
-
|
|
37659
|
-
|
|
37660
|
-
|
|
37661
|
-
|
|
37662
|
-
NUMBER_LESS_THAN_OR_EQUAL_TO,
|
|
37663
|
-
NUMBER_LESS_THAN_OR_EQUAL_TO_ERROR
|
|
37664
|
-
);
|
|
37665
|
-
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) {
|
|
37666
38250
|
if (value === "") {
|
|
37667
38251
|
return true;
|
|
37668
38252
|
}
|
|
38253
|
+
|
|
37669
38254
|
return Number(value) <= args[0];
|
|
37670
38255
|
};
|
|
37671
38256
|
|
|
37672
|
-
|
|
37673
|
-
|
|
37674
|
-
|
|
37675
|
-
|
|
37676
|
-
|
|
37677
|
-
);
|
|
37678
|
-
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) {
|
|
37679
38262
|
if (value === "") {
|
|
37680
38263
|
return true;
|
|
37681
38264
|
}
|
|
38265
|
+
|
|
37682
38266
|
return Number(value) > args[0];
|
|
37683
38267
|
};
|
|
37684
38268
|
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
|
|
37689
|
-
|
|
37690
|
-
NUMBER_GREATER_THAN_OR_EQUAL_TO,
|
|
37691
|
-
NUMBER_GREATER_THAN_OR_EQUAL_TO_ERROR
|
|
37692
|
-
);
|
|
37693
|
-
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) {
|
|
37694
38274
|
if (value === "") {
|
|
37695
38275
|
return true;
|
|
37696
38276
|
}
|
|
38277
|
+
|
|
37697
38278
|
return Number(value) >= args[0];
|
|
37698
38279
|
};
|
|
37699
38280
|
|
|
37700
|
-
|
|
37701
|
-
|
|
37702
|
-
|
|
37703
|
-
|
|
37704
|
-
|
|
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
|
+
|
|
37705
38288
|
if (dependentField === undefined) {
|
|
37706
|
-
throw new Error(
|
|
37707
|
-
`${args[0]} was passed to matchesField, but that field does not exist in the form`
|
|
37708
|
-
);
|
|
38289
|
+
throw new Error("".concat(args[0], " was passed to matchesField, but that field does not exist in the form"));
|
|
37709
38290
|
}
|
|
37710
|
-
|
|
38291
|
+
|
|
38292
|
+
var dependentFieldValue = dependentField.rawValue;
|
|
37711
38293
|
return value === dependentFieldValue;
|
|
37712
38294
|
};
|
|
37713
38295
|
|
|
37714
|
-
|
|
37715
|
-
|
|
37716
|
-
|
|
37717
|
-
|
|
37718
|
-
|
|
37719
|
-
|
|
37720
|
-
|
|
37721
|
-
|
|
37722
|
-
|
|
37723
|
-
|
|
37724
|
-
|
|
37725
|
-
|
|
37726
|
-
|
|
37727
|
-
|
|
37728
|
-
|
|
37729
|
-
type: VALIDATE_WHEN,
|
|
37730
|
-
args: [dependentValidator, primaryValidator, optionalFieldName],
|
|
37731
|
-
error: dependentValidator.error
|
|
37732
|
-
});
|
|
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
|
+
|
|
37733
38311
|
validateWhen.error = VALIDATE_WHEN_ERROR;
|
|
37734
|
-
|
|
37735
|
-
|
|
37736
|
-
|
|
37737
|
-
|
|
37738
|
-
|
|
37739
|
-
|
|
37740
|
-
|
|
37741
|
-
|
|
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") {
|
|
37742
38322
|
throw new Error(validateWhenErrorMessage(primaryValidator.type));
|
|
37743
38323
|
}
|
|
38324
|
+
|
|
37744
38325
|
if (dependsOnOtherField && form[optionalFieldName] === undefined) {
|
|
37745
|
-
throw new Error(
|
|
37746
|
-
`${args[2]} was passed to matchesField, but that field does not exist in the form`
|
|
37747
|
-
);
|
|
38326
|
+
throw new Error("".concat(args[2], " was passed to matchesField, but that field does not exist in the form"));
|
|
37748
38327
|
}
|
|
37749
38328
|
|
|
37750
|
-
|
|
37751
|
-
|
|
37752
|
-
|
|
37753
|
-
);
|
|
37754
|
-
|
|
37755
|
-
|
|
37756
|
-
|
|
37757
|
-
|
|
37758
|
-
|
|
37759
|
-
|
|
37760
|
-
|
|
37761
|
-
|
|
37762
|
-
|
|
37763
|
-
|
|
37764
|
-
|
|
37765
|
-
|
|
37766
|
-
|
|
37767
|
-
|
|
37768
|
-
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37772
|
-
const validateSumErrorMessage = type =>
|
|
37773
|
-
`${type} was passed to validateSum, but that validator type does not exist.
|
|
37774
|
-
Please check that you are only calling validator creator functions exported from
|
|
37775
|
-
redux-freeform in your form config and that you didn't forget to
|
|
37776
|
-
invoke the validator creator (you cannot pass the functions themselves to
|
|
37777
|
-
createFormState).`;
|
|
37778
|
-
const VALIDATE_SUM = "validator/VALIDATE_SUM";
|
|
37779
|
-
const VALIDATE_SUM_ERROR = "error/VALIDATE_SUM";
|
|
37780
|
-
const validateSum = (validator, fieldNamesArray) => ({
|
|
37781
|
-
type: VALIDATE_SUM,
|
|
37782
|
-
args: [validator, fieldNamesArray],
|
|
37783
|
-
error: validator.error
|
|
37784
|
-
});
|
|
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
|
+
|
|
37785
38350
|
validateSum.error = VALIDATE_SUM_ERROR;
|
|
37786
|
-
validatorFns[VALIDATE_SUM] = (value, args, form) => {
|
|
37787
|
-
const [validator, fieldNamesArray] = args;
|
|
37788
38351
|
|
|
37789
|
-
|
|
37790
|
-
|
|
37791
|
-
|
|
37792
|
-
|
|
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") {
|
|
37793
38358
|
throw new Error(validateSumErrorMessage(validator.type));
|
|
37794
38359
|
}
|
|
37795
38360
|
|
|
37796
|
-
|
|
37797
|
-
|
|
37798
|
-
|
|
37799
|
-
|
|
37800
|
-
|
|
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
|
+
}
|
|
37801
38371
|
}
|
|
38372
|
+
} catch (err) {
|
|
38373
|
+
_iterator.e(err);
|
|
38374
|
+
} finally {
|
|
38375
|
+
_iterator.f();
|
|
37802
38376
|
}
|
|
37803
38377
|
|
|
37804
|
-
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
);
|
|
37808
|
-
|
|
38378
|
+
var sum = fieldNamesArray.reduce(function (acc, curr) {
|
|
38379
|
+
return acc + Number(form[curr].rawValue);
|
|
38380
|
+
}, Number(value));
|
|
37809
38381
|
return validatorFns[validator.type](sum, validator.args, form);
|
|
37810
38382
|
};
|
|
37811
38383
|
|
|
37812
|
-
|
|
37813
|
-
|
|
37814
|
-
|
|
37815
|
-
|
|
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) {
|
|
37816
38389
|
if (value === "") {
|
|
37817
38390
|
return true;
|
|
37818
38391
|
}
|
|
37819
|
-
|
|
37820
|
-
|
|
38392
|
+
|
|
38393
|
+
var min = args[0];
|
|
38394
|
+
var max = args[1];
|
|
38395
|
+
|
|
37821
38396
|
if (max == undefined || min == undefined) {
|
|
37822
|
-
throw new Error(
|
|
37823
|
-
"Max and min need to be defined for hasLength, both or one of them is undefined"
|
|
37824
|
-
);
|
|
38397
|
+
throw new Error("Max and min need to be defined for hasLength, both or one of them is undefined");
|
|
37825
38398
|
}
|
|
38399
|
+
|
|
37826
38400
|
if (max < min) {
|
|
37827
|
-
throw new Error(
|
|
37828
|
-
"hasLength validator was passed a min greater than the max"
|
|
37829
|
-
);
|
|
38401
|
+
throw new Error("hasLength validator was passed a min greater than the max");
|
|
37830
38402
|
}
|
|
37831
|
-
|
|
38403
|
+
|
|
38404
|
+
var valueLength = value.length;
|
|
37832
38405
|
return max >= valueLength && valueLength >= min;
|
|
37833
38406
|
};
|
|
37834
38407
|
|
|
37835
|
-
|
|
37836
|
-
|
|
37837
|
-
|
|
37838
|
-
|
|
37839
|
-
|
|
37840
|
-
);
|
|
37841
|
-
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) {
|
|
37842
38413
|
if (value === "") {
|
|
37843
38414
|
return true;
|
|
37844
38415
|
}
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
|
|
38416
|
+
|
|
38417
|
+
var dateFormat = args[0];
|
|
38418
|
+
var unit = args[1];
|
|
38419
|
+
var inclusive = args[2] || false;
|
|
37848
38420
|
|
|
37849
38421
|
if (dateFormat == undefined || unit == undefined) {
|
|
37850
|
-
throw new Error(
|
|
37851
|
-
"Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
|
|
37852
|
-
);
|
|
38422
|
+
throw new Error("Date format and unit need to be defined for dateBeforeToday, one or both are undefined");
|
|
37853
38423
|
}
|
|
37854
|
-
|
|
37855
|
-
|
|
38424
|
+
|
|
38425
|
+
var now = dayjs();
|
|
38426
|
+
var dateValue = dayjs(value, dateFormat);
|
|
37856
38427
|
|
|
37857
38428
|
if (inclusive === true) {
|
|
37858
38429
|
return dateValue.isSameOrBefore(now, unit);
|
|
37859
38430
|
}
|
|
38431
|
+
|
|
37860
38432
|
return dateValue.isBefore(now, unit);
|
|
37861
38433
|
};
|
|
37862
38434
|
|
|
37863
|
-
|
|
37864
|
-
|
|
37865
|
-
|
|
37866
|
-
|
|
37867
|
-
|
|
37868
|
-
);
|
|
37869
|
-
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) {
|
|
37870
38440
|
if (value === "") {
|
|
37871
38441
|
return true;
|
|
37872
38442
|
}
|
|
37873
|
-
|
|
37874
|
-
|
|
37875
|
-
|
|
38443
|
+
|
|
38444
|
+
var dateFormat = args[0];
|
|
38445
|
+
var unit = args[1];
|
|
38446
|
+
var inclusive = args[2] || false;
|
|
37876
38447
|
|
|
37877
38448
|
if (dateFormat == undefined || unit == undefined) {
|
|
37878
|
-
throw new Error(
|
|
37879
|
-
"Date format and unit need to be defined for dateAfterToday, one or both are undefined"
|
|
37880
|
-
);
|
|
38449
|
+
throw new Error("Date format and unit need to be defined for dateAfterToday, one or both are undefined");
|
|
37881
38450
|
}
|
|
37882
|
-
|
|
37883
|
-
|
|
38451
|
+
|
|
38452
|
+
var now = dayjs();
|
|
38453
|
+
var dateValue = dayjs(value, dateFormat);
|
|
37884
38454
|
|
|
37885
38455
|
if (inclusive === true) {
|
|
37886
38456
|
return dateValue.isSameOrAfter(now, unit);
|
|
37887
38457
|
}
|
|
38458
|
+
|
|
37888
38459
|
return dateValue.isAfter(now, unit);
|
|
37889
38460
|
};
|
|
37890
38461
|
|
|
37891
|
-
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
37895
|
-
|
|
37896
|
-
);
|
|
37897
|
-
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) {
|
|
37898
38467
|
if (value === "") {
|
|
37899
38468
|
return true;
|
|
37900
|
-
}
|
|
37901
|
-
// Function takes one argument representing the character position
|
|
38469
|
+
} // Function takes one argument representing the character position
|
|
37902
38470
|
// In a date string to identify where the month is
|
|
37903
38471
|
// Eg "10/21/2021" - start position is 0
|
|
37904
38472
|
// Or "18/03/1990" - start position is 3
|
|
37905
38473
|
// Only works with two digit months (01, 02, 03, etc)
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
|
|
38474
|
+
|
|
38475
|
+
|
|
38476
|
+
var monthStartPosition = parseInt(args[0]);
|
|
38477
|
+
var monthEndPosition = monthStartPosition + 2;
|
|
38478
|
+
|
|
38479
|
+
if (isNaN(monthStartPosition)) {
|
|
37909
38480
|
throw new Error("Month start position has to be a valid integer string");
|
|
37910
38481
|
}
|
|
37911
|
-
|
|
37912
|
-
|
|
38482
|
+
|
|
38483
|
+
var month = parseInt(value.slice(monthStartPosition, monthEndPosition));
|
|
38484
|
+
|
|
38485
|
+
if (isNaN(month)) {
|
|
37913
38486
|
return false;
|
|
37914
38487
|
}
|
|
38488
|
+
|
|
37915
38489
|
return month >= 1 && month <= 12;
|
|
37916
38490
|
};
|
|
37917
38491
|
|
|
37918
|
-
|
|
37919
|
-
|
|
37920
|
-
|
|
37921
|
-
|
|
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) {
|
|
37922
38497
|
if (value === "") {
|
|
37923
38498
|
return true;
|
|
37924
38499
|
}
|
|
38500
|
+
|
|
37925
38501
|
return new RegExp(args[0]).test(value); // new RexExp never throws an error, no matter the input
|
|
37926
|
-
};
|
|
38502
|
+
}; // based on http://www.brainjar.com/js/validation/
|
|
37927
38503
|
|
|
37928
|
-
|
|
37929
|
-
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
|
|
37933
|
-
|
|
37934
|
-
);
|
|
37935
|
-
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) {
|
|
37936
38510
|
if (value === "") {
|
|
37937
38511
|
return true;
|
|
37938
38512
|
}
|
|
38513
|
+
|
|
37939
38514
|
if (value.length != 9) {
|
|
37940
38515
|
return false;
|
|
37941
38516
|
}
|
|
37942
|
-
|
|
37943
|
-
|
|
37944
|
-
|
|
37945
|
-
|
|
37946
|
-
|
|
37947
|
-
|
|
37948
|
-
|
|
37949
|
-
|
|
37950
|
-
|
|
37951
|
-
|
|
37952
|
-
|
|
37953
|
-
|
|
37954
|
-
|
|
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);
|
|
37955
38532
|
return sum != 0 && sum % 10 == 0;
|
|
37956
38533
|
};
|
|
37957
38534
|
|
|
37958
|
-
|
|
37959
|
-
|
|
37960
|
-
|
|
37961
|
-
|
|
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) {
|
|
37962
38540
|
if (value === "") {
|
|
37963
38541
|
return true;
|
|
37964
38542
|
}
|
|
38543
|
+
|
|
37965
38544
|
return new RegExp(/[0-9]/).test(value);
|
|
37966
38545
|
};
|
|
37967
38546
|
|
|
37968
|
-
|
|
37969
|
-
|
|
37970
|
-
|
|
37971
|
-
|
|
37972
|
-
|
|
37973
|
-
);
|
|
37974
|
-
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) {
|
|
37975
38552
|
if (value === "") {
|
|
37976
38553
|
return true;
|
|
37977
38554
|
}
|
|
38555
|
+
|
|
37978
38556
|
return new RegExp(/[a-z]/).test(value);
|
|
37979
38557
|
};
|
|
37980
38558
|
|
|
37981
|
-
|
|
37982
|
-
|
|
37983
|
-
|
|
37984
|
-
|
|
37985
|
-
|
|
37986
|
-
);
|
|
37987
|
-
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) {
|
|
37988
38564
|
if (value === "") {
|
|
37989
38565
|
return true;
|
|
37990
38566
|
}
|
|
38567
|
+
|
|
37991
38568
|
return new RegExp(/[A-Z]/).test(value);
|
|
37992
38569
|
};
|
|
37993
38570
|
|
|
37994
|
-
|
|
37995
|
-
|
|
37996
|
-
|
|
37997
|
-
|
|
37998
|
-
|
|
37999
|
-
);
|
|
38000
|
-
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) {
|
|
38001
38576
|
if (value === "") {
|
|
38002
38577
|
return true;
|
|
38003
38578
|
}
|
|
38579
|
+
|
|
38004
38580
|
return new RegExp(/[!@#$%^&*.?]/).test(value);
|
|
38005
38581
|
};
|
|
38006
38582
|
|
|
38007
|
-
|
|
38008
|
-
|
|
38009
|
-
|
|
38010
|
-
|
|
38011
|
-
|
|
38012
|
-
);
|
|
38013
|
-
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) {
|
|
38014
38588
|
if (value === "") {
|
|
38015
38589
|
return true;
|
|
38016
38590
|
}
|
|
38591
|
+
|
|
38017
38592
|
return new RegExp(/^\S+@\S+\.\S+$/).test(value);
|
|
38018
38593
|
};
|
|
38019
38594
|
|
|
38020
|
-
|
|
38021
|
-
|
|
38022
|
-
|
|
38023
|
-
|
|
38024
|
-
|
|
38025
|
-
|
|
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];
|
|
38026
38601
|
|
|
38027
|
-
const runValidator = (validator, value, form) => {
|
|
38028
|
-
const validatorFn = validatorFns[validator.type];
|
|
38029
38602
|
if (validatorFn === undefined) {
|
|
38030
38603
|
throw new Error(runValidatorErrorMessage(validator.type));
|
|
38031
38604
|
}
|
|
38605
|
+
|
|
38032
38606
|
return validatorFn(value, validator.args, form) ? null : validator.error;
|
|
38033
38607
|
};
|
|
38034
38608
|
|
|
38035
|
-
|
|
38036
|
-
return validators
|
|
38037
|
-
|
|
38038
|
-
|
|
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);
|
|
38039
38620
|
};
|
|
38040
38621
|
|
|
38041
|
-
|
|
38042
|
-
|
|
38043
|
-
return
|
|
38622
|
+
var computeErrors = function computeErrors(fieldName, form) {
|
|
38623
|
+
var validators = form[fieldName].validators;
|
|
38624
|
+
return runFormValidators(fieldName, form, validators);
|
|
38044
38625
|
};
|
|
38045
38626
|
|
|
38046
|
-
|
|
38047
|
-
|
|
38048
|
-
|
|
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
|
+
}
|
|
38049
38649
|
};
|
|
38050
38650
|
|
|
38051
38651
|
var obj;
|
|
38052
|
-
var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : (
|
|
38053
|
-
var DRAFTABLE = typeof Symbol !== "undefined" && Symbol
|
|
38054
|
-
var DRAFT_STATE = typeof Symbol !== "undefined" && Symbol
|
|
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
|
+
|
|
38055
38656
|
function isDraft(value) {
|
|
38056
38657
|
return !!value && !!value[DRAFT_STATE];
|
|
38057
38658
|
}
|
|
38659
|
+
|
|
38058
38660
|
function isDraftable(value) {
|
|
38059
|
-
if (!value) {
|
|
38661
|
+
if (!value) {
|
|
38662
|
+
return false;
|
|
38663
|
+
}
|
|
38664
|
+
|
|
38060
38665
|
return isPlainObject(value) || !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE];
|
|
38061
38666
|
}
|
|
38667
|
+
|
|
38062
38668
|
function isPlainObject(value) {
|
|
38063
|
-
if (!value ||
|
|
38064
|
-
|
|
38669
|
+
if (!value || _typeof(value) !== "object") {
|
|
38670
|
+
return false;
|
|
38671
|
+
}
|
|
38672
|
+
|
|
38673
|
+
if (Array.isArray(value)) {
|
|
38674
|
+
return true;
|
|
38675
|
+
}
|
|
38676
|
+
|
|
38065
38677
|
var proto = Object.getPrototypeOf(value);
|
|
38066
38678
|
return !proto || proto === Object.prototype;
|
|
38067
38679
|
}
|
|
38680
|
+
|
|
38068
38681
|
var assign = Object.assign || function assign(target, value) {
|
|
38069
38682
|
for (var key in value) {
|
|
38070
38683
|
if (has$1(value, key)) {
|
|
@@ -38074,11 +38687,18 @@ var assign = Object.assign || function assign(target, value) {
|
|
|
38074
38687
|
|
|
38075
38688
|
return target;
|
|
38076
38689
|
};
|
|
38077
|
-
|
|
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
|
+
|
|
38078
38695
|
function shallowCopy(base, invokeGetters) {
|
|
38079
|
-
if (
|
|
38696
|
+
if (invokeGetters === void 0) invokeGetters = false;
|
|
38697
|
+
|
|
38698
|
+
if (Array.isArray(base)) {
|
|
38699
|
+
return base.slice();
|
|
38700
|
+
}
|
|
38080
38701
|
|
|
38081
|
-
if (Array.isArray(base)) { return base.slice(); }
|
|
38082
38702
|
var clone = Object.create(Object.getPrototypeOf(base));
|
|
38083
38703
|
ownKeys$2(base).forEach(function (key) {
|
|
38084
38704
|
if (key === DRAFT_STATE) {
|
|
@@ -38108,20 +38728,28 @@ function shallowCopy(base, invokeGetters) {
|
|
|
38108
38728
|
});
|
|
38109
38729
|
return clone;
|
|
38110
38730
|
}
|
|
38731
|
+
|
|
38111
38732
|
function each(value, cb) {
|
|
38112
38733
|
if (Array.isArray(value)) {
|
|
38113
|
-
for (var i = 0; i < value.length; i++) {
|
|
38734
|
+
for (var i = 0; i < value.length; i++) {
|
|
38735
|
+
cb(i, value[i], value);
|
|
38736
|
+
}
|
|
38114
38737
|
} else {
|
|
38115
|
-
ownKeys$2(value).forEach(function (key) {
|
|
38738
|
+
ownKeys$2(value).forEach(function (key) {
|
|
38739
|
+
return cb(key, value[key], value);
|
|
38740
|
+
});
|
|
38116
38741
|
}
|
|
38117
38742
|
}
|
|
38743
|
+
|
|
38118
38744
|
function isEnumerable(base, prop) {
|
|
38119
38745
|
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
38120
38746
|
return !!desc && desc.enumerable;
|
|
38121
38747
|
}
|
|
38748
|
+
|
|
38122
38749
|
function has$1(thing, prop) {
|
|
38123
38750
|
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
38124
38751
|
}
|
|
38752
|
+
|
|
38125
38753
|
function is(x, y) {
|
|
38126
38754
|
// From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
|
|
38127
38755
|
if (x === y) {
|
|
@@ -38130,18 +38758,27 @@ function is(x, y) {
|
|
|
38130
38758
|
return x !== x && y !== y;
|
|
38131
38759
|
}
|
|
38132
38760
|
}
|
|
38761
|
+
|
|
38133
38762
|
function clone(obj) {
|
|
38134
|
-
if (!isDraftable(obj)) {
|
|
38135
|
-
|
|
38763
|
+
if (!isDraftable(obj)) {
|
|
38764
|
+
return obj;
|
|
38765
|
+
}
|
|
38766
|
+
|
|
38767
|
+
if (Array.isArray(obj)) {
|
|
38768
|
+
return obj.map(clone);
|
|
38769
|
+
}
|
|
38770
|
+
|
|
38136
38771
|
var cloned = Object.create(Object.getPrototypeOf(obj));
|
|
38137
38772
|
|
|
38138
|
-
for (var key in obj) {
|
|
38773
|
+
for (var key in obj) {
|
|
38774
|
+
cloned[key] = clone(obj[key]);
|
|
38775
|
+
}
|
|
38139
38776
|
|
|
38140
38777
|
return cloned;
|
|
38141
38778
|
}
|
|
38142
|
-
|
|
38143
38779
|
/** Each scope represents a `produce` call. */
|
|
38144
38780
|
|
|
38781
|
+
|
|
38145
38782
|
var ImmerScope = function ImmerScope(parent) {
|
|
38146
38783
|
this.drafts = [];
|
|
38147
38784
|
this.parent = parent; // Whenever the modified draft contains a draft from another scope, we
|
|
@@ -38152,7 +38789,7 @@ var ImmerScope = function ImmerScope(parent) {
|
|
|
38152
38789
|
this.patches = null;
|
|
38153
38790
|
};
|
|
38154
38791
|
|
|
38155
|
-
ImmerScope.prototype.usePatches = function usePatches
|
|
38792
|
+
ImmerScope.prototype.usePatches = function usePatches(patchListener) {
|
|
38156
38793
|
if (patchListener) {
|
|
38157
38794
|
this.patches = [];
|
|
38158
38795
|
this.inversePatches = [];
|
|
@@ -38160,17 +38797,18 @@ ImmerScope.prototype.usePatches = function usePatches (patchListener) {
|
|
|
38160
38797
|
}
|
|
38161
38798
|
};
|
|
38162
38799
|
|
|
38163
|
-
ImmerScope.prototype.revoke = function revoke$1
|
|
38800
|
+
ImmerScope.prototype.revoke = function revoke$1() {
|
|
38164
38801
|
this.leave();
|
|
38165
38802
|
this.drafts.forEach(revoke);
|
|
38166
38803
|
this.drafts = null; // Make draft-related methods throw.
|
|
38167
38804
|
};
|
|
38168
38805
|
|
|
38169
|
-
ImmerScope.prototype.leave = function leave
|
|
38806
|
+
ImmerScope.prototype.leave = function leave() {
|
|
38170
38807
|
if (this === ImmerScope.current) {
|
|
38171
38808
|
ImmerScope.current = this.parent;
|
|
38172
38809
|
}
|
|
38173
38810
|
};
|
|
38811
|
+
|
|
38174
38812
|
ImmerScope.current = null;
|
|
38175
38813
|
|
|
38176
38814
|
ImmerScope.enter = function () {
|
|
@@ -38179,11 +38817,11 @@ ImmerScope.enter = function () {
|
|
|
38179
38817
|
|
|
38180
38818
|
function revoke(draft) {
|
|
38181
38819
|
draft[DRAFT_STATE].revoke();
|
|
38182
|
-
}
|
|
38820
|
+
} // but share them all instead
|
|
38183
38821
|
|
|
38184
|
-
// but share them all instead
|
|
38185
38822
|
|
|
38186
38823
|
var descriptors$1 = {};
|
|
38824
|
+
|
|
38187
38825
|
function willFinalize(scope, result, isReplaced) {
|
|
38188
38826
|
scope.drafts.forEach(function (draft) {
|
|
38189
38827
|
draft[DRAFT_STATE].finalizing = true;
|
|
@@ -38198,9 +38836,10 @@ function willFinalize(scope, result, isReplaced) {
|
|
|
38198
38836
|
markChangesSweep(scope.drafts);
|
|
38199
38837
|
} // When a child draft is returned, look for changes.
|
|
38200
38838
|
else if (isDraft(result) && result[DRAFT_STATE].scope === scope) {
|
|
38201
|
-
|
|
38202
|
-
|
|
38839
|
+
markChangesSweep(scope.drafts);
|
|
38840
|
+
}
|
|
38203
38841
|
}
|
|
38842
|
+
|
|
38204
38843
|
function createProxy(base, parent) {
|
|
38205
38844
|
var isArray = Array.isArray(base);
|
|
38206
38845
|
var draft = clonePotentialDraft(base);
|
|
@@ -38254,7 +38893,11 @@ function peek(draft, prop) {
|
|
|
38254
38893
|
function get$1(state, prop) {
|
|
38255
38894
|
assertUnrevoked(state);
|
|
38256
38895
|
var value = peek(source(state), prop);
|
|
38257
|
-
|
|
38896
|
+
|
|
38897
|
+
if (state.finalizing) {
|
|
38898
|
+
return value;
|
|
38899
|
+
} // Create a draft if the value is unmodified.
|
|
38900
|
+
|
|
38258
38901
|
|
|
38259
38902
|
if (value === peek(state.base, prop) && isDraftable(value)) {
|
|
38260
38903
|
prepareCopy(state);
|
|
@@ -38269,7 +38912,10 @@ function set$1(state, prop, value) {
|
|
|
38269
38912
|
state.assigned[prop] = true;
|
|
38270
38913
|
|
|
38271
38914
|
if (!state.modified) {
|
|
38272
|
-
if (is(value, peek(source(state), prop))) {
|
|
38915
|
+
if (is(value, peek(source(state), prop))) {
|
|
38916
|
+
return;
|
|
38917
|
+
}
|
|
38918
|
+
|
|
38273
38919
|
markChanged(state);
|
|
38274
38920
|
prepareCopy(state);
|
|
38275
38921
|
}
|
|
@@ -38280,12 +38926,17 @@ function set$1(state, prop, value) {
|
|
|
38280
38926
|
function markChanged(state) {
|
|
38281
38927
|
if (!state.modified) {
|
|
38282
38928
|
state.modified = true;
|
|
38283
|
-
|
|
38929
|
+
|
|
38930
|
+
if (state.parent) {
|
|
38931
|
+
markChanged(state.parent);
|
|
38932
|
+
}
|
|
38284
38933
|
}
|
|
38285
38934
|
}
|
|
38286
38935
|
|
|
38287
38936
|
function prepareCopy(state) {
|
|
38288
|
-
if (!state.copy) {
|
|
38937
|
+
if (!state.copy) {
|
|
38938
|
+
state.copy = clonePotentialDraft(state.base);
|
|
38939
|
+
}
|
|
38289
38940
|
}
|
|
38290
38941
|
|
|
38291
38942
|
function clonePotentialDraft(base) {
|
|
@@ -38310,15 +38961,12 @@ function proxyProperty(draft, prop, enumerable) {
|
|
|
38310
38961
|
descriptors$1[prop] = desc = {
|
|
38311
38962
|
configurable: true,
|
|
38312
38963
|
enumerable: enumerable,
|
|
38313
|
-
|
|
38314
38964
|
get: function get$1$1() {
|
|
38315
38965
|
return get$1(this[DRAFT_STATE], prop);
|
|
38316
38966
|
},
|
|
38317
|
-
|
|
38318
38967
|
set: function set$1$1(value) {
|
|
38319
38968
|
set$1(this[DRAFT_STATE], prop, value);
|
|
38320
38969
|
}
|
|
38321
|
-
|
|
38322
38970
|
};
|
|
38323
38971
|
}
|
|
38324
38972
|
|
|
@@ -38326,7 +38974,9 @@ function proxyProperty(draft, prop, enumerable) {
|
|
|
38326
38974
|
}
|
|
38327
38975
|
|
|
38328
38976
|
function assertUnrevoked(state) {
|
|
38329
|
-
if (state.revoked === true) {
|
|
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
|
+
}
|
|
38330
38980
|
} // This looks expensive, but only proxies are visited, and only objects without known changes are scanned.
|
|
38331
38981
|
|
|
38332
38982
|
|
|
@@ -38340,16 +38990,27 @@ function markChangesSweep(drafts) {
|
|
|
38340
38990
|
|
|
38341
38991
|
if (!state.modified) {
|
|
38342
38992
|
if (Array.isArray(state.base)) {
|
|
38343
|
-
if (hasArrayChanges(state)) {
|
|
38344
|
-
|
|
38993
|
+
if (hasArrayChanges(state)) {
|
|
38994
|
+
markChanged(state);
|
|
38995
|
+
}
|
|
38996
|
+
} else if (hasObjectChanges(state)) {
|
|
38997
|
+
markChanged(state);
|
|
38998
|
+
}
|
|
38345
38999
|
}
|
|
38346
39000
|
}
|
|
38347
39001
|
}
|
|
38348
39002
|
|
|
38349
39003
|
function markChangesRecursively(object) {
|
|
38350
|
-
if (!object ||
|
|
39004
|
+
if (!object || _typeof(object) !== "object") {
|
|
39005
|
+
return;
|
|
39006
|
+
}
|
|
39007
|
+
|
|
38351
39008
|
var state = object[DRAFT_STATE];
|
|
38352
|
-
|
|
39009
|
+
|
|
39010
|
+
if (!state) {
|
|
39011
|
+
return;
|
|
39012
|
+
}
|
|
39013
|
+
|
|
38353
39014
|
var base = state.base;
|
|
38354
39015
|
var draft = state.draft;
|
|
38355
39016
|
var assigned = state.assigned;
|
|
@@ -38379,14 +39040,20 @@ function markChangesRecursively(object) {
|
|
|
38379
39040
|
assigned.length = true;
|
|
38380
39041
|
|
|
38381
39042
|
if (draft.length < base.length) {
|
|
38382
|
-
for (var i = draft.length; i < base.length; i++) {
|
|
39043
|
+
for (var i = draft.length; i < base.length; i++) {
|
|
39044
|
+
assigned[i] = false;
|
|
39045
|
+
}
|
|
38383
39046
|
} else {
|
|
38384
|
-
for (var i$1 = base.length; i$1 < draft.length; i$1++) {
|
|
39047
|
+
for (var i$1 = base.length; i$1 < draft.length; i$1++) {
|
|
39048
|
+
assigned[i$1] = true;
|
|
39049
|
+
}
|
|
38385
39050
|
}
|
|
38386
39051
|
|
|
38387
39052
|
for (var i$2 = 0; i$2 < draft.length; i$2++) {
|
|
38388
39053
|
// Only untouched indices trigger recursion.
|
|
38389
|
-
if (assigned[i$2] === undefined) {
|
|
39054
|
+
if (assigned[i$2] === undefined) {
|
|
39055
|
+
markChangesRecursively(draft[i$2]);
|
|
39056
|
+
}
|
|
38390
39057
|
}
|
|
38391
39058
|
}
|
|
38392
39059
|
}
|
|
@@ -38407,13 +39074,13 @@ function hasObjectChanges(state) {
|
|
|
38407
39074
|
} // Once a base key is deleted, future changes go undetected, because its
|
|
38408
39075
|
// descriptor is erased. This branch detects any missed changes.
|
|
38409
39076
|
else {
|
|
38410
|
-
|
|
38411
|
-
|
|
39077
|
+
var value = draft[key];
|
|
39078
|
+
var state$1 = value && value[DRAFT_STATE];
|
|
38412
39079
|
|
|
38413
|
-
|
|
38414
|
-
|
|
38415
|
-
}
|
|
39080
|
+
if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
|
|
39081
|
+
return true;
|
|
38416
39082
|
}
|
|
39083
|
+
}
|
|
38417
39084
|
} // At this point, no keys were added or changed.
|
|
38418
39085
|
// Compare key count to determine if keys were deleted.
|
|
38419
39086
|
|
|
@@ -38423,7 +39090,10 @@ function hasObjectChanges(state) {
|
|
|
38423
39090
|
|
|
38424
39091
|
function hasArrayChanges(state) {
|
|
38425
39092
|
var draft = state.draft;
|
|
38426
|
-
|
|
39093
|
+
|
|
39094
|
+
if (draft.length !== state.base.length) {
|
|
39095
|
+
return true;
|
|
39096
|
+
} // See #116
|
|
38427
39097
|
// If we first shorten the length, our array interceptors will be removed.
|
|
38428
39098
|
// If after that new items are added, result in the same original length,
|
|
38429
39099
|
// those last items will have no intercepting property.
|
|
@@ -38431,9 +39101,13 @@ function hasArrayChanges(state) {
|
|
|
38431
39101
|
// N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check
|
|
38432
39102
|
// the last one
|
|
38433
39103
|
|
|
39104
|
+
|
|
38434
39105
|
var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)
|
|
38435
39106
|
|
|
38436
|
-
if (descriptor && !descriptor.get) {
|
|
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
|
+
|
|
38437
39111
|
|
|
38438
39112
|
return false;
|
|
38439
39113
|
}
|
|
@@ -38447,11 +39121,12 @@ function createHiddenProperty(target, prop, value) {
|
|
|
38447
39121
|
}
|
|
38448
39122
|
|
|
38449
39123
|
var legacyProxy = /*#__PURE__*/Object.freeze({
|
|
38450
|
-
|
|
38451
|
-
|
|
39124
|
+
willFinalize: willFinalize,
|
|
39125
|
+
createProxy: createProxy
|
|
38452
39126
|
});
|
|
38453
39127
|
|
|
38454
39128
|
function willFinalize$1() {}
|
|
39129
|
+
|
|
38455
39130
|
function createProxy$1(base, parent) {
|
|
38456
39131
|
var scope = parent ? parent.scope : ImmerScope.current;
|
|
38457
39132
|
var state = {
|
|
@@ -38486,33 +39161,27 @@ function createProxy$1(base, parent) {
|
|
|
38486
39161
|
scope.drafts.push(proxy);
|
|
38487
39162
|
return proxy;
|
|
38488
39163
|
}
|
|
39164
|
+
|
|
38489
39165
|
var objectTraps = {
|
|
38490
39166
|
get: get$1$1,
|
|
38491
|
-
|
|
38492
39167
|
has: function has(target, prop) {
|
|
38493
39168
|
return prop in source$1(target);
|
|
38494
39169
|
},
|
|
38495
|
-
|
|
38496
39170
|
ownKeys: function ownKeys(target) {
|
|
38497
39171
|
return Reflect.ownKeys(source$1(target));
|
|
38498
39172
|
},
|
|
38499
|
-
|
|
38500
39173
|
set: set$1$1,
|
|
38501
39174
|
deleteProperty: deleteProperty,
|
|
38502
39175
|
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
38503
|
-
|
|
38504
39176
|
defineProperty: function defineProperty() {
|
|
38505
39177
|
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
38506
39178
|
},
|
|
38507
|
-
|
|
38508
39179
|
getPrototypeOf: function getPrototypeOf(target) {
|
|
38509
39180
|
return Object.getPrototypeOf(target.base);
|
|
38510
39181
|
},
|
|
38511
|
-
|
|
38512
39182
|
setPrototypeOf: function setPrototypeOf() {
|
|
38513
39183
|
throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore
|
|
38514
39184
|
}
|
|
38515
|
-
|
|
38516
39185
|
};
|
|
38517
39186
|
var arrayTraps = {};
|
|
38518
39187
|
each(objectTraps, function (key, fn) {
|
|
@@ -38551,7 +39220,10 @@ function peek$1(draft, prop) {
|
|
|
38551
39220
|
}
|
|
38552
39221
|
|
|
38553
39222
|
function get$1$1(state, prop) {
|
|
38554
|
-
if (prop === DRAFT_STATE) {
|
|
39223
|
+
if (prop === DRAFT_STATE) {
|
|
39224
|
+
return state;
|
|
39225
|
+
}
|
|
39226
|
+
|
|
38555
39227
|
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
38556
39228
|
|
|
38557
39229
|
if (!state.modified && has$1(drafts, prop)) {
|
|
@@ -38567,7 +39239,10 @@ function get$1$1(state, prop) {
|
|
|
38567
39239
|
|
|
38568
39240
|
if (state.modified) {
|
|
38569
39241
|
// Assigned values are never drafted. This catches any drafts we created, too.
|
|
38570
|
-
if (value !== peek$1(state.base, prop)) {
|
|
39242
|
+
if (value !== peek$1(state.base, prop)) {
|
|
39243
|
+
return value;
|
|
39244
|
+
} // Store drafts on the copy (when one exists).
|
|
39245
|
+
|
|
38571
39246
|
|
|
38572
39247
|
drafts = state.copy;
|
|
38573
39248
|
}
|
|
@@ -38582,7 +39257,11 @@ function set$1$1(state, prop, value) {
|
|
|
38582
39257
|
// values may be drafts, but falsy values are never drafts.
|
|
38583
39258
|
|
|
38584
39259
|
var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base;
|
|
38585
|
-
|
|
39260
|
+
|
|
39261
|
+
if (isUnchanged) {
|
|
39262
|
+
return true;
|
|
39263
|
+
}
|
|
39264
|
+
|
|
38586
39265
|
markChanged$1(state);
|
|
38587
39266
|
}
|
|
38588
39267
|
|
|
@@ -38601,7 +39280,10 @@ function deleteProperty(state, prop) {
|
|
|
38601
39280
|
delete state.assigned[prop];
|
|
38602
39281
|
}
|
|
38603
39282
|
|
|
38604
|
-
if (state.copy) {
|
|
39283
|
+
if (state.copy) {
|
|
39284
|
+
delete state.copy[prop];
|
|
39285
|
+
}
|
|
39286
|
+
|
|
38605
39287
|
return true;
|
|
38606
39288
|
} // Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
38607
39289
|
// the same guarantee in ES5 mode.
|
|
@@ -38624,13 +39306,16 @@ function markChanged$1(state) {
|
|
|
38624
39306
|
state.modified = true;
|
|
38625
39307
|
state.copy = assign(shallowCopy(state.base), state.drafts);
|
|
38626
39308
|
state.drafts = null;
|
|
38627
|
-
|
|
39309
|
+
|
|
39310
|
+
if (state.parent) {
|
|
39311
|
+
markChanged$1(state.parent);
|
|
39312
|
+
}
|
|
38628
39313
|
}
|
|
38629
39314
|
}
|
|
38630
39315
|
|
|
38631
39316
|
var modernProxy = /*#__PURE__*/Object.freeze({
|
|
38632
|
-
|
|
38633
|
-
|
|
39317
|
+
willFinalize: willFinalize$1,
|
|
39318
|
+
createProxy: createProxy$1
|
|
38634
39319
|
});
|
|
38635
39320
|
|
|
38636
39321
|
function generatePatches(state, basePath, patches, inversePatches) {
|
|
@@ -38639,14 +39324,13 @@ function generatePatches(state, basePath, patches, inversePatches) {
|
|
|
38639
39324
|
|
|
38640
39325
|
function generateArrayPatches(state, basePath, patches, inversePatches) {
|
|
38641
39326
|
var assign, assign$1;
|
|
38642
|
-
|
|
38643
39327
|
var base = state.base;
|
|
38644
39328
|
var copy = state.copy;
|
|
38645
39329
|
var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer.
|
|
38646
39330
|
|
|
38647
39331
|
if (copy.length < base.length) {
|
|
38648
|
-
|
|
38649
|
-
|
|
39332
|
+
assign = [copy, base], base = assign[0], copy = assign[1];
|
|
39333
|
+
assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1];
|
|
38650
39334
|
}
|
|
38651
39335
|
|
|
38652
39336
|
var delta = copy.length - base.length; // Find the first replaced index.
|
|
@@ -38704,7 +39388,11 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
|
|
|
38704
39388
|
var origValue = base[key];
|
|
38705
39389
|
var value = copy[key];
|
|
38706
39390
|
var op = !assignedValue ? "remove" : key in base ? "replace" : "add";
|
|
38707
|
-
|
|
39391
|
+
|
|
39392
|
+
if (origValue === value && op === "replace") {
|
|
39393
|
+
return;
|
|
39394
|
+
}
|
|
39395
|
+
|
|
38708
39396
|
var path = basePath.concat(key);
|
|
38709
39397
|
patches.push(op === "remove" ? {
|
|
38710
39398
|
op: op,
|
|
@@ -38729,20 +39417,26 @@ function generateObjectPatches(state, basePath, patches, inversePatches) {
|
|
|
38729
39417
|
});
|
|
38730
39418
|
}
|
|
38731
39419
|
|
|
38732
|
-
var applyPatches = function (draft, patches) {
|
|
39420
|
+
var applyPatches = function applyPatches(draft, patches) {
|
|
38733
39421
|
for (var i$1 = 0, list = patches; i$1 < list.length; i$1 += 1) {
|
|
38734
39422
|
var patch = list[i$1];
|
|
38735
|
-
|
|
38736
39423
|
var path = patch.path;
|
|
38737
39424
|
var op = patch.op;
|
|
38738
39425
|
var value = clone(patch.value); // used to clone patch to ensure original patch is not modified, see #411
|
|
38739
39426
|
|
|
38740
|
-
if (!path.length) {
|
|
39427
|
+
if (!path.length) {
|
|
39428
|
+
throw new Error("Illegal state");
|
|
39429
|
+
}
|
|
39430
|
+
|
|
38741
39431
|
var base = draft;
|
|
38742
39432
|
|
|
38743
39433
|
for (var i = 0; i < path.length - 1; i++) {
|
|
38744
39434
|
base = base[path[i]];
|
|
38745
|
-
|
|
39435
|
+
|
|
39436
|
+
if (!base || _typeof(base) !== "object") {
|
|
39437
|
+
throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/"));
|
|
39438
|
+
} // prettier-ignore
|
|
39439
|
+
|
|
38746
39440
|
}
|
|
38747
39441
|
|
|
38748
39442
|
var key = path[path.length - 1];
|
|
@@ -38791,27 +39485,33 @@ var configDefaults = {
|
|
|
38791
39485
|
onDelete: null,
|
|
38792
39486
|
onCopy: null
|
|
38793
39487
|
};
|
|
39488
|
+
|
|
38794
39489
|
var Immer = function Immer(config) {
|
|
38795
39490
|
assign(this, configDefaults, config);
|
|
38796
39491
|
this.setUseProxies(this.useProxies);
|
|
38797
39492
|
this.produce = this.produce.bind(this);
|
|
38798
39493
|
};
|
|
38799
39494
|
|
|
38800
|
-
Immer.prototype.produce = function produce
|
|
38801
|
-
|
|
39495
|
+
Immer.prototype.produce = function produce(base, recipe, patchListener) {
|
|
39496
|
+
var this$1$1 = this; // curried invocation
|
|
38802
39497
|
|
|
38803
|
-
// curried invocation
|
|
38804
39498
|
if (typeof base === "function" && typeof recipe !== "function") {
|
|
38805
39499
|
var defaultBase = recipe;
|
|
38806
39500
|
recipe = base;
|
|
38807
39501
|
var self = this;
|
|
38808
39502
|
return function curriedProduce(base) {
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38812
|
-
|
|
39503
|
+
var this$1$1 = this;
|
|
39504
|
+
if (base === void 0) base = defaultBase;
|
|
39505
|
+
var args = [],
|
|
39506
|
+
len = arguments.length - 1;
|
|
38813
39507
|
|
|
38814
|
-
|
|
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
|
|
38815
39515
|
};
|
|
38816
39516
|
} // prettier-ignore
|
|
38817
39517
|
|
|
@@ -38837,7 +39537,11 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
|
38837
39537
|
hasError = false;
|
|
38838
39538
|
} finally {
|
|
38839
39539
|
// finally instead of catch + rethrow better preserves original stack
|
|
38840
|
-
if (hasError) {
|
|
39540
|
+
if (hasError) {
|
|
39541
|
+
scope.revoke();
|
|
39542
|
+
} else {
|
|
39543
|
+
scope.leave();
|
|
39544
|
+
}
|
|
38841
39545
|
}
|
|
38842
39546
|
|
|
38843
39547
|
if (result instanceof Promise) {
|
|
@@ -38854,25 +39558,38 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
|
|
|
38854
39558
|
return this.processResult(result, scope);
|
|
38855
39559
|
} else {
|
|
38856
39560
|
result = recipe(base);
|
|
38857
|
-
|
|
39561
|
+
|
|
39562
|
+
if (result === undefined) {
|
|
39563
|
+
return base;
|
|
39564
|
+
}
|
|
39565
|
+
|
|
38858
39566
|
return result !== NOTHING ? result : undefined;
|
|
38859
39567
|
}
|
|
38860
39568
|
};
|
|
38861
39569
|
|
|
38862
|
-
Immer.prototype.produceWithPatches = function produceWithPatches
|
|
38863
|
-
|
|
39570
|
+
Immer.prototype.produceWithPatches = function produceWithPatches(arg1, arg2, arg3) {
|
|
39571
|
+
var this$1$1 = this;
|
|
38864
39572
|
|
|
38865
39573
|
if (typeof arg1 === "function") {
|
|
38866
39574
|
return function (state) {
|
|
38867
|
-
|
|
38868
|
-
|
|
39575
|
+
var args = [],
|
|
39576
|
+
len = arguments.length - 1;
|
|
38869
39577
|
|
|
38870
|
-
|
|
38871
|
-
|
|
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
|
+
};
|
|
38872
39586
|
} // non-curried form
|
|
38873
39587
|
|
|
38874
39588
|
|
|
38875
|
-
if (arg3) {
|
|
39589
|
+
if (arg3) {
|
|
39590
|
+
throw new Error("A patch listener cannot be passed to produceWithPatches");
|
|
39591
|
+
}
|
|
39592
|
+
|
|
38876
39593
|
var patches, inversePatches;
|
|
38877
39594
|
var nextState = this.produce(arg1, arg2, function (p, ip) {
|
|
38878
39595
|
patches = p;
|
|
@@ -38881,7 +39598,7 @@ Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, ar
|
|
|
38881
39598
|
return [nextState, patches, inversePatches];
|
|
38882
39599
|
};
|
|
38883
39600
|
|
|
38884
|
-
Immer.prototype.createDraft = function createDraft
|
|
39601
|
+
Immer.prototype.createDraft = function createDraft(base) {
|
|
38885
39602
|
if (!isDraftable(base)) {
|
|
38886
39603
|
throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore
|
|
38887
39604
|
}
|
|
@@ -38893,7 +39610,7 @@ Immer.prototype.createDraft = function createDraft (base) {
|
|
|
38893
39610
|
return proxy;
|
|
38894
39611
|
};
|
|
38895
39612
|
|
|
38896
|
-
Immer.prototype.finishDraft = function finishDraft
|
|
39613
|
+
Immer.prototype.finishDraft = function finishDraft(draft, patchListener) {
|
|
38897
39614
|
var state = draft && draft[DRAFT_STATE];
|
|
38898
39615
|
|
|
38899
39616
|
if (!state || !state.isManual) {
|
|
@@ -38909,16 +39626,16 @@ Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
|
|
|
38909
39626
|
return this.processResult(undefined, scope);
|
|
38910
39627
|
};
|
|
38911
39628
|
|
|
38912
|
-
Immer.prototype.setAutoFreeze = function setAutoFreeze
|
|
39629
|
+
Immer.prototype.setAutoFreeze = function setAutoFreeze(value) {
|
|
38913
39630
|
this.autoFreeze = value;
|
|
38914
39631
|
};
|
|
38915
39632
|
|
|
38916
|
-
Immer.prototype.setUseProxies = function setUseProxies
|
|
39633
|
+
Immer.prototype.setUseProxies = function setUseProxies(value) {
|
|
38917
39634
|
this.useProxies = value;
|
|
38918
39635
|
assign(this, value ? modernProxy : legacyProxy);
|
|
38919
39636
|
};
|
|
38920
39637
|
|
|
38921
|
-
Immer.prototype.applyPatches = function applyPatches$1
|
|
39638
|
+
Immer.prototype.applyPatches = function applyPatches$1(base, patches) {
|
|
38922
39639
|
// If a patch replaces the entire state, take that replacement as base
|
|
38923
39640
|
// before applying patches
|
|
38924
39641
|
var i;
|
|
@@ -38938,12 +39655,14 @@ Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
|
|
|
38938
39655
|
} // Otherwise, produce a copy of the base state.
|
|
38939
39656
|
|
|
38940
39657
|
|
|
38941
|
-
return this.produce(base, function (draft) {
|
|
39658
|
+
return this.produce(base, function (draft) {
|
|
39659
|
+
return applyPatches(draft, patches.slice(i + 1));
|
|
39660
|
+
});
|
|
38942
39661
|
};
|
|
38943
39662
|
/** @internal */
|
|
38944
39663
|
|
|
38945
39664
|
|
|
38946
|
-
Immer.prototype.processResult = function processResult
|
|
39665
|
+
Immer.prototype.processResult = function processResult(result, scope) {
|
|
38947
39666
|
var baseDraft = scope.drafts[0];
|
|
38948
39667
|
var isReplaced = result !== undefined && result !== baseDraft;
|
|
38949
39668
|
this.willFinalize(scope, result, isReplaced);
|
|
@@ -38991,13 +39710,15 @@ Immer.prototype.processResult = function processResult (result, scope) {
|
|
|
38991
39710
|
*/
|
|
38992
39711
|
|
|
38993
39712
|
|
|
38994
|
-
Immer.prototype.finalize = function finalize
|
|
38995
|
-
|
|
38996
|
-
|
|
39713
|
+
Immer.prototype.finalize = function finalize(draft, path, scope) {
|
|
39714
|
+
var this$1$1 = this;
|
|
38997
39715
|
var state = draft[DRAFT_STATE];
|
|
38998
39716
|
|
|
38999
39717
|
if (!state) {
|
|
39000
|
-
if (Object.isFrozen(draft)) {
|
|
39718
|
+
if (Object.isFrozen(draft)) {
|
|
39719
|
+
return draft;
|
|
39720
|
+
}
|
|
39721
|
+
|
|
39001
39722
|
return this.finalizeTree(draft, null, scope);
|
|
39002
39723
|
} // Never finalize drafts owned by another scope.
|
|
39003
39724
|
|
|
@@ -39020,13 +39741,17 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
39020
39741
|
var assigned = state.assigned;
|
|
39021
39742
|
|
|
39022
39743
|
for (var prop in assigned) {
|
|
39023
|
-
if (!assigned[prop]) {
|
|
39744
|
+
if (!assigned[prop]) {
|
|
39745
|
+
this.onDelete(state, prop);
|
|
39746
|
+
}
|
|
39024
39747
|
}
|
|
39025
39748
|
} else {
|
|
39026
39749
|
var base = state.base;
|
|
39027
|
-
|
|
39750
|
+
var copy = state.copy;
|
|
39028
39751
|
each(base, function (prop) {
|
|
39029
|
-
if (!has$1(copy, prop)) {
|
|
39752
|
+
if (!has$1(copy, prop)) {
|
|
39753
|
+
this$1$1.onDelete(state, prop);
|
|
39754
|
+
}
|
|
39030
39755
|
});
|
|
39031
39756
|
}
|
|
39032
39757
|
}
|
|
@@ -39054,9 +39779,8 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
39054
39779
|
*/
|
|
39055
39780
|
|
|
39056
39781
|
|
|
39057
|
-
Immer.prototype.finalizeTree = function finalizeTree
|
|
39058
|
-
|
|
39059
|
-
|
|
39782
|
+
Immer.prototype.finalizeTree = function finalizeTree(root, rootPath, scope) {
|
|
39783
|
+
var this$1$1 = this;
|
|
39060
39784
|
var state = root[DRAFT_STATE];
|
|
39061
39785
|
|
|
39062
39786
|
if (state) {
|
|
@@ -39070,7 +39794,7 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
|
39070
39794
|
|
|
39071
39795
|
var needPatches = !!rootPath && !!scope.patches;
|
|
39072
39796
|
|
|
39073
|
-
var finalizeProperty = function (prop, value, parent) {
|
|
39797
|
+
var finalizeProperty = function finalizeProperty(prop, value, parent) {
|
|
39074
39798
|
if (value === parent) {
|
|
39075
39799
|
throw Error("Immer forbids circular references");
|
|
39076
39800
|
} // In the `finalizeTree` method, only the `root` object may be a draft.
|
|
@@ -39097,14 +39821,16 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
|
|
|
39097
39821
|
} // Unchanged drafts are never passed to the `onAssign` hook.
|
|
39098
39822
|
|
|
39099
39823
|
|
|
39100
|
-
if (isDraftProp && value === state.base[prop]) {
|
|
39824
|
+
if (isDraftProp && value === state.base[prop]) {
|
|
39825
|
+
return;
|
|
39826
|
+
}
|
|
39101
39827
|
} // Unchanged draft properties are ignored.
|
|
39102
39828
|
else if (isDraftProp && is(value, state.base[prop])) {
|
|
39103
|
-
|
|
39104
|
-
|
|
39105
|
-
|
|
39106
|
-
|
|
39107
|
-
|
|
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
|
+
}
|
|
39108
39834
|
|
|
39109
39835
|
if (isDraftProp && this$1$1.onAssign) {
|
|
39110
39836
|
this$1$1.onAssign(state, prop, value);
|
|
@@ -39182,127 +39908,223 @@ immer.createDraft.bind(immer);
|
|
|
39182
39908
|
|
|
39183
39909
|
immer.finishDraft.bind(immer);
|
|
39184
39910
|
|
|
39185
|
-
|
|
39186
|
-
|
|
39187
|
-
|
|
39188
|
-
|
|
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];
|
|
39189
39917
|
initialForm[formKey] = {
|
|
39190
39918
|
dirty: false,
|
|
39191
39919
|
rawValue: formConfig[formKey].defaultValue || "",
|
|
39192
39920
|
validators: formConfig[formKey].validators || [],
|
|
39193
39921
|
constraints: formConfig[formKey].constraints || []
|
|
39194
39922
|
};
|
|
39195
|
-
}
|
|
39196
|
-
// Because validators require the entire form we have to do a
|
|
39923
|
+
} // Because validators require the entire form we have to do a
|
|
39197
39924
|
// second pass to add errors once the initial form has been
|
|
39198
39925
|
// constructed
|
|
39199
|
-
|
|
39200
|
-
|
|
39201
|
-
|
|
39202
|
-
|
|
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;
|
|
39203
39933
|
}
|
|
39934
|
+
|
|
39204
39935
|
return initialForm;
|
|
39205
39936
|
};
|
|
39206
39937
|
|
|
39207
|
-
|
|
39208
|
-
const set$2 = fieldName => value => ({
|
|
39209
|
-
type: SET,
|
|
39210
|
-
payload: { fieldName, value }
|
|
39211
|
-
});
|
|
39938
|
+
var SET = "field/SET";
|
|
39212
39939
|
|
|
39213
|
-
|
|
39214
|
-
|
|
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
|
+
};
|
|
39215
39951
|
|
|
39216
|
-
|
|
39217
|
-
|
|
39218
|
-
|
|
39219
|
-
|
|
39220
|
-
|
|
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";
|
|
39221
39961
|
|
|
39222
|
-
|
|
39223
|
-
|
|
39224
|
-
|
|
39225
|
-
|
|
39226
|
-
|
|
39227
|
-
|
|
39228
|
-
|
|
39229
|
-
|
|
39230
|
-
|
|
39231
|
-
|
|
39232
|
-
|
|
39233
|
-
|
|
39234
|
-
|
|
39235
|
-
|
|
39236
|
-
|
|
39237
|
-
|
|
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;
|
|
40005
|
+
|
|
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
|
+
});
|
|
39238
40024
|
}
|
|
39239
40025
|
|
|
39240
|
-
|
|
39241
|
-
|
|
39242
|
-
|
|
39243
|
-
|
|
39244
|
-
|
|
39245
|
-
|
|
39246
|
-
|
|
39247
|
-
draftState
|
|
39248
|
-
|
|
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
|
+
});
|
|
39249
40037
|
}
|
|
39250
|
-
|
|
39251
|
-
|
|
39252
|
-
|
|
39253
|
-
|
|
39254
|
-
|
|
39255
|
-
|
|
39256
|
-
|
|
39257
|
-
|
|
39258
|
-
|
|
39259
|
-
|
|
39260
|
-
|
|
39261
|
-
|
|
39262
|
-
let field = entry[1];
|
|
39263
|
-
let errors = computeErrors(fieldName, draftState);
|
|
39264
|
-
let dirty = field.dirty;
|
|
39265
|
-
draftState[fieldName].errors = errors;
|
|
39266
|
-
draftState[fieldName].dirty = dirty;
|
|
39267
|
-
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
|
+
});
|
|
39268
40050
|
}
|
|
39269
|
-
|
|
39270
|
-
|
|
39271
|
-
|
|
39272
|
-
|
|
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
|
+
};
|
|
39273
40065
|
};
|
|
39274
40066
|
|
|
39275
|
-
|
|
40067
|
+
var createMapDispatchToProps = function createMapDispatchToProps(formConfig) {
|
|
39276
40068
|
// Do memo-ization
|
|
39277
|
-
|
|
39278
|
-
|
|
39279
|
-
return dispatch
|
|
40069
|
+
var cachedDispatch;
|
|
40070
|
+
var cacheValue;
|
|
40071
|
+
return function (dispatch) {
|
|
39280
40072
|
if (dispatch == cachedDispatch) {
|
|
39281
40073
|
return cacheValue;
|
|
39282
40074
|
}
|
|
39283
|
-
|
|
40075
|
+
|
|
40076
|
+
var dispatchObj = {};
|
|
39284
40077
|
dispatchObj.fields = {};
|
|
39285
|
-
|
|
39286
|
-
|
|
40078
|
+
var keys = Object.keys(formConfig);
|
|
40079
|
+
|
|
40080
|
+
var _loop = function _loop() {
|
|
40081
|
+
var fieldName = _keys[_i5];
|
|
39287
40082
|
dispatchObj.fields[fieldName] = {
|
|
39288
|
-
set:
|
|
39289
|
-
|
|
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
|
+
}
|
|
39290
40095
|
};
|
|
40096
|
+
};
|
|
40097
|
+
|
|
40098
|
+
for (var _i5 = 0, _keys = keys; _i5 < _keys.length; _i5++) {
|
|
40099
|
+
_loop();
|
|
39291
40100
|
}
|
|
39292
|
-
|
|
40101
|
+
|
|
40102
|
+
dispatchObj.form = {
|
|
40103
|
+
clear: function clear() {
|
|
40104
|
+
return dispatch(_clear());
|
|
40105
|
+
}
|
|
40106
|
+
};
|
|
39293
40107
|
cachedDispatch = dispatch;
|
|
39294
|
-
cacheValue = {
|
|
40108
|
+
cacheValue = {
|
|
40109
|
+
actions: dispatchObj
|
|
40110
|
+
};
|
|
39295
40111
|
return cacheValue;
|
|
39296
40112
|
};
|
|
39297
40113
|
};
|
|
39298
40114
|
|
|
39299
|
-
|
|
40115
|
+
var mapStateToProps = function mapStateToProps(state) {
|
|
40116
|
+
return {
|
|
40117
|
+
fields: state
|
|
40118
|
+
};
|
|
40119
|
+
};
|
|
39300
40120
|
|
|
39301
|
-
|
|
39302
|
-
|
|
39303
|
-
|
|
39304
|
-
|
|
39305
|
-
|
|
40121
|
+
var createFormState = function createFormState(formConfig) {
|
|
40122
|
+
return {
|
|
40123
|
+
reducer: createFormReducer(formConfig),
|
|
40124
|
+
mapDispatchToProps: createMapDispatchToProps(formConfig),
|
|
40125
|
+
mapStateToProps: mapStateToProps
|
|
40126
|
+
};
|
|
40127
|
+
};
|
|
39306
40128
|
|
|
39307
40129
|
var AddressForm = function AddressForm(_ref) {
|
|
39308
40130
|
var _zipErrorMessages;
|
|
@@ -46913,7 +47735,9 @@ var Pagination = function Pagination(_ref3) {
|
|
|
46913
47735
|
var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$J);
|
|
46914
47736
|
|
|
46915
47737
|
var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
46916
|
-
var _ref$
|
|
47738
|
+
var _ref$isForwardButtonD = _ref.isForwardButtonDisabled,
|
|
47739
|
+
isForwardButtonDisabled = _ref$isForwardButtonD === void 0 ? false : _ref$isForwardButtonD,
|
|
47740
|
+
_ref$forwardButtonTex = _ref.forwardButtonText,
|
|
46917
47741
|
forwardButtonText = _ref$forwardButtonTex === void 0 ? "Next" : _ref$forwardButtonTex,
|
|
46918
47742
|
forwardButtonAction = _ref.forwardButtonAction,
|
|
46919
47743
|
forwardButtonLoading = _ref.forwardButtonLoading,
|
|
@@ -46955,14 +47779,16 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
46955
47779
|
text: redirectText,
|
|
46956
47780
|
variant: forwardButtonVariant,
|
|
46957
47781
|
extraStyles: isMobile && "flex-grow: 1",
|
|
46958
|
-
dataQa: redirectText
|
|
47782
|
+
dataQa: redirectText,
|
|
47783
|
+
disabled: isForwardButtonDisabled
|
|
46959
47784
|
}) : forwardButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46960
47785
|
text: forwardButtonText,
|
|
46961
47786
|
variant: forwardButtonVariant,
|
|
46962
47787
|
action: forwardButtonAction,
|
|
46963
47788
|
isLoading: forwardButtonLoading,
|
|
46964
47789
|
extraStyles: isMobile && "flex-grow: 1",
|
|
46965
|
-
dataQa: forwardButtonText
|
|
47790
|
+
dataQa: forwardButtonText,
|
|
47791
|
+
disabled: isForwardButtonDisabled
|
|
46966
47792
|
});
|
|
46967
47793
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
46968
47794
|
padding: "1.25rem 0"
|
|
@@ -47067,66 +47893,12 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
47067
47893
|
}));
|
|
47068
47894
|
};
|
|
47069
47895
|
|
|
47070
|
-
var LoadingDetails = function LoadingDetails() {
|
|
47071
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
47072
|
-
padding: "0",
|
|
47073
|
-
background: GRECIAN_GREY,
|
|
47074
|
-
borderRadius: "4px",
|
|
47075
|
-
minHeight: "196px"
|
|
47076
|
-
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
47077
|
-
minHeight: "196px",
|
|
47078
|
-
singleChild: true,
|
|
47079
|
-
fillCenter: true
|
|
47080
|
-
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
47081
|
-
intrinsic: true
|
|
47082
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
47083
|
-
padding: "0",
|
|
47084
|
-
extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
|
|
47085
|
-
}, /*#__PURE__*/React__default.createElement(Spinner$2, {
|
|
47086
|
-
size: "100",
|
|
47087
|
-
centerSpinner: true
|
|
47088
|
-
})))));
|
|
47089
|
-
};
|
|
47090
|
-
|
|
47091
|
-
var ErrorDetails = function ErrorDetails() {
|
|
47092
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
47093
|
-
padding: "0"
|
|
47094
|
-
}, /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
47095
|
-
variant: "error",
|
|
47096
|
-
heading: "Error Loading Payment",
|
|
47097
|
-
text: "Please go back and try again.",
|
|
47098
|
-
showQuitLink: false,
|
|
47099
|
-
noBorder: true,
|
|
47100
|
-
enableBoxShadow: true,
|
|
47101
|
-
enableSmallText: true,
|
|
47102
|
-
innerContentPadding: "0 16px",
|
|
47103
|
-
extraStyles: "min-height: 67px; height: 67px;"
|
|
47104
|
-
}));
|
|
47105
|
-
};
|
|
47106
|
-
|
|
47107
|
-
var getLoadingOrErrorContent = function getLoadingOrErrorContent() {
|
|
47108
|
-
var isLoading = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
47109
|
-
var isError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
47110
|
-
|
|
47111
|
-
if (isLoading) {
|
|
47112
|
-
return /*#__PURE__*/React__default.createElement(LoadingDetails, null);
|
|
47113
|
-
} else if (isError) {
|
|
47114
|
-
return /*#__PURE__*/React__default.createElement(ErrorDetails, null);
|
|
47115
|
-
}
|
|
47116
|
-
|
|
47117
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, null);
|
|
47118
|
-
};
|
|
47119
|
-
|
|
47120
47896
|
var Collapsible = function Collapsible(_ref2) {
|
|
47121
47897
|
var content = _ref2.content,
|
|
47122
47898
|
title = _ref2.title,
|
|
47123
47899
|
supportsTouch = _ref2.supportsTouch,
|
|
47124
47900
|
isOpen = _ref2.isOpen,
|
|
47125
|
-
setIsOpen = _ref2.setIsOpen
|
|
47126
|
-
_ref2$isLoading = _ref2.isLoading,
|
|
47127
|
-
isLoading = _ref2$isLoading === void 0 ? false : _ref2$isLoading,
|
|
47128
|
-
_ref2$isError = _ref2.isError,
|
|
47129
|
-
isError = _ref2$isError === void 0 ? false : _ref2$isError;
|
|
47901
|
+
setIsOpen = _ref2.setIsOpen;
|
|
47130
47902
|
return /*#__PURE__*/React__default.createElement(CollapsibleSection$1, {
|
|
47131
47903
|
isMobile: true,
|
|
47132
47904
|
supportsTouch: supportsTouch,
|
|
@@ -47149,17 +47921,13 @@ var Collapsible = function Collapsible(_ref2) {
|
|
|
47149
47921
|
},
|
|
47150
47922
|
positionTransition: true,
|
|
47151
47923
|
initial: "closed"
|
|
47152
|
-
},
|
|
47924
|
+
}, content));
|
|
47153
47925
|
};
|
|
47154
47926
|
|
|
47155
47927
|
var NonCollapsible = function NonCollapsible(_ref3) {
|
|
47156
47928
|
var title = _ref3.title,
|
|
47157
|
-
content = _ref3.content
|
|
47158
|
-
|
|
47159
|
-
isLoading = _ref3$isLoading === void 0 ? false : _ref3$isLoading,
|
|
47160
|
-
_ref3$isError = _ref3.isError,
|
|
47161
|
-
isError = _ref3$isError === void 0 ? false : _ref3$isError;
|
|
47162
|
-
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);
|
|
47163
47931
|
};
|
|
47164
47932
|
|
|
47165
47933
|
var PaymentDetails = function PaymentDetails(_ref4) {
|
|
@@ -47189,11 +47957,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47189
47957
|
_ref4$voidableAmountP = _ref4.voidableAmountPaid,
|
|
47190
47958
|
voidableAmountPaid = _ref4$voidableAmountP === void 0 ? 0 : _ref4$voidableAmountP,
|
|
47191
47959
|
_ref4$remainingBalanc = _ref4.remainingBalance,
|
|
47192
|
-
remainingBalance = _ref4$remainingBalanc === void 0 ? false : _ref4$remainingBalanc
|
|
47193
|
-
_ref4$isLoading = _ref4.isLoading,
|
|
47194
|
-
isLoading = _ref4$isLoading === void 0 ? false : _ref4$isLoading,
|
|
47195
|
-
_ref4$isError = _ref4.isError,
|
|
47196
|
-
isError = _ref4$isError === void 0 ? false : _ref4$isError;
|
|
47960
|
+
remainingBalance = _ref4$remainingBalanc === void 0 ? false : _ref4$remainingBalanc;
|
|
47197
47961
|
|
|
47198
47962
|
var _useState = React.useState(initiallyOpen),
|
|
47199
47963
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47296,14 +48060,10 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47296
48060
|
isOpen: isOpen,
|
|
47297
48061
|
setIsOpen: setIsOpen,
|
|
47298
48062
|
isMobile: isMobile,
|
|
47299
|
-
supportsTouch: supportsTouch
|
|
47300
|
-
isLoading: isLoading,
|
|
47301
|
-
isError: isError
|
|
48063
|
+
supportsTouch: supportsTouch
|
|
47302
48064
|
}) : /*#__PURE__*/React__default.createElement(NonCollapsible, {
|
|
47303
48065
|
title: title,
|
|
47304
|
-
content: content
|
|
47305
|
-
isLoading: isLoading,
|
|
47306
|
-
isError: isError
|
|
48066
|
+
content: content
|
|
47307
48067
|
});
|
|
47308
48068
|
};
|
|
47309
48069
|
|
|
@@ -47514,6 +48274,59 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47514
48274
|
})))));
|
|
47515
48275
|
};
|
|
47516
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
|
+
|
|
47517
48330
|
/*
|
|
47518
48331
|
Hook that takes an ID selector for an element on the screen
|
|
47519
48332
|
And optionally values for top position, left position, smooth behavior
|