dynamic-mui 2.5.2 → 2.6.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.
Files changed (252) hide show
  1. package/dist/accordion-DB151BNT.mjs +22 -0
  2. package/dist/accordion-YWjUldL8.js +1 -0
  3. package/dist/addressfield-CpvOajVo.mjs +242 -0
  4. package/dist/addressfield-CwKjfnTq.js +1 -0
  5. package/dist/ai/index.cjs +1 -1
  6. package/dist/ai/index.mjs +1 -14
  7. package/dist/ai/react/AIForm.d.ts +2 -1
  8. package/dist/ai/react/AIFormGenerator.d.ts +1 -1
  9. package/dist/ai/react/AISchemaReview.d.ts +1 -1
  10. package/dist/ai/react/AITextAssist.d.ts +1 -1
  11. package/dist/ai/react/AIVisionImport.d.ts +2 -1
  12. package/dist/ai-BFpA3uHx.js +29 -0
  13. package/dist/ai-UvDYQ30b.mjs +4533 -0
  14. package/dist/asyncautocomplete-DQLDdmVl.js +1 -0
  15. package/dist/asyncautocomplete-mwra2KKJ.mjs +72 -0
  16. package/dist/bar-CgYZxXHl.js +1 -0
  17. package/dist/bar-LVtZP6Ui.mjs +4 -0
  18. package/dist/cascadeselect-BJzHZA9-.js +1 -0
  19. package/dist/cascadeselect-Cl4OHq-L.mjs +66 -0
  20. package/dist/chartControl-IQafKpDk.mjs +29 -0
  21. package/dist/chartControl-ifHiG3nr.js +1 -0
  22. package/dist/collection-DPJTrAiB.mjs +1692 -0
  23. package/dist/collection-Dd_Ojgwl.js +1 -0
  24. package/dist/colorpicker-9AUe21p1.mjs +110 -0
  25. package/dist/colorpicker-DgKTLBmU.js +1 -0
  26. package/dist/components/DynamicComponent.d.ts +2 -1
  27. package/dist/components/FormGenerator.d.ts +1 -1
  28. package/dist/components/charts/Bar/bar.d.ts +6 -2
  29. package/dist/components/charts/Line/line.d.ts +6 -2
  30. package/dist/components/charts/Mixchart/mixChart.d.ts +2 -1
  31. package/dist/components/charts/Pie/pie.d.ts +6 -2
  32. package/dist/components/charts/chartControl.d.ts +15 -0
  33. package/dist/components/controls/Accordion/accordion.d.ts +2 -1
  34. package/dist/components/controls/AddressField/addressfield.d.ts +2 -1
  35. package/dist/components/controls/Alert/alert.d.ts +1 -1
  36. package/dist/components/controls/AsyncAutocomplete/asyncautocomplete.d.ts +1 -1
  37. package/dist/components/controls/Autocomplete/autocomplete.d.ts +1 -1
  38. package/dist/components/controls/Button/button.d.ts +1 -1
  39. package/dist/components/controls/CascadeSelect/cascadeselect.d.ts +2 -1
  40. package/dist/components/controls/CheckBox/checkbox.d.ts +2 -2
  41. package/dist/components/controls/CheckBox/toggleInput.d.ts +25 -0
  42. package/dist/components/controls/Chip/chip.d.ts +1 -1
  43. package/dist/components/controls/ChipSelect/chipselect.d.ts +2 -1
  44. package/dist/components/controls/Collection/CollectionList.d.ts +1 -1
  45. package/dist/components/controls/Collection/ItemDialog.d.ts +1 -1
  46. package/dist/components/controls/Collection/collection.d.ts +1 -1
  47. package/dist/components/controls/Collection/parts.d.ts +6 -6
  48. package/dist/components/controls/ColorPicker/colorpicker.d.ts +2 -1
  49. package/dist/components/controls/Computed/computed.d.ts +1 -1
  50. package/dist/components/controls/ConsentField/consentfield.d.ts +2 -1
  51. package/dist/components/controls/CurrencyField/currencyfield.d.ts +1 -1
  52. package/dist/components/controls/DataTable/datatable.d.ts +2 -1
  53. package/dist/components/controls/DateRangePicker/daterangepicker.d.ts +1 -1
  54. package/dist/components/controls/DateTime/datetime.d.ts +15 -1
  55. package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +6 -2
  56. package/dist/components/controls/Divider/divider.d.ts +1 -1
  57. package/dist/components/controls/EditableTable/editabletable.d.ts +1 -1
  58. package/dist/components/controls/FileUpload/fileupload.d.ts +1 -1
  59. package/dist/components/controls/FormRepeater/formrepeater.d.ts +1 -1
  60. package/dist/components/controls/FormWizard/formwizard.d.ts +1 -1
  61. package/dist/components/controls/GeoField/geofield.d.ts +1 -1
  62. package/dist/components/controls/Group/group.d.ts +2 -1
  63. package/dist/components/controls/Hyperlink/hyperlink.d.ts +1 -1
  64. package/dist/components/controls/ImageList/imagelist.d.ts +1 -1
  65. package/dist/components/controls/IntlPhone/intlphone.d.ts +2 -1
  66. package/dist/components/controls/KeyValueField/keyvaluefield.d.ts +2 -1
  67. package/dist/components/controls/LineItemList/lineitemlist.d.ts +1 -1
  68. package/dist/components/controls/List/list.d.ts +1 -1
  69. package/dist/components/controls/LocationField/locationfield.d.ts +1 -1
  70. package/dist/components/controls/MarkdownEditor/markdowneditor.d.ts +2 -1
  71. package/dist/components/controls/MatrixField/matrixfield.d.ts +2 -1
  72. package/dist/components/controls/MultiTextbox/multitextbox.d.ts +1 -1
  73. package/dist/components/controls/NpsScale/npsscale.d.ts +2 -1
  74. package/dist/components/controls/NumberField/numberfield.d.ts +2 -1
  75. package/dist/components/controls/NumberStepper/numberstepper.d.ts +1 -1
  76. package/dist/components/controls/OtpField/otpfield.d.ts +2 -1
  77. package/dist/components/controls/PasswordField/passwordfield.d.ts +2 -1
  78. package/dist/components/controls/PhoneField/phonefield.d.ts +1 -1
  79. package/dist/components/controls/Radio/radio.d.ts +2 -1
  80. package/dist/components/controls/Rating/rating.d.ts +2 -1
  81. package/dist/components/controls/RichTextEditor/richtexteditor.d.ts +2 -1
  82. package/dist/components/controls/Select/select.d.ts +2 -1
  83. package/dist/components/controls/Signature/signature.d.ts +1 -1
  84. package/dist/components/controls/Slider/slider.d.ts +1 -1
  85. package/dist/components/controls/Stepper/stepper.d.ts +1 -1
  86. package/dist/components/controls/SummaryField/summaryfield.d.ts +2 -1
  87. package/dist/components/controls/Switch/switch.d.ts +1 -1
  88. package/dist/components/controls/Tabs/tabs.d.ts +2 -1
  89. package/dist/components/controls/TagsInput/tagsinput.d.ts +1 -1
  90. package/dist/components/controls/TextField/textfield.d.ts +1 -1
  91. package/dist/components/controls/TextField/useTextInput.d.ts +18 -0
  92. package/dist/components/controls/TimePicker/timepicker.d.ts +6 -2
  93. package/dist/components/controls/ToggleButtons/togglebuttons.d.ts +1 -1
  94. package/dist/components/controls/Typography/typography.d.ts +1 -1
  95. package/dist/components/controls/index.d.ts +24 -9
  96. package/dist/consentfield-CFm1IDa5.mjs +68 -0
  97. package/dist/consentfield-z8W0Yfx8.js +1 -0
  98. package/dist/datatable-CMjaTDPM.js +1 -0
  99. package/dist/datatable-lZIwHx6a.mjs +29 -0
  100. package/dist/dynamic-mui.cjs +1 -1
  101. package/dist/dynamic-mui.d.ts +1 -1
  102. package/dist/dynamic-mui.mjs +264 -204
  103. package/dist/editabletable-B3Df4Jys.mjs +117 -0
  104. package/dist/editabletable-r0RwM1rO.js +1 -0
  105. package/dist/fileupload-Cr-Mz7oH.js +1 -0
  106. package/dist/fileupload-D2fXyMIu.mjs +191 -0
  107. package/dist/formrepeater-BP-RBrQv.js +1 -0
  108. package/dist/formrepeater-BrYTYCzc.mjs +82 -0
  109. package/dist/formwizard-CQ2z6fUX.mjs +82 -0
  110. package/dist/formwizard-DR7fa59M.js +1 -0
  111. package/dist/geofield-CxVFA0og.mjs +116 -0
  112. package/dist/geofield-DtN-d2Bq.js +1 -0
  113. package/dist/group-CiohorzN.mjs +30 -0
  114. package/dist/group-HQL7UqHt.js +1 -0
  115. package/dist/imagelist-CNe1Dp_M.mjs +23 -0
  116. package/dist/imagelist-Wm5Qa6wA.js +1 -0
  117. package/dist/index.d.ts +1 -0
  118. package/dist/intlphone-DwsiSfSt.js +1 -0
  119. package/dist/intlphone-LGE-cB6X.mjs +341 -0
  120. package/dist/keyvaluefield-B7NlE0AT.js +1 -0
  121. package/dist/keyvaluefield-Cd4NQf6d.mjs +128 -0
  122. package/dist/line-BGSi1tvf.js +1 -0
  123. package/dist/line-cK6taoCA.mjs +4 -0
  124. package/dist/lineitemlist-bmk7fEf9.mjs +169 -0
  125. package/dist/lineitemlist-mulPt3cO.js +1 -0
  126. package/dist/list-D5qW-7Xg.js +1 -0
  127. package/dist/list-xPNiijgm.mjs +20 -0
  128. package/dist/locationfield-DtWkxnX-.js +1 -0
  129. package/dist/locationfield-SPonkbMU.mjs +90 -0
  130. package/dist/markdowneditor-6lJQ5cEn.mjs +82 -0
  131. package/dist/markdowneditor-nPP0t2eK.js +2 -0
  132. package/dist/matrixfield-CUYoJCwi.js +1 -0
  133. package/dist/matrixfield-Jm9Yx0EP.mjs +119 -0
  134. package/dist/mixChart-CSq7pQqJ.mjs +49 -0
  135. package/dist/mixChart-DoehYa8V.js +1 -0
  136. package/dist/muiX-BHOKpogF.mjs +12 -0
  137. package/dist/muiX-CG_D1XQ2.js +1 -0
  138. package/dist/multitextbox-D-JUSnT7.js +1 -0
  139. package/dist/multitextbox-gUt8BmfQ.mjs +96 -0
  140. package/dist/npsscale-D_VtbpJi.js +1 -0
  141. package/dist/npsscale-LWe7yCxB.mjs +111 -0
  142. package/dist/numberstepper-BXXlSKT_.js +1 -0
  143. package/dist/numberstepper-K_JfJJtg.mjs +111 -0
  144. package/dist/pie-CueMspFX.js +1 -0
  145. package/dist/pie-DFO89j-z.mjs +4 -0
  146. package/dist/richtexteditor-BHM-8xe3.js +1 -0
  147. package/dist/richtexteditor-gmObNHZ7.mjs +178 -0
  148. package/dist/rolldown-runtime-5iZMYShA.js +1 -0
  149. package/dist/s3Upload-C3-wcrua.js +1 -0
  150. package/dist/s3Upload-HtE088XA.mjs +39 -0
  151. package/dist/signature-DjYfiNzq.js +3 -0
  152. package/dist/signature-HiL8FJ6C.mjs +1116 -0
  153. package/dist/stepper-cpOj2wWz.mjs +166 -0
  154. package/dist/stepper-zEfhqmbA.js +1 -0
  155. package/dist/summaryfield-BzrdvTVy.js +1 -0
  156. package/dist/summaryfield-DIQfJjjo.mjs +65 -0
  157. package/dist/tabs-DvPu-zDC.mjs +50 -0
  158. package/dist/tabs-xdkLXUCp.js +1 -0
  159. package/dist/tagsinput-B33m6GJ_.js +1 -0
  160. package/dist/tagsinput-CTBGuv0M.mjs +49 -0
  161. package/dist/useSyncedState-CzAO4D1o.mjs +17 -0
  162. package/dist/useSyncedState-DYNKkpDv.js +1 -0
  163. package/dist/useTextInput-Cm0_Ps2V.js +1 -0
  164. package/dist/useTextInput-Dr-ncTE8.mjs +1683 -0
  165. package/dist/useUpdateEffect-CNBo9hj8.js +1 -0
  166. package/dist/useUpdateEffect-CXAhttj7.mjs +14 -0
  167. package/dist/util/helper.d.ts +18 -1
  168. package/dist/util/muiVersion.d.ts +13 -0
  169. package/dist/util/stepperComponents.d.ts +1 -1
  170. package/dist/util/useSyncedState.d.ts +22 -0
  171. package/dist/util/validation.d.ts +40 -0
  172. package/dist/v4-Dyp-SQ1c.js +1 -0
  173. package/dist/v4-YCkfo8OR.mjs +27 -0
  174. package/dist/validation-B7DPZ218.js +7 -0
  175. package/dist/validation-BRcYhhsT.mjs +4991 -0
  176. package/package.json +35 -35
  177. package/dist/AIForm-CAlzDffx.js +0 -44
  178. package/dist/AIForm-DhR29Z6d.mjs +0 -12274
  179. package/dist/accordion-B1Laqpu6.js +0 -1
  180. package/dist/accordion-DRo0ZP5u.mjs +0 -23
  181. package/dist/addressfield-1Ht4A4u9.mjs +0 -164
  182. package/dist/addressfield-DEu_5gQv.js +0 -1
  183. package/dist/asyncautocomplete-BPTtLquY.mjs +0 -92
  184. package/dist/asyncautocomplete-DPn-jVl4.js +0 -1
  185. package/dist/bar-CEFjy1KY.js +0 -1
  186. package/dist/bar-CkCZunh6.mjs +0 -21
  187. package/dist/cascadeselect-BKqX6e3j.mjs +0 -66
  188. package/dist/cascadeselect-DCMmaKxY.js +0 -1
  189. package/dist/collection-B6mXg1EE.js +0 -1
  190. package/dist/collection-D6iGJnXe.mjs +0 -1157
  191. package/dist/colorpicker-DRC4NHgd.mjs +0 -111
  192. package/dist/colorpicker-VOk6ZC89.js +0 -1
  193. package/dist/consentfield-Bogbxanw.js +0 -1
  194. package/dist/consentfield-DHIVXzhj.mjs +0 -80
  195. package/dist/datatable-DU0W9LHs.mjs +0 -21
  196. package/dist/datatable-DUdM8xtY.js +0 -1
  197. package/dist/editabletable-D801lgHY.mjs +0 -128
  198. package/dist/editabletable-De_BiNVx.js +0 -1
  199. package/dist/fileupload-CozsBlXX.mjs +0 -185
  200. package/dist/fileupload-YGYUpPXo.js +0 -1
  201. package/dist/formrepeater-LXzfFY3V.mjs +0 -75
  202. package/dist/formrepeater-iD9e1ow4.js +0 -1
  203. package/dist/formwizard-Bb0LOmIN.mjs +0 -83
  204. package/dist/formwizard-CuDayHm6.js +0 -1
  205. package/dist/geofield-B22-bJ0f.mjs +0 -108
  206. package/dist/geofield-DkB-js8Y.js +0 -1
  207. package/dist/group-B5vjjzsk.mjs +0 -23
  208. package/dist/group-B_WI43pI.js +0 -1
  209. package/dist/imagelist-Bn9QhIv7.js +0 -1
  210. package/dist/imagelist-rqmJajHt.mjs +0 -18
  211. package/dist/intlphone-CkHQ2YvK.js +0 -1
  212. package/dist/intlphone-DnqGCNdx.mjs +0 -144
  213. package/dist/keyvaluefield-CX97ykNT.js +0 -1
  214. package/dist/keyvaluefield-Dm5dRen5.mjs +0 -127
  215. package/dist/line-CjQk91Nq.js +0 -1
  216. package/dist/line-pFBz6CTL.mjs +0 -21
  217. package/dist/lineitemlist-B5JJqhjg.mjs +0 -170
  218. package/dist/lineitemlist-C39r0qRM.js +0 -1
  219. package/dist/list-73Pemuh_.mjs +0 -20
  220. package/dist/list-CkVSoMPM.js +0 -1
  221. package/dist/locationfield-DLFggIVT.js +0 -1
  222. package/dist/locationfield-DY8wZ-Vv.mjs +0 -118
  223. package/dist/markdowneditor-BtF43ekZ.js +0 -2
  224. package/dist/markdowneditor-VfwnN9cX.mjs +0 -94
  225. package/dist/matrixfield-BIKQg7FM.mjs +0 -121
  226. package/dist/matrixfield-BjdsHrtX.js +0 -1
  227. package/dist/mixChart-Doq4lt7Z.mjs +0 -75
  228. package/dist/mixChart-rgyMCdnp.js +0 -1
  229. package/dist/multitextbox-BNZ6kVPG.js +0 -1
  230. package/dist/multitextbox-DqLIw1i-.mjs +0 -78
  231. package/dist/npsscale-B2JYIHr8.js +0 -1
  232. package/dist/npsscale-CWFVm0wp.mjs +0 -91
  233. package/dist/numberstepper-Cpb7ceR4.js +0 -1
  234. package/dist/numberstepper-DLwZsyV1.mjs +0 -132
  235. package/dist/pie-AC1_bQ6M.mjs +0 -21
  236. package/dist/pie-BZhroZyG.js +0 -1
  237. package/dist/richtexteditor-Bwn62mA-.mjs +0 -143
  238. package/dist/richtexteditor-DDIzZxki.js +0 -1
  239. package/dist/s3Upload-B0JeoLkS.js +0 -1
  240. package/dist/s3Upload-dpioZ2c8.mjs +0 -51
  241. package/dist/signature-DtXYAy1a.js +0 -2
  242. package/dist/signature-z2PB3zv7.mjs +0 -1227
  243. package/dist/stepper-B8Blpvp8.mjs +0 -140
  244. package/dist/stepper-o3Ef6Czl.js +0 -1
  245. package/dist/summaryfield-2t_sXF8P.js +0 -1
  246. package/dist/summaryfield-CTQL3W7R.mjs +0 -96
  247. package/dist/tabs-DlIOUQ5z.js +0 -1
  248. package/dist/tabs-lqveygGh.mjs +0 -39
  249. package/dist/tagsinput-C2awcyJT.mjs +0 -58
  250. package/dist/tagsinput-g_-HLhtt.js +0 -1
  251. package/dist/v4-BysszJq8.mjs +0 -30
  252. package/dist/v4-CqdK_b8Y.js +0 -1
@@ -0,0 +1,1116 @@
1
+ import { c as e, r as t, s as n } from "./validation-BRcYhhsT.mjs";
2
+ import { t as r } from "./s3Upload-HtE088XA.mjs";
3
+ import i, { Component as a, useEffect as o, useRef as s, useState as c } from "react";
4
+ import { Box as l, Button as u, CircularProgress as d, Typography as f } from "@mui/material";
5
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/extends.js
7
+ function h() {
8
+ return h = Object.assign ? Object.assign.bind() : function(e) {
9
+ for (var t = 1; t < arguments.length; t++) {
10
+ var n = arguments[t];
11
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
12
+ }
13
+ return e;
14
+ }, h.apply(null, arguments);
15
+ }
16
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
17
+ function g(e, t) {
18
+ if (e == null) return {};
19
+ var n = {};
20
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
21
+ if (t.indexOf(r) !== -1) continue;
22
+ n[r] = e[r];
23
+ }
24
+ return n;
25
+ }
26
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
27
+ function _(e, t) {
28
+ if (e == null) return {};
29
+ var n, r, i = g(e, t);
30
+ if (Object.getOwnPropertySymbols) {
31
+ var a = Object.getOwnPropertySymbols(e);
32
+ for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
33
+ }
34
+ return i;
35
+ }
36
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/typeof.js
37
+ function v(e) {
38
+ "@babel/helpers - typeof";
39
+ return v = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
40
+ return typeof e;
41
+ } : function(e) {
42
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
43
+ }, v(e);
44
+ }
45
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
46
+ function y(e, t) {
47
+ if (v(e) != "object" || !e) return e;
48
+ var n = e[Symbol.toPrimitive];
49
+ if (n !== void 0) {
50
+ var r = n.call(e, t || "default");
51
+ if (v(r) != "object") return r;
52
+ throw TypeError("@@toPrimitive must return a primitive value.");
53
+ }
54
+ return (t === "string" ? String : Number)(e);
55
+ }
56
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
57
+ function b(e) {
58
+ var t = y(e, "string");
59
+ return v(t) == "symbol" ? t : t + "";
60
+ }
61
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/createClass.js
62
+ function x(e, t) {
63
+ for (var n = 0; n < t.length; n++) {
64
+ var r = t[n];
65
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, b(r.key), r);
66
+ }
67
+ }
68
+ function S(e, t, n) {
69
+ return t && x(e.prototype, t), n && x(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
70
+ }
71
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
72
+ function C(e, t) {
73
+ if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
74
+ }
75
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
76
+ function w(e, t) {
77
+ return w = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
78
+ return e.__proto__ = t, e;
79
+ }, w(e, t);
80
+ }
81
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/inherits.js
82
+ function T(e, t) {
83
+ if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
84
+ e.prototype = Object.create(t && t.prototype, { constructor: {
85
+ value: e,
86
+ writable: !0,
87
+ configurable: !0
88
+ } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && w(e, t);
89
+ }
90
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
91
+ function E(e) {
92
+ return E = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
93
+ return e.__proto__ || Object.getPrototypeOf(e);
94
+ }, E(e);
95
+ }
96
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
97
+ function D() {
98
+ try {
99
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
100
+ } catch {}
101
+ return (D = function() {
102
+ return !!e;
103
+ })();
104
+ }
105
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
106
+ function O(e) {
107
+ if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
108
+ return e;
109
+ }
110
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
111
+ function k(e, t) {
112
+ if (t && (v(t) == "object" || typeof t == "function")) return t;
113
+ if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
114
+ return O(e);
115
+ }
116
+ // node_modules/react-signature-canvas/node_modules/@babel/runtime/helpers/esm/createSuper.js
117
+ function A(e) {
118
+ var t = D();
119
+ return function() {
120
+ var n, r = E(e);
121
+ if (t) {
122
+ var i = E(this).constructor;
123
+ n = Reflect.construct(r, arguments, i);
124
+ } else n = r.apply(this, arguments);
125
+ return k(this, n);
126
+ };
127
+ }
128
+ // node_modules/react-is/cjs/react-is.production.min.js
129
+ var j = /* @__PURE__ */ n(((e) => {
130
+ var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
131
+ function b(e) {
132
+ if (typeof e == "object" && e) {
133
+ var t = e.$$typeof;
134
+ switch (t) {
135
+ case n: switch (e = e.type, e) {
136
+ case l:
137
+ case u:
138
+ case i:
139
+ case o:
140
+ case a:
141
+ case f: return e;
142
+ default: switch (e &&= e.$$typeof, e) {
143
+ case c:
144
+ case d:
145
+ case h:
146
+ case m:
147
+ case s: return e;
148
+ default: return t;
149
+ }
150
+ }
151
+ case r: return t;
152
+ }
153
+ }
154
+ }
155
+ function x(e) {
156
+ return b(e) === u;
157
+ }
158
+ e.AsyncMode = l, e.ConcurrentMode = u, e.ContextConsumer = c, e.ContextProvider = s, e.Element = n, e.ForwardRef = d, e.Fragment = i, e.Lazy = h, e.Memo = m, e.Portal = r, e.Profiler = o, e.StrictMode = a, e.Suspense = f, e.isAsyncMode = function(e) {
159
+ return x(e) || b(e) === l;
160
+ }, e.isConcurrentMode = x, e.isContextConsumer = function(e) {
161
+ return b(e) === c;
162
+ }, e.isContextProvider = function(e) {
163
+ return b(e) === s;
164
+ }, e.isElement = function(e) {
165
+ return typeof e == "object" && !!e && e.$$typeof === n;
166
+ }, e.isForwardRef = function(e) {
167
+ return b(e) === d;
168
+ }, e.isFragment = function(e) {
169
+ return b(e) === i;
170
+ }, e.isLazy = function(e) {
171
+ return b(e) === h;
172
+ }, e.isMemo = function(e) {
173
+ return b(e) === m;
174
+ }, e.isPortal = function(e) {
175
+ return b(e) === r;
176
+ }, e.isProfiler = function(e) {
177
+ return b(e) === o;
178
+ }, e.isStrictMode = function(e) {
179
+ return b(e) === a;
180
+ }, e.isSuspense = function(e) {
181
+ return b(e) === f;
182
+ }, e.isValidElementType = function(e) {
183
+ return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
184
+ }, e.typeOf = b;
185
+ })), M = /* @__PURE__ */ n(((e) => {
186
+ process.env.NODE_ENV !== "production" && (function() {
187
+ var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
188
+ function b(e) {
189
+ return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
190
+ }
191
+ function x(e) {
192
+ if (typeof e == "object" && e) {
193
+ var t = e.$$typeof;
194
+ switch (t) {
195
+ case n:
196
+ var p = e.type;
197
+ switch (p) {
198
+ case l:
199
+ case u:
200
+ case i:
201
+ case o:
202
+ case a:
203
+ case f: return p;
204
+ default:
205
+ var g = p && p.$$typeof;
206
+ switch (g) {
207
+ case c:
208
+ case d:
209
+ case h:
210
+ case m:
211
+ case s: return g;
212
+ default: return t;
213
+ }
214
+ }
215
+ case r: return t;
216
+ }
217
+ }
218
+ }
219
+ var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
220
+ function I(e) {
221
+ return F || (F = !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.")), L(e) || x(e) === l;
222
+ }
223
+ function L(e) {
224
+ return x(e) === u;
225
+ }
226
+ function R(e) {
227
+ return x(e) === c;
228
+ }
229
+ function z(e) {
230
+ return x(e) === s;
231
+ }
232
+ function B(e) {
233
+ return typeof e == "object" && !!e && e.$$typeof === n;
234
+ }
235
+ function V(e) {
236
+ return x(e) === d;
237
+ }
238
+ function H(e) {
239
+ return x(e) === i;
240
+ }
241
+ function U(e) {
242
+ return x(e) === h;
243
+ }
244
+ function W(e) {
245
+ return x(e) === m;
246
+ }
247
+ function G(e) {
248
+ return x(e) === r;
249
+ }
250
+ function K(e) {
251
+ return x(e) === o;
252
+ }
253
+ function q(e) {
254
+ return x(e) === a;
255
+ }
256
+ function J(e) {
257
+ return x(e) === f;
258
+ }
259
+ e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = R, e.isContextProvider = z, e.isElement = B, e.isForwardRef = V, e.isFragment = H, e.isLazy = U, e.isMemo = W, e.isPortal = G, e.isProfiler = K, e.isStrictMode = q, e.isSuspense = J, e.isValidElementType = b, e.typeOf = x;
260
+ })();
261
+ })), N = /* @__PURE__ */ n(((e, t) => {
262
+ t.exports = process.env.NODE_ENV === "production" ? j() : M();
263
+ })), P = /* @__PURE__ */ n(((e, t) => {
264
+ var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
265
+ function a(e) {
266
+ if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
267
+ return Object(e);
268
+ }
269
+ function o() {
270
+ try {
271
+ if (!Object.assign) return !1;
272
+ var e = /* @__PURE__ */ new String("abc");
273
+ if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") return !1;
274
+ for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n;
275
+ if (Object.getOwnPropertyNames(t).map(function(e) {
276
+ return t[e];
277
+ }).join("") !== "0123456789") return !1;
278
+ var r = {};
279
+ return "abcdefghijklmnopqrst".split("").forEach(function(e) {
280
+ r[e] = e;
281
+ }), Object.keys(Object.assign({}, r)).join("") === "abcdefghijklmnopqrst";
282
+ } catch {
283
+ return !1;
284
+ }
285
+ }
286
+ t.exports = o() ? Object.assign : function(e, t) {
287
+ for (var o, s = a(e), c, l = 1; l < arguments.length; l++) {
288
+ for (var u in o = Object(arguments[l]), o) r.call(o, u) && (s[u] = o[u]);
289
+ if (n) {
290
+ c = n(o);
291
+ for (var d = 0; d < c.length; d++) i.call(o, c[d]) && (s[c[d]] = o[c[d]]);
292
+ }
293
+ }
294
+ return s;
295
+ };
296
+ })), F = /* @__PURE__ */ n(((e, t) => {
297
+ t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
298
+ })), I = /* @__PURE__ */ n(((e, t) => {
299
+ t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
300
+ })), L = /* @__PURE__ */ n(((e, t) => {
301
+ var n = function() {};
302
+ if (process.env.NODE_ENV !== "production") {
303
+ var r = F(), i = {}, a = I();
304
+ n = function(e) {
305
+ var t = "Warning: " + e;
306
+ typeof console < "u" && console.error(t);
307
+ try {
308
+ throw Error(t);
309
+ } catch {}
310
+ };
311
+ }
312
+ function o(e, t, o, s, c) {
313
+ if (process.env.NODE_ENV !== "production") {
314
+ for (var l in e) if (a(e, l)) {
315
+ var u;
316
+ try {
317
+ if (typeof e[l] != "function") {
318
+ var d = Error((s || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
319
+ throw d.name = "Invariant Violation", d;
320
+ }
321
+ u = e[l](t, l, s, o, null, r);
322
+ } catch (e) {
323
+ u = e;
324
+ }
325
+ if (u && !(u instanceof Error) && n((s || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), u instanceof Error && !(u.message in i)) {
326
+ i[u.message] = !0;
327
+ var f = c ? c() : "";
328
+ n("Failed " + o + " type: " + u.message + (f ?? ""));
329
+ }
330
+ }
331
+ }
332
+ }
333
+ o.resetWarningCache = function() {
334
+ process.env.NODE_ENV !== "production" && (i = {});
335
+ }, t.exports = o;
336
+ })), R = /* @__PURE__ */ n(((e, t) => {
337
+ var n = N(), r = P(), i = F(), a = I(), o = L(), s = function() {};
338
+ process.env.NODE_ENV !== "production" && (s = function(e) {
339
+ var t = "Warning: " + e;
340
+ typeof console < "u" && console.error(t);
341
+ try {
342
+ throw Error(t);
343
+ } catch {}
344
+ });
345
+ function c() {
346
+ return null;
347
+ }
348
+ t.exports = function(e, t) {
349
+ var l = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
350
+ function d(e) {
351
+ var t = e && (l && e[l] || e[u]);
352
+ if (typeof t == "function") return t;
353
+ }
354
+ var f = "<<anonymous>>", p = {
355
+ array: _("array"),
356
+ bigint: _("bigint"),
357
+ bool: _("boolean"),
358
+ func: _("function"),
359
+ number: _("number"),
360
+ object: _("object"),
361
+ string: _("string"),
362
+ symbol: _("symbol"),
363
+ any: v(),
364
+ arrayOf: y,
365
+ element: b(),
366
+ elementType: x(),
367
+ instanceOf: S,
368
+ node: E(),
369
+ objectOf: w,
370
+ oneOf: C,
371
+ oneOfType: T,
372
+ shape: O,
373
+ exact: k
374
+ };
375
+ function m(e, t) {
376
+ return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
377
+ }
378
+ function h(e, t) {
379
+ this.message = e, this.data = t && typeof t == "object" ? t : {}, this.stack = "";
380
+ }
381
+ h.prototype = Error.prototype;
382
+ function g(e) {
383
+ if (process.env.NODE_ENV !== "production") var n = {}, r = 0;
384
+ function a(a, o, c, l, u, d, p) {
385
+ if (l ||= f, d ||= c, p !== i) {
386
+ if (t) {
387
+ var m = /* @__PURE__ */ Error("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");
388
+ throw m.name = "Invariant Violation", m;
389
+ }
390
+ if (process.env.NODE_ENV !== "production" && typeof console < "u") {
391
+ var g = l + ":" + c;
392
+ !n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + d + "` prop on `" + l + "`. 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."), n[g] = !0, r++);
393
+ }
394
+ }
395
+ return o[c] == null ? a ? o[c] === null ? new h("The " + u + " `" + d + "` is marked as required " + ("in `" + l + "`, but its value is `null`.")) : new h("The " + u + " `" + d + "` is marked as required in " + ("`" + l + "`, but its value is `undefined`.")) : null : e(o, c, l, u, d);
396
+ }
397
+ var o = a.bind(null, !1);
398
+ return o.isRequired = a.bind(null, !0), o;
399
+ }
400
+ function _(e) {
401
+ function t(t, n, r, i, a, o) {
402
+ var s = t[n];
403
+ if (M(s) !== e) {
404
+ var c = N(s);
405
+ return new h("Invalid " + i + " `" + a + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected ") + ("`" + e + "`."), { expectedType: e });
406
+ }
407
+ return null;
408
+ }
409
+ return g(t);
410
+ }
411
+ function v() {
412
+ return g(c);
413
+ }
414
+ function y(e) {
415
+ function t(t, n, r, a, o) {
416
+ if (typeof e != "function") return new h("Property `" + o + "` of component `" + r + "` has invalid PropType notation inside arrayOf.");
417
+ var s = t[n];
418
+ if (!Array.isArray(s)) {
419
+ var c = M(s);
420
+ return new h("Invalid " + a + " `" + o + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected an array."));
421
+ }
422
+ for (var l = 0; l < s.length; l++) {
423
+ var u = e(s, l, r, a, o + "[" + l + "]", i);
424
+ if (u instanceof Error) return u;
425
+ }
426
+ return null;
427
+ }
428
+ return g(t);
429
+ }
430
+ function b() {
431
+ function t(t, n, r, i, a) {
432
+ var o = t[n];
433
+ if (!e(o)) {
434
+ var s = M(o);
435
+ return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement."));
436
+ }
437
+ return null;
438
+ }
439
+ return g(t);
440
+ }
441
+ function x() {
442
+ function e(e, t, r, i, a) {
443
+ var o = e[t];
444
+ if (!n.isValidElementType(o)) {
445
+ var s = M(o);
446
+ return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement type."));
447
+ }
448
+ return null;
449
+ }
450
+ return g(e);
451
+ }
452
+ function S(e) {
453
+ function t(t, n, r, i, a) {
454
+ if (!(t[n] instanceof e)) {
455
+ var o = e.name || f, s = F(t[n]);
456
+ return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected ") + ("instance of `" + o + "`."));
457
+ }
458
+ return null;
459
+ }
460
+ return g(t);
461
+ }
462
+ function C(e) {
463
+ if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s("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]).") : s("Invalid argument supplied to oneOf, expected an array.")), c;
464
+ function t(t, n, r, i, a) {
465
+ for (var o = t[n], s = 0; s < e.length; s++) if (m(o, e[s])) return null;
466
+ var c = JSON.stringify(e, function(e, t) {
467
+ return N(t) === "symbol" ? String(t) : t;
468
+ });
469
+ return new h("Invalid " + i + " `" + a + "` of value `" + String(o) + "` " + ("supplied to `" + r + "`, expected one of " + c + "."));
470
+ }
471
+ return g(t);
472
+ }
473
+ function w(e) {
474
+ function t(t, n, r, o, s) {
475
+ if (typeof e != "function") return new h("Property `" + s + "` of component `" + r + "` has invalid PropType notation inside objectOf.");
476
+ var c = t[n], l = M(c);
477
+ if (l !== "object") return new h("Invalid " + o + " `" + s + "` of type " + ("`" + l + "` supplied to `" + r + "`, expected an object."));
478
+ for (var u in c) if (a(c, u)) {
479
+ var d = e(c, u, r, o, s + "." + u, i);
480
+ if (d instanceof Error) return d;
481
+ }
482
+ return null;
483
+ }
484
+ return g(t);
485
+ }
486
+ function T(e) {
487
+ if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), c;
488
+ for (var t = 0; t < e.length; t++) {
489
+ var n = e[t];
490
+ if (typeof n != "function") return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + P(n) + " at index " + t + "."), c;
491
+ }
492
+ function r(t, n, r, o, s) {
493
+ for (var c = [], l = 0; l < e.length; l++) {
494
+ var u = e[l], d = u(t, n, r, o, s, i);
495
+ if (d == null) return null;
496
+ d.data && a(d.data, "expectedType") && c.push(d.data.expectedType);
497
+ }
498
+ var f = c.length > 0 ? ", expected one of type [" + c.join(", ") + "]" : "";
499
+ return new h("Invalid " + o + " `" + s + "` supplied to " + ("`" + r + "`" + f + "."));
500
+ }
501
+ return g(r);
502
+ }
503
+ function E() {
504
+ function e(e, t, n, r, i) {
505
+ return A(e[t]) ? null : new h("Invalid " + r + " `" + i + "` supplied to " + ("`" + n + "`, expected a ReactNode."));
506
+ }
507
+ return g(e);
508
+ }
509
+ function D(e, t, n, r, i) {
510
+ return new h((e || "React class") + ": " + t + " type `" + n + "." + r + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`.");
511
+ }
512
+ function O(e) {
513
+ function t(t, n, r, a, o) {
514
+ var s = t[n], c = M(s);
515
+ if (c !== "object") return new h("Invalid " + a + " `" + o + "` of type `" + c + "` " + ("supplied to `" + r + "`, expected `object`."));
516
+ for (var l in e) {
517
+ var u = e[l];
518
+ if (typeof u != "function") return D(r, a, o, l, N(u));
519
+ var d = u(s, l, r, a, o + "." + l, i);
520
+ if (d) return d;
521
+ }
522
+ return null;
523
+ }
524
+ return g(t);
525
+ }
526
+ function k(e) {
527
+ function t(t, n, o, s, c) {
528
+ var l = t[n], u = M(l);
529
+ if (u !== "object") return new h("Invalid " + s + " `" + c + "` of type `" + u + "` " + ("supplied to `" + o + "`, expected `object`."));
530
+ for (var d in r({}, t[n], e)) {
531
+ var f = e[d];
532
+ if (a(e, d) && typeof f != "function") return D(o, s, c, d, N(f));
533
+ if (!f) return new h("Invalid " + s + " `" + c + "` key `" + d + "` supplied to `" + o + "`.\nBad object: " + JSON.stringify(t[n], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " "));
534
+ var p = f(l, d, o, s, c + "." + d, i);
535
+ if (p) return p;
536
+ }
537
+ return null;
538
+ }
539
+ return g(t);
540
+ }
541
+ function A(t) {
542
+ switch (typeof t) {
543
+ case "number":
544
+ case "string":
545
+ case "undefined": return !0;
546
+ case "boolean": return !t;
547
+ case "object":
548
+ if (Array.isArray(t)) return t.every(A);
549
+ if (t === null || e(t)) return !0;
550
+ var n = d(t);
551
+ if (n) {
552
+ var r = n.call(t), i;
553
+ if (n !== t.entries) {
554
+ for (; !(i = r.next()).done;) if (!A(i.value)) return !1;
555
+ } else for (; !(i = r.next()).done;) {
556
+ var a = i.value;
557
+ if (a && !A(a[1])) return !1;
558
+ }
559
+ } else return !1;
560
+ return !0;
561
+ default: return !1;
562
+ }
563
+ }
564
+ function j(e, t) {
565
+ return e === "symbol" ? !0 : t ? t["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && t instanceof Symbol : !1;
566
+ }
567
+ function M(e) {
568
+ var t = typeof e;
569
+ return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : j(t, e) ? "symbol" : t;
570
+ }
571
+ function N(e) {
572
+ if (e == null) return "" + e;
573
+ var t = M(e);
574
+ if (t === "object") {
575
+ if (e instanceof Date) return "date";
576
+ if (e instanceof RegExp) return "regexp";
577
+ }
578
+ return t;
579
+ }
580
+ function P(e) {
581
+ var t = N(e);
582
+ switch (t) {
583
+ case "array":
584
+ case "object": return "an " + t;
585
+ case "boolean":
586
+ case "date":
587
+ case "regexp": return "a " + t;
588
+ default: return t;
589
+ }
590
+ }
591
+ function F(e) {
592
+ return !e.constructor || !e.constructor.name ? f : e.constructor.name;
593
+ }
594
+ return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
595
+ };
596
+ })), z = /* @__PURE__ */ n(((e, t) => {
597
+ var n = F();
598
+ function r() {}
599
+ function i() {}
600
+ i.resetWarningCache = r, t.exports = function() {
601
+ function e(e, t, r, i, a, o) {
602
+ if (o !== n) {
603
+ var s = /* @__PURE__ */ Error("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");
604
+ throw s.name = "Invariant Violation", s;
605
+ }
606
+ }
607
+ e.isRequired = e;
608
+ function t() {
609
+ return e;
610
+ }
611
+ var a = {
612
+ array: e,
613
+ bigint: e,
614
+ bool: e,
615
+ func: e,
616
+ number: e,
617
+ object: e,
618
+ string: e,
619
+ symbol: e,
620
+ any: e,
621
+ arrayOf: t,
622
+ element: e,
623
+ elementType: e,
624
+ instanceOf: t,
625
+ node: e,
626
+ objectOf: t,
627
+ oneOf: t,
628
+ oneOfType: t,
629
+ shape: t,
630
+ exact: t,
631
+ checkPropTypes: i,
632
+ resetWarningCache: r
633
+ };
634
+ return a.PropTypes = a, a;
635
+ };
636
+ })), B = /* @__PURE__ */ e((/* @__PURE__ */ n(((e, t) => {
637
+ if (process.env.NODE_ENV !== "production") {
638
+ var n = N();
639
+ t.exports = R()(n.isElement, !0);
640
+ } else t.exports = z()();
641
+ })))(), 1);
642
+ function V(e, t, n) {
643
+ this.x = e, this.y = t, this.time = n || (/* @__PURE__ */ new Date()).getTime();
644
+ }
645
+ V.prototype.velocityFrom = function(e) {
646
+ return this.time === e.time ? 1 : this.distanceTo(e) / (this.time - e.time);
647
+ }, V.prototype.distanceTo = function(e) {
648
+ return Math.sqrt((this.x - e.x) ** 2 + (this.y - e.y) ** 2);
649
+ }, V.prototype.equals = function(e) {
650
+ return this.x === e.x && this.y === e.y && this.time === e.time;
651
+ };
652
+ function H(e, t, n, r) {
653
+ this.startPoint = e, this.control1 = t, this.control2 = n, this.endPoint = r;
654
+ }
655
+ H.prototype.length = function() {
656
+ for (var e = 10, t = 0, n = void 0, r = void 0, i = 0; i <= e; i += 1) {
657
+ var a = i / e, o = this._point(a, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), s = this._point(a, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
658
+ if (i > 0) {
659
+ var c = o - n, l = s - r;
660
+ t += Math.sqrt(c * c + l * l);
661
+ }
662
+ n = o, r = s;
663
+ }
664
+ return t;
665
+ }, H.prototype._point = function(e, t, n, r, i) {
666
+ return t * (1 - e) * (1 - e) * (1 - e) + 3 * n * (1 - e) * (1 - e) * e + 3 * r * (1 - e) * e * e + i * e * e * e;
667
+ };
668
+ function U(e, t, n) {
669
+ var r, i, a, o = null, s = 0;
670
+ n ||= {};
671
+ var c = function() {
672
+ s = n.leading === !1 ? 0 : Date.now(), o = null, a = e.apply(r, i), o || (r = i = null);
673
+ };
674
+ return function() {
675
+ var l = Date.now();
676
+ !s && n.leading === !1 && (s = l);
677
+ var u = t - (l - s);
678
+ return r = this, i = arguments, u <= 0 || u > t ? (o &&= (clearTimeout(o), null), s = l, a = e.apply(r, i), o || (r = i = null)) : !o && n.trailing !== !1 && (o = setTimeout(c, u)), a;
679
+ };
680
+ }
681
+ function W(e, t) {
682
+ var n = this, r = t || {};
683
+ this.velocityFilterWeight = r.velocityFilterWeight || .7, this.minWidth = r.minWidth || .5, this.maxWidth = r.maxWidth || 2.5, this.throttle = "throttle" in r ? r.throttle : 16, this.minDistance = "minDistance" in r ? r.minDistance : 5, this._strokeMoveUpdate = this.throttle ? U(W.prototype._strokeUpdate, this.throttle) : W.prototype._strokeUpdate, this.dotSize = r.dotSize || function() {
684
+ return (this.minWidth + this.maxWidth) / 2;
685
+ }, this.penColor = r.penColor || "black", this.backgroundColor = r.backgroundColor || "rgba(0,0,0,0)", this.onBegin = r.onBegin, this.onEnd = r.onEnd, this._canvas = e, this._ctx = e.getContext("2d"), this.clear(), this._handleMouseDown = function(e) {
686
+ e.which === 1 && (n._mouseButtonDown = !0, n._strokeBegin(e));
687
+ }, this._handleMouseMove = function(e) {
688
+ n._mouseButtonDown && n._strokeMoveUpdate(e);
689
+ }, this._handleMouseUp = function(e) {
690
+ e.which === 1 && n._mouseButtonDown && (n._mouseButtonDown = !1, n._strokeEnd(e));
691
+ }, this._handleTouchStart = function(e) {
692
+ if (e.targetTouches.length === 1) {
693
+ var t = e.changedTouches[0];
694
+ n._strokeBegin(t);
695
+ }
696
+ }, this._handleTouchMove = function(e) {
697
+ e.preventDefault();
698
+ var t = e.targetTouches[0];
699
+ n._strokeMoveUpdate(t);
700
+ }, this._handleTouchEnd = function(e) {
701
+ e.target === n._canvas && (e.preventDefault(), n._strokeEnd(e));
702
+ }, this.on();
703
+ }
704
+ W.prototype.clear = function() {
705
+ var e = this._ctx, t = this._canvas;
706
+ e.fillStyle = this.backgroundColor, e.clearRect(0, 0, t.width, t.height), e.fillRect(0, 0, t.width, t.height), this._data = [], this._reset(), this._isEmpty = !0;
707
+ }, W.prototype.fromDataURL = function(e) {
708
+ var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = new Image(), i = n.ratio || window.devicePixelRatio || 1, a = n.width || this._canvas.width / i, o = n.height || this._canvas.height / i;
709
+ this._reset(), r.src = e, r.onload = function() {
710
+ t._ctx.drawImage(r, 0, 0, a, o);
711
+ }, this._isEmpty = !1;
712
+ }, W.prototype.toDataURL = function(e) {
713
+ var t;
714
+ switch (e) {
715
+ case "image/svg+xml": return this._toSVG();
716
+ default:
717
+ var n = [...arguments].slice(1);
718
+ return (t = this._canvas).toDataURL.apply(t, [e].concat(n));
719
+ }
720
+ }, W.prototype.on = function() {
721
+ this._handleMouseEvents(), this._handleTouchEvents();
722
+ }, W.prototype.off = function() {
723
+ 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);
724
+ }, W.prototype.isEmpty = function() {
725
+ return this._isEmpty;
726
+ }, W.prototype._strokeBegin = function(e) {
727
+ this._data.push([]), this._reset(), this._strokeUpdate(e), typeof this.onBegin == "function" && this.onBegin(e);
728
+ }, W.prototype._strokeUpdate = function(e) {
729
+ var t = e.clientX, n = e.clientY, r = this._createPoint(t, n), i = this._data[this._data.length - 1], a = i && i[i.length - 1], o = a && r.distanceTo(a) < this.minDistance;
730
+ if (!(a && o)) {
731
+ var s = this._addPoint(r), c = s.curve, l = s.widths;
732
+ c && l && this._drawCurve(c, l.start, l.end), this._data[this._data.length - 1].push({
733
+ x: r.x,
734
+ y: r.y,
735
+ time: r.time,
736
+ color: this.penColor
737
+ });
738
+ }
739
+ }, W.prototype._strokeEnd = function(e) {
740
+ var t = this.points.length > 2, n = this.points[0];
741
+ if (!t && n && this._drawDot(n), n) {
742
+ var r = this._data[this._data.length - 1], i = r[r.length - 1];
743
+ n.equals(i) || r.push({
744
+ x: n.x,
745
+ y: n.y,
746
+ time: n.time,
747
+ color: this.penColor
748
+ });
749
+ }
750
+ typeof this.onEnd == "function" && this.onEnd(e);
751
+ }, W.prototype._handleMouseEvents = function() {
752
+ this._mouseButtonDown = !1, this._canvas.addEventListener("mousedown", this._handleMouseDown), this._canvas.addEventListener("mousemove", this._handleMouseMove), document.addEventListener("mouseup", this._handleMouseUp);
753
+ }, W.prototype._handleTouchEvents = function() {
754
+ 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);
755
+ }, W.prototype._reset = function() {
756
+ this.points = [], this._lastVelocity = 0, this._lastWidth = (this.minWidth + this.maxWidth) / 2, this._ctx.fillStyle = this.penColor;
757
+ }, W.prototype._createPoint = function(e, t, n) {
758
+ var r = this._canvas.getBoundingClientRect();
759
+ return new V(e - r.left, t - r.top, n || (/* @__PURE__ */ new Date()).getTime());
760
+ }, W.prototype._addPoint = function(e) {
761
+ var t = this.points, n = void 0;
762
+ if (t.push(e), t.length > 2) {
763
+ t.length === 3 && t.unshift(t[0]), n = this._calculateCurveControlPoints(t[0], t[1], t[2]);
764
+ var r = n.c2;
765
+ n = this._calculateCurveControlPoints(t[1], t[2], t[3]);
766
+ var i = n.c1, a = new H(t[1], r, i, t[2]), o = this._calculateCurveWidths(a);
767
+ return t.shift(), {
768
+ curve: a,
769
+ widths: o
770
+ };
771
+ }
772
+ return {};
773
+ }, W.prototype._calculateCurveControlPoints = function(e, t, n) {
774
+ var r = e.x - t.x, i = e.y - t.y, a = t.x - n.x, o = t.y - n.y, s = {
775
+ x: (e.x + t.x) / 2,
776
+ y: (e.y + t.y) / 2
777
+ }, c = {
778
+ x: (t.x + n.x) / 2,
779
+ y: (t.y + n.y) / 2
780
+ }, l = Math.sqrt(r * r + i * i), u = Math.sqrt(a * a + o * o), d = s.x - c.x, f = s.y - c.y, p = u / (l + u), m = {
781
+ x: c.x + d * p,
782
+ y: c.y + f * p
783
+ }, h = t.x - m.x, g = t.y - m.y;
784
+ return {
785
+ c1: new V(s.x + h, s.y + g),
786
+ c2: new V(c.x + h, c.y + g)
787
+ };
788
+ }, W.prototype._calculateCurveWidths = function(e) {
789
+ var t = e.startPoint, n = e.endPoint, r = {
790
+ start: null,
791
+ end: null
792
+ }, i = this.velocityFilterWeight * n.velocityFrom(t) + (1 - this.velocityFilterWeight) * this._lastVelocity, a = this._strokeWidth(i);
793
+ return r.start = this._lastWidth, r.end = a, this._lastVelocity = i, this._lastWidth = a, r;
794
+ }, W.prototype._strokeWidth = function(e) {
795
+ return Math.max(this.maxWidth / (e + 1), this.minWidth);
796
+ }, W.prototype._drawPoint = function(e, t, n) {
797
+ var r = this._ctx;
798
+ r.moveTo(e, t), r.arc(e, t, n, 0, 2 * Math.PI, !1), this._isEmpty = !1;
799
+ }, W.prototype._drawCurve = function(e, t, n) {
800
+ var r = this._ctx, i = n - t, a = Math.floor(e.length());
801
+ r.beginPath();
802
+ for (var o = 0; o < a; o += 1) {
803
+ var s = o / a, c = s * s, l = c * s, u = 1 - s, d = u * u, f = d * u, p = f * e.startPoint.x;
804
+ p += 3 * d * s * e.control1.x, p += 3 * u * c * e.control2.x, p += l * e.endPoint.x;
805
+ var m = f * e.startPoint.y;
806
+ m += 3 * d * s * e.control1.y, m += 3 * u * c * e.control2.y, m += l * e.endPoint.y;
807
+ var h = t + l * i;
808
+ this._drawPoint(p, m, h);
809
+ }
810
+ r.closePath(), r.fill();
811
+ }, W.prototype._drawDot = function(e) {
812
+ var t = this._ctx, n = typeof this.dotSize == "function" ? this.dotSize() : this.dotSize;
813
+ t.beginPath(), this._drawPoint(e.x, e.y, n), t.closePath(), t.fill();
814
+ }, W.prototype._fromData = function(e, t, n) {
815
+ for (var r = 0; r < e.length; r += 1) {
816
+ var i = e[r];
817
+ if (i.length > 1) for (var a = 0; a < i.length; a += 1) {
818
+ var o = i[a], s = new V(o.x, o.y, o.time), c = o.color;
819
+ if (a === 0) this.penColor = c, this._reset(), this._addPoint(s);
820
+ else if (a !== i.length - 1) {
821
+ var l = this._addPoint(s), u = l.curve, d = l.widths;
822
+ u && d && t(u, d, c);
823
+ }
824
+ }
825
+ else {
826
+ this._reset();
827
+ var f = i[0];
828
+ n(f);
829
+ }
830
+ }
831
+ }, W.prototype._toSVG = function() {
832
+ var e = this, t = this._data, n = this._canvas, r = Math.max(window.devicePixelRatio || 1, 1), i = 0, a = 0, o = n.width / r, s = n.height / r, c = document.createElementNS("http://www.w3.org/2000/svg", "svg");
833
+ c.setAttributeNS(null, "width", n.width), c.setAttributeNS(null, "height", n.height), this._fromData(t, function(e, t, n) {
834
+ var r = document.createElement("path");
835
+ if (!isNaN(e.control1.x) && !isNaN(e.control1.y) && !isNaN(e.control2.x) && !isNaN(e.control2.y)) {
836
+ var i = "M " + e.startPoint.x.toFixed(3) + "," + e.startPoint.y.toFixed(3) + " " + ("C " + e.control1.x.toFixed(3) + "," + e.control1.y.toFixed(3) + " ") + (e.control2.x.toFixed(3) + "," + e.control2.y.toFixed(3) + " ") + (e.endPoint.x.toFixed(3) + "," + e.endPoint.y.toFixed(3));
837
+ r.setAttribute("d", i), r.setAttribute("stroke-width", (t.end * 2.25).toFixed(3)), r.setAttribute("stroke", n), r.setAttribute("fill", "none"), r.setAttribute("stroke-linecap", "round"), c.appendChild(r);
838
+ }
839
+ }, function(t) {
840
+ var n = document.createElement("circle"), r = typeof e.dotSize == "function" ? e.dotSize() : e.dotSize;
841
+ n.setAttribute("r", r), n.setAttribute("cx", t.x), n.setAttribute("cy", t.y), n.setAttribute("fill", t.color), c.appendChild(n);
842
+ });
843
+ var l = "data:image/svg+xml;base64,", u = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"" + (" viewBox=\"" + i + " " + a + " " + o + " " + s + "\"") + (" width=\"" + o + "\"") + (" height=\"" + s + "\"") + ">", d = c.innerHTML;
844
+ if (d === void 0) {
845
+ var f = document.createElement("dummy"), p = c.childNodes;
846
+ f.innerHTML = "";
847
+ for (var m = 0; m < p.length; m += 1) f.appendChild(p[m].cloneNode(!0));
848
+ d = f.innerHTML;
849
+ }
850
+ var h = u + d + "</svg>";
851
+ return l + btoa(h);
852
+ }, W.prototype.fromData = function(e) {
853
+ var t = this;
854
+ this.clear(), this._fromData(e, function(e, n) {
855
+ return t._drawCurve(e, n.start, n.end);
856
+ }, function(e) {
857
+ return t._drawDot(e);
858
+ }), this._data = e;
859
+ }, W.prototype.toData = function() {
860
+ return this._data;
861
+ };
862
+ // node_modules/react-signature-canvas/dist/index.mjs
863
+ var G = /* @__PURE__ */ e((/* @__PURE__ */ n(((e, t, n) => {
864
+ (function(n, r) {
865
+ typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.trimCanvas = r() : n.trimCanvas = r();
866
+ })(n, function() {
867
+ return function(e) {
868
+ function t(r) {
869
+ if (n[r]) return n[r].exports;
870
+ var i = n[r] = {
871
+ exports: {},
872
+ id: r,
873
+ loaded: !1
874
+ };
875
+ return e[r].call(i.exports, i, i.exports, t), i.loaded = !0, i.exports;
876
+ }
877
+ var n = {};
878
+ return t.m = e, t.c = n, t.p = "", t(0);
879
+ }([function(e, t) {
880
+ function n(e) {
881
+ var t = e.getContext("2d"), n = e.width, r = e.height, i = t.getImageData(0, 0, n, r).data, s = a(!0, n, r, i), c = a(!1, n, r, i), l = o(!0, n, r, i), u = o(!1, n, r, i) - l + 1, d = c - s + 1, f = t.getImageData(l, s, u, d);
882
+ return e.width = u, e.height = d, t.clearRect(0, 0, u, d), t.putImageData(f, 0, 0), e;
883
+ }
884
+ function r(e, t, n, r) {
885
+ return {
886
+ red: r[4 * (n * t + e)],
887
+ green: r[4 * (n * t + e) + 1],
888
+ blue: r[4 * (n * t + e) + 2],
889
+ alpha: r[4 * (n * t + e) + 3]
890
+ };
891
+ }
892
+ function i(e, t, n, i) {
893
+ return r(e, t, n, i).alpha;
894
+ }
895
+ function a(e, t, n, r) {
896
+ for (var a = e ? 1 : -1, o = e ? 0 : n - 1; e ? o < n : o > -1; o += a) for (var s = 0; s < t; s++) if (i(s, o, t, r)) return o;
897
+ return null;
898
+ }
899
+ function o(e, t, n, r) {
900
+ for (var a = e ? 1 : -1, o = e ? 0 : t - 1; e ? o < t : o > -1; o += a) for (var s = 0; s < n; s++) if (i(o, s, t, r)) return o;
901
+ return null;
902
+ }
903
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.default = n;
904
+ }]);
905
+ });
906
+ })))(), 1), K = ["canvasProps", "clearOnResize"], q = /*#__PURE__*/ function(e) {
907
+ T(n, e);
908
+ var t = A(n);
909
+ function n() {
910
+ var e;
911
+ C(this, n);
912
+ var r = [...arguments];
913
+ return e = t.call.apply(t, [this].concat(r)), e.staticThis = e.constructor, e._sigPad = null, e._canvas = null, e.setRef = function(t) {
914
+ e._canvas = t, e._canvas === null && (e._sigPad = null);
915
+ }, e._excludeOurProps = function() {
916
+ var t = e.props;
917
+ return t.canvasProps, t.clearOnResize, _(t, K);
918
+ }, e.componentDidMount = function() {
919
+ var t = e.getCanvas();
920
+ e._sigPad = new W(t, e._excludeOurProps()), e._resizeCanvas(), e.on();
921
+ }, e.componentWillUnmount = function() {
922
+ e.off();
923
+ }, e.componentDidUpdate = function() {
924
+ Object.assign(e._sigPad, e._excludeOurProps());
925
+ }, e.getCanvas = function() {
926
+ if (e._canvas === null) throw e.staticThis.refNullError;
927
+ return e._canvas;
928
+ }, e.getTrimmedCanvas = function() {
929
+ var t = e.getCanvas(), n = document.createElement("canvas");
930
+ return n.width = t.width, n.height = t.height, n.getContext("2d").drawImage(t, 0, 0), (0, G.default)(n);
931
+ }, e.getSignaturePad = function() {
932
+ if (e._sigPad === null) throw e.staticThis.refNullError;
933
+ return e._sigPad;
934
+ }, e._checkClearOnResize = function() {
935
+ e.props.clearOnResize && e._resizeCanvas();
936
+ }, e._resizeCanvas = function() {
937
+ var t = e.props.canvasProps ?? {}, n = t.width, r = t.height;
938
+ if (n === void 0 || r === void 0) {
939
+ var i = e.getCanvas(), a = Math.max(window.devicePixelRatio ?? 1, 1);
940
+ n === void 0 && (i.width = i.offsetWidth * a), r === void 0 && (i.height = i.offsetHeight * a), i.getContext("2d").scale(a, a), e.clear();
941
+ }
942
+ }, e.render = function() {
943
+ var t = e.props.canvasProps;
944
+ return /*#__PURE__*/ i.createElement("canvas", h({ ref: e.setRef }, t));
945
+ }, e.on = function() {
946
+ return window.addEventListener("resize", e._checkClearOnResize), e.getSignaturePad().on();
947
+ }, e.off = function() {
948
+ return window.removeEventListener("resize", e._checkClearOnResize), e.getSignaturePad().off();
949
+ }, e.clear = function() {
950
+ return e.getSignaturePad().clear();
951
+ }, e.isEmpty = function() {
952
+ return e.getSignaturePad().isEmpty();
953
+ }, e.fromDataURL = function(t, n) {
954
+ return e.getSignaturePad().fromDataURL(t, n);
955
+ }, e.toDataURL = function(t, n) {
956
+ return e.getSignaturePad().toDataURL(t, n);
957
+ }, e.fromData = function(t) {
958
+ return e.getSignaturePad().fromData(t);
959
+ }, e.toData = function() {
960
+ return e.getSignaturePad().toData();
961
+ }, e;
962
+ }
963
+ return S(n);
964
+ }(a);
965
+ q.propTypes = {
966
+ velocityFilterWeight: B.default.number,
967
+ minWidth: B.default.number,
968
+ maxWidth: B.default.number,
969
+ minDistance: B.default.number,
970
+ dotSize: B.default.oneOfType([B.default.number, B.default.func]),
971
+ penColor: B.default.string,
972
+ throttle: B.default.number,
973
+ onEnd: B.default.func,
974
+ onBegin: B.default.func,
975
+ canvasProps: B.default.object,
976
+ clearOnResize: B.default.bool
977
+ }, q.defaultProps = { clearOnResize: !0 }, q.refNullError = /* @__PURE__ */ Error("react-signature-canvas is currently mounting or unmounting: React refs are null during this phase.");
978
+ // src/components/controls/Signature/signature.tsx
979
+ function J({ attributes: e = {}, rules: n = {}, onChange: i }) {
980
+ let { id: a = "", MuiAttributes: h = {}, label: g = "Signature", bucket: _ = "", region: v = "", identityPoolId: y = "", path: b = "", disabled: x = !1, CanvasProps: S = {} } = e, C = s(null), w = s(null), [T, E] = c(!1), [D, O] = c(e.value || null), [k, A] = c(400), [j, M] = c(!1), N = t(n), P = S?.style?.height || 150;
981
+ o(() => {
982
+ let e = w.current;
983
+ if (!e) return;
984
+ let t = new ResizeObserver((e) => {
985
+ let t = e[0]?.contentRect?.width;
986
+ t && t > 0 && A(Math.floor(t));
987
+ });
988
+ return t.observe(e), () => t.disconnect();
989
+ }, []), o(() => {
990
+ e.value ? O(e.value) : (O(null), M(!1), C.current && C.current.clear());
991
+ }, [e.value]);
992
+ let F = () => {
993
+ C.current && C.current.clear(), O(null), M(!1), i && i({
994
+ id: a,
995
+ value: ""
996
+ });
997
+ }, I = async () => {
998
+ if (!C.current || C.current.isEmpty()) return;
999
+ E(!0);
1000
+ let e = C.current.toDataURL("image/png"), t = `${a}-${Date.now()}.png`;
1001
+ try {
1002
+ let n = await r(e, t, _, v, y, b);
1003
+ O(n), M(!0), i && i({
1004
+ id: a,
1005
+ value: n
1006
+ });
1007
+ } catch (e) {
1008
+ console.error("Signature upload failed", e);
1009
+ } finally {
1010
+ E(!1);
1011
+ }
1012
+ };
1013
+ return /* @__PURE__ */ m(l, {
1014
+ sx: {
1015
+ width: "100%",
1016
+ ...h.sx
1017
+ },
1018
+ children: [
1019
+ /* @__PURE__ */ m(f, {
1020
+ variant: "subtitle2",
1021
+ gutterBottom: !0,
1022
+ sx: { display: "flex" },
1023
+ children: [g, N && /* @__PURE__ */ p(l, {
1024
+ component: "span",
1025
+ sx: {
1026
+ color: "error.main",
1027
+ ml: .5
1028
+ },
1029
+ children: "*"
1030
+ })]
1031
+ }),
1032
+ /* @__PURE__ */ m(l, {
1033
+ ref: w,
1034
+ sx: {
1035
+ position: "relative",
1036
+ isolation: "isolate",
1037
+ zIndex: 1,
1038
+ border: "1px solid",
1039
+ borderColor: "divider",
1040
+ borderRadius: 1,
1041
+ overflow: "hidden",
1042
+ bgcolor: "background.paper"
1043
+ },
1044
+ children: [/* @__PURE__ */ p(q, {
1045
+ ref: C,
1046
+ penColor: "black",
1047
+ canvasProps: {
1048
+ className: "sigCanvas",
1049
+ width: k,
1050
+ height: P,
1051
+ style: {
1052
+ display: "block",
1053
+ position: "relative",
1054
+ zIndex: 1,
1055
+ touchAction: "none",
1056
+ pointerEvents: x ? "none" : "auto",
1057
+ ...S?.style,
1058
+ width: "100%",
1059
+ height: P
1060
+ }
1061
+ },
1062
+ backgroundColor: "transparent"
1063
+ }), D && /* @__PURE__ */ p(l, {
1064
+ component: "img",
1065
+ src: D,
1066
+ alt: "Signature",
1067
+ sx: {
1068
+ position: "absolute",
1069
+ inset: 0,
1070
+ width: "100%",
1071
+ height: P,
1072
+ objectFit: "contain",
1073
+ bgcolor: "background.paper"
1074
+ }
1075
+ })]
1076
+ }),
1077
+ /* @__PURE__ */ m(l, {
1078
+ sx: {
1079
+ display: "flex",
1080
+ flexWrap: "wrap",
1081
+ gap: 1,
1082
+ alignItems: "center",
1083
+ mt: 1
1084
+ },
1085
+ children: [
1086
+ /* @__PURE__ */ p(u, {
1087
+ variant: "outlined",
1088
+ color: "secondary",
1089
+ onClick: F,
1090
+ size: "small",
1091
+ disabled: x || T,
1092
+ children: "Clear"
1093
+ }),
1094
+ /* @__PURE__ */ p(u, {
1095
+ variant: "contained",
1096
+ color: "primary",
1097
+ onClick: I,
1098
+ size: "small",
1099
+ disabled: x || T || D !== null,
1100
+ startIcon: T ? /* @__PURE__ */ p(d, {
1101
+ size: 16,
1102
+ color: "inherit"
1103
+ }) : null,
1104
+ children: D ? "Saved" : "Save"
1105
+ }),
1106
+ j && D && /* @__PURE__ */ p(f, {
1107
+ variant: "caption",
1108
+ sx: { color: "success.main" },
1109
+ children: "Signature Saved!"
1110
+ })
1111
+ ]
1112
+ })
1113
+ ]
1114
+ });
1115
+ }
1116
+ export { J as default };