stone-kit 0.0.460 → 0.0.462
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/{SortSelect-jmFctU4n.js → SortSelect-CMtsppe9.js} +46 -48
- package/dist/components/FormModal/ui/ModalForm.d.ts +2 -1
- package/dist/components/FormModal/ui/ModalForm.js +2346 -793
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +3 -5
- package/dist/components/TabSwitcher/index.js +1 -1
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +3 -5
- package/dist/components/ZoomControls/ui/ZoomControls.js +4 -6
- package/dist/main.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-D4uptQ6W.js +0 -1559
package/dist/index-D4uptQ6W.js
DELETED
|
@@ -1,1559 +0,0 @@
|
|
|
1
|
-
import { g as mt } from "./index-rKuIKazb.js";
|
|
2
|
-
import nt from "react";
|
|
3
|
-
import { r as rt } from "./Modal-C48pfGFo.js";
|
|
4
|
-
var Ie = { exports: {} }, ke = { exports: {} }, me = { exports: {} }, ye = { exports: {} }, W = {};
|
|
5
|
-
/** @license React v16.13.1
|
|
6
|
-
* react-is.production.min.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var Ne;
|
|
14
|
-
function yt() {
|
|
15
|
-
if (Ne)
|
|
16
|
-
return W;
|
|
17
|
-
Ne = 1;
|
|
18
|
-
var E = typeof Symbol == "function" && Symbol.for, m = E ? Symbol.for("react.element") : 60103, D = E ? Symbol.for("react.portal") : 60106, M = E ? Symbol.for("react.fragment") : 60107, R = E ? Symbol.for("react.strict_mode") : 60108, S = E ? Symbol.for("react.profiler") : 60114, F = E ? Symbol.for("react.provider") : 60109, T = E ? Symbol.for("react.context") : 60110, V = E ? Symbol.for("react.async_mode") : 60111, L = E ? Symbol.for("react.concurrent_mode") : 60111, x = E ? Symbol.for("react.forward_ref") : 60112, j = E ? Symbol.for("react.suspense") : 60113, X = E ? Symbol.for("react.suspense_list") : 60120, H = E ? Symbol.for("react.memo") : 60115, ne = E ? Symbol.for("react.lazy") : 60116, q = E ? Symbol.for("react.block") : 60121, K = E ? Symbol.for("react.fundamental") : 60117, re = E ? Symbol.for("react.responder") : 60118, le = E ? Symbol.for("react.scope") : 60119;
|
|
19
|
-
function G(r) {
|
|
20
|
-
if (typeof r == "object" && r !== null) {
|
|
21
|
-
var v = r.$$typeof;
|
|
22
|
-
switch (v) {
|
|
23
|
-
case m:
|
|
24
|
-
switch (r = r.type, r) {
|
|
25
|
-
case V:
|
|
26
|
-
case L:
|
|
27
|
-
case M:
|
|
28
|
-
case S:
|
|
29
|
-
case R:
|
|
30
|
-
case j:
|
|
31
|
-
return r;
|
|
32
|
-
default:
|
|
33
|
-
switch (r = r && r.$$typeof, r) {
|
|
34
|
-
case T:
|
|
35
|
-
case x:
|
|
36
|
-
case ne:
|
|
37
|
-
case H:
|
|
38
|
-
case F:
|
|
39
|
-
return r;
|
|
40
|
-
default:
|
|
41
|
-
return v;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
case D:
|
|
45
|
-
return v;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function Z(r) {
|
|
50
|
-
return G(r) === L;
|
|
51
|
-
}
|
|
52
|
-
return W.AsyncMode = V, W.ConcurrentMode = L, W.ContextConsumer = T, W.ContextProvider = F, W.Element = m, W.ForwardRef = x, W.Fragment = M, W.Lazy = ne, W.Memo = H, W.Portal = D, W.Profiler = S, W.StrictMode = R, W.Suspense = j, W.isAsyncMode = function(r) {
|
|
53
|
-
return Z(r) || G(r) === V;
|
|
54
|
-
}, W.isConcurrentMode = Z, W.isContextConsumer = function(r) {
|
|
55
|
-
return G(r) === T;
|
|
56
|
-
}, W.isContextProvider = function(r) {
|
|
57
|
-
return G(r) === F;
|
|
58
|
-
}, W.isElement = function(r) {
|
|
59
|
-
return typeof r == "object" && r !== null && r.$$typeof === m;
|
|
60
|
-
}, W.isForwardRef = function(r) {
|
|
61
|
-
return G(r) === x;
|
|
62
|
-
}, W.isFragment = function(r) {
|
|
63
|
-
return G(r) === M;
|
|
64
|
-
}, W.isLazy = function(r) {
|
|
65
|
-
return G(r) === ne;
|
|
66
|
-
}, W.isMemo = function(r) {
|
|
67
|
-
return G(r) === H;
|
|
68
|
-
}, W.isPortal = function(r) {
|
|
69
|
-
return G(r) === D;
|
|
70
|
-
}, W.isProfiler = function(r) {
|
|
71
|
-
return G(r) === S;
|
|
72
|
-
}, W.isStrictMode = function(r) {
|
|
73
|
-
return G(r) === R;
|
|
74
|
-
}, W.isSuspense = function(r) {
|
|
75
|
-
return G(r) === j;
|
|
76
|
-
}, W.isValidElementType = function(r) {
|
|
77
|
-
return typeof r == "string" || typeof r == "function" || r === M || r === L || r === S || r === R || r === j || r === X || typeof r == "object" && r !== null && (r.$$typeof === ne || r.$$typeof === H || r.$$typeof === F || r.$$typeof === T || r.$$typeof === x || r.$$typeof === K || r.$$typeof === re || r.$$typeof === le || r.$$typeof === q);
|
|
78
|
-
}, W.typeOf = G, W;
|
|
79
|
-
}
|
|
80
|
-
var B = {};
|
|
81
|
-
/** @license React v16.13.1
|
|
82
|
-
* react-is.development.js
|
|
83
|
-
*
|
|
84
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the MIT license found in the
|
|
87
|
-
* LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/
|
|
89
|
-
var We;
|
|
90
|
-
function Et() {
|
|
91
|
-
return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
|
|
92
|
-
var E = typeof Symbol == "function" && Symbol.for, m = E ? Symbol.for("react.element") : 60103, D = E ? Symbol.for("react.portal") : 60106, M = E ? Symbol.for("react.fragment") : 60107, R = E ? Symbol.for("react.strict_mode") : 60108, S = E ? Symbol.for("react.profiler") : 60114, F = E ? Symbol.for("react.provider") : 60109, T = E ? Symbol.for("react.context") : 60110, V = E ? Symbol.for("react.async_mode") : 60111, L = E ? Symbol.for("react.concurrent_mode") : 60111, x = E ? Symbol.for("react.forward_ref") : 60112, j = E ? Symbol.for("react.suspense") : 60113, X = E ? Symbol.for("react.suspense_list") : 60120, H = E ? Symbol.for("react.memo") : 60115, ne = E ? Symbol.for("react.lazy") : 60116, q = E ? Symbol.for("react.block") : 60121, K = E ? Symbol.for("react.fundamental") : 60117, re = E ? Symbol.for("react.responder") : 60118, le = E ? Symbol.for("react.scope") : 60119;
|
|
93
|
-
function G(i) {
|
|
94
|
-
return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
95
|
-
i === M || i === L || i === S || i === R || i === j || i === X || typeof i == "object" && i !== null && (i.$$typeof === ne || i.$$typeof === H || i.$$typeof === F || i.$$typeof === T || i.$$typeof === x || i.$$typeof === K || i.$$typeof === re || i.$$typeof === le || i.$$typeof === q);
|
|
96
|
-
}
|
|
97
|
-
function Z(i) {
|
|
98
|
-
if (typeof i == "object" && i !== null) {
|
|
99
|
-
var b = i.$$typeof;
|
|
100
|
-
switch (b) {
|
|
101
|
-
case m:
|
|
102
|
-
var k = i.type;
|
|
103
|
-
switch (k) {
|
|
104
|
-
case V:
|
|
105
|
-
case L:
|
|
106
|
-
case M:
|
|
107
|
-
case S:
|
|
108
|
-
case R:
|
|
109
|
-
case j:
|
|
110
|
-
return k;
|
|
111
|
-
default:
|
|
112
|
-
var O = k && k.$$typeof;
|
|
113
|
-
switch (O) {
|
|
114
|
-
case T:
|
|
115
|
-
case x:
|
|
116
|
-
case ne:
|
|
117
|
-
case H:
|
|
118
|
-
case F:
|
|
119
|
-
return O;
|
|
120
|
-
default:
|
|
121
|
-
return b;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
case D:
|
|
125
|
-
return b;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
var r = V, v = L, l = T, f = F, d = m, P = x, _ = M, A = ne, U = H, $ = D, w = S, y = R, I = j, Y = !1;
|
|
130
|
-
function te(i) {
|
|
131
|
-
return Y || (Y = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), u(i) || Z(i) === V;
|
|
132
|
-
}
|
|
133
|
-
function u(i) {
|
|
134
|
-
return Z(i) === L;
|
|
135
|
-
}
|
|
136
|
-
function c(i) {
|
|
137
|
-
return Z(i) === T;
|
|
138
|
-
}
|
|
139
|
-
function a(i) {
|
|
140
|
-
return Z(i) === F;
|
|
141
|
-
}
|
|
142
|
-
function t(i) {
|
|
143
|
-
return typeof i == "object" && i !== null && i.$$typeof === m;
|
|
144
|
-
}
|
|
145
|
-
function e(i) {
|
|
146
|
-
return Z(i) === x;
|
|
147
|
-
}
|
|
148
|
-
function n(i) {
|
|
149
|
-
return Z(i) === M;
|
|
150
|
-
}
|
|
151
|
-
function o(i) {
|
|
152
|
-
return Z(i) === ne;
|
|
153
|
-
}
|
|
154
|
-
function s(i) {
|
|
155
|
-
return Z(i) === H;
|
|
156
|
-
}
|
|
157
|
-
function g(i) {
|
|
158
|
-
return Z(i) === D;
|
|
159
|
-
}
|
|
160
|
-
function p(i) {
|
|
161
|
-
return Z(i) === S;
|
|
162
|
-
}
|
|
163
|
-
function h(i) {
|
|
164
|
-
return Z(i) === R;
|
|
165
|
-
}
|
|
166
|
-
function C(i) {
|
|
167
|
-
return Z(i) === j;
|
|
168
|
-
}
|
|
169
|
-
B.AsyncMode = r, B.ConcurrentMode = v, B.ContextConsumer = l, B.ContextProvider = f, B.Element = d, B.ForwardRef = P, B.Fragment = _, B.Lazy = A, B.Memo = U, B.Portal = $, B.Profiler = w, B.StrictMode = y, B.Suspense = I, B.isAsyncMode = te, B.isConcurrentMode = u, B.isContextConsumer = c, B.isContextProvider = a, B.isElement = t, B.isForwardRef = e, B.isFragment = n, B.isLazy = o, B.isMemo = s, B.isPortal = g, B.isProfiler = p, B.isStrictMode = h, B.isSuspense = C, B.isValidElementType = G, B.typeOf = Z;
|
|
170
|
-
}()), B;
|
|
171
|
-
}
|
|
172
|
-
var Be;
|
|
173
|
-
function at() {
|
|
174
|
-
return Be || (Be = 1, process.env.NODE_ENV === "production" ? ye.exports = yt() : ye.exports = Et()), ye.exports;
|
|
175
|
-
}
|
|
176
|
-
/*
|
|
177
|
-
object-assign
|
|
178
|
-
(c) Sindre Sorhus
|
|
179
|
-
@license MIT
|
|
180
|
-
*/
|
|
181
|
-
var Oe, Ue;
|
|
182
|
-
function bt() {
|
|
183
|
-
if (Ue)
|
|
184
|
-
return Oe;
|
|
185
|
-
Ue = 1;
|
|
186
|
-
var E = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, D = Object.prototype.propertyIsEnumerable;
|
|
187
|
-
function M(S) {
|
|
188
|
-
if (S == null)
|
|
189
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
190
|
-
return Object(S);
|
|
191
|
-
}
|
|
192
|
-
function R() {
|
|
193
|
-
try {
|
|
194
|
-
if (!Object.assign)
|
|
195
|
-
return !1;
|
|
196
|
-
var S = new String("abc");
|
|
197
|
-
if (S[5] = "de", Object.getOwnPropertyNames(S)[0] === "5")
|
|
198
|
-
return !1;
|
|
199
|
-
for (var F = {}, T = 0; T < 10; T++)
|
|
200
|
-
F["_" + String.fromCharCode(T)] = T;
|
|
201
|
-
var V = Object.getOwnPropertyNames(F).map(function(x) {
|
|
202
|
-
return F[x];
|
|
203
|
-
});
|
|
204
|
-
if (V.join("") !== "0123456789")
|
|
205
|
-
return !1;
|
|
206
|
-
var L = {};
|
|
207
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(x) {
|
|
208
|
-
L[x] = x;
|
|
209
|
-
}), Object.keys(Object.assign({}, L)).join("") === "abcdefghijklmnopqrst";
|
|
210
|
-
} catch {
|
|
211
|
-
return !1;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return Oe = R() ? Object.assign : function(S, F) {
|
|
215
|
-
for (var T, V = M(S), L, x = 1; x < arguments.length; x++) {
|
|
216
|
-
T = Object(arguments[x]);
|
|
217
|
-
for (var j in T)
|
|
218
|
-
m.call(T, j) && (V[j] = T[j]);
|
|
219
|
-
if (E) {
|
|
220
|
-
L = E(T);
|
|
221
|
-
for (var X = 0; X < L.length; X++)
|
|
222
|
-
D.call(T, L[X]) && (V[L[X]] = T[L[X]]);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return V;
|
|
226
|
-
}, Oe;
|
|
227
|
-
}
|
|
228
|
-
var Ce, ze;
|
|
229
|
-
function Le() {
|
|
230
|
-
if (ze)
|
|
231
|
-
return Ce;
|
|
232
|
-
ze = 1;
|
|
233
|
-
var E = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
234
|
-
return Ce = E, Ce;
|
|
235
|
-
}
|
|
236
|
-
var Te, Xe;
|
|
237
|
-
function it() {
|
|
238
|
-
return Xe || (Xe = 1, Te = Function.call.bind(Object.prototype.hasOwnProperty)), Te;
|
|
239
|
-
}
|
|
240
|
-
var we, He;
|
|
241
|
-
function Pt() {
|
|
242
|
-
if (He)
|
|
243
|
-
return we;
|
|
244
|
-
He = 1;
|
|
245
|
-
var E = function() {
|
|
246
|
-
};
|
|
247
|
-
if (process.env.NODE_ENV !== "production") {
|
|
248
|
-
var m = Le(), D = {}, M = it();
|
|
249
|
-
E = function(S) {
|
|
250
|
-
var F = "Warning: " + S;
|
|
251
|
-
typeof console < "u" && console.error(F);
|
|
252
|
-
try {
|
|
253
|
-
throw new Error(F);
|
|
254
|
-
} catch {
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
function R(S, F, T, V, L) {
|
|
259
|
-
if (process.env.NODE_ENV !== "production") {
|
|
260
|
-
for (var x in S)
|
|
261
|
-
if (M(S, x)) {
|
|
262
|
-
var j;
|
|
263
|
-
try {
|
|
264
|
-
if (typeof S[x] != "function") {
|
|
265
|
-
var X = Error(
|
|
266
|
-
(V || "React class") + ": " + T + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof S[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
267
|
-
);
|
|
268
|
-
throw X.name = "Invariant Violation", X;
|
|
269
|
-
}
|
|
270
|
-
j = S[x](F, x, V, T, null, m);
|
|
271
|
-
} catch (ne) {
|
|
272
|
-
j = ne;
|
|
273
|
-
}
|
|
274
|
-
if (j && !(j instanceof Error) && E(
|
|
275
|
-
(V || "React class") + ": type specification of " + T + " `" + x + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof j + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
276
|
-
), j instanceof Error && !(j.message in D)) {
|
|
277
|
-
D[j.message] = !0;
|
|
278
|
-
var H = L ? L() : "";
|
|
279
|
-
E(
|
|
280
|
-
"Failed " + T + " type: " + j.message + (H ?? "")
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
return R.resetWarningCache = function() {
|
|
287
|
-
process.env.NODE_ENV !== "production" && (D = {});
|
|
288
|
-
}, we = R, we;
|
|
289
|
-
}
|
|
290
|
-
var Re, Ze;
|
|
291
|
-
function St() {
|
|
292
|
-
if (Ze)
|
|
293
|
-
return Re;
|
|
294
|
-
Ze = 1;
|
|
295
|
-
var E = at(), m = bt(), D = Le(), M = it(), R = Pt(), S = function() {
|
|
296
|
-
};
|
|
297
|
-
process.env.NODE_ENV !== "production" && (S = function(T) {
|
|
298
|
-
var V = "Warning: " + T;
|
|
299
|
-
typeof console < "u" && console.error(V);
|
|
300
|
-
try {
|
|
301
|
-
throw new Error(V);
|
|
302
|
-
} catch {
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
function F() {
|
|
306
|
-
return null;
|
|
307
|
-
}
|
|
308
|
-
return Re = function(T, V) {
|
|
309
|
-
var L = typeof Symbol == "function" && Symbol.iterator, x = "@@iterator";
|
|
310
|
-
function j(u) {
|
|
311
|
-
var c = u && (L && u[L] || u[x]);
|
|
312
|
-
if (typeof c == "function")
|
|
313
|
-
return c;
|
|
314
|
-
}
|
|
315
|
-
var X = "<<anonymous>>", H = {
|
|
316
|
-
array: re("array"),
|
|
317
|
-
bigint: re("bigint"),
|
|
318
|
-
bool: re("boolean"),
|
|
319
|
-
func: re("function"),
|
|
320
|
-
number: re("number"),
|
|
321
|
-
object: re("object"),
|
|
322
|
-
string: re("string"),
|
|
323
|
-
symbol: re("symbol"),
|
|
324
|
-
any: le(),
|
|
325
|
-
arrayOf: G,
|
|
326
|
-
element: Z(),
|
|
327
|
-
elementType: r(),
|
|
328
|
-
instanceOf: v,
|
|
329
|
-
node: P(),
|
|
330
|
-
objectOf: f,
|
|
331
|
-
oneOf: l,
|
|
332
|
-
oneOfType: d,
|
|
333
|
-
shape: A,
|
|
334
|
-
exact: U
|
|
335
|
-
};
|
|
336
|
-
function ne(u, c) {
|
|
337
|
-
return u === c ? u !== 0 || 1 / u === 1 / c : u !== u && c !== c;
|
|
338
|
-
}
|
|
339
|
-
function q(u, c) {
|
|
340
|
-
this.message = u, this.data = c && typeof c == "object" ? c : {}, this.stack = "";
|
|
341
|
-
}
|
|
342
|
-
q.prototype = Error.prototype;
|
|
343
|
-
function K(u) {
|
|
344
|
-
if (process.env.NODE_ENV !== "production")
|
|
345
|
-
var c = {}, a = 0;
|
|
346
|
-
function t(n, o, s, g, p, h, C) {
|
|
347
|
-
if (g = g || X, h = h || s, C !== D) {
|
|
348
|
-
if (V) {
|
|
349
|
-
var i = new Error(
|
|
350
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
351
|
-
);
|
|
352
|
-
throw i.name = "Invariant Violation", i;
|
|
353
|
-
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
354
|
-
var b = g + ":" + s;
|
|
355
|
-
!c[b] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
356
|
-
a < 3 && (S(
|
|
357
|
-
"You are manually calling a React.PropTypes validation function for the `" + h + "` prop on `" + g + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
358
|
-
), c[b] = !0, a++);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return o[s] == null ? n ? o[s] === null ? new q("The " + p + " `" + h + "` is marked as required " + ("in `" + g + "`, but its value is `null`.")) : new q("The " + p + " `" + h + "` is marked as required in " + ("`" + g + "`, but its value is `undefined`.")) : null : u(o, s, g, p, h);
|
|
362
|
-
}
|
|
363
|
-
var e = t.bind(null, !1);
|
|
364
|
-
return e.isRequired = t.bind(null, !0), e;
|
|
365
|
-
}
|
|
366
|
-
function re(u) {
|
|
367
|
-
function c(a, t, e, n, o, s) {
|
|
368
|
-
var g = a[t], p = y(g);
|
|
369
|
-
if (p !== u) {
|
|
370
|
-
var h = I(g);
|
|
371
|
-
return new q(
|
|
372
|
-
"Invalid " + n + " `" + o + "` of type " + ("`" + h + "` supplied to `" + e + "`, expected ") + ("`" + u + "`."),
|
|
373
|
-
{ expectedType: u }
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
return null;
|
|
377
|
-
}
|
|
378
|
-
return K(c);
|
|
379
|
-
}
|
|
380
|
-
function le() {
|
|
381
|
-
return K(F);
|
|
382
|
-
}
|
|
383
|
-
function G(u) {
|
|
384
|
-
function c(a, t, e, n, o) {
|
|
385
|
-
if (typeof u != "function")
|
|
386
|
-
return new q("Property `" + o + "` of component `" + e + "` has invalid PropType notation inside arrayOf.");
|
|
387
|
-
var s = a[t];
|
|
388
|
-
if (!Array.isArray(s)) {
|
|
389
|
-
var g = y(s);
|
|
390
|
-
return new q("Invalid " + n + " `" + o + "` of type " + ("`" + g + "` supplied to `" + e + "`, expected an array."));
|
|
391
|
-
}
|
|
392
|
-
for (var p = 0; p < s.length; p++) {
|
|
393
|
-
var h = u(s, p, e, n, o + "[" + p + "]", D);
|
|
394
|
-
if (h instanceof Error)
|
|
395
|
-
return h;
|
|
396
|
-
}
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
|
-
return K(c);
|
|
400
|
-
}
|
|
401
|
-
function Z() {
|
|
402
|
-
function u(c, a, t, e, n) {
|
|
403
|
-
var o = c[a];
|
|
404
|
-
if (!T(o)) {
|
|
405
|
-
var s = y(o);
|
|
406
|
-
return new q("Invalid " + e + " `" + n + "` of type " + ("`" + s + "` supplied to `" + t + "`, expected a single ReactElement."));
|
|
407
|
-
}
|
|
408
|
-
return null;
|
|
409
|
-
}
|
|
410
|
-
return K(u);
|
|
411
|
-
}
|
|
412
|
-
function r() {
|
|
413
|
-
function u(c, a, t, e, n) {
|
|
414
|
-
var o = c[a];
|
|
415
|
-
if (!E.isValidElementType(o)) {
|
|
416
|
-
var s = y(o);
|
|
417
|
-
return new q("Invalid " + e + " `" + n + "` of type " + ("`" + s + "` supplied to `" + t + "`, expected a single ReactElement type."));
|
|
418
|
-
}
|
|
419
|
-
return null;
|
|
420
|
-
}
|
|
421
|
-
return K(u);
|
|
422
|
-
}
|
|
423
|
-
function v(u) {
|
|
424
|
-
function c(a, t, e, n, o) {
|
|
425
|
-
if (!(a[t] instanceof u)) {
|
|
426
|
-
var s = u.name || X, g = te(a[t]);
|
|
427
|
-
return new q("Invalid " + n + " `" + o + "` of type " + ("`" + g + "` supplied to `" + e + "`, expected ") + ("instance of `" + s + "`."));
|
|
428
|
-
}
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
return K(c);
|
|
432
|
-
}
|
|
433
|
-
function l(u) {
|
|
434
|
-
if (!Array.isArray(u))
|
|
435
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? S(
|
|
436
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
437
|
-
) : S("Invalid argument supplied to oneOf, expected an array.")), F;
|
|
438
|
-
function c(a, t, e, n, o) {
|
|
439
|
-
for (var s = a[t], g = 0; g < u.length; g++)
|
|
440
|
-
if (ne(s, u[g]))
|
|
441
|
-
return null;
|
|
442
|
-
var p = JSON.stringify(u, function(C, i) {
|
|
443
|
-
var b = I(i);
|
|
444
|
-
return b === "symbol" ? String(i) : i;
|
|
445
|
-
});
|
|
446
|
-
return new q("Invalid " + n + " `" + o + "` of value `" + String(s) + "` " + ("supplied to `" + e + "`, expected one of " + p + "."));
|
|
447
|
-
}
|
|
448
|
-
return K(c);
|
|
449
|
-
}
|
|
450
|
-
function f(u) {
|
|
451
|
-
function c(a, t, e, n, o) {
|
|
452
|
-
if (typeof u != "function")
|
|
453
|
-
return new q("Property `" + o + "` of component `" + e + "` has invalid PropType notation inside objectOf.");
|
|
454
|
-
var s = a[t], g = y(s);
|
|
455
|
-
if (g !== "object")
|
|
456
|
-
return new q("Invalid " + n + " `" + o + "` of type " + ("`" + g + "` supplied to `" + e + "`, expected an object."));
|
|
457
|
-
for (var p in s)
|
|
458
|
-
if (M(s, p)) {
|
|
459
|
-
var h = u(s, p, e, n, o + "." + p, D);
|
|
460
|
-
if (h instanceof Error)
|
|
461
|
-
return h;
|
|
462
|
-
}
|
|
463
|
-
return null;
|
|
464
|
-
}
|
|
465
|
-
return K(c);
|
|
466
|
-
}
|
|
467
|
-
function d(u) {
|
|
468
|
-
if (!Array.isArray(u))
|
|
469
|
-
return process.env.NODE_ENV !== "production" && S("Invalid argument supplied to oneOfType, expected an instance of array."), F;
|
|
470
|
-
for (var c = 0; c < u.length; c++) {
|
|
471
|
-
var a = u[c];
|
|
472
|
-
if (typeof a != "function")
|
|
473
|
-
return S(
|
|
474
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Y(a) + " at index " + c + "."
|
|
475
|
-
), F;
|
|
476
|
-
}
|
|
477
|
-
function t(e, n, o, s, g) {
|
|
478
|
-
for (var p = [], h = 0; h < u.length; h++) {
|
|
479
|
-
var C = u[h], i = C(e, n, o, s, g, D);
|
|
480
|
-
if (i == null)
|
|
481
|
-
return null;
|
|
482
|
-
i.data && M(i.data, "expectedType") && p.push(i.data.expectedType);
|
|
483
|
-
}
|
|
484
|
-
var b = p.length > 0 ? ", expected one of type [" + p.join(", ") + "]" : "";
|
|
485
|
-
return new q("Invalid " + s + " `" + g + "` supplied to " + ("`" + o + "`" + b + "."));
|
|
486
|
-
}
|
|
487
|
-
return K(t);
|
|
488
|
-
}
|
|
489
|
-
function P() {
|
|
490
|
-
function u(c, a, t, e, n) {
|
|
491
|
-
return $(c[a]) ? null : new q("Invalid " + e + " `" + n + "` supplied to " + ("`" + t + "`, expected a ReactNode."));
|
|
492
|
-
}
|
|
493
|
-
return K(u);
|
|
494
|
-
}
|
|
495
|
-
function _(u, c, a, t, e) {
|
|
496
|
-
return new q(
|
|
497
|
-
(u || "React class") + ": " + c + " type `" + a + "." + t + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + e + "`."
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
function A(u) {
|
|
501
|
-
function c(a, t, e, n, o) {
|
|
502
|
-
var s = a[t], g = y(s);
|
|
503
|
-
if (g !== "object")
|
|
504
|
-
return new q("Invalid " + n + " `" + o + "` of type `" + g + "` " + ("supplied to `" + e + "`, expected `object`."));
|
|
505
|
-
for (var p in u) {
|
|
506
|
-
var h = u[p];
|
|
507
|
-
if (typeof h != "function")
|
|
508
|
-
return _(e, n, o, p, I(h));
|
|
509
|
-
var C = h(s, p, e, n, o + "." + p, D);
|
|
510
|
-
if (C)
|
|
511
|
-
return C;
|
|
512
|
-
}
|
|
513
|
-
return null;
|
|
514
|
-
}
|
|
515
|
-
return K(c);
|
|
516
|
-
}
|
|
517
|
-
function U(u) {
|
|
518
|
-
function c(a, t, e, n, o) {
|
|
519
|
-
var s = a[t], g = y(s);
|
|
520
|
-
if (g !== "object")
|
|
521
|
-
return new q("Invalid " + n + " `" + o + "` of type `" + g + "` " + ("supplied to `" + e + "`, expected `object`."));
|
|
522
|
-
var p = m({}, a[t], u);
|
|
523
|
-
for (var h in p) {
|
|
524
|
-
var C = u[h];
|
|
525
|
-
if (M(u, h) && typeof C != "function")
|
|
526
|
-
return _(e, n, o, h, I(C));
|
|
527
|
-
if (!C)
|
|
528
|
-
return new q(
|
|
529
|
-
"Invalid " + n + " `" + o + "` key `" + h + "` supplied to `" + e + "`.\nBad object: " + JSON.stringify(a[t], null, " ") + `
|
|
530
|
-
Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
531
|
-
);
|
|
532
|
-
var i = C(s, h, e, n, o + "." + h, D);
|
|
533
|
-
if (i)
|
|
534
|
-
return i;
|
|
535
|
-
}
|
|
536
|
-
return null;
|
|
537
|
-
}
|
|
538
|
-
return K(c);
|
|
539
|
-
}
|
|
540
|
-
function $(u) {
|
|
541
|
-
switch (typeof u) {
|
|
542
|
-
case "number":
|
|
543
|
-
case "string":
|
|
544
|
-
case "undefined":
|
|
545
|
-
return !0;
|
|
546
|
-
case "boolean":
|
|
547
|
-
return !u;
|
|
548
|
-
case "object":
|
|
549
|
-
if (Array.isArray(u))
|
|
550
|
-
return u.every($);
|
|
551
|
-
if (u === null || T(u))
|
|
552
|
-
return !0;
|
|
553
|
-
var c = j(u);
|
|
554
|
-
if (c) {
|
|
555
|
-
var a = c.call(u), t;
|
|
556
|
-
if (c !== u.entries) {
|
|
557
|
-
for (; !(t = a.next()).done; )
|
|
558
|
-
if (!$(t.value))
|
|
559
|
-
return !1;
|
|
560
|
-
} else
|
|
561
|
-
for (; !(t = a.next()).done; ) {
|
|
562
|
-
var e = t.value;
|
|
563
|
-
if (e && !$(e[1]))
|
|
564
|
-
return !1;
|
|
565
|
-
}
|
|
566
|
-
} else
|
|
567
|
-
return !1;
|
|
568
|
-
return !0;
|
|
569
|
-
default:
|
|
570
|
-
return !1;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
function w(u, c) {
|
|
574
|
-
return u === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1;
|
|
575
|
-
}
|
|
576
|
-
function y(u) {
|
|
577
|
-
var c = typeof u;
|
|
578
|
-
return Array.isArray(u) ? "array" : u instanceof RegExp ? "object" : w(c, u) ? "symbol" : c;
|
|
579
|
-
}
|
|
580
|
-
function I(u) {
|
|
581
|
-
if (typeof u > "u" || u === null)
|
|
582
|
-
return "" + u;
|
|
583
|
-
var c = y(u);
|
|
584
|
-
if (c === "object") {
|
|
585
|
-
if (u instanceof Date)
|
|
586
|
-
return "date";
|
|
587
|
-
if (u instanceof RegExp)
|
|
588
|
-
return "regexp";
|
|
589
|
-
}
|
|
590
|
-
return c;
|
|
591
|
-
}
|
|
592
|
-
function Y(u) {
|
|
593
|
-
var c = I(u);
|
|
594
|
-
switch (c) {
|
|
595
|
-
case "array":
|
|
596
|
-
case "object":
|
|
597
|
-
return "an " + c;
|
|
598
|
-
case "boolean":
|
|
599
|
-
case "date":
|
|
600
|
-
case "regexp":
|
|
601
|
-
return "a " + c;
|
|
602
|
-
default:
|
|
603
|
-
return c;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
function te(u) {
|
|
607
|
-
return !u.constructor || !u.constructor.name ? X : u.constructor.name;
|
|
608
|
-
}
|
|
609
|
-
return H.checkPropTypes = R, H.resetWarningCache = R.resetWarningCache, H.PropTypes = H, H;
|
|
610
|
-
}, Re;
|
|
611
|
-
}
|
|
612
|
-
var _e, Je;
|
|
613
|
-
function kt() {
|
|
614
|
-
if (Je)
|
|
615
|
-
return _e;
|
|
616
|
-
Je = 1;
|
|
617
|
-
var E = Le();
|
|
618
|
-
function m() {
|
|
619
|
-
}
|
|
620
|
-
function D() {
|
|
621
|
-
}
|
|
622
|
-
return D.resetWarningCache = m, _e = function() {
|
|
623
|
-
function M(F, T, V, L, x, j) {
|
|
624
|
-
if (j !== E) {
|
|
625
|
-
var X = new Error(
|
|
626
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
627
|
-
);
|
|
628
|
-
throw X.name = "Invariant Violation", X;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
M.isRequired = M;
|
|
632
|
-
function R() {
|
|
633
|
-
return M;
|
|
634
|
-
}
|
|
635
|
-
var S = {
|
|
636
|
-
array: M,
|
|
637
|
-
bigint: M,
|
|
638
|
-
bool: M,
|
|
639
|
-
func: M,
|
|
640
|
-
number: M,
|
|
641
|
-
object: M,
|
|
642
|
-
string: M,
|
|
643
|
-
symbol: M,
|
|
644
|
-
any: M,
|
|
645
|
-
arrayOf: R,
|
|
646
|
-
element: M,
|
|
647
|
-
elementType: M,
|
|
648
|
-
instanceOf: R,
|
|
649
|
-
node: M,
|
|
650
|
-
objectOf: R,
|
|
651
|
-
oneOf: R,
|
|
652
|
-
oneOfType: R,
|
|
653
|
-
shape: R,
|
|
654
|
-
exact: R,
|
|
655
|
-
checkPropTypes: D,
|
|
656
|
-
resetWarningCache: m
|
|
657
|
-
};
|
|
658
|
-
return S.PropTypes = S, S;
|
|
659
|
-
}, _e;
|
|
660
|
-
}
|
|
661
|
-
var Ke;
|
|
662
|
-
function ot() {
|
|
663
|
-
if (Ke)
|
|
664
|
-
return me.exports;
|
|
665
|
-
if (Ke = 1, process.env.NODE_ENV !== "production") {
|
|
666
|
-
var E = at(), m = !0;
|
|
667
|
-
me.exports = St()(E.isElement, m);
|
|
668
|
-
} else
|
|
669
|
-
me.exports = kt()();
|
|
670
|
-
return me.exports;
|
|
671
|
-
}
|
|
672
|
-
var xe, Ge;
|
|
673
|
-
function ut() {
|
|
674
|
-
if (Ge)
|
|
675
|
-
return xe;
|
|
676
|
-
Ge = 1;
|
|
677
|
-
var E = function(m, D, M, R, S, F, T, V) {
|
|
678
|
-
if (process.env.NODE_ENV !== "production" && D === void 0)
|
|
679
|
-
throw new Error("invariant requires an error message argument");
|
|
680
|
-
if (!m) {
|
|
681
|
-
var L;
|
|
682
|
-
if (D === void 0)
|
|
683
|
-
L = new Error(
|
|
684
|
-
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
685
|
-
);
|
|
686
|
-
else {
|
|
687
|
-
var x = [M, R, S, F, T, V], j = 0;
|
|
688
|
-
L = new Error(
|
|
689
|
-
D.replace(/%s/g, function() {
|
|
690
|
-
return x[j++];
|
|
691
|
-
})
|
|
692
|
-
), L.name = "Invariant Violation";
|
|
693
|
-
}
|
|
694
|
-
throw L.framesToPop = 1, L;
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
return xe = E, xe;
|
|
698
|
-
}
|
|
699
|
-
var Me, Qe;
|
|
700
|
-
function st() {
|
|
701
|
-
if (Qe)
|
|
702
|
-
return Me;
|
|
703
|
-
Qe = 1;
|
|
704
|
-
var E = process.env.NODE_ENV !== "production", m = function() {
|
|
705
|
-
};
|
|
706
|
-
if (E) {
|
|
707
|
-
var D = function(R, S) {
|
|
708
|
-
var F = arguments.length;
|
|
709
|
-
S = new Array(F > 1 ? F - 1 : 0);
|
|
710
|
-
for (var T = 1; T < F; T++)
|
|
711
|
-
S[T - 1] = arguments[T];
|
|
712
|
-
var V = 0, L = "Warning: " + R.replace(/%s/g, function() {
|
|
713
|
-
return S[V++];
|
|
714
|
-
});
|
|
715
|
-
typeof console < "u" && console.error(L);
|
|
716
|
-
try {
|
|
717
|
-
throw new Error(L);
|
|
718
|
-
} catch {
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
m = function(M, R, S) {
|
|
722
|
-
var F = arguments.length;
|
|
723
|
-
S = new Array(F > 2 ? F - 2 : 0);
|
|
724
|
-
for (var T = 2; T < F; T++)
|
|
725
|
-
S[T - 2] = arguments[T];
|
|
726
|
-
if (R === void 0)
|
|
727
|
-
throw new Error(
|
|
728
|
-
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
729
|
-
);
|
|
730
|
-
M || D.apply(null, [R].concat(S));
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
return Me = m, Me;
|
|
734
|
-
}
|
|
735
|
-
var et;
|
|
736
|
-
function Ot() {
|
|
737
|
-
if (et)
|
|
738
|
-
return ke.exports;
|
|
739
|
-
et = 1;
|
|
740
|
-
function E(r) {
|
|
741
|
-
return r && typeof r == "object" && "default" in r ? r.default : r;
|
|
742
|
-
}
|
|
743
|
-
var m = nt, D = E(m), M = rt;
|
|
744
|
-
ot();
|
|
745
|
-
var R = E(ut());
|
|
746
|
-
function S() {
|
|
747
|
-
return (S = Object.assign || function(r) {
|
|
748
|
-
for (var v = 1; v < arguments.length; v++) {
|
|
749
|
-
var l = arguments[v];
|
|
750
|
-
for (var f in l)
|
|
751
|
-
Object.prototype.hasOwnProperty.call(l, f) && (r[f] = l[f]);
|
|
752
|
-
}
|
|
753
|
-
return r;
|
|
754
|
-
}).apply(this, arguments);
|
|
755
|
-
}
|
|
756
|
-
function F(r, v) {
|
|
757
|
-
r.prototype = Object.create(v.prototype), r.prototype.constructor = r, function(l, f) {
|
|
758
|
-
for (var d = Object.getOwnPropertyNames(f), P = 0; P < d.length; P++) {
|
|
759
|
-
var _ = d[P], A = Object.getOwnPropertyDescriptor(f, _);
|
|
760
|
-
A && A.configurable && l[_] === void 0 && Object.defineProperty(l, _, A);
|
|
761
|
-
}
|
|
762
|
-
}(r, v);
|
|
763
|
-
}
|
|
764
|
-
function T(r, v) {
|
|
765
|
-
if (r == null)
|
|
766
|
-
return {};
|
|
767
|
-
var l, f, d = {}, P = Object.keys(r);
|
|
768
|
-
for (f = 0; f < P.length; f++)
|
|
769
|
-
l = P[f], v.indexOf(l) >= 0 || (d[l] = r[l]);
|
|
770
|
-
return d;
|
|
771
|
-
}
|
|
772
|
-
function V(r) {
|
|
773
|
-
return requestAnimationFrame(r);
|
|
774
|
-
}
|
|
775
|
-
function L(r) {
|
|
776
|
-
cancelAnimationFrame(r);
|
|
777
|
-
}
|
|
778
|
-
function x(r) {
|
|
779
|
-
var v = r.ownerDocument;
|
|
780
|
-
return v.hasFocus() && v.activeElement === r;
|
|
781
|
-
}
|
|
782
|
-
function j(r) {
|
|
783
|
-
return r == null ? void 0 : r.ownerDocument;
|
|
784
|
-
}
|
|
785
|
-
function X(r) {
|
|
786
|
-
var v = function(l) {
|
|
787
|
-
var f;
|
|
788
|
-
return (f = j(l)) == null ? void 0 : f.defaultView;
|
|
789
|
-
}(r);
|
|
790
|
-
return !!v && r instanceof v.HTMLElement;
|
|
791
|
-
}
|
|
792
|
-
function H(r) {
|
|
793
|
-
return m.useCallback(function() {
|
|
794
|
-
var v = r.current, l = typeof window < "u" && X(v);
|
|
795
|
-
if (!v || !l)
|
|
796
|
-
return null;
|
|
797
|
-
if (v.nodeName !== "INPUT" && (v = v.querySelector("input")), !v)
|
|
798
|
-
throw new Error("react-input-mask: inputComponent doesn't contain input node");
|
|
799
|
-
return v;
|
|
800
|
-
}, [r]);
|
|
801
|
-
}
|
|
802
|
-
function ne(r, v) {
|
|
803
|
-
var l, f, d, P, _ = m.useRef({ start: null, end: null }), A = H(r), U = m.useCallback(function() {
|
|
804
|
-
return function(u) {
|
|
805
|
-
var c = u.selectionStart, a = u.selectionEnd;
|
|
806
|
-
return { start: c, end: a, length: a - c };
|
|
807
|
-
}(A());
|
|
808
|
-
}, [A]), $ = m.useCallback(function() {
|
|
809
|
-
return _.current;
|
|
810
|
-
}, []), w = m.useCallback(function(u) {
|
|
811
|
-
var c = A();
|
|
812
|
-
c && x(c) && (function(a, t, e) {
|
|
813
|
-
e === void 0 && (e = t), a.setSelectionRange(t, e);
|
|
814
|
-
}(c, u.start, u.end), _.current = U());
|
|
815
|
-
}, [A, U]), y = m.useCallback(function() {
|
|
816
|
-
_.current = U();
|
|
817
|
-
}, [U]), I = (l = y, f = m.useRef(null), d = m.useCallback(function() {
|
|
818
|
-
f.current === null && function u() {
|
|
819
|
-
l(), f.current = V(u);
|
|
820
|
-
}();
|
|
821
|
-
}, [l]), P = m.useCallback(function() {
|
|
822
|
-
L(f.current), f.current = null;
|
|
823
|
-
}, []), m.useEffect(function() {
|
|
824
|
-
f.current && (P(), d());
|
|
825
|
-
}, [d, P]), m.useEffect(L, []), [d, P]), Y = I[0], te = I[1];
|
|
826
|
-
return m.useLayoutEffect(function() {
|
|
827
|
-
if (v) {
|
|
828
|
-
var u = A();
|
|
829
|
-
return u.addEventListener("focus", Y), u.addEventListener("blur", te), x(u) && Y(), function() {
|
|
830
|
-
u.removeEventListener("focus", Y), u.removeEventListener("blur", te), te();
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
}), { getSelection: U, getLastSelection: $, setSelection: w };
|
|
834
|
-
}
|
|
835
|
-
function q(r, v) {
|
|
836
|
-
var l = m.useRef(), f = ne(l, v), d = f.getSelection, P = f.getLastSelection, _ = f.setSelection, A = function(y, I) {
|
|
837
|
-
var Y = H(y), te = m.useRef(I);
|
|
838
|
-
return { getValue: m.useCallback(function() {
|
|
839
|
-
return Y().value;
|
|
840
|
-
}, [Y]), getLastValue: m.useCallback(function() {
|
|
841
|
-
return te.current;
|
|
842
|
-
}, []), setValue: m.useCallback(function(u) {
|
|
843
|
-
te.current = u;
|
|
844
|
-
var c = Y();
|
|
845
|
-
c && (c.value = u);
|
|
846
|
-
}, [Y]) };
|
|
847
|
-
}(l, r), U = A.getValue, $ = A.getLastValue, w = A.setValue;
|
|
848
|
-
return { inputRef: l, getInputState: function() {
|
|
849
|
-
return { value: U(), selection: d() };
|
|
850
|
-
}, getLastInputState: function() {
|
|
851
|
-
return { value: $(), selection: P() };
|
|
852
|
-
}, setInputState: function(y) {
|
|
853
|
-
var I = y.value, Y = y.selection;
|
|
854
|
-
w(I), _(Y);
|
|
855
|
-
} };
|
|
856
|
-
}
|
|
857
|
-
st();
|
|
858
|
-
var K = ["disabled", "onBlur", "onChange", "onFocus", "onMouseDown", "readOnly", "value"], re = { 9: /[0-9]/, a: /[A-Za-z]/, "*": /[A-Za-z0-9]/ }, le = function(r) {
|
|
859
|
-
var v = this;
|
|
860
|
-
this.isCharacterAllowedAtPosition = function(l, f) {
|
|
861
|
-
var d = v.maskOptions.maskPlaceholder;
|
|
862
|
-
return !!v.isCharacterFillingPosition(l, f) || !!d && d[f] === l;
|
|
863
|
-
}, this.isCharacterFillingPosition = function(l, f) {
|
|
864
|
-
var d = v.maskOptions.mask;
|
|
865
|
-
if (!l || f >= d.length)
|
|
866
|
-
return !1;
|
|
867
|
-
if (!v.isPositionEditable(f))
|
|
868
|
-
return d[f] === l;
|
|
869
|
-
var P = d[f];
|
|
870
|
-
return new RegExp(P).test(l);
|
|
871
|
-
}, this.isPositionEditable = function(l) {
|
|
872
|
-
var f = v.maskOptions, d = f.mask, P = f.permanents;
|
|
873
|
-
return l < d.length && P.indexOf(l) === -1;
|
|
874
|
-
}, this.isValueEmpty = function(l) {
|
|
875
|
-
return l.split("").every(function(f, d) {
|
|
876
|
-
return !v.isPositionEditable(d) || !v.isCharacterFillingPosition(f, d);
|
|
877
|
-
});
|
|
878
|
-
}, this.isValueFilled = function(l) {
|
|
879
|
-
return v.getFilledLength(l) === v.maskOptions.lastEditablePosition + 1;
|
|
880
|
-
}, this.getDefaultSelectionForValue = function(l) {
|
|
881
|
-
var f = v.getFilledLength(l), d = v.getRightEditablePosition(f);
|
|
882
|
-
return { start: d, end: d };
|
|
883
|
-
}, this.getFilledLength = function(l) {
|
|
884
|
-
return function(f, d) {
|
|
885
|
-
for (var P = f.length - 1; P >= 0; P--)
|
|
886
|
-
if (d(f[P], P))
|
|
887
|
-
return P;
|
|
888
|
-
return -1;
|
|
889
|
-
}(l.split(""), function(f, d) {
|
|
890
|
-
return v.isPositionEditable(d) && v.isCharacterFillingPosition(f, d);
|
|
891
|
-
}) + 1;
|
|
892
|
-
}, this.getStringFillingLengthAtPosition = function(l, f) {
|
|
893
|
-
return l.split("").reduce(function(d, P) {
|
|
894
|
-
return v.insertCharacterAtPosition(d, P, d.length);
|
|
895
|
-
}, function(d, P) {
|
|
896
|
-
P === void 0 && (P = 1);
|
|
897
|
-
for (var _ = "", A = 0; A < P; A++)
|
|
898
|
-
_ += d;
|
|
899
|
-
return _;
|
|
900
|
-
}(" ", f)).length - f;
|
|
901
|
-
}, this.getLeftEditablePosition = function(l) {
|
|
902
|
-
for (var f = l; f >= 0; f--)
|
|
903
|
-
if (v.isPositionEditable(f))
|
|
904
|
-
return f;
|
|
905
|
-
return null;
|
|
906
|
-
}, this.getRightEditablePosition = function(l) {
|
|
907
|
-
for (var f = v.maskOptions.mask, d = l; d < f.length; d++)
|
|
908
|
-
if (v.isPositionEditable(d))
|
|
909
|
-
return d;
|
|
910
|
-
return null;
|
|
911
|
-
}, this.formatValue = function(l) {
|
|
912
|
-
var f = v.maskOptions, d = f.maskPlaceholder, P = f.mask;
|
|
913
|
-
if (!d) {
|
|
914
|
-
for (l = v.insertStringAtPosition("", l, 0); l.length < P.length && !v.isPositionEditable(l.length); )
|
|
915
|
-
l += P[l.length];
|
|
916
|
-
return l;
|
|
917
|
-
}
|
|
918
|
-
return v.insertStringAtPosition(d, l, 0);
|
|
919
|
-
}, this.clearRange = function(l, f, d) {
|
|
920
|
-
if (!d)
|
|
921
|
-
return l;
|
|
922
|
-
var P = f + d, _ = v.maskOptions, A = _.maskPlaceholder, U = _.mask, $ = l.split("").map(function(w, y) {
|
|
923
|
-
var I = v.isPositionEditable(y);
|
|
924
|
-
return !A && y >= P && !I ? "" : y < f || y >= P ? w : I ? A ? A[y] : "" : U[y];
|
|
925
|
-
}).join("");
|
|
926
|
-
return v.formatValue($);
|
|
927
|
-
}, this.insertCharacterAtPosition = function(l, f, d) {
|
|
928
|
-
var P = v.maskOptions, _ = P.mask, A = P.maskPlaceholder;
|
|
929
|
-
if (d >= _.length)
|
|
930
|
-
return l;
|
|
931
|
-
var U = v.isCharacterAllowedAtPosition(f, d), $ = v.isPositionEditable(d), w = v.getRightEditablePosition(d), y = A && w ? f === A[w] : null, I = l.slice(0, d);
|
|
932
|
-
return !U && $ || (l = I + (U ? f : _[d])), U || $ || y || (l = v.insertCharacterAtPosition(l, f, d + 1)), l;
|
|
933
|
-
}, this.insertStringAtPosition = function(l, f, d) {
|
|
934
|
-
var P = v.maskOptions, _ = P.mask, A = P.maskPlaceholder;
|
|
935
|
-
if (!f || d >= _.length)
|
|
936
|
-
return l;
|
|
937
|
-
var U = f.split(""), $ = v.isValueFilled(l) || !!A, w = l.slice(d);
|
|
938
|
-
return l = U.reduce(function(y, I) {
|
|
939
|
-
return v.insertCharacterAtPosition(y, I, y.length);
|
|
940
|
-
}, l.slice(0, d)), $ ? l += w.slice(l.length - d) : v.isValueFilled(l) ? l += _.slice(l.length).join("") : l = w.split("").filter(function(y, I) {
|
|
941
|
-
return v.isPositionEditable(d + I);
|
|
942
|
-
}).reduce(function(y, I) {
|
|
943
|
-
var Y = v.getRightEditablePosition(y.length);
|
|
944
|
-
return Y === null ? y : (v.isPositionEditable(y.length) || (y += _.slice(y.length, Y).join("")), v.insertCharacterAtPosition(y, I, y.length));
|
|
945
|
-
}, l), l;
|
|
946
|
-
}, this.processChange = function(l, f) {
|
|
947
|
-
var d = v.maskOptions, P = d.mask, _ = d.prefix, A = d.lastEditablePosition, U = l.value, $ = l.selection, w = f.value, y = f.selection, I = U, Y = "", te = 0, u = 0, c = Math.min(y.start, $.start);
|
|
948
|
-
return $.end > y.start ? (Y = I.slice(y.start, $.end), u = (te = v.getStringFillingLengthAtPosition(Y, c)) ? y.length : 0) : I.length < w.length && (u = w.length - I.length), I = w, u && (u === 1 && !y.length && (c = y.start === $.start ? v.getRightEditablePosition($.start) : v.getLeftEditablePosition($.start)), I = v.clearRange(I, c, u)), I = v.insertStringAtPosition(I, Y, c), (c += te) >= P.length ? c = P.length : c < _.length && !te ? c = _.length : c >= _.length && c < A && te && (c = v.getRightEditablePosition(c)), { value: I = v.formatValue(I), enteredString: Y, selection: { start: c, end: c } };
|
|
949
|
-
}, this.maskOptions = function(l) {
|
|
950
|
-
var f = l.mask, d = l.maskPlaceholder, P = [];
|
|
951
|
-
if (!f)
|
|
952
|
-
return { maskPlaceholder: null, mask: null, prefix: null, lastEditablePosition: null, permanents: [] };
|
|
953
|
-
if (typeof f == "string") {
|
|
954
|
-
var _ = !1, A = "";
|
|
955
|
-
f.split("").forEach(function(w) {
|
|
956
|
-
_ || w !== "\\" ? (!_ && re[w] || P.push(A.length), A += w, _ = !1) : _ = !0;
|
|
957
|
-
}), f = A.split("").map(function(w, y) {
|
|
958
|
-
return P.indexOf(y) === -1 ? re[w] : w;
|
|
959
|
-
});
|
|
960
|
-
} else
|
|
961
|
-
f.forEach(function(w, y) {
|
|
962
|
-
typeof w == "string" && P.push(y);
|
|
963
|
-
});
|
|
964
|
-
d && (d = d.length === 1 ? f.map(function(w, y) {
|
|
965
|
-
return P.indexOf(y) !== -1 ? w : d;
|
|
966
|
-
}) : d.split(""), P.forEach(function(w) {
|
|
967
|
-
d[w] = f[w];
|
|
968
|
-
}), d = d.join(""));
|
|
969
|
-
for (var U = P.filter(function(w, y) {
|
|
970
|
-
return w === y;
|
|
971
|
-
}).map(function(w) {
|
|
972
|
-
return f[w];
|
|
973
|
-
}).join(""), $ = f.length - 1; P.indexOf($) !== -1; )
|
|
974
|
-
$--;
|
|
975
|
-
return { maskPlaceholder: d, prefix: U, mask: f, lastEditablePosition: $, permanents: P };
|
|
976
|
-
}(r);
|
|
977
|
-
}, G = function(r) {
|
|
978
|
-
function v() {
|
|
979
|
-
return r.apply(this, arguments) || this;
|
|
980
|
-
}
|
|
981
|
-
return F(v, r), v.prototype.render = function() {
|
|
982
|
-
var l = this.props, f = l.children, d = T(l, ["children"]);
|
|
983
|
-
return D.cloneElement(f, d);
|
|
984
|
-
}, v;
|
|
985
|
-
}(D.Component), Z = m.forwardRef(function(r, v) {
|
|
986
|
-
var l = r.alwaysShowMask, f = r.children, d = r.mask, P = r.maskPlaceholder, _ = r.beforeMaskedStateChange, A = T(r, ["alwaysShowMask", "children", "mask", "maskPlaceholder", "beforeMaskedStateChange"]);
|
|
987
|
-
(function(i) {
|
|
988
|
-
var b = i.mask, k = i.maskPlaceholder;
|
|
989
|
-
b && k && k.length !== 1 && k.length !== b.length && R(!1);
|
|
990
|
-
})(r);
|
|
991
|
-
var U, $, w = new le({ mask: d, maskPlaceholder: P }), y = !!d, I = !A.disabled && !A.readOnly, Y = r.value !== null && r.value !== void 0, te = (U = y, $ = m.useRef(), m.useEffect(function() {
|
|
992
|
-
$.current = U;
|
|
993
|
-
}), $.current), u = q(function(i) {
|
|
994
|
-
return "" + i;
|
|
995
|
-
}((Y ? r.value : r.defaultValue) || ""), y), c = u.inputRef, a = u.getInputState, t = u.setInputState, e = u.getLastInputState, n = H(c);
|
|
996
|
-
if (y && Y) {
|
|
997
|
-
var o = n(), s = o && x(o) || l || r.value ? w.formatValue(r.value) : r.value;
|
|
998
|
-
_ && (s = _({ nextState: { value: s, selection: { start: null, end: null } } }).value), t(S({}, e(), { value: s }));
|
|
999
|
-
}
|
|
1000
|
-
var g = e(), p = g.selection, h = g.value;
|
|
1001
|
-
m.useLayoutEffect(function() {
|
|
1002
|
-
if (y) {
|
|
1003
|
-
var i = x(n()), b = p, k = a(), O = S({}, k);
|
|
1004
|
-
if (!Y) {
|
|
1005
|
-
var N = k.value, ee = w.formatValue(N), ae = w.isValueEmpty(ee);
|
|
1006
|
-
!ae || i || l ? O.value = ee : ae && !i && (O.value = "");
|
|
1007
|
-
}
|
|
1008
|
-
i && !te ? O.selection = w.getDefaultSelectionForValue(O.value) : Y && i && b && b.start !== null && b.end !== null && (O.selection = b), _ && (O = _({ currentState: k, nextState: O })), t(O);
|
|
1009
|
-
}
|
|
1010
|
-
});
|
|
1011
|
-
var C = S({}, A, { onFocus: function(i) {
|
|
1012
|
-
c.current = i.target;
|
|
1013
|
-
var b = a().value;
|
|
1014
|
-
if (y && !w.isValueFilled(b)) {
|
|
1015
|
-
var k = w.formatValue(b), O = w.getDefaultSelectionForValue(k), N = { value: k, selection: O };
|
|
1016
|
-
_ && (k = (N = _({ currentState: a(), nextState: N })).value, O = N.selection), t(N), k !== b && r.onChange && r.onChange(i), V(function() {
|
|
1017
|
-
t(e());
|
|
1018
|
-
});
|
|
1019
|
-
}
|
|
1020
|
-
r.onFocus && r.onFocus(i);
|
|
1021
|
-
}, onBlur: function(i) {
|
|
1022
|
-
var b = a().value, k = e().value;
|
|
1023
|
-
if (y && !l && w.isValueEmpty(k)) {
|
|
1024
|
-
var O = "", N = { value: O, selection: { start: null, end: null } };
|
|
1025
|
-
_ && (O = (N = _({ currentState: a(), nextState: N })).value), t(N), O !== b && r.onChange && r.onChange(i);
|
|
1026
|
-
}
|
|
1027
|
-
r.onBlur && r.onBlur(i);
|
|
1028
|
-
}, onChange: y && I ? function(i) {
|
|
1029
|
-
var b = a(), k = e(), O = w.processChange(b, k);
|
|
1030
|
-
_ && (O = _({ currentState: b, previousState: k, nextState: O })), t(O), r.onChange && r.onChange(i);
|
|
1031
|
-
} : r.onChange, onMouseDown: y && I ? function(i) {
|
|
1032
|
-
var b = n(), k = a().value, O = j(b);
|
|
1033
|
-
if (!x(b) && !w.isValueFilled(k)) {
|
|
1034
|
-
var N = i.clientX, ee = i.clientY, ae = (/* @__PURE__ */ new Date()).getTime();
|
|
1035
|
-
O.addEventListener("mouseup", function z(se) {
|
|
1036
|
-
if (O.removeEventListener("mouseup", z), x(b)) {
|
|
1037
|
-
var ce = Math.abs(se.clientX - N), fe = Math.abs(se.clientY - ee), ve = Math.max(ce, fe), de = (/* @__PURE__ */ new Date()).getTime() - ae;
|
|
1038
|
-
if (ve <= 10 && de <= 200 || ve <= 5 && de <= 300) {
|
|
1039
|
-
var pe = e(), Ee = S({}, pe, { selection: w.getDefaultSelectionForValue(pe.value) });
|
|
1040
|
-
t(Ee);
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
r.onMouseDown && r.onMouseDown(i);
|
|
1046
|
-
} : r.onMouseDown, ref: function(i) {
|
|
1047
|
-
c.current = M.findDOMNode(i), /* @__PURE__ */ function(b) {
|
|
1048
|
-
return typeof b == "function";
|
|
1049
|
-
}(v) ? v(i) : v !== null && typeof v == "object" && (v.current = i);
|
|
1050
|
-
}, value: y && Y ? h : r.value });
|
|
1051
|
-
return f ? (function(i, b) {
|
|
1052
|
-
K.filter(function(k) {
|
|
1053
|
-
return b.props[k] != null && b.props[k] !== i[k];
|
|
1054
|
-
}).length && R(!1);
|
|
1055
|
-
}(r, f), D.createElement(G, C, f)) : D.createElement("input", C);
|
|
1056
|
-
});
|
|
1057
|
-
return Z.displayName = "InputMask", Z.defaultProps = { alwaysShowMask: !1, maskPlaceholder: "_" }, ke.exports = Z, ke.exports;
|
|
1058
|
-
}
|
|
1059
|
-
var Ae, tt;
|
|
1060
|
-
function Ct() {
|
|
1061
|
-
if (tt)
|
|
1062
|
-
return Ae;
|
|
1063
|
-
tt = 1;
|
|
1064
|
-
function E(a) {
|
|
1065
|
-
return a && typeof a == "object" && "default" in a ? a.default : a;
|
|
1066
|
-
}
|
|
1067
|
-
var m = nt, D = E(m), M = rt, R = E(ot()), S = E(ut()), F = E(st());
|
|
1068
|
-
function T(a, t) {
|
|
1069
|
-
for (var e = Object.getOwnPropertyNames(t), n = 0; n < e.length; n++) {
|
|
1070
|
-
var o = e[n], s = Object.getOwnPropertyDescriptor(t, o);
|
|
1071
|
-
s && s.configurable && a[o] === void 0 && Object.defineProperty(a, o, s);
|
|
1072
|
-
}
|
|
1073
|
-
return a;
|
|
1074
|
-
}
|
|
1075
|
-
function V() {
|
|
1076
|
-
return V = Object.assign || function(a) {
|
|
1077
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1078
|
-
var e = arguments[t];
|
|
1079
|
-
for (var n in e)
|
|
1080
|
-
Object.prototype.hasOwnProperty.call(e, n) && (a[n] = e[n]);
|
|
1081
|
-
}
|
|
1082
|
-
return a;
|
|
1083
|
-
}, V.apply(this, arguments);
|
|
1084
|
-
}
|
|
1085
|
-
function L(a, t) {
|
|
1086
|
-
a.prototype = Object.create(t.prototype), a.prototype.constructor = a, T(a, t);
|
|
1087
|
-
}
|
|
1088
|
-
function x(a, t) {
|
|
1089
|
-
if (a == null)
|
|
1090
|
-
return {};
|
|
1091
|
-
var e = {}, n = Object.keys(a), o, s;
|
|
1092
|
-
for (s = 0; s < n.length; s++)
|
|
1093
|
-
o = n[s], !(t.indexOf(o) >= 0) && (e[o] = a[o]);
|
|
1094
|
-
return e;
|
|
1095
|
-
}
|
|
1096
|
-
function j(a) {
|
|
1097
|
-
return requestAnimationFrame(a);
|
|
1098
|
-
}
|
|
1099
|
-
function X(a) {
|
|
1100
|
-
cancelAnimationFrame(a);
|
|
1101
|
-
}
|
|
1102
|
-
function H(a, t, e) {
|
|
1103
|
-
e === void 0 && (e = t), a.setSelectionRange(t, e);
|
|
1104
|
-
}
|
|
1105
|
-
function ne(a) {
|
|
1106
|
-
var t = a.selectionStart, e = a.selectionEnd;
|
|
1107
|
-
return {
|
|
1108
|
-
start: t,
|
|
1109
|
-
end: e,
|
|
1110
|
-
length: e - t
|
|
1111
|
-
};
|
|
1112
|
-
}
|
|
1113
|
-
function q(a) {
|
|
1114
|
-
var t = a.ownerDocument;
|
|
1115
|
-
return t.hasFocus() && t.activeElement === a;
|
|
1116
|
-
}
|
|
1117
|
-
function K(a) {
|
|
1118
|
-
return a == null ? void 0 : a.ownerDocument;
|
|
1119
|
-
}
|
|
1120
|
-
function re(a) {
|
|
1121
|
-
var t;
|
|
1122
|
-
return (t = K(a)) == null ? void 0 : t.defaultView;
|
|
1123
|
-
}
|
|
1124
|
-
function le(a) {
|
|
1125
|
-
var t = re(a);
|
|
1126
|
-
return !!t && a instanceof t.HTMLElement;
|
|
1127
|
-
}
|
|
1128
|
-
function G(a) {
|
|
1129
|
-
return typeof a == "function";
|
|
1130
|
-
}
|
|
1131
|
-
function Z(a, t) {
|
|
1132
|
-
for (var e = a.length - 1; e >= 0; e--) {
|
|
1133
|
-
var n = a[e];
|
|
1134
|
-
if (t(n, e))
|
|
1135
|
-
return e;
|
|
1136
|
-
}
|
|
1137
|
-
return -1;
|
|
1138
|
-
}
|
|
1139
|
-
function r(a, t) {
|
|
1140
|
-
t === void 0 && (t = 1);
|
|
1141
|
-
for (var e = "", n = 0; n < t; n++)
|
|
1142
|
-
e += a;
|
|
1143
|
-
return e;
|
|
1144
|
-
}
|
|
1145
|
-
function v(a) {
|
|
1146
|
-
return "" + a;
|
|
1147
|
-
}
|
|
1148
|
-
function l(a) {
|
|
1149
|
-
return m.useCallback(function() {
|
|
1150
|
-
var t = a.current, e = typeof window < "u" && le(t);
|
|
1151
|
-
if (!t || !e)
|
|
1152
|
-
return null;
|
|
1153
|
-
if (t.nodeName !== "INPUT" && (t = t.querySelector("input")), !t)
|
|
1154
|
-
throw new Error("react-input-mask: inputComponent doesn't contain input node");
|
|
1155
|
-
return t;
|
|
1156
|
-
}, [a]);
|
|
1157
|
-
}
|
|
1158
|
-
function f(a) {
|
|
1159
|
-
var t = m.useRef(null), e = m.useCallback(function() {
|
|
1160
|
-
if (t.current !== null)
|
|
1161
|
-
return;
|
|
1162
|
-
function o() {
|
|
1163
|
-
a(), t.current = j(o);
|
|
1164
|
-
}
|
|
1165
|
-
o();
|
|
1166
|
-
}, [a]), n = m.useCallback(function() {
|
|
1167
|
-
X(t.current), t.current = null;
|
|
1168
|
-
}, []);
|
|
1169
|
-
return m.useEffect(function() {
|
|
1170
|
-
t.current && (n(), e());
|
|
1171
|
-
}, [e, n]), m.useEffect(X, []), [e, n];
|
|
1172
|
-
}
|
|
1173
|
-
function d(a, t) {
|
|
1174
|
-
var e = m.useRef({
|
|
1175
|
-
start: null,
|
|
1176
|
-
end: null
|
|
1177
|
-
}), n = l(a), o = m.useCallback(function() {
|
|
1178
|
-
var b = n();
|
|
1179
|
-
return ne(b);
|
|
1180
|
-
}, [n]), s = m.useCallback(function() {
|
|
1181
|
-
return e.current;
|
|
1182
|
-
}, []), g = m.useCallback(function(b) {
|
|
1183
|
-
var k = n();
|
|
1184
|
-
!k || !q(k) || (H(k, b.start, b.end), e.current = o());
|
|
1185
|
-
}, [n, o]), p = m.useCallback(function() {
|
|
1186
|
-
e.current = o();
|
|
1187
|
-
}, [o]), h = f(p), C = h[0], i = h[1];
|
|
1188
|
-
return m.useLayoutEffect(function() {
|
|
1189
|
-
if (t) {
|
|
1190
|
-
var b = n();
|
|
1191
|
-
return b.addEventListener("focus", C), b.addEventListener("blur", i), q(b) && C(), function() {
|
|
1192
|
-
b.removeEventListener("focus", C), b.removeEventListener("blur", i), i();
|
|
1193
|
-
};
|
|
1194
|
-
}
|
|
1195
|
-
}), {
|
|
1196
|
-
getSelection: o,
|
|
1197
|
-
getLastSelection: s,
|
|
1198
|
-
setSelection: g
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
function P(a, t) {
|
|
1202
|
-
var e = l(a), n = m.useRef(t), o = m.useCallback(function() {
|
|
1203
|
-
var p = e();
|
|
1204
|
-
return p.value;
|
|
1205
|
-
}, [e]), s = m.useCallback(function() {
|
|
1206
|
-
return n.current;
|
|
1207
|
-
}, []), g = m.useCallback(function(p) {
|
|
1208
|
-
n.current = p;
|
|
1209
|
-
var h = e();
|
|
1210
|
-
h && (h.value = p);
|
|
1211
|
-
}, [e]);
|
|
1212
|
-
return {
|
|
1213
|
-
getValue: o,
|
|
1214
|
-
getLastValue: s,
|
|
1215
|
-
setValue: g
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
function _(a, t) {
|
|
1219
|
-
var e = m.useRef(), n = d(e, t), o = n.getSelection, s = n.getLastSelection, g = n.setSelection, p = P(e, a), h = p.getValue, C = p.getLastValue, i = p.setValue;
|
|
1220
|
-
function b() {
|
|
1221
|
-
return {
|
|
1222
|
-
value: C(),
|
|
1223
|
-
selection: s()
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1226
|
-
function k() {
|
|
1227
|
-
return {
|
|
1228
|
-
value: h(),
|
|
1229
|
-
selection: o()
|
|
1230
|
-
};
|
|
1231
|
-
}
|
|
1232
|
-
function O(N) {
|
|
1233
|
-
var ee = N.value, ae = N.selection;
|
|
1234
|
-
i(ee), g(ae);
|
|
1235
|
-
}
|
|
1236
|
-
return {
|
|
1237
|
-
inputRef: e,
|
|
1238
|
-
getInputState: k,
|
|
1239
|
-
getLastInputState: b,
|
|
1240
|
-
setInputState: O
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
function A(a) {
|
|
1244
|
-
var t = m.useRef();
|
|
1245
|
-
return m.useEffect(function() {
|
|
1246
|
-
t.current = a;
|
|
1247
|
-
}), t.current;
|
|
1248
|
-
}
|
|
1249
|
-
var U = ["disabled", "onBlur", "onChange", "onFocus", "onMouseDown", "readOnly", "value"], $ = {
|
|
1250
|
-
9: /[0-9]/,
|
|
1251
|
-
a: /[A-Za-z]/,
|
|
1252
|
-
"*": /[A-Za-z0-9]/
|
|
1253
|
-
};
|
|
1254
|
-
function w(a) {
|
|
1255
|
-
process.env.NODE_ENV !== "production" && F(!a.maxLength || !a.mask, "react-input-mask: maxLength property shouldn't be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.");
|
|
1256
|
-
}
|
|
1257
|
-
function y(a) {
|
|
1258
|
-
var t = a.mask, e = a.maskPlaceholder;
|
|
1259
|
-
!t || !e || e.length === 1 || e.length === t.length || (process.env.NODE_ENV !== "production" ? S(!1, `react-input-mask: maskPlaceholder should either be a single character or have the same length as the mask:
|
|
1260
|
-
` + ("mask: " + t + `
|
|
1261
|
-
`) + ("maskPlaceholder: " + e)) : S(!1));
|
|
1262
|
-
}
|
|
1263
|
-
function I(a, t) {
|
|
1264
|
-
var e = U.filter(function(n) {
|
|
1265
|
-
return t.props[n] != null && t.props[n] !== a[n];
|
|
1266
|
-
});
|
|
1267
|
-
e.length && (process.env.NODE_ENV !== "production" ? S(!1, "react-input-mask: the following props should be passed to the InputMask component, not to children: " + e.join(",")) : S(!1));
|
|
1268
|
-
}
|
|
1269
|
-
function Y(a) {
|
|
1270
|
-
var t = a.mask, e = a.maskPlaceholder, n = [];
|
|
1271
|
-
if (!t)
|
|
1272
|
-
return {
|
|
1273
|
-
maskPlaceholder: null,
|
|
1274
|
-
mask: null,
|
|
1275
|
-
prefix: null,
|
|
1276
|
-
lastEditablePosition: null,
|
|
1277
|
-
permanents: []
|
|
1278
|
-
};
|
|
1279
|
-
if (typeof t == "string") {
|
|
1280
|
-
var o = !1, s = "";
|
|
1281
|
-
t.split("").forEach(function(h) {
|
|
1282
|
-
!o && h === "\\" ? o = !0 : ((o || !$[h]) && n.push(s.length), s += h, o = !1);
|
|
1283
|
-
}), t = s.split("").map(function(h, C) {
|
|
1284
|
-
return n.indexOf(C) === -1 ? $[h] : h;
|
|
1285
|
-
});
|
|
1286
|
-
} else
|
|
1287
|
-
t.forEach(function(h, C) {
|
|
1288
|
-
typeof h == "string" && n.push(C);
|
|
1289
|
-
});
|
|
1290
|
-
e && (e.length === 1 ? e = t.map(function(h, C) {
|
|
1291
|
-
return n.indexOf(C) !== -1 ? h : e;
|
|
1292
|
-
}) : e = e.split(""), n.forEach(function(h) {
|
|
1293
|
-
e[h] = t[h];
|
|
1294
|
-
}), e = e.join(""));
|
|
1295
|
-
for (var g = n.filter(function(h, C) {
|
|
1296
|
-
return h === C;
|
|
1297
|
-
}).map(function(h) {
|
|
1298
|
-
return t[h];
|
|
1299
|
-
}).join(""), p = t.length - 1; n.indexOf(p) !== -1; )
|
|
1300
|
-
p--;
|
|
1301
|
-
return {
|
|
1302
|
-
maskPlaceholder: e,
|
|
1303
|
-
prefix: g,
|
|
1304
|
-
mask: t,
|
|
1305
|
-
lastEditablePosition: p,
|
|
1306
|
-
permanents: n
|
|
1307
|
-
};
|
|
1308
|
-
}
|
|
1309
|
-
var te = function(t) {
|
|
1310
|
-
var e = this;
|
|
1311
|
-
this.isCharacterAllowedAtPosition = function(n, o) {
|
|
1312
|
-
var s = e.maskOptions.maskPlaceholder;
|
|
1313
|
-
return e.isCharacterFillingPosition(n, o) ? !0 : s ? s[o] === n : !1;
|
|
1314
|
-
}, this.isCharacterFillingPosition = function(n, o) {
|
|
1315
|
-
var s = e.maskOptions.mask;
|
|
1316
|
-
if (!n || o >= s.length)
|
|
1317
|
-
return !1;
|
|
1318
|
-
if (!e.isPositionEditable(o))
|
|
1319
|
-
return s[o] === n;
|
|
1320
|
-
var g = s[o];
|
|
1321
|
-
return new RegExp(g).test(n);
|
|
1322
|
-
}, this.isPositionEditable = function(n) {
|
|
1323
|
-
var o = e.maskOptions, s = o.mask, g = o.permanents;
|
|
1324
|
-
return n < s.length && g.indexOf(n) === -1;
|
|
1325
|
-
}, this.isValueEmpty = function(n) {
|
|
1326
|
-
return n.split("").every(function(o, s) {
|
|
1327
|
-
return !e.isPositionEditable(s) || !e.isCharacterFillingPosition(o, s);
|
|
1328
|
-
});
|
|
1329
|
-
}, this.isValueFilled = function(n) {
|
|
1330
|
-
return e.getFilledLength(n) === e.maskOptions.lastEditablePosition + 1;
|
|
1331
|
-
}, this.getDefaultSelectionForValue = function(n) {
|
|
1332
|
-
var o = e.getFilledLength(n), s = e.getRightEditablePosition(o);
|
|
1333
|
-
return {
|
|
1334
|
-
start: s,
|
|
1335
|
-
end: s
|
|
1336
|
-
};
|
|
1337
|
-
}, this.getFilledLength = function(n) {
|
|
1338
|
-
var o = n.split(""), s = Z(o, function(g, p) {
|
|
1339
|
-
return e.isPositionEditable(p) && e.isCharacterFillingPosition(g, p);
|
|
1340
|
-
});
|
|
1341
|
-
return s + 1;
|
|
1342
|
-
}, this.getStringFillingLengthAtPosition = function(n, o) {
|
|
1343
|
-
var s = n.split(""), g = s.reduce(function(p, h) {
|
|
1344
|
-
return e.insertCharacterAtPosition(p, h, p.length);
|
|
1345
|
-
}, r(" ", o));
|
|
1346
|
-
return g.length - o;
|
|
1347
|
-
}, this.getLeftEditablePosition = function(n) {
|
|
1348
|
-
for (var o = n; o >= 0; o--)
|
|
1349
|
-
if (e.isPositionEditable(o))
|
|
1350
|
-
return o;
|
|
1351
|
-
return null;
|
|
1352
|
-
}, this.getRightEditablePosition = function(n) {
|
|
1353
|
-
for (var o = e.maskOptions.mask, s = n; s < o.length; s++)
|
|
1354
|
-
if (e.isPositionEditable(s))
|
|
1355
|
-
return s;
|
|
1356
|
-
return null;
|
|
1357
|
-
}, this.formatValue = function(n) {
|
|
1358
|
-
var o = e.maskOptions, s = o.maskPlaceholder, g = o.mask;
|
|
1359
|
-
if (!s) {
|
|
1360
|
-
for (n = e.insertStringAtPosition("", n, 0); n.length < g.length && !e.isPositionEditable(n.length); )
|
|
1361
|
-
n += g[n.length];
|
|
1362
|
-
return n;
|
|
1363
|
-
}
|
|
1364
|
-
return e.insertStringAtPosition(s, n, 0);
|
|
1365
|
-
}, this.clearRange = function(n, o, s) {
|
|
1366
|
-
if (!s)
|
|
1367
|
-
return n;
|
|
1368
|
-
var g = o + s, p = e.maskOptions, h = p.maskPlaceholder, C = p.mask, i = n.split("").map(function(b, k) {
|
|
1369
|
-
var O = e.isPositionEditable(k);
|
|
1370
|
-
return !h && k >= g && !O ? "" : k < o || k >= g ? b : O ? h ? h[k] : "" : C[k];
|
|
1371
|
-
}).join("");
|
|
1372
|
-
return e.formatValue(i);
|
|
1373
|
-
}, this.insertCharacterAtPosition = function(n, o, s) {
|
|
1374
|
-
var g = e.maskOptions, p = g.mask, h = g.maskPlaceholder;
|
|
1375
|
-
if (s >= p.length)
|
|
1376
|
-
return n;
|
|
1377
|
-
var C = e.isCharacterAllowedAtPosition(o, s), i = e.isPositionEditable(s), b = e.getRightEditablePosition(s), k = h && b ? o === h[b] : null, O = n.slice(0, s);
|
|
1378
|
-
if (C || !i) {
|
|
1379
|
-
var N = C ? o : p[s];
|
|
1380
|
-
n = O + N;
|
|
1381
|
-
}
|
|
1382
|
-
return !C && !i && !k && (n = e.insertCharacterAtPosition(n, o, s + 1)), n;
|
|
1383
|
-
}, this.insertStringAtPosition = function(n, o, s) {
|
|
1384
|
-
var g = e.maskOptions, p = g.mask, h = g.maskPlaceholder;
|
|
1385
|
-
if (!o || s >= p.length)
|
|
1386
|
-
return n;
|
|
1387
|
-
var C = o.split(""), i = e.isValueFilled(n) || !!h, b = n.slice(s);
|
|
1388
|
-
if (n = C.reduce(function(O, N) {
|
|
1389
|
-
return e.insertCharacterAtPosition(O, N, O.length);
|
|
1390
|
-
}, n.slice(0, s)), i)
|
|
1391
|
-
n += b.slice(n.length - s);
|
|
1392
|
-
else if (e.isValueFilled(n))
|
|
1393
|
-
n += p.slice(n.length).join("");
|
|
1394
|
-
else {
|
|
1395
|
-
var k = b.split("").filter(function(O, N) {
|
|
1396
|
-
return e.isPositionEditable(s + N);
|
|
1397
|
-
});
|
|
1398
|
-
n = k.reduce(function(O, N) {
|
|
1399
|
-
var ee = e.getRightEditablePosition(O.length);
|
|
1400
|
-
return ee === null ? O : (e.isPositionEditable(O.length) || (O += p.slice(O.length, ee).join("")), e.insertCharacterAtPosition(O, N, O.length));
|
|
1401
|
-
}, n);
|
|
1402
|
-
}
|
|
1403
|
-
return n;
|
|
1404
|
-
}, this.processChange = function(n, o) {
|
|
1405
|
-
var s = e.maskOptions, g = s.mask, p = s.prefix, h = s.lastEditablePosition, C = n.value, i = n.selection, b = o.value, k = o.selection, O = C, N = "", ee = 0, ae = 0, z = Math.min(k.start, i.start);
|
|
1406
|
-
if (i.end > k.start ? (N = O.slice(k.start, i.end), ee = e.getStringFillingLengthAtPosition(N, z), ee ? ae = k.length : ae = 0) : O.length < b.length && (ae = b.length - O.length), O = b, ae) {
|
|
1407
|
-
if (ae === 1 && !k.length) {
|
|
1408
|
-
var se = k.start === i.start;
|
|
1409
|
-
z = se ? e.getRightEditablePosition(i.start) : e.getLeftEditablePosition(i.start);
|
|
1410
|
-
}
|
|
1411
|
-
O = e.clearRange(O, z, ae);
|
|
1412
|
-
}
|
|
1413
|
-
return O = e.insertStringAtPosition(O, N, z), z += ee, z >= g.length ? z = g.length : z < p.length && !ee ? z = p.length : z >= p.length && z < h && ee && (z = e.getRightEditablePosition(z)), O = e.formatValue(O), {
|
|
1414
|
-
value: O,
|
|
1415
|
-
enteredString: N,
|
|
1416
|
-
selection: {
|
|
1417
|
-
start: z,
|
|
1418
|
-
end: z
|
|
1419
|
-
}
|
|
1420
|
-
};
|
|
1421
|
-
}, this.maskOptions = Y(t);
|
|
1422
|
-
}, u = /* @__PURE__ */ function(a) {
|
|
1423
|
-
L(t, a);
|
|
1424
|
-
function t() {
|
|
1425
|
-
return a.apply(this, arguments) || this;
|
|
1426
|
-
}
|
|
1427
|
-
var e = t.prototype;
|
|
1428
|
-
return e.render = function() {
|
|
1429
|
-
var o = this.props, s = o.children, g = x(o, ["children"]);
|
|
1430
|
-
return D.cloneElement(s, g);
|
|
1431
|
-
}, t;
|
|
1432
|
-
}(D.Component), c = m.forwardRef(function(t, e) {
|
|
1433
|
-
var n = t.alwaysShowMask, o = t.children, s = t.mask, g = t.maskPlaceholder, p = t.beforeMaskedStateChange, h = x(t, ["alwaysShowMask", "children", "mask", "maskPlaceholder", "beforeMaskedStateChange"]);
|
|
1434
|
-
w(t), y(t);
|
|
1435
|
-
var C = new te({
|
|
1436
|
-
mask: s,
|
|
1437
|
-
maskPlaceholder: g
|
|
1438
|
-
}), i = !!s, b = !h.disabled && !h.readOnly, k = t.value !== null && t.value !== void 0, O = A(i), N = v((k ? t.value : t.defaultValue) || ""), ee = _(N, i), ae = ee.inputRef, z = ee.getInputState, se = ee.setInputState, ce = ee.getLastInputState, fe = l(ae);
|
|
1439
|
-
function ve(ue) {
|
|
1440
|
-
var Q = z(), ie = ce(), oe = C.processChange(Q, ie);
|
|
1441
|
-
p && (oe = p({
|
|
1442
|
-
currentState: Q,
|
|
1443
|
-
previousState: ie,
|
|
1444
|
-
nextState: oe
|
|
1445
|
-
})), se(oe), t.onChange && t.onChange(ue);
|
|
1446
|
-
}
|
|
1447
|
-
function de(ue) {
|
|
1448
|
-
ae.current = ue.target;
|
|
1449
|
-
var Q = z().value;
|
|
1450
|
-
if (i && !C.isValueFilled(Q)) {
|
|
1451
|
-
var ie = C.formatValue(Q), oe = C.getDefaultSelectionForValue(ie), J = {
|
|
1452
|
-
value: ie,
|
|
1453
|
-
selection: oe
|
|
1454
|
-
};
|
|
1455
|
-
p && (J = p({
|
|
1456
|
-
currentState: z(),
|
|
1457
|
-
nextState: J
|
|
1458
|
-
}), ie = J.value, oe = J.selection), se(J), ie !== Q && t.onChange && t.onChange(ue), j(function() {
|
|
1459
|
-
se(ce());
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
t.onFocus && t.onFocus(ue);
|
|
1463
|
-
}
|
|
1464
|
-
function pe(ue) {
|
|
1465
|
-
var Q = z().value, ie = ce().value;
|
|
1466
|
-
if (i && !n && C.isValueEmpty(ie)) {
|
|
1467
|
-
var oe = "", J = {
|
|
1468
|
-
value: oe,
|
|
1469
|
-
selection: {
|
|
1470
|
-
start: null,
|
|
1471
|
-
end: null
|
|
1472
|
-
}
|
|
1473
|
-
};
|
|
1474
|
-
p && (J = p({
|
|
1475
|
-
currentState: z(),
|
|
1476
|
-
nextState: J
|
|
1477
|
-
}), oe = J.value), se(J), oe !== Q && t.onChange && t.onChange(ue);
|
|
1478
|
-
}
|
|
1479
|
-
t.onBlur && t.onBlur(ue);
|
|
1480
|
-
}
|
|
1481
|
-
function Ee(ue) {
|
|
1482
|
-
var Q = fe(), ie = z(), oe = ie.value, J = K(Q);
|
|
1483
|
-
if (!q(Q) && !C.isValueFilled(oe)) {
|
|
1484
|
-
var Pe = ue.clientX, he = ue.clientY, ge = (/* @__PURE__ */ new Date()).getTime(), Se = function vt(je) {
|
|
1485
|
-
if (J.removeEventListener("mouseup", vt), !!q(Q)) {
|
|
1486
|
-
var dt = Math.abs(je.clientX - Pe), pt = Math.abs(je.clientY - he), $e = Math.max(dt, pt), qe = (/* @__PURE__ */ new Date()).getTime() - ge;
|
|
1487
|
-
if ($e <= 10 && qe <= 200 || $e <= 5 && qe <= 300) {
|
|
1488
|
-
var Ye = ce(), ht = C.getDefaultSelectionForValue(Ye.value), gt = V({}, Ye, {
|
|
1489
|
-
selection: ht
|
|
1490
|
-
});
|
|
1491
|
-
se(gt);
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
};
|
|
1495
|
-
J.addEventListener("mouseup", Se);
|
|
1496
|
-
}
|
|
1497
|
-
t.onMouseDown && t.onMouseDown(ue);
|
|
1498
|
-
}
|
|
1499
|
-
if (i && k) {
|
|
1500
|
-
var De = fe(), lt = De && q(De), be = lt || n || t.value ? C.formatValue(t.value) : t.value;
|
|
1501
|
-
p && (be = p({
|
|
1502
|
-
nextState: {
|
|
1503
|
-
value: be,
|
|
1504
|
-
selection: {
|
|
1505
|
-
start: null,
|
|
1506
|
-
end: null
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
}).value), se(V({}, ce(), {
|
|
1510
|
-
value: be
|
|
1511
|
-
}));
|
|
1512
|
-
}
|
|
1513
|
-
var Fe = ce(), ct = Fe.selection, ft = Fe.value;
|
|
1514
|
-
m.useLayoutEffect(function() {
|
|
1515
|
-
if (i) {
|
|
1516
|
-
var ue = fe(), Q = q(ue), ie = ct, oe = z(), J = V({}, oe);
|
|
1517
|
-
if (!k) {
|
|
1518
|
-
var Pe = oe.value, he = C.formatValue(Pe), ge = C.isValueEmpty(he), Se = !ge || Q || n;
|
|
1519
|
-
Se ? J.value = he : ge && !Q && (J.value = "");
|
|
1520
|
-
}
|
|
1521
|
-
Q && !O ? J.selection = C.getDefaultSelectionForValue(J.value) : k && Q && ie && ie.start !== null && ie.end !== null && (J.selection = ie), p && (J = p({
|
|
1522
|
-
currentState: oe,
|
|
1523
|
-
nextState: J
|
|
1524
|
-
})), se(J);
|
|
1525
|
-
}
|
|
1526
|
-
});
|
|
1527
|
-
var Ve = V({}, h, {
|
|
1528
|
-
onFocus: de,
|
|
1529
|
-
onBlur: pe,
|
|
1530
|
-
onChange: i && b ? ve : t.onChange,
|
|
1531
|
-
onMouseDown: i && b ? Ee : t.onMouseDown,
|
|
1532
|
-
ref: function(Q) {
|
|
1533
|
-
ae.current = M.findDOMNode(Q), G(e) ? e(Q) : e !== null && typeof e == "object" && (e.current = Q);
|
|
1534
|
-
},
|
|
1535
|
-
value: i && k ? ft : t.value
|
|
1536
|
-
});
|
|
1537
|
-
return o ? (I(t, o), D.createElement(u, Ve, o)) : D.createElement("input", Ve);
|
|
1538
|
-
});
|
|
1539
|
-
return c.displayName = "InputMask", c.defaultProps = {
|
|
1540
|
-
alwaysShowMask: !1,
|
|
1541
|
-
maskPlaceholder: "_"
|
|
1542
|
-
}, c.propTypes = {
|
|
1543
|
-
alwaysShowMask: R.bool,
|
|
1544
|
-
beforeMaskedStateChange: R.func,
|
|
1545
|
-
children: R.element,
|
|
1546
|
-
mask: R.oneOfType([R.string, R.arrayOf(R.oneOfType([R.string, R.instanceOf(RegExp)]))]),
|
|
1547
|
-
maskPlaceholder: R.string,
|
|
1548
|
-
onFocus: R.func,
|
|
1549
|
-
onBlur: R.func,
|
|
1550
|
-
onChange: R.func,
|
|
1551
|
-
onMouseDown: R.func
|
|
1552
|
-
}, Ae = c, Ae;
|
|
1553
|
-
}
|
|
1554
|
-
process.env.NODE_ENV === "production" ? Ie.exports = Ot() : Ie.exports = Ct();
|
|
1555
|
-
var Tt = Ie.exports;
|
|
1556
|
-
const xt = /* @__PURE__ */ mt(Tt);
|
|
1557
|
-
export {
|
|
1558
|
-
xt as I
|
|
1559
|
-
};
|