@arthurzakharov/ui-kit 1.3.3 → 1.3.5
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as ee, jsx as
|
|
2
|
-
import ze, { useRef as Fe, useState as
|
|
1
|
+
import { jsxs as ee, jsx as F } from "react/jsx-runtime";
|
|
2
|
+
import ze, { useRef as Fe, useState as be, useCallback as te, useEffect as Pe } from "react";
|
|
3
3
|
import { g as qe, a as Be } from "../../input.component-C5xcmnfu.js";
|
|
4
4
|
import { useResizeObserver as Ue } from "usehooks-ts";
|
|
5
5
|
import { RefreshCw as Ne, Check as Ye } from "lucide-react";
|
|
6
|
-
import
|
|
7
|
-
import { Animation as
|
|
6
|
+
import Se from "clsx";
|
|
7
|
+
import { Animation as re } from "../../animations/animation.component.js";
|
|
8
8
|
import { C as oe } from "../../control.component-B9Ao9mfl.js";
|
|
9
9
|
import { Flex as ie } from "../flex/flex.component.js";
|
|
10
10
|
import { Text as we } from "../text/text.component.js";
|
|
@@ -14,27 +14,27 @@ var Ee;
|
|
|
14
14
|
function Ve() {
|
|
15
15
|
if (Ee) return I;
|
|
16
16
|
Ee = 1;
|
|
17
|
-
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108,
|
|
17
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, g = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, P = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
18
18
|
function $(f) {
|
|
19
19
|
if (typeof f == "object" && f !== null) {
|
|
20
20
|
var G = f.$$typeof;
|
|
21
21
|
switch (G) {
|
|
22
22
|
case a:
|
|
23
23
|
switch (f = f.type, f) {
|
|
24
|
-
case
|
|
25
|
-
case
|
|
24
|
+
case d:
|
|
25
|
+
case s:
|
|
26
26
|
case t:
|
|
27
|
-
case
|
|
27
|
+
case i:
|
|
28
28
|
case n:
|
|
29
29
|
case v:
|
|
30
30
|
return f;
|
|
31
31
|
default:
|
|
32
32
|
switch (f = f && f.$$typeof, f) {
|
|
33
|
-
case
|
|
33
|
+
case c:
|
|
34
34
|
case l:
|
|
35
35
|
case b:
|
|
36
|
-
case
|
|
37
|
-
case
|
|
36
|
+
case g:
|
|
37
|
+
case o:
|
|
38
38
|
return f;
|
|
39
39
|
default:
|
|
40
40
|
return G;
|
|
@@ -46,14 +46,14 @@ function Ve() {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function D(f) {
|
|
49
|
-
return $(f) ===
|
|
49
|
+
return $(f) === s;
|
|
50
50
|
}
|
|
51
|
-
return I.AsyncMode =
|
|
52
|
-
return D(f) || $(f) ===
|
|
51
|
+
return I.AsyncMode = d, I.ConcurrentMode = s, I.ContextConsumer = c, I.ContextProvider = o, I.Element = a, I.ForwardRef = l, I.Fragment = t, I.Lazy = b, I.Memo = g, I.Portal = r, I.Profiler = i, I.StrictMode = n, I.Suspense = v, I.isAsyncMode = function(f) {
|
|
52
|
+
return D(f) || $(f) === d;
|
|
53
53
|
}, I.isConcurrentMode = D, I.isContextConsumer = function(f) {
|
|
54
|
-
return $(f) ===
|
|
54
|
+
return $(f) === c;
|
|
55
55
|
}, I.isContextProvider = function(f) {
|
|
56
|
-
return $(f) ===
|
|
56
|
+
return $(f) === o;
|
|
57
57
|
}, I.isElement = function(f) {
|
|
58
58
|
return typeof f == "object" && f !== null && f.$$typeof === a;
|
|
59
59
|
}, I.isForwardRef = function(f) {
|
|
@@ -63,51 +63,51 @@ function Ve() {
|
|
|
63
63
|
}, I.isLazy = function(f) {
|
|
64
64
|
return $(f) === b;
|
|
65
65
|
}, I.isMemo = function(f) {
|
|
66
|
-
return $(f) ===
|
|
66
|
+
return $(f) === g;
|
|
67
67
|
}, I.isPortal = function(f) {
|
|
68
68
|
return $(f) === r;
|
|
69
69
|
}, I.isProfiler = function(f) {
|
|
70
|
-
return $(f) ===
|
|
70
|
+
return $(f) === i;
|
|
71
71
|
}, I.isStrictMode = function(f) {
|
|
72
72
|
return $(f) === n;
|
|
73
73
|
}, I.isSuspense = function(f) {
|
|
74
74
|
return $(f) === v;
|
|
75
75
|
}, I.isValidElementType = function(f) {
|
|
76
|
-
return typeof f == "string" || typeof f == "function" || f === t || f ===
|
|
76
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === s || f === i || f === n || f === v || f === y || typeof f == "object" && f !== null && (f.$$typeof === b || f.$$typeof === g || f.$$typeof === o || f.$$typeof === c || f.$$typeof === l || f.$$typeof === P || f.$$typeof === x || f.$$typeof === q || f.$$typeof === _);
|
|
77
77
|
}, I.typeOf = $, I;
|
|
78
78
|
}
|
|
79
79
|
var j = {};
|
|
80
80
|
var Te;
|
|
81
81
|
function Xe() {
|
|
82
82
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
83
|
-
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108,
|
|
84
|
-
function $(
|
|
85
|
-
return typeof
|
|
86
|
-
|
|
83
|
+
var e = typeof Symbol == "function" && Symbol.for, a = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, n = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, c = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, d = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, v = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, y = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, g = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, P = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
84
|
+
function $(p) {
|
|
85
|
+
return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
86
|
+
p === t || p === s || p === i || p === n || p === v || p === y || typeof p == "object" && p !== null && (p.$$typeof === b || p.$$typeof === g || p.$$typeof === o || p.$$typeof === c || p.$$typeof === l || p.$$typeof === P || p.$$typeof === x || p.$$typeof === q || p.$$typeof === _);
|
|
87
87
|
}
|
|
88
|
-
function D(
|
|
89
|
-
if (typeof
|
|
90
|
-
var K =
|
|
88
|
+
function D(p) {
|
|
89
|
+
if (typeof p == "object" && p !== null) {
|
|
90
|
+
var K = p.$$typeof;
|
|
91
91
|
switch (K) {
|
|
92
92
|
case a:
|
|
93
|
-
var se =
|
|
93
|
+
var se = p.type;
|
|
94
94
|
switch (se) {
|
|
95
|
-
case
|
|
96
|
-
case
|
|
95
|
+
case d:
|
|
96
|
+
case s:
|
|
97
97
|
case t:
|
|
98
|
-
case
|
|
98
|
+
case i:
|
|
99
99
|
case n:
|
|
100
100
|
case v:
|
|
101
101
|
return se;
|
|
102
102
|
default:
|
|
103
|
-
var
|
|
104
|
-
switch (
|
|
105
|
-
case
|
|
103
|
+
var xe = se && se.$$typeof;
|
|
104
|
+
switch (xe) {
|
|
105
|
+
case c:
|
|
106
106
|
case l:
|
|
107
107
|
case b:
|
|
108
|
-
case
|
|
109
|
-
case
|
|
110
|
-
return
|
|
108
|
+
case g:
|
|
109
|
+
case o:
|
|
110
|
+
return xe;
|
|
111
111
|
default:
|
|
112
112
|
return K;
|
|
113
113
|
}
|
|
@@ -117,150 +117,150 @@ function Xe() {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
var f =
|
|
121
|
-
function Z(
|
|
122
|
-
return U || (U = !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.")),
|
|
120
|
+
var f = d, G = s, N = c, Y = o, k = a, E = l, B = t, z = b, m = g, Q = r, ae = i, V = n, J = v, U = !1;
|
|
121
|
+
function Z(p) {
|
|
122
|
+
return U || (U = !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(p) || D(p) === d;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
return D(
|
|
124
|
+
function u(p) {
|
|
125
|
+
return D(p) === s;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
return D(
|
|
127
|
+
function h(p) {
|
|
128
|
+
return D(p) === c;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return D(
|
|
130
|
+
function S(p) {
|
|
131
|
+
return D(p) === o;
|
|
132
132
|
}
|
|
133
|
-
function C(
|
|
134
|
-
return typeof
|
|
133
|
+
function C(p) {
|
|
134
|
+
return typeof p == "object" && p !== null && p.$$typeof === a;
|
|
135
135
|
}
|
|
136
|
-
function w(
|
|
137
|
-
return D(
|
|
136
|
+
function w(p) {
|
|
137
|
+
return D(p) === l;
|
|
138
138
|
}
|
|
139
|
-
function O(
|
|
140
|
-
return D(
|
|
139
|
+
function O(p) {
|
|
140
|
+
return D(p) === t;
|
|
141
141
|
}
|
|
142
|
-
function T(
|
|
143
|
-
return D(
|
|
142
|
+
function T(p) {
|
|
143
|
+
return D(p) === b;
|
|
144
144
|
}
|
|
145
|
-
function R(
|
|
146
|
-
return D(
|
|
145
|
+
function R(p) {
|
|
146
|
+
return D(p) === g;
|
|
147
147
|
}
|
|
148
|
-
function M(
|
|
149
|
-
return D(
|
|
148
|
+
function M(p) {
|
|
149
|
+
return D(p) === r;
|
|
150
150
|
}
|
|
151
|
-
function W(
|
|
152
|
-
return D(
|
|
151
|
+
function W(p) {
|
|
152
|
+
return D(p) === i;
|
|
153
153
|
}
|
|
154
|
-
function A(
|
|
155
|
-
return D(
|
|
154
|
+
function A(p) {
|
|
155
|
+
return D(p) === n;
|
|
156
156
|
}
|
|
157
|
-
function H(
|
|
158
|
-
return D(
|
|
157
|
+
function H(p) {
|
|
158
|
+
return D(p) === v;
|
|
159
159
|
}
|
|
160
|
-
j.AsyncMode = f, j.ConcurrentMode = G, j.ContextConsumer = N, j.ContextProvider = Y, j.Element = k, j.ForwardRef = E, j.Fragment = B, j.Lazy =
|
|
160
|
+
j.AsyncMode = f, j.ConcurrentMode = G, j.ContextConsumer = N, j.ContextProvider = Y, j.Element = k, j.ForwardRef = E, j.Fragment = B, j.Lazy = z, j.Memo = m, j.Portal = Q, j.Profiler = ae, j.StrictMode = V, j.Suspense = J, j.isAsyncMode = Z, j.isConcurrentMode = u, j.isContextConsumer = h, j.isContextProvider = S, j.isElement = C, j.isForwardRef = w, j.isFragment = O, j.isLazy = T, j.isMemo = R, j.isPortal = M, j.isProfiler = W, j.isStrictMode = A, j.isSuspense = H, j.isValidElementType = $, j.typeOf = D;
|
|
161
161
|
})()), j;
|
|
162
162
|
}
|
|
163
163
|
var Ce;
|
|
164
164
|
function We() {
|
|
165
165
|
return Ce || (Ce = 1, process.env.NODE_ENV === "production" ? ce.exports = Ve() : ce.exports = Xe()), ce.exports;
|
|
166
166
|
}
|
|
167
|
-
var
|
|
167
|
+
var de, Re;
|
|
168
168
|
function Je() {
|
|
169
|
-
if (Re) return
|
|
169
|
+
if (Re) return de;
|
|
170
170
|
Re = 1;
|
|
171
171
|
var e = Object.getOwnPropertySymbols, a = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
172
|
-
function t(
|
|
173
|
-
if (
|
|
172
|
+
function t(i) {
|
|
173
|
+
if (i == null)
|
|
174
174
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
175
|
-
return Object(
|
|
175
|
+
return Object(i);
|
|
176
176
|
}
|
|
177
177
|
function n() {
|
|
178
178
|
try {
|
|
179
179
|
if (!Object.assign)
|
|
180
180
|
return !1;
|
|
181
|
-
var
|
|
182
|
-
if (
|
|
181
|
+
var i = new String("abc");
|
|
182
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
183
183
|
return !1;
|
|
184
|
-
for (var
|
|
185
|
-
|
|
186
|
-
var
|
|
187
|
-
return
|
|
184
|
+
for (var o = {}, c = 0; c < 10; c++)
|
|
185
|
+
o["_" + String.fromCharCode(c)] = c;
|
|
186
|
+
var d = Object.getOwnPropertyNames(o).map(function(l) {
|
|
187
|
+
return o[l];
|
|
188
188
|
});
|
|
189
|
-
if (
|
|
189
|
+
if (d.join("") !== "0123456789")
|
|
190
190
|
return !1;
|
|
191
|
-
var
|
|
191
|
+
var s = {};
|
|
192
192
|
return "abcdefghijklmnopqrst".split("").forEach(function(l) {
|
|
193
|
-
|
|
194
|
-
}), Object.keys(Object.assign({},
|
|
193
|
+
s[l] = l;
|
|
194
|
+
}), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
|
|
195
195
|
} catch {
|
|
196
196
|
return !1;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
return
|
|
200
|
-
for (var
|
|
201
|
-
|
|
202
|
-
for (var v in
|
|
203
|
-
a.call(
|
|
199
|
+
return de = n() ? Object.assign : function(i, o) {
|
|
200
|
+
for (var c, d = t(i), s, l = 1; l < arguments.length; l++) {
|
|
201
|
+
c = Object(arguments[l]);
|
|
202
|
+
for (var v in c)
|
|
203
|
+
a.call(c, v) && (d[v] = c[v]);
|
|
204
204
|
if (e) {
|
|
205
|
-
|
|
206
|
-
for (var
|
|
207
|
-
r.call(
|
|
205
|
+
s = e(c);
|
|
206
|
+
for (var y = 0; y < s.length; y++)
|
|
207
|
+
r.call(c, s[y]) && (d[s[y]] = c[s[y]]);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
return
|
|
211
|
-
},
|
|
210
|
+
return d;
|
|
211
|
+
}, de;
|
|
212
212
|
}
|
|
213
|
-
var
|
|
214
|
-
function
|
|
215
|
-
if (Oe) return
|
|
213
|
+
var he, Oe;
|
|
214
|
+
function ge() {
|
|
215
|
+
if (Oe) return he;
|
|
216
216
|
Oe = 1;
|
|
217
217
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
218
|
-
return
|
|
218
|
+
return he = e, he;
|
|
219
219
|
}
|
|
220
|
-
var
|
|
220
|
+
var pe, Me;
|
|
221
221
|
function Le() {
|
|
222
|
-
return Me || (Me = 1,
|
|
222
|
+
return Me || (Me = 1, pe = Function.call.bind(Object.prototype.hasOwnProperty)), pe;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var ve, Ae;
|
|
225
225
|
function Ze() {
|
|
226
|
-
if (Ae) return
|
|
226
|
+
if (Ae) return ve;
|
|
227
227
|
Ae = 1;
|
|
228
228
|
var e = function() {
|
|
229
229
|
};
|
|
230
230
|
if (process.env.NODE_ENV !== "production") {
|
|
231
|
-
var a = /* @__PURE__ */
|
|
232
|
-
e = function(
|
|
233
|
-
var
|
|
234
|
-
typeof console < "u" && console.error(
|
|
231
|
+
var a = /* @__PURE__ */ ge(), r = {}, t = /* @__PURE__ */ Le();
|
|
232
|
+
e = function(i) {
|
|
233
|
+
var o = "Warning: " + i;
|
|
234
|
+
typeof console < "u" && console.error(o);
|
|
235
235
|
try {
|
|
236
|
-
throw new Error(
|
|
236
|
+
throw new Error(o);
|
|
237
237
|
} catch {
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
function n(
|
|
241
|
+
function n(i, o, c, d, s) {
|
|
242
242
|
if (process.env.NODE_ENV !== "production") {
|
|
243
|
-
for (var l in
|
|
244
|
-
if (t(
|
|
243
|
+
for (var l in i)
|
|
244
|
+
if (t(i, l)) {
|
|
245
245
|
var v;
|
|
246
246
|
try {
|
|
247
|
-
if (typeof
|
|
248
|
-
var
|
|
249
|
-
(
|
|
247
|
+
if (typeof i[l] != "function") {
|
|
248
|
+
var y = Error(
|
|
249
|
+
(d || "React class") + ": " + c + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
250
250
|
);
|
|
251
|
-
throw
|
|
251
|
+
throw y.name = "Invariant Violation", y;
|
|
252
252
|
}
|
|
253
|
-
v =
|
|
253
|
+
v = i[l](o, l, d, c, null, a);
|
|
254
254
|
} catch (b) {
|
|
255
255
|
v = b;
|
|
256
256
|
}
|
|
257
257
|
if (v && !(v instanceof Error) && e(
|
|
258
|
-
(
|
|
258
|
+
(d || "React class") + ": type specification of " + c + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
259
259
|
), v instanceof Error && !(v.message in r)) {
|
|
260
260
|
r[v.message] = !0;
|
|
261
|
-
var
|
|
261
|
+
var g = s ? s() : "";
|
|
262
262
|
e(
|
|
263
|
-
"Failed " +
|
|
263
|
+
"Failed " + c + " type: " + v.message + (g ?? "")
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -268,41 +268,41 @@ function Ze() {
|
|
|
268
268
|
}
|
|
269
269
|
return n.resetWarningCache = function() {
|
|
270
270
|
process.env.NODE_ENV !== "production" && (r = {});
|
|
271
|
-
},
|
|
271
|
+
}, ve = n, ve;
|
|
272
272
|
}
|
|
273
|
-
var
|
|
273
|
+
var ye, De;
|
|
274
274
|
function Ge() {
|
|
275
|
-
if (De) return
|
|
275
|
+
if (De) return ye;
|
|
276
276
|
De = 1;
|
|
277
|
-
var e = We(), a = Je(), r = /* @__PURE__ */
|
|
277
|
+
var e = We(), a = Je(), r = /* @__PURE__ */ ge(), t = /* @__PURE__ */ Le(), n = /* @__PURE__ */ Ze(), i = function() {
|
|
278
278
|
};
|
|
279
|
-
process.env.NODE_ENV !== "production" && (
|
|
280
|
-
var
|
|
281
|
-
typeof console < "u" && console.error(
|
|
279
|
+
process.env.NODE_ENV !== "production" && (i = function(c) {
|
|
280
|
+
var d = "Warning: " + c;
|
|
281
|
+
typeof console < "u" && console.error(d);
|
|
282
282
|
try {
|
|
283
|
-
throw new Error(
|
|
283
|
+
throw new Error(d);
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
|
-
function
|
|
287
|
+
function o() {
|
|
288
288
|
return null;
|
|
289
289
|
}
|
|
290
|
-
return
|
|
291
|
-
var
|
|
292
|
-
function v(
|
|
293
|
-
var
|
|
294
|
-
if (typeof
|
|
295
|
-
return
|
|
290
|
+
return ye = function(c, d) {
|
|
291
|
+
var s = typeof Symbol == "function" && Symbol.iterator, l = "@@iterator";
|
|
292
|
+
function v(u) {
|
|
293
|
+
var h = u && (s && u[s] || u[l]);
|
|
294
|
+
if (typeof h == "function")
|
|
295
|
+
return h;
|
|
296
296
|
}
|
|
297
|
-
var
|
|
298
|
-
array:
|
|
299
|
-
bigint:
|
|
300
|
-
bool:
|
|
301
|
-
func:
|
|
302
|
-
number:
|
|
303
|
-
object:
|
|
304
|
-
string:
|
|
305
|
-
symbol:
|
|
297
|
+
var y = "<<anonymous>>", g = {
|
|
298
|
+
array: x("array"),
|
|
299
|
+
bigint: x("bigint"),
|
|
300
|
+
bool: x("boolean"),
|
|
301
|
+
func: x("function"),
|
|
302
|
+
number: x("number"),
|
|
303
|
+
object: x("object"),
|
|
304
|
+
string: x("string"),
|
|
305
|
+
symbol: x("symbol"),
|
|
306
306
|
any: q(),
|
|
307
307
|
arrayOf: $,
|
|
308
308
|
element: D(),
|
|
@@ -312,180 +312,180 @@ function Ge() {
|
|
|
312
312
|
objectOf: Y,
|
|
313
313
|
oneOf: N,
|
|
314
314
|
oneOfType: k,
|
|
315
|
-
shape:
|
|
316
|
-
exact:
|
|
315
|
+
shape: z,
|
|
316
|
+
exact: m
|
|
317
317
|
};
|
|
318
|
-
function b(
|
|
319
|
-
return
|
|
318
|
+
function b(u, h) {
|
|
319
|
+
return u === h ? u !== 0 || 1 / u === 1 / h : u !== u && h !== h;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
this.message =
|
|
321
|
+
function _(u, h) {
|
|
322
|
+
this.message = u, this.data = h && typeof h == "object" ? h : {}, this.stack = "";
|
|
323
323
|
}
|
|
324
|
-
|
|
325
|
-
function
|
|
324
|
+
_.prototype = Error.prototype;
|
|
325
|
+
function P(u) {
|
|
326
326
|
if (process.env.NODE_ENV !== "production")
|
|
327
|
-
var
|
|
327
|
+
var h = {}, S = 0;
|
|
328
328
|
function C(O, T, R, M, W, A, H) {
|
|
329
|
-
if (M = M ||
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
329
|
+
if (M = M || y, A = A || R, H !== r) {
|
|
330
|
+
if (d) {
|
|
331
|
+
var p = new Error(
|
|
332
332
|
"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"
|
|
333
333
|
);
|
|
334
|
-
throw
|
|
334
|
+
throw p.name = "Invariant Violation", p;
|
|
335
335
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
336
336
|
var K = M + ":" + R;
|
|
337
|
-
!
|
|
338
|
-
|
|
337
|
+
!h[K] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
338
|
+
S < 3 && (i(
|
|
339
339
|
"You are manually calling a React.PropTypes validation function for the `" + A + "` prop on `" + M + "`. 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."
|
|
340
|
-
),
|
|
340
|
+
), h[K] = !0, S++);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return T[R] == null ? O ? T[R] === null ? new
|
|
343
|
+
return T[R] == null ? O ? T[R] === null ? new _("The " + W + " `" + A + "` is marked as required " + ("in `" + M + "`, but its value is `null`.")) : new _("The " + W + " `" + A + "` is marked as required in " + ("`" + M + "`, but its value is `undefined`.")) : null : u(T, R, M, W, A);
|
|
344
344
|
}
|
|
345
345
|
var w = C.bind(null, !1);
|
|
346
346
|
return w.isRequired = C.bind(null, !0), w;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
function
|
|
350
|
-
var M =
|
|
351
|
-
if (W !==
|
|
348
|
+
function x(u) {
|
|
349
|
+
function h(S, C, w, O, T, R) {
|
|
350
|
+
var M = S[C], W = V(M);
|
|
351
|
+
if (W !== u) {
|
|
352
352
|
var A = J(M);
|
|
353
|
-
return new
|
|
354
|
-
"Invalid " + O + " `" + T + "` of type " + ("`" + A + "` supplied to `" + w + "`, expected ") + ("`" +
|
|
355
|
-
{ expectedType:
|
|
353
|
+
return new _(
|
|
354
|
+
"Invalid " + O + " `" + T + "` of type " + ("`" + A + "` supplied to `" + w + "`, expected ") + ("`" + u + "`."),
|
|
355
|
+
{ expectedType: u }
|
|
356
356
|
);
|
|
357
357
|
}
|
|
358
358
|
return null;
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return P(h);
|
|
361
361
|
}
|
|
362
362
|
function q() {
|
|
363
|
-
return
|
|
363
|
+
return P(o);
|
|
364
364
|
}
|
|
365
|
-
function $(
|
|
366
|
-
function
|
|
367
|
-
if (typeof
|
|
368
|
-
return new
|
|
369
|
-
var R =
|
|
365
|
+
function $(u) {
|
|
366
|
+
function h(S, C, w, O, T) {
|
|
367
|
+
if (typeof u != "function")
|
|
368
|
+
return new _("Property `" + T + "` of component `" + w + "` has invalid PropType notation inside arrayOf.");
|
|
369
|
+
var R = S[C];
|
|
370
370
|
if (!Array.isArray(R)) {
|
|
371
371
|
var M = V(R);
|
|
372
|
-
return new
|
|
372
|
+
return new _("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected an array."));
|
|
373
373
|
}
|
|
374
374
|
for (var W = 0; W < R.length; W++) {
|
|
375
|
-
var A =
|
|
375
|
+
var A = u(R, W, w, O, T + "[" + W + "]", r);
|
|
376
376
|
if (A instanceof Error)
|
|
377
377
|
return A;
|
|
378
378
|
}
|
|
379
379
|
return null;
|
|
380
380
|
}
|
|
381
|
-
return
|
|
381
|
+
return P(h);
|
|
382
382
|
}
|
|
383
383
|
function D() {
|
|
384
|
-
function
|
|
385
|
-
var T =
|
|
386
|
-
if (!
|
|
384
|
+
function u(h, S, C, w, O) {
|
|
385
|
+
var T = h[S];
|
|
386
|
+
if (!c(T)) {
|
|
387
387
|
var R = V(T);
|
|
388
|
-
return new
|
|
388
|
+
return new _("Invalid " + w + " `" + O + "` of type " + ("`" + R + "` supplied to `" + C + "`, expected a single ReactElement."));
|
|
389
389
|
}
|
|
390
390
|
return null;
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return P(u);
|
|
393
393
|
}
|
|
394
394
|
function f() {
|
|
395
|
-
function
|
|
396
|
-
var T =
|
|
395
|
+
function u(h, S, C, w, O) {
|
|
396
|
+
var T = h[S];
|
|
397
397
|
if (!e.isValidElementType(T)) {
|
|
398
398
|
var R = V(T);
|
|
399
|
-
return new
|
|
399
|
+
return new _("Invalid " + w + " `" + O + "` of type " + ("`" + R + "` supplied to `" + C + "`, expected a single ReactElement type."));
|
|
400
400
|
}
|
|
401
401
|
return null;
|
|
402
402
|
}
|
|
403
|
-
return
|
|
403
|
+
return P(u);
|
|
404
404
|
}
|
|
405
|
-
function G(
|
|
406
|
-
function
|
|
407
|
-
if (!(
|
|
408
|
-
var R =
|
|
409
|
-
return new
|
|
405
|
+
function G(u) {
|
|
406
|
+
function h(S, C, w, O, T) {
|
|
407
|
+
if (!(S[C] instanceof u)) {
|
|
408
|
+
var R = u.name || y, M = Z(S[C]);
|
|
409
|
+
return new _("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected ") + ("instance of `" + R + "`."));
|
|
410
410
|
}
|
|
411
411
|
return null;
|
|
412
412
|
}
|
|
413
|
-
return
|
|
413
|
+
return P(h);
|
|
414
414
|
}
|
|
415
|
-
function N(
|
|
416
|
-
if (!Array.isArray(
|
|
417
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
415
|
+
function N(u) {
|
|
416
|
+
if (!Array.isArray(u))
|
|
417
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
418
418
|
"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])."
|
|
419
|
-
) :
|
|
420
|
-
function
|
|
421
|
-
for (var R =
|
|
422
|
-
if (b(R,
|
|
419
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
420
|
+
function h(S, C, w, O, T) {
|
|
421
|
+
for (var R = S[C], M = 0; M < u.length; M++)
|
|
422
|
+
if (b(R, u[M]))
|
|
423
423
|
return null;
|
|
424
|
-
var W = JSON.stringify(
|
|
425
|
-
var K = J(
|
|
426
|
-
return K === "symbol" ? String(
|
|
424
|
+
var W = JSON.stringify(u, function(H, p) {
|
|
425
|
+
var K = J(p);
|
|
426
|
+
return K === "symbol" ? String(p) : p;
|
|
427
427
|
});
|
|
428
|
-
return new
|
|
428
|
+
return new _("Invalid " + O + " `" + T + "` of value `" + String(R) + "` " + ("supplied to `" + w + "`, expected one of " + W + "."));
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return P(h);
|
|
431
431
|
}
|
|
432
|
-
function Y(
|
|
433
|
-
function
|
|
434
|
-
if (typeof
|
|
435
|
-
return new
|
|
436
|
-
var R =
|
|
432
|
+
function Y(u) {
|
|
433
|
+
function h(S, C, w, O, T) {
|
|
434
|
+
if (typeof u != "function")
|
|
435
|
+
return new _("Property `" + T + "` of component `" + w + "` has invalid PropType notation inside objectOf.");
|
|
436
|
+
var R = S[C], M = V(R);
|
|
437
437
|
if (M !== "object")
|
|
438
|
-
return new
|
|
438
|
+
return new _("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected an object."));
|
|
439
439
|
for (var W in R)
|
|
440
440
|
if (t(R, W)) {
|
|
441
|
-
var A =
|
|
441
|
+
var A = u(R, W, w, O, T + "." + W, r);
|
|
442
442
|
if (A instanceof Error)
|
|
443
443
|
return A;
|
|
444
444
|
}
|
|
445
445
|
return null;
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return P(h);
|
|
448
448
|
}
|
|
449
|
-
function k(
|
|
450
|
-
if (!Array.isArray(
|
|
451
|
-
return process.env.NODE_ENV !== "production" &&
|
|
452
|
-
for (var
|
|
453
|
-
var
|
|
454
|
-
if (typeof
|
|
455
|
-
return
|
|
456
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(
|
|
457
|
-
),
|
|
449
|
+
function k(u) {
|
|
450
|
+
if (!Array.isArray(u))
|
|
451
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
452
|
+
for (var h = 0; h < u.length; h++) {
|
|
453
|
+
var S = u[h];
|
|
454
|
+
if (typeof S != "function")
|
|
455
|
+
return i(
|
|
456
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(S) + " at index " + h + "."
|
|
457
|
+
), o;
|
|
458
458
|
}
|
|
459
459
|
function C(w, O, T, R, M) {
|
|
460
|
-
for (var W = [], A = 0; A <
|
|
461
|
-
var H =
|
|
462
|
-
if (
|
|
460
|
+
for (var W = [], A = 0; A < u.length; A++) {
|
|
461
|
+
var H = u[A], p = H(w, O, T, R, M, r);
|
|
462
|
+
if (p == null)
|
|
463
463
|
return null;
|
|
464
|
-
|
|
464
|
+
p.data && t(p.data, "expectedType") && W.push(p.data.expectedType);
|
|
465
465
|
}
|
|
466
466
|
var K = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
|
|
467
|
-
return new
|
|
467
|
+
return new _("Invalid " + R + " `" + M + "` supplied to " + ("`" + T + "`" + K + "."));
|
|
468
468
|
}
|
|
469
|
-
return
|
|
469
|
+
return P(C);
|
|
470
470
|
}
|
|
471
471
|
function E() {
|
|
472
|
-
function
|
|
473
|
-
return Q(
|
|
472
|
+
function u(h, S, C, w, O) {
|
|
473
|
+
return Q(h[S]) ? null : new _("Invalid " + w + " `" + O + "` supplied to " + ("`" + C + "`, expected a ReactNode."));
|
|
474
474
|
}
|
|
475
|
-
return
|
|
475
|
+
return P(u);
|
|
476
476
|
}
|
|
477
|
-
function B(
|
|
478
|
-
return new
|
|
479
|
-
(
|
|
477
|
+
function B(u, h, S, C, w) {
|
|
478
|
+
return new _(
|
|
479
|
+
(u || "React class") + ": " + h + " type `" + S + "." + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + w + "`."
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
483
|
-
function
|
|
484
|
-
var R =
|
|
482
|
+
function z(u) {
|
|
483
|
+
function h(S, C, w, O, T) {
|
|
484
|
+
var R = S[C], M = V(R);
|
|
485
485
|
if (M !== "object")
|
|
486
|
-
return new
|
|
487
|
-
for (var W in
|
|
488
|
-
var A =
|
|
486
|
+
return new _("Invalid " + O + " `" + T + "` of type `" + M + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
487
|
+
for (var W in u) {
|
|
488
|
+
var A = u[W];
|
|
489
489
|
if (typeof A != "function")
|
|
490
490
|
return B(w, O, T, W, J(A));
|
|
491
491
|
var H = A(R, W, w, O, T + "." + W, r);
|
|
@@ -494,53 +494,53 @@ function Ge() {
|
|
|
494
494
|
}
|
|
495
495
|
return null;
|
|
496
496
|
}
|
|
497
|
-
return
|
|
497
|
+
return P(h);
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
function
|
|
501
|
-
var R =
|
|
499
|
+
function m(u) {
|
|
500
|
+
function h(S, C, w, O, T) {
|
|
501
|
+
var R = S[C], M = V(R);
|
|
502
502
|
if (M !== "object")
|
|
503
|
-
return new
|
|
504
|
-
var W = a({},
|
|
503
|
+
return new _("Invalid " + O + " `" + T + "` of type `" + M + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
504
|
+
var W = a({}, S[C], u);
|
|
505
505
|
for (var A in W) {
|
|
506
|
-
var H =
|
|
507
|
-
if (t(
|
|
506
|
+
var H = u[A];
|
|
507
|
+
if (t(u, A) && typeof H != "function")
|
|
508
508
|
return B(w, O, T, A, J(H));
|
|
509
509
|
if (!H)
|
|
510
|
-
return new
|
|
511
|
-
"Invalid " + O + " `" + T + "` key `" + A + "` supplied to `" + w + "`.\nBad object: " + JSON.stringify(
|
|
512
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
510
|
+
return new _(
|
|
511
|
+
"Invalid " + O + " `" + T + "` key `" + A + "` supplied to `" + w + "`.\nBad object: " + JSON.stringify(S[C], null, " ") + `
|
|
512
|
+
Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
513
513
|
);
|
|
514
|
-
var
|
|
515
|
-
if (
|
|
516
|
-
return
|
|
514
|
+
var p = H(R, A, w, O, T + "." + A, r);
|
|
515
|
+
if (p)
|
|
516
|
+
return p;
|
|
517
517
|
}
|
|
518
518
|
return null;
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return P(h);
|
|
521
521
|
}
|
|
522
|
-
function Q(
|
|
523
|
-
switch (typeof
|
|
522
|
+
function Q(u) {
|
|
523
|
+
switch (typeof u) {
|
|
524
524
|
case "number":
|
|
525
525
|
case "string":
|
|
526
526
|
case "undefined":
|
|
527
527
|
return !0;
|
|
528
528
|
case "boolean":
|
|
529
|
-
return !
|
|
529
|
+
return !u;
|
|
530
530
|
case "object":
|
|
531
|
-
if (Array.isArray(
|
|
532
|
-
return
|
|
533
|
-
if (
|
|
531
|
+
if (Array.isArray(u))
|
|
532
|
+
return u.every(Q);
|
|
533
|
+
if (u === null || c(u))
|
|
534
534
|
return !0;
|
|
535
|
-
var
|
|
536
|
-
if (
|
|
537
|
-
var
|
|
538
|
-
if (
|
|
539
|
-
for (; !(C =
|
|
535
|
+
var h = v(u);
|
|
536
|
+
if (h) {
|
|
537
|
+
var S = h.call(u), C;
|
|
538
|
+
if (h !== u.entries) {
|
|
539
|
+
for (; !(C = S.next()).done; )
|
|
540
540
|
if (!Q(C.value))
|
|
541
541
|
return !1;
|
|
542
542
|
} else
|
|
543
|
-
for (; !(C =
|
|
543
|
+
for (; !(C = S.next()).done; ) {
|
|
544
544
|
var w = C.value;
|
|
545
545
|
if (w && !Q(w[1]))
|
|
546
546
|
return !1;
|
|
@@ -552,68 +552,68 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
552
552
|
return !1;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function ae(
|
|
556
|
-
return
|
|
555
|
+
function ae(u, h) {
|
|
556
|
+
return u === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
|
|
557
557
|
}
|
|
558
|
-
function V(
|
|
559
|
-
var
|
|
560
|
-
return Array.isArray(
|
|
558
|
+
function V(u) {
|
|
559
|
+
var h = typeof u;
|
|
560
|
+
return Array.isArray(u) ? "array" : u instanceof RegExp ? "object" : ae(h, u) ? "symbol" : h;
|
|
561
561
|
}
|
|
562
|
-
function J(
|
|
563
|
-
if (typeof
|
|
564
|
-
return "" +
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
567
|
-
if (
|
|
562
|
+
function J(u) {
|
|
563
|
+
if (typeof u > "u" || u === null)
|
|
564
|
+
return "" + u;
|
|
565
|
+
var h = V(u);
|
|
566
|
+
if (h === "object") {
|
|
567
|
+
if (u instanceof Date)
|
|
568
568
|
return "date";
|
|
569
|
-
if (
|
|
569
|
+
if (u instanceof RegExp)
|
|
570
570
|
return "regexp";
|
|
571
571
|
}
|
|
572
|
-
return
|
|
572
|
+
return h;
|
|
573
573
|
}
|
|
574
|
-
function U(
|
|
575
|
-
var
|
|
576
|
-
switch (
|
|
574
|
+
function U(u) {
|
|
575
|
+
var h = J(u);
|
|
576
|
+
switch (h) {
|
|
577
577
|
case "array":
|
|
578
578
|
case "object":
|
|
579
|
-
return "an " +
|
|
579
|
+
return "an " + h;
|
|
580
580
|
case "boolean":
|
|
581
581
|
case "date":
|
|
582
582
|
case "regexp":
|
|
583
|
-
return "a " +
|
|
583
|
+
return "a " + h;
|
|
584
584
|
default:
|
|
585
|
-
return
|
|
585
|
+
return h;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function Z(
|
|
589
|
-
return !
|
|
588
|
+
function Z(u) {
|
|
589
|
+
return !u.constructor || !u.constructor.name ? y : u.constructor.name;
|
|
590
590
|
}
|
|
591
|
-
return
|
|
592
|
-
},
|
|
591
|
+
return g.checkPropTypes = n, g.resetWarningCache = n.resetWarningCache, g.PropTypes = g, g;
|
|
592
|
+
}, ye;
|
|
593
593
|
}
|
|
594
|
-
var
|
|
594
|
+
var me, ke;
|
|
595
595
|
function Ke() {
|
|
596
|
-
if (ke) return
|
|
596
|
+
if (ke) return me;
|
|
597
597
|
ke = 1;
|
|
598
|
-
var e = /* @__PURE__ */
|
|
598
|
+
var e = /* @__PURE__ */ ge();
|
|
599
599
|
function a() {
|
|
600
600
|
}
|
|
601
601
|
function r() {
|
|
602
602
|
}
|
|
603
|
-
return r.resetWarningCache = a,
|
|
604
|
-
function t(
|
|
603
|
+
return r.resetWarningCache = a, me = function() {
|
|
604
|
+
function t(o, c, d, s, l, v) {
|
|
605
605
|
if (v !== e) {
|
|
606
|
-
var
|
|
606
|
+
var y = new Error(
|
|
607
607
|
"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"
|
|
608
608
|
);
|
|
609
|
-
throw
|
|
609
|
+
throw y.name = "Invariant Violation", y;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
t.isRequired = t;
|
|
613
613
|
function n() {
|
|
614
614
|
return t;
|
|
615
615
|
}
|
|
616
|
-
var
|
|
616
|
+
var i = {
|
|
617
617
|
array: t,
|
|
618
618
|
bigint: t,
|
|
619
619
|
bool: t,
|
|
@@ -636,8 +636,8 @@ function Ke() {
|
|
|
636
636
|
checkPropTypes: r,
|
|
637
637
|
resetWarningCache: a
|
|
638
638
|
};
|
|
639
|
-
return
|
|
640
|
-
},
|
|
639
|
+
return i.PropTypes = i, i;
|
|
640
|
+
}, me;
|
|
641
641
|
}
|
|
642
642
|
var Ie;
|
|
643
643
|
function Qe() {
|
|
@@ -661,34 +661,34 @@ ne.prototype.distanceTo = function(e) {
|
|
|
661
661
|
ne.prototype.equals = function(e) {
|
|
662
662
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
663
663
|
};
|
|
664
|
-
function
|
|
664
|
+
function _e(e, a, r, t) {
|
|
665
665
|
this.startPoint = e, this.control1 = a, this.control2 = r, this.endPoint = t;
|
|
666
666
|
}
|
|
667
|
-
|
|
667
|
+
_e.prototype.length = function() {
|
|
668
668
|
for (var e = 10, a = 0, r = void 0, t = void 0, n = 0; n <= e; n += 1) {
|
|
669
|
-
var
|
|
669
|
+
var i = n / e, o = this._point(i, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), c = this._point(i, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
670
670
|
if (n > 0) {
|
|
671
|
-
var
|
|
672
|
-
a += Math.sqrt(
|
|
671
|
+
var d = o - r, s = c - t;
|
|
672
|
+
a += Math.sqrt(d * d + s * s);
|
|
673
673
|
}
|
|
674
|
-
r =
|
|
674
|
+
r = o, t = c;
|
|
675
675
|
}
|
|
676
676
|
return a;
|
|
677
677
|
};
|
|
678
|
-
|
|
678
|
+
_e.prototype._point = function(e, a, r, t, n) {
|
|
679
679
|
return a * (1 - e) * (1 - e) * (1 - e) + 3 * r * (1 - e) * (1 - e) * e + 3 * t * (1 - e) * e * e + n * e * e * e;
|
|
680
680
|
};
|
|
681
681
|
function et(e, a, r) {
|
|
682
|
-
var t, n,
|
|
682
|
+
var t, n, i, o = null, c = 0;
|
|
683
683
|
r || (r = {});
|
|
684
|
-
var
|
|
685
|
-
|
|
684
|
+
var d = function() {
|
|
685
|
+
c = r.leading === !1 ? 0 : Date.now(), o = null, i = e.apply(t, n), o || (t = n = null);
|
|
686
686
|
};
|
|
687
687
|
return function() {
|
|
688
|
-
var
|
|
689
|
-
!
|
|
690
|
-
var l = a - (
|
|
691
|
-
return t = this, n = arguments, l <= 0 || l > a ? (
|
|
688
|
+
var s = Date.now();
|
|
689
|
+
!c && r.leading === !1 && (c = s);
|
|
690
|
+
var l = a - (s - c);
|
|
691
|
+
return t = this, n = arguments, l <= 0 || l > a ? (o && (clearTimeout(o), o = null), c = s, i = e.apply(t, n), o || (t = n = null)) : !o && r.trailing !== !1 && (o = setTimeout(d, l)), i;
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
694
|
function L(e, a) {
|
|
@@ -703,16 +703,16 @@ function L(e, a) {
|
|
|
703
703
|
n.which === 1 && r._mouseButtonDown && (r._mouseButtonDown = !1, r._strokeEnd(n));
|
|
704
704
|
}, this._handleTouchStart = function(n) {
|
|
705
705
|
if (n.targetTouches.length === 1) {
|
|
706
|
-
var
|
|
707
|
-
r._strokeBegin(
|
|
706
|
+
var i = n.changedTouches[0];
|
|
707
|
+
r._strokeBegin(i);
|
|
708
708
|
}
|
|
709
709
|
}, this._handleTouchMove = function(n) {
|
|
710
710
|
n.preventDefault();
|
|
711
|
-
var
|
|
712
|
-
r._strokeMoveUpdate(
|
|
711
|
+
var i = n.targetTouches[0];
|
|
712
|
+
r._strokeMoveUpdate(i);
|
|
713
713
|
}, this._handleTouchEnd = function(n) {
|
|
714
|
-
var
|
|
715
|
-
|
|
714
|
+
var i = n.target === r._canvas;
|
|
715
|
+
i && (n.preventDefault(), r._strokeEnd(n));
|
|
716
716
|
}, this.on();
|
|
717
717
|
}
|
|
718
718
|
L.prototype.clear = function() {
|
|
@@ -720,9 +720,9 @@ L.prototype.clear = function() {
|
|
|
720
720
|
e.fillStyle = this.backgroundColor, e.clearRect(0, 0, a.width, a.height), e.fillRect(0, 0, a.width, a.height), this._data = [], this._reset(), this._isEmpty = !0;
|
|
721
721
|
};
|
|
722
722
|
L.prototype.fromDataURL = function(e) {
|
|
723
|
-
var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), n = r.ratio || window.devicePixelRatio || 1,
|
|
723
|
+
var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), n = r.ratio || window.devicePixelRatio || 1, i = r.width || this._canvas.width / n, o = r.height || this._canvas.height / n;
|
|
724
724
|
this._reset(), t.src = e, t.onload = function() {
|
|
725
|
-
a._ctx.drawImage(t, 0, 0,
|
|
725
|
+
a._ctx.drawImage(t, 0, 0, i, o);
|
|
726
726
|
}, this._isEmpty = !1;
|
|
727
727
|
};
|
|
728
728
|
L.prototype.toDataURL = function(e) {
|
|
@@ -749,10 +749,10 @@ L.prototype._strokeBegin = function(e) {
|
|
|
749
749
|
this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
|
|
750
750
|
};
|
|
751
751
|
L.prototype._strokeUpdate = function(e) {
|
|
752
|
-
var a = e.clientX, r = e.clientY, t = this._createPoint(a, r), n = this._data[this._data.length - 1],
|
|
753
|
-
if (!(
|
|
754
|
-
var
|
|
755
|
-
|
|
752
|
+
var a = e.clientX, r = e.clientY, t = this._createPoint(a, r), n = this._data[this._data.length - 1], i = n && n[n.length - 1], o = i && t.distanceTo(i) < this.minDistance;
|
|
753
|
+
if (!(i && o)) {
|
|
754
|
+
var c = this._addPoint(t), d = c.curve, s = c.widths;
|
|
755
|
+
d && s && this._drawCurve(d, s.start, s.end), this._data[this._data.length - 1].push({
|
|
756
756
|
x: t.x,
|
|
757
757
|
y: t.y,
|
|
758
758
|
time: t.time,
|
|
@@ -792,21 +792,21 @@ L.prototype._addPoint = function(e) {
|
|
|
792
792
|
a.length === 3 && a.unshift(a[0]), r = this._calculateCurveControlPoints(a[0], a[1], a[2]);
|
|
793
793
|
var t = r.c2;
|
|
794
794
|
r = this._calculateCurveControlPoints(a[1], a[2], a[3]);
|
|
795
|
-
var n = r.c1,
|
|
796
|
-
return a.shift(), { curve:
|
|
795
|
+
var n = r.c1, i = new _e(a[1], t, n, a[2]), o = this._calculateCurveWidths(i);
|
|
796
|
+
return a.shift(), { curve: i, widths: o };
|
|
797
797
|
}
|
|
798
798
|
return {};
|
|
799
799
|
};
|
|
800
800
|
L.prototype._calculateCurveControlPoints = function(e, a, r) {
|
|
801
|
-
var t = e.x - a.x, n = e.y - a.y,
|
|
801
|
+
var t = e.x - a.x, n = e.y - a.y, i = a.x - r.x, o = a.y - r.y, c = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, d = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, s = Math.sqrt(t * t + n * n), l = Math.sqrt(i * i + o * o), v = c.x - d.x, y = c.y - d.y, g = l / (s + l), b = { x: d.x + v * g, y: d.y + y * g }, _ = a.x - b.x, P = a.y - b.y;
|
|
802
802
|
return {
|
|
803
|
-
c1: new ne(
|
|
804
|
-
c2: new ne(
|
|
803
|
+
c1: new ne(c.x + _, c.y + P),
|
|
804
|
+
c2: new ne(d.x + _, d.y + P)
|
|
805
805
|
};
|
|
806
806
|
};
|
|
807
807
|
L.prototype._calculateCurveWidths = function(e) {
|
|
808
|
-
var a = e.startPoint, r = e.endPoint, t = { start: null, end: null }, n = this.velocityFilterWeight * r.velocityFrom(a) + (1 - this.velocityFilterWeight) * this._lastVelocity,
|
|
809
|
-
return t.start = this._lastWidth, t.end =
|
|
808
|
+
var a = e.startPoint, r = e.endPoint, t = { start: null, end: null }, n = this.velocityFilterWeight * r.velocityFrom(a) + (1 - this.velocityFilterWeight) * this._lastVelocity, i = this._strokeWidth(n);
|
|
809
|
+
return t.start = this._lastWidth, t.end = i, this._lastVelocity = n, this._lastWidth = i, t;
|
|
810
810
|
};
|
|
811
811
|
L.prototype._strokeWidth = function(e) {
|
|
812
812
|
return Math.max(this.maxWidth / (e + 1), this.minWidth);
|
|
@@ -816,15 +816,15 @@ L.prototype._drawPoint = function(e, a, r) {
|
|
|
816
816
|
t.moveTo(e, a), t.arc(e, a, r, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
817
817
|
};
|
|
818
818
|
L.prototype._drawCurve = function(e, a, r) {
|
|
819
|
-
var t = this._ctx, n = r - a,
|
|
819
|
+
var t = this._ctx, n = r - a, i = Math.floor(e.length());
|
|
820
820
|
t.beginPath();
|
|
821
|
-
for (var
|
|
822
|
-
var
|
|
823
|
-
|
|
824
|
-
var b =
|
|
825
|
-
b += 3 * v *
|
|
826
|
-
var
|
|
827
|
-
this._drawPoint(
|
|
821
|
+
for (var o = 0; o < i; o += 1) {
|
|
822
|
+
var c = o / i, d = c * c, s = d * c, l = 1 - c, v = l * l, y = v * l, g = y * e.startPoint.x;
|
|
823
|
+
g += 3 * v * c * e.control1.x, g += 3 * l * d * e.control2.x, g += s * e.endPoint.x;
|
|
824
|
+
var b = y * e.startPoint.y;
|
|
825
|
+
b += 3 * v * c * e.control1.y, b += 3 * l * d * e.control2.y, b += s * e.endPoint.y;
|
|
826
|
+
var _ = a + s * n;
|
|
827
|
+
this._drawPoint(g, b, _);
|
|
828
828
|
}
|
|
829
829
|
t.closePath(), t.fill();
|
|
830
830
|
};
|
|
@@ -836,44 +836,44 @@ L.prototype._fromData = function(e, a, r) {
|
|
|
836
836
|
for (var t = 0; t < e.length; t += 1) {
|
|
837
837
|
var n = e[t];
|
|
838
838
|
if (n.length > 1)
|
|
839
|
-
for (var
|
|
840
|
-
var
|
|
841
|
-
if (
|
|
842
|
-
this.penColor =
|
|
843
|
-
else if (
|
|
844
|
-
var
|
|
845
|
-
l && v && a(l, v,
|
|
839
|
+
for (var i = 0; i < n.length; i += 1) {
|
|
840
|
+
var o = n[i], c = new ne(o.x, o.y, o.time), d = o.color;
|
|
841
|
+
if (i === 0)
|
|
842
|
+
this.penColor = d, this._reset(), this._addPoint(c);
|
|
843
|
+
else if (i !== n.length - 1) {
|
|
844
|
+
var s = this._addPoint(c), l = s.curve, v = s.widths;
|
|
845
|
+
l && v && a(l, v, d);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
848
|
else {
|
|
849
849
|
this._reset();
|
|
850
|
-
var
|
|
851
|
-
r(
|
|
850
|
+
var y = n[0];
|
|
851
|
+
r(y);
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
855
|
L.prototype._toSVG = function() {
|
|
856
|
-
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0,
|
|
857
|
-
|
|
856
|
+
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0, i = 0, o = r.width / t, c = r.height / t, d = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
857
|
+
d.setAttributeNS(null, "width", r.width), d.setAttributeNS(null, "height", r.height), this._fromData(a, function(x, q, $) {
|
|
858
858
|
var D = document.createElement("path");
|
|
859
|
-
if (!isNaN(
|
|
860
|
-
var f = "M " +
|
|
861
|
-
D.setAttribute("d", f), D.setAttribute("stroke-width", (q.end * 2.25).toFixed(3)), D.setAttribute("stroke", $), D.setAttribute("fill", "none"), D.setAttribute("stroke-linecap", "round"),
|
|
859
|
+
if (!isNaN(x.control1.x) && !isNaN(x.control1.y) && !isNaN(x.control2.x) && !isNaN(x.control2.y)) {
|
|
860
|
+
var f = "M " + x.startPoint.x.toFixed(3) + "," + x.startPoint.y.toFixed(3) + " " + ("C " + x.control1.x.toFixed(3) + "," + x.control1.y.toFixed(3) + " ") + (x.control2.x.toFixed(3) + "," + x.control2.y.toFixed(3) + " ") + (x.endPoint.x.toFixed(3) + "," + x.endPoint.y.toFixed(3));
|
|
861
|
+
D.setAttribute("d", f), D.setAttribute("stroke-width", (q.end * 2.25).toFixed(3)), D.setAttribute("stroke", $), D.setAttribute("fill", "none"), D.setAttribute("stroke-linecap", "round"), d.appendChild(D);
|
|
862
862
|
}
|
|
863
|
-
}, function(
|
|
863
|
+
}, function(x) {
|
|
864
864
|
var q = document.createElement("circle"), $ = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
865
|
-
q.setAttribute("r", $), q.setAttribute("cx",
|
|
865
|
+
q.setAttribute("r", $), q.setAttribute("cx", x.x), q.setAttribute("cy", x.y), q.setAttribute("fill", x.color), d.appendChild(q);
|
|
866
866
|
});
|
|
867
|
-
var
|
|
867
|
+
var s = "data:image/svg+xml;base64,", l = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + n + " " + i + " " + o + " " + c + '"') + (' width="' + o + '"') + (' height="' + c + '"') + ">", v = d.innerHTML;
|
|
868
868
|
if (v === void 0) {
|
|
869
|
-
var
|
|
870
|
-
|
|
871
|
-
for (var b = 0; b <
|
|
872
|
-
|
|
873
|
-
v =
|
|
869
|
+
var y = document.createElement("dummy"), g = d.childNodes;
|
|
870
|
+
y.innerHTML = "";
|
|
871
|
+
for (var b = 0; b < g.length; b += 1)
|
|
872
|
+
y.appendChild(g[b].cloneNode(!0));
|
|
873
|
+
v = y.innerHTML;
|
|
874
874
|
}
|
|
875
|
-
var
|
|
876
|
-
return
|
|
875
|
+
var _ = "</svg>", P = l + v + _;
|
|
876
|
+
return s + btoa(P);
|
|
877
877
|
};
|
|
878
878
|
L.prototype.fromData = function(e) {
|
|
879
879
|
var a = this;
|
|
@@ -897,30 +897,30 @@ function at() {
|
|
|
897
897
|
e.exports = t();
|
|
898
898
|
})(nt, function() {
|
|
899
899
|
return (function(r) {
|
|
900
|
-
function t(
|
|
901
|
-
if (n[
|
|
902
|
-
var
|
|
903
|
-
return r[
|
|
900
|
+
function t(i) {
|
|
901
|
+
if (n[i]) return n[i].exports;
|
|
902
|
+
var o = n[i] = { exports: {}, id: i, loaded: !1 };
|
|
903
|
+
return r[i].call(o.exports, o, o.exports, t), o.loaded = !0, o.exports;
|
|
904
904
|
}
|
|
905
905
|
var n = {};
|
|
906
906
|
return t.m = r, t.c = n, t.p = "", t(0);
|
|
907
907
|
})([function(r, t) {
|
|
908
|
-
function n(
|
|
909
|
-
var l =
|
|
910
|
-
return
|
|
908
|
+
function n(s) {
|
|
909
|
+
var l = s.getContext("2d"), v = s.width, y = s.height, g = l.getImageData(0, 0, v, y).data, b = c(!0, v, y, g), _ = c(!1, v, y, g), P = d(!0, v, y, g), x = d(!1, v, y, g), q = x - P + 1, $ = _ - b + 1, D = l.getImageData(P, b, q, $);
|
|
910
|
+
return s.width = q, s.height = $, l.clearRect(0, 0, q, $), l.putImageData(D, 0, 0), s;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return { red:
|
|
912
|
+
function i(s, l, v, y) {
|
|
913
|
+
return { red: y[4 * (v * l + s)], green: y[4 * (v * l + s) + 1], blue: y[4 * (v * l + s) + 2], alpha: y[4 * (v * l + s) + 3] };
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return
|
|
915
|
+
function o(s, l, v, y) {
|
|
916
|
+
return i(s, l, v, y).alpha;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
for (var
|
|
918
|
+
function c(s, l, v, y) {
|
|
919
|
+
for (var g = s ? 1 : -1, b = s ? 0 : v - 1, _ = b; s ? _ < v : _ > -1; _ += g) for (var P = 0; P < l; P++) if (o(P, _, l, y)) return _;
|
|
920
920
|
return null;
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
for (var
|
|
922
|
+
function d(s, l, v, y) {
|
|
923
|
+
for (var g = s ? 1 : -1, b = s ? 0 : l - 1, _ = b; s ? _ < l : _ > -1; _ += g) for (var P = 0; P < v; P++) if (o(_, P, l, y)) return _;
|
|
924
924
|
return null;
|
|
925
925
|
}
|
|
926
926
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
|
|
@@ -933,115 +933,115 @@ function it() {
|
|
|
933
933
|
return $e || ($e = 1, (function(e, a) {
|
|
934
934
|
(function(r, t) {
|
|
935
935
|
e.exports = t(/* @__PURE__ */ Qe(), ze, rt, at());
|
|
936
|
-
})(ot, function(r, t, n,
|
|
937
|
-
return (function(
|
|
938
|
-
function
|
|
939
|
-
if (
|
|
940
|
-
var l =
|
|
941
|
-
return
|
|
936
|
+
})(ot, function(r, t, n, i) {
|
|
937
|
+
return (function(o) {
|
|
938
|
+
function c(s) {
|
|
939
|
+
if (d[s]) return d[s].exports;
|
|
940
|
+
var l = d[s] = { exports: {}, id: s, loaded: !1 };
|
|
941
|
+
return o[s].call(l.exports, l, l.exports, c), l.loaded = !0, l.exports;
|
|
942
942
|
}
|
|
943
|
-
var
|
|
944
|
-
return
|
|
945
|
-
})([function(
|
|
946
|
-
function
|
|
943
|
+
var d = {};
|
|
944
|
+
return c.m = o, c.c = d, c.p = "", c(0);
|
|
945
|
+
})([function(o, c, d) {
|
|
946
|
+
function s(k) {
|
|
947
947
|
return k && k.__esModule ? k : { default: k };
|
|
948
948
|
}
|
|
949
949
|
function l(k, E) {
|
|
950
950
|
var B = {};
|
|
951
|
-
for (var
|
|
951
|
+
for (var z in k) E.indexOf(z) >= 0 || Object.prototype.hasOwnProperty.call(k, z) && (B[z] = k[z]);
|
|
952
952
|
return B;
|
|
953
953
|
}
|
|
954
954
|
function v(k, E) {
|
|
955
955
|
if (!(k instanceof E)) throw new TypeError("Cannot call a class as a function");
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function y(k, E) {
|
|
958
958
|
if (!k) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
959
959
|
return !E || typeof E != "object" && typeof E != "function" ? k : E;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function g(k, E) {
|
|
962
962
|
if (typeof E != "function" && E !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof E);
|
|
963
963
|
k.prototype = Object.create(E && E.prototype, { constructor: { value: k, enumerable: !1, writable: !0, configurable: !0 } }), E && (Object.setPrototypeOf ? Object.setPrototypeOf(k, E) : k.__proto__ = E);
|
|
964
964
|
}
|
|
965
|
-
Object.defineProperty(
|
|
965
|
+
Object.defineProperty(c, "__esModule", { value: !0 });
|
|
966
966
|
var b = Object.assign || function(k) {
|
|
967
967
|
for (var E = 1; E < arguments.length; E++) {
|
|
968
968
|
var B = arguments[E];
|
|
969
|
-
for (var
|
|
969
|
+
for (var z in B) Object.prototype.hasOwnProperty.call(B, z) && (k[z] = B[z]);
|
|
970
970
|
}
|
|
971
971
|
return k;
|
|
972
|
-
},
|
|
972
|
+
}, _ = /* @__PURE__ */ (function() {
|
|
973
973
|
function k(E, B) {
|
|
974
|
-
for (var
|
|
975
|
-
var
|
|
976
|
-
|
|
974
|
+
for (var z = 0; z < B.length; z++) {
|
|
975
|
+
var m = B[z];
|
|
976
|
+
m.enumerable = m.enumerable || !1, m.configurable = !0, "value" in m && (m.writable = !0), Object.defineProperty(E, m.key, m);
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
return function(E, B,
|
|
980
|
-
return B && k(E.prototype, B),
|
|
979
|
+
return function(E, B, z) {
|
|
980
|
+
return B && k(E.prototype, B), z && k(E, z), E;
|
|
981
981
|
};
|
|
982
|
-
})(),
|
|
982
|
+
})(), P = d(1), x = s(P), q = d(2), $ = s(q), D = d(3), f = s(D), G = d(4), N = s(G), Y = (function(k) {
|
|
983
983
|
function E() {
|
|
984
|
-
var B,
|
|
984
|
+
var B, z, m, Q;
|
|
985
985
|
v(this, E);
|
|
986
986
|
for (var ae = arguments.length, V = Array(ae), J = 0; J < ae; J++) V[J] = arguments[J];
|
|
987
|
-
return
|
|
988
|
-
var U =
|
|
987
|
+
return z = m = y(this, (B = E.__proto__ || Object.getPrototypeOf(E)).call.apply(B, [this].concat(V))), m._sigPad = null, m._excludeOurProps = function() {
|
|
988
|
+
var U = m.props, Z = (U.canvasProps, U.clearOnResize, l(U, ["canvasProps", "clearOnResize"]));
|
|
989
989
|
return Z;
|
|
990
|
-
},
|
|
991
|
-
return
|
|
992
|
-
},
|
|
990
|
+
}, m.getCanvas = function() {
|
|
991
|
+
return m._canvas;
|
|
992
|
+
}, m.getTrimmedCanvas = function() {
|
|
993
993
|
var U = document.createElement("canvas");
|
|
994
|
-
return U.width =
|
|
995
|
-
},
|
|
996
|
-
return
|
|
997
|
-
},
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
var U =
|
|
1001
|
-
if (!Z || !
|
|
1002
|
-
var
|
|
1003
|
-
Z || (
|
|
994
|
+
return U.width = m._canvas.width, U.height = m._canvas.height, U.getContext("2d").drawImage(m._canvas, 0, 0), (0, N.default)(U);
|
|
995
|
+
}, m.getSignaturePad = function() {
|
|
996
|
+
return m._sigPad;
|
|
997
|
+
}, m._checkClearOnResize = function() {
|
|
998
|
+
m.props.clearOnResize && m._resizeCanvas();
|
|
999
|
+
}, m._resizeCanvas = function() {
|
|
1000
|
+
var U = m.props.canvasProps || {}, Z = U.width, u = U.height;
|
|
1001
|
+
if (!Z || !u) {
|
|
1002
|
+
var h = m._canvas, S = Math.max(window.devicePixelRatio || 1, 1);
|
|
1003
|
+
Z || (h.width = h.offsetWidth * S), u || (h.height = h.offsetHeight * S), h.getContext("2d").scale(S, S), m.clear();
|
|
1004
1004
|
}
|
|
1005
|
-
},
|
|
1006
|
-
return window.addEventListener("resize",
|
|
1007
|
-
},
|
|
1008
|
-
return window.removeEventListener("resize",
|
|
1009
|
-
},
|
|
1010
|
-
return
|
|
1011
|
-
},
|
|
1012
|
-
return
|
|
1013
|
-
},
|
|
1014
|
-
return
|
|
1015
|
-
},
|
|
1016
|
-
return
|
|
1017
|
-
},
|
|
1018
|
-
return
|
|
1019
|
-
},
|
|
1020
|
-
return
|
|
1021
|
-
}, Q =
|
|
1005
|
+
}, m.on = function() {
|
|
1006
|
+
return window.addEventListener("resize", m._checkClearOnResize), m._sigPad.on();
|
|
1007
|
+
}, m.off = function() {
|
|
1008
|
+
return window.removeEventListener("resize", m._checkClearOnResize), m._sigPad.off();
|
|
1009
|
+
}, m.clear = function() {
|
|
1010
|
+
return m._sigPad.clear();
|
|
1011
|
+
}, m.isEmpty = function() {
|
|
1012
|
+
return m._sigPad.isEmpty();
|
|
1013
|
+
}, m.fromDataURL = function(U, Z) {
|
|
1014
|
+
return m._sigPad.fromDataURL(U, Z);
|
|
1015
|
+
}, m.toDataURL = function(U, Z) {
|
|
1016
|
+
return m._sigPad.toDataURL(U, Z);
|
|
1017
|
+
}, m.fromData = function(U) {
|
|
1018
|
+
return m._sigPad.fromData(U);
|
|
1019
|
+
}, m.toData = function() {
|
|
1020
|
+
return m._sigPad.toData();
|
|
1021
|
+
}, Q = z, y(m, Q);
|
|
1022
1022
|
}
|
|
1023
|
-
return
|
|
1023
|
+
return g(E, k), _(E, [{ key: "componentDidMount", value: function() {
|
|
1024
1024
|
this._sigPad = new f.default(this._canvas, this._excludeOurProps()), this._resizeCanvas(), this.on();
|
|
1025
1025
|
} }, { key: "componentWillUnmount", value: function() {
|
|
1026
1026
|
this.off();
|
|
1027
1027
|
} }, { key: "componentDidUpdate", value: function() {
|
|
1028
1028
|
Object.assign(this._sigPad, this._excludeOurProps());
|
|
1029
1029
|
} }, { key: "render", value: function() {
|
|
1030
|
-
var B = this,
|
|
1031
|
-
return $.default.createElement("canvas", b({ ref: function(
|
|
1032
|
-
B._canvas =
|
|
1033
|
-
} },
|
|
1030
|
+
var B = this, z = this.props.canvasProps;
|
|
1031
|
+
return $.default.createElement("canvas", b({ ref: function(m) {
|
|
1032
|
+
B._canvas = m;
|
|
1033
|
+
} }, z));
|
|
1034
1034
|
} }]), E;
|
|
1035
1035
|
})(q.Component);
|
|
1036
|
-
Y.propTypes = { velocityFilterWeight:
|
|
1037
|
-
}, function(
|
|
1038
|
-
|
|
1039
|
-
}, function(
|
|
1040
|
-
|
|
1041
|
-
}, function(
|
|
1042
|
-
|
|
1043
|
-
}, function(
|
|
1044
|
-
|
|
1036
|
+
Y.propTypes = { velocityFilterWeight: x.default.number, minWidth: x.default.number, maxWidth: x.default.number, minDistance: x.default.number, dotSize: x.default.oneOfType([x.default.number, x.default.func]), penColor: x.default.string, throttle: x.default.number, onEnd: x.default.func, onBegin: x.default.func, canvasProps: x.default.object, clearOnResize: x.default.bool }, Y.defaultProps = { clearOnResize: !0 }, c.default = Y;
|
|
1037
|
+
}, function(o, c) {
|
|
1038
|
+
o.exports = r;
|
|
1039
|
+
}, function(o, c) {
|
|
1040
|
+
o.exports = t;
|
|
1041
|
+
}, function(o, c) {
|
|
1042
|
+
o.exports = n;
|
|
1043
|
+
}, function(o, c) {
|
|
1044
|
+
o.exports = i;
|
|
1045
1045
|
}]);
|
|
1046
1046
|
});
|
|
1047
1047
|
})(le)), le.exports;
|
|
@@ -1062,61 +1062,59 @@ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMa
|
|
|
1062
1062
|
SignatureAutoPanelNoteIcon: xt,
|
|
1063
1063
|
SignatureAutoPanelButton: bt
|
|
1064
1064
|
}, kt = (e) => {
|
|
1065
|
-
const {
|
|
1066
|
-
|
|
1067
|
-
width: +
|
|
1068
|
-
height: +
|
|
1065
|
+
const { isInAutoMode: a, valueAuto: r, valueManual: t, onUpdateAuto: n, onUpdateManual: i, onChange: o, className: c = "" } = e, d = Fe(null), [s, l] = be(null), [v, y] = be("auto-generated"), { width: g = 0, height: b = 0 } = Ue({ ref: d, box: "border-box" }), _ = a ? "auto-generated" : v === "manual-drawn" ? "manual-drawn" : t ? "manual-stored" : "manual-blank", P = te(() => {
|
|
1066
|
+
s && g && b && t && s.fromDataURL(t, {
|
|
1067
|
+
width: +g.toFixed(),
|
|
1068
|
+
height: +b.toFixed()
|
|
1069
1069
|
});
|
|
1070
|
-
}, [
|
|
1071
|
-
if (
|
|
1072
|
-
const Y =
|
|
1073
|
-
|
|
1070
|
+
}, [s, g, b, t]), x = te(() => {
|
|
1071
|
+
if (s) {
|
|
1072
|
+
const Y = s.getCanvas().toDataURL("image/png");
|
|
1073
|
+
y("manual-drawn"), i(Y), o(Y);
|
|
1074
1074
|
}
|
|
1075
|
-
}, [
|
|
1076
|
-
|
|
1077
|
-
}, [
|
|
1078
|
-
|
|
1079
|
-
}, [
|
|
1080
|
-
|
|
1081
|
-
}, [
|
|
1082
|
-
|
|
1083
|
-
}, [
|
|
1084
|
-
|
|
1085
|
-
}, [
|
|
1086
|
-
return
|
|
1087
|
-
!a
|
|
1088
|
-
}, [a,
|
|
1089
|
-
|
|
1090
|
-
}, [
|
|
1091
|
-
r && t ? i(t) : !r && !n && i("");
|
|
1092
|
-
}, [r, t, n, i]), /* @__PURE__ */ ee("div", { className: Pe(X.Signature, p), children: [
|
|
1075
|
+
}, [s, o, i]), q = te(() => {
|
|
1076
|
+
s && (s.clear(), i(""), o(""));
|
|
1077
|
+
}, [s, o, i]), $ = te(() => {
|
|
1078
|
+
n(!0), y("auto-generated"), r && o(r);
|
|
1079
|
+
}, [n, r, o]), D = te(() => {
|
|
1080
|
+
n(!1), y(t ? "manual-stored" : "manual-blank"), t ? (o(t), setTimeout(P, 0)) : o("");
|
|
1081
|
+
}, [n, t, o, P]), f = te(() => {
|
|
1082
|
+
n(!1), y("manual-blank"), i(""), o("");
|
|
1083
|
+
}, [n, i, o]), G = te(() => {
|
|
1084
|
+
y("manual-stored"), P();
|
|
1085
|
+
}, [P]), N = (Y) => Y.includes(_);
|
|
1086
|
+
return Pe(() => {
|
|
1087
|
+
!a && t && g && b && P();
|
|
1088
|
+
}, [a, t, g, b, P]), Pe(() => {
|
|
1089
|
+
a && r ? o(r) : !a && !t && o("");
|
|
1090
|
+
}, [a, r, t, o]), /* @__PURE__ */ ee("div", { className: Se(X.Signature, c), children: [
|
|
1093
1091
|
/* @__PURE__ */ ee(
|
|
1094
1092
|
"div",
|
|
1095
1093
|
{
|
|
1096
|
-
className:
|
|
1094
|
+
className: Se(
|
|
1097
1095
|
X.SignatureMain,
|
|
1098
1096
|
N(["auto-generated"]) ? X.SignatureMainAuto : X.SignatureMainManual
|
|
1099
1097
|
),
|
|
1100
|
-
ref:
|
|
1098
|
+
ref: d,
|
|
1101
1099
|
children: [
|
|
1102
1100
|
/* @__PURE__ */ ee(ie, { direction: "row", justify: N(["manual-drawn"]) ? "end" : "center", className: X.SignatureHeader, children: [
|
|
1103
1101
|
/* @__PURE__ */ ee(we.Tag, { tag: "h6", weight: "medium", size: "regular", color: "primary", align: "center", children: [
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ F(re.FadeScale, { name: "generated-signature", condition: N(["auto-generated"]), children: "Wir haben eine digitale Signature Sie generiert." }),
|
|
1103
|
+
/* @__PURE__ */ F(re.FadeScale, { flex: !0, name: "create-signature", condition: N(["manual-blank", "manual-stored"]), children: "Ihre Signatur:" })
|
|
1106
1104
|
] }),
|
|
1107
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ F(re.FadeSlide, { flex: !0, name: "reset", direction: "rtl", condition: N(["manual-drawn"]), children: /* @__PURE__ */ F("div", { className: X.SignatureHeaderReset, children: /* @__PURE__ */ F(oe.ButtonText, { blurAfterClick: !0, underlined: !0, icon: /* @__PURE__ */ F(Ne, {}), onClick: q, children: "Neu starten" }) }) })
|
|
1108
1106
|
] }),
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */
|
|
1111
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ F(ie, { direction: "row", align: "end", justify: "center", children: N(["auto-generated"]) ? /* @__PURE__ */ ee(ie, { direction: "column", align: "center", justify: "start", children: [
|
|
1108
|
+
/* @__PURE__ */ F(re.FadeScale, { flex: !0, name: "signature", condition: r !== "", children: /* @__PURE__ */ F("img", { className: X.SignatureAutoPanelImage, src: r, alt: "signature" }) }),
|
|
1109
|
+
/* @__PURE__ */ F(re.FadeScale, { flex: !0, name: "signature", condition: r === "", children: /* @__PURE__ */ F("div", { className: X.SignatureAutoPanelLoader, children: /* @__PURE__ */ F(He, { size: "sm", color: "primary" }) }) }),
|
|
1112
1110
|
/* @__PURE__ */ ee(ie, { direction: "row", align: "center", justify: "center", gap: "xxs", mt: "xs", children: [
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ F(Ye, { size: 24, className: X.SignatureAutoPanelNoteIcon }),
|
|
1112
|
+
/* @__PURE__ */ F(we.Tag, { weight: "regular", size: "small", color: "secondary", children: "Diese Unterschrift ist ausreichend" })
|
|
1115
1113
|
] }),
|
|
1116
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ F("div", { className: X.SignatureAutoPanelButton, children: /* @__PURE__ */ F(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: D, children: "per Hand/Maus unterschreiben" }) })
|
|
1117
1115
|
] }) : /* @__PURE__ */ ee("div", { className: X.SignatureManualPanel, children: [
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
N(["manual-stored"]) ? /* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ F("div", { className: X.SignatureManualPanelPlaceholder }),
|
|
1117
|
+
N(["manual-stored"]) ? /* @__PURE__ */ F("img", { width: g, height: b, alt: "signature", src: t }) : /* @__PURE__ */ F(
|
|
1120
1118
|
ut,
|
|
1121
1119
|
{
|
|
1122
1120
|
penColor: "#262626",
|
|
@@ -1124,28 +1122,28 @@ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMa
|
|
|
1124
1122
|
minWidth: 0.25,
|
|
1125
1123
|
maxWidth: 2.75,
|
|
1126
1124
|
throttle: 12,
|
|
1127
|
-
canvasProps: { width: +(
|
|
1128
|
-
ref: (Y) =>
|
|
1125
|
+
canvasProps: { width: +(g || 0).toFixed(), height: +(b || 0).toFixed() },
|
|
1126
|
+
ref: (Y) => l(Y),
|
|
1129
1127
|
clearOnResize: !0,
|
|
1130
|
-
onEnd:
|
|
1128
|
+
onEnd: x
|
|
1131
1129
|
}
|
|
1132
1130
|
),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
|
|
1131
|
+
/* @__PURE__ */ F(
|
|
1132
|
+
re.FadeScale,
|
|
1135
1133
|
{
|
|
1136
1134
|
name: "to-generated",
|
|
1137
1135
|
condition: N(["manual-stored"]),
|
|
1138
1136
|
className: X.SignatureManualPanelButton,
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1137
|
+
children: /* @__PURE__ */ F(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: f, children: "Zurücksetzen" })
|
|
1140
1138
|
}
|
|
1141
1139
|
)
|
|
1142
1140
|
] }) })
|
|
1143
1141
|
]
|
|
1144
1142
|
}
|
|
1145
1143
|
),
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
|
|
1148
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ F(re.FadeScale, { name: "footer", condition: N(["manual-blank", "manual-drawn"]), children: /* @__PURE__ */ ee(ie, { direction: "row", align: "center", justify: "space-between", gap: "md", mt: "md", children: [
|
|
1145
|
+
/* @__PURE__ */ F(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "tertiary", onClick: $, children: "Abbrechen" }),
|
|
1146
|
+
/* @__PURE__ */ F(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "primary", disabled: !t, onClick: G, children: "Speichern" })
|
|
1149
1147
|
] }) })
|
|
1150
1148
|
] });
|
|
1151
1149
|
};
|