@arthurzakharov/ui-kit 1.3.3 → 1.3.4

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 z } from "react/jsx-runtime";
1
+ import { jsxs as Q, jsx as z } from "react/jsx-runtime";
2
2
  import ze, { useRef as Fe, useState as Se, useCallback as re, useEffect as de } 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
6
  import Pe from "clsx";
7
- import { Animation as te } from "../../animations/animation.component.js";
7
+ import { Animation as ee } 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,11 +14,11 @@ 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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = 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, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, S = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = 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, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = 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
- var G = f.$$typeof;
21
- switch (G) {
20
+ var Z = f.$$typeof;
21
+ switch (Z) {
22
22
  case a:
23
23
  switch (f = f.type, f) {
24
24
  case p:
@@ -37,20 +37,20 @@ function Ve() {
37
37
  case u:
38
38
  return f;
39
39
  default:
40
- return G;
40
+ return Z;
41
41
  }
42
42
  }
43
43
  case r:
44
- return G;
44
+ return Z;
45
45
  }
46
46
  }
47
47
  }
48
- function D(f) {
48
+ function k(f) {
49
49
  return $(f) === c;
50
50
  }
51
51
  return I.AsyncMode = p, I.ConcurrentMode = c, I.ContextConsumer = i, I.ContextProvider = u, I.Element = a, I.ForwardRef = l, I.Fragment = t, I.Lazy = b, I.Memo = x, I.Portal = r, I.Profiler = o, I.StrictMode = n, I.Suspense = v, I.isAsyncMode = function(f) {
52
- return D(f) || $(f) === p;
53
- }, I.isConcurrentMode = D, I.isContextConsumer = function(f) {
52
+ return k(f) || $(f) === p;
53
+ }, I.isConcurrentMode = k, I.isContextConsumer = function(f) {
54
54
  return $(f) === i;
55
55
  }, I.isContextProvider = function(f) {
56
56
  return $(f) === u;
@@ -73,22 +73,22 @@ function Ve() {
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 === c || f === o || f === n || f === v || f === m || typeof f == "object" && f !== null && (f.$$typeof === b || f.$$typeof === x || f.$$typeof === u || f.$$typeof === i || f.$$typeof === l || f.$$typeof === S || f.$$typeof === _ || f.$$typeof === q || f.$$typeof === y);
76
+ return typeof f == "string" || typeof f == "function" || f === t || f === c || f === o || f === n || f === v || f === m || typeof f == "object" && f !== null && (f.$$typeof === b || f.$$typeof === x || f.$$typeof === u || f.$$typeof === i || f.$$typeof === l || f.$$typeof === C || f.$$typeof === g || f.$$typeof === q || f.$$typeof === y);
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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = 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, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, S = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, _ = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
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, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = 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, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, x = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, b = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, y = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, C = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, g = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, q = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
84
84
  function $(h) {
85
85
  return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
86
- h === t || h === c || h === o || h === n || h === v || h === m || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === x || h.$$typeof === u || h.$$typeof === i || h.$$typeof === l || h.$$typeof === S || h.$$typeof === _ || h.$$typeof === q || h.$$typeof === y);
86
+ h === t || h === c || h === o || h === n || h === v || h === m || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === x || h.$$typeof === u || h.$$typeof === i || h.$$typeof === l || h.$$typeof === C || h.$$typeof === g || h.$$typeof === q || h.$$typeof === y);
87
87
  }
88
- function D(h) {
88
+ function k(h) {
89
89
  if (typeof h == "object" && h !== null) {
90
- var K = h.$$typeof;
91
- switch (K) {
90
+ var G = h.$$typeof;
91
+ switch (G) {
92
92
  case a:
93
93
  var se = h.type;
94
94
  switch (se) {
@@ -109,55 +109,55 @@ function Xe() {
109
109
  case u:
110
110
  return be;
111
111
  default:
112
- return K;
112
+ return G;
113
113
  }
114
114
  }
115
115
  case r:
116
- return K;
116
+ return G;
117
117
  }
118
118
  }
119
119
  }
120
- var f = p, G = c, N = i, Y = u, k = a, E = l, B = t, F = b, g = x, Q = r, ae = o, V = n, J = v, U = !1;
121
- function Z(h) {
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.")), s(h) || D(h) === p;
120
+ var f = p, Z = c, te = i, N = u, E = a, w = l, B = t, F = b, _ = x, K = r, ae = o, H = n, X = v, U = !1;
121
+ function J(h) {
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.")), s(h) || k(h) === p;
123
123
  }
124
124
  function s(h) {
125
- return D(h) === c;
125
+ return k(h) === c;
126
126
  }
127
127
  function d(h) {
128
- return D(h) === i;
128
+ return k(h) === i;
129
129
  }
130
- function P(h) {
131
- return D(h) === u;
130
+ function S(h) {
131
+ return k(h) === u;
132
132
  }
133
- function C(h) {
133
+ function R(h) {
134
134
  return typeof h == "object" && h !== null && h.$$typeof === a;
135
135
  }
136
- function w(h) {
137
- return D(h) === l;
136
+ function P(h) {
137
+ return k(h) === l;
138
138
  }
139
- function O(h) {
140
- return D(h) === t;
139
+ function M(h) {
140
+ return k(h) === t;
141
141
  }
142
142
  function T(h) {
143
- return D(h) === b;
143
+ return k(h) === b;
144
144
  }
145
- function R(h) {
146
- return D(h) === x;
145
+ function O(h) {
146
+ return k(h) === x;
147
147
  }
148
- function M(h) {
149
- return D(h) === r;
148
+ function A(h) {
149
+ return k(h) === r;
150
150
  }
151
151
  function W(h) {
152
- return D(h) === o;
152
+ return k(h) === o;
153
153
  }
154
- function A(h) {
155
- return D(h) === n;
154
+ function D(h) {
155
+ return k(h) === n;
156
156
  }
157
- function H(h) {
158
- return D(h) === v;
157
+ function Y(h) {
158
+ return k(h) === 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 = F, j.Memo = g, j.Portal = Q, j.Profiler = ae, j.StrictMode = V, j.Suspense = J, j.isAsyncMode = Z, j.isConcurrentMode = s, j.isContextConsumer = d, j.isContextProvider = P, 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;
160
+ j.AsyncMode = f, j.ConcurrentMode = Z, j.ContextConsumer = te, j.ContextProvider = N, j.Element = E, j.ForwardRef = w, j.Fragment = B, j.Lazy = F, j.Memo = _, j.Portal = K, j.Profiler = ae, j.StrictMode = H, j.Suspense = X, j.isAsyncMode = J, j.isConcurrentMode = s, j.isContextConsumer = d, j.isContextProvider = S, j.isElement = R, j.isForwardRef = P, j.isFragment = M, j.isLazy = T, j.isMemo = O, j.isPortal = A, j.isProfiler = W, j.isStrictMode = D, j.isSuspense = Y, j.isValidElementType = $, j.typeOf = k;
161
161
  })()), j;
162
162
  }
163
163
  var Ce;
@@ -295,25 +295,25 @@ function Ge() {
295
295
  return d;
296
296
  }
297
297
  var m = "<<anonymous>>", x = {
298
- array: _("array"),
299
- bigint: _("bigint"),
300
- bool: _("boolean"),
301
- func: _("function"),
302
- number: _("number"),
303
- object: _("object"),
304
- string: _("string"),
305
- symbol: _("symbol"),
298
+ array: g("array"),
299
+ bigint: g("bigint"),
300
+ bool: g("boolean"),
301
+ func: g("function"),
302
+ number: g("number"),
303
+ object: g("object"),
304
+ string: g("string"),
305
+ symbol: g("symbol"),
306
306
  any: q(),
307
307
  arrayOf: $,
308
- element: D(),
308
+ element: k(),
309
309
  elementType: f(),
310
- instanceOf: G,
311
- node: E(),
312
- objectOf: Y,
313
- oneOf: N,
314
- oneOfType: k,
310
+ instanceOf: Z,
311
+ node: w(),
312
+ objectOf: N,
313
+ oneOf: te,
314
+ oneOfType: E,
315
315
  shape: F,
316
- exact: g
316
+ exact: _
317
317
  };
318
318
  function b(s, d) {
319
319
  return s === d ? s !== 0 || 1 / s === 1 / d : s !== s && d !== d;
@@ -322,204 +322,204 @@ function Ge() {
322
322
  this.message = s, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
323
323
  }
324
324
  y.prototype = Error.prototype;
325
- function S(s) {
325
+ function C(s) {
326
326
  if (process.env.NODE_ENV !== "production")
327
- var d = {}, P = 0;
328
- function C(O, T, R, M, W, A, H) {
329
- if (M = M || m, A = A || R, H !== r) {
327
+ var d = {}, S = 0;
328
+ function R(M, T, O, A, W, D, Y) {
329
+ if (A = A || m, D = D || O, Y !== r) {
330
330
  if (p) {
331
331
  var h = 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
334
  throw h.name = "Invariant Violation", h;
335
335
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
336
- var K = M + ":" + R;
337
- !d[K] && // Avoid spamming the console because they are often not actionable except for lib authors
338
- P < 3 && (o(
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
- ), d[K] = !0, P++);
336
+ var G = A + ":" + O;
337
+ !d[G] && // Avoid spamming the console because they are often not actionable except for lib authors
338
+ S < 3 && (o(
339
+ "You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + A + "`. 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
+ ), d[G] = !0, S++);
341
341
  }
342
342
  }
343
- return T[R] == null ? O ? T[R] === null ? new y("The " + W + " `" + A + "` is marked as required " + ("in `" + M + "`, but its value is `null`.")) : new y("The " + W + " `" + A + "` is marked as required in " + ("`" + M + "`, but its value is `undefined`.")) : null : s(T, R, M, W, A);
343
+ return T[O] == null ? M ? T[O] === null ? new y("The " + W + " `" + D + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new y("The " + W + " `" + D + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : s(T, O, A, W, D);
344
344
  }
345
- var w = C.bind(null, !1);
346
- return w.isRequired = C.bind(null, !0), w;
345
+ var P = R.bind(null, !1);
346
+ return P.isRequired = R.bind(null, !0), P;
347
347
  }
348
- function _(s) {
349
- function d(P, C, w, O, T, R) {
350
- var M = P[C], W = V(M);
348
+ function g(s) {
349
+ function d(S, R, P, M, T, O) {
350
+ var A = S[R], W = H(A);
351
351
  if (W !== s) {
352
- var A = J(M);
352
+ var D = X(A);
353
353
  return new y(
354
- "Invalid " + O + " `" + T + "` of type " + ("`" + A + "` supplied to `" + w + "`, expected ") + ("`" + s + "`."),
354
+ "Invalid " + M + " `" + T + "` of type " + ("`" + D + "` supplied to `" + P + "`, expected ") + ("`" + s + "`."),
355
355
  { expectedType: s }
356
356
  );
357
357
  }
358
358
  return null;
359
359
  }
360
- return S(d);
360
+ return C(d);
361
361
  }
362
362
  function q() {
363
- return S(u);
363
+ return C(u);
364
364
  }
365
365
  function $(s) {
366
- function d(P, C, w, O, T) {
366
+ function d(S, R, P, M, T) {
367
367
  if (typeof s != "function")
368
- return new y("Property `" + T + "` of component `" + w + "` has invalid PropType notation inside arrayOf.");
369
- var R = P[C];
370
- if (!Array.isArray(R)) {
371
- var M = V(R);
372
- return new y("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected an array."));
368
+ return new y("Property `" + T + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
369
+ var O = S[R];
370
+ if (!Array.isArray(O)) {
371
+ var A = H(O);
372
+ return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an array."));
373
373
  }
374
- for (var W = 0; W < R.length; W++) {
375
- var A = s(R, W, w, O, T + "[" + W + "]", r);
376
- if (A instanceof Error)
377
- return A;
374
+ for (var W = 0; W < O.length; W++) {
375
+ var D = s(O, W, P, M, T + "[" + W + "]", r);
376
+ if (D instanceof Error)
377
+ return D;
378
378
  }
379
379
  return null;
380
380
  }
381
- return S(d);
381
+ return C(d);
382
382
  }
383
- function D() {
384
- function s(d, P, C, w, O) {
385
- var T = d[P];
383
+ function k() {
384
+ function s(d, S, R, P, M) {
385
+ var T = d[S];
386
386
  if (!i(T)) {
387
- var R = V(T);
388
- return new y("Invalid " + w + " `" + O + "` of type " + ("`" + R + "` supplied to `" + C + "`, expected a single ReactElement."));
387
+ var O = H(T);
388
+ return new y("Invalid " + P + " `" + M + "` of type " + ("`" + O + "` supplied to `" + R + "`, expected a single ReactElement."));
389
389
  }
390
390
  return null;
391
391
  }
392
- return S(s);
392
+ return C(s);
393
393
  }
394
394
  function f() {
395
- function s(d, P, C, w, O) {
396
- var T = d[P];
395
+ function s(d, S, R, P, M) {
396
+ var T = d[S];
397
397
  if (!e.isValidElementType(T)) {
398
- var R = V(T);
399
- return new y("Invalid " + w + " `" + O + "` of type " + ("`" + R + "` supplied to `" + C + "`, expected a single ReactElement type."));
398
+ var O = H(T);
399
+ return new y("Invalid " + P + " `" + M + "` of type " + ("`" + O + "` supplied to `" + R + "`, expected a single ReactElement type."));
400
400
  }
401
401
  return null;
402
402
  }
403
- return S(s);
403
+ return C(s);
404
404
  }
405
- function G(s) {
406
- function d(P, C, w, O, T) {
407
- if (!(P[C] instanceof s)) {
408
- var R = s.name || m, M = Z(P[C]);
409
- return new y("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected ") + ("instance of `" + R + "`."));
405
+ function Z(s) {
406
+ function d(S, R, P, M, T) {
407
+ if (!(S[R] instanceof s)) {
408
+ var O = s.name || m, A = J(S[R]);
409
+ return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("instance of `" + O + "`."));
410
410
  }
411
411
  return null;
412
412
  }
413
- return S(d);
413
+ return C(d);
414
414
  }
415
- function N(s) {
415
+ function te(s) {
416
416
  if (!Array.isArray(s))
417
417
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
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
419
  ) : o("Invalid argument supplied to oneOf, expected an array.")), u;
420
- function d(P, C, w, O, T) {
421
- for (var R = P[C], M = 0; M < s.length; M++)
422
- if (b(R, s[M]))
420
+ function d(S, R, P, M, T) {
421
+ for (var O = S[R], A = 0; A < s.length; A++)
422
+ if (b(O, s[A]))
423
423
  return null;
424
- var W = JSON.stringify(s, function(H, h) {
425
- var K = J(h);
426
- return K === "symbol" ? String(h) : h;
424
+ var W = JSON.stringify(s, function(Y, h) {
425
+ var G = X(h);
426
+ return G === "symbol" ? String(h) : h;
427
427
  });
428
- return new y("Invalid " + O + " `" + T + "` of value `" + String(R) + "` " + ("supplied to `" + w + "`, expected one of " + W + "."));
428
+ return new y("Invalid " + M + " `" + T + "` of value `" + String(O) + "` " + ("supplied to `" + P + "`, expected one of " + W + "."));
429
429
  }
430
- return S(d);
430
+ return C(d);
431
431
  }
432
- function Y(s) {
433
- function d(P, C, w, O, T) {
432
+ function N(s) {
433
+ function d(S, R, P, M, T) {
434
434
  if (typeof s != "function")
435
- return new y("Property `" + T + "` of component `" + w + "` has invalid PropType notation inside objectOf.");
436
- var R = P[C], M = V(R);
437
- if (M !== "object")
438
- return new y("Invalid " + O + " `" + T + "` of type " + ("`" + M + "` supplied to `" + w + "`, expected an object."));
439
- for (var W in R)
440
- if (t(R, W)) {
441
- var A = s(R, W, w, O, T + "." + W, r);
442
- if (A instanceof Error)
443
- return A;
435
+ return new y("Property `" + T + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
436
+ var O = S[R], A = H(O);
437
+ if (A !== "object")
438
+ return new y("Invalid " + M + " `" + T + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an object."));
439
+ for (var W in O)
440
+ if (t(O, W)) {
441
+ var D = s(O, W, P, M, T + "." + W, r);
442
+ if (D instanceof Error)
443
+ return D;
444
444
  }
445
445
  return null;
446
446
  }
447
- return S(d);
447
+ return C(d);
448
448
  }
449
- function k(s) {
449
+ function E(s) {
450
450
  if (!Array.isArray(s))
451
451
  return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), u;
452
452
  for (var d = 0; d < s.length; d++) {
453
- var P = s[d];
454
- if (typeof P != "function")
453
+ var S = s[d];
454
+ if (typeof S != "function")
455
455
  return o(
456
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(P) + " at index " + d + "."
456
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + U(S) + " at index " + d + "."
457
457
  ), u;
458
458
  }
459
- function C(w, O, T, R, M) {
460
- for (var W = [], A = 0; A < s.length; A++) {
461
- var H = s[A], h = H(w, O, T, R, M, r);
459
+ function R(P, M, T, O, A) {
460
+ for (var W = [], D = 0; D < s.length; D++) {
461
+ var Y = s[D], h = Y(P, M, T, O, A, r);
462
462
  if (h == null)
463
463
  return null;
464
464
  h.data && t(h.data, "expectedType") && W.push(h.data.expectedType);
465
465
  }
466
- var K = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
467
- return new y("Invalid " + R + " `" + M + "` supplied to " + ("`" + T + "`" + K + "."));
466
+ var G = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
467
+ return new y("Invalid " + O + " `" + A + "` supplied to " + ("`" + T + "`" + G + "."));
468
468
  }
469
- return S(C);
469
+ return C(R);
470
470
  }
471
- function E() {
472
- function s(d, P, C, w, O) {
473
- return Q(d[P]) ? null : new y("Invalid " + w + " `" + O + "` supplied to " + ("`" + C + "`, expected a ReactNode."));
471
+ function w() {
472
+ function s(d, S, R, P, M) {
473
+ return K(d[S]) ? null : new y("Invalid " + P + " `" + M + "` supplied to " + ("`" + R + "`, expected a ReactNode."));
474
474
  }
475
- return S(s);
475
+ return C(s);
476
476
  }
477
- function B(s, d, P, C, w) {
477
+ function B(s, d, S, R, P) {
478
478
  return new y(
479
- (s || "React class") + ": " + d + " type `" + P + "." + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + w + "`."
479
+ (s || "React class") + ": " + d + " type `" + S + "." + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
480
480
  );
481
481
  }
482
482
  function F(s) {
483
- function d(P, C, w, O, T) {
484
- var R = P[C], M = V(R);
485
- if (M !== "object")
486
- return new y("Invalid " + O + " `" + T + "` of type `" + M + "` " + ("supplied to `" + w + "`, expected `object`."));
483
+ function d(S, R, P, M, T) {
484
+ var O = S[R], A = H(O);
485
+ if (A !== "object")
486
+ return new y("Invalid " + M + " `" + T + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
487
487
  for (var W in s) {
488
- var A = s[W];
489
- if (typeof A != "function")
490
- return B(w, O, T, W, J(A));
491
- var H = A(R, W, w, O, T + "." + W, r);
492
- if (H)
493
- return H;
488
+ var D = s[W];
489
+ if (typeof D != "function")
490
+ return B(P, M, T, W, X(D));
491
+ var Y = D(O, W, P, M, T + "." + W, r);
492
+ if (Y)
493
+ return Y;
494
494
  }
495
495
  return null;
496
496
  }
497
- return S(d);
497
+ return C(d);
498
498
  }
499
- function g(s) {
500
- function d(P, C, w, O, T) {
501
- var R = P[C], M = V(R);
502
- if (M !== "object")
503
- return new y("Invalid " + O + " `" + T + "` of type `" + M + "` " + ("supplied to `" + w + "`, expected `object`."));
504
- var W = a({}, P[C], s);
505
- for (var A in W) {
506
- var H = s[A];
507
- if (t(s, A) && typeof H != "function")
508
- return B(w, O, T, A, J(H));
509
- if (!H)
499
+ function _(s) {
500
+ function d(S, R, P, M, T) {
501
+ var O = S[R], A = H(O);
502
+ if (A !== "object")
503
+ return new y("Invalid " + M + " `" + T + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
504
+ var W = a({}, S[R], s);
505
+ for (var D in W) {
506
+ var Y = s[D];
507
+ if (t(s, D) && typeof Y != "function")
508
+ return B(P, M, T, D, X(Y));
509
+ if (!Y)
510
510
  return new y(
511
- "Invalid " + O + " `" + T + "` key `" + A + "` supplied to `" + w + "`.\nBad object: " + JSON.stringify(P[C], null, " ") + `
511
+ "Invalid " + M + " `" + T + "` key `" + D + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(S[R], null, " ") + `
512
512
  Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
513
513
  );
514
- var h = H(R, A, w, O, T + "." + A, r);
514
+ var h = Y(O, D, P, M, T + "." + D, r);
515
515
  if (h)
516
516
  return h;
517
517
  }
518
518
  return null;
519
519
  }
520
- return S(d);
520
+ return C(d);
521
521
  }
522
- function Q(s) {
522
+ function K(s) {
523
523
  switch (typeof s) {
524
524
  case "number":
525
525
  case "string":
@@ -529,20 +529,20 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
529
529
  return !s;
530
530
  case "object":
531
531
  if (Array.isArray(s))
532
- return s.every(Q);
532
+ return s.every(K);
533
533
  if (s === null || i(s))
534
534
  return !0;
535
535
  var d = v(s);
536
536
  if (d) {
537
- var P = d.call(s), C;
537
+ var S = d.call(s), R;
538
538
  if (d !== s.entries) {
539
- for (; !(C = P.next()).done; )
540
- if (!Q(C.value))
539
+ for (; !(R = S.next()).done; )
540
+ if (!K(R.value))
541
541
  return !1;
542
542
  } else
543
- for (; !(C = P.next()).done; ) {
544
- var w = C.value;
545
- if (w && !Q(w[1]))
543
+ for (; !(R = S.next()).done; ) {
544
+ var P = R.value;
545
+ if (P && !K(P[1]))
546
546
  return !1;
547
547
  }
548
548
  } else
@@ -555,14 +555,14 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
555
555
  function ae(s, d) {
556
556
  return s === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
557
557
  }
558
- function V(s) {
558
+ function H(s) {
559
559
  var d = typeof s;
560
560
  return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ae(d, s) ? "symbol" : d;
561
561
  }
562
- function J(s) {
562
+ function X(s) {
563
563
  if (typeof s > "u" || s === null)
564
564
  return "" + s;
565
- var d = V(s);
565
+ var d = H(s);
566
566
  if (d === "object") {
567
567
  if (s instanceof Date)
568
568
  return "date";
@@ -572,7 +572,7 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
572
572
  return d;
573
573
  }
574
574
  function U(s) {
575
- var d = J(s);
575
+ var d = X(s);
576
576
  switch (d) {
577
577
  case "array":
578
578
  case "object":
@@ -585,7 +585,7 @@ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
585
585
  return d;
586
586
  }
587
587
  }
588
- function Z(s) {
588
+ function J(s) {
589
589
  return !s.constructor || !s.constructor.name ? m : s.constructor.name;
590
590
  }
591
591
  return x.checkPropTypes = n, x.resetWarningCache = n.resetWarningCache, x.PropTypes = x, x;
@@ -798,10 +798,10 @@ L.prototype._addPoint = function(e) {
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, o = a.x - r.x, u = a.y - r.y, i = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, p = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, c = Math.sqrt(t * t + n * n), l = Math.sqrt(o * o + u * u), v = i.x - p.x, m = i.y - p.y, x = l / (c + l), b = { x: p.x + v * x, y: p.y + m * x }, y = a.x - b.x, S = a.y - b.y;
801
+ var t = e.x - a.x, n = e.y - a.y, o = a.x - r.x, u = a.y - r.y, i = { x: (e.x + a.x) / 2, y: (e.y + a.y) / 2 }, p = { x: (a.x + r.x) / 2, y: (a.y + r.y) / 2 }, c = Math.sqrt(t * t + n * n), l = Math.sqrt(o * o + u * u), v = i.x - p.x, m = i.y - p.y, x = l / (c + l), b = { x: p.x + v * x, y: p.y + m * x }, y = a.x - b.x, C = a.y - b.y;
802
802
  return {
803
- c1: new ne(i.x + y, i.y + S),
804
- c2: new ne(p.x + y, p.y + S)
803
+ c1: new ne(i.x + y, i.y + C),
804
+ c2: new ne(p.x + y, p.y + C)
805
805
  };
806
806
  };
807
807
  L.prototype._calculateCurveWidths = function(e) {
@@ -854,15 +854,15 @@ L.prototype._fromData = function(e, a, r) {
854
854
  };
855
855
  L.prototype._toSVG = function() {
856
856
  var e = this, a = this._data, r = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), n = 0, o = 0, u = r.width / t, i = r.height / t, p = document.createElementNS("http://www.w3.org/2000/svg", "svg");
857
- p.setAttributeNS(null, "width", r.width), p.setAttributeNS(null, "height", r.height), this._fromData(a, function(_, q, $) {
858
- var D = document.createElement("path");
859
- if (!isNaN(_.control1.x) && !isNaN(_.control1.y) && !isNaN(_.control2.x) && !isNaN(_.control2.y)) {
860
- var f = "M " + _.startPoint.x.toFixed(3) + "," + _.startPoint.y.toFixed(3) + " " + ("C " + _.control1.x.toFixed(3) + "," + _.control1.y.toFixed(3) + " ") + (_.control2.x.toFixed(3) + "," + _.control2.y.toFixed(3) + " ") + (_.endPoint.x.toFixed(3) + "," + _.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"), p.appendChild(D);
857
+ p.setAttributeNS(null, "width", r.width), p.setAttributeNS(null, "height", r.height), this._fromData(a, function(g, q, $) {
858
+ var k = document.createElement("path");
859
+ if (!isNaN(g.control1.x) && !isNaN(g.control1.y) && !isNaN(g.control2.x) && !isNaN(g.control2.y)) {
860
+ 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));
861
+ k.setAttribute("d", f), k.setAttribute("stroke-width", (q.end * 2.25).toFixed(3)), k.setAttribute("stroke", $), k.setAttribute("fill", "none"), k.setAttribute("stroke-linecap", "round"), p.appendChild(k);
862
862
  }
863
- }, function(_) {
863
+ }, function(g) {
864
864
  var q = document.createElement("circle"), $ = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
865
- q.setAttribute("r", $), q.setAttribute("cx", _.x), q.setAttribute("cy", _.y), q.setAttribute("fill", _.color), p.appendChild(q);
865
+ q.setAttribute("r", $), q.setAttribute("cx", g.x), q.setAttribute("cy", g.y), q.setAttribute("fill", g.color), p.appendChild(q);
866
866
  });
867
867
  var c = "data:image/svg+xml;base64,", l = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + n + " " + o + " " + u + " " + i + '"') + (' width="' + u + '"') + (' height="' + i + '"') + ">", v = p.innerHTML;
868
868
  if (v === void 0) {
@@ -872,8 +872,8 @@ L.prototype._toSVG = function() {
872
872
  m.appendChild(x[b].cloneNode(!0));
873
873
  v = m.innerHTML;
874
874
  }
875
- var y = "</svg>", S = l + v + y;
876
- return c + btoa(S);
875
+ var y = "</svg>", C = l + v + y;
876
+ return c + btoa(C);
877
877
  };
878
878
  L.prototype.fromData = function(e) {
879
879
  var a = this;
@@ -906,8 +906,8 @@ function at() {
906
906
  return t.m = r, t.c = n, t.p = "", t(0);
907
907
  })([function(r, t) {
908
908
  function n(c) {
909
- var l = c.getContext("2d"), v = c.width, m = c.height, x = l.getImageData(0, 0, v, m).data, b = i(!0, v, m, x), y = i(!1, v, m, x), S = p(!0, v, m, x), _ = p(!1, v, m, x), q = _ - S + 1, $ = y - b + 1, D = l.getImageData(S, b, q, $);
910
- return c.width = q, c.height = $, l.clearRect(0, 0, q, $), l.putImageData(D, 0, 0), c;
909
+ var l = c.getContext("2d"), v = c.width, m = c.height, x = l.getImageData(0, 0, v, m).data, b = i(!0, v, m, x), y = i(!1, v, m, x), C = p(!0, v, m, x), g = p(!1, v, m, x), q = g - C + 1, $ = y - b + 1, k = l.getImageData(C, b, q, $);
910
+ return c.width = q, c.height = $, l.clearRect(0, 0, q, $), l.putImageData(k, 0, 0), c;
911
911
  }
912
912
  function o(c, l, v, m) {
913
913
  return { red: m[4 * (v * l + c)], green: m[4 * (v * l + c) + 1], blue: m[4 * (v * l + c) + 2], alpha: m[4 * (v * l + c) + 3] };
@@ -916,11 +916,11 @@ function at() {
916
916
  return o(c, l, v, m).alpha;
917
917
  }
918
918
  function i(c, l, v, m) {
919
- for (var x = c ? 1 : -1, b = c ? 0 : v - 1, y = b; c ? y < v : y > -1; y += x) for (var S = 0; S < l; S++) if (u(S, y, l, m)) return y;
919
+ for (var x = c ? 1 : -1, b = c ? 0 : v - 1, y = b; c ? y < v : y > -1; y += x) for (var C = 0; C < l; C++) if (u(C, y, l, m)) return y;
920
920
  return null;
921
921
  }
922
922
  function p(c, l, v, m) {
923
- for (var x = c ? 1 : -1, b = c ? 0 : l - 1, y = b; c ? y < l : y > -1; y += x) for (var S = 0; S < v; S++) if (u(y, S, l, m)) return y;
923
+ for (var x = c ? 1 : -1, b = c ? 0 : l - 1, y = b; c ? y < l : y > -1; y += x) for (var C = 0; C < v; C++) if (u(y, C, l, m)) return y;
924
924
  return null;
925
925
  }
926
926
  Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
@@ -943,84 +943,84 @@ function it() {
943
943
  var p = {};
944
944
  return i.m = u, i.c = p, i.p = "", i(0);
945
945
  })([function(u, i, p) {
946
- function c(k) {
947
- return k && k.__esModule ? k : { default: k };
946
+ function c(E) {
947
+ return E && E.__esModule ? E : { default: E };
948
948
  }
949
- function l(k, E) {
949
+ function l(E, w) {
950
950
  var B = {};
951
- for (var F in k) E.indexOf(F) >= 0 || Object.prototype.hasOwnProperty.call(k, F) && (B[F] = k[F]);
951
+ for (var F in E) w.indexOf(F) >= 0 || Object.prototype.hasOwnProperty.call(E, F) && (B[F] = E[F]);
952
952
  return B;
953
953
  }
954
- function v(k, E) {
955
- if (!(k instanceof E)) throw new TypeError("Cannot call a class as a function");
954
+ function v(E, w) {
955
+ if (!(E instanceof w)) throw new TypeError("Cannot call a class as a function");
956
956
  }
957
- function m(k, E) {
958
- if (!k) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
959
- return !E || typeof E != "object" && typeof E != "function" ? k : E;
957
+ function m(E, w) {
958
+ if (!E) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
959
+ return !w || typeof w != "object" && typeof w != "function" ? E : w;
960
960
  }
961
- function x(k, E) {
962
- if (typeof E != "function" && E !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof E);
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);
961
+ function x(E, w) {
962
+ if (typeof w != "function" && w !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof w);
963
+ E.prototype = Object.create(w && w.prototype, { constructor: { value: E, enumerable: !1, writable: !0, configurable: !0 } }), w && (Object.setPrototypeOf ? Object.setPrototypeOf(E, w) : E.__proto__ = w);
964
964
  }
965
965
  Object.defineProperty(i, "__esModule", { value: !0 });
966
- var b = Object.assign || function(k) {
967
- for (var E = 1; E < arguments.length; E++) {
968
- var B = arguments[E];
969
- for (var F in B) Object.prototype.hasOwnProperty.call(B, F) && (k[F] = B[F]);
966
+ var b = Object.assign || function(E) {
967
+ for (var w = 1; w < arguments.length; w++) {
968
+ var B = arguments[w];
969
+ for (var F in B) Object.prototype.hasOwnProperty.call(B, F) && (E[F] = B[F]);
970
970
  }
971
- return k;
971
+ return E;
972
972
  }, y = /* @__PURE__ */ (function() {
973
- function k(E, B) {
973
+ function E(w, B) {
974
974
  for (var F = 0; F < B.length; F++) {
975
- var g = B[F];
976
- g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(E, g.key, g);
975
+ var _ = B[F];
976
+ _.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(w, _.key, _);
977
977
  }
978
978
  }
979
- return function(E, B, F) {
980
- return B && k(E.prototype, B), F && k(E, F), E;
979
+ return function(w, B, F) {
980
+ return B && E(w.prototype, B), F && E(w, F), w;
981
981
  };
982
- })(), S = p(1), _ = c(S), q = p(2), $ = c(q), D = p(3), f = c(D), G = p(4), N = c(G), Y = (function(k) {
983
- function E() {
984
- var B, F, g, Q;
985
- v(this, E);
986
- for (var ae = arguments.length, V = Array(ae), J = 0; J < ae; J++) V[J] = arguments[J];
987
- return F = g = m(this, (B = E.__proto__ || Object.getPrototypeOf(E)).call.apply(B, [this].concat(V))), g._sigPad = null, g._excludeOurProps = function() {
988
- var U = g.props, Z = (U.canvasProps, U.clearOnResize, l(U, ["canvasProps", "clearOnResize"]));
989
- return Z;
990
- }, g.getCanvas = function() {
991
- return g._canvas;
992
- }, g.getTrimmedCanvas = function() {
982
+ })(), C = p(1), g = c(C), q = p(2), $ = c(q), k = p(3), f = c(k), Z = p(4), te = c(Z), N = (function(E) {
983
+ function w() {
984
+ var B, F, _, K;
985
+ v(this, w);
986
+ for (var ae = arguments.length, H = Array(ae), X = 0; X < ae; X++) H[X] = arguments[X];
987
+ return F = _ = m(this, (B = w.__proto__ || Object.getPrototypeOf(w)).call.apply(B, [this].concat(H))), _._sigPad = null, _._excludeOurProps = function() {
988
+ var U = _.props, J = (U.canvasProps, U.clearOnResize, l(U, ["canvasProps", "clearOnResize"]));
989
+ return J;
990
+ }, _.getCanvas = function() {
991
+ return _._canvas;
992
+ }, _.getTrimmedCanvas = function() {
993
993
  var U = document.createElement("canvas");
994
- return U.width = g._canvas.width, U.height = g._canvas.height, U.getContext("2d").drawImage(g._canvas, 0, 0), (0, N.default)(U);
995
- }, g.getSignaturePad = function() {
996
- return g._sigPad;
997
- }, g._checkClearOnResize = function() {
998
- g.props.clearOnResize && g._resizeCanvas();
999
- }, g._resizeCanvas = function() {
1000
- var U = g.props.canvasProps || {}, Z = U.width, s = U.height;
1001
- if (!Z || !s) {
1002
- var d = g._canvas, P = Math.max(window.devicePixelRatio || 1, 1);
1003
- Z || (d.width = d.offsetWidth * P), s || (d.height = d.offsetHeight * P), d.getContext("2d").scale(P, P), g.clear();
994
+ return U.width = _._canvas.width, U.height = _._canvas.height, U.getContext("2d").drawImage(_._canvas, 0, 0), (0, te.default)(U);
995
+ }, _.getSignaturePad = function() {
996
+ return _._sigPad;
997
+ }, _._checkClearOnResize = function() {
998
+ _.props.clearOnResize && _._resizeCanvas();
999
+ }, _._resizeCanvas = function() {
1000
+ var U = _.props.canvasProps || {}, J = U.width, s = U.height;
1001
+ if (!J || !s) {
1002
+ var d = _._canvas, S = Math.max(window.devicePixelRatio || 1, 1);
1003
+ J || (d.width = d.offsetWidth * S), s || (d.height = d.offsetHeight * S), d.getContext("2d").scale(S, S), _.clear();
1004
1004
  }
1005
- }, g.on = function() {
1006
- return window.addEventListener("resize", g._checkClearOnResize), g._sigPad.on();
1007
- }, g.off = function() {
1008
- return window.removeEventListener("resize", g._checkClearOnResize), g._sigPad.off();
1009
- }, g.clear = function() {
1010
- return g._sigPad.clear();
1011
- }, g.isEmpty = function() {
1012
- return g._sigPad.isEmpty();
1013
- }, g.fromDataURL = function(U, Z) {
1014
- return g._sigPad.fromDataURL(U, Z);
1015
- }, g.toDataURL = function(U, Z) {
1016
- return g._sigPad.toDataURL(U, Z);
1017
- }, g.fromData = function(U) {
1018
- return g._sigPad.fromData(U);
1019
- }, g.toData = function() {
1020
- return g._sigPad.toData();
1021
- }, Q = F, m(g, Q);
1005
+ }, _.on = function() {
1006
+ return window.addEventListener("resize", _._checkClearOnResize), _._sigPad.on();
1007
+ }, _.off = function() {
1008
+ return window.removeEventListener("resize", _._checkClearOnResize), _._sigPad.off();
1009
+ }, _.clear = function() {
1010
+ return _._sigPad.clear();
1011
+ }, _.isEmpty = function() {
1012
+ return _._sigPad.isEmpty();
1013
+ }, _.fromDataURL = function(U, J) {
1014
+ return _._sigPad.fromDataURL(U, J);
1015
+ }, _.toDataURL = function(U, J) {
1016
+ return _._sigPad.toDataURL(U, J);
1017
+ }, _.fromData = function(U) {
1018
+ return _._sigPad.fromData(U);
1019
+ }, _.toData = function() {
1020
+ return _._sigPad.toData();
1021
+ }, K = F, m(_, K);
1022
1022
  }
1023
- return x(E, k), y(E, [{ key: "componentDidMount", value: function() {
1023
+ return x(w, E), y(w, [{ 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();
@@ -1028,12 +1028,12 @@ function it() {
1028
1028
  Object.assign(this._sigPad, this._excludeOurProps());
1029
1029
  } }, { key: "render", value: function() {
1030
1030
  var B = this, F = this.props.canvasProps;
1031
- return $.default.createElement("canvas", b({ ref: function(g) {
1032
- B._canvas = g;
1031
+ return $.default.createElement("canvas", b({ ref: function(_) {
1032
+ B._canvas = _;
1033
1033
  } }, F));
1034
- } }]), E;
1034
+ } }]), w;
1035
1035
  })(q.Component);
1036
- Y.propTypes = { velocityFilterWeight: _.default.number, minWidth: _.default.number, maxWidth: _.default.number, minDistance: _.default.number, dotSize: _.default.oneOfType([_.default.number, _.default.func]), penColor: _.default.string, throttle: _.default.number, onEnd: _.default.func, onBegin: _.default.func, canvasProps: _.default.object, clearOnResize: _.default.bool }, Y.defaultProps = { clearOnResize: !0 }, i.default = Y;
1036
+ N.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 }, N.defaultProps = { clearOnResize: !0 }, i.default = N;
1037
1037
  }, function(u, i) {
1038
1038
  u.exports = r;
1039
1039
  }, function(u, i) {
@@ -1047,7 +1047,7 @@ function it() {
1047
1047
  })(le)), le.exports;
1048
1048
  }
1049
1049
  var st = it();
1050
- const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMain_mhdg5_5", ft = "_SignatureMainAuto_mhdg5_15", dt = "_SignatureMainManual_mhdg5_19", ht = "_SignatureHeader_mhdg5_26", pt = "_SignatureHeaderReset_mhdg5_34", vt = "_SignatureManualPanel_mhdg5_41", yt = "_SignatureManualPanelPlaceholder_mhdg5_48", mt = "_SignatureManualPanelButton_mhdg5_52", gt = "_SignatureAutoPanelImage_mhdg5_67", _t = "_SignatureAutoPanelLoader_mhdg5_72", xt = "_SignatureAutoPanelNoteIcon_mhdg5_77", bt = "_SignatureAutoPanelButton_mhdg5_81", X = {
1050
+ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMain_mhdg5_5", ft = "_SignatureMainAuto_mhdg5_15", dt = "_SignatureMainManual_mhdg5_19", ht = "_SignatureHeader_mhdg5_26", pt = "_SignatureHeaderReset_mhdg5_34", vt = "_SignatureManualPanel_mhdg5_41", yt = "_SignatureManualPanelPlaceholder_mhdg5_48", mt = "_SignatureManualPanelButton_mhdg5_52", gt = "_SignatureAutoPanelImage_mhdg5_67", _t = "_SignatureAutoPanelLoader_mhdg5_72", xt = "_SignatureAutoPanelNoteIcon_mhdg5_77", bt = "_SignatureAutoPanelButton_mhdg5_81", V = {
1051
1051
  Signature: ct,
1052
1052
  SignatureMain: lt,
1053
1053
  SignatureMainAuto: ft,
@@ -1062,60 +1062,60 @@ 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 { modes: a, isInAutoMode: r, valueAuto: t, valueManual: n, onUpdateAuto: o, onUpdateManual: u, onChange: i, className: p = "" } = e, c = Fe(null), [l, v] = Se(null), [m, x] = Se("auto-generated"), { width: b = 0, height: y = 0 } = Ue({ ref: c, box: "border-box" }), S = re(() => {
1065
+ const { modes: a, isInAutoMode: r, valueAuto: t, valueManual: n, onUpdateAuto: o, onUpdateManual: u, onChange: i, className: p = "" } = e, c = Fe(null), [l, v] = Se(null), [m, x] = Se("auto-generated"), { width: b = 0, height: y = 0 } = Ue({ ref: c, box: "border-box" }), C = r ? "auto-generated" : m === "manual-drawn" ? "manual-drawn" : n ? "manual-stored" : "manual-blank", g = re(() => {
1066
1066
  l && b && y && n && l.fromDataURL(n, {
1067
1067
  width: +b.toFixed(),
1068
1068
  height: +y.toFixed()
1069
1069
  });
1070
- }, [l, b, y, n]), _ = re(() => {
1070
+ }, [l, b, y, n]), q = re(() => {
1071
1071
  if (l) {
1072
- const Y = l.getCanvas().toDataURL("image/png");
1073
- x("manual-drawn"), u(Y), i(Y);
1072
+ const E = l.getCanvas().toDataURL("image/png");
1073
+ x("manual-drawn"), u(E), i(E);
1074
1074
  }
1075
- }, [l, i, u]), q = re(() => {
1076
- l && (l.clear(), u(""), i(""));
1077
1075
  }, [l, i, u]), $ = re(() => {
1076
+ l && (l.clear(), u(""), i(""));
1077
+ }, [l, i, u]), k = re(() => {
1078
1078
  o(!0), x("auto-generated"), t && i(t);
1079
- }, [o, t, i]), D = re(() => {
1080
- o(!1), x(n ? "manual-stored" : "manual-blank"), n ? (i(n), setTimeout(S, 0)) : i("");
1081
- }, [o, n, i, S]), f = re(() => {
1079
+ }, [o, t, i]), f = re(() => {
1080
+ o(!1), x(n ? "manual-stored" : "manual-blank"), n ? (i(n), setTimeout(g, 0)) : i("");
1081
+ }, [o, n, i, g]), Z = re(() => {
1082
1082
  o(!1), x("manual-blank"), u(""), i("");
1083
- }, [o, u, i]), G = re(() => {
1084
- x("manual-stored"), S();
1085
- }, [S]), N = (Y) => Y.includes(m);
1083
+ }, [o, u, i]), te = re(() => {
1084
+ x("manual-stored"), g();
1085
+ }, [g]), N = (E) => E.includes(C);
1086
1086
  return de(() => {
1087
1087
  !a.includes("auto") && r && o(!1);
1088
1088
  }, [a, r, o]), de(() => {
1089
- !r && n && b && y && S();
1090
- }, [r, n, b, y, S]), de(() => {
1089
+ !r && n && b && y && g();
1090
+ }, [r, n, b, y, g]), de(() => {
1091
1091
  r && t ? i(t) : !r && !n && i("");
1092
- }, [r, t, n, i]), /* @__PURE__ */ ee("div", { className: Pe(X.Signature, p), children: [
1093
- /* @__PURE__ */ ee(
1092
+ }, [r, t, n, i]), /* @__PURE__ */ Q("div", { className: Pe(V.Signature, p), children: [
1093
+ /* @__PURE__ */ Q(
1094
1094
  "div",
1095
1095
  {
1096
1096
  className: Pe(
1097
- X.SignatureMain,
1098
- N(["auto-generated"]) ? X.SignatureMainAuto : X.SignatureMainManual
1097
+ V.SignatureMain,
1098
+ N(["auto-generated"]) ? V.SignatureMainAuto : V.SignatureMainManual
1099
1099
  ),
1100
1100
  ref: c,
1101
1101
  children: [
1102
- /* @__PURE__ */ ee(ie, { direction: "row", justify: N(["manual-drawn"]) ? "end" : "center", className: X.SignatureHeader, children: [
1103
- /* @__PURE__ */ ee(we.Tag, { tag: "h6", weight: "medium", size: "regular", color: "primary", align: "center", children: [
1104
- /* @__PURE__ */ z(te.FadeScale, { name: "generated-signature", condition: N(["auto-generated"]), children: "Wir haben eine digitale Signature Sie generiert." }),
1105
- /* @__PURE__ */ z(te.FadeScale, { flex: !0, name: "create-signature", condition: N(["manual-blank", "manual-stored"]), children: "Ihre Signatur:" })
1102
+ /* @__PURE__ */ Q(ie, { direction: "row", justify: N(["manual-drawn"]) ? "end" : "center", className: V.SignatureHeader, children: [
1103
+ /* @__PURE__ */ Q(we.Tag, { tag: "h6", weight: "medium", size: "regular", color: "primary", align: "center", children: [
1104
+ /* @__PURE__ */ z(ee.FadeScale, { name: "generated-signature", condition: N(["auto-generated"]), children: "Wir haben eine digitale Signature Sie generiert." }),
1105
+ /* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "create-signature", condition: N(["manual-blank", "manual-stored"]), children: "Ihre Signatur:" })
1106
1106
  ] }),
1107
- /* @__PURE__ */ z(te.FadeSlide, { flex: !0, name: "reset", direction: "rtl", condition: N(["manual-drawn"]), children: /* @__PURE__ */ z("div", { className: X.SignatureHeaderReset, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, icon: /* @__PURE__ */ z(Ne, {}), onClick: q, children: "Neu starten" }) }) })
1107
+ /* @__PURE__ */ z(ee.FadeSlide, { flex: !0, name: "reset", direction: "rtl", condition: N(["manual-drawn"]), children: /* @__PURE__ */ z("div", { className: V.SignatureHeaderReset, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, icon: /* @__PURE__ */ z(Ne, {}), onClick: $, children: "Neu starten" }) }) })
1108
1108
  ] }),
1109
- /* @__PURE__ */ z(ie, { direction: "row", align: "end", justify: "center", children: N(["auto-generated"]) ? /* @__PURE__ */ ee(ie, { direction: "column", align: "center", justify: "start", children: [
1110
- /* @__PURE__ */ z(te.FadeScale, { flex: !0, name: "signature", condition: t !== "", children: /* @__PURE__ */ z("img", { className: X.SignatureAutoPanelImage, src: t, alt: "signature" }) }),
1111
- /* @__PURE__ */ z(te.FadeScale, { flex: !0, name: "signature", condition: t === "", children: /* @__PURE__ */ z("div", { className: X.SignatureAutoPanelLoader, children: /* @__PURE__ */ z(He, { size: "sm", color: "primary" }) }) }),
1112
- /* @__PURE__ */ ee(ie, { direction: "row", align: "center", justify: "center", gap: "xxs", mt: "xs", children: [
1113
- /* @__PURE__ */ z(Ye, { size: 24, className: X.SignatureAutoPanelNoteIcon }),
1109
+ /* @__PURE__ */ z(ie, { direction: "row", align: "end", justify: "center", children: N(["auto-generated"]) ? /* @__PURE__ */ Q(ie, { direction: "column", align: "center", justify: "start", children: [
1110
+ /* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: t !== "", children: /* @__PURE__ */ z("img", { className: V.SignatureAutoPanelImage, src: t, alt: "signature" }) }),
1111
+ /* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: t === "", children: /* @__PURE__ */ z("div", { className: V.SignatureAutoPanelLoader, children: /* @__PURE__ */ z(He, { size: "sm", color: "primary" }) }) }),
1112
+ /* @__PURE__ */ Q(ie, { direction: "row", align: "center", justify: "center", gap: "xxs", mt: "xs", children: [
1113
+ /* @__PURE__ */ z(Ye, { size: 24, className: V.SignatureAutoPanelNoteIcon }),
1114
1114
  /* @__PURE__ */ z(we.Tag, { weight: "regular", size: "small", color: "secondary", children: "Diese Unterschrift ist ausreichend" })
1115
1115
  ] }),
1116
- /* @__PURE__ */ z(te.FadeScale, { flex: !0, name: "signature", condition: a.includes("manual"), children: /* @__PURE__ */ z("div", { className: X.SignatureAutoPanelButton, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: D, children: "per Hand/Maus unterschreiben" }) }) })
1117
- ] }) : /* @__PURE__ */ ee("div", { className: X.SignatureManualPanel, children: [
1118
- /* @__PURE__ */ z("div", { className: X.SignatureManualPanelPlaceholder }),
1116
+ /* @__PURE__ */ z(ee.FadeScale, { flex: !0, name: "signature", condition: a.includes("manual"), children: /* @__PURE__ */ z("div", { className: V.SignatureAutoPanelButton, children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: f, children: "per Hand/Maus unterschreiben" }) }) })
1117
+ ] }) : /* @__PURE__ */ Q("div", { className: V.SignatureManualPanel, children: [
1118
+ /* @__PURE__ */ z("div", { className: V.SignatureManualPanelPlaceholder }),
1119
1119
  N(["manual-stored"]) ? /* @__PURE__ */ z("img", { width: b, height: y, alt: "signature", src: n }) : /* @__PURE__ */ z(
1120
1120
  ut,
1121
1121
  {
@@ -1125,27 +1125,27 @@ const ut = /* @__PURE__ */ Be(st), ct = "_Signature_mhdg5_1", lt = "_SignatureMa
1125
1125
  maxWidth: 2.75,
1126
1126
  throttle: 12,
1127
1127
  canvasProps: { width: +(b || 0).toFixed(), height: +(y || 0).toFixed() },
1128
- ref: (Y) => v(Y),
1128
+ ref: (E) => v(E),
1129
1129
  clearOnResize: !0,
1130
- onEnd: _
1130
+ onEnd: q
1131
1131
  }
1132
1132
  ),
1133
1133
  /* @__PURE__ */ z(
1134
- te.FadeScale,
1134
+ ee.FadeScale,
1135
1135
  {
1136
1136
  name: "to-generated",
1137
1137
  condition: N(["manual-stored"]),
1138
- className: X.SignatureManualPanelButton,
1139
- children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: f, children: "Zurücksetzen" })
1138
+ className: V.SignatureManualPanelButton,
1139
+ children: /* @__PURE__ */ z(oe.ButtonText, { blurAfterClick: !0, underlined: !0, onClick: Z, children: "Zurücksetzen" })
1140
1140
  }
1141
1141
  )
1142
1142
  ] }) })
1143
1143
  ]
1144
1144
  }
1145
1145
  ),
1146
- /* @__PURE__ */ z(te.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: [
1147
- a.includes("auto") ? /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "tertiary", onClick: $, children: "Abbrechen" }) : null,
1148
- /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "primary", disabled: !n, onClick: G, children: "Speichern" })
1146
+ /* @__PURE__ */ z(ee.FadeScale, { name: "footer", condition: N(["manual-blank", "manual-drawn"]), children: /* @__PURE__ */ Q(ie, { direction: "row", align: "center", justify: "space-between", gap: "md", mt: "md", children: [
1147
+ a.includes("auto") ? /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "tertiary", onClick: k, children: "Abbrechen" }) : null,
1148
+ /* @__PURE__ */ z(oe.Button, { fullWidth: !0, blurAfterClick: !0, color: "primary", disabled: !n, onClick: te, children: "Speichern" })
1149
1149
  ] }) })
1150
1150
  ] });
1151
1151
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.3.3",
4
+ "version": "1.3.4",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",