@sheetxl/studio-mui 0.1.98

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 (178) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +24 -0
  3. package/build/browser/cjs/4XrhSt2xtUIXkiCt.cjs +1516 -0
  4. package/build/browser/cjs/B3EvhaQf456RMc1Q.cjs +6 -0
  5. package/build/browser/cjs/B3kl467PN2cpvrfz.cjs +12 -0
  6. package/build/browser/cjs/B5LCoenQbQmzic16.cjs +314 -0
  7. package/build/browser/cjs/BBuyHZwFlDRvHzBH.cjs +7 -0
  8. package/build/browser/cjs/BGoG_ROASNB2owBR.cjs +28 -0
  9. package/build/browser/cjs/BJ6Da8vZLjAl44pz.cjs +6 -0
  10. package/build/browser/cjs/BL_UVvG75SFsFaT3.cjs +6 -0
  11. package/build/browser/cjs/BNDoTytIOGtVh5l9.cjs +6 -0
  12. package/build/browser/cjs/BQOyVCuOdwDja_VV.cjs +42 -0
  13. package/build/browser/cjs/BRiPktKUmeJipjaa.cjs +6 -0
  14. package/build/browser/cjs/BabbNVs5iKg49rfk.cjs +6 -0
  15. package/build/browser/cjs/BcOX5vODdThWbKrR.cjs +6 -0
  16. package/build/browser/cjs/BchlMljYmXDs0Ol2.cjs +6 -0
  17. package/build/browser/cjs/BmYZvm13acvbFhOu.cjs +6 -0
  18. package/build/browser/cjs/BmbsW1n0-CkF3ITF.cjs +6 -0
  19. package/build/browser/cjs/BnCUyGP_ERKmL3ZR.cjs +6 -0
  20. package/build/browser/cjs/BtP4E1_yhMjpfbr5.cjs +6 -0
  21. package/build/browser/cjs/C3E9wmSfmgYmXfJN.cjs +205 -0
  22. package/build/browser/cjs/C3Hl78e9qfEHxJYc.cjs +6 -0
  23. package/build/browser/cjs/CEvRH8aOx3etutK_.cjs +17 -0
  24. package/build/browser/cjs/CLZSdaBnKDfb142R.cjs +6 -0
  25. package/build/browser/cjs/CN1cS39WcNrcPVqS.cjs +129 -0
  26. package/build/browser/cjs/CSH1hUnHovjo8Lb8.cjs +6 -0
  27. package/build/browser/cjs/CTNt3asYQRA-MROc.cjs +47 -0
  28. package/build/browser/cjs/C_JZEtvgcli6T7Wg.cjs +11 -0
  29. package/build/browser/cjs/CbaYZmvS8u-p_Z8Z.cjs +6 -0
  30. package/build/browser/cjs/Cc-4c3DRm96wq5rj.cjs +12 -0
  31. package/build/browser/cjs/CnY6DbatGmPyylfU.cjs +20 -0
  32. package/build/browser/cjs/CqkQGfzNax6GmZFo.cjs +6 -0
  33. package/build/browser/cjs/D2AF0a4vbNKzFxzA.cjs +21 -0
  34. package/build/browser/cjs/D4y1iYdx8sdwQ50T.cjs +6 -0
  35. package/build/browser/cjs/D5cF1EnyvnPY2IxS.cjs +150 -0
  36. package/build/browser/cjs/DA1-OPTYQTepGKEg.cjs +11 -0
  37. package/build/browser/cjs/DJDMVDpUqlEKYLjt.cjs +6 -0
  38. package/build/browser/cjs/DLXLJ8SNNjwM5C-P.cjs +6 -0
  39. package/build/browser/cjs/DV8lOsZBgyx7MTBW.cjs +6 -0
  40. package/build/browser/cjs/DZAPn_d9mpvfRzsb.cjs +6 -0
  41. package/build/browser/cjs/DaicqO_9d1hYzyB_.cjs +11 -0
  42. package/build/browser/cjs/Dfh6eMCbAjW14fdh.cjs +6 -0
  43. package/build/browser/cjs/DhI2lgDZL8GqBejN.cjs +6 -0
  44. package/build/browser/cjs/Ds6s8fpzOZsd2m1r.cjs +6 -0
  45. package/build/browser/cjs/DvIWGmDT5uBVQ5zH.cjs +16 -0
  46. package/build/browser/cjs/DvLgu20RiaayrJcW.cjs +7 -0
  47. package/build/browser/cjs/Dvhwt25gyHzxQLrp.cjs +6 -0
  48. package/build/browser/cjs/DvwApJM_CVrlpLxn.cjs +6 -0
  49. package/build/browser/cjs/DwVYzo4a05DMfta_.cjs +28 -0
  50. package/build/browser/cjs/NYdqUauA5i2q33UZ.cjs +6 -0
  51. package/build/browser/cjs/S2Xfq-KDgoT7ipPC.cjs +25 -0
  52. package/build/browser/cjs/TOZQZr9ZZ_Q-jdQZ.cjs +6 -0
  53. package/build/browser/cjs/bJuLOalXTwrshZL3.cjs +16 -0
  54. package/build/browser/cjs/eh9refYW4Gm25cmW.cjs +6 -0
  55. package/build/browser/cjs/hKqcVeb_8_4M79xj.cjs +6 -0
  56. package/build/browser/cjs/index.cjs +7 -0
  57. package/build/browser/cjs/is17hbP-kpOIBRP3.cjs +6 -0
  58. package/build/browser/cjs/pNY789kHWwRQXqse.cjs +17 -0
  59. package/build/browser/cjs/qJcc3ALtLWml32LU.cjs +18 -0
  60. package/build/browser/cjs/vWgVoELLfZ2ff1xL.cjs +6 -0
  61. package/build/browser/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  62. package/build/browser/esm/7Imk0owJj7oNHR7v.mjs +48 -0
  63. package/build/browser/esm/AuNwPf0DXe0twn35.mjs +1592 -0
  64. package/build/browser/esm/B1Kw9U_AxCk0Aq9f.mjs +59 -0
  65. package/build/browser/esm/B9l1_Tfw_tMhKCNB.mjs +437 -0
  66. package/build/browser/esm/B9winT3ff8rc4sbn.mjs +490 -0
  67. package/build/browser/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  68. package/build/browser/esm/BGTcOBCyrTTlov_i.mjs +13399 -0
  69. package/build/browser/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  70. package/build/browser/esm/BQSa7N7QMGysdZdU.mjs +3932 -0
  71. package/build/browser/esm/BVEuc_3fLG2GN34k.mjs +16 -0
  72. package/build/browser/esm/BVh9YUwiSov8wcyY.mjs +1708 -0
  73. package/build/browser/esm/BZt5yM_TvoPXqdeA.mjs +3867 -0
  74. package/build/browser/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  75. package/build/browser/esm/BjUaiSvRZnas-HJW.mjs +16 -0
  76. package/build/browser/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  77. package/build/browser/esm/BtMqJ5CRpKuAC4UQ.mjs +1486 -0
  78. package/build/browser/esm/BwvMR2cgGwFn8hAL.mjs +36 -0
  79. package/build/browser/esm/BxU3eVA-Adrnq7ZJ.mjs +1372 -0
  80. package/build/browser/esm/C00coampLNiXjWJJ.mjs +436 -0
  81. package/build/browser/esm/C6nh1rvYnAg2w2V2.mjs +838 -0
  82. package/build/browser/esm/C8gc149K34Zi2lP2.mjs +16 -0
  83. package/build/browser/esm/CGSkuCZY1EmTUNlQ.mjs +52 -0
  84. package/build/browser/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  85. package/build/browser/esm/CNYANG0Z7mhGYo00.mjs +859 -0
  86. package/build/browser/esm/CV_FNw2i_aEc5nwA.mjs +16 -0
  87. package/build/browser/esm/CYSj0-zys2FKWgnb.mjs +18 -0
  88. package/build/browser/esm/CbTs5cvVaP1vPCYD.mjs +2248 -0
  89. package/build/browser/esm/CfAob8gGydmX1xQu.mjs +16 -0
  90. package/build/browser/esm/ChGigf2OPu7d44Km.mjs +16 -0
  91. package/build/browser/esm/CnzGN0S6zOfL_3SS.mjs +1358 -0
  92. package/build/browser/esm/CpyeUtXgDmrcMESB.mjs +52 -0
  93. package/build/browser/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  94. package/build/browser/esm/CtrrmHx9YbrOithw.mjs +152 -0
  95. package/build/browser/esm/CzAM0pDdZ7sjGgn9.mjs +86 -0
  96. package/build/browser/esm/D0oVDcgRUMZ9MHzu.mjs +41 -0
  97. package/build/browser/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  98. package/build/browser/esm/D78-3ghInxscHLVq.mjs +23 -0
  99. package/build/browser/esm/DEpR6b4DMs-va6RS.mjs +43734 -0
  100. package/build/browser/esm/DEsqE49cIQZ8AqCe.mjs +398 -0
  101. package/build/browser/esm/DGe70xvBhc62ZVZz.mjs +2410 -0
  102. package/build/browser/esm/DXapJ5_yR4E8vDaK.mjs +1685 -0
  103. package/build/browser/esm/DjAZeDxBIBZsRTm3.mjs +24 -0
  104. package/build/browser/esm/DttdPwwDTcRX4uwL.mjs +44 -0
  105. package/build/browser/esm/FXcO0MVElhw9cc3v.mjs +49 -0
  106. package/build/browser/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  107. package/build/browser/esm/HCE-tMxyVd0m-PgN.mjs +16 -0
  108. package/build/browser/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  109. package/build/browser/esm/UukTgmLv7or2mhlB.mjs +16 -0
  110. package/build/browser/esm/_cuE13TWr3oEoKGP.mjs +34 -0
  111. package/build/browser/esm/aIlK3Ybu-1T4WHPv.mjs +640 -0
  112. package/build/browser/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  113. package/build/browser/esm/bOhN6up-rdLRp82s.mjs +5588 -0
  114. package/build/browser/esm/index.mjs +85 -0
  115. package/build/browser/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  116. package/build/browser/esm/o6U2z4gZ7GE4QKZD.mjs +16 -0
  117. package/build/browser/esm/psav3cvsBQQczhPL.mjs +16 -0
  118. package/build/browser/esm/vn0iS301yg2hAbYd.mjs +51 -0
  119. package/build/licenses/dependencies.txt +1341 -0
  120. package/build/node/assets/style.css +1 -0
  121. package/build/node/esm/2kwF7RVUWBY1zsgG.mjs +16 -0
  122. package/build/node/esm/B-Xlyl81h27-bnvO.mjs +16 -0
  123. package/build/node/esm/B1_NYsn5D8x9QedP.mjs +307 -0
  124. package/build/node/esm/BCA5bxOeDA8k1Bm1.mjs +16 -0
  125. package/build/node/esm/BEo9XX1sHmVjScSm.mjs +16 -0
  126. package/build/node/esm/BIfdVpnJR1TZwCPR.mjs +1378 -0
  127. package/build/node/esm/BIqDzNJtkm-dyH0v.mjs +154 -0
  128. package/build/node/esm/BMGddfMXtKQ9AXQS.mjs +16 -0
  129. package/build/node/esm/BUOdfqhtCh8lhOhm.mjs +4000 -0
  130. package/build/node/esm/BYbE15S73xgn7S5E.mjs +88 -0
  131. package/build/node/esm/BfU8KdaB9wrEPWM-.mjs +16 -0
  132. package/build/node/esm/BkyivirgeiDKFSjk.mjs +16 -0
  133. package/build/node/esm/Bm1RqNJ-XvHpJW9z.mjs +831 -0
  134. package/build/node/esm/BqiVaoAYJJqPrCUZ.mjs +16 -0
  135. package/build/node/esm/Bx-30HInllXS7M_J.mjs +41 -0
  136. package/build/node/esm/Bx3lQBEvcqhxffT-.mjs +1726 -0
  137. package/build/node/esm/BxsKlaBFnb5wNq6R.mjs +53 -0
  138. package/build/node/esm/C4PMhNAV0KpPsKFj.mjs +24 -0
  139. package/build/node/esm/C7x3L6HtPhZjSrrZ.mjs +471 -0
  140. package/build/node/esm/C8gc149K34Zi2lP2.mjs +16 -0
  141. package/build/node/esm/CK-kn1p9NGRVM_h7.mjs +16 -0
  142. package/build/node/esm/CKR6snAwSONs7kfL.mjs +19 -0
  143. package/build/node/esm/CKXzosgZX8Xe3l59.mjs +16 -0
  144. package/build/node/esm/CLE_RHHvsDeoZ9Zd.mjs +561 -0
  145. package/build/node/esm/CMKci_5THkcJ-w9a.mjs +80 -0
  146. package/build/node/esm/CVU9bu6AnxcgkEwq.mjs +13466 -0
  147. package/build/node/esm/CfAob8gGydmX1xQu.mjs +16 -0
  148. package/build/node/esm/ChGigf2OPu7d44Km.mjs +16 -0
  149. package/build/node/esm/CkvkuPSf4R_DqArg.mjs +5648 -0
  150. package/build/node/esm/CnBMj0oJAyr9ZbjP.mjs +23 -0
  151. package/build/node/esm/CrEGjvQKhAcdw5sY.mjs +16 -0
  152. package/build/node/esm/Crx9i_8dm3OQsk_T.mjs +28 -0
  153. package/build/node/esm/CwUulbiMQH11aF4x.mjs +16 -0
  154. package/build/node/esm/D0Lh0V1tkdJPxZnI.mjs +392 -0
  155. package/build/node/esm/D54Fpmnd9MzCzp-Z.mjs +16 -0
  156. package/build/node/esm/D5bg3v_W8K9MVp0j.mjs +1711 -0
  157. package/build/node/esm/D8F08tiG98tM_voL.mjs +16 -0
  158. package/build/node/esm/DR7o1DOIK9zdiBgS.mjs +50 -0
  159. package/build/node/esm/DYEgm2kd3haV-Ml8.mjs +1246 -0
  160. package/build/node/esm/DfzhmhZ4I0Zurcqn.mjs +44 -0
  161. package/build/node/esm/Dg_ERnlsy5hwbzMA.mjs +1498 -0
  162. package/build/node/esm/Dt4cj_0sWgvt4FGj.mjs +92 -0
  163. package/build/node/esm/GpycqJcrwTRtjEqA.mjs +16 -0
  164. package/build/node/esm/LlkIFFfAjLiQ5Or6.mjs +3840 -0
  165. package/build/node/esm/OCdyQRicV8KxUwMt.mjs +16 -0
  166. package/build/node/esm/QATDL2FGAYcVnd33.mjs +49 -0
  167. package/build/node/esm/SvgA2TyqJYOzheuf.mjs +26 -0
  168. package/build/node/esm/VZ150KIUh5JVRqpk.mjs +52 -0
  169. package/build/node/esm/XRLHatWlgABiuBDS.mjs +52 -0
  170. package/build/node/esm/bFSkTthAEOn7gv5x.mjs +16 -0
  171. package/build/node/esm/index.mjs +44754 -0
  172. package/build/node/esm/lgtVRbg712G5Ba-x.mjs +60 -0
  173. package/build/node/esm/ng3JdG4_hi9SgtHk.mjs +16 -0
  174. package/build/node/esm/psav3cvsBQQczhPL.mjs +16 -0
  175. package/build/node/esm/zWnN2OzbhzCc6T7u.mjs +86 -0
  176. package/build/package.json +84 -0
  177. package/build/types/index.d.ts +1848 -0
  178. package/package.json +100 -0
@@ -0,0 +1,838 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.0.0
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ /**
8
+ * @license @sheetxl/sdk - A high-performance, embeddable spreadsheet engine. - v0.0.0
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ /**
14
+ * @license @sheetxl/scripting - SheetXL scripting utilities including TypeScript compilation. - v0.0.0
15
+ *
16
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
17
+ * License: The license can be found at https://www.sheetxl.com/license.
18
+ */
19
+ /**
20
+ * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.1.93
21
+ *
22
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
23
+ * License: The license can be found at https://www.sheetxl.com/license.
24
+ */
25
+ const h = "text/html", b = "text/plain", L = "image/png", Tt = Object.freeze({ left: 0, top: 0 }), Ct = Object.freeze({ left: 0, top: 0, bottom: 0, right: 0 }), Mt = Object.freeze({ x: 0, y: 0, width: 0, height: 0 });
26
+ Object.freeze(Object.defineProperty({ __proto__: null, EmptyBounds: Mt, EmptyRect: Ct, EmptyTopLeft: Tt }, Symbol.toStringTag, { value: "Module" }));
27
+ const m = "column", j = "row", Rt = Object.freeze({ colIndex: 0, rowIndex: 0 }), At = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), yt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, gt = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, Ft = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Lt = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, J = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, H = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, bt = (e = j, t = !1) => t ? e !== m ? Ft : Lt : e !== m ? gt : yt, K = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, D = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, $ = (e, t) => !(!e || !t || e.colStart > t.colEnd || t.colStart > e.colEnd || e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), Y = (e, t) => {
28
+ if (e === t) return !0;
29
+ if (!e || !t || e.length !== t.length) return !1;
30
+ for (let r = 0; r < e.length; r++) if (!D(e[r], t[r])) return !1;
31
+ return !0;
32
+ }, U = (e, t, r) => {
33
+ if (!e && !t) return null;
34
+ if (!e) return r ? t : { ...t };
35
+ if (!t) return r ? e : { ...e };
36
+ const n = Math.min(e.colStart, t.colStart), o = Math.min(e.rowStart, t.rowStart), a = Math.max(e.colEnd, t.colEnd), i = Math.max(e.rowEnd, t.rowEnd);
37
+ let l = r;
38
+ return l ? (l.colStart = n, l.rowStart = o, l.colEnd = a, l.rowEnd = i) : l = { colStart: n, rowStart: o, colEnd: a, rowEnd: i }, l;
39
+ }, Z = (e, t) => {
40
+ if (!t || t.length === 0) return e;
41
+ const r = { ...e };
42
+ for (let n = 0; n < t.length; n++) {
43
+ const o = t[n];
44
+ $(r, o) && (r.rowStart = Math.min(r.rowStart, o.rowStart), r.colStart = Math.min(r.colStart, o.colStart), r.rowEnd = Math.max(r.rowEnd, o.rowEnd), r.colEnd = Math.max(r.colEnd, o.colEnd));
45
+ }
46
+ return r;
47
+ }, Ut = [null, null], Pt = (e, t, r) => {
48
+ if (e[0].value === e[1].value) return t;
49
+ };
50
+ function X(e, t = 2, r, n = j, o) {
51
+ let a = [...e];
52
+ if (t <= 0 || e.length <= 1) return a;
53
+ let i = n === m, l = 0, s = !1;
54
+ do {
55
+ const c = a.sort(bt(i ? j : m));
56
+ a = [], a.push(c[0]);
57
+ const d = c.length;
58
+ let w = 0, u = c[0], f = u.colStart, p = u.rowStart, x = u.colEnd, _ = u.rowEnd;
59
+ for (let A = 1; A < d; A++) {
60
+ const g = c[A];
61
+ let G = !1;
62
+ if (G = i ? u && p === g.rowStart && _ === g.rowEnd && x + 1 === g.colStart : u && f === g.colStart && x === g.colEnd && _ + 1 === g.rowStart, G) {
63
+ let S = { colStart: f, rowStart: p, colEnd: i ? g.colEnd : x, rowEnd: i ? _ : g.rowEnd };
64
+ if (u.value !== void 0 && (S.value = u.value), r) {
65
+ const F = o ?? [null, null];
66
+ F[0] = u, F[1] = g, S = r(F, S, n);
67
+ }
68
+ if (S) {
69
+ a[w] = S, s = !0, u = S, f = u.colStart, p = u.rowStart, x = u.colEnd, _ = u.rowEnd;
70
+ continue;
71
+ }
72
+ }
73
+ a[++w] = g, u = g, f = u.colStart, p = u.rowStart, x = u.colEnd, _ = u.rowEnd;
74
+ }
75
+ l++, i = !i, l === 1 && (s = !0);
76
+ } while (l < t && s && a.length > 1);
77
+ return a;
78
+ }
79
+ Object.freeze(Object.defineProperty({ __proto__: null, EmptyCell: Rt, EmptyRange: At, cellToRange: (e, t) => {
80
+ if (!e) return null;
81
+ let r = t;
82
+ return r || (r = { ...e }, delete r.colIndex, delete r.rowIndex), r.colStart = e.colIndex ?? 0, r.rowStart = e.rowIndex ?? 0, r.colEnd = e.colIndex ?? 0, r.rowEnd = e.rowIndex ?? 0, r;
83
+ }, columnFirstCellComparator: J, columnFirstRangeComparator: yt, createCellComparator: (e = j, t = !1) => t ? e !== m ? (r, n) => r.rowIndex === n.rowIndex ? n.colIndex - r.colIndex : n.rowIndex - r.rowIndex : (r, n) => r.colIndex === n.colIndex ? n.rowIndex - r.rowIndex : n.colIndex - r.colIndex : e !== m ? H : J, createConflatingRanges: (e, t = !1) => {
84
+ const r = [];
85
+ let n, o, a = Number.MIN_SAFE_INTEGER, i = Number.MIN_SAFE_INTEGER;
86
+ return { append: (l, s, c) => {
87
+ let d = !0;
88
+ const w = c !== void 0;
89
+ if (w) {
90
+ const p = e ? e(o, c, t) : o === c ? c : void 0;
91
+ p === void 0 ? d = !1 : c = p;
92
+ }
93
+ if (d && s === i + 1 && l === a) return t ? n.rowEnd = s : n.colEnd = s, i = s, void (o = c);
94
+ n && r.push(n);
95
+ const u = t ? l : s, f = t ? s : l;
96
+ n = { colStart: u, rowStart: f, colEnd: u, rowEnd: f }, w && (n.value = c), a = l, i = s, o = c;
97
+ }, done: (l) => (n && (r.push(n), n = null), l ? X(r, 3, l === !0 ? Pt : l, t ? m : j, Ut) : r) };
98
+ }, createRangeComparator: bt, defaultRange: (e, t, r) => e ? r ? (r.colStart = e.colStart ?? t.colStart, r.rowStart = e.rowStart ?? t.rowStart, r.colEnd = e.colEnd ?? t.colEnd, r.rowEnd = e.rowEnd ?? t.rowEnd, r) : { colStart: e.colStart ?? t.colStart, rowStart: e.rowStart ?? t.rowStart, colEnd: e.colEnd ?? t.colEnd, rowEnd: e.rowEnd ?? t.rowEnd } : t, extendRangeToIntersectingRanges: Z, extendRangeToUnionRanges: (e, t) => {
99
+ if (!t || t.length === 0) return e;
100
+ let r = e, n = null;
101
+ for (; !D(r, n); ) n = r, r = Z(n, t);
102
+ return r;
103
+ }, indexOfCoords: (e, t) => {
104
+ const r = { colStart: e.colIndex, rowStart: e.rowIndex, colEnd: e.colIndex, rowEnd: e.rowIndex };
105
+ for (let n = t.length - 1; n >= 0; n--) if ($(r, t[n])) return n;
106
+ return -1;
107
+ }, intersectRanges: (e, t, r) => {
108
+ if (!e) return r ? t : { ...t };
109
+ if (!t) return r ? e : { ...e };
110
+ if (!e && !t || e.rowStart > t.rowEnd || e.rowEnd < t.rowStart || e.colStart > t.colEnd || e.colEnd < t.colStart) return null;
111
+ const n = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), a = Math.min(e.colEnd, t.colEnd), i = Math.min(e.rowEnd, t.rowEnd);
112
+ let l = r;
113
+ return l ? (l.colStart = n, l.rowStart = o, l.colEnd = a, l.rowEnd = i) : l = { colStart: n, rowStart: o, colEnd: a, rowEnd: i }, l;
114
+ }, isCellWithinRange: (e, t) => !(!e || !t || e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd || e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: K, isEqualRanges: D, isEqualRangesArrays: Y, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!K(e.cell, t.cell) && Y(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd || e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: $, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !(!e || typeof e.colStart != "number" || e.colStart < 0 || typeof e.colEnd != "number" || e.colEnd < e.colStart || typeof e.rowStart != "number" || e.rowStart < 0 || typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: X, rowFirstCellComparator: H, rowFirstRangeComparator: gt, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, r = -e.colStart, n) => n ? (n.colStart = e.colStart + r, n.rowStart = e.rowStart + t, n.colEnd = e.colEnd + r, n.rowEnd = e.rowEnd + t, n) : { colStart: e.colStart + r, rowStart: e.rowStart + t, colEnd: e.colEnd + r, rowEnd: e.rowEnd + t }, unionRanges: U, unionRangesArrays: (e, t, r) => {
115
+ if (!e || e.length === 0) return null;
116
+ if (e.length === 1 && !t) return e[0];
117
+ let n = e[0];
118
+ for (let o = 1; o < e.length; o++) n = U(n, e[o], r);
119
+ return t && (n = U(n, t, r)), n;
120
+ } }, Symbol.toStringTag, { value: "Module" }));
121
+ const kt = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.element") : 60103;
122
+ function Nt(e) {
123
+ return /* @__PURE__ */ function(t) {
124
+ return !!t && typeof t == "object";
125
+ }(e) && !function(t) {
126
+ const r = Object.prototype.toString.call(t);
127
+ return r === "[object RegExp]" || r === "[object Date]" || t.$$typeof === kt;
128
+ }(e);
129
+ }
130
+ function I(e, t) {
131
+ return t.clone !== !1 && t.isMergeableObject(e) ? E((r = e, Array.isArray(r) ? [] : {}), e, t) : e;
132
+ var r;
133
+ }
134
+ function Bt(e, t, r) {
135
+ return e.concat(t).map(function(n) {
136
+ return I(n, r);
137
+ });
138
+ }
139
+ function Q(e) {
140
+ return Object.keys(e).concat((t = e, Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {
141
+ return Object.propertyIsEnumerable.call(t, r);
142
+ }) : []));
143
+ var t;
144
+ }
145
+ function tt(e, t) {
146
+ try {
147
+ return t in e;
148
+ } catch {
149
+ return !1;
150
+ }
151
+ }
152
+ function E(e, t, r) {
153
+ (r = r || {}).arrayMerge = r.arrayMerge || Bt, r.isMergeableObject = r.isMergeableObject || Nt, r.cloneUnlessOtherwiseSpecified = I;
154
+ const n = Array.isArray(t);
155
+ return n === Array.isArray(e) ? n ? r.arrayMerge(e, t, r) : function(o, a, i) {
156
+ const l = {};
157
+ return i.isMergeableObject(o) && Q(o).forEach(function(s) {
158
+ l[s] = I(o[s], i);
159
+ }), Q(a).forEach(function(s) {
160
+ var c, d;
161
+ tt(c = o, d = s) && (!Object.hasOwnProperty.call(c, d) || !Object.propertyIsEnumerable.call(c, d)) || (tt(o, s) && i.isMergeableObject(a[s]) ? l[s] = function(w, u) {
162
+ if (!u.customMerge) return E;
163
+ const f = u.customMerge(w);
164
+ return typeof f == "function" ? f : E;
165
+ }(s, i)(o[s], a[s], i) : l[s] = I(a[s], i));
166
+ }), l;
167
+ }(e, t, r) : I(t, r);
168
+ }
169
+ E.all = function(e, t) {
170
+ if (!Array.isArray(e)) throw new Error("first argument should be an array");
171
+ return e.reduce(function(r, n) {
172
+ return E(r, n, t);
173
+ }, {});
174
+ };
175
+ const zt = Object.freeze([]), qt = Object.freeze({}), et = (e) => e, R = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
176
+ let t = 16 * Math.random() | 0;
177
+ return (e === "x" ? t : 3 & t | 8).toString(16);
178
+ }), mt = (e, t) => e === t || !(!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) && e.every((r, n) => r === t[n]), O = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, Et = (e) => typeof e != "object" || Array.isArray(e) || e === null ? e : (Object.keys(e).forEach(function(t) {
179
+ e[t] && typeof e[t] == "object" ? Et(e[t]) : e[t] !== null && e[t] !== void 0 || delete e[t], typeof e[t] == "object" && Object.keys(e[t]).length === 0 && delete e[t];
180
+ }), Object.keys(e).length === 0 ? null : e), Dt = (e, t) => !(e !== t && !mt(e, t) && !e.isEqual?.(t)), St = (e, t, r = Dt) => {
181
+ if (e == null || e === t) return null;
182
+ if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) return r(e, t) ? null : e;
183
+ const n = Object.keys(e);
184
+ if (n.length === 0) return null;
185
+ let o = !1;
186
+ for (let a = 0; a < n.length; a++) {
187
+ const i = n[a];
188
+ St(e[i], t?.[i], r) === null && (o = !0, delete e[i]);
189
+ }
190
+ return o && Object.keys(e).length === 0 ? null : void 0;
191
+ }, rt = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now(), nt = (e) => e == null, ot = (e, t) => !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top), at = !(typeof window > "u" || !window.document || !window.document.createElement), y = { Windows: "windows", MacOS: "macos", IOS: "ios", Linux: "linux", Android: "android", Safari: "safari", Firefox: "firefox", Node: "node", Unknown: "unknown" }, T = () => {
192
+ if (vt()) return y.Node;
193
+ const e = globalThis.navigator !== void 0 && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";
194
+ return e ? /(win32|win64|windows|wince)/i.test(e) ? y.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(e) ? y.MacOS : /(iphone|ipad|ipod)/i.test(e) ? y.IOS : /android/.test(e) ? y.Android : /linux/.test(e) ? y.Linux : /^((?!chrome|android|).)*safari/i.test(e) ? y.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(e) ? y.Firefox : y.Unknown : y.Unknown;
195
+ };
196
+ function vt() {
197
+ return typeof process < "u" && process.release?.name === "node" || (typeof process < "u" && process.browser, !1);
198
+ }
199
+ const it = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeElement || e?.contains(document.activeElement)), $t = Object.freeze(Object.defineProperty({ __proto__: null, EmptyArray: zt, EmptyObject: qt, OSType: y, arrayMove: function(e, t, r) {
200
+ const n = e.slice();
201
+ return n.splice(r < 0 ? n.length + r : r, 0, n.splice(t, 1)[0]), n;
202
+ }, asNumber: (e) => {
203
+ const t = 1 * e;
204
+ return Number.isFinite(t) ? t : 0;
205
+ }, camelToPrettyCase: (e) => e.length === 1 ? e.toUpperCase() : e.replace(/([A-Z])/g, " $1").replace(/^./, function(t) {
206
+ return t.toUpperCase();
207
+ }).trim(), canUseDOM: at, cancelTimeout: (e) => {
208
+ cancelAnimationFrame(e.id);
209
+ }, castToString: (e) => e == null || e === void 0 ? "" : typeof e != "string" ? "" + e : e, cloneObject: (e) => nt(e) ? e : JSON.parse(JSON.stringify(e)), consoleWithNoSource: (...e) => new Promise((t) => {
210
+ setTimeout(() => {
211
+ Function("console.log.apply(console, arguments)").apply(null, e), t();
212
+ });
213
+ }), debounce: function(e, t = 300, r = !1) {
214
+ let n, o, a, i, l = 0;
215
+ function s() {
216
+ let d = Date.now() - l;
217
+ d < t && d >= 0 ? n = setTimeout(s, t - d) : (n = null, r || (i = e.apply(a, o), a = o = null));
218
+ }
219
+ t == null && (t = 100);
220
+ const c = function() {
221
+ a = globalThis, o = arguments, l = Date.now();
222
+ var d = r && !n;
223
+ return n || (n = setTimeout(s, t)), d && (i = e.apply(a, o), a = o = null), i;
224
+ };
225
+ return c.clear = function() {
226
+ n && (clearTimeout(n), n = null);
227
+ }, c.flush = function() {
228
+ n && (i = e.apply(a, o), a = o = null, clearTimeout(n), n = null);
229
+ }, c;
230
+ }, deepEqual: function e(t, r) {
231
+ if (t === r) return !0;
232
+ if (t && r && typeof t == "object" && typeof r == "object") {
233
+ if (t.constructor !== r.constructor) return !1;
234
+ let n, o, a;
235
+ if (Array.isArray(t)) {
236
+ if (n = t.length, n != r.length) return !1;
237
+ for (o = n; o-- !== 0; ) if (!e(t[o], r[o])) return !1;
238
+ return !0;
239
+ }
240
+ if (t instanceof Map && r instanceof Map) {
241
+ if (t.size !== r.size) return !1;
242
+ for (o of t.entries()) if (!r.has(o[0])) return !1;
243
+ for (o of t.entries()) if (!e(o[1], r.get(o[0]))) return !1;
244
+ return !0;
245
+ }
246
+ if (t instanceof Set && r instanceof Set) {
247
+ if (t.size !== r.size) return !1;
248
+ for (o of t.entries()) if (!r.has(o[0])) return !1;
249
+ return !0;
250
+ }
251
+ if (ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {
252
+ if (n = t.length, n != r.length) return !1;
253
+ for (o = n; o-- !== 0; ) if (t[o] !== r[o]) return !1;
254
+ return !0;
255
+ }
256
+ if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;
257
+ if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();
258
+ if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();
259
+ if (a = Object.keys(t), n = a.length, n !== Object.keys(r).length) return !1;
260
+ for (o = n; o-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(r, a[o])) return !1;
261
+ for (o = n; o-- !== 0; ) {
262
+ let i = a[o];
263
+ if (!(i === "_owner" && t.$$typeof || e(t[i], r[i]))) return !1;
264
+ }
265
+ return !0;
266
+ }
267
+ return t != t && r != r;
268
+ }, deepFreeze: function e(t) {
269
+ return Object.freeze(t), Object.keys(t).forEach((r) => {
270
+ typeof t[r] != "object" || t[r] === null || Object.isFrozen(t[r]) || e(t[r]);
271
+ }), t;
272
+ }, deepMerge: E, diffValues: (e, t) => {
273
+ const r = {}, n = Object.keys(t), o = n.length;
274
+ for (let a = 0; a < o; a++) {
275
+ const i = n[a];
276
+ e[i] !== t[i] && (e[i] === void 0 ? r[i] = t[i] : r[i] = e[i]);
277
+ }
278
+ return Object.keys(r).length === 0 ? null : r;
279
+ }, findEqualOrGreater: function(e, t, r = et) {
280
+ let n = 0, o = e.length - 1;
281
+ for (; n <= o; ) {
282
+ let a = Math.floor((n + o) / 2), i = r(e[a]);
283
+ if (i === t) return a;
284
+ i < t ? n = a + 1 : o = a - 1;
285
+ }
286
+ return n;
287
+ }, findEqualOrLesser: function(e, t, r = et) {
288
+ let n = e.length - 1, o = 0;
289
+ for (; n >= o; ) {
290
+ let a = Math.floor((n + o) / 2), i = r(e[a]);
291
+ if (i === t) return a;
292
+ i > t ? n = a - 1 : o = a + 1;
293
+ }
294
+ return n;
295
+ }, findNextStep: (e, t = !0, r = 15, n = 10, o = 400) => {
296
+ const a = Math.max(e - n, 0) + (t ? 1 : -1);
297
+ return Math.min(o, Math[t ? "ceil" : "floor"](a / r) * r + n);
298
+ }, getBuildEnv: () => "browser2-build", getDPI: () => {
299
+ let e = 1;
300
+ return typeof window == "object" && (e = window.devicePixelRatio || 1), e;
301
+ }, getFromPath: (e, t) => {
302
+ const r = t.split(".");
303
+ let n = e;
304
+ for (let o = 0; o < r.length; o++) {
305
+ const a = r[o];
306
+ if (!n) return null;
307
+ let i = n[a];
308
+ if (typeof i == "function" && (i = i.bind(n)()), !i || !O(i)) return i;
309
+ n = i;
310
+ }
311
+ return n ?? null;
312
+ }, getOS: T, hasFocus: it, isDefined: (e) => e != null, isEmpty: (e) => e == null || e === "", isEqualArrays: mt, isEqualBounds: (e, t) => e === t || !(e && !t || t && !e) && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, isEqualObjectKeys: (e, t) => {
313
+ if (e === t) return !0;
314
+ if (e && !t || t && !e) return !1;
315
+ const r = Object.keys(e);
316
+ if (r.length !== Object.keys(t).length) return !1;
317
+ for (let n = 0; n < r.length; n++) if (e[r[n]] !== t[r[n]]) return !1;
318
+ return !0;
319
+ }, isNode: vt, isNullOrUndefined: nt, isNumeric: (e) => {
320
+ const t = 1 * e;
321
+ return Number.isFinite(t) && typeof t == "number";
322
+ }, isObject: O, isPromiseLike: (e) => !!e && typeof e.then == "function", isRectInsideRect: (e, t) => e.top >= t.top && e.bottom <= t.bottom && e.left >= t.left && e.right <= t.right, isRectIntersect: ot, mergeContentful: (...e) => {
323
+ const t = e.length;
324
+ if (t > 0 && e[t - 1] !== void 0 && !O(e[t - 1])) return e[t - 1];
325
+ let r = e[0] || {};
326
+ for (let n = 1; n < t; n++) r = E(r, e[n] || {}, { arrayMerge: (o, a) => [...a] });
327
+ return r;
328
+ }, nextTick: (e) => {
329
+ typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => {
330
+ e();
331
+ }) : (typeof setImmediate == "function" ? setImmediate : setTimeout)(() => {
332
+ e();
333
+ });
334
+ }, openFileDialog: (e = "*.*") => new Promise((t, r) => {
335
+ if (!at) return void r("Unable to open dialog with no dom.");
336
+ const n = document.createElement("input");
337
+ n.type = "file", n.accept = e;
338
+ let o = null, a = !1;
339
+ globalThis.addEventListener?.("focus", () => {
340
+ setTimeout(() => {
341
+ o || a || (a = !0, t(null));
342
+ }, 1e3);
343
+ }, { once: !0, passive: !0 }), n.onchange = () => {
344
+ if (o = n.files[0], o) {
345
+ if (a) return void console.warn("File open detected after faux cancel.", o);
346
+ t(o);
347
+ }
348
+ }, n.autofocus = !0, n.click();
349
+ }), rafThrottle: (e) => {
350
+ let t, r = !1, n = function() {
351
+ r = !1, e(t);
352
+ };
353
+ return function(o) {
354
+ t = o, t && t.persist && t.persist(), r || (r = !0, requestAnimationFrame(n));
355
+ };
356
+ }, removeEmptyProperties: Et, removeEqualValues: St, removeListenerAll: (e) => {
357
+ if (!e) return [];
358
+ for (let t = 0; t < e.length; t++) e[t] && e[t]();
359
+ return [];
360
+ }, requestTimeout: (e, t) => {
361
+ const r = rt(), n = { id: requestAnimationFrame(function o() {
362
+ rt() - r >= t ? e.call(null) : n.id = requestAnimationFrame(o);
363
+ }) };
364
+ return n;
365
+ }, roundAccurately: (e, t = 0) => {
366
+ if (e == null || !isFinite(e)) return null;
367
+ const r = 10 ** t;
368
+ return Number(Math.round(e * r) / r);
369
+ }, setToPath: (e, t, r) => {
370
+ const n = t.split(".");
371
+ let o = e;
372
+ if (!o) throw new Error("Can not set path to a null path.");
373
+ for (let a = 0; o && a < n.length - 1; a++) {
374
+ const i = n[a];
375
+ let l = o[i];
376
+ if (l == null && (l = {}, o[i] = l), !O(l)) throw new Error("Can not set path to a non object path.");
377
+ o = l;
378
+ }
379
+ if (typeof r != "number" && typeof r != "boolean" && typeof r != "string" && !O(r)) throw new Error(`Can not set path to ${r} that is not a a supported primitive.`);
380
+ return o[n[n.length - 1]] = r, e;
381
+ }, splitNumber: (e) => {
382
+ let t = Math.abs(e);
383
+ if (isNaN(t) || !isFinite(e)) return null;
384
+ let r = 0 | t, n = t - r, o = 0, a = 0, i = 1;
385
+ if (n > 5e-8) for (; a < 8 && Math.abs(o / i - n) > 5e-8; ) a++, i *= 10, o = Math.round(n * i);
386
+ return { ip: Math.trunc(e), fp: o, ipLength: Math.ceil(Math.log10(r + 1)), fpLength: a };
387
+ }, subtractRect: (e, t, r = !1) => {
388
+ if (!t) return [e];
389
+ if (!ot(e, t)) return [];
390
+ const n = [];
391
+ let o = e;
392
+ const a = () => {
393
+ t.top > o.top && t.top < o.bottom && (n.push({ ...o, bottom: t.top }), o = { ...o, top: t.top });
394
+ }, i = () => {
395
+ t.bottom > o.top && t.bottom < o.bottom && (n.push({ ...o, top: t.bottom }), o = { ...o, bottom: t.bottom });
396
+ }, l = () => {
397
+ t.right > o.left && t.right < o.right && (n.push({ ...o, left: t.right }), o = { ...o, right: t.right });
398
+ }, s = () => {
399
+ t.left > o.left && t.left < o.right && (n.push({ ...o, right: t.left }), o = { ...o, left: t.left });
400
+ };
401
+ return r ? (s(), l(), a(), i()) : (a(), i(), l(), s()), n;
402
+ }, textToKey: (e) => e.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(), throttle: function(e, t) {
403
+ let r = null;
404
+ return (...n) => {
405
+ const o = Date.now();
406
+ (!r || o - r >= t) && (r = o, e(...n));
407
+ };
408
+ }, toSafeJSON: function e(t) {
409
+ if (t === null || typeof t != "object") return t;
410
+ if (typeof t.toJSON == "function") return t.toJSON();
411
+ if (Array.isArray(t)) return t.map((n) => e(n));
412
+ if (typeof t.toString == "function" && t.toString !== Object.prototype.toString) return t.toString();
413
+ const r = {};
414
+ for (const n in t) t.hasOwnProperty(n) && (r[n] = e(t[n]));
415
+ return r;
416
+ }, transpose: (e) => {
417
+ if (!e) return e;
418
+ const t = e.length, r = e[0].length, n = [];
419
+ for (let o = 0; o < r; o++) n[o] = Array(t);
420
+ for (let o = 0; o < t; o++) for (let a = 0; a < r; a++) n[a][o] = e[o][a];
421
+ return n;
422
+ }, uuidV4: R, validEnumValue: (e, t) => {
423
+ if (!Object.values(e).includes(t)) throw new Error(`Invalid type: ${t ?? "null"}. Must be one of: ${Object.values(t).join(", ")}.`);
424
+ }, whenFocus: async (e, t = !1) => new Promise((r) => {
425
+ it(e, t) ? r(!0) : e.addEventListener("focusin", () => {
426
+ r(!0);
427
+ }, { once: !0 }), e.focus();
428
+ }) }, Symbol.toStringTag, { value: "Module" }));
429
+ Object.freeze(Object.defineProperty({ __proto__: null, MESSAGE_ERROR_INVALID_ARG: (e) => `Invalid argument: '${e}'.` }, Symbol.toStringTag, { value: "Module" }));
430
+ const xt = (e) => {
431
+ const t = new Uint8Array(e), r = t.byteLength;
432
+ let n = "";
433
+ for (let o = 0; o < r; o++) n += String.fromCharCode(t[o]);
434
+ if (typeof window < "u" && typeof globalThis.btoa == "function") return globalThis.btoa(n);
435
+ if (typeof Buffer < "u") return Buffer.from(n, "binary").toString("base64");
436
+ throw new Error("Unsupported environment");
437
+ }, W = (e) => new Promise((t, r) => {
438
+ if (e) if (typeof FileReader < "u") {
439
+ const n = new FileReader();
440
+ n.onload = () => {
441
+ t(n.result);
442
+ }, n.onerror = () => {
443
+ r(n.error);
444
+ }, n.readAsText(e);
445
+ } else if (typeof Buffer < "u") {
446
+ const n = (o) => Buffer.from(o).toString("utf-8");
447
+ e.arrayBuffer().then((o) => {
448
+ t(n(o));
449
+ }).catch((o) => {
450
+ r(o);
451
+ });
452
+ } else r(new Error("Unsupported environment"));
453
+ else t("");
454
+ });
455
+ Object.freeze(Object.defineProperty({ __proto__: null, DEFAULT_MIME_TYPE: "*/*", arrayBufferToBase64: xt, base64ToArrayBuffer: (e) => {
456
+ const t = typeof window < "u" && typeof globalThis.atob == "function" ? globalThis.atob(e) : Buffer.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);
457
+ for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);
458
+ return n.buffer;
459
+ }, blobToString: W }, Symbol.toStringTag, { value: "Module" }));
460
+ const _t = "data:image/png;base64,", Ot = "Unable to resolve image.", lt = (e) => new Promise(async (t, r) => {
461
+ let n = null;
462
+ try {
463
+ n = new Image(), n.src = e, n.addEventListener("load", function() {
464
+ t({ width: n.naturalWidth, height: n.naturalHeight });
465
+ }, { once: !0 }), n.addEventListener("error", function() {
466
+ URL.revokeObjectURL(e), r("Invalid Image");
467
+ }, { once: !0 }), await n.decode("sync");
468
+ } catch {
469
+ n?.src && URL.revokeObjectURL(n.src);
470
+ }
471
+ n || r(Ot);
472
+ }), P = "image/svg+xml";
473
+ var st, ct;
474
+ Object.freeze(Object.defineProperty({ __proto__: null, DATA_URL_PNG_PREFIX: _t, getImageDataUrl: (e, t = 1) => new Promise(async (r, n) => {
475
+ let o = null;
476
+ try {
477
+ o = new Image(), o.src = e, o.addEventListener("load", function() {
478
+ try {
479
+ const a = document.createElement("canvas");
480
+ a.width = o.naturalWidth, a.height = o.naturalHeight, a.getContext("2d").drawImage(o, 0, 0);
481
+ const i = a.toDataURL("image/png", t);
482
+ r({ elemImg: o, dataUrl: i });
483
+ } catch (a) {
484
+ URL.revokeObjectURL(e), n(a);
485
+ }
486
+ }, { once: !0 }), o.addEventListener("error", function() {
487
+ URL.revokeObjectURL(e), n("Invalid Image");
488
+ }, { once: !0 }), await o.decode("sync");
489
+ } catch {
490
+ o?.src && URL.revokeObjectURL(o.src);
491
+ }
492
+ o || n(Ot);
493
+ }), loadImageDetails: async (e, t = null) => {
494
+ let r = null;
495
+ const n = async () => {
496
+ try {
497
+ const a = t ?? "image/*", i = URL.createObjectURL(new Blob([e], { type: a })), l = await lt(i);
498
+ r = { mimeType: a, naturalDimensions: l, asUrl: i };
499
+ } catch {
500
+ }
501
+ }, o = async () => {
502
+ try {
503
+ const a = new TextDecoder().decode(e), i = URL.createObjectURL(new Blob([a], { type: P })), l = await lt(i);
504
+ r = { mimeType: t ?? P, naturalDimensions: l, asUrl: i, asSVGText: a };
505
+ } catch {
506
+ }
507
+ };
508
+ if (t === P ? await o() : t.startsWith("image/") ? await n() : (await n(), r || await o()), !r) throw new Error("Failed to load image");
509
+ return r;
510
+ } }, Symbol.toStringTag, { value: "Module" })), (ct = st || (st = {})).resolveTypedUpdates = (e, t, r, n) => {
511
+ if (e === null) return e;
512
+ if (e === void 0) return n;
513
+ let o = e;
514
+ if (t?.shorthand) {
515
+ const s = t?.shorthand(e, r);
516
+ s !== void 0 && (o = s);
517
+ }
518
+ if (o !== null && t?.getSubType) {
519
+ const s = t.getSubType(o);
520
+ s && (t = s);
521
+ }
522
+ const a = t?.properties, i = t?.arrayType ?? !1;
523
+ let l = o;
524
+ if (t && t.merge && l && n) l = t.merge(l, n, r);
525
+ else if (!i && a) {
526
+ const s = Object.keys({ ...o, ...n });
527
+ l = null;
528
+ for (let c = 0; c < s.length; c++) {
529
+ const d = s[c];
530
+ let w, u = o[d];
531
+ if (u !== void 0) {
532
+ const f = a[d];
533
+ w = f ? (0, ct.resolveTypedUpdates)(u, f, r, n?.[d]) : u;
534
+ } else w = n?.[d];
535
+ w != null && (l = l ?? {}, l[d] = w);
536
+ }
537
+ }
538
+ return l;
539
+ };
540
+ const ut = `The Safari browser does not support advanced copy and paste.
541
+ Copy and paste will be limited to within the browser tab.
542
+
543
+ Please use Chrome or Edge if external copy and paste is required.`, k = `You do not have permissions to access the clipboard.
544
+ All copy and paste operations will be limited to the browser tab.`, It = { Safari: `The Safari browser does not support advanced copy and paste.
545
+ Copy and paste will be limited to within the browser tab.
546
+
547
+ Please use Chrome or Edge if external copy and paste is required.`, Perms: k, PermsWrite: T() === y.Safari ? ut : k, PermsRead: T() === y.Safari ? ut : k }, N = async () => new Promise((e) => {
548
+ document.hasFocus() ? e() : globalThis.addEventListener?.("focus", () => {
549
+ e();
550
+ }, { once: !0 }), document.activeElement.focus?.();
551
+ }), B = async (e, t, r) => {
552
+ if (T() === y.Safari) return await r(new Error(It.Safari));
553
+ try {
554
+ const n = async (i) => {
555
+ try {
556
+ return await i();
557
+ } catch (l) {
558
+ if (l.message?.includes("Document is not focused")) return !1;
559
+ throw l;
560
+ }
561
+ }, o = await globalThis?.navigator?.permissions?.query({ name: e, allowWithoutGesture: !0, allowWithoutSanitization: !0 });
562
+ let a = !1;
563
+ if (o.state === "prompt" && (a = await n(t)), a || o.state !== "granted" || (a = await t()), !a) return await r(new Error(o.state));
564
+ } catch (n) {
565
+ return n.message === "No valid data on clipboard" || n.name === "DataError" ? void 0 : await r(n);
566
+ }
567
+ }, jt = async (e) => {
568
+ try {
569
+ return await e.read({ unsanitized: [h] });
570
+ } catch {
571
+ }
572
+ return await e.read();
573
+ };
574
+ if (!globalThis.ClipboardItem) {
575
+ const e = (r, n) => new Blob([n], { type: r });
576
+ class t {
577
+ constructor(n, o) {
578
+ this._items = {}, this._types = Object.keys(n);
579
+ const a = {}, i = Object.keys(n);
580
+ for (let l = 0; l < i.length; l++) {
581
+ const s = i[l];
582
+ let c = n[s];
583
+ a[s] = typeof c == "string" ? e(s, c) : c;
584
+ }
585
+ this._items = a, this._presentationStyle = o?.presentationStyle ?? "unspecified";
586
+ }
587
+ get types() {
588
+ return this._types;
589
+ }
590
+ getType(n) {
591
+ return Promise.resolve(this._items[n]);
592
+ }
593
+ supports(n) {
594
+ return !0;
595
+ }
596
+ }
597
+ globalThis.ClipboardItem = t;
598
+ }
599
+ const V = async (e, t = h) => new Promise(async (r, n) => {
600
+ try {
601
+ const o = await (async (a, i) => {
602
+ if (!a) return null;
603
+ const l = await jt(a);
604
+ let s = !1;
605
+ for (let c = 0; !s && l && c < l.length; c++) if (s = l[c].types.includes(i), s) return await l[c].getType(i);
606
+ return s ? void 0 : null;
607
+ })(e, t);
608
+ if (o) {
609
+ const a = new FileReader();
610
+ a.onload = () => {
611
+ r(a.result);
612
+ }, a.onerror = () => {
613
+ r("");
614
+ }, a.readAsText(o);
615
+ } else r("");
616
+ } catch (o) {
617
+ n(o);
618
+ }
619
+ }), dt = async (e, t = h) => {
620
+ const r = await V(e, t);
621
+ if (!r) return null;
622
+ let n = null;
623
+ try {
624
+ n = new DOMParser().parseFromString(r, h);
625
+ } catch {
626
+ console.warn("Can't parse html from clipboard.");
627
+ }
628
+ return n;
629
+ }, C = "clipboard-uuid", v = "web text/uuid", ft = (e) => `<div style="display:none" ${C}="${e}"/>`, Wt = (e, t) => {
630
+ let r = null;
631
+ try {
632
+ const n = new DOMParser().parseFromString(t, h);
633
+ n.body.firstElementChild.setAttribute(C, e), r = n.getElementsByTagName("body")[0].innerHTML;
634
+ } catch (n) {
635
+ console.warn("Can't embed uuid.", n);
636
+ }
637
+ return r;
638
+ }, pt = (e, t) => {
639
+ if (!t || !e) return !1;
640
+ try {
641
+ const r = t.querySelectorAll(`[${C}="${e}"]`);
642
+ if (r && r.length === 1) return !0;
643
+ if (t.querySelector("parsererror")) throw new Error("We are unable to parse node");
644
+ return !1;
645
+ } catch {
646
+ return !1;
647
+ }
648
+ };
649
+ class wt {
650
+ constructor(t) {
651
+ if (t?.nativeClipboard === void 0 || t?.nativeClipboard === !0) try {
652
+ this._nativeClipboard = globalThis?.navigator.clipboard;
653
+ } catch {
654
+ t?.nativeClipboard === !0 && console.warn("NativeClipboard option set to true but no native clipboard available.");
655
+ }
656
+ else this._nativeClipboard = t?.nativeClipboard === !1 ? null : t?.nativeClipboard;
657
+ this._disableCheckOnFocus = t?.disableCheckOnFocus ?? !1, this._init();
658
+ }
659
+ async _checkForChanges() {
660
+ this._nativeClipboard && this._state && !this._disableCheckOnFocus && await B("clipboard-read", async () => {
661
+ await N();
662
+ const t = await V(this._nativeClipboard, v);
663
+ if (!this._state || t && t === this._state.uuid) return !0;
664
+ const r = await dt(this._nativeClipboard, h);
665
+ return !this._state || (pt(this._state.uuid, r) || this.clear(), !0);
666
+ }, async (t) => {
667
+ t?.message === "denied" || t.message?.includes("Document is not focused") || T() === y.Safari || console.warn("Unable to detect clipboard changes: ", t);
668
+ });
669
+ }
670
+ _init() {
671
+ const t = this;
672
+ this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {
673
+ t._checkForChanges();
674
+ }, this._onBlur = () => {
675
+ globalThis.addEventListener?.("focus", t._onFocus, { once: !0 });
676
+ }, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (r) => {
677
+ t._checkForChanges();
678
+ }));
679
+ }
680
+ async read() {
681
+ if (!this._nativeClipboard) return this._state?.items ?? null;
682
+ const t = this;
683
+ return await B("clipboard-read", async () => {
684
+ if (await N(), this._state?.uuid) {
685
+ const r = await V(this._nativeClipboard, v);
686
+ if (r && r === t._state.uuid) return !0;
687
+ const n = await dt(this._nativeClipboard, h);
688
+ if (pt(t._state?.uuid, n)) return !0;
689
+ }
690
+ return t._state = { items: await jt(this._nativeClipboard), uuid: null, ref: null }, this.dispatchEvent(new Event("clipboardread")), !0;
691
+ }, async (r) => {
692
+ this.dispatchEvent(new Event("clipboarderrorread"));
693
+ }), this._state?.items ?? [];
694
+ }
695
+ async write(t) {
696
+ return this._write({ uuid: R(), items: t, ref: null });
697
+ }
698
+ async _write(t) {
699
+ if (!this._nativeClipboard) return this._state = t, this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")), null;
700
+ const r = this, n = [], o = t.uuid;
701
+ let a = t.items ?? [];
702
+ const i = () => {
703
+ r._state = { uuid: o, ref: t.ref, items: n }, r.dispatchEvent(new Event("clipboardwrite")), r.dispatchEvent(new Event("clipboardchange"));
704
+ };
705
+ await B("clipboard-write", async () => {
706
+ await N(), o && a.length === 0 && (a.push(new ClipboardItem({ [v]: new Blob([o], { type: v }) })), a.push(new ClipboardItem({ [h]: new Blob([ft(o)], { type: h }) })));
707
+ for (let l = 0; l < Math.min(1, a.length); l++) {
708
+ const s = a[l];
709
+ let c = s.types.indexOf(h), d = null;
710
+ if (c !== -1) {
711
+ const f = await s.getType(h);
712
+ d = await W(f), d && (d = Wt(o, d));
713
+ }
714
+ if (!d && s.types.includes(b)) {
715
+ const f = await s.getType(b);
716
+ if (f) {
717
+ let p = null;
718
+ typeof f == "string" ? (console.warn("text as string", f), p = f) : p = await W(f), p && (d = `<div ${C}="${o}">${p}</div>`);
719
+ }
720
+ }
721
+ if (!d && s.types.includes(L)) {
722
+ const f = await s.getType(L), p = xt(await f.arrayBuffer());
723
+ d = `<div ${C}="${o}"><img src="${_t + p}"/></div>`;
724
+ }
725
+ !d && o && (d = ft(o));
726
+ const w = new Blob([d ?? ""], { type: h }), u = {};
727
+ for (let f = 0; f < s.types.length; f++) {
728
+ const p = s.types[f];
729
+ u[p] = f === c ? w : s.getType(p);
730
+ }
731
+ d && c === -1 && (u[h] = w), o && (u[v] = new Blob([o], { type: v })), n.push(new ClipboardItem(u));
732
+ }
733
+ try {
734
+ n && n.length !== 0 ? await this._nativeClipboard.write(n) : await (async (l) => {
735
+ l && await l.writeText("");
736
+ })(this._nativeClipboard);
737
+ } catch (l) {
738
+ l.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", l);
739
+ }
740
+ return i(), !0;
741
+ }, async (l) => {
742
+ this.dispatchEvent(new Event("clipboarderrorwrite")), i();
743
+ });
744
+ }
745
+ async writeReference(t) {
746
+ if (!t) return void this.clear();
747
+ let r = null;
748
+ const n = {};
749
+ try {
750
+ const a = await t.toText?.() ?? null;
751
+ a && (n[b] = new Blob([a ?? ""], { type: b }));
752
+ } catch (a) {
753
+ r = a;
754
+ }
755
+ try {
756
+ const a = await t.toHtml?.() ?? null;
757
+ a && (n[h] = new Blob([a], { type: h }));
758
+ } catch (a) {
759
+ r = a, console.warn("export to html", a);
760
+ }
761
+ try {
762
+ const a = await t.toImage?.() ?? null;
763
+ a && (n[L] = a);
764
+ } catch (a) {
765
+ r = a, console.warn("export to png", a);
766
+ }
767
+ const o = this._write({ uuid: R(), ref: t, items: Object.keys(n).length > 0 ? [new ClipboardItem(n)] : null });
768
+ if (r) throw r;
769
+ return o;
770
+ }
771
+ clear(t = !1) {
772
+ this._state && (this._state = null, t && this._write({ uuid: null, ref: null, items: null }), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));
773
+ }
774
+ async readReference() {
775
+ return await this.read(), this._state?.ref ?? null;
776
+ }
777
+ readText() {
778
+ return new Promise(async (t, r) => {
779
+ const n = await this.read();
780
+ let o = null;
781
+ for (let i = 0; !o && n && i < n.length; i++) n[i].types.includes(b) && (o = await n[i].getType(b));
782
+ if (!o) return void t("");
783
+ const a = new FileReader();
784
+ a.onload = () => {
785
+ t(a.result);
786
+ }, a.readAsText(o), a.onerror = (i) => {
787
+ r(i);
788
+ };
789
+ });
790
+ }
791
+ async writeText(t) {
792
+ const r = [new ClipboardItem({ [b]: new Blob([t], { type: b }) })];
793
+ return this._write({ uuid: R(), items: r, ref: null });
794
+ }
795
+ addEventListener(t, r, n = {}) {
796
+ const o = n?.capture ? this._listenersCapture : this._listeners;
797
+ let a = o.get(t);
798
+ a || (a = /* @__PURE__ */ new Map(), o.set(t, a)), a.set(r, typeof n == "boolean" ? {} : n);
799
+ }
800
+ dispatchEvent(t) {
801
+ if (!t) return;
802
+ const r = (n) => {
803
+ const o = n.get(t.type);
804
+ o && o.forEach((a, i) => {
805
+ try {
806
+ typeof i == "function" ? i(t) : i.handleEvent && i.handleEvent(t), a.once && o.delete(i);
807
+ } catch (l) {
808
+ console.warn(l);
809
+ }
810
+ });
811
+ };
812
+ return r(this._listenersCapture), r(this._listeners), !0;
813
+ }
814
+ removeEventListener(t, r, n) {
815
+ const o = n?.capture ? this._listenersCapture : this._listeners, a = o.get(t);
816
+ a && (a.delete(r), a.size === 0 && o.delete(t));
817
+ }
818
+ close() {
819
+ globalThis.removeEventListener?.("focus", this._onFocus), globalThis.removeEventListener?.("blur", this._onBlur);
820
+ }
821
+ }
822
+ var z;
823
+ (z = wt || (wt = {})).ErrorMessages = It, z.Global = new z();
824
+ let ht = null, q = null, M = null;
825
+ const Vt = Object.freeze({ compileTypescript: async function(e) {
826
+ if (!e?.source) return null;
827
+ if (q && $t.deepEqual(q, e)) return ht;
828
+ const t = await async function() {
829
+ if (M) return M;
830
+ const { TypeScriptCompiler: n } = await import("./D0oVDcgRUMZ9MHzu.mjs");
831
+ return M = new n(), M;
832
+ }(), r = await t.compileModule(e);
833
+ return ht = r, q = e, r;
834
+ } }), Gt = Object.freeze(Object.defineProperty({ __proto__: null, ScriptingUtils: Vt }, Symbol.toStringTag, { value: "Module" }));
835
+ export {
836
+ $t as $,
837
+ Gt as i
838
+ };