dynamic-mui 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -5
- package/dist/accordion-DqBdGRim.mjs +23 -0
- package/dist/accordion-lvbD_BpX.js +1 -0
- package/dist/addressfield-CGX3UppE.mjs +152 -0
- package/dist/addressfield-DDG15fqJ.js +1 -0
- package/dist/asyncautocomplete-BAfBR9P7.mjs +89 -0
- package/dist/asyncautocomplete-w9q_1DWt.js +1 -0
- package/dist/bar-BzO7tvYJ.mjs +20 -0
- package/dist/bar-DEVxyUVS.js +1 -0
- package/dist/cascadeselect-C3QVfoig.mjs +64 -0
- package/dist/cascadeselect-DzbhK9en.js +1 -0
- package/dist/colorpicker-5qmEq7ZI.js +1 -0
- package/dist/colorpicker-DhNZulJY.mjs +98 -0
- package/dist/components/DynamicComponent.d.ts +2 -0
- package/dist/components/FormGenerator.d.ts +99 -10
- package/dist/components/controls/index.d.ts +45 -79
- package/dist/consentfield-B7Rm8d3U.js +1 -0
- package/dist/consentfield-CBQUR4J5.mjs +78 -0
- package/dist/datatable-BIQznwQe.mjs +20 -0
- package/dist/datatable-BWlcUP0M.js +1 -0
- package/dist/dynamic-mui.cjs +1 -0
- package/dist/dynamic-mui.mjs +32 -0
- package/dist/editabletable-DCoRmsEO.js +1 -0
- package/dist/editabletable-DRlBV8lk.mjs +126 -0
- package/dist/fileupload-ByBv1UjT.mjs +172 -0
- package/dist/fileupload-Cze3Oc_2.js +1 -0
- package/dist/formrepeater-BBkKGLFJ.mjs +71 -0
- package/dist/formrepeater-BxJzXoHx.js +1 -0
- package/dist/formwizard-BDZE1UDD.js +1 -0
- package/dist/formwizard-D2u1bMvK.mjs +83 -0
- package/dist/geofield-8WTeZk0Z.mjs +104 -0
- package/dist/geofield-Bw3p4NLJ.js +1 -0
- package/dist/group-B2mSylHd.mjs +23 -0
- package/dist/group-BlfO3ZZf.js +1 -0
- package/dist/imagelist-Bn9QhIv7.js +1 -0
- package/dist/imagelist-rqmJajHt.mjs +18 -0
- package/dist/index-CddjLTWF.mjs +12499 -0
- package/dist/index-D08GIfqF.js +43 -0
- package/dist/index.d.ts +9 -1
- package/dist/intlphone-B_Xn98pU.js +1 -0
- package/dist/intlphone-DtQZ12xk.mjs +140 -0
- package/dist/keyvaluefield-B_1NeGuP.mjs +125 -0
- package/dist/keyvaluefield-DyKCGd32.js +1 -0
- package/dist/line-B-DwR1hm.mjs +20 -0
- package/dist/line-BkymZu31.js +1 -0
- package/dist/lineitemlist-DGo8UOZC.js +1 -0
- package/dist/lineitemlist-vGKzJlQx.mjs +166 -0
- package/dist/list-7uNWrepS.mjs +20 -0
- package/dist/list-C0FgmtQw.js +1 -0
- package/dist/locationfield-CeUgxLkQ.mjs +119 -0
- package/dist/locationfield-Duyw1ZEz.js +1 -0
- package/dist/markdowneditor-B1y-hfny.mjs +90 -0
- package/dist/markdowneditor-Db0Un1_Z.js +2 -0
- package/dist/matrixfield-C7Sc-YpI.mjs +117 -0
- package/dist/matrixfield-CckODuPn.js +1 -0
- package/dist/mixChart-C3o184UT.js +1 -0
- package/dist/mixChart-ISf3Kbr-.mjs +75 -0
- package/dist/multitextbox-BYazIAeG.js +1 -0
- package/dist/multitextbox-ide2lvJ6.mjs +78 -0
- package/dist/npsscale-C2e88qk_.js +1 -0
- package/dist/npsscale-lndz7GEq.mjs +87 -0
- package/dist/numberstepper-DitbcvV9.mjs +128 -0
- package/dist/numberstepper-DyRjQM_K.js +1 -0
- package/dist/pie-CJSL8Sv5.js +1 -0
- package/dist/pie-CL29dlh5.mjs +20 -0
- package/dist/richtexteditor-CVg-MnKp.js +1 -0
- package/dist/richtexteditor-DsC1XC7h.mjs +141 -0
- package/dist/s3Upload-B0JeoLkS.js +1 -0
- package/dist/s3Upload-dpioZ2c8.mjs +51 -0
- package/dist/signature-14OrZriO.mjs +1225 -0
- package/dist/signature-D582X6tB.js +2 -0
- package/dist/stepper-B-FpcZvT.js +1 -0
- package/dist/stepper-CDfEy_C6.mjs +140 -0
- package/dist/summaryfield-B08ZmVHh.js +1 -0
- package/dist/summaryfield-CTpPlZBG.mjs +96 -0
- package/dist/tabs-BIliqFOs.js +1 -0
- package/dist/tabs-DDeJCFt8.mjs +39 -0
- package/dist/tagsinput-D-q6rRZS.mjs +58 -0
- package/dist/tagsinput-qh_lhdFb.js +1 -0
- package/dist/util/registry.d.ts +29 -0
- package/dist/util/resolvers.d.ts +45 -0
- package/dist/util/useFormEngine.d.ts +74 -0
- package/dist/util/validateSchema.d.ts +23 -0
- package/dist/v4-BysszJq8.mjs +30 -0
- package/dist/v4-CqdK_b8Y.js +1 -0
- package/package.json +36 -11
- package/dist/AxisSharedComponents-BbsKw1BT.js +0 -3
- package/dist/AxisSharedComponents-xLtpOLH_.mjs +0 -605
- package/dist/ChartsAxis-CANvBdY9.mjs +0 -47
- package/dist/ChartsAxis-EZ7m_KrU.js +0 -1
- package/dist/ChartsGrid-BCRTvNTr.js +0 -3
- package/dist/ChartsGrid-C_HT7qpL.mjs +0 -381
- package/dist/ChartsWrapper-CM7EDyAK.js +0 -5
- package/dist/ChartsWrapper-CO5_Z6BD.mjs +0 -1878
- package/dist/ChartsXAxis-CPmuCRhq.mjs +0 -487
- package/dist/ChartsXAxis-DFFY1sPg.js +0 -3
- package/dist/ChartsYAxis-DLUMr9vG.mjs +0 -392
- package/dist/ChartsYAxis-fpevi1sP.js +0 -1
- package/dist/XmlShapeDeserializer-3yQdm0b0.mjs +0 -237
- package/dist/XmlShapeDeserializer-XKJAoqLc.js +0 -1
- package/dist/clampAngle-BvZjnf53.mjs +0 -11
- package/dist/clampAngle-DpAsDoeT.js +0 -1
- package/dist/createSelector-B-9FwV16.mjs +0 -430
- package/dist/createSelector-f0oqn8Lr.js +0 -7
- package/dist/date-utils-CFUUt6NL.js +0 -4
- package/dist/date-utils-pGzaKb0p.mjs +0 -477
- package/dist/dynamic-mui.cjs.js +0 -1
- package/dist/dynamic-mui.es.js +0 -22
- package/dist/index--8Zky9Oh.js +0 -299
- package/dist/index-6WTs1Xy_.js +0 -1
- package/dist/index-B1R1akM2.js +0 -1
- package/dist/index-BW8_rRff.js +0 -7
- package/dist/index-BXFVK_GX.js +0 -1
- package/dist/index-B_KNUTjy.js +0 -1
- package/dist/index-BhaKvHkU.mjs +0 -62051
- package/dist/index-Bif92ima.js +0 -1
- package/dist/index-BnZOu8CL.js +0 -1
- package/dist/index-CDxpgRlR.mjs +0 -7
- package/dist/index-CThMfvtJ.mjs +0 -2555
- package/dist/index-CVqLvm8B.js +0 -1
- package/dist/index-CodJBIn6.mjs +0 -1665
- package/dist/index-Cr6Wp_S-.mjs +0 -3141
- package/dist/index-CslPwsrf.mjs +0 -4
- package/dist/index-CuV0MQzZ.mjs +0 -1173
- package/dist/index-DA0XouZs.mjs +0 -153
- package/dist/index-DKS5Sz9e.js +0 -14
- package/dist/index-DSkYYZuW.mjs +0 -4
- package/dist/index-DU78_FiA.js +0 -1
- package/dist/index-D_mYhgJ0.js +0 -10
- package/dist/index-DcWfyXJp.mjs +0 -92
- package/dist/index-Dlimbnxj.mjs +0 -2965
- package/dist/index-MllWgTJ5.mjs +0 -9372
- package/dist/index-in5z9hUb.js +0 -133
- package/dist/index-qUW7FnZ-.mjs +0 -20540
- package/dist/index.browser-BSu11T_q.mjs +0 -363
- package/dist/index.browser-By7-GABP.js +0 -4
- package/dist/isDeepEqual-BHfPvf9U.mjs +0 -393
- package/dist/isDeepEqual-CqxZGVRk.js +0 -1
- package/dist/loadCognitoIdentity-DtYTy-DW.js +0 -1
- package/dist/loadCognitoIdentity-DzdR91GB.mjs +0 -872
- package/dist/loadSts-Cic6UToN.mjs +0 -593
- package/dist/loadSts-csbFP6zX.js +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/noAuth-B8ui2kBg.mjs +0 -71
- package/dist/noAuth-JPA2o4dt.js +0 -1
- package/dist/playground/AIContext.d.ts +0 -18
- package/dist/playground/AIPanel.d.ts +0 -10
- package/dist/playground/Builder.d.ts +0 -1
- package/dist/playground/Canvas.d.ts +0 -9
- package/dist/playground/DemoGallery.d.ts +0 -6
- package/dist/playground/PropertiesEditor.d.ts +0 -10
- package/dist/playground/Sidebar.d.ts +0 -9
- package/dist/playground/demoForms.d.ts +0 -3
- package/dist/playground/demoRecipes.d.ts +0 -15
- package/dist/playground/demoVariants.d.ts +0 -11
- package/dist/playground/documentation.d.ts +0 -6
- package/dist/playground/templates.d.ts +0 -7
- package/dist/playground/testData.d.ts +0 -2
- package/dist/test/setup.d.ts +0 -0
- package/dist/theme/theme.d.ts +0 -6
- package/dist/useAxis-DSbfEtO7.js +0 -3
- package/dist/useAxis-SiNBMMWq.mjs +0 -3010
- package/dist/useChartContainerProps-Bl3hO-r1.mjs +0 -5418
- package/dist/useChartContainerProps-C_C_PZoi.js +0 -12
- package/dist/useItemHighlightedGetter-9CIwqsGj.js +0 -1
- package/dist/useItemHighlightedGetter-CTISrNdV.mjs +0 -88
|
@@ -0,0 +1,1225 @@
|
|
|
1
|
+
import { jsxs as rt, jsx as X } from "react/jsx-runtime";
|
|
2
|
+
import Ft, { Component as Yt, useRef as wt, useState as nt, useEffect as Pt } from "react";
|
|
3
|
+
import { g as Lt } from "./index-CddjLTWF.mjs";
|
|
4
|
+
import { Box as Q, Typography as Tt, Button as St, CircularProgress as Bt } from "@mui/material";
|
|
5
|
+
import { u as Nt } from "./s3Upload-dpioZ2c8.mjs";
|
|
6
|
+
function mt() {
|
|
7
|
+
return mt = Object.assign ? Object.assign.bind() : function(e) {
|
|
8
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
9
|
+
var n = arguments[r];
|
|
10
|
+
for (var t in n) ({}).hasOwnProperty.call(n, t) && (e[t] = n[t]);
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
}, mt.apply(null, arguments);
|
|
14
|
+
}
|
|
15
|
+
function Vt(e, r) {
|
|
16
|
+
if (e == null) return {};
|
|
17
|
+
var n = {};
|
|
18
|
+
for (var t in e) if ({}.hasOwnProperty.call(e, t)) {
|
|
19
|
+
if (r.indexOf(t) !== -1) continue;
|
|
20
|
+
n[t] = e[t];
|
|
21
|
+
}
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
24
|
+
function Ht(e, r) {
|
|
25
|
+
if (e == null) return {};
|
|
26
|
+
var n, t, o = Vt(e, r);
|
|
27
|
+
if (Object.getOwnPropertySymbols) {
|
|
28
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
29
|
+
for (t = 0; t < a.length; t++) n = a[t], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
|
|
30
|
+
}
|
|
31
|
+
return o;
|
|
32
|
+
}
|
|
33
|
+
function gt(e) {
|
|
34
|
+
"@babel/helpers - typeof";
|
|
35
|
+
return gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
36
|
+
return typeof r;
|
|
37
|
+
} : function(r) {
|
|
38
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
39
|
+
}, gt(e);
|
|
40
|
+
}
|
|
41
|
+
function Xt(e, r, n) {
|
|
42
|
+
return Object.defineProperty(e, "prototype", {
|
|
43
|
+
writable: !1
|
|
44
|
+
}), e;
|
|
45
|
+
}
|
|
46
|
+
function Jt(e, r) {
|
|
47
|
+
if (!(e instanceof r)) throw new TypeError("Cannot call a class as a function");
|
|
48
|
+
}
|
|
49
|
+
function _t(e, r) {
|
|
50
|
+
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, t) {
|
|
51
|
+
return n.__proto__ = t, n;
|
|
52
|
+
}, _t(e, r);
|
|
53
|
+
}
|
|
54
|
+
function Gt(e, r) {
|
|
55
|
+
if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
|
|
56
|
+
e.prototype = Object.create(r && r.prototype, {
|
|
57
|
+
constructor: {
|
|
58
|
+
value: e,
|
|
59
|
+
writable: !0,
|
|
60
|
+
configurable: !0
|
|
61
|
+
}
|
|
62
|
+
}), Object.defineProperty(e, "prototype", {
|
|
63
|
+
writable: !1
|
|
64
|
+
}), r && _t(e, r);
|
|
65
|
+
}
|
|
66
|
+
function st(e) {
|
|
67
|
+
return st = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
68
|
+
return r.__proto__ || Object.getPrototypeOf(r);
|
|
69
|
+
}, st(e);
|
|
70
|
+
}
|
|
71
|
+
function zt() {
|
|
72
|
+
try {
|
|
73
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
74
|
+
}));
|
|
75
|
+
} catch {
|
|
76
|
+
}
|
|
77
|
+
return (zt = function() {
|
|
78
|
+
return !!e;
|
|
79
|
+
})();
|
|
80
|
+
}
|
|
81
|
+
function Kt(e) {
|
|
82
|
+
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
83
|
+
return e;
|
|
84
|
+
}
|
|
85
|
+
function Zt(e, r) {
|
|
86
|
+
if (r && (gt(r) == "object" || typeof r == "function")) return r;
|
|
87
|
+
if (r !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
88
|
+
return Kt(e);
|
|
89
|
+
}
|
|
90
|
+
function Qt(e) {
|
|
91
|
+
var r = zt();
|
|
92
|
+
return function() {
|
|
93
|
+
var n, t = st(e);
|
|
94
|
+
if (r) {
|
|
95
|
+
var o = st(this).constructor;
|
|
96
|
+
n = Reflect.construct(t, arguments, o);
|
|
97
|
+
} else n = t.apply(this, arguments);
|
|
98
|
+
return Zt(this, n);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
var ot = { exports: {} }, it = { exports: {} }, M = {};
|
|
102
|
+
var Ct;
|
|
103
|
+
function te() {
|
|
104
|
+
if (Ct) return M;
|
|
105
|
+
Ct = 1;
|
|
106
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, v = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, E = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
107
|
+
function I(d) {
|
|
108
|
+
if (typeof d == "object" && d !== null) {
|
|
109
|
+
var Y = d.$$typeof;
|
|
110
|
+
switch (Y) {
|
|
111
|
+
case r:
|
|
112
|
+
switch (d = d.type, d) {
|
|
113
|
+
case l:
|
|
114
|
+
case c:
|
|
115
|
+
case t:
|
|
116
|
+
case a:
|
|
117
|
+
case o:
|
|
118
|
+
case p:
|
|
119
|
+
return d;
|
|
120
|
+
default:
|
|
121
|
+
switch (d = d && d.$$typeof, d) {
|
|
122
|
+
case i:
|
|
123
|
+
case f:
|
|
124
|
+
case E:
|
|
125
|
+
case m:
|
|
126
|
+
case u:
|
|
127
|
+
return d;
|
|
128
|
+
default:
|
|
129
|
+
return Y;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
case n:
|
|
133
|
+
return Y;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function D(d) {
|
|
138
|
+
return I(d) === c;
|
|
139
|
+
}
|
|
140
|
+
return M.AsyncMode = l, M.ConcurrentMode = c, M.ContextConsumer = i, M.ContextProvider = u, M.Element = r, M.ForwardRef = f, M.Fragment = t, M.Lazy = E, M.Memo = m, M.Portal = n, M.Profiler = a, M.StrictMode = o, M.Suspense = p, M.isAsyncMode = function(d) {
|
|
141
|
+
return D(d) || I(d) === l;
|
|
142
|
+
}, M.isConcurrentMode = D, M.isContextConsumer = function(d) {
|
|
143
|
+
return I(d) === i;
|
|
144
|
+
}, M.isContextProvider = function(d) {
|
|
145
|
+
return I(d) === u;
|
|
146
|
+
}, M.isElement = function(d) {
|
|
147
|
+
return typeof d == "object" && d !== null && d.$$typeof === r;
|
|
148
|
+
}, M.isForwardRef = function(d) {
|
|
149
|
+
return I(d) === f;
|
|
150
|
+
}, M.isFragment = function(d) {
|
|
151
|
+
return I(d) === t;
|
|
152
|
+
}, M.isLazy = function(d) {
|
|
153
|
+
return I(d) === E;
|
|
154
|
+
}, M.isMemo = function(d) {
|
|
155
|
+
return I(d) === m;
|
|
156
|
+
}, M.isPortal = function(d) {
|
|
157
|
+
return I(d) === n;
|
|
158
|
+
}, M.isProfiler = function(d) {
|
|
159
|
+
return I(d) === a;
|
|
160
|
+
}, M.isStrictMode = function(d) {
|
|
161
|
+
return I(d) === o;
|
|
162
|
+
}, M.isSuspense = function(d) {
|
|
163
|
+
return I(d) === p;
|
|
164
|
+
}, M.isValidElementType = function(d) {
|
|
165
|
+
return typeof d == "string" || typeof d == "function" || d === t || d === c || d === a || d === o || d === p || d === v || typeof d == "object" && d !== null && (d.$$typeof === E || d.$$typeof === m || d.$$typeof === u || d.$$typeof === i || d.$$typeof === f || d.$$typeof === b || d.$$typeof === w || d.$$typeof === W || d.$$typeof === g);
|
|
166
|
+
}, M.typeOf = I, M;
|
|
167
|
+
}
|
|
168
|
+
var A = {};
|
|
169
|
+
var Ot;
|
|
170
|
+
function ee() {
|
|
171
|
+
return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
172
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, u = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, i = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, v = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, E = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, b = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
173
|
+
function I(h) {
|
|
174
|
+
return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
175
|
+
h === t || h === c || h === a || h === o || h === p || h === v || typeof h == "object" && h !== null && (h.$$typeof === E || h.$$typeof === m || h.$$typeof === u || h.$$typeof === i || h.$$typeof === f || h.$$typeof === b || h.$$typeof === w || h.$$typeof === W || h.$$typeof === g);
|
|
176
|
+
}
|
|
177
|
+
function D(h) {
|
|
178
|
+
if (typeof h == "object" && h !== null) {
|
|
179
|
+
var F = h.$$typeof;
|
|
180
|
+
switch (F) {
|
|
181
|
+
case r:
|
|
182
|
+
var et = h.type;
|
|
183
|
+
switch (et) {
|
|
184
|
+
case l:
|
|
185
|
+
case c:
|
|
186
|
+
case t:
|
|
187
|
+
case a:
|
|
188
|
+
case o:
|
|
189
|
+
case p:
|
|
190
|
+
return et;
|
|
191
|
+
default:
|
|
192
|
+
var Et = et && et.$$typeof;
|
|
193
|
+
switch (Et) {
|
|
194
|
+
case i:
|
|
195
|
+
case f:
|
|
196
|
+
case E:
|
|
197
|
+
case m:
|
|
198
|
+
case u:
|
|
199
|
+
return Et;
|
|
200
|
+
default:
|
|
201
|
+
return F;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
case n:
|
|
205
|
+
return F;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
var d = l, Y = c, N = i, K = u, Z = r, z = f, B = t, U = E, V = m, G = n, ut = a, q = o, H = p, tt = !1;
|
|
210
|
+
function ft(h) {
|
|
211
|
+
return tt || (tt = !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) === l;
|
|
212
|
+
}
|
|
213
|
+
function s(h) {
|
|
214
|
+
return D(h) === c;
|
|
215
|
+
}
|
|
216
|
+
function y(h) {
|
|
217
|
+
return D(h) === i;
|
|
218
|
+
}
|
|
219
|
+
function S(h) {
|
|
220
|
+
return D(h) === u;
|
|
221
|
+
}
|
|
222
|
+
function P(h) {
|
|
223
|
+
return typeof h == "object" && h !== null && h.$$typeof === r;
|
|
224
|
+
}
|
|
225
|
+
function _(h) {
|
|
226
|
+
return D(h) === f;
|
|
227
|
+
}
|
|
228
|
+
function C(h) {
|
|
229
|
+
return D(h) === t;
|
|
230
|
+
}
|
|
231
|
+
function x(h) {
|
|
232
|
+
return D(h) === E;
|
|
233
|
+
}
|
|
234
|
+
function T(h) {
|
|
235
|
+
return D(h) === m;
|
|
236
|
+
}
|
|
237
|
+
function O(h) {
|
|
238
|
+
return D(h) === n;
|
|
239
|
+
}
|
|
240
|
+
function j(h) {
|
|
241
|
+
return D(h) === a;
|
|
242
|
+
}
|
|
243
|
+
function R(h) {
|
|
244
|
+
return D(h) === o;
|
|
245
|
+
}
|
|
246
|
+
function $(h) {
|
|
247
|
+
return D(h) === p;
|
|
248
|
+
}
|
|
249
|
+
A.AsyncMode = d, A.ConcurrentMode = Y, A.ContextConsumer = N, A.ContextProvider = K, A.Element = Z, A.ForwardRef = z, A.Fragment = B, A.Lazy = U, A.Memo = V, A.Portal = G, A.Profiler = ut, A.StrictMode = q, A.Suspense = H, A.isAsyncMode = ft, A.isConcurrentMode = s, A.isContextConsumer = y, A.isContextProvider = S, A.isElement = P, A.isForwardRef = _, A.isFragment = C, A.isLazy = x, A.isMemo = T, A.isPortal = O, A.isProfiler = j, A.isStrictMode = R, A.isSuspense = $, A.isValidElementType = I, A.typeOf = D;
|
|
250
|
+
})()), A;
|
|
251
|
+
}
|
|
252
|
+
var Rt;
|
|
253
|
+
function Ut() {
|
|
254
|
+
return Rt || (Rt = 1, process.env.NODE_ENV === "production" ? it.exports = te() : it.exports = ee()), it.exports;
|
|
255
|
+
}
|
|
256
|
+
var lt, Mt;
|
|
257
|
+
function re() {
|
|
258
|
+
if (Mt) return lt;
|
|
259
|
+
Mt = 1;
|
|
260
|
+
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
261
|
+
function t(a) {
|
|
262
|
+
if (a == null)
|
|
263
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
264
|
+
return Object(a);
|
|
265
|
+
}
|
|
266
|
+
function o() {
|
|
267
|
+
try {
|
|
268
|
+
if (!Object.assign)
|
|
269
|
+
return !1;
|
|
270
|
+
var a = new String("abc");
|
|
271
|
+
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
|
|
272
|
+
return !1;
|
|
273
|
+
for (var u = {}, i = 0; i < 10; i++)
|
|
274
|
+
u["_" + String.fromCharCode(i)] = i;
|
|
275
|
+
var l = Object.getOwnPropertyNames(u).map(function(f) {
|
|
276
|
+
return u[f];
|
|
277
|
+
});
|
|
278
|
+
if (l.join("") !== "0123456789")
|
|
279
|
+
return !1;
|
|
280
|
+
var c = {};
|
|
281
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
282
|
+
c[f] = f;
|
|
283
|
+
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
284
|
+
} catch {
|
|
285
|
+
return !1;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return lt = o() ? Object.assign : function(a, u) {
|
|
289
|
+
for (var i, l = t(a), c, f = 1; f < arguments.length; f++) {
|
|
290
|
+
i = Object(arguments[f]);
|
|
291
|
+
for (var p in i)
|
|
292
|
+
r.call(i, p) && (l[p] = i[p]);
|
|
293
|
+
if (e) {
|
|
294
|
+
c = e(i);
|
|
295
|
+
for (var v = 0; v < c.length; v++)
|
|
296
|
+
n.call(i, c[v]) && (l[c[v]] = i[c[v]]);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return l;
|
|
300
|
+
}, lt;
|
|
301
|
+
}
|
|
302
|
+
var dt, At;
|
|
303
|
+
function bt() {
|
|
304
|
+
if (At) return dt;
|
|
305
|
+
At = 1;
|
|
306
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
307
|
+
return dt = e, dt;
|
|
308
|
+
}
|
|
309
|
+
var ht, Dt;
|
|
310
|
+
function qt() {
|
|
311
|
+
return Dt || (Dt = 1, ht = Function.call.bind(Object.prototype.hasOwnProperty)), ht;
|
|
312
|
+
}
|
|
313
|
+
var pt, jt;
|
|
314
|
+
function ne() {
|
|
315
|
+
if (jt) return pt;
|
|
316
|
+
jt = 1;
|
|
317
|
+
var e = function() {
|
|
318
|
+
};
|
|
319
|
+
if (process.env.NODE_ENV !== "production") {
|
|
320
|
+
var r = /* @__PURE__ */ bt(), n = {}, t = /* @__PURE__ */ qt();
|
|
321
|
+
e = function(a) {
|
|
322
|
+
var u = "Warning: " + a;
|
|
323
|
+
typeof console < "u" && console.error(u);
|
|
324
|
+
try {
|
|
325
|
+
throw new Error(u);
|
|
326
|
+
} catch {
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function o(a, u, i, l, c) {
|
|
331
|
+
if (process.env.NODE_ENV !== "production") {
|
|
332
|
+
for (var f in a)
|
|
333
|
+
if (t(a, f)) {
|
|
334
|
+
var p;
|
|
335
|
+
try {
|
|
336
|
+
if (typeof a[f] != "function") {
|
|
337
|
+
var v = Error(
|
|
338
|
+
(l || "React class") + ": " + i + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
339
|
+
);
|
|
340
|
+
throw v.name = "Invariant Violation", v;
|
|
341
|
+
}
|
|
342
|
+
p = a[f](u, f, l, i, null, r);
|
|
343
|
+
} catch (E) {
|
|
344
|
+
p = E;
|
|
345
|
+
}
|
|
346
|
+
if (p && !(p instanceof Error) && e(
|
|
347
|
+
(l || "React class") + ": type specification of " + i + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
348
|
+
), p instanceof Error && !(p.message in n)) {
|
|
349
|
+
n[p.message] = !0;
|
|
350
|
+
var m = c ? c() : "";
|
|
351
|
+
e(
|
|
352
|
+
"Failed " + i + " type: " + p.message + (m ?? "")
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return o.resetWarningCache = function() {
|
|
359
|
+
process.env.NODE_ENV !== "production" && (n = {});
|
|
360
|
+
}, pt = o, pt;
|
|
361
|
+
}
|
|
362
|
+
var vt, It;
|
|
363
|
+
function oe() {
|
|
364
|
+
if (It) return vt;
|
|
365
|
+
It = 1;
|
|
366
|
+
var e = Ut(), r = re(), n = /* @__PURE__ */ bt(), t = /* @__PURE__ */ qt(), o = /* @__PURE__ */ ne(), a = function() {
|
|
367
|
+
};
|
|
368
|
+
process.env.NODE_ENV !== "production" && (a = function(i) {
|
|
369
|
+
var l = "Warning: " + i;
|
|
370
|
+
typeof console < "u" && console.error(l);
|
|
371
|
+
try {
|
|
372
|
+
throw new Error(l);
|
|
373
|
+
} catch {
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
function u() {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return vt = function(i, l) {
|
|
380
|
+
var c = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
381
|
+
function p(s) {
|
|
382
|
+
var y = s && (c && s[c] || s[f]);
|
|
383
|
+
if (typeof y == "function")
|
|
384
|
+
return y;
|
|
385
|
+
}
|
|
386
|
+
var v = "<<anonymous>>", m = {
|
|
387
|
+
array: w("array"),
|
|
388
|
+
bigint: w("bigint"),
|
|
389
|
+
bool: w("boolean"),
|
|
390
|
+
func: w("function"),
|
|
391
|
+
number: w("number"),
|
|
392
|
+
object: w("object"),
|
|
393
|
+
string: w("string"),
|
|
394
|
+
symbol: w("symbol"),
|
|
395
|
+
any: W(),
|
|
396
|
+
arrayOf: I,
|
|
397
|
+
element: D(),
|
|
398
|
+
elementType: d(),
|
|
399
|
+
instanceOf: Y,
|
|
400
|
+
node: z(),
|
|
401
|
+
objectOf: K,
|
|
402
|
+
oneOf: N,
|
|
403
|
+
oneOfType: Z,
|
|
404
|
+
shape: U,
|
|
405
|
+
exact: V
|
|
406
|
+
};
|
|
407
|
+
function E(s, y) {
|
|
408
|
+
return s === y ? s !== 0 || 1 / s === 1 / y : s !== s && y !== y;
|
|
409
|
+
}
|
|
410
|
+
function g(s, y) {
|
|
411
|
+
this.message = s, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
412
|
+
}
|
|
413
|
+
g.prototype = Error.prototype;
|
|
414
|
+
function b(s) {
|
|
415
|
+
if (process.env.NODE_ENV !== "production")
|
|
416
|
+
var y = {}, S = 0;
|
|
417
|
+
function P(C, x, T, O, j, R, $) {
|
|
418
|
+
if (O = O || v, R = R || T, $ !== n) {
|
|
419
|
+
if (l) {
|
|
420
|
+
var h = new Error(
|
|
421
|
+
"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"
|
|
422
|
+
);
|
|
423
|
+
throw h.name = "Invariant Violation", h;
|
|
424
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
425
|
+
var F = O + ":" + T;
|
|
426
|
+
!y[F] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
427
|
+
S < 3 && (a(
|
|
428
|
+
"You are manually calling a React.PropTypes validation function for the `" + R + "` prop on `" + O + "`. 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."
|
|
429
|
+
), y[F] = !0, S++);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return x[T] == null ? C ? x[T] === null ? new g("The " + j + " `" + R + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new g("The " + j + " `" + R + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : s(x, T, O, j, R);
|
|
433
|
+
}
|
|
434
|
+
var _ = P.bind(null, !1);
|
|
435
|
+
return _.isRequired = P.bind(null, !0), _;
|
|
436
|
+
}
|
|
437
|
+
function w(s) {
|
|
438
|
+
function y(S, P, _, C, x, T) {
|
|
439
|
+
var O = S[P], j = q(O);
|
|
440
|
+
if (j !== s) {
|
|
441
|
+
var R = H(O);
|
|
442
|
+
return new g(
|
|
443
|
+
"Invalid " + C + " `" + x + "` of type " + ("`" + R + "` supplied to `" + _ + "`, expected ") + ("`" + s + "`."),
|
|
444
|
+
{ expectedType: s }
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
return b(y);
|
|
450
|
+
}
|
|
451
|
+
function W() {
|
|
452
|
+
return b(u);
|
|
453
|
+
}
|
|
454
|
+
function I(s) {
|
|
455
|
+
function y(S, P, _, C, x) {
|
|
456
|
+
if (typeof s != "function")
|
|
457
|
+
return new g("Property `" + x + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
|
|
458
|
+
var T = S[P];
|
|
459
|
+
if (!Array.isArray(T)) {
|
|
460
|
+
var O = q(T);
|
|
461
|
+
return new g("Invalid " + C + " `" + x + "` of type " + ("`" + O + "` supplied to `" + _ + "`, expected an array."));
|
|
462
|
+
}
|
|
463
|
+
for (var j = 0; j < T.length; j++) {
|
|
464
|
+
var R = s(T, j, _, C, x + "[" + j + "]", n);
|
|
465
|
+
if (R instanceof Error)
|
|
466
|
+
return R;
|
|
467
|
+
}
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
return b(y);
|
|
471
|
+
}
|
|
472
|
+
function D() {
|
|
473
|
+
function s(y, S, P, _, C) {
|
|
474
|
+
var x = y[S];
|
|
475
|
+
if (!i(x)) {
|
|
476
|
+
var T = q(x);
|
|
477
|
+
return new g("Invalid " + _ + " `" + C + "` of type " + ("`" + T + "` supplied to `" + P + "`, expected a single ReactElement."));
|
|
478
|
+
}
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
return b(s);
|
|
482
|
+
}
|
|
483
|
+
function d() {
|
|
484
|
+
function s(y, S, P, _, C) {
|
|
485
|
+
var x = y[S];
|
|
486
|
+
if (!e.isValidElementType(x)) {
|
|
487
|
+
var T = q(x);
|
|
488
|
+
return new g("Invalid " + _ + " `" + C + "` of type " + ("`" + T + "` supplied to `" + P + "`, expected a single ReactElement type."));
|
|
489
|
+
}
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
return b(s);
|
|
493
|
+
}
|
|
494
|
+
function Y(s) {
|
|
495
|
+
function y(S, P, _, C, x) {
|
|
496
|
+
if (!(S[P] instanceof s)) {
|
|
497
|
+
var T = s.name || v, O = ft(S[P]);
|
|
498
|
+
return new g("Invalid " + C + " `" + x + "` of type " + ("`" + O + "` supplied to `" + _ + "`, expected ") + ("instance of `" + T + "`."));
|
|
499
|
+
}
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
return b(y);
|
|
503
|
+
}
|
|
504
|
+
function N(s) {
|
|
505
|
+
if (!Array.isArray(s))
|
|
506
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
507
|
+
"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])."
|
|
508
|
+
) : a("Invalid argument supplied to oneOf, expected an array.")), u;
|
|
509
|
+
function y(S, P, _, C, x) {
|
|
510
|
+
for (var T = S[P], O = 0; O < s.length; O++)
|
|
511
|
+
if (E(T, s[O]))
|
|
512
|
+
return null;
|
|
513
|
+
var j = JSON.stringify(s, function($, h) {
|
|
514
|
+
var F = H(h);
|
|
515
|
+
return F === "symbol" ? String(h) : h;
|
|
516
|
+
});
|
|
517
|
+
return new g("Invalid " + C + " `" + x + "` of value `" + String(T) + "` " + ("supplied to `" + _ + "`, expected one of " + j + "."));
|
|
518
|
+
}
|
|
519
|
+
return b(y);
|
|
520
|
+
}
|
|
521
|
+
function K(s) {
|
|
522
|
+
function y(S, P, _, C, x) {
|
|
523
|
+
if (typeof s != "function")
|
|
524
|
+
return new g("Property `" + x + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
|
|
525
|
+
var T = S[P], O = q(T);
|
|
526
|
+
if (O !== "object")
|
|
527
|
+
return new g("Invalid " + C + " `" + x + "` of type " + ("`" + O + "` supplied to `" + _ + "`, expected an object."));
|
|
528
|
+
for (var j in T)
|
|
529
|
+
if (t(T, j)) {
|
|
530
|
+
var R = s(T, j, _, C, x + "." + j, n);
|
|
531
|
+
if (R instanceof Error)
|
|
532
|
+
return R;
|
|
533
|
+
}
|
|
534
|
+
return null;
|
|
535
|
+
}
|
|
536
|
+
return b(y);
|
|
537
|
+
}
|
|
538
|
+
function Z(s) {
|
|
539
|
+
if (!Array.isArray(s))
|
|
540
|
+
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), u;
|
|
541
|
+
for (var y = 0; y < s.length; y++) {
|
|
542
|
+
var S = s[y];
|
|
543
|
+
if (typeof S != "function")
|
|
544
|
+
return a(
|
|
545
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + tt(S) + " at index " + y + "."
|
|
546
|
+
), u;
|
|
547
|
+
}
|
|
548
|
+
function P(_, C, x, T, O) {
|
|
549
|
+
for (var j = [], R = 0; R < s.length; R++) {
|
|
550
|
+
var $ = s[R], h = $(_, C, x, T, O, n);
|
|
551
|
+
if (h == null)
|
|
552
|
+
return null;
|
|
553
|
+
h.data && t(h.data, "expectedType") && j.push(h.data.expectedType);
|
|
554
|
+
}
|
|
555
|
+
var F = j.length > 0 ? ", expected one of type [" + j.join(", ") + "]" : "";
|
|
556
|
+
return new g("Invalid " + T + " `" + O + "` supplied to " + ("`" + x + "`" + F + "."));
|
|
557
|
+
}
|
|
558
|
+
return b(P);
|
|
559
|
+
}
|
|
560
|
+
function z() {
|
|
561
|
+
function s(y, S, P, _, C) {
|
|
562
|
+
return G(y[S]) ? null : new g("Invalid " + _ + " `" + C + "` supplied to " + ("`" + P + "`, expected a ReactNode."));
|
|
563
|
+
}
|
|
564
|
+
return b(s);
|
|
565
|
+
}
|
|
566
|
+
function B(s, y, S, P, _) {
|
|
567
|
+
return new g(
|
|
568
|
+
(s || "React class") + ": " + y + " type `" + S + "." + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
function U(s) {
|
|
572
|
+
function y(S, P, _, C, x) {
|
|
573
|
+
var T = S[P], O = q(T);
|
|
574
|
+
if (O !== "object")
|
|
575
|
+
return new g("Invalid " + C + " `" + x + "` of type `" + O + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
576
|
+
for (var j in s) {
|
|
577
|
+
var R = s[j];
|
|
578
|
+
if (typeof R != "function")
|
|
579
|
+
return B(_, C, x, j, H(R));
|
|
580
|
+
var $ = R(T, j, _, C, x + "." + j, n);
|
|
581
|
+
if ($)
|
|
582
|
+
return $;
|
|
583
|
+
}
|
|
584
|
+
return null;
|
|
585
|
+
}
|
|
586
|
+
return b(y);
|
|
587
|
+
}
|
|
588
|
+
function V(s) {
|
|
589
|
+
function y(S, P, _, C, x) {
|
|
590
|
+
var T = S[P], O = q(T);
|
|
591
|
+
if (O !== "object")
|
|
592
|
+
return new g("Invalid " + C + " `" + x + "` of type `" + O + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
593
|
+
var j = r({}, S[P], s);
|
|
594
|
+
for (var R in j) {
|
|
595
|
+
var $ = s[R];
|
|
596
|
+
if (t(s, R) && typeof $ != "function")
|
|
597
|
+
return B(_, C, x, R, H($));
|
|
598
|
+
if (!$)
|
|
599
|
+
return new g(
|
|
600
|
+
"Invalid " + C + " `" + x + "` key `" + R + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(S[P], null, " ") + `
|
|
601
|
+
Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
|
|
602
|
+
);
|
|
603
|
+
var h = $(T, R, _, C, x + "." + R, n);
|
|
604
|
+
if (h)
|
|
605
|
+
return h;
|
|
606
|
+
}
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
|
+
return b(y);
|
|
610
|
+
}
|
|
611
|
+
function G(s) {
|
|
612
|
+
switch (typeof s) {
|
|
613
|
+
case "number":
|
|
614
|
+
case "string":
|
|
615
|
+
case "undefined":
|
|
616
|
+
return !0;
|
|
617
|
+
case "boolean":
|
|
618
|
+
return !s;
|
|
619
|
+
case "object":
|
|
620
|
+
if (Array.isArray(s))
|
|
621
|
+
return s.every(G);
|
|
622
|
+
if (s === null || i(s))
|
|
623
|
+
return !0;
|
|
624
|
+
var y = p(s);
|
|
625
|
+
if (y) {
|
|
626
|
+
var S = y.call(s), P;
|
|
627
|
+
if (y !== s.entries) {
|
|
628
|
+
for (; !(P = S.next()).done; )
|
|
629
|
+
if (!G(P.value))
|
|
630
|
+
return !1;
|
|
631
|
+
} else
|
|
632
|
+
for (; !(P = S.next()).done; ) {
|
|
633
|
+
var _ = P.value;
|
|
634
|
+
if (_ && !G(_[1]))
|
|
635
|
+
return !1;
|
|
636
|
+
}
|
|
637
|
+
} else
|
|
638
|
+
return !1;
|
|
639
|
+
return !0;
|
|
640
|
+
default:
|
|
641
|
+
return !1;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
function ut(s, y) {
|
|
645
|
+
return s === "symbol" ? !0 : y ? y["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && y instanceof Symbol : !1;
|
|
646
|
+
}
|
|
647
|
+
function q(s) {
|
|
648
|
+
var y = typeof s;
|
|
649
|
+
return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : ut(y, s) ? "symbol" : y;
|
|
650
|
+
}
|
|
651
|
+
function H(s) {
|
|
652
|
+
if (typeof s > "u" || s === null)
|
|
653
|
+
return "" + s;
|
|
654
|
+
var y = q(s);
|
|
655
|
+
if (y === "object") {
|
|
656
|
+
if (s instanceof Date)
|
|
657
|
+
return "date";
|
|
658
|
+
if (s instanceof RegExp)
|
|
659
|
+
return "regexp";
|
|
660
|
+
}
|
|
661
|
+
return y;
|
|
662
|
+
}
|
|
663
|
+
function tt(s) {
|
|
664
|
+
var y = H(s);
|
|
665
|
+
switch (y) {
|
|
666
|
+
case "array":
|
|
667
|
+
case "object":
|
|
668
|
+
return "an " + y;
|
|
669
|
+
case "boolean":
|
|
670
|
+
case "date":
|
|
671
|
+
case "regexp":
|
|
672
|
+
return "a " + y;
|
|
673
|
+
default:
|
|
674
|
+
return y;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
function ft(s) {
|
|
678
|
+
return !s.constructor || !s.constructor.name ? v : s.constructor.name;
|
|
679
|
+
}
|
|
680
|
+
return m.checkPropTypes = o, m.resetWarningCache = o.resetWarningCache, m.PropTypes = m, m;
|
|
681
|
+
}, vt;
|
|
682
|
+
}
|
|
683
|
+
var yt, kt;
|
|
684
|
+
function ie() {
|
|
685
|
+
if (kt) return yt;
|
|
686
|
+
kt = 1;
|
|
687
|
+
var e = /* @__PURE__ */ bt();
|
|
688
|
+
function r() {
|
|
689
|
+
}
|
|
690
|
+
function n() {
|
|
691
|
+
}
|
|
692
|
+
return n.resetWarningCache = r, yt = function() {
|
|
693
|
+
function t(u, i, l, c, f, p) {
|
|
694
|
+
if (p !== e) {
|
|
695
|
+
var v = new Error(
|
|
696
|
+
"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"
|
|
697
|
+
);
|
|
698
|
+
throw v.name = "Invariant Violation", v;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
t.isRequired = t;
|
|
702
|
+
function o() {
|
|
703
|
+
return t;
|
|
704
|
+
}
|
|
705
|
+
var a = {
|
|
706
|
+
array: t,
|
|
707
|
+
bigint: t,
|
|
708
|
+
bool: t,
|
|
709
|
+
func: t,
|
|
710
|
+
number: t,
|
|
711
|
+
object: t,
|
|
712
|
+
string: t,
|
|
713
|
+
symbol: t,
|
|
714
|
+
any: t,
|
|
715
|
+
arrayOf: o,
|
|
716
|
+
element: t,
|
|
717
|
+
elementType: t,
|
|
718
|
+
instanceOf: o,
|
|
719
|
+
node: t,
|
|
720
|
+
objectOf: o,
|
|
721
|
+
oneOf: o,
|
|
722
|
+
oneOfType: o,
|
|
723
|
+
shape: o,
|
|
724
|
+
exact: o,
|
|
725
|
+
checkPropTypes: n,
|
|
726
|
+
resetWarningCache: r
|
|
727
|
+
};
|
|
728
|
+
return a.PropTypes = a, a;
|
|
729
|
+
}, yt;
|
|
730
|
+
}
|
|
731
|
+
var Wt;
|
|
732
|
+
function ae() {
|
|
733
|
+
if (Wt) return ot.exports;
|
|
734
|
+
if (Wt = 1, process.env.NODE_ENV !== "production") {
|
|
735
|
+
var e = Ut(), r = !0;
|
|
736
|
+
ot.exports = /* @__PURE__ */ oe()(e.isElement, r);
|
|
737
|
+
} else
|
|
738
|
+
ot.exports = /* @__PURE__ */ ie()();
|
|
739
|
+
return ot.exports;
|
|
740
|
+
}
|
|
741
|
+
var se = /* @__PURE__ */ ae();
|
|
742
|
+
const L = /* @__PURE__ */ Lt(se);
|
|
743
|
+
function J(e, r, n) {
|
|
744
|
+
this.x = e, this.y = r, this.time = n || (/* @__PURE__ */ new Date()).getTime();
|
|
745
|
+
}
|
|
746
|
+
J.prototype.velocityFrom = function(e) {
|
|
747
|
+
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 1;
|
|
748
|
+
};
|
|
749
|
+
J.prototype.distanceTo = function(e) {
|
|
750
|
+
return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2));
|
|
751
|
+
};
|
|
752
|
+
J.prototype.equals = function(e) {
|
|
753
|
+
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
754
|
+
};
|
|
755
|
+
function xt(e, r, n, t) {
|
|
756
|
+
this.startPoint = e, this.control1 = r, this.control2 = n, this.endPoint = t;
|
|
757
|
+
}
|
|
758
|
+
xt.prototype.length = function() {
|
|
759
|
+
for (var e = 10, r = 0, n = void 0, t = void 0, o = 0; o <= e; o += 1) {
|
|
760
|
+
var a = o / e, u = this._point(a, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), i = this._point(a, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
|
|
761
|
+
if (o > 0) {
|
|
762
|
+
var l = u - n, c = i - t;
|
|
763
|
+
r += Math.sqrt(l * l + c * c);
|
|
764
|
+
}
|
|
765
|
+
n = u, t = i;
|
|
766
|
+
}
|
|
767
|
+
return r;
|
|
768
|
+
};
|
|
769
|
+
xt.prototype._point = function(e, r, n, t, o) {
|
|
770
|
+
return r * (1 - e) * (1 - e) * (1 - e) + 3 * n * (1 - e) * (1 - e) * e + 3 * t * (1 - e) * e * e + o * e * e * e;
|
|
771
|
+
};
|
|
772
|
+
function ce(e, r, n) {
|
|
773
|
+
var t, o, a, u = null, i = 0;
|
|
774
|
+
n || (n = {});
|
|
775
|
+
var l = function() {
|
|
776
|
+
i = n.leading === !1 ? 0 : Date.now(), u = null, a = e.apply(t, o), u || (t = o = null);
|
|
777
|
+
};
|
|
778
|
+
return function() {
|
|
779
|
+
var c = Date.now();
|
|
780
|
+
!i && n.leading === !1 && (i = c);
|
|
781
|
+
var f = r - (c - i);
|
|
782
|
+
return t = this, o = arguments, f <= 0 || f > r ? (u && (clearTimeout(u), u = null), i = c, a = e.apply(t, o), u || (t = o = null)) : !u && n.trailing !== !1 && (u = setTimeout(l, f)), a;
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
function k(e, r) {
|
|
786
|
+
var n = this, t = r || {};
|
|
787
|
+
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 = ce(k.prototype._strokeUpdate, this.throttle) : this._strokeMoveUpdate = k.prototype._strokeUpdate, this.dotSize = t.dotSize || function() {
|
|
788
|
+
return (this.minWidth + this.maxWidth) / 2;
|
|
789
|
+
}, 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(o) {
|
|
790
|
+
o.which === 1 && (n._mouseButtonDown = !0, n._strokeBegin(o));
|
|
791
|
+
}, this._handleMouseMove = function(o) {
|
|
792
|
+
n._mouseButtonDown && n._strokeMoveUpdate(o);
|
|
793
|
+
}, this._handleMouseUp = function(o) {
|
|
794
|
+
o.which === 1 && n._mouseButtonDown && (n._mouseButtonDown = !1, n._strokeEnd(o));
|
|
795
|
+
}, this._handleTouchStart = function(o) {
|
|
796
|
+
if (o.targetTouches.length === 1) {
|
|
797
|
+
var a = o.changedTouches[0];
|
|
798
|
+
n._strokeBegin(a);
|
|
799
|
+
}
|
|
800
|
+
}, this._handleTouchMove = function(o) {
|
|
801
|
+
o.preventDefault();
|
|
802
|
+
var a = o.targetTouches[0];
|
|
803
|
+
n._strokeMoveUpdate(a);
|
|
804
|
+
}, this._handleTouchEnd = function(o) {
|
|
805
|
+
var a = o.target === n._canvas;
|
|
806
|
+
a && (o.preventDefault(), n._strokeEnd(o));
|
|
807
|
+
}, this.on();
|
|
808
|
+
}
|
|
809
|
+
k.prototype.clear = function() {
|
|
810
|
+
var e = this._ctx, r = this._canvas;
|
|
811
|
+
e.fillStyle = this.backgroundColor, e.clearRect(0, 0, r.width, r.height), e.fillRect(0, 0, r.width, r.height), this._data = [], this._reset(), this._isEmpty = !0;
|
|
812
|
+
};
|
|
813
|
+
k.prototype.fromDataURL = function(e) {
|
|
814
|
+
var r = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new Image(), o = n.ratio || window.devicePixelRatio || 1, a = n.width || this._canvas.width / o, u = n.height || this._canvas.height / o;
|
|
815
|
+
this._reset(), t.src = e, t.onload = function() {
|
|
816
|
+
r._ctx.drawImage(t, 0, 0, a, u);
|
|
817
|
+
}, this._isEmpty = !1;
|
|
818
|
+
};
|
|
819
|
+
k.prototype.toDataURL = function(e) {
|
|
820
|
+
var r;
|
|
821
|
+
switch (e) {
|
|
822
|
+
case "image/svg+xml":
|
|
823
|
+
return this._toSVG();
|
|
824
|
+
default:
|
|
825
|
+
for (var n = arguments.length, t = Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
826
|
+
t[o - 1] = arguments[o];
|
|
827
|
+
return (r = this._canvas).toDataURL.apply(r, [e].concat(t));
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
k.prototype.on = function() {
|
|
831
|
+
this._handleMouseEvents(), this._handleTouchEvents();
|
|
832
|
+
};
|
|
833
|
+
k.prototype.off = function() {
|
|
834
|
+
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);
|
|
835
|
+
};
|
|
836
|
+
k.prototype.isEmpty = function() {
|
|
837
|
+
return this._isEmpty;
|
|
838
|
+
};
|
|
839
|
+
k.prototype._strokeBegin = function(e) {
|
|
840
|
+
this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
|
|
841
|
+
};
|
|
842
|
+
k.prototype._strokeUpdate = function(e) {
|
|
843
|
+
var r = e.clientX, n = e.clientY, t = this._createPoint(r, n), o = this._data[this._data.length - 1], a = o && o[o.length - 1], u = a && t.distanceTo(a) < this.minDistance;
|
|
844
|
+
if (!(a && u)) {
|
|
845
|
+
var i = this._addPoint(t), l = i.curve, c = i.widths;
|
|
846
|
+
l && c && this._drawCurve(l, c.start, c.end), this._data[this._data.length - 1].push({
|
|
847
|
+
x: t.x,
|
|
848
|
+
y: t.y,
|
|
849
|
+
time: t.time,
|
|
850
|
+
color: this.penColor
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
k.prototype._strokeEnd = function(e) {
|
|
855
|
+
var r = this.points.length > 2, n = this.points[0];
|
|
856
|
+
if (!r && n && this._drawDot(n), n) {
|
|
857
|
+
var t = this._data[this._data.length - 1], o = t[t.length - 1];
|
|
858
|
+
n.equals(o) || t.push({
|
|
859
|
+
x: n.x,
|
|
860
|
+
y: n.y,
|
|
861
|
+
time: n.time,
|
|
862
|
+
color: this.penColor
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
typeof this.onEnd == "function" && this.onEnd(e);
|
|
866
|
+
};
|
|
867
|
+
k.prototype._handleMouseEvents = function() {
|
|
868
|
+
this._mouseButtonDown = !1, this._canvas.addEventListener("mousedown", this._handleMouseDown), this._canvas.addEventListener("mousemove", this._handleMouseMove), document.addEventListener("mouseup", this._handleMouseUp);
|
|
869
|
+
};
|
|
870
|
+
k.prototype._handleTouchEvents = function() {
|
|
871
|
+
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);
|
|
872
|
+
};
|
|
873
|
+
k.prototype._reset = function() {
|
|
874
|
+
this.points = [], this._lastVelocity = 0, this._lastWidth = (this.minWidth + this.maxWidth) / 2, this._ctx.fillStyle = this.penColor;
|
|
875
|
+
};
|
|
876
|
+
k.prototype._createPoint = function(e, r, n) {
|
|
877
|
+
var t = this._canvas.getBoundingClientRect();
|
|
878
|
+
return new J(e - t.left, r - t.top, n || (/* @__PURE__ */ new Date()).getTime());
|
|
879
|
+
};
|
|
880
|
+
k.prototype._addPoint = function(e) {
|
|
881
|
+
var r = this.points, n = void 0;
|
|
882
|
+
if (r.push(e), r.length > 2) {
|
|
883
|
+
r.length === 3 && r.unshift(r[0]), n = this._calculateCurveControlPoints(r[0], r[1], r[2]);
|
|
884
|
+
var t = n.c2;
|
|
885
|
+
n = this._calculateCurveControlPoints(r[1], r[2], r[3]);
|
|
886
|
+
var o = n.c1, a = new xt(r[1], t, o, r[2]), u = this._calculateCurveWidths(a);
|
|
887
|
+
return r.shift(), { curve: a, widths: u };
|
|
888
|
+
}
|
|
889
|
+
return {};
|
|
890
|
+
};
|
|
891
|
+
k.prototype._calculateCurveControlPoints = function(e, r, n) {
|
|
892
|
+
var t = e.x - r.x, o = e.y - r.y, a = r.x - n.x, u = r.y - n.y, i = { x: (e.x + r.x) / 2, y: (e.y + r.y) / 2 }, l = { x: (r.x + n.x) / 2, y: (r.y + n.y) / 2 }, c = Math.sqrt(t * t + o * o), f = Math.sqrt(a * a + u * u), p = i.x - l.x, v = i.y - l.y, m = f / (c + f), E = { x: l.x + p * m, y: l.y + v * m }, g = r.x - E.x, b = r.y - E.y;
|
|
893
|
+
return {
|
|
894
|
+
c1: new J(i.x + g, i.y + b),
|
|
895
|
+
c2: new J(l.x + g, l.y + b)
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
k.prototype._calculateCurveWidths = function(e) {
|
|
899
|
+
var r = e.startPoint, n = e.endPoint, t = { start: null, end: null }, o = this.velocityFilterWeight * n.velocityFrom(r) + (1 - this.velocityFilterWeight) * this._lastVelocity, a = this._strokeWidth(o);
|
|
900
|
+
return t.start = this._lastWidth, t.end = a, this._lastVelocity = o, this._lastWidth = a, t;
|
|
901
|
+
};
|
|
902
|
+
k.prototype._strokeWidth = function(e) {
|
|
903
|
+
return Math.max(this.maxWidth / (e + 1), this.minWidth);
|
|
904
|
+
};
|
|
905
|
+
k.prototype._drawPoint = function(e, r, n) {
|
|
906
|
+
var t = this._ctx;
|
|
907
|
+
t.moveTo(e, r), t.arc(e, r, n, 0, 2 * Math.PI, !1), this._isEmpty = !1;
|
|
908
|
+
};
|
|
909
|
+
k.prototype._drawCurve = function(e, r, n) {
|
|
910
|
+
var t = this._ctx, o = n - r, a = Math.floor(e.length());
|
|
911
|
+
t.beginPath();
|
|
912
|
+
for (var u = 0; u < a; u += 1) {
|
|
913
|
+
var i = u / a, l = i * i, c = l * i, f = 1 - i, p = f * f, v = p * f, m = v * e.startPoint.x;
|
|
914
|
+
m += 3 * p * i * e.control1.x, m += 3 * f * l * e.control2.x, m += c * e.endPoint.x;
|
|
915
|
+
var E = v * e.startPoint.y;
|
|
916
|
+
E += 3 * p * i * e.control1.y, E += 3 * f * l * e.control2.y, E += c * e.endPoint.y;
|
|
917
|
+
var g = r + c * o;
|
|
918
|
+
this._drawPoint(m, E, g);
|
|
919
|
+
}
|
|
920
|
+
t.closePath(), t.fill();
|
|
921
|
+
};
|
|
922
|
+
k.prototype._drawDot = function(e) {
|
|
923
|
+
var r = this._ctx, n = typeof this.dotSize == "function" ? this.dotSize() : this.dotSize;
|
|
924
|
+
r.beginPath(), this._drawPoint(e.x, e.y, n), r.closePath(), r.fill();
|
|
925
|
+
};
|
|
926
|
+
k.prototype._fromData = function(e, r, n) {
|
|
927
|
+
for (var t = 0; t < e.length; t += 1) {
|
|
928
|
+
var o = e[t];
|
|
929
|
+
if (o.length > 1)
|
|
930
|
+
for (var a = 0; a < o.length; a += 1) {
|
|
931
|
+
var u = o[a], i = new J(u.x, u.y, u.time), l = u.color;
|
|
932
|
+
if (a === 0)
|
|
933
|
+
this.penColor = l, this._reset(), this._addPoint(i);
|
|
934
|
+
else if (a !== o.length - 1) {
|
|
935
|
+
var c = this._addPoint(i), f = c.curve, p = c.widths;
|
|
936
|
+
f && p && r(f, p, l);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
this._reset();
|
|
941
|
+
var v = o[0];
|
|
942
|
+
n(v);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
k.prototype._toSVG = function() {
|
|
947
|
+
var e = this, r = this._data, n = this._canvas, t = Math.max(window.devicePixelRatio || 1, 1), o = 0, a = 0, u = n.width / t, i = n.height / t, l = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
948
|
+
l.setAttributeNS(null, "width", n.width), l.setAttributeNS(null, "height", n.height), this._fromData(r, function(w, W, I) {
|
|
949
|
+
var D = document.createElement("path");
|
|
950
|
+
if (!isNaN(w.control1.x) && !isNaN(w.control1.y) && !isNaN(w.control2.x) && !isNaN(w.control2.y)) {
|
|
951
|
+
var d = "M " + w.startPoint.x.toFixed(3) + "," + w.startPoint.y.toFixed(3) + " " + ("C " + w.control1.x.toFixed(3) + "," + w.control1.y.toFixed(3) + " ") + (w.control2.x.toFixed(3) + "," + w.control2.y.toFixed(3) + " ") + (w.endPoint.x.toFixed(3) + "," + w.endPoint.y.toFixed(3));
|
|
952
|
+
D.setAttribute("d", d), D.setAttribute("stroke-width", (W.end * 2.25).toFixed(3)), D.setAttribute("stroke", I), D.setAttribute("fill", "none"), D.setAttribute("stroke-linecap", "round"), l.appendChild(D);
|
|
953
|
+
}
|
|
954
|
+
}, function(w) {
|
|
955
|
+
var W = document.createElement("circle"), I = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
|
|
956
|
+
W.setAttribute("r", I), W.setAttribute("cx", w.x), W.setAttribute("cy", w.y), W.setAttribute("fill", w.color), l.appendChild(W);
|
|
957
|
+
});
|
|
958
|
+
var c = "data:image/svg+xml;base64,", f = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + o + " " + a + " " + u + " " + i + '"') + (' width="' + u + '"') + (' height="' + i + '"') + ">", p = l.innerHTML;
|
|
959
|
+
if (p === void 0) {
|
|
960
|
+
var v = document.createElement("dummy"), m = l.childNodes;
|
|
961
|
+
v.innerHTML = "";
|
|
962
|
+
for (var E = 0; E < m.length; E += 1)
|
|
963
|
+
v.appendChild(m[E].cloneNode(!0));
|
|
964
|
+
p = v.innerHTML;
|
|
965
|
+
}
|
|
966
|
+
var g = "</svg>", b = f + p + g;
|
|
967
|
+
return c + btoa(b);
|
|
968
|
+
};
|
|
969
|
+
k.prototype.fromData = function(e) {
|
|
970
|
+
var r = this;
|
|
971
|
+
this.clear(), this._fromData(e, function(n, t) {
|
|
972
|
+
return r._drawCurve(n, t.start, t.end);
|
|
973
|
+
}, function(n) {
|
|
974
|
+
return r._drawDot(n);
|
|
975
|
+
}), this._data = e;
|
|
976
|
+
};
|
|
977
|
+
k.prototype.toData = function() {
|
|
978
|
+
return this._data;
|
|
979
|
+
};
|
|
980
|
+
var at = { exports: {} }, ue = at.exports, $t;
|
|
981
|
+
function fe() {
|
|
982
|
+
return $t || ($t = 1, (function(e, r) {
|
|
983
|
+
(function(n, t) {
|
|
984
|
+
e.exports = t();
|
|
985
|
+
})(ue, function() {
|
|
986
|
+
return (function(n) {
|
|
987
|
+
function t(a) {
|
|
988
|
+
if (o[a]) return o[a].exports;
|
|
989
|
+
var u = o[a] = { exports: {}, id: a, loaded: !1 };
|
|
990
|
+
return n[a].call(u.exports, u, u.exports, t), u.loaded = !0, u.exports;
|
|
991
|
+
}
|
|
992
|
+
var o = {};
|
|
993
|
+
return t.m = n, t.c = o, t.p = "", t(0);
|
|
994
|
+
})([function(n, t) {
|
|
995
|
+
function o(c) {
|
|
996
|
+
var f = c.getContext("2d"), p = c.width, v = c.height, m = f.getImageData(0, 0, p, v).data, E = i(!0, p, v, m), g = i(!1, p, v, m), b = l(!0, p, v, m), w = l(!1, p, v, m), W = w - b + 1, I = g - E + 1, D = f.getImageData(b, E, W, I);
|
|
997
|
+
return c.width = W, c.height = I, f.clearRect(0, 0, W, I), f.putImageData(D, 0, 0), c;
|
|
998
|
+
}
|
|
999
|
+
function a(c, f, p, v) {
|
|
1000
|
+
return { red: v[4 * (p * f + c)], green: v[4 * (p * f + c) + 1], blue: v[4 * (p * f + c) + 2], alpha: v[4 * (p * f + c) + 3] };
|
|
1001
|
+
}
|
|
1002
|
+
function u(c, f, p, v) {
|
|
1003
|
+
return a(c, f, p, v).alpha;
|
|
1004
|
+
}
|
|
1005
|
+
function i(c, f, p, v) {
|
|
1006
|
+
for (var m = c ? 1 : -1, E = c ? 0 : p - 1, g = E; c ? g < p : g > -1; g += m) for (var b = 0; b < f; b++) if (u(b, g, f, v)) return g;
|
|
1007
|
+
return null;
|
|
1008
|
+
}
|
|
1009
|
+
function l(c, f, p, v) {
|
|
1010
|
+
for (var m = c ? 1 : -1, E = c ? 0 : f - 1, g = E; c ? g < f : g > -1; g += m) for (var b = 0; b < p; b++) if (u(g, b, f, v)) return g;
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
1013
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.default = o;
|
|
1014
|
+
}]);
|
|
1015
|
+
});
|
|
1016
|
+
})(at)), at.exports;
|
|
1017
|
+
}
|
|
1018
|
+
var le = fe();
|
|
1019
|
+
const de = /* @__PURE__ */ Lt(le);
|
|
1020
|
+
var he = ["canvasProps", "clearOnResize"], ct = /* @__PURE__ */ (function(e) {
|
|
1021
|
+
Gt(n, e);
|
|
1022
|
+
var r = Qt(n);
|
|
1023
|
+
function n() {
|
|
1024
|
+
var t;
|
|
1025
|
+
Jt(this, n);
|
|
1026
|
+
for (var o = arguments.length, a = new Array(o), u = 0; u < o; u++)
|
|
1027
|
+
a[u] = arguments[u];
|
|
1028
|
+
return t = r.call.apply(r, [this].concat(a)), t.staticThis = t.constructor, t._sigPad = null, t._canvas = null, t.setRef = function(i) {
|
|
1029
|
+
t._canvas = i, t._canvas === null && (t._sigPad = null);
|
|
1030
|
+
}, t._excludeOurProps = function() {
|
|
1031
|
+
var i = t.props;
|
|
1032
|
+
i.canvasProps, i.clearOnResize;
|
|
1033
|
+
var l = Ht(i, he);
|
|
1034
|
+
return l;
|
|
1035
|
+
}, t.componentDidMount = function() {
|
|
1036
|
+
var i = t.getCanvas();
|
|
1037
|
+
t._sigPad = new k(i, t._excludeOurProps()), t._resizeCanvas(), t.on();
|
|
1038
|
+
}, t.componentWillUnmount = function() {
|
|
1039
|
+
t.off();
|
|
1040
|
+
}, t.componentDidUpdate = function() {
|
|
1041
|
+
Object.assign(t._sigPad, t._excludeOurProps());
|
|
1042
|
+
}, t.getCanvas = function() {
|
|
1043
|
+
if (t._canvas === null)
|
|
1044
|
+
throw t.staticThis.refNullError;
|
|
1045
|
+
return t._canvas;
|
|
1046
|
+
}, t.getTrimmedCanvas = function() {
|
|
1047
|
+
var i = t.getCanvas(), l = document.createElement("canvas");
|
|
1048
|
+
return l.width = i.width, l.height = i.height, l.getContext("2d").drawImage(i, 0, 0), de(l);
|
|
1049
|
+
}, t.getSignaturePad = function() {
|
|
1050
|
+
if (t._sigPad === null)
|
|
1051
|
+
throw t.staticThis.refNullError;
|
|
1052
|
+
return t._sigPad;
|
|
1053
|
+
}, t._checkClearOnResize = function() {
|
|
1054
|
+
t.props.clearOnResize && t._resizeCanvas();
|
|
1055
|
+
}, t._resizeCanvas = function() {
|
|
1056
|
+
var i, l, c = (i = t.props.canvasProps) !== null && i !== void 0 ? i : {}, f = c.width, p = c.height;
|
|
1057
|
+
if (!(typeof f < "u" && typeof p < "u")) {
|
|
1058
|
+
var v = t.getCanvas(), m = Math.max((l = window.devicePixelRatio) !== null && l !== void 0 ? l : 1, 1);
|
|
1059
|
+
typeof f > "u" && (v.width = v.offsetWidth * m), typeof p > "u" && (v.height = v.offsetHeight * m), v.getContext("2d").scale(m, m), t.clear();
|
|
1060
|
+
}
|
|
1061
|
+
}, t.render = function() {
|
|
1062
|
+
var i = t.props.canvasProps;
|
|
1063
|
+
return /* @__PURE__ */ Ft.createElement("canvas", mt({
|
|
1064
|
+
ref: t.setRef
|
|
1065
|
+
}, i));
|
|
1066
|
+
}, t.on = function() {
|
|
1067
|
+
return window.addEventListener("resize", t._checkClearOnResize), t.getSignaturePad().on();
|
|
1068
|
+
}, t.off = function() {
|
|
1069
|
+
return window.removeEventListener("resize", t._checkClearOnResize), t.getSignaturePad().off();
|
|
1070
|
+
}, t.clear = function() {
|
|
1071
|
+
return t.getSignaturePad().clear();
|
|
1072
|
+
}, t.isEmpty = function() {
|
|
1073
|
+
return t.getSignaturePad().isEmpty();
|
|
1074
|
+
}, t.fromDataURL = function(i, l) {
|
|
1075
|
+
return t.getSignaturePad().fromDataURL(i, l);
|
|
1076
|
+
}, t.toDataURL = function(i, l) {
|
|
1077
|
+
return t.getSignaturePad().toDataURL(i, l);
|
|
1078
|
+
}, t.fromData = function(i) {
|
|
1079
|
+
return t.getSignaturePad().fromData(i);
|
|
1080
|
+
}, t.toData = function() {
|
|
1081
|
+
return t.getSignaturePad().toData();
|
|
1082
|
+
}, t;
|
|
1083
|
+
}
|
|
1084
|
+
return Xt(n);
|
|
1085
|
+
})(Yt);
|
|
1086
|
+
ct.propTypes = {
|
|
1087
|
+
// signature_pad's props
|
|
1088
|
+
velocityFilterWeight: L.number,
|
|
1089
|
+
minWidth: L.number,
|
|
1090
|
+
maxWidth: L.number,
|
|
1091
|
+
minDistance: L.number,
|
|
1092
|
+
dotSize: L.oneOfType([L.number, L.func]),
|
|
1093
|
+
penColor: L.string,
|
|
1094
|
+
throttle: L.number,
|
|
1095
|
+
onEnd: L.func,
|
|
1096
|
+
onBegin: L.func,
|
|
1097
|
+
// props specific to the React wrapper
|
|
1098
|
+
canvasProps: L.object,
|
|
1099
|
+
clearOnResize: L.bool
|
|
1100
|
+
};
|
|
1101
|
+
ct.defaultProps = {
|
|
1102
|
+
clearOnResize: !0
|
|
1103
|
+
};
|
|
1104
|
+
ct.refNullError = new Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");
|
|
1105
|
+
function _e({ attributes: e = {}, rules: r = {}, onChange: n }) {
|
|
1106
|
+
const { id: t = "", MuiAttributes: o = {}, label: a = "Signature", bucket: u = "", region: i = "", identityPoolId: l = "", path: c = "", disabled: f = !1, CanvasProps: p = {} } = e, v = wt(null), m = wt(null), [E, g] = nt(!1), [b, w] = nt(e.value || null), [W, I] = nt(400), [D, d] = nt(!1), Y = r?.validation?.some((z) => z.rule === "mandatory") || !1, N = p?.style?.height || 150;
|
|
1107
|
+
Pt(() => {
|
|
1108
|
+
const z = m.current;
|
|
1109
|
+
if (!z) return;
|
|
1110
|
+
const B = new ResizeObserver((U) => {
|
|
1111
|
+
const V = U[0]?.contentRect?.width;
|
|
1112
|
+
V && V > 0 && I(Math.floor(V));
|
|
1113
|
+
});
|
|
1114
|
+
return B.observe(z), () => B.disconnect();
|
|
1115
|
+
}, []), Pt(() => {
|
|
1116
|
+
if (!e.value) {
|
|
1117
|
+
w(null), d(!1), v.current && v.current.clear();
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
w(e.value);
|
|
1121
|
+
}, [e.value]);
|
|
1122
|
+
const K = () => {
|
|
1123
|
+
v.current && v.current.clear(), w(null), d(!1), n && n({ id: t, value: "" });
|
|
1124
|
+
}, Z = async () => {
|
|
1125
|
+
if (!v.current || v.current.isEmpty()) return;
|
|
1126
|
+
g(!0);
|
|
1127
|
+
const z = v.current.toDataURL("image/png"), B = `${t}-${Date.now()}.png`;
|
|
1128
|
+
try {
|
|
1129
|
+
const U = await Nt(z, B, u, i, l, c);
|
|
1130
|
+
w(U), d(!0), n && n({ id: t, value: U });
|
|
1131
|
+
} catch (U) {
|
|
1132
|
+
console.error("Signature upload failed", U);
|
|
1133
|
+
} finally {
|
|
1134
|
+
g(!1);
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
return /* @__PURE__ */ rt(Q, { sx: { width: "100%", ...o.sx }, children: [
|
|
1138
|
+
/* @__PURE__ */ rt(Tt, { variant: "subtitle2", gutterBottom: !0, sx: { display: "flex" }, children: [
|
|
1139
|
+
a,
|
|
1140
|
+
Y && /* @__PURE__ */ X(Q, { component: "span", sx: { color: "error.main", ml: 0.5 }, children: "*" })
|
|
1141
|
+
] }),
|
|
1142
|
+
/* @__PURE__ */ rt(
|
|
1143
|
+
Q,
|
|
1144
|
+
{
|
|
1145
|
+
ref: m,
|
|
1146
|
+
sx: {
|
|
1147
|
+
position: "relative",
|
|
1148
|
+
// Own stacking context so neighbouring fields can never paint
|
|
1149
|
+
// over the drawing surface and steal pointer events.
|
|
1150
|
+
isolation: "isolate",
|
|
1151
|
+
zIndex: 1,
|
|
1152
|
+
border: "1px solid",
|
|
1153
|
+
borderColor: "divider",
|
|
1154
|
+
borderRadius: 1,
|
|
1155
|
+
overflow: "hidden",
|
|
1156
|
+
bgcolor: "background.paper"
|
|
1157
|
+
},
|
|
1158
|
+
children: [
|
|
1159
|
+
/* @__PURE__ */ X(
|
|
1160
|
+
ct,
|
|
1161
|
+
{
|
|
1162
|
+
ref: v,
|
|
1163
|
+
penColor: "black",
|
|
1164
|
+
canvasProps: {
|
|
1165
|
+
className: "sigCanvas",
|
|
1166
|
+
width: W,
|
|
1167
|
+
height: N,
|
|
1168
|
+
style: {
|
|
1169
|
+
display: "block",
|
|
1170
|
+
position: "relative",
|
|
1171
|
+
zIndex: 1,
|
|
1172
|
+
// Prevent the browser from treating a signing drag as a
|
|
1173
|
+
// scroll/pan gesture (touch & stylus) — without this,
|
|
1174
|
+
// strokes are swallowed whenever the page can scroll,
|
|
1175
|
+
// which is exactly when other fields are present.
|
|
1176
|
+
touchAction: "none",
|
|
1177
|
+
pointerEvents: f ? "none" : "auto",
|
|
1178
|
+
...p?.style,
|
|
1179
|
+
width: "100%",
|
|
1180
|
+
height: N
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
backgroundColor: "transparent"
|
|
1184
|
+
}
|
|
1185
|
+
),
|
|
1186
|
+
b && /* @__PURE__ */ X(
|
|
1187
|
+
Q,
|
|
1188
|
+
{
|
|
1189
|
+
component: "img",
|
|
1190
|
+
src: b,
|
|
1191
|
+
alt: "Signature",
|
|
1192
|
+
sx: {
|
|
1193
|
+
position: "absolute",
|
|
1194
|
+
inset: 0,
|
|
1195
|
+
width: "100%",
|
|
1196
|
+
height: N,
|
|
1197
|
+
objectFit: "contain",
|
|
1198
|
+
bgcolor: "background.paper"
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
)
|
|
1202
|
+
]
|
|
1203
|
+
}
|
|
1204
|
+
),
|
|
1205
|
+
/* @__PURE__ */ rt(Q, { sx: { display: "flex", flexWrap: "wrap", gap: 1, alignItems: "center", mt: 1 }, children: [
|
|
1206
|
+
/* @__PURE__ */ X(St, { variant: "outlined", color: "secondary", onClick: K, size: "small", disabled: f || E, children: "Clear" }),
|
|
1207
|
+
/* @__PURE__ */ X(
|
|
1208
|
+
St,
|
|
1209
|
+
{
|
|
1210
|
+
variant: "contained",
|
|
1211
|
+
color: "primary",
|
|
1212
|
+
onClick: Z,
|
|
1213
|
+
size: "small",
|
|
1214
|
+
disabled: f || E || b !== null,
|
|
1215
|
+
startIcon: E ? /* @__PURE__ */ X(Bt, { size: 16, color: "inherit" }) : null,
|
|
1216
|
+
children: b ? "Saved" : "Save"
|
|
1217
|
+
}
|
|
1218
|
+
),
|
|
1219
|
+
D && b && /* @__PURE__ */ X(Tt, { variant: "caption", color: "success.main", children: "Signature Saved!" })
|
|
1220
|
+
] })
|
|
1221
|
+
] });
|
|
1222
|
+
}
|
|
1223
|
+
export {
|
|
1224
|
+
_e as default
|
|
1225
|
+
};
|