@arthurzakharov/ui-kit 1.9.0 → 1.9.1
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,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import We, { useRef as ze, useState as oe, useCallback as
|
|
1
|
+
import { jsxs as te, jsx as Y } from "react/jsx-runtime";
|
|
2
|
+
import We, { useRef as ze, useState as oe, useCallback as re, useEffect as xe } from "react";
|
|
3
3
|
import { useResizeObserver as Ne } from "usehooks-ts";
|
|
4
4
|
import { RefreshCw as Fe, RotateCcw as qe, Check as Be } from "lucide-react";
|
|
5
5
|
import fe from "clsx";
|
|
6
6
|
import { Button as Pe } from "../../controls/buttons/button/button.component.js";
|
|
7
7
|
import "../../controls/primitives/box/box.component.js";
|
|
8
8
|
import "../../utils/content/content.component.js";
|
|
9
|
-
import { baseProps as
|
|
9
|
+
import { baseProps as Ee } from "../../utils/functions/functions.util.js";
|
|
10
10
|
import { ButtonText as ie } from "../../controls/buttons/button-text/button-text.component.js";
|
|
11
11
|
import { Loader as Ue } from "../loader/loader.component.js";
|
|
12
12
|
import '../../assets/signature-CYVRZH6h.css';function He(e) {
|
|
@@ -37,29 +37,29 @@ function Ye(e) {
|
|
|
37
37
|
}), r;
|
|
38
38
|
}
|
|
39
39
|
var ce = { exports: {} }, se = { exports: {} }, ue = { exports: {} }, I = {};
|
|
40
|
-
var
|
|
40
|
+
var we;
|
|
41
41
|
function Ve() {
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
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,
|
|
45
|
-
function
|
|
42
|
+
if (we) return I;
|
|
43
|
+
we = 1;
|
|
44
|
+
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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = 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, u = 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, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
45
|
+
function R(f) {
|
|
46
46
|
if (typeof f == "object" && f !== null) {
|
|
47
47
|
var Z = f.$$typeof;
|
|
48
48
|
switch (Z) {
|
|
49
49
|
case a:
|
|
50
50
|
switch (f = f.type, f) {
|
|
51
|
-
case
|
|
52
|
-
case
|
|
51
|
+
case d:
|
|
52
|
+
case s:
|
|
53
53
|
case t:
|
|
54
|
-
case
|
|
54
|
+
case o:
|
|
55
55
|
case n:
|
|
56
|
-
case
|
|
56
|
+
case v:
|
|
57
57
|
return f;
|
|
58
58
|
default:
|
|
59
59
|
switch (f = f && f.$$typeof, f) {
|
|
60
|
-
case o:
|
|
61
60
|
case l:
|
|
62
|
-
case
|
|
61
|
+
case u:
|
|
62
|
+
case x:
|
|
63
63
|
case b:
|
|
64
64
|
case c:
|
|
65
65
|
return f;
|
|
@@ -72,66 +72,66 @@ function Ve() {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return
|
|
75
|
+
function j(f) {
|
|
76
|
+
return R(f) === s;
|
|
77
77
|
}
|
|
78
|
-
return I.AsyncMode =
|
|
79
|
-
return
|
|
80
|
-
}, I.isConcurrentMode =
|
|
81
|
-
return
|
|
78
|
+
return I.AsyncMode = d, I.ConcurrentMode = s, I.ContextConsumer = l, I.ContextProvider = c, I.Element = a, I.ForwardRef = u, I.Fragment = t, I.Lazy = x, I.Memo = b, I.Portal = r, I.Profiler = o, I.StrictMode = n, I.Suspense = v, I.isAsyncMode = function(f) {
|
|
79
|
+
return j(f) || R(f) === d;
|
|
80
|
+
}, I.isConcurrentMode = j, I.isContextConsumer = function(f) {
|
|
81
|
+
return R(f) === l;
|
|
82
82
|
}, I.isContextProvider = function(f) {
|
|
83
|
-
return
|
|
83
|
+
return R(f) === c;
|
|
84
84
|
}, I.isElement = function(f) {
|
|
85
85
|
return typeof f == "object" && f !== null && f.$$typeof === a;
|
|
86
86
|
}, I.isForwardRef = function(f) {
|
|
87
|
-
return
|
|
87
|
+
return R(f) === u;
|
|
88
88
|
}, I.isFragment = function(f) {
|
|
89
|
-
return
|
|
89
|
+
return R(f) === t;
|
|
90
90
|
}, I.isLazy = function(f) {
|
|
91
|
-
return
|
|
91
|
+
return R(f) === x;
|
|
92
92
|
}, I.isMemo = function(f) {
|
|
93
|
-
return
|
|
93
|
+
return R(f) === b;
|
|
94
94
|
}, I.isPortal = function(f) {
|
|
95
|
-
return
|
|
95
|
+
return R(f) === r;
|
|
96
96
|
}, I.isProfiler = function(f) {
|
|
97
|
-
return
|
|
97
|
+
return R(f) === o;
|
|
98
98
|
}, I.isStrictMode = function(f) {
|
|
99
|
-
return
|
|
99
|
+
return R(f) === n;
|
|
100
100
|
}, I.isSuspense = function(f) {
|
|
101
|
-
return
|
|
101
|
+
return R(f) === v;
|
|
102
102
|
}, I.isValidElementType = function(f) {
|
|
103
|
-
return typeof f == "string" || typeof f == "function" || f === t || f ===
|
|
104
|
-
}, I.typeOf =
|
|
103
|
+
return typeof f == "string" || typeof f == "function" || f === t || f === s || f === o || f === n || f === v || f === y || typeof f == "object" && f !== null && (f.$$typeof === x || f.$$typeof === b || f.$$typeof === c || f.$$typeof === l || f.$$typeof === u || f.$$typeof === T || f.$$typeof === g || f.$$typeof === W || f.$$typeof === _);
|
|
104
|
+
}, I.typeOf = R, I;
|
|
105
105
|
}
|
|
106
106
|
var L = {};
|
|
107
107
|
var Te;
|
|
108
108
|
function Xe() {
|
|
109
109
|
return Te || (Te = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
110
|
-
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,
|
|
111
|
-
function
|
|
110
|
+
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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = 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, u = 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, b = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, _ = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, T = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
111
|
+
function R(p) {
|
|
112
112
|
return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
113
|
-
p === t || p ===
|
|
113
|
+
p === t || p === s || p === o || p === n || p === v || p === y || typeof p == "object" && p !== null && (p.$$typeof === x || p.$$typeof === b || p.$$typeof === c || p.$$typeof === l || p.$$typeof === u || p.$$typeof === T || p.$$typeof === g || p.$$typeof === W || p.$$typeof === _);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function j(p) {
|
|
116
116
|
if (typeof p == "object" && p !== null) {
|
|
117
117
|
var G = p.$$typeof;
|
|
118
118
|
switch (G) {
|
|
119
119
|
case a:
|
|
120
120
|
var ae = p.type;
|
|
121
121
|
switch (ae) {
|
|
122
|
-
case
|
|
123
|
-
case
|
|
122
|
+
case d:
|
|
123
|
+
case s:
|
|
124
124
|
case t:
|
|
125
|
-
case
|
|
125
|
+
case o:
|
|
126
126
|
case n:
|
|
127
|
-
case
|
|
127
|
+
case v:
|
|
128
128
|
return ae;
|
|
129
129
|
default:
|
|
130
130
|
var be = ae && ae.$$typeof;
|
|
131
131
|
switch (be) {
|
|
132
|
-
case o:
|
|
133
132
|
case l:
|
|
134
|
-
case
|
|
133
|
+
case u:
|
|
134
|
+
case x:
|
|
135
135
|
case b:
|
|
136
136
|
case c:
|
|
137
137
|
return be;
|
|
@@ -144,47 +144,47 @@ function Xe() {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
var f =
|
|
147
|
+
var f = d, Z = s, Q = l, K = c, A = a, P = u, q = t, F = x, m = b, H = r, ee = o, z = n, V = v, B = !1;
|
|
148
148
|
function J(p) {
|
|
149
|
-
return
|
|
149
|
+
return B || (B = !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.")), i(p) || j(p) === d;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return
|
|
151
|
+
function i(p) {
|
|
152
|
+
return j(p) === s;
|
|
153
153
|
}
|
|
154
154
|
function h(p) {
|
|
155
|
-
return
|
|
155
|
+
return j(p) === l;
|
|
156
156
|
}
|
|
157
157
|
function E(p) {
|
|
158
|
-
return
|
|
158
|
+
return j(p) === c;
|
|
159
159
|
}
|
|
160
160
|
function C(p) {
|
|
161
161
|
return typeof p == "object" && p !== null && p.$$typeof === a;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return
|
|
163
|
+
function w(p) {
|
|
164
|
+
return j(p) === u;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
166
|
+
function M(p) {
|
|
167
|
+
return j(p) === t;
|
|
168
168
|
}
|
|
169
169
|
function S(p) {
|
|
170
|
-
return
|
|
170
|
+
return j(p) === x;
|
|
171
171
|
}
|
|
172
172
|
function O(p) {
|
|
173
|
-
return
|
|
173
|
+
return j(p) === b;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function D(p) {
|
|
176
|
+
return j(p) === r;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
178
|
+
function $(p) {
|
|
179
|
+
return j(p) === o;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
181
|
+
function k(p) {
|
|
182
|
+
return j(p) === n;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
184
|
+
function X(p) {
|
|
185
|
+
return j(p) === v;
|
|
186
186
|
}
|
|
187
|
-
L.AsyncMode = f, L.ConcurrentMode = Z, L.ContextConsumer =
|
|
187
|
+
L.AsyncMode = f, L.ConcurrentMode = Z, L.ContextConsumer = Q, L.ContextProvider = K, L.Element = A, L.ForwardRef = P, L.Fragment = q, L.Lazy = F, L.Memo = m, L.Portal = H, L.Profiler = ee, L.StrictMode = z, L.Suspense = V, L.isAsyncMode = J, L.isConcurrentMode = i, L.isContextConsumer = h, L.isContextProvider = E, L.isElement = C, L.isForwardRef = w, L.isFragment = M, L.isLazy = S, L.isMemo = O, L.isPortal = D, L.isProfiler = $, L.isStrictMode = k, L.isSuspense = X, L.isValidElementType = R, L.typeOf = j;
|
|
188
188
|
})()), L;
|
|
189
189
|
}
|
|
190
190
|
var Se;
|
|
@@ -196,45 +196,45 @@ function Je() {
|
|
|
196
196
|
if (Ce) return de;
|
|
197
197
|
Ce = 1;
|
|
198
198
|
var e = Object.getOwnPropertySymbols, a = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
199
|
-
function t(
|
|
200
|
-
if (
|
|
199
|
+
function t(o) {
|
|
200
|
+
if (o == null)
|
|
201
201
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
202
|
-
return Object(
|
|
202
|
+
return Object(o);
|
|
203
203
|
}
|
|
204
204
|
function n() {
|
|
205
205
|
try {
|
|
206
206
|
if (!Object.assign)
|
|
207
207
|
return !1;
|
|
208
|
-
var
|
|
209
|
-
if (
|
|
208
|
+
var o = new String("abc");
|
|
209
|
+
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
210
210
|
return !1;
|
|
211
|
-
for (var c = {},
|
|
212
|
-
c["_" + String.fromCharCode(
|
|
213
|
-
var
|
|
214
|
-
return c[
|
|
211
|
+
for (var c = {}, l = 0; l < 10; l++)
|
|
212
|
+
c["_" + String.fromCharCode(l)] = l;
|
|
213
|
+
var d = Object.getOwnPropertyNames(c).map(function(u) {
|
|
214
|
+
return c[u];
|
|
215
215
|
});
|
|
216
|
-
if (
|
|
216
|
+
if (d.join("") !== "0123456789")
|
|
217
217
|
return !1;
|
|
218
|
-
var
|
|
219
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
220
|
-
u
|
|
221
|
-
}), Object.keys(Object.assign({},
|
|
218
|
+
var s = {};
|
|
219
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(u) {
|
|
220
|
+
s[u] = u;
|
|
221
|
+
}), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
|
|
222
222
|
} catch {
|
|
223
223
|
return !1;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
return de = n() ? Object.assign : function(
|
|
227
|
-
for (var
|
|
228
|
-
|
|
229
|
-
for (var
|
|
230
|
-
a.call(
|
|
226
|
+
return de = n() ? Object.assign : function(o, c) {
|
|
227
|
+
for (var l, d = t(o), s, u = 1; u < arguments.length; u++) {
|
|
228
|
+
l = Object(arguments[u]);
|
|
229
|
+
for (var v in l)
|
|
230
|
+
a.call(l, v) && (d[v] = l[v]);
|
|
231
231
|
if (e) {
|
|
232
|
-
|
|
233
|
-
for (var
|
|
234
|
-
r.call(
|
|
232
|
+
s = e(l);
|
|
233
|
+
for (var y = 0; y < s.length; y++)
|
|
234
|
+
r.call(l, s[y]) && (d[s[y]] = l[s[y]]);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return d;
|
|
238
238
|
}, de;
|
|
239
239
|
}
|
|
240
240
|
var he, Oe;
|
|
@@ -256,8 +256,8 @@ function Ze() {
|
|
|
256
256
|
};
|
|
257
257
|
if (process.env.NODE_ENV !== "production") {
|
|
258
258
|
var a = /* @__PURE__ */ _e(), r = {}, t = /* @__PURE__ */ $e();
|
|
259
|
-
e = function(
|
|
260
|
-
var c = "Warning: " +
|
|
259
|
+
e = function(o) {
|
|
260
|
+
var c = "Warning: " + o;
|
|
261
261
|
typeof console < "u" && console.error(c);
|
|
262
262
|
try {
|
|
263
263
|
throw new Error(c);
|
|
@@ -265,29 +265,29 @@ function Ze() {
|
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function n(
|
|
268
|
+
function n(o, c, l, d, s) {
|
|
269
269
|
if (process.env.NODE_ENV !== "production") {
|
|
270
|
-
for (var
|
|
271
|
-
if (t(
|
|
272
|
-
var
|
|
270
|
+
for (var u in o)
|
|
271
|
+
if (t(o, u)) {
|
|
272
|
+
var v;
|
|
273
273
|
try {
|
|
274
|
-
if (typeof
|
|
275
|
-
var
|
|
276
|
-
(
|
|
274
|
+
if (typeof o[u] != "function") {
|
|
275
|
+
var y = Error(
|
|
276
|
+
(d || "React class") + ": " + l + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
277
277
|
);
|
|
278
|
-
throw
|
|
278
|
+
throw y.name = "Invariant Violation", y;
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
} catch (
|
|
282
|
-
|
|
280
|
+
v = o[u](c, u, d, l, null, a);
|
|
281
|
+
} catch (x) {
|
|
282
|
+
v = x;
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
285
|
-
(
|
|
286
|
-
),
|
|
287
|
-
r[
|
|
288
|
-
var b =
|
|
284
|
+
if (v && !(v instanceof Error) && e(
|
|
285
|
+
(d || "React class") + ": type specification of " + l + " `" + u + "` 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)."
|
|
286
|
+
), v instanceof Error && !(v.message in r)) {
|
|
287
|
+
r[v.message] = !0;
|
|
288
|
+
var b = s ? s() : "";
|
|
289
289
|
e(
|
|
290
|
-
"Failed " +
|
|
290
|
+
"Failed " + l + " type: " + v.message + (b ?? "")
|
|
291
291
|
);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
@@ -301,27 +301,27 @@ var ye, Me;
|
|
|
301
301
|
function Ge() {
|
|
302
302
|
if (Me) return ye;
|
|
303
303
|
Me = 1;
|
|
304
|
-
var e = Le(), a = Je(), r = /* @__PURE__ */ _e(), t = /* @__PURE__ */ $e(), n = /* @__PURE__ */ Ze(),
|
|
304
|
+
var e = Le(), a = Je(), r = /* @__PURE__ */ _e(), t = /* @__PURE__ */ $e(), n = /* @__PURE__ */ Ze(), o = function() {
|
|
305
305
|
};
|
|
306
|
-
process.env.NODE_ENV !== "production" && (
|
|
307
|
-
var
|
|
308
|
-
typeof console < "u" && console.error(
|
|
306
|
+
process.env.NODE_ENV !== "production" && (o = function(l) {
|
|
307
|
+
var d = "Warning: " + l;
|
|
308
|
+
typeof console < "u" && console.error(d);
|
|
309
309
|
try {
|
|
310
|
-
throw new Error(
|
|
310
|
+
throw new Error(d);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
314
|
function c() {
|
|
315
315
|
return null;
|
|
316
316
|
}
|
|
317
|
-
return ye = function(
|
|
318
|
-
var
|
|
319
|
-
function
|
|
320
|
-
var h =
|
|
317
|
+
return ye = function(l, d) {
|
|
318
|
+
var s = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
319
|
+
function v(i) {
|
|
320
|
+
var h = i && (s && i[s] || i[u]);
|
|
321
321
|
if (typeof h == "function")
|
|
322
322
|
return h;
|
|
323
323
|
}
|
|
324
|
-
var
|
|
324
|
+
var y = "<<anonymous>>", b = {
|
|
325
325
|
array: g("array"),
|
|
326
326
|
bigint: g("bigint"),
|
|
327
327
|
bool: g("boolean"),
|
|
@@ -330,246 +330,246 @@ function Ge() {
|
|
|
330
330
|
object: g("object"),
|
|
331
331
|
string: g("string"),
|
|
332
332
|
symbol: g("symbol"),
|
|
333
|
-
any:
|
|
334
|
-
arrayOf:
|
|
335
|
-
element:
|
|
333
|
+
any: W(),
|
|
334
|
+
arrayOf: R,
|
|
335
|
+
element: j(),
|
|
336
336
|
elementType: f(),
|
|
337
337
|
instanceOf: Z,
|
|
338
|
-
node:
|
|
338
|
+
node: P(),
|
|
339
339
|
objectOf: K,
|
|
340
|
-
oneOf:
|
|
340
|
+
oneOf: Q,
|
|
341
341
|
oneOfType: A,
|
|
342
|
-
shape:
|
|
343
|
-
exact:
|
|
342
|
+
shape: F,
|
|
343
|
+
exact: m
|
|
344
344
|
};
|
|
345
|
-
function
|
|
346
|
-
return
|
|
345
|
+
function x(i, h) {
|
|
346
|
+
return i === h ? i !== 0 || 1 / i === 1 / h : i !== i && h !== h;
|
|
347
347
|
}
|
|
348
|
-
function _(
|
|
349
|
-
this.message =
|
|
348
|
+
function _(i, h) {
|
|
349
|
+
this.message = i, this.data = h && typeof h == "object" ? h : {}, this.stack = "";
|
|
350
350
|
}
|
|
351
351
|
_.prototype = Error.prototype;
|
|
352
|
-
function
|
|
352
|
+
function T(i) {
|
|
353
353
|
if (process.env.NODE_ENV !== "production")
|
|
354
354
|
var h = {}, E = 0;
|
|
355
|
-
function C(
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
355
|
+
function C(M, S, O, D, $, k, X) {
|
|
356
|
+
if (D = D || y, k = k || O, X !== r) {
|
|
357
|
+
if (d) {
|
|
358
358
|
var p = new Error(
|
|
359
359
|
"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"
|
|
360
360
|
);
|
|
361
361
|
throw p.name = "Invariant Violation", p;
|
|
362
362
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
363
|
-
var G =
|
|
363
|
+
var G = D + ":" + O;
|
|
364
364
|
!h[G] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
365
|
-
E < 3 && (
|
|
366
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
365
|
+
E < 3 && (o(
|
|
366
|
+
"You are manually calling a React.PropTypes validation function for the `" + k + "` prop on `" + D + "`. 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."
|
|
367
367
|
), h[G] = !0, E++);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
return S[O] == null ?
|
|
370
|
+
return S[O] == null ? M ? S[O] === null ? new _("The " + $ + " `" + k + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new _("The " + $ + " `" + k + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : i(S, O, D, $, k);
|
|
371
371
|
}
|
|
372
|
-
var
|
|
373
|
-
return
|
|
372
|
+
var w = C.bind(null, !1);
|
|
373
|
+
return w.isRequired = C.bind(null, !0), w;
|
|
374
374
|
}
|
|
375
|
-
function g(
|
|
376
|
-
function h(E, C,
|
|
377
|
-
var
|
|
378
|
-
if (
|
|
379
|
-
var
|
|
375
|
+
function g(i) {
|
|
376
|
+
function h(E, C, w, M, S, O) {
|
|
377
|
+
var D = E[C], $ = z(D);
|
|
378
|
+
if ($ !== i) {
|
|
379
|
+
var k = V(D);
|
|
380
380
|
return new _(
|
|
381
|
-
"Invalid " +
|
|
382
|
-
{ expectedType:
|
|
381
|
+
"Invalid " + M + " `" + S + "` of type " + ("`" + k + "` supplied to `" + w + "`, expected ") + ("`" + i + "`."),
|
|
382
|
+
{ expectedType: i }
|
|
383
383
|
);
|
|
384
384
|
}
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
|
-
return
|
|
387
|
+
return T(h);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return
|
|
389
|
+
function W() {
|
|
390
|
+
return T(c);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
function h(E, C,
|
|
394
|
-
if (typeof
|
|
395
|
-
return new _("Property `" + S + "` of component `" +
|
|
392
|
+
function R(i) {
|
|
393
|
+
function h(E, C, w, M, S) {
|
|
394
|
+
if (typeof i != "function")
|
|
395
|
+
return new _("Property `" + S + "` of component `" + w + "` has invalid PropType notation inside arrayOf.");
|
|
396
396
|
var O = E[C];
|
|
397
397
|
if (!Array.isArray(O)) {
|
|
398
|
-
var
|
|
399
|
-
return new _("Invalid " +
|
|
398
|
+
var D = z(O);
|
|
399
|
+
return new _("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected an array."));
|
|
400
400
|
}
|
|
401
|
-
for (var
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
401
|
+
for (var $ = 0; $ < O.length; $++) {
|
|
402
|
+
var k = i(O, $, w, M, S + "[" + $ + "]", r);
|
|
403
|
+
if (k instanceof Error)
|
|
404
|
+
return k;
|
|
405
405
|
}
|
|
406
406
|
return null;
|
|
407
407
|
}
|
|
408
|
-
return
|
|
408
|
+
return T(h);
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
function
|
|
410
|
+
function j() {
|
|
411
|
+
function i(h, E, C, w, M) {
|
|
412
412
|
var S = h[E];
|
|
413
|
-
if (!
|
|
414
|
-
var O =
|
|
415
|
-
return new _("Invalid " +
|
|
413
|
+
if (!l(S)) {
|
|
414
|
+
var O = z(S);
|
|
415
|
+
return new _("Invalid " + w + " `" + M + "` of type " + ("`" + O + "` supplied to `" + C + "`, expected a single ReactElement."));
|
|
416
416
|
}
|
|
417
417
|
return null;
|
|
418
418
|
}
|
|
419
|
-
return
|
|
419
|
+
return T(i);
|
|
420
420
|
}
|
|
421
421
|
function f() {
|
|
422
|
-
function
|
|
422
|
+
function i(h, E, C, w, M) {
|
|
423
423
|
var S = h[E];
|
|
424
424
|
if (!e.isValidElementType(S)) {
|
|
425
|
-
var O =
|
|
426
|
-
return new _("Invalid " +
|
|
425
|
+
var O = z(S);
|
|
426
|
+
return new _("Invalid " + w + " `" + M + "` of type " + ("`" + O + "` supplied to `" + C + "`, expected a single ReactElement type."));
|
|
427
427
|
}
|
|
428
428
|
return null;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return T(i);
|
|
431
431
|
}
|
|
432
|
-
function Z(
|
|
433
|
-
function h(E, C,
|
|
434
|
-
if (!(E[C] instanceof
|
|
435
|
-
var O =
|
|
436
|
-
return new _("Invalid " +
|
|
432
|
+
function Z(i) {
|
|
433
|
+
function h(E, C, w, M, S) {
|
|
434
|
+
if (!(E[C] instanceof i)) {
|
|
435
|
+
var O = i.name || y, D = J(E[C]);
|
|
436
|
+
return new _("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected ") + ("instance of `" + O + "`."));
|
|
437
437
|
}
|
|
438
438
|
return null;
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return T(h);
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
if (!Array.isArray(
|
|
444
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
442
|
+
function Q(i) {
|
|
443
|
+
if (!Array.isArray(i))
|
|
444
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
445
445
|
"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])."
|
|
446
|
-
) :
|
|
447
|
-
function h(E, C,
|
|
448
|
-
for (var O = E[C],
|
|
449
|
-
if (
|
|
446
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
447
|
+
function h(E, C, w, M, S) {
|
|
448
|
+
for (var O = E[C], D = 0; D < i.length; D++)
|
|
449
|
+
if (x(O, i[D]))
|
|
450
450
|
return null;
|
|
451
|
-
var
|
|
452
|
-
var G =
|
|
451
|
+
var $ = JSON.stringify(i, function(X, p) {
|
|
452
|
+
var G = V(p);
|
|
453
453
|
return G === "symbol" ? String(p) : p;
|
|
454
454
|
});
|
|
455
|
-
return new _("Invalid " +
|
|
455
|
+
return new _("Invalid " + M + " `" + S + "` of value `" + String(O) + "` " + ("supplied to `" + w + "`, expected one of " + $ + "."));
|
|
456
456
|
}
|
|
457
|
-
return
|
|
457
|
+
return T(h);
|
|
458
458
|
}
|
|
459
|
-
function K(
|
|
460
|
-
function h(E, C,
|
|
461
|
-
if (typeof
|
|
462
|
-
return new _("Property `" + S + "` of component `" +
|
|
463
|
-
var O = E[C],
|
|
464
|
-
if (
|
|
465
|
-
return new _("Invalid " +
|
|
466
|
-
for (var
|
|
467
|
-
if (t(O,
|
|
468
|
-
var
|
|
469
|
-
if (
|
|
470
|
-
return
|
|
459
|
+
function K(i) {
|
|
460
|
+
function h(E, C, w, M, S) {
|
|
461
|
+
if (typeof i != "function")
|
|
462
|
+
return new _("Property `" + S + "` of component `" + w + "` has invalid PropType notation inside objectOf.");
|
|
463
|
+
var O = E[C], D = z(O);
|
|
464
|
+
if (D !== "object")
|
|
465
|
+
return new _("Invalid " + M + " `" + S + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected an object."));
|
|
466
|
+
for (var $ in O)
|
|
467
|
+
if (t(O, $)) {
|
|
468
|
+
var k = i(O, $, w, M, S + "." + $, r);
|
|
469
|
+
if (k instanceof Error)
|
|
470
|
+
return k;
|
|
471
471
|
}
|
|
472
472
|
return null;
|
|
473
473
|
}
|
|
474
|
-
return
|
|
474
|
+
return T(h);
|
|
475
475
|
}
|
|
476
|
-
function A(
|
|
477
|
-
if (!Array.isArray(
|
|
478
|
-
return process.env.NODE_ENV !== "production" &&
|
|
479
|
-
for (var h = 0; h <
|
|
480
|
-
var E =
|
|
476
|
+
function A(i) {
|
|
477
|
+
if (!Array.isArray(i))
|
|
478
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
479
|
+
for (var h = 0; h < i.length; h++) {
|
|
480
|
+
var E = i[h];
|
|
481
481
|
if (typeof E != "function")
|
|
482
|
-
return
|
|
483
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
482
|
+
return o(
|
|
483
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(E) + " at index " + h + "."
|
|
484
484
|
), c;
|
|
485
485
|
}
|
|
486
|
-
function C(
|
|
487
|
-
for (var
|
|
488
|
-
var
|
|
486
|
+
function C(w, M, S, O, D) {
|
|
487
|
+
for (var $ = [], k = 0; k < i.length; k++) {
|
|
488
|
+
var X = i[k], p = X(w, M, S, O, D, r);
|
|
489
489
|
if (p == null)
|
|
490
490
|
return null;
|
|
491
|
-
p.data && t(p.data, "expectedType") &&
|
|
491
|
+
p.data && t(p.data, "expectedType") && $.push(p.data.expectedType);
|
|
492
492
|
}
|
|
493
|
-
var G =
|
|
494
|
-
return new _("Invalid " + O + " `" +
|
|
493
|
+
var G = $.length > 0 ? ", expected one of type [" + $.join(", ") + "]" : "";
|
|
494
|
+
return new _("Invalid " + O + " `" + D + "` supplied to " + ("`" + S + "`" + G + "."));
|
|
495
495
|
}
|
|
496
|
-
return
|
|
496
|
+
return T(C);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
function
|
|
500
|
-
return
|
|
498
|
+
function P() {
|
|
499
|
+
function i(h, E, C, w, M) {
|
|
500
|
+
return H(h[E]) ? null : new _("Invalid " + w + " `" + M + "` supplied to " + ("`" + C + "`, expected a ReactNode."));
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return T(i);
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function q(i, h, E, C, w) {
|
|
505
505
|
return new _(
|
|
506
|
-
(
|
|
506
|
+
(i || "React class") + ": " + h + " type `" + E + "." + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + w + "`."
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
function h(E, C,
|
|
511
|
-
var O = E[C],
|
|
512
|
-
if (
|
|
513
|
-
return new _("Invalid " +
|
|
514
|
-
for (var
|
|
515
|
-
var
|
|
516
|
-
if (typeof
|
|
517
|
-
return
|
|
518
|
-
var
|
|
519
|
-
if (
|
|
520
|
-
return
|
|
509
|
+
function F(i) {
|
|
510
|
+
function h(E, C, w, M, S) {
|
|
511
|
+
var O = E[C], D = z(O);
|
|
512
|
+
if (D !== "object")
|
|
513
|
+
return new _("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
514
|
+
for (var $ in i) {
|
|
515
|
+
var k = i[$];
|
|
516
|
+
if (typeof k != "function")
|
|
517
|
+
return q(w, M, S, $, V(k));
|
|
518
|
+
var X = k(O, $, w, M, S + "." + $, r);
|
|
519
|
+
if (X)
|
|
520
|
+
return X;
|
|
521
521
|
}
|
|
522
522
|
return null;
|
|
523
523
|
}
|
|
524
|
-
return
|
|
524
|
+
return T(h);
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
function h(E, C,
|
|
528
|
-
var O = E[C],
|
|
529
|
-
if (
|
|
530
|
-
return new _("Invalid " +
|
|
531
|
-
var
|
|
532
|
-
for (var
|
|
533
|
-
var
|
|
534
|
-
if (t(
|
|
535
|
-
return
|
|
536
|
-
if (!
|
|
526
|
+
function m(i) {
|
|
527
|
+
function h(E, C, w, M, S) {
|
|
528
|
+
var O = E[C], D = z(O);
|
|
529
|
+
if (D !== "object")
|
|
530
|
+
return new _("Invalid " + M + " `" + S + "` of type `" + D + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
531
|
+
var $ = a({}, E[C], i);
|
|
532
|
+
for (var k in $) {
|
|
533
|
+
var X = i[k];
|
|
534
|
+
if (t(i, k) && typeof X != "function")
|
|
535
|
+
return q(w, M, S, k, V(X));
|
|
536
|
+
if (!X)
|
|
537
537
|
return new _(
|
|
538
|
-
"Invalid " +
|
|
539
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
538
|
+
"Invalid " + M + " `" + S + "` key `" + k + "` supplied to `" + w + "`.\nBad object: " + JSON.stringify(E[C], null, " ") + `
|
|
539
|
+
Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
|
|
540
540
|
);
|
|
541
|
-
var p =
|
|
541
|
+
var p = X(O, k, w, M, S + "." + k, r);
|
|
542
542
|
if (p)
|
|
543
543
|
return p;
|
|
544
544
|
}
|
|
545
545
|
return null;
|
|
546
546
|
}
|
|
547
|
-
return
|
|
547
|
+
return T(h);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
switch (typeof
|
|
549
|
+
function H(i) {
|
|
550
|
+
switch (typeof i) {
|
|
551
551
|
case "number":
|
|
552
552
|
case "string":
|
|
553
553
|
case "undefined":
|
|
554
554
|
return !0;
|
|
555
555
|
case "boolean":
|
|
556
|
-
return !
|
|
556
|
+
return !i;
|
|
557
557
|
case "object":
|
|
558
|
-
if (Array.isArray(
|
|
559
|
-
return
|
|
560
|
-
if (
|
|
558
|
+
if (Array.isArray(i))
|
|
559
|
+
return i.every(H);
|
|
560
|
+
if (i === null || l(i))
|
|
561
561
|
return !0;
|
|
562
|
-
var h =
|
|
562
|
+
var h = v(i);
|
|
563
563
|
if (h) {
|
|
564
|
-
var E = h.call(
|
|
565
|
-
if (h !==
|
|
564
|
+
var E = h.call(i), C;
|
|
565
|
+
if (h !== i.entries) {
|
|
566
566
|
for (; !(C = E.next()).done; )
|
|
567
|
-
if (!
|
|
567
|
+
if (!H(C.value))
|
|
568
568
|
return !1;
|
|
569
569
|
} else
|
|
570
570
|
for (; !(C = E.next()).done; ) {
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
571
|
+
var w = C.value;
|
|
572
|
+
if (w && !H(w[1]))
|
|
573
573
|
return !1;
|
|
574
574
|
}
|
|
575
575
|
} else
|
|
@@ -579,27 +579,27 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
579
579
|
return !1;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function ee(i, h) {
|
|
583
|
+
return i === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
var h = typeof
|
|
587
|
-
return Array.isArray(
|
|
585
|
+
function z(i) {
|
|
586
|
+
var h = typeof i;
|
|
587
|
+
return Array.isArray(i) ? "array" : i instanceof RegExp ? "object" : ee(h, i) ? "symbol" : h;
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
if (typeof
|
|
591
|
-
return "" +
|
|
592
|
-
var h =
|
|
589
|
+
function V(i) {
|
|
590
|
+
if (typeof i > "u" || i === null)
|
|
591
|
+
return "" + i;
|
|
592
|
+
var h = z(i);
|
|
593
593
|
if (h === "object") {
|
|
594
|
-
if (
|
|
594
|
+
if (i instanceof Date)
|
|
595
595
|
return "date";
|
|
596
|
-
if (
|
|
596
|
+
if (i instanceof RegExp)
|
|
597
597
|
return "regexp";
|
|
598
598
|
}
|
|
599
599
|
return h;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
var h =
|
|
601
|
+
function B(i) {
|
|
602
|
+
var h = V(i);
|
|
603
603
|
switch (h) {
|
|
604
604
|
case "array":
|
|
605
605
|
case "object":
|
|
@@ -612,8 +612,8 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
|
612
612
|
return h;
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function J(
|
|
616
|
-
return !
|
|
615
|
+
function J(i) {
|
|
616
|
+
return !i.constructor || !i.constructor.name ? y : i.constructor.name;
|
|
617
617
|
}
|
|
618
618
|
return b.checkPropTypes = n, b.resetWarningCache = n.resetWarningCache, b.PropTypes = b, b;
|
|
619
619
|
}, ye;
|
|
@@ -628,19 +628,19 @@ function Ke() {
|
|
|
628
628
|
function r() {
|
|
629
629
|
}
|
|
630
630
|
return r.resetWarningCache = a, me = function() {
|
|
631
|
-
function t(c,
|
|
632
|
-
if (
|
|
633
|
-
var
|
|
631
|
+
function t(c, l, d, s, u, v) {
|
|
632
|
+
if (v !== e) {
|
|
633
|
+
var y = new Error(
|
|
634
634
|
"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"
|
|
635
635
|
);
|
|
636
|
-
throw
|
|
636
|
+
throw y.name = "Invariant Violation", y;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
t.isRequired = t;
|
|
640
640
|
function n() {
|
|
641
641
|
return t;
|
|
642
642
|
}
|
|
643
|
-
var
|
|
643
|
+
var o = {
|
|
644
644
|
array: t,
|
|
645
645
|
bigint: t,
|
|
646
646
|
bool: t,
|
|
@@ -663,7 +663,7 @@ function Ke() {
|
|
|
663
663
|
checkPropTypes: r,
|
|
664
664
|
resetWarningCache: a
|
|
665
665
|
};
|
|
666
|
-
return
|
|
666
|
+
return o.PropTypes = o, o;
|
|
667
667
|
}, me;
|
|
668
668
|
}
|
|
669
669
|
var ke;
|
|
@@ -676,16 +676,16 @@ function Qe() {
|
|
|
676
676
|
se.exports = /* @__PURE__ */ Ke()();
|
|
677
677
|
return se.exports;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ne(e, a, r) {
|
|
680
680
|
this.x = e, this.y = a, this.time = r || (/* @__PURE__ */ new Date()).getTime();
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
ne.prototype.velocityFrom = function(e) {
|
|
683
683
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 1;
|
|
684
684
|
};
|
|
685
|
-
|
|
685
|
+
ne.prototype.distanceTo = function(e) {
|
|
686
686
|
return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2));
|
|
687
687
|
};
|
|
688
|
-
|
|
688
|
+
ne.prototype.equals = function(e) {
|
|
689
689
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
690
690
|
};
|
|
691
691
|
function ge(e, a, r, t) {
|
|
@@ -693,12 +693,12 @@ function ge(e, a, r, t) {
|
|
|
693
693
|
}
|
|
694
694
|
ge.prototype.length = function() {
|
|
695
695
|
for (var e = 10, a = 0, r = void 0, t = void 0, n = 0; n <= e; n += 1) {
|
|
696
|
-
var
|
|
696
|
+
var o = n / e, c = this._point(o, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), l = this._point(o, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
697
697
|
if (n > 0) {
|
|
698
|
-
var
|
|
699
|
-
a += Math.sqrt(
|
|
698
|
+
var d = c - r, s = l - t;
|
|
699
|
+
a += Math.sqrt(d * d + s * s);
|
|
700
700
|
}
|
|
701
|
-
r = c, t =
|
|
701
|
+
r = c, t = l;
|
|
702
702
|
}
|
|
703
703
|
return a;
|
|
704
704
|
};
|
|
@@ -706,21 +706,21 @@ ge.prototype._point = function(e, a, r, t, n) {
|
|
|
706
706
|
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;
|
|
707
707
|
};
|
|
708
708
|
function et(e, a, r) {
|
|
709
|
-
var t, n,
|
|
709
|
+
var t, n, o, c = null, l = 0;
|
|
710
710
|
r || (r = {});
|
|
711
|
-
var
|
|
712
|
-
|
|
711
|
+
var d = function() {
|
|
712
|
+
l = r.leading === !1 ? 0 : Date.now(), c = null, o = e.apply(t, n), c || (t = n = null);
|
|
713
713
|
};
|
|
714
714
|
return function() {
|
|
715
|
-
var
|
|
716
|
-
!
|
|
717
|
-
var
|
|
718
|
-
return t = this, n = arguments,
|
|
715
|
+
var s = Date.now();
|
|
716
|
+
!l && r.leading === !1 && (l = s);
|
|
717
|
+
var u = a - (s - l);
|
|
718
|
+
return t = this, n = arguments, u <= 0 || u > a ? (c && (clearTimeout(c), c = null), l = s, o = e.apply(t, n), c || (t = n = null)) : !c && r.trailing !== !1 && (c = setTimeout(d, u)), o;
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function N(e, a) {
|
|
722
722
|
var r = this, t = a || {};
|
|
723
|
-
this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = "throttle" in t ? t.throttle : 16, this.minDistance = "minDistance" in t ? t.minDistance : 5, this.throttle ? this._strokeMoveUpdate = et(
|
|
723
|
+
this.velocityFilterWeight = t.velocityFilterWeight || 0.7, this.minWidth = t.minWidth || 0.5, this.maxWidth = t.maxWidth || 2.5, this.throttle = "throttle" in t ? t.throttle : 16, this.minDistance = "minDistance" in t ? t.minDistance : 5, this.throttle ? this._strokeMoveUpdate = et(N.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = N.prototype._strokeUpdate, this.dotSize = t.dotSize || function() {
|
|
724
724
|
return (this.minWidth + this.maxWidth) / 2;
|
|
725
725
|
}, this.penColor = t.penColor || "black", this.backgroundColor = t.backgroundColor || "rgba(0,0,0,0)", this.onBegin = t.onBegin, this.onEnd = t.onEnd, this._canvas = e, this._ctx = e.getContext("2d"), this.clear(), this._handleMouseDown = function(n) {
|
|
726
726
|
n.which === 1 && (r._mouseButtonDown = !0, r._strokeBegin(n));
|
|
@@ -730,29 +730,29 @@ function z(e, a) {
|
|
|
730
730
|
n.which === 1 && r._mouseButtonDown && (r._mouseButtonDown = !1, r._strokeEnd(n));
|
|
731
731
|
}, this._handleTouchStart = function(n) {
|
|
732
732
|
if (n.targetTouches.length === 1) {
|
|
733
|
-
var
|
|
734
|
-
r._strokeBegin(
|
|
733
|
+
var o = n.changedTouches[0];
|
|
734
|
+
r._strokeBegin(o);
|
|
735
735
|
}
|
|
736
736
|
}, this._handleTouchMove = function(n) {
|
|
737
737
|
n.preventDefault();
|
|
738
|
-
var
|
|
739
|
-
r._strokeMoveUpdate(
|
|
738
|
+
var o = n.targetTouches[0];
|
|
739
|
+
r._strokeMoveUpdate(o);
|
|
740
740
|
}, this._handleTouchEnd = function(n) {
|
|
741
|
-
var
|
|
742
|
-
|
|
741
|
+
var o = n.target === r._canvas;
|
|
742
|
+
o && (n.preventDefault(), r._strokeEnd(n));
|
|
743
743
|
}, this.on();
|
|
744
744
|
}
|
|
745
|
-
|
|
745
|
+
N.prototype.clear = function() {
|
|
746
746
|
var e = this._ctx, a = this._canvas;
|
|
747
747
|
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;
|
|
748
748
|
};
|
|
749
|
-
|
|
750
|
-
var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), n = r.ratio || window.devicePixelRatio || 1,
|
|
749
|
+
N.prototype.fromDataURL = function(e) {
|
|
750
|
+
var a = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), n = r.ratio || window.devicePixelRatio || 1, o = r.width || this._canvas.width / n, c = r.height || this._canvas.height / n;
|
|
751
751
|
this._reset(), t.src = e, t.onload = function() {
|
|
752
|
-
a._ctx.drawImage(t, 0, 0,
|
|
752
|
+
a._ctx.drawImage(t, 0, 0, o, c);
|
|
753
753
|
}, this._isEmpty = !1;
|
|
754
754
|
};
|
|
755
|
-
|
|
755
|
+
N.prototype.toDataURL = function(e) {
|
|
756
756
|
var a;
|
|
757
757
|
switch (e) {
|
|
758
758
|
case "image/svg+xml":
|
|
@@ -763,23 +763,23 @@ z.prototype.toDataURL = function(e) {
|
|
|
763
763
|
return (a = this._canvas).toDataURL.apply(a, [e].concat(t));
|
|
764
764
|
}
|
|
765
765
|
};
|
|
766
|
-
|
|
766
|
+
N.prototype.on = function() {
|
|
767
767
|
this._handleMouseEvents(), this._handleTouchEvents();
|
|
768
768
|
};
|
|
769
|
-
|
|
769
|
+
N.prototype.off = function() {
|
|
770
770
|
this._canvas.removeEventListener("mousedown", this._handleMouseDown), this._canvas.removeEventListener("mousemove", this._handleMouseMove), document.removeEventListener("mouseup", this._handleMouseUp), this._canvas.removeEventListener("touchstart", this._handleTouchStart), this._canvas.removeEventListener("touchmove", this._handleTouchMove), this._canvas.removeEventListener("touchend", this._handleTouchEnd);
|
|
771
771
|
};
|
|
772
|
-
|
|
772
|
+
N.prototype.isEmpty = function() {
|
|
773
773
|
return this._isEmpty;
|
|
774
774
|
};
|
|
775
|
-
|
|
775
|
+
N.prototype._strokeBegin = function(e) {
|
|
776
776
|
this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
|
|
777
777
|
};
|
|
778
|
-
|
|
779
|
-
var a = e.clientX, r = e.clientY, t = this._createPoint(a, r), n = this._data[this._data.length - 1],
|
|
780
|
-
if (!(
|
|
781
|
-
var
|
|
782
|
-
|
|
778
|
+
N.prototype._strokeUpdate = function(e) {
|
|
779
|
+
var a = e.clientX, r = e.clientY, t = this._createPoint(a, r), n = this._data[this._data.length - 1], o = n && n[n.length - 1], c = o && t.distanceTo(o) < this.minDistance;
|
|
780
|
+
if (!(o && c)) {
|
|
781
|
+
var l = this._addPoint(t), d = l.curve, s = l.widths;
|
|
782
|
+
d && s && this._drawCurve(d, s.start, s.end), this._data[this._data.length - 1].push({
|
|
783
783
|
x: t.x,
|
|
784
784
|
y: t.y,
|
|
785
785
|
time: t.time,
|
|
@@ -787,7 +787,7 @@ z.prototype._strokeUpdate = function(e) {
|
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
};
|
|
790
|
-
|
|
790
|
+
N.prototype._strokeEnd = function(e) {
|
|
791
791
|
var a = this.points.length > 2, r = this.points[0];
|
|
792
792
|
if (!a && r && this._drawDot(r), r) {
|
|
793
793
|
var t = this._data[this._data.length - 1], n = t[t.length - 1];
|
|
@@ -800,109 +800,109 @@ z.prototype._strokeEnd = function(e) {
|
|
|
800
800
|
}
|
|
801
801
|
typeof this.onEnd == "function" && this.onEnd(e);
|
|
802
802
|
};
|
|
803
|
-
|
|
803
|
+
N.prototype._handleMouseEvents = function() {
|
|
804
804
|
this._mouseButtonDown = !1, this._canvas.addEventListener("mousedown", this._handleMouseDown), this._canvas.addEventListener("mousemove", this._handleMouseMove), document.addEventListener("mouseup", this._handleMouseUp);
|
|
805
805
|
};
|
|
806
|
-
|
|
806
|
+
N.prototype._handleTouchEvents = function() {
|
|
807
807
|
this._canvas.style.msTouchAction = "none", this._canvas.style.touchAction = "none", this._canvas.addEventListener("touchstart", this._handleTouchStart), this._canvas.addEventListener("touchmove", this._handleTouchMove), this._canvas.addEventListener("touchend", this._handleTouchEnd);
|
|
808
808
|
};
|
|
809
|
-
|
|
809
|
+
N.prototype._reset = function() {
|
|
810
810
|
this.points = [], this._lastVelocity = 0, this._lastWidth = (this.minWidth + this.maxWidth) / 2, this._ctx.fillStyle = this.penColor;
|
|
811
811
|
};
|
|
812
|
-
|
|
812
|
+
N.prototype._createPoint = function(e, a, r) {
|
|
813
813
|
var t = this._canvas.getBoundingClientRect();
|
|
814
|
-
return new
|
|
814
|
+
return new ne(e - t.left, a - t.top, r || (/* @__PURE__ */ new Date()).getTime());
|
|
815
815
|
};
|
|
816
|
-
|
|
816
|
+
N.prototype._addPoint = function(e) {
|
|
817
817
|
var a = this.points, r = void 0;
|
|
818
818
|
if (a.push(e), a.length > 2) {
|
|
819
819
|
a.length === 3 && a.unshift(a[0]), r = this._calculateCurveControlPoints(a[0], a[1], a[2]);
|
|
820
820
|
var t = r.c2;
|
|
821
821
|
r = this._calculateCurveControlPoints(a[1], a[2], a[3]);
|
|
822
|
-
var n = r.c1,
|
|
823
|
-
return a.shift(), { curve:
|
|
822
|
+
var n = r.c1, o = new ge(a[1], t, n, a[2]), c = this._calculateCurveWidths(o);
|
|
823
|
+
return a.shift(), { curve: o, widths: c };
|
|
824
824
|
}
|
|
825
825
|
return {};
|
|
826
826
|
};
|
|
827
|
-
|
|
828
|
-
var t = e.x - a.x, n = e.y - a.y,
|
|
827
|
+
N.prototype._calculateCurveControlPoints = function(e, a, r) {
|
|
828
|
+
var t = e.x - a.x, n = e.y - a.y, o = a.x - r.x, c = a.y - r.y, l = { 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), u = Math.sqrt(o * o + c * c), v = l.x - d.x, y = l.y - d.y, b = u / (s + u), x = { x: d.x + v * b, y: d.y + y * b }, _ = a.x - x.x, T = a.y - x.y;
|
|
829
829
|
return {
|
|
830
|
-
c1: new
|
|
831
|
-
c2: new
|
|
830
|
+
c1: new ne(l.x + _, l.y + T),
|
|
831
|
+
c2: new ne(d.x + _, d.y + T)
|
|
832
832
|
};
|
|
833
833
|
};
|
|
834
|
-
|
|
835
|
-
var a = e.startPoint, r = e.endPoint, t = { start: null, end: null }, n = this.velocityFilterWeight * r.velocityFrom(a) + (1 - this.velocityFilterWeight) * this._lastVelocity,
|
|
836
|
-
return t.start = this._lastWidth, t.end =
|
|
834
|
+
N.prototype._calculateCurveWidths = function(e) {
|
|
835
|
+
var a = e.startPoint, r = e.endPoint, t = { start: null, end: null }, n = this.velocityFilterWeight * r.velocityFrom(a) + (1 - this.velocityFilterWeight) * this._lastVelocity, o = this._strokeWidth(n);
|
|
836
|
+
return t.start = this._lastWidth, t.end = o, this._lastVelocity = n, this._lastWidth = o, t;
|
|
837
837
|
};
|
|
838
|
-
|
|
838
|
+
N.prototype._strokeWidth = function(e) {
|
|
839
839
|
return Math.max(this.maxWidth / (e + 1), this.minWidth);
|
|
840
840
|
};
|
|
841
|
-
|
|
841
|
+
N.prototype._drawPoint = function(e, a, r) {
|
|
842
842
|
var t = this._ctx;
|
|
843
843
|
t.moveTo(e, a), t.arc(e, a, r, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
844
844
|
};
|
|
845
|
-
|
|
846
|
-
var t = this._ctx, n = r - a,
|
|
845
|
+
N.prototype._drawCurve = function(e, a, r) {
|
|
846
|
+
var t = this._ctx, n = r - a, o = Math.floor(e.length());
|
|
847
847
|
t.beginPath();
|
|
848
|
-
for (var c = 0; c <
|
|
849
|
-
var
|
|
850
|
-
b += 3 *
|
|
851
|
-
var
|
|
852
|
-
|
|
853
|
-
var _ = a +
|
|
854
|
-
this._drawPoint(b,
|
|
848
|
+
for (var c = 0; c < o; c += 1) {
|
|
849
|
+
var l = c / o, d = l * l, s = d * l, u = 1 - l, v = u * u, y = v * u, b = y * e.startPoint.x;
|
|
850
|
+
b += 3 * v * l * e.control1.x, b += 3 * u * d * e.control2.x, b += s * e.endPoint.x;
|
|
851
|
+
var x = y * e.startPoint.y;
|
|
852
|
+
x += 3 * v * l * e.control1.y, x += 3 * u * d * e.control2.y, x += s * e.endPoint.y;
|
|
853
|
+
var _ = a + s * n;
|
|
854
|
+
this._drawPoint(b, x, _);
|
|
855
855
|
}
|
|
856
856
|
t.closePath(), t.fill();
|
|
857
857
|
};
|
|
858
|
-
|
|
858
|
+
N.prototype._drawDot = function(e) {
|
|
859
859
|
var a = this._ctx, r = typeof this.dotSize == "function" ? this.dotSize() : this.dotSize;
|
|
860
860
|
a.beginPath(), this._drawPoint(e.x, e.y, r), a.closePath(), a.fill();
|
|
861
861
|
};
|
|
862
|
-
|
|
862
|
+
N.prototype._fromData = function(e, a, r) {
|
|
863
863
|
for (var t = 0; t < e.length; t += 1) {
|
|
864
864
|
var n = e[t];
|
|
865
865
|
if (n.length > 1)
|
|
866
|
-
for (var
|
|
867
|
-
var c = n[
|
|
868
|
-
if (
|
|
869
|
-
this.penColor =
|
|
870
|
-
else if (
|
|
871
|
-
var
|
|
872
|
-
|
|
866
|
+
for (var o = 0; o < n.length; o += 1) {
|
|
867
|
+
var c = n[o], l = new ne(c.x, c.y, c.time), d = c.color;
|
|
868
|
+
if (o === 0)
|
|
869
|
+
this.penColor = d, this._reset(), this._addPoint(l);
|
|
870
|
+
else if (o !== n.length - 1) {
|
|
871
|
+
var s = this._addPoint(l), u = s.curve, v = s.widths;
|
|
872
|
+
u && v && a(u, v, d);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
else {
|
|
876
876
|
this._reset();
|
|
877
|
-
var
|
|
878
|
-
r(
|
|
877
|
+
var y = n[0];
|
|
878
|
+
r(y);
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
881
|
};
|
|
882
|
-
|
|
883
|
-
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0,
|
|
884
|
-
|
|
885
|
-
var
|
|
882
|
+
N.prototype._toSVG = function() {
|
|
883
|
+
var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0, o = 0, c = r.width / t, l = r.height / t, d = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
884
|
+
d.setAttributeNS(null, "width", r.width), d.setAttributeNS(null, "height", r.height), this._fromData(a, function(g, W, R) {
|
|
885
|
+
var j = document.createElement("path");
|
|
886
886
|
if (!isNaN(g.control1.x) && !isNaN(g.control1.y) && !isNaN(g.control2.x) && !isNaN(g.control2.y)) {
|
|
887
887
|
var f = "M " + g.startPoint.x.toFixed(3) + "," + g.startPoint.y.toFixed(3) + " " + ("C " + g.control1.x.toFixed(3) + "," + g.control1.y.toFixed(3) + " ") + (g.control2.x.toFixed(3) + "," + g.control2.y.toFixed(3) + " ") + (g.endPoint.x.toFixed(3) + "," + g.endPoint.y.toFixed(3));
|
|
888
|
-
|
|
888
|
+
j.setAttribute("d", f), j.setAttribute("stroke-width", (W.end * 2.25).toFixed(3)), j.setAttribute("stroke", R), j.setAttribute("fill", "none"), j.setAttribute("stroke-linecap", "round"), d.appendChild(j);
|
|
889
889
|
}
|
|
890
890
|
}, function(g) {
|
|
891
|
-
var
|
|
892
|
-
|
|
891
|
+
var W = document.createElement("circle"), R = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
892
|
+
W.setAttribute("r", R), W.setAttribute("cx", g.x), W.setAttribute("cy", g.y), W.setAttribute("fill", g.color), d.appendChild(W);
|
|
893
893
|
});
|
|
894
|
-
var
|
|
895
|
-
if (
|
|
896
|
-
var
|
|
897
|
-
|
|
898
|
-
for (var
|
|
899
|
-
|
|
900
|
-
|
|
894
|
+
var s = "data:image/svg+xml;base64,", u = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + n + " " + o + " " + c + " " + l + '"') + (' width="' + c + '"') + (' height="' + l + '"') + ">", v = d.innerHTML;
|
|
895
|
+
if (v === void 0) {
|
|
896
|
+
var y = document.createElement("dummy"), b = d.childNodes;
|
|
897
|
+
y.innerHTML = "";
|
|
898
|
+
for (var x = 0; x < b.length; x += 1)
|
|
899
|
+
y.appendChild(b[x].cloneNode(!0));
|
|
900
|
+
v = y.innerHTML;
|
|
901
901
|
}
|
|
902
|
-
var _ = "</svg>",
|
|
903
|
-
return
|
|
902
|
+
var _ = "</svg>", T = u + v + _;
|
|
903
|
+
return s + btoa(T);
|
|
904
904
|
};
|
|
905
|
-
|
|
905
|
+
N.prototype.fromData = function(e) {
|
|
906
906
|
var a = this;
|
|
907
907
|
this.clear(), this._fromData(e, function(r, t) {
|
|
908
908
|
return a._drawCurve(r, t.start, t.end);
|
|
@@ -910,12 +910,12 @@ z.prototype.fromData = function(e) {
|
|
|
910
910
|
return a._drawDot(r);
|
|
911
911
|
}), this._data = e;
|
|
912
912
|
};
|
|
913
|
-
|
|
913
|
+
N.prototype.toData = function() {
|
|
914
914
|
return this._data;
|
|
915
915
|
};
|
|
916
916
|
const tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
917
917
|
__proto__: null,
|
|
918
|
-
default:
|
|
918
|
+
default: N
|
|
919
919
|
}, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ Ye(tt);
|
|
920
920
|
var le = { exports: {} }, nt = le.exports, je;
|
|
921
921
|
function at() {
|
|
@@ -924,30 +924,30 @@ function at() {
|
|
|
924
924
|
e.exports = t();
|
|
925
925
|
})(nt, function() {
|
|
926
926
|
return (function(r) {
|
|
927
|
-
function t(
|
|
928
|
-
if (n[
|
|
929
|
-
var c = n[
|
|
930
|
-
return r[
|
|
927
|
+
function t(o) {
|
|
928
|
+
if (n[o]) return n[o].exports;
|
|
929
|
+
var c = n[o] = { exports: {}, id: o, loaded: !1 };
|
|
930
|
+
return r[o].call(c.exports, c, c.exports, t), c.loaded = !0, c.exports;
|
|
931
931
|
}
|
|
932
932
|
var n = {};
|
|
933
933
|
return t.m = r, t.c = n, t.p = "", t(0);
|
|
934
934
|
})([function(r, t) {
|
|
935
|
-
function n(
|
|
936
|
-
var
|
|
937
|
-
return
|
|
935
|
+
function n(s) {
|
|
936
|
+
var u = s.getContext("2d"), v = s.width, y = s.height, b = u.getImageData(0, 0, v, y).data, x = l(!0, v, y, b), _ = l(!1, v, y, b), T = d(!0, v, y, b), g = d(!1, v, y, b), W = g - T + 1, R = _ - x + 1, j = u.getImageData(T, x, W, R);
|
|
937
|
+
return s.width = W, s.height = R, u.clearRect(0, 0, W, R), u.putImageData(j, 0, 0), s;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return { red:
|
|
939
|
+
function o(s, u, v, y) {
|
|
940
|
+
return { red: y[4 * (v * u + s)], green: y[4 * (v * u + s) + 1], blue: y[4 * (v * u + s) + 2], alpha: y[4 * (v * u + s) + 3] };
|
|
941
941
|
}
|
|
942
|
-
function c(
|
|
943
|
-
return
|
|
942
|
+
function c(s, u, v, y) {
|
|
943
|
+
return o(s, u, v, y).alpha;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
946
|
-
for (var b =
|
|
945
|
+
function l(s, u, v, y) {
|
|
946
|
+
for (var b = s ? 1 : -1, x = s ? 0 : v - 1, _ = x; s ? _ < v : _ > -1; _ += b) for (var T = 0; T < u; T++) if (c(T, _, u, y)) return _;
|
|
947
947
|
return null;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
950
|
-
for (var b =
|
|
949
|
+
function d(s, u, v, y) {
|
|
950
|
+
for (var b = s ? 1 : -1, x = s ? 0 : u - 1, _ = x; s ? _ < u : _ > -1; _ += b) for (var T = 0; T < v; T++) if (c(_, T, u, y)) return _;
|
|
951
951
|
return null;
|
|
952
952
|
}
|
|
953
953
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
|
|
@@ -960,121 +960,121 @@ function it() {
|
|
|
960
960
|
return Ie || (Ie = 1, (function(e, a) {
|
|
961
961
|
(function(r, t) {
|
|
962
962
|
e.exports = t(/* @__PURE__ */ Qe(), We, rt, at());
|
|
963
|
-
})(ot, function(r, t, n,
|
|
963
|
+
})(ot, function(r, t, n, o) {
|
|
964
964
|
return (function(c) {
|
|
965
|
-
function
|
|
966
|
-
if (
|
|
967
|
-
var
|
|
968
|
-
return c[
|
|
965
|
+
function l(s) {
|
|
966
|
+
if (d[s]) return d[s].exports;
|
|
967
|
+
var u = d[s] = { exports: {}, id: s, loaded: !1 };
|
|
968
|
+
return c[s].call(u.exports, u, u.exports, l), u.loaded = !0, u.exports;
|
|
969
969
|
}
|
|
970
|
-
var
|
|
971
|
-
return
|
|
972
|
-
})([function(c,
|
|
973
|
-
function
|
|
970
|
+
var d = {};
|
|
971
|
+
return l.m = c, l.c = d, l.p = "", l(0);
|
|
972
|
+
})([function(c, l, d) {
|
|
973
|
+
function s(A) {
|
|
974
974
|
return A && A.__esModule ? A : { default: A };
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
var
|
|
978
|
-
for (var
|
|
979
|
-
return
|
|
976
|
+
function u(A, P) {
|
|
977
|
+
var q = {};
|
|
978
|
+
for (var F in A) P.indexOf(F) >= 0 || Object.prototype.hasOwnProperty.call(A, F) && (q[F] = A[F]);
|
|
979
|
+
return q;
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
if (!(A instanceof
|
|
981
|
+
function v(A, P) {
|
|
982
|
+
if (!(A instanceof P)) throw new TypeError("Cannot call a class as a function");
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function y(A, P) {
|
|
985
985
|
if (!A) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
986
|
-
return !
|
|
986
|
+
return !P || typeof P != "object" && typeof P != "function" ? A : P;
|
|
987
987
|
}
|
|
988
|
-
function b(A,
|
|
989
|
-
if (typeof
|
|
990
|
-
A.prototype = Object.create(
|
|
988
|
+
function b(A, P) {
|
|
989
|
+
if (typeof P != "function" && P !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof P);
|
|
990
|
+
A.prototype = Object.create(P && P.prototype, { constructor: { value: A, enumerable: !1, writable: !0, configurable: !0 } }), P && (Object.setPrototypeOf ? Object.setPrototypeOf(A, P) : A.__proto__ = P);
|
|
991
991
|
}
|
|
992
|
-
Object.defineProperty(
|
|
993
|
-
var
|
|
994
|
-
for (var
|
|
995
|
-
var
|
|
996
|
-
for (var
|
|
992
|
+
Object.defineProperty(l, "__esModule", { value: !0 });
|
|
993
|
+
var x = Object.assign || function(A) {
|
|
994
|
+
for (var P = 1; P < arguments.length; P++) {
|
|
995
|
+
var q = arguments[P];
|
|
996
|
+
for (var F in q) Object.prototype.hasOwnProperty.call(q, F) && (A[F] = q[F]);
|
|
997
997
|
}
|
|
998
998
|
return A;
|
|
999
999
|
}, _ = /* @__PURE__ */ (function() {
|
|
1000
|
-
function A(
|
|
1001
|
-
for (var
|
|
1002
|
-
var
|
|
1003
|
-
|
|
1000
|
+
function A(P, q) {
|
|
1001
|
+
for (var F = 0; F < q.length; F++) {
|
|
1002
|
+
var m = q[F];
|
|
1003
|
+
m.enumerable = m.enumerable || !1, m.configurable = !0, "value" in m && (m.writable = !0), Object.defineProperty(P, m.key, m);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
return function(
|
|
1007
|
-
return
|
|
1006
|
+
return function(P, q, F) {
|
|
1007
|
+
return q && A(P.prototype, q), F && A(P, F), P;
|
|
1008
1008
|
};
|
|
1009
|
-
})(),
|
|
1010
|
-
function
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
for (var
|
|
1014
|
-
return
|
|
1015
|
-
var
|
|
1009
|
+
})(), T = d(1), g = s(T), W = d(2), R = s(W), j = d(3), f = s(j), Z = d(4), Q = s(Z), K = (function(A) {
|
|
1010
|
+
function P() {
|
|
1011
|
+
var q, F, m, H;
|
|
1012
|
+
v(this, P);
|
|
1013
|
+
for (var ee = arguments.length, z = Array(ee), V = 0; V < ee; V++) z[V] = arguments[V];
|
|
1014
|
+
return F = m = y(this, (q = P.__proto__ || Object.getPrototypeOf(P)).call.apply(q, [this].concat(z))), m._sigPad = null, m._excludeOurProps = function() {
|
|
1015
|
+
var B = m.props, J = (B.canvasProps, B.clearOnResize, u(B, ["canvasProps", "clearOnResize"]));
|
|
1016
1016
|
return J;
|
|
1017
|
-
},
|
|
1018
|
-
return
|
|
1019
|
-
},
|
|
1020
|
-
var
|
|
1021
|
-
return
|
|
1022
|
-
},
|
|
1023
|
-
return
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1026
|
-
},
|
|
1027
|
-
var
|
|
1028
|
-
if (!J || !
|
|
1029
|
-
var h =
|
|
1030
|
-
J || (h.width = h.offsetWidth * E),
|
|
1017
|
+
}, m.getCanvas = function() {
|
|
1018
|
+
return m._canvas;
|
|
1019
|
+
}, m.getTrimmedCanvas = function() {
|
|
1020
|
+
var B = document.createElement("canvas");
|
|
1021
|
+
return B.width = m._canvas.width, B.height = m._canvas.height, B.getContext("2d").drawImage(m._canvas, 0, 0), (0, Q.default)(B);
|
|
1022
|
+
}, m.getSignaturePad = function() {
|
|
1023
|
+
return m._sigPad;
|
|
1024
|
+
}, m._checkClearOnResize = function() {
|
|
1025
|
+
m.props.clearOnResize && m._resizeCanvas();
|
|
1026
|
+
}, m._resizeCanvas = function() {
|
|
1027
|
+
var B = m.props.canvasProps || {}, J = B.width, i = B.height;
|
|
1028
|
+
if (!J || !i) {
|
|
1029
|
+
var h = m._canvas, E = Math.max(window.devicePixelRatio || 1, 1);
|
|
1030
|
+
J || (h.width = h.offsetWidth * E), i || (h.height = h.offsetHeight * E), h.getContext("2d").scale(E, E), m.clear();
|
|
1031
1031
|
}
|
|
1032
|
-
},
|
|
1033
|
-
return window.addEventListener("resize",
|
|
1034
|
-
},
|
|
1035
|
-
return window.removeEventListener("resize",
|
|
1036
|
-
},
|
|
1037
|
-
return
|
|
1038
|
-
},
|
|
1039
|
-
return
|
|
1040
|
-
},
|
|
1041
|
-
return
|
|
1042
|
-
},
|
|
1043
|
-
return
|
|
1044
|
-
},
|
|
1045
|
-
return
|
|
1046
|
-
},
|
|
1047
|
-
return
|
|
1048
|
-
},
|
|
1032
|
+
}, m.on = function() {
|
|
1033
|
+
return window.addEventListener("resize", m._checkClearOnResize), m._sigPad.on();
|
|
1034
|
+
}, m.off = function() {
|
|
1035
|
+
return window.removeEventListener("resize", m._checkClearOnResize), m._sigPad.off();
|
|
1036
|
+
}, m.clear = function() {
|
|
1037
|
+
return m._sigPad.clear();
|
|
1038
|
+
}, m.isEmpty = function() {
|
|
1039
|
+
return m._sigPad.isEmpty();
|
|
1040
|
+
}, m.fromDataURL = function(B, J) {
|
|
1041
|
+
return m._sigPad.fromDataURL(B, J);
|
|
1042
|
+
}, m.toDataURL = function(B, J) {
|
|
1043
|
+
return m._sigPad.toDataURL(B, J);
|
|
1044
|
+
}, m.fromData = function(B) {
|
|
1045
|
+
return m._sigPad.fromData(B);
|
|
1046
|
+
}, m.toData = function() {
|
|
1047
|
+
return m._sigPad.toData();
|
|
1048
|
+
}, H = F, y(m, H);
|
|
1049
1049
|
}
|
|
1050
|
-
return b(
|
|
1050
|
+
return b(P, A), _(P, [{ key: "componentDidMount", value: function() {
|
|
1051
1051
|
this._sigPad = new f.default(this._canvas, this._excludeOurProps()), this._resizeCanvas(), this.on();
|
|
1052
1052
|
} }, { key: "componentWillUnmount", value: function() {
|
|
1053
1053
|
this.off();
|
|
1054
1054
|
} }, { key: "componentDidUpdate", value: function() {
|
|
1055
1055
|
Object.assign(this._sigPad, this._excludeOurProps());
|
|
1056
1056
|
} }, { key: "render", value: function() {
|
|
1057
|
-
var
|
|
1058
|
-
return
|
|
1059
|
-
|
|
1060
|
-
} },
|
|
1061
|
-
} }]),
|
|
1062
|
-
})(
|
|
1063
|
-
K.propTypes = { velocityFilterWeight: g.default.number, minWidth: g.default.number, maxWidth: g.default.number, minDistance: g.default.number, dotSize: g.default.oneOfType([g.default.number, g.default.func]), penColor: g.default.string, throttle: g.default.number, onEnd: g.default.func, onBegin: g.default.func, canvasProps: g.default.object, clearOnResize: g.default.bool }, K.defaultProps = { clearOnResize: !0 },
|
|
1064
|
-
}, function(c,
|
|
1057
|
+
var q = this, F = this.props.canvasProps;
|
|
1058
|
+
return R.default.createElement("canvas", x({ ref: function(m) {
|
|
1059
|
+
q._canvas = m;
|
|
1060
|
+
} }, F));
|
|
1061
|
+
} }]), P;
|
|
1062
|
+
})(W.Component);
|
|
1063
|
+
K.propTypes = { velocityFilterWeight: g.default.number, minWidth: g.default.number, maxWidth: g.default.number, minDistance: g.default.number, dotSize: g.default.oneOfType([g.default.number, g.default.func]), penColor: g.default.string, throttle: g.default.number, onEnd: g.default.func, onBegin: g.default.func, canvasProps: g.default.object, clearOnResize: g.default.bool }, K.defaultProps = { clearOnResize: !0 }, l.default = K;
|
|
1064
|
+
}, function(c, l) {
|
|
1065
1065
|
c.exports = r;
|
|
1066
|
-
}, function(c,
|
|
1066
|
+
}, function(c, l) {
|
|
1067
1067
|
c.exports = t;
|
|
1068
|
-
}, function(c,
|
|
1068
|
+
}, function(c, l) {
|
|
1069
1069
|
c.exports = n;
|
|
1070
|
-
}, function(c,
|
|
1071
|
-
c.exports =
|
|
1070
|
+
}, function(c, l) {
|
|
1071
|
+
c.exports = o;
|
|
1072
1072
|
}]);
|
|
1073
1073
|
});
|
|
1074
1074
|
})(ce)), ce.exports;
|
|
1075
1075
|
}
|
|
1076
1076
|
var st = it();
|
|
1077
|
-
const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_7", ft = "_MainAuto_1sp4s_17", dt = "_MainManual_1sp4s_21", ht = "_Footer_1sp4s_27", pt = "_Header_1sp4s_37", vt = "_HeaderTitle_1sp4s_47", yt = "_HeaderManualDraw_1sp4s_52", mt = "_HeaderNotManualDraw_1sp4s_56", _t = "_HeaderReset_1sp4s_60", gt = "_ManualPanel_1sp4s_71", bt = "_ManualPanelButton_1sp4s_82", xt = "_AutoPanel_1sp4s_97", Pt = "_AutoPanelImage_1sp4s_104",
|
|
1077
|
+
const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_7", ft = "_MainAuto_1sp4s_17", dt = "_MainManual_1sp4s_21", ht = "_Footer_1sp4s_27", pt = "_Header_1sp4s_37", vt = "_HeaderTitle_1sp4s_47", yt = "_HeaderManualDraw_1sp4s_52", mt = "_HeaderNotManualDraw_1sp4s_56", _t = "_HeaderReset_1sp4s_60", gt = "_ManualPanel_1sp4s_71", bt = "_ManualPanelButton_1sp4s_82", xt = "_AutoPanel_1sp4s_97", Pt = "_AutoPanelImage_1sp4s_104", Et = "_AutoPanelLoader_1sp4s_110", wt = "_AutoPanelButton_1sp4s_117", Tt = "_AutoPanelLabel_1sp4s_121", St = "_AutoPanelLabelIcon_1sp4s_129", Ct = "_AutoPanelLabelText_1sp4s_135", Ot = "_AutoPanelError_1sp4s_142", Rt = "_AutoPanelErrorTitle_1sp4s_151", U = {
|
|
1078
1078
|
Signature: ct,
|
|
1079
1079
|
Main: lt,
|
|
1080
1080
|
MainAuto: ft,
|
|
@@ -1089,8 +1089,8 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1089
1089
|
ManualPanelButton: bt,
|
|
1090
1090
|
AutoPanel: xt,
|
|
1091
1091
|
AutoPanelImage: Pt,
|
|
1092
|
-
AutoPanelLoader:
|
|
1093
|
-
AutoPanelButton:
|
|
1092
|
+
AutoPanelLoader: Et,
|
|
1093
|
+
AutoPanelButton: wt,
|
|
1094
1094
|
AutoPanelLabel: Tt,
|
|
1095
1095
|
AutoPanelLabelIcon: St,
|
|
1096
1096
|
AutoPanelLabelText: Ct,
|
|
@@ -1103,83 +1103,86 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1103
1103
|
getSignature: r,
|
|
1104
1104
|
onChangeManual: t,
|
|
1105
1105
|
onChangeAuto: n,
|
|
1106
|
+
onSwitchToManual: o,
|
|
1107
|
+
onSwitchToAuto: c,
|
|
1108
|
+
onSwitchToPreview: l,
|
|
1106
1109
|
// Base props
|
|
1107
|
-
...
|
|
1110
|
+
...d
|
|
1108
1111
|
}) => {
|
|
1109
|
-
const
|
|
1110
|
-
(
|
|
1111
|
-
!
|
|
1112
|
-
width: +
|
|
1113
|
-
height: +
|
|
1112
|
+
const s = ze(null), [u, v] = oe(null), [y, b] = oe(a ? "manual" : "auto"), [x, _] = oe(""), [T, g] = oe(!1), { width: W = 0, height: R = 0 } = Ne({ ref: s, box: "border-box" }), j = y === "auto" ? e ? "auto-generated" : "auto-loading" : x ? "manual-drawn" : a ? "manual-stored" : "manual-blank", f = e !== "" || T, Z = a || x, Q = re(
|
|
1113
|
+
(z) => {
|
|
1114
|
+
!u || !W || !R || !z || u.fromDataURL(z, {
|
|
1115
|
+
width: +W.toFixed(),
|
|
1116
|
+
height: +R.toFixed()
|
|
1114
1117
|
});
|
|
1115
1118
|
},
|
|
1116
|
-
[
|
|
1117
|
-
),
|
|
1118
|
-
if (!
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1121
|
-
}, [
|
|
1122
|
-
|
|
1123
|
-
}, [
|
|
1124
|
-
|
|
1125
|
-
}, []),
|
|
1126
|
-
|
|
1127
|
-
}, []),
|
|
1128
|
-
|
|
1129
|
-
}, [t]),
|
|
1130
|
-
|
|
1131
|
-
}, [
|
|
1119
|
+
[u, W, R]
|
|
1120
|
+
), K = re(() => {
|
|
1121
|
+
if (!u) return;
|
|
1122
|
+
const z = u.getCanvas().toDataURL("image/png");
|
|
1123
|
+
_(z), t(z);
|
|
1124
|
+
}, [u, t]), A = re(() => {
|
|
1125
|
+
u && (u.clear(), _(""), t(""));
|
|
1126
|
+
}, [u, t]), P = re(() => {
|
|
1127
|
+
b("auto"), _(""), c?.();
|
|
1128
|
+
}, [c]), q = re(() => {
|
|
1129
|
+
b("manual"), o?.();
|
|
1130
|
+
}, [o]), F = re(() => {
|
|
1131
|
+
b("auto"), _(""), t(""), c?.();
|
|
1132
|
+
}, [t, c]), m = re(() => {
|
|
1133
|
+
x && (_(""), l?.());
|
|
1134
|
+
}, [x, l]), H = (z) => z.includes(j);
|
|
1132
1135
|
xe(() => {
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1135
|
-
n(""), r().then((
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1136
|
+
y === "manual" && x && W && R && Q(x);
|
|
1137
|
+
}, [y, x, W, R, Q]), xe(() => {
|
|
1138
|
+
n(""), r().then((z) => {
|
|
1139
|
+
const V = `data:image/png;base64,${z.signature}`;
|
|
1140
|
+
g(!1), n(V);
|
|
1138
1141
|
}).catch(() => {
|
|
1139
|
-
|
|
1142
|
+
g(!0);
|
|
1140
1143
|
});
|
|
1141
1144
|
}, []);
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1145
|
+
const ee = re(() => {
|
|
1146
|
+
g(!1), r().then((z) => {
|
|
1147
|
+
const V = `data:image/png;base64,${z.signature}`;
|
|
1148
|
+
g(!1), n(V);
|
|
1146
1149
|
}).catch(() => {
|
|
1147
|
-
|
|
1150
|
+
g(!0);
|
|
1148
1151
|
});
|
|
1149
1152
|
}, [r, n]);
|
|
1150
|
-
return /* @__PURE__ */
|
|
1153
|
+
return /* @__PURE__ */ te(
|
|
1151
1154
|
"div",
|
|
1152
1155
|
{
|
|
1153
|
-
"data-testid":
|
|
1154
|
-
className: fe(
|
|
1156
|
+
"data-testid": Ee(d, "data-testid", "signature"),
|
|
1157
|
+
className: fe(U.Signature, Ee(d, "className")),
|
|
1155
1158
|
children: [
|
|
1156
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ te(
|
|
1157
1160
|
"div",
|
|
1158
1161
|
{
|
|
1159
|
-
className: fe(
|
|
1160
|
-
ref:
|
|
1162
|
+
className: fe(U.Main, H(["auto-generated", "auto-loading"]) ? U.MainAuto : U.MainManual),
|
|
1163
|
+
ref: s,
|
|
1161
1164
|
children: [
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1165
|
+
/* @__PURE__ */ te("div", { className: fe(U.Header, H(["manual-drawn"]) ? U.HeaderManualDraw : U.HeaderNotManualDraw), children: [
|
|
1166
|
+
H(["auto-generated", "auto-loading"]) && /* @__PURE__ */ Y("span", { className: U.HeaderTitle, children: "Wir haben eine digitale Signature Sie generiert." }),
|
|
1167
|
+
H(["manual-blank", "manual-stored"]) && /* @__PURE__ */ Y("span", { className: U.HeaderTitle, children: "Ihre Signatur:" }),
|
|
1168
|
+
H(["manual-drawn"]) && /* @__PURE__ */ Y(
|
|
1166
1169
|
ie,
|
|
1167
1170
|
{
|
|
1168
1171
|
blurAfterClick: !0,
|
|
1169
1172
|
text: "Neu starten",
|
|
1170
1173
|
underlined: !0,
|
|
1171
|
-
icon: /* @__PURE__ */
|
|
1172
|
-
className:
|
|
1173
|
-
onClick:
|
|
1174
|
+
icon: /* @__PURE__ */ Y(Fe, {}),
|
|
1175
|
+
className: U.HeaderReset,
|
|
1176
|
+
onClick: A
|
|
1174
1177
|
}
|
|
1175
1178
|
)
|
|
1176
1179
|
] }),
|
|
1177
|
-
|
|
1178
|
-
e !== "" && /* @__PURE__ */
|
|
1179
|
-
e === "" && !
|
|
1180
|
-
e === "" &&
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1180
|
+
H(["auto-generated", "auto-loading"]) ? /* @__PURE__ */ te("div", { className: U.AutoPanel, children: [
|
|
1181
|
+
e !== "" && /* @__PURE__ */ Y("img", { className: U.AutoPanelImage, src: e, alt: "signature" }),
|
|
1182
|
+
e === "" && !T && /* @__PURE__ */ Y(Ue, { size: "sm", color: "accent-primary", className: U.AutoPanelLoader }),
|
|
1183
|
+
e === "" && T && /* @__PURE__ */ te("div", { className: U.AutoPanelError, children: [
|
|
1184
|
+
/* @__PURE__ */ Y("span", { className: U.AutoPanelErrorTitle, children: "Automatische Signatur konnte nicht geladen werden." }),
|
|
1185
|
+
/* @__PURE__ */ Y(
|
|
1183
1186
|
ie,
|
|
1184
1187
|
{
|
|
1185
1188
|
blurAfterClick: !0,
|
|
@@ -1187,28 +1190,28 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1187
1190
|
text: "Erneut versuchen",
|
|
1188
1191
|
size: "sm",
|
|
1189
1192
|
iconPosition: "right",
|
|
1190
|
-
icon: /* @__PURE__ */
|
|
1191
|
-
onClick:
|
|
1193
|
+
icon: /* @__PURE__ */ Y(qe, {}),
|
|
1194
|
+
onClick: ee
|
|
1192
1195
|
}
|
|
1193
1196
|
)
|
|
1194
1197
|
] }),
|
|
1195
|
-
e !== "" && /* @__PURE__ */
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
+
e !== "" && /* @__PURE__ */ te("div", { className: U.AutoPanelLabel, children: [
|
|
1199
|
+
/* @__PURE__ */ Y(Be, { className: U.AutoPanelLabelIcon }),
|
|
1200
|
+
/* @__PURE__ */ Y("span", { className: U.AutoPanelLabelText, children: "Diese Unterschrift ist ausreichend" })
|
|
1198
1201
|
] }),
|
|
1199
|
-
|
|
1202
|
+
f && /* @__PURE__ */ Y(
|
|
1200
1203
|
ie,
|
|
1201
1204
|
{
|
|
1202
1205
|
blurAfterClick: !0,
|
|
1203
1206
|
color: "link",
|
|
1204
1207
|
text: "Per Hand/Maus unterschreiben",
|
|
1205
1208
|
underlined: !0,
|
|
1206
|
-
className:
|
|
1207
|
-
onClick:
|
|
1209
|
+
className: U.AutoPanelButton,
|
|
1210
|
+
onClick: q
|
|
1208
1211
|
}
|
|
1209
1212
|
)
|
|
1210
|
-
] }) : /* @__PURE__ */
|
|
1211
|
-
|
|
1213
|
+
] }) : /* @__PURE__ */ te("div", { className: U.ManualPanel, children: [
|
|
1214
|
+
H(["manual-stored"]) ? /* @__PURE__ */ Y("img", { width: W, height: R, alt: "signature", src: Z }) : /* @__PURE__ */ Y(
|
|
1212
1215
|
ut,
|
|
1213
1216
|
{
|
|
1214
1217
|
penColor: "#262626",
|
|
@@ -1216,37 +1219,37 @@ const ut = /* @__PURE__ */ He(st), ct = "_Signature_1sp4s_1", lt = "_Main_1sp4s_
|
|
|
1216
1219
|
minWidth: 0.25,
|
|
1217
1220
|
maxWidth: 2.75,
|
|
1218
1221
|
throttle: 12,
|
|
1219
|
-
canvasProps: { width: +(
|
|
1220
|
-
ref: (
|
|
1222
|
+
canvasProps: { width: +(W || 0).toFixed(), height: +(R || 0).toFixed() },
|
|
1223
|
+
ref: (z) => v(z),
|
|
1221
1224
|
clearOnResize: !0,
|
|
1222
|
-
onEnd:
|
|
1225
|
+
onEnd: K
|
|
1223
1226
|
}
|
|
1224
1227
|
),
|
|
1225
|
-
|
|
1228
|
+
H(["manual-stored"]) && /* @__PURE__ */ Y(
|
|
1226
1229
|
ie,
|
|
1227
1230
|
{
|
|
1228
1231
|
blurAfterClick: !0,
|
|
1229
1232
|
underlined: !0,
|
|
1230
1233
|
text: "Zurücksetzen",
|
|
1231
|
-
className:
|
|
1232
|
-
onClick:
|
|
1234
|
+
className: U.ManualPanelButton,
|
|
1235
|
+
onClick: F
|
|
1233
1236
|
}
|
|
1234
1237
|
)
|
|
1235
1238
|
] })
|
|
1236
1239
|
]
|
|
1237
1240
|
}
|
|
1238
1241
|
),
|
|
1239
|
-
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
+
H(["manual-blank", "manual-drawn"]) && /* @__PURE__ */ te("div", { className: U.Footer, children: [
|
|
1243
|
+
/* @__PURE__ */ Y(Pe, { fullWidth: !0, blurAfterClick: !0, text: "Abbrechen", color: "tertiary", onClick: P }),
|
|
1244
|
+
/* @__PURE__ */ Y(
|
|
1242
1245
|
Pe,
|
|
1243
1246
|
{
|
|
1244
1247
|
fullWidth: !0,
|
|
1245
1248
|
blurAfterClick: !0,
|
|
1246
1249
|
text: "Speichern",
|
|
1247
1250
|
color: "primary",
|
|
1248
|
-
disabled: !
|
|
1249
|
-
onClick:
|
|
1251
|
+
disabled: !x,
|
|
1252
|
+
onClick: m
|
|
1250
1253
|
}
|
|
1251
1254
|
)
|
|
1252
1255
|
] })
|