@sheetxl/studio-vanilla 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/LICENSE.md +11 -11
  2. package/README.md +97 -97
  3. package/browser/cjs/0dkhOl0ItVZXnHg_.cjs +6 -0
  4. package/browser/cjs/{8Y7hlPEOJeSakYCm.cjs → 46C8cTP5D1fDfsPs.cjs} +1 -1
  5. package/browser/cjs/{C_-gd03rNpCoIWh3.cjs → 7Xjct_4bBSU-vad1.cjs} +1 -1
  6. package/browser/cjs/{Dn1uL0GqyDGo3d67.cjs → B2kFbeodTh3Gk-aQ.cjs} +2 -2
  7. package/browser/cjs/B5UGK4AzAC9SjXJp.cjs +6 -0
  8. package/browser/cjs/{DjmqyErluCMLOjsF.cjs → B9kurj8mOePUlJX2.cjs} +1 -1
  9. package/browser/cjs/{DlAB_CcYmXk8tpYL.cjs → BB5pxJh1jhHsvVZ1.cjs} +1 -1
  10. package/browser/cjs/{BPbd8bf2gOPV7ZtV.cjs → BDACVe5nzEmYknRm.cjs} +8 -8
  11. package/browser/cjs/{CpPLkq1qYpELtBVb.cjs → BDmE5OFneHwyeeiD.cjs} +4 -4
  12. package/browser/cjs/{CkboN9PqhMP8gVUO.cjs → BG8OR9VWCkyIRwrw.cjs} +1 -1
  13. package/browser/cjs/BML8p6hKVpqMb-13.cjs +124 -0
  14. package/browser/cjs/{Bx6ZuxKkOWgx7s9X.cjs → BTgA_stiR3dZAHop.cjs} +2 -2
  15. package/browser/cjs/BeGusiaaShhfh7Ch.cjs +7 -0
  16. package/browser/cjs/{CFRAYmx7O_QuuqLm.cjs → BgJ-surJf8jSxqmk.cjs} +1 -1
  17. package/browser/cjs/{BivyzwRCqS37kNIh.cjs → BgJFVvwpAWB3ssLE.cjs} +1 -1
  18. package/browser/cjs/{Bb4zRbBuFZbbsMgv.cjs → Bi8tk3LAhLkM7IXm.cjs} +1 -1
  19. package/browser/cjs/{B5XBWUdLMqS2HDaF.cjs → BlYpCVX1NOGpcNB6.cjs} +3 -3
  20. package/browser/cjs/BnZdvx8z2BIDZv9J.cjs +355 -0
  21. package/browser/cjs/{C4Far2itXrJ3DMOt.cjs → BvnUfF0WlIXumm-E.cjs} +1 -1
  22. package/browser/cjs/{Cx2rTk-O7yQO7-q6.cjs → BwGs6fp9j-iFwDlB.cjs} +4 -4
  23. package/browser/cjs/{CDh1V-eGnwm_zj2N.cjs → C4JyilwtB4aWsWnG.cjs} +1 -1
  24. package/browser/cjs/{DCe0ifxJ2waXgr0H.cjs → C8PUqW17bEbzJthE.cjs} +1 -1
  25. package/browser/cjs/CBTWDt8vxgXfkDfh.cjs +6 -0
  26. package/browser/cjs/{DZ3gARHylllIcJDT.cjs → CJ29qM66PMBNE3G9.cjs} +1 -1
  27. package/browser/cjs/CKtzkomrFnDVY5SY.cjs +11 -0
  28. package/browser/cjs/{CiCnx8sUQcc8athi.cjs → CLarA_vLTlgU3TCF.cjs} +2 -2
  29. package/browser/cjs/{BcapKXhCmLNJmfsN.cjs → CN8Y9NZjRCPl8CqY.cjs} +1 -1
  30. package/browser/cjs/{CLT2qTd_lmEX24Wq.cjs → CNIPdrSO6Xr2gkt9.cjs} +1 -1
  31. package/browser/cjs/CNkEdWYoHRiw_Uez.cjs +6 -0
  32. package/browser/cjs/{DbdPbW-LrAm6toaO.cjs → CPFRW8nnIVWYeQYn.cjs} +6 -6
  33. package/browser/cjs/{DV0r3gTeA-w2Q6Jx.cjs → CZih4fqvAIVbCVO4.cjs} +1 -1
  34. package/browser/cjs/{DRvH_199sgRclUKY.cjs → CdVKz1bz20BYztuB.cjs} +1 -1
  35. package/browser/cjs/{DE3aCIXAZL7uLX0k.cjs → CpPM7Ir1EZB_8bER.cjs} +1 -1
  36. package/browser/cjs/{INcIs0jpLlM3mm-H.cjs → CuldnUeQxpcu8oJ7.cjs} +1 -1
  37. package/browser/cjs/{DyS1Kn_U7Em83Hsq.cjs → Cx3wCYZR6BKbOtgk.cjs} +1 -1
  38. package/browser/cjs/{DciSg5hoXxvfqoKC.cjs → Cx8xafhEESu639Ig.cjs} +1 -1
  39. package/browser/cjs/{BZWVOs1oqYkcQagx.cjs → CzqzVoUeKxH16SDC.cjs} +2 -2
  40. package/browser/cjs/{Cx39LdblHkleUMb1.cjs → D-GDPxpVRx45cdpQ.cjs} +1 -1
  41. package/browser/cjs/{Do_T0KvdhyBUnWx_.cjs → D-I49Eh-SQg7zJYX.cjs} +1 -1
  42. package/browser/cjs/{Dn4RfIZ9VHwQ7Eex.cjs → D50Wzp-4UIlO9uVc.cjs} +1 -1
  43. package/browser/cjs/{DvtlLY8kPVwL4sgA.cjs → DB9rOzEP0g0ZGfBj.cjs} +1 -1
  44. package/browser/cjs/{Boig6aZA2-R5_w21.cjs → DD0VHDU8F1FiLKcs.cjs} +1 -1
  45. package/browser/cjs/{CwhdUCDaoLQGcvJy.cjs → DIeyUTfGkxwK6bdT.cjs} +6 -6
  46. package/browser/cjs/{BDItG-Ctn9btjJYc.cjs → DX_oDw_K4CB6Ej9i.cjs} +1 -1
  47. package/browser/cjs/DcNRcLtSOkHAK_Mt.cjs +6 -0
  48. package/browser/cjs/Df8ZAsCgZ69F33-C.cjs +6 -0
  49. package/browser/cjs/{Bwi2m9xG4JvXPBHQ.cjs → DfCiN8VOEQt4cw-x.cjs} +2 -2
  50. package/browser/cjs/{BMBMwGW_zSiAe-XN.cjs → DnkG5azaxDtt-73G.cjs} +1 -1
  51. package/browser/cjs/{DDvILQ7_cSgi8K6F.cjs → Dr_HVAdkD1bM9yrW.cjs} +1 -1
  52. package/browser/cjs/{D4HABltWISUjVaOO.cjs → DzE824T4cXRcKowY.cjs} +1 -1
  53. package/browser/cjs/{Dn6LoJinxzxUiMDg.cjs → KbKjJCMErVEwKqoi.cjs} +2 -2
  54. package/browser/cjs/{YHVbESGX6phJX20u.cjs → Px_DbuQFWhjhPilq.cjs} +1 -1
  55. package/browser/cjs/{CDt2itaEJHdgdMf7.cjs → VmYEO_-N9Cn7JpZN.cjs} +1 -1
  56. package/browser/cjs/{ZWsbkG6eb6seSRXv.cjs → WPXWuf9j-uwazW31.cjs} +2 -2
  57. package/browser/cjs/{CkOqLhMfOSUO6hZc.cjs → c4HmqMqg3ugRd4gl.cjs} +4 -4
  58. package/browser/cjs/index.cjs +2 -2
  59. package/browser/cjs/{DWoR03zqV8zXWO-X.cjs → jmPMUQMT7KTdf9Sr.cjs} +1 -1
  60. package/browser/cjs/{CgBaptNB5xDzVtxH.cjs → yZrSgyFKPqsiym7z.cjs} +2 -2
  61. package/browser/cjs/{D99WjfuVwM-YRm4a.cjs → zRbLzzCcfjQpsQ4j.cjs} +1 -1
  62. package/browser/esm/{DirjJILlmPlhPZwJ.mjs → 0M23_yfYSvrAB5iY.mjs} +4 -4
  63. package/browser/esm/{DfKdydqLJ4MMUAow.mjs → 2sPP8EL_OzSYDsKu.mjs} +1 -1
  64. package/{cdn/assets/CUrekuBvZp8HzDRR.js → browser/esm/3SiPV9yNzSbQVINg.mjs} +1 -1
  65. package/{cdn/assets/DlF4ox6px_a8KGDI.js → browser/esm/6CkscKSECxQpy0v6.mjs} +1 -1
  66. package/{cdn/assets/Ct9ZcjuuaNCX6kIj.js → browser/esm/94SRg1Gxbdr9B75m.mjs} +1 -1
  67. package/browser/esm/{CUFXsvWRmBglOxCh.mjs → B2I1Hudz2EIGw59h.mjs} +1 -1
  68. package/browser/esm/{D0wIYxN6_chAmwCc.mjs → B2fqssq7kMsGIg5g.mjs} +1 -1
  69. package/{cdn/assets/C5ipzxDNB7mwOup8.js → browser/esm/BBBP9totA24zTbqh.mjs} +1 -1
  70. package/{cdn/assets/Bmo80_Qi8HeLXtBu.js → browser/esm/BEYxIKe5B75ADXWP.mjs} +1634 -1612
  71. package/{cdn/assets/D3XmnZGIfxT4lk3w.js → browser/esm/BIHHiMjUvXmWQ6w_.mjs} +1 -1
  72. package/browser/esm/{CMICZ36cqe6eEELU.mjs → BNq1DlA_v8-hm8PQ.mjs} +21 -21
  73. package/browser/esm/{CnenkhTeaOhTTMqv.mjs → BXMZNx8rs4_V8pQL.mjs} +2 -2
  74. package/browser/esm/{3N51fmivOwyOXT3l.mjs → BYRVuU6FUEX6XBFW.mjs} +1 -1
  75. package/browser/esm/{Cux5PsvHYlpp5b2x.mjs → BfNo01-WwZl_5N1M.mjs} +88 -88
  76. package/browser/esm/{BbYZAR2suHjEBaES.mjs → BjLCBG20KyjNKCpy.mjs} +2 -2
  77. package/browser/esm/{B0DAlgwfAWOXvq4_.mjs → BoL2rsWK1YyT1PP7.mjs} +8 -8
  78. package/browser/esm/{Cz7RSKUHlEt4Sy6b.mjs → Bq_HFm6_6_ycs_gE.mjs} +30612 -30763
  79. package/browser/esm/{CMwrohupcgVf9ovx.mjs → Br4TnuxGRULZDhCA.mjs} +180 -180
  80. package/{cdn/assets/TCHZxTIhWMVkgX3o.js → browser/esm/BrWhLiIy81LKNSUX.mjs} +1 -1
  81. package/browser/esm/{BEdbC5wAfOjfWhGs.mjs → Bs6fth_bBoNrYDwE.mjs} +1 -1
  82. package/browser/esm/{on8xRgdppLtS76xu.mjs → C-QHwmJCeB3o-mzv.mjs} +1000 -988
  83. package/browser/esm/{C_xUEkZ7r882X9Ha.mjs → C-oc6cc0wXRVBFx2.mjs} +1 -1
  84. package/{cdn/assets/CSvpcvVrtQMi5YMH.js → browser/esm/C0U_bX9Hj97edVC9.mjs} +1 -1
  85. package/browser/esm/{BH6ldKaAlNHAWreh.mjs → C2Ik_RfF43fmFDeS.mjs} +1 -1
  86. package/browser/esm/{MhA9JYSNQknyC2-7.mjs → CC8aO_pPT-tkJK_H.mjs} +1 -1
  87. package/browser/esm/{nLQOv_3C-yTgOm_d.mjs → CGxu5NKxrEXE8QIe.mjs} +1 -1
  88. package/browser/esm/{Bjtb8lG8j5lZLmPO.mjs → CKHDKAaHkwZHUkoS.mjs} +9 -9
  89. package/browser/esm/{BTTKTkAe7jTaQvjz.mjs → CTdGamCv2VtpI05C.mjs} +1 -1
  90. package/browser/esm/{Dd9etqsWH04KVyov.mjs → CZRLp5H9dSrMEgaI.mjs} +12 -12
  91. package/{cdn/assets/DAW6ifi60VDar3-l.js → browser/esm/CbTDhJiJfpR6Btxp.mjs} +1 -1
  92. package/browser/esm/{Bpt-cfH_EphAcLow.mjs → CeWIrhJ_bsxOl7mw.mjs} +3 -3
  93. package/{cdn/assets/DTeYi36ajMzmUc3x.js → browser/esm/CsUNORBKkJ7f3diG.mjs} +1 -1
  94. package/browser/esm/{B4LH4e6YQr0i0kbs.mjs → CyYXh2ng_dKgHzbE.mjs} +2 -2
  95. package/browser/esm/DLJ1zBZE-WPdkpt2.mjs +1466 -0
  96. package/browser/esm/{HPDpApJMbty0fOGh.mjs → DRFsMc27LyLwGu56.mjs} +2 -2
  97. package/{cdn/assets/XWOQU_sxt5_lFjJM.js → browser/esm/DT09m4FGTu5N2LZJ.mjs} +1 -1
  98. package/browser/esm/{B1m-ozjxrnDeFhiZ.mjs → DUgyehn3re1zGQT5.mjs} +1 -1
  99. package/{cdn/assets/D8C3KeX9kFgFNEsb.js → browser/esm/DWOT4LkGXRN4FrJI.mjs} +1 -1
  100. package/browser/esm/{Dq8duLxf4-Tuo_wV.mjs → Ddm9jggzrr5VJQ68.mjs} +5 -5
  101. package/browser/esm/{BM8e7ROZOHaAquLi.mjs → Dl02UNFD2tNwtHQ9.mjs} +1 -1
  102. package/browser/esm/{CvbAyNJlfhcCYfDr.mjs → Dq1oxXMudxqdJaKZ.mjs} +5 -5
  103. package/browser/esm/{Ld4Og9zF7kdwc9Bq.mjs → Dx1J8HBJdbrROP0v.mjs} +1 -1
  104. package/browser/esm/{6nSiDtF6igNyrf2y.mjs → Dz8v5MSOgkaH_zTd.mjs} +18 -18
  105. package/{cdn/assets/blfFjNlrt7wIm8ac.js → browser/esm/F7oUe3nLrtaRYTas.mjs} +1 -1
  106. package/browser/esm/FCkxbRy2XiqD3GdL.mjs +41 -0
  107. package/browser/esm/{C2nH1Z0Qv8dVA46o.mjs → GbTp1_3jFZu0Ex24.mjs} +2 -2
  108. package/{cdn/assets/nuGYHbGeWLkN7IFF.js → browser/esm/L5HOBW-m9BjZTUuw.mjs} +1 -1
  109. package/{cdn/assets/D6KZyFauO14Su023.js → browser/esm/RWhi_dOrWDICNt1t.mjs} +1 -1
  110. package/browser/esm/{CxjY2TO23WNFisWX.mjs → XL9-bWRsLjEvW1Y0.mjs} +1 -1
  111. package/browser/esm/{Dv5RrOnUwTMHeM7k.mjs → ZXuNMFT0sYh8ui7O.mjs} +4 -4
  112. package/browser/esm/{Bjsc6wrUpvl_hjRj.mjs → gX1gbnkwbpalR57F.mjs} +1 -1
  113. package/browser/esm/{3VzVhIOnlmOZ-dBg.mjs → im3UoVISx3VXhEFp.mjs} +14 -14
  114. package/browser/esm/index.mjs +2 -2
  115. package/browser/esm/{C_9Upo5I-PSK47R_.mjs → kagl0zcUDaK1IX_X.mjs} +1 -1
  116. package/browser/esm/{Dc1H2furircZlzN8.mjs → pxRv4ndPNkOMM_s3.mjs} +17 -17
  117. package/browser/esm/{C4ADTbdoMYv-xYb_.mjs → qchlbvmOxrybWJep.mjs} +1 -1
  118. package/browser/esm/{TCyoIWnhQsOAGihq.mjs → s8U6UEvd4LQsvEnH.mjs} +1 -1
  119. package/{cdn/assets/CXM4duZAQ9xkx_-8.js → browser/esm/t7CffsKJY64LMXgS.mjs} +1 -1
  120. package/browser/esm/{BsMA-6c4MCPqfDAq.mjs → x9wy-F3t5pNOvOIp.mjs} +103 -100
  121. package/cdn/assets/{DfKdydqLJ4MMUAow.js → 2sPP8EL_OzSYDsKu.js} +1 -1
  122. package/{browser/esm/CUrekuBvZp8HzDRR.mjs → cdn/assets/3SiPV9yNzSbQVINg.js} +1 -1
  123. package/{browser/esm/DlF4ox6px_a8KGDI.mjs → cdn/assets/6CkscKSECxQpy0v6.js} +1 -1
  124. package/cdn/assets/{jNoWEx25dsSqFAso.js → 6tFlyQMvtppXfmuU.js} +3 -3
  125. package/{browser/esm/Ct9ZcjuuaNCX6kIj.mjs → cdn/assets/94SRg1Gxbdr9B75m.js} +1 -1
  126. package/cdn/assets/{CUFXsvWRmBglOxCh.js → B2I1Hudz2EIGw59h.js} +1 -1
  127. package/cdn/assets/{D0wIYxN6_chAmwCc.js → B2fqssq7kMsGIg5g.js} +1 -1
  128. package/{browser/esm/C5ipzxDNB7mwOup8.mjs → cdn/assets/BBBP9totA24zTbqh.js} +1 -1
  129. package/cdn/assets/{C6VUt6vUMhiTBp21.js → BD1S4plUUe1NPAqV.js} +103 -100
  130. package/{browser/esm/D3XmnZGIfxT4lk3w.mjs → cdn/assets/BIHHiMjUvXmWQ6w_.js} +1 -1
  131. package/cdn/assets/{BDy4o1dgQMIqsMiY.js → BKDQtGZxRUUzBmnI.js} +2 -2
  132. package/cdn/assets/{DIOp5ZkL1dY68cMH.js → BMb4pCD8O5vK2p1B.js} +2 -2
  133. package/cdn/assets/BPStm90FUYfOgibU.js +41 -0
  134. package/cdn/assets/{BUJQ7wUyL-iSUg8h.js → BY5dcSv5nxuvXMsr.js} +5 -5
  135. package/cdn/assets/{3N51fmivOwyOXT3l.js → BYRVuU6FUEX6XBFW.js} +1 -1
  136. package/cdn/assets/{9ZJYmMX0oks56Dir.js → Be9YovX6b_0gKXs5.js} +21 -21
  137. package/{browser/esm/TCHZxTIhWMVkgX3o.mjs → cdn/assets/BrWhLiIy81LKNSUX.js} +1 -1
  138. package/cdn/assets/{BEdbC5wAfOjfWhGs.js → Bs6fth_bBoNrYDwE.js} +1 -1
  139. package/cdn/assets/{D1QeQpmRY9PDIMEz.js → BzlAT8jiYfNV3kGy.js} +2 -2
  140. package/cdn/assets/{C_xUEkZ7r882X9Ha.js → C-oc6cc0wXRVBFx2.js} +1 -1
  141. package/{browser/esm/CSvpcvVrtQMi5YMH.mjs → cdn/assets/C0U_bX9Hj97edVC9.js} +1 -1
  142. package/cdn/assets/{BH6ldKaAlNHAWreh.js → C2Ik_RfF43fmFDeS.js} +1 -1
  143. package/cdn/assets/{MhA9JYSNQknyC2-7.js → CC8aO_pPT-tkJK_H.js} +1 -1
  144. package/cdn/assets/{CaN6N1dq3iIVO1hT.js → CG-YuIoWsi12_nu9.js} +9 -9
  145. package/cdn/assets/{BbtqTKem2BWD_lH0.js → CGUSbWH383tudMFu.js} +12 -12
  146. package/cdn/assets/{nLQOv_3C-yTgOm_d.js → CGxu5NKxrEXE8QIe.js} +1 -1
  147. package/cdn/assets/{C0a277r4c7jdrbo-.js → CJOmvmuvywU33q7C.js} +1000 -988
  148. package/cdn/assets/{CscbwTq6KR8XJrxB.js → CNhPYXS_v3a2ATBg.js} +81 -81
  149. package/cdn/assets/{CWmH4zsZyNsO9p41.js → COFTB6OufFls7NP1.js} +5 -5
  150. package/cdn/assets/{BTTKTkAe7jTaQvjz.js → CTdGamCv2VtpI05C.js} +1 -1
  151. package/{browser/esm/DAW6ifi60VDar3-l.mjs → cdn/assets/CbTDhJiJfpR6Btxp.js} +1 -1
  152. package/{browser/esm/DTeYi36ajMzmUc3x.mjs → cdn/assets/CsUNORBKkJ7f3diG.js} +1 -1
  153. package/{browser/esm/Ctrv_0YzvwpnUr0y.mjs → cdn/assets/DBq5E3hmvVO5ss1V.js} +1634 -1612
  154. package/{browser/esm/XWOQU_sxt5_lFjJM.mjs → cdn/assets/DT09m4FGTu5N2LZJ.js} +1 -1
  155. package/cdn/assets/{B1m-ozjxrnDeFhiZ.js → DUgyehn3re1zGQT5.js} +1 -1
  156. package/{browser/esm/D8C3KeX9kFgFNEsb.mjs → cdn/assets/DWOT4LkGXRN4FrJI.js} +1 -1
  157. package/cdn/assets/{b4A5hTjHI0rNI6Qk.js → DYgFWlitgXmKdN_I.js} +88 -88
  158. package/cdn/assets/{B537hPIx4O8b3yYs.js → Det1P4Jrl9aZHFGe.js} +4 -4
  159. package/cdn/assets/{BHQC-R8MGLRzOxBA.js → DjHCn_TmfObC_aJ1.js} +14 -14
  160. package/cdn/assets/{BM8e7ROZOHaAquLi.js → Dl02UNFD2tNwtHQ9.js} +1 -1
  161. package/cdn/assets/{OMD1-UUDvqKr1SYQ.js → Dt3qIbvMvgQhNgeR.js} +4 -4
  162. package/cdn/assets/{Ld4Og9zF7kdwc9Bq.js → Dx1J8HBJdbrROP0v.js} +1 -1
  163. package/{browser/esm/blfFjNlrt7wIm8ac.mjs → cdn/assets/F7oUe3nLrtaRYTas.js} +1 -1
  164. package/{browser/esm/nuGYHbGeWLkN7IFF.mjs → cdn/assets/L5HOBW-m9BjZTUuw.js} +1 -1
  165. package/cdn/assets/{CKyyzgIojzuQ14Jb.js → LxoKYdUqZ4Zgxjza.js} +17 -17
  166. package/{browser/esm/D6KZyFauO14Su023.mjs → cdn/assets/RWhi_dOrWDICNt1t.js} +1 -1
  167. package/cdn/assets/{BTXU6Aai-Ialy3og.js → U_ihCP2tbaRnqD2g.js} +38129 -38280
  168. package/cdn/assets/{CxjY2TO23WNFisWX.js → XL9-bWRsLjEvW1Y0.js} +1 -1
  169. package/cdn/assets/{DfQ3XXU3pjhhAldB.js → Z4Ov3rzhXnezd-gU.js} +2 -2
  170. package/cdn/assets/{DHDTA2yZ7ODlBAXM.js → ct9ztJbQB16MJoyP.js} +2 -2
  171. package/cdn/assets/{Cd3KcqA1q1QnCheo.js → dQu9CDkkTpS5h580.js} +8 -8
  172. package/cdn/assets/{B0h0MHiq87C7wRUG.js → dR_uwa9znq6_hDmB.js} +18 -18
  173. package/cdn/assets/{Bjsc6wrUpvl_hjRj.js → gX1gbnkwbpalR57F.js} +1 -1
  174. package/cdn/assets/{C_9Upo5I-PSK47R_.js → kagl0zcUDaK1IX_X.js} +1 -1
  175. package/cdn/assets/mAWImp_J2v8z8hbZ.js +1466 -0
  176. package/cdn/assets/{C4ADTbdoMYv-xYb_.js → qchlbvmOxrybWJep.js} +1 -1
  177. package/cdn/assets/{TCyoIWnhQsOAGihq.js → s8U6UEvd4LQsvEnH.js} +1 -1
  178. package/{browser/esm/CXM4duZAQ9xkx_-8.mjs → cdn/assets/t7CffsKJY64LMXgS.js} +1 -1
  179. package/cdn/index.js +2 -2
  180. package/cdn/loader.js +1 -1
  181. package/package.json +2 -2
  182. package/browser/cjs/B4SOP0NZdUa_5syD.cjs +0 -452
  183. package/browser/cjs/BHCPp9yjpWH3JG34.cjs +0 -6
  184. package/browser/cjs/BKGew2NYE-aa2w6y.cjs +0 -6
  185. package/browser/cjs/B_HrZqG_mlwYR4Ae.cjs +0 -6
  186. package/browser/cjs/C6MqpTvQKwY2D1nN.cjs +0 -7
  187. package/browser/cjs/CU5XR4xQQYjuDqWh.cjs +0 -6
  188. package/browser/cjs/CV3O2HrGgeVyZSTI.cjs +0 -6
  189. package/browser/cjs/CWuna-uBlfjsma3U.cjs +0 -11
  190. package/browser/cjs/CiJXZ4MMq0-g5pRy.cjs +0 -124
  191. package/browser/cjs/DmhCjj0KeysXxIzX.cjs +0 -6
  192. package/browser/esm/DDfN1juzl1hT_UFe.mjs +0 -41
  193. package/browser/esm/DOGg1qByRfg3Xspr.mjs +0 -1466
  194. package/cdn/assets/DfNI2EiuegVK3udt.js +0 -41
  195. package/cdn/assets/E-GOcSTy1uY4Oj3I.js +0 -1466
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,13 +1,13 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./CiCnx8sUQcc8athi.cjs");var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,i,S,q){super(S,q),this._label=i,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class k extends a{constructor(n,i){super(e.Code.Parse,e.Label.Parse,n,i)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=k;class x extends a{constructor(n,i){super(e.Code.Null,e.Label.Null,n,i)}static{this.code=e.Code.Null}}e.Null=x;class j extends a{constructor(n,i){super(e.Code.Div0,e.Label.Div0,n,i)}static{this.code=e.Code.Div0}}e.Div0=j;class X extends a{constructor(n,i){super(e.Code.Value,e.Label.Value,n,i)}static{this.code=e.Code.Value}}e.Value=X;class s extends a{constructor(n,i){super(e.Code.Ref,e.Label.Ref,n,i)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,i){super(e.Code.Name,e.Label.Name,n,i)}static{this.code=e.Code.Name}}e.Name=K;class M extends a{constructor(n,i){super(e.Code.Num,e.Label.Num,n,i)}static{this.code=e.Code.Num}}e.Num=M;class U extends a{constructor(n,i){super(e.Code.NA,e.Label.NA,n,i)}static{this.code=e.Code.NA}}e.NA=U;class Y extends a{constructor(n,i){super(e.Code.GettingData,e.Label.GettingData,n,i)}static{this.code=e.Code.GettingData}}e.GettingData=Y;class z extends a{constructor(n,i){super(e.Code.Spill,e.Label.Spill,n,i)}static{this.code=e.Code.Spill}}e.Spill=z;class O extends a{constructor(n,i){super(e.Code.Connect,e.Label.Connect,n,i)}static{this.code=e.Code.Connect}}e.Connect=O;class G extends a{constructor(n,i){super(e.Code.Blocked,e.Label.Blocked,n,i)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,i){super(e.Code.Unknown,e.Label.Unknown,n,i)}static{this.code=e.Code.Unknown}}e.Unknown=_;class F extends a{constructor(n,i){super(e.Code.Field,e.Label.Field,n,i)}static{this.code=e.Code.Field}}e.Field=F;class Q extends a{constructor(n,i){super(e.Code.Calc,e.Label.Calc,n,i)}static{this.code=e.Code.Calc}}e.Calc=Q;class I extends a{constructor(n,i){super(e.Code.Busy,e.Label.Busy,n,i)}static{this.code=e.Code.Busy}}e.Busy=I;class P extends a{constructor(n,i){super(e.Code.Python,e.Label.Python,n,i)}static{this.code=e.Code.Python}}e.Python=P;class Z extends a{constructor(n,i){super(e.Code.Timeout,e.Label.Timeout,n,i)}static{this.code=e.Code.Timeout}}e.Timeout=Z})(r||(r={}));const f={};f[r.Code.Parse]=r.Parse,f[r.Code.Null]=r.Null,f[r.Code.Div0]=r.Div0,f[r.Code.Value]=r.Value,f[r.Code.Ref]=r.Ref,f[r.Code.Name]=r.Name,f[r.Code.Num]=r.Num,f[r.Code.NA]=r.NA,f[r.Code.GettingData]=r.GettingData,f[r.Code.Spill]=r.Spill,f[r.Code.Connect]=r.Connect,f[r.Code.Blocked]=r.Blocked,f[r.Code.Unknown]=r.Unknown,f[r.Code.Field]=r.Field,f[r.Code.Calc]=r.Calc,f[r.Code.Busy]=r.Busy,f[r.Code.Python]=r.Python,f[r.Code.Timeout]=r.Timeout;const ce=new Map,ie=new Map,de=new Map,ue=new Map,le=Object.keys(f);for(let e=0;e<le.length;e++){const a=le[e],k=f[a];de.set(r.Label[a],k),ue.set(r.Code[a],k);const x=new k;ce.set(x.getLabel(),x),ie.set(x.getCode(),x)}const ge=ie.get(r.Code.Unknown);var p;(p=r||(r={})).BuiltIn={Parse:new p.Parse,Null:new p.Null,Div0:new p.Div0,Value:new p.Value,Ref:new p.Ref,Name:new p.Name,Num:new p.Num,NA:new p.NA,GettingData:new p.GettingData,Spill:new p.Spill,Connect:new p.Connect,Blocked:new p.Blocked,Unknown:new p.Unknown,Field:new p.Field,Calc:new p.Calc,Busy:new p.Busy,Python:new p.Python,Timeout:new p.Timeout},p.getBuiltInByLabel=e=>ce.get(e),p.newTypedError=(e,a,k)=>{let x;return x=typeof e=="string"?de.get(e):ue.get(e),x||(x=p.Unknown),new x(a,k)},p.getBuiltInById=e=>ie.get(e)||ge;let A=null,H=null;const we={compilerOptions:{target:"esnext"}},Ce=async()=>`
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./CLarA_vLTlgU3TCF.cjs");var se,J,r;(J=se||(se={})).Orientation={Column:"column",Row:"row"},J.Orientations={...J.Orientation,Both:"both"},J.Direction={Up:"up",Down:"down",Left:"left",Right:"right"},(e=>{e.Code={Parse:0,Null:1,Div0:2,Value:3,Ref:4,Name:5,Num:6,NA:7,GettingData:8,Spill:9,Connect:10,Blocked:11,Unknown:12,Field:13,Calc:14,Busy:16,Python:19,Timeout:20},e.Label={Parse:"#PARSE!",Null:"#NULL!",Div0:"#DIV/0!",Value:"#VALUE!",Ref:"#REF!",Name:"#NAME?",Num:"#NUM!",NA:"#N/A",GettingData:"#GETTING_DATA",Spill:"#SPILL!",Connect:"#CONNECT!",Blocked:"#BLOCKED!",Unknown:"#UNKNOWN!",Field:"#FIELD!",Calc:"#CALC!",Busy:"#BUSY!",Python:"#PYTHON!",Timeout:"#TIMEOUT!"};class a extends Error{constructor(n,i,S,q){super(S,q),this._label=i,this._code=n,this.details=q}static{this.code=e.Code.Unknown}get isFormulaError(){return!0}getLabel(){return this._label}getCode(){return this._code}equals(n){return!!n&&(this._code===n._code||this._code===n.code)}get[Symbol.toStringTag](){return"[FormulaError]"}toString(){return this.message||this._label}}e.Known=a;class k extends a{constructor(n,i){super(e.Code.Parse,e.Label.Parse,n,i)}static{this.code=e.Code.Parse}getDetails(){const n=this.details;return{line:n?.line??1,column:n?.column??1,offset:n?.offset??0,length:n?.length??0}}}e.Parse=k;class x extends a{constructor(n,i){super(e.Code.Null,e.Label.Null,n,i)}static{this.code=e.Code.Null}}e.Null=x;class j extends a{constructor(n,i){super(e.Code.Div0,e.Label.Div0,n,i)}static{this.code=e.Code.Div0}}e.Div0=j;class X extends a{constructor(n,i){super(e.Code.Value,e.Label.Value,n,i)}static{this.code=e.Code.Value}}e.Value=X;class s extends a{constructor(n,i){super(e.Code.Ref,e.Label.Ref,n,i)}static{this.code=e.Code.Ref}}e.Ref=s;class K extends a{constructor(n,i){super(e.Code.Name,e.Label.Name,n,i)}static{this.code=e.Code.Name}}e.Name=K;class M extends a{constructor(n,i){super(e.Code.Num,e.Label.Num,n,i)}static{this.code=e.Code.Num}}e.Num=M;class U extends a{constructor(n,i){super(e.Code.NA,e.Label.NA,n,i)}static{this.code=e.Code.NA}}e.NA=U;class Y extends a{constructor(n,i){super(e.Code.GettingData,e.Label.GettingData,n,i)}static{this.code=e.Code.GettingData}}e.GettingData=Y;class z extends a{constructor(n,i){super(e.Code.Spill,e.Label.Spill,n,i)}static{this.code=e.Code.Spill}}e.Spill=z;class O extends a{constructor(n,i){super(e.Code.Connect,e.Label.Connect,n,i)}static{this.code=e.Code.Connect}}e.Connect=O;class G extends a{constructor(n,i){super(e.Code.Blocked,e.Label.Blocked,n,i)}static{this.code=e.Code.Blocked}}e.Blocked=G;class _ extends a{constructor(n,i){super(e.Code.Unknown,e.Label.Unknown,n,i)}static{this.code=e.Code.Unknown}}e.Unknown=_;class F extends a{constructor(n,i){super(e.Code.Field,e.Label.Field,n,i)}static{this.code=e.Code.Field}}e.Field=F;class Q extends a{constructor(n,i){super(e.Code.Calc,e.Label.Calc,n,i)}static{this.code=e.Code.Calc}}e.Calc=Q;class I extends a{constructor(n,i){super(e.Code.Busy,e.Label.Busy,n,i)}static{this.code=e.Code.Busy}}e.Busy=I;class P extends a{constructor(n,i){super(e.Code.Python,e.Label.Python,n,i)}static{this.code=e.Code.Python}}e.Python=P;class Z extends a{constructor(n,i){super(e.Code.Timeout,e.Label.Timeout,n,i)}static{this.code=e.Code.Timeout}}e.Timeout=Z})(r||(r={}));const f={};f[r.Code.Parse]=r.Parse,f[r.Code.Null]=r.Null,f[r.Code.Div0]=r.Div0,f[r.Code.Value]=r.Value,f[r.Code.Ref]=r.Ref,f[r.Code.Name]=r.Name,f[r.Code.Num]=r.Num,f[r.Code.NA]=r.NA,f[r.Code.GettingData]=r.GettingData,f[r.Code.Spill]=r.Spill,f[r.Code.Connect]=r.Connect,f[r.Code.Blocked]=r.Blocked,f[r.Code.Unknown]=r.Unknown,f[r.Code.Field]=r.Field,f[r.Code.Calc]=r.Calc,f[r.Code.Busy]=r.Busy,f[r.Code.Python]=r.Python,f[r.Code.Timeout]=r.Timeout;const ce=new Map,ie=new Map,de=new Map,ue=new Map,le=Object.keys(f);for(let e=0;e<le.length;e++){const a=le[e],k=f[a];de.set(r.Label[a],k),ue.set(r.Code[a],k);const x=new k;ce.set(x.getLabel(),x),ie.set(x.getCode(),x)}const ge=ie.get(r.Code.Unknown);var p;(p=r||(r={})).BuiltIn={Parse:new p.Parse,Null:new p.Null,Div0:new p.Div0,Value:new p.Value,Ref:new p.Ref,Name:new p.Name,Num:new p.Num,NA:new p.NA,GettingData:new p.GettingData,Spill:new p.Spill,Connect:new p.Connect,Blocked:new p.Blocked,Unknown:new p.Unknown,Field:new p.Field,Calc:new p.Calc,Busy:new p.Busy,Python:new p.Python,Timeout:new p.Timeout},p.getBuiltInByLabel=e=>ce.get(e),p.newTypedError=(e,a,k)=>{let x;return x=typeof e=="string"?de.get(e):ue.get(e),x||(x=p.Unknown),new x(a,k)},p.getBuiltInById=e=>ie.get(e)||ge;let A=null,H=null;const we={compilerOptions:{target:"esnext"}},Ce=async()=>`
7
7
  interface FirstTest {
8
8
  isTrue?: boolean;
9
9
  }
10
- `,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./DCe0ifxJ2waXgr0H.cjs"))).initialize()}catch(e){throw W=null,e}finally{W=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const k=(e.disableBundle||e.declarationsOnly)??!1,x=[Ce(),ke()],j=await Promise.all(x),X=j[0],s=j[1];let K="",M=null;const U=[],Y={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},z="script",O=`${z}.ts`,G="lib.d.ts",_="global.d.ts",F={[O]:a,[G]:`
10
+ `,pe=new Map([["IReferenceRange","r"],["IRange","l"]]),me=new Map([["IWorkbook","workbook"],["ISheet","sheet"],["ICellRanges","ranges"],["ICellRange","range"],["IFormulaContext","context"]]),ne=(e,a)=>{Array.from(a.keys()).forEach(k=>{const x=a.get(k);a.set(`${e}.${k}`,x)})},xe=new Map([["Scalar","*"],["FormulaError.Known","e"],["Date","Date"],["JSON","JSON"]]),be=new Map([]),oe="SheetXL";ne(oe,pe),ne(oe,me),ne(oe,be);const Te=new Map([["Promise",()=>({async:!0})],["Observable",()=>({stream:!0})]]);let W=null;async function ke(){if(W)return W;try{return await(await Promise.resolve().then(()=>require("./C8PUqW17bEbzJthE.cjs"))).initialize()}catch(e){throw W=null,e}finally{W=null}}exports.compileModule=async function(e){const a=e?.source??null;if(!a)return null;const k=(e.disableBundle||e.declarationsOnly)??!1,x=[Ce(),ke()],j=await Promise.all(x),X=j[0],s=j[1];let K="",M=null;const U=[],Y={allowJs:!0,declaration:!1,sourceMap:!1,inlineSourceMap:!1,inlineSources:!1,isolatedModules:!0,preserveConstEnums:!1,module:99,noResolve:!0,emitDeclarationOnly:!1,target:s.ScriptTarget.ES2020},z="script",O=`${z}.ts`,G="lib.d.ts",_="global.d.ts",F={[O]:a,[G]:`
11
11
  /**
12
12
  * Represents the completion of an asynchronous operation
13
13
  */
@@ -21,7 +21,7 @@ interface Promise<T> {
21
21
  finally(onfinally?: (() => void) | undefined | null): Promise<T>;
22
22
  }
23
23
  `,[_]:X},Q={getSourceFile:(t,d,E,l)=>s.createSourceFile(t,F[t],s.ScriptTarget.Latest,!0),fileExists:t=>F[t]!==void 0,readFile:t=>F[t],writeFile:(t,d)=>{F[t]=d},getCurrentDirectory:()=>"./",getCanonicalFileName:t=>t,useCaseSensitiveFileNames:()=>!0,getDefaultLibFileName:t=>G,getNewLine:()=>`
24
- `},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./DvtlLY8kPVwL4sgA.cjs"));return A=await o(),g(),A}catch(o){throw console.error("Failed to import or initialize esbuild:",o),H=null,m(o),o}}(),N="@sheetxl/primitives",T=`
24
+ `},I=s.createProgram([O,_],Y,Q),P=I.getTypeChecker(),Z=I.getSourceFile(O),y=I.emit();y.diagnostics.length>0&&console.warn(y.diagnostics),K=F[`${z}.js`];const n=(t,d,E,l)=>{if(t){if(t.kind===s.SyntaxKind.NumberKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.StringKeyword)d.scalar="s";else if(t.kind===s.SyntaxKind.BooleanKeyword)d.scalar="b";else if(t.kind===s.SyntaxKind.UndefinedKeyword||t.kind===s.SyntaxKind.NullKeyword||t.kind===s.SyntaxKind.VoidKeyword){if(l)return void S(t,new Error(`'undefined' is not a valid type for input: '${t?.parent?.name?.escapedText}'.`));d.scalar="z"}else if(t.kind===s.SyntaxKind.BigIntKeyword)d.scalar="n";else if(t.kind===s.SyntaxKind.AnyKeyword)d.scalar="z";else if(t.kind===s.SyntaxKind.ArrayType){const c=t.elementType;if(!c)return void S(t,new Error(`'Array' must be typed: '${t?.parent?.name?.escapedText}'.`));d.arrayDepth=(d.arrayDepth??0)+1,n(c,d,E,l)}else if(t.kind!==s.SyntaxKind.TupleType&&t.kind===s.SyntaxKind.TypeReference){const c=t.typeName?.getText?.()??null,N=pe.get(c);let T=!1;N&&(d.range=N,T=!0);const L=xe.get(c);if(L&&(d.scalar=L),L!==void 0&&(T=!0),l){const g=me.get(c);if(g)return g}else{const g=Te.get(c);if(g){const m={...d,...g()};let o=0;if(m.async&&o++,m.stream&&o++,o>1)return void S(t,new Error(`'${c}' cannot have multiple modifiers: '${t?.parent?.name?.escapedText}'.`));d=m,T=!0}}if(!T)return void S("node",new Error(`'${c}' is not a valid type: '${t?.parent?.name?.escapedText}'.`));const b=t.typeArguments;if(b){if(b.length!==1)return void S(t,new Error(`'${c}' must be typed with exactly 1 type: '${t?.parent?.name?.escapedText}'.`));n(b[0],d,E,l)}}}else S(t,new Error(`Type is not defined for '${d?.name??"return"}'.`))},i=[],S=(t,d)=>{i.push(d)};if(s.forEachChild(Z,t=>{if(E=t,(s.getCombinedModifierFlags(E)&s.ModifierFlags.Export)!==0&&s.isFunctionDeclaration(t)){const l={},c={parameters:{}},N=t?.name?.getText();try{l.name=N;const T=P.getSymbolAtLocation(t.name).getDocumentationComment(P);if(T&&T.length>0&&T[0].text){let m=T[0].text;m=m.replace(/[\r\n]+/g,"\\n").trim(),c.summary=m}const L={};n(t.type,L,l,!1),l.returnType=L;const b={};d=t,(s.getCombinedModifierFlags(d)&s.ModifierFlags.Default)!==0&&(b.default=!0,M=N),Object.keys(b).length>0&&(l.behavior=b),l.parameters=[];const g=new Map;for(let m=0;m<t.parameters.length;m++){const o=t.parameters[m],h={};h.name=o.name?.getText();const $=n(o.type,h,l,!0);if($){if(l.parameters.length!==0){const B=t?.parent,C=B?.name?.getText();return void S(t,new Error(`'${l.name}' contexts must be the first parameter: '${C}'.`))}l.context=$;continue}let v;if((o.initializer!==void 0&&o.initializer!==null||o.questionToken!==void 0&&o.questionToken!==null)&&(h.optional=!0,o.initializer))try{v=o.initializer.kind===s.SyntaxKind.StringLiteral?o.initializer.text:o.initializer.kind===s.SyntaxKind.NumericLiteral?parseFloat(o.initializer.text):o.initializer.kind===s.SyntaxKind.TrueKeyword||o.initializer.kind===s.SyntaxKind.FalseKeyword?o.initializer.kind===s.SyntaxKind.TrueKeyword:o.initializer.kind===s.SyntaxKind.NullKeyword?null:o.initializer.kind===s.SyntaxKind.ObjectLiteralExpression||o.initializer.kind===s.SyntaxKind.ArrayLiteralExpression?o.initializer.getText():o.initializer.getText?.()}catch(B){console.warn(`Couldn't extract default value for parameter '${h.name}'`,B)}o.dotDotDotToken&&(h.rest=!0),l.parameters.push(h);const w={description:""};c.parameters[h.name]=w;const u=P.getSymbolAtLocation(o.name).getDocumentationComment(P);u&&u.length>0&&u[0].text&&(w.description=u[0].text),v!==void 0&&(w.defaultValue=v),g.set(h.name,h)}if(t.jsDoc&&t.jsDoc.length>0){const m=t.jsDoc;for(let o=0;o<m.length;o++){const h=m[o]?.tags;if(h)for(let $=0;$<h.length;$++){const v=h[$];let w=v?.tagName?.text;if(!w)continue;w=w.toLowerCase();let u=v.comment;const B=w==="hidden";if((typeof u=="string"||B)&&(typeof u=="string"&&(u=u.replace(/[\r\n]+/g,"\\n").trim()),B||!u||(u=u.split(/\\n/)[0],u&&u.length!==0))){if(u&&typeof u=="string"){const C=/\{@link(code|plain)?\s+([^}|]+)(?:\s*\|\s*([^}]+))?\}/g;let D,R=u,V=[];for(;(D=C.exec(u))!==null;){const[ee,te,ye,ae]=D,fe=[ye.trim()];ae&&fe.push(ae.trim())}u=R,V.length>0&&w==="see"&&(c.links||(c.links=[]),c.links.push(...V))}if(w==="name"){const C=u;C!==N&&(c.name=C)}else if(w!=="description"){if(w==="summary"){const C=u;C&&(c.summary=C)}else if(w==="param"){const C=v.name?.text,D=g.get(C);if(!D){i.push(new Error(`Parameter '${C}' not found in function '${N}'.`));continue}if(v.typeExpression&&v.typeExpression.type)try{const R=v.typeExpression.type;if(R.kind===s.SyntaxKind.UnionType){const V=[];D.enums=V,R.types.forEach(ee=>{if(ee.kind===s.SyntaxKind.LiteralType){const te=ee.literal.text;te&&V.push(te)}})}}catch(R){console.warn("Error parsing JSDoc type expression:",R)}}else if(w==="returns"||w==="return")l.returnType.description=u;else if(w==="category")c.category=u;else if(w==="hidden"){let C=!0;const D=u?.toLowerCase();D==="false"?C=!1:D!=="true"&&(C=u),C!==!1&&(c.hidden=C??!0)}}}}}}Object.keys(l.returnType).length===0&&delete l.returnType,U.push([l,c])}catch(T){S(t,new Error(`'${N}': ${T.message}`))}}var d,E}),i.length>0)throw console.warn(i),new Error("There were compilation errors.",{cause:i});if(U.length===0)throw new Error("No exported functions.");const q=`${he.$.uuidV4()}-script`;try{k||i.length!==0||(K=await async function(t,d,E="/script.js",l="__SHEETXL"){try{const c=await async function(){if(A)return A;if(H){if(await H,!A)throw new Error("ESBuild initialization promise resolved, but instance is not available.");return A}let g,m;H=new Promise((o,h)=>{g=o,m=h});try{const{initialize:o}=await Promise.resolve().then(()=>require("./DB9rOzEP0g0ZGfBj.cjs"));return A=await o(),g(),A}catch(o){throw console.error("Failed to import or initialize esbuild:",o),H=null,m(o),o}}(),N="@sheetxl/primitives",T=`
25
25
  export const FormulaContext = globalThis.${l}?.FormulaContext;
26
26
  export const ScalarType = globalThis.${l}?.ScalarType;
27
27
  export const Observable = globalThis.${l}?.Observable;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  "use strict";var c=Object.create;var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var p=(e,r,t,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of s(r))!y.call(e,i)&&i!==t&&n(e,i,{get:()=>r[i],enumerable:!(l=a(r,i))||l.enumerable});return e};var g=(e,r,t)=>(t=e!=null?c(u(e)):{},p(r||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e));/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),t=require("./BnZdvx8z2BIDZv9J.cjs"),$=["Ok","Cancel"],F=l.memo(T=>{const{initialValue:v,context:g,onOption:y,onValidateOption:p,onInputOption:x,onDone:u,options:f=$,defaultOption:i=f?.[0],cancelOption:c="Cancel",sx:j,...k}=T,[a,h]=l.useState(v),[S,O]=l.useState(!1),d=l.useCallback(async(e,n)=>!0,[]),m=t.ye(async e=>{x?.(a,e),y?.(e,e===c,e===i),u?.()},[a,x,u,y,c,i]),P=t.ye(async e=>{e.keyCode===t.Jt.Enter&&await d?.(a,null)!==!1&&m(i)},[a,m]),w=t.ye(e=>{h(e.target.value),d?.(e.target.value,null)},[p]),I=t.ye(async e=>{let n=await Promise.resolve(p?.(e));try{n!==!1&&(n=await Promise.resolve(d?.(a,e))??!0)}catch{}return n??!0},[p]),[b,C]=l.useState(t.Ft.Styles.lookupStyle(a).formatType??t.Ft.Type.Custom);l.useEffect(()=>{C(t.Ft.Styles.lookupStyle(a).formatType??t.Ft.Type.Custom)},[a]);const D=l.useMemo(()=>{const e=t.Ft.Styles.lookupPrimary(),n=r=>o.jsx(t.MenuItem,{value:r,children:r},r),s=Object.keys(e).map(r=>n(e[r].formatType));return s.push(n(t.Ft.Type.Custom)),s},[]),M=l.useCallback(e=>{const n=e.target.value;C(n);const s=t.Ft.Styles.lookupDefault(n);s&&h(s)},[]),R=l.useMemo(()=>{const e=g();return e.createTemporaryCell({value:e.getValue()??12345,style:{numberFormat:a}})},[b,a,g]);return o.jsx(t.n6,{title:"Number Format",options:f,onDone:u,onOption:e=>m(e),onValidateOption:I,defaultOption:i,cancelOption:c,autoFocusSel:".autoFocus",sx:{width:"580px",...j},...k,children:o.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[o.jsxs(t.FormControl,{sx:{minWidth:135},size:"small",children:[o.jsx(t.InputLabel,{children:"Category"}),o.jsx(t.Select,{value:b,label:"Category",onChange:M,sx:{backgroundImage:`linear-gradient(${t.alpha("#fff",t.Rn(5))}, ${t.alpha("#fff",t.Rn(5))})`},children:D})]}),o.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:o.jsx(t.TextField,{label:"Code",onFocus:e=>{S||e.target?.select(),O(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.Rn(5))}, ${t.alpha("#fff",t.Rn(5))})`}}},value:a,onChange:w,onKeyDown:P,onContextMenu:e=>{e.stopPropagation()}})}),o.jsxs(t.Box,{children:[o.jsx(t.Typography,{variant:"caption",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:"Preview"}),o.jsx(t.Typography,{variant:"body2",component:"div",sx:{borderRadius:e=>`${e.shape.borderRadius}px`,padding:e=>e.spacing(1),border:e=>`1px solid ${e.palette.grey[400]}`},children:R.getNumberFormat().displayText||"(empty)"})]})]})})});exports.NumberFormatDialog=F,exports.default=F;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,11 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./BnZdvx8z2BIDZv9J.cjs"),Ke=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",ys=new RegExp(`^[${Ke}][-${Ke}.0-9·̀-ͯ‿-⁀]*$`,"u");function os(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const Ye="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const z=function(i){return i===32||i===10||i===13||i===9},xs=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=os,ts=function(i){return os(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ns=[32,10,13,9],ws=ys,vs=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Ss=rs,Cs=function(i){return rs(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ks=bs,ge="http://www.w3.org/XML/1998/namespace",Zt="http://www.w3.org/2000/xmlns/",As={__proto__:null,xml:ge,xmlns:Zt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,q=13,jt=33,ot=10,St=60,Gt=61,F=62,X=63,Jt=93,pe=i=>i===34||i===39,as=[34,39],Ps=[...as,91,F],Es=[...as,St,Jt],Vs=[Gt,X,...ns],Os=[...ns,F,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Zt&&i.fail(`xmlns prefix must be bound to ${Zt}.`)}switch(s){case Zt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Zt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Is=i=>ks.test(i),Ls=i=>ws.test(i),es={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Ns{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Ss,this.nameCheck=Cs,this.isName=Is,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...As};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=ts,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?q:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[es[t]]=s}off(t){this[es[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
7
+ `,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
8
+ `,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!ts(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!z(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=xs,this.getCode=this.getCode10):(this.isChar=vs,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=q,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case F:this.doctypeHandler?.(this.text),this.text="",this.state=q,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Es);t!==O&&(this.text+=String.fromCodePoint(t),t===Jt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===F?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===F&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
9
+ `,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===q&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=q,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==F?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=q}sCData(){this.captureToChar(Jt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Jt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case F:this.cdataHandler?.(this.text),this.text="",this.state=q;break;case Jt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||z(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||z(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:z(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===F){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=q}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Vs);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(z(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");z(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");z(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(z(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===F?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=q):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case F:this.openTag();break;case 47:this.state=35;break;default:z(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===F?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===F?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:z(t)?this.state=38:t===F?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===F?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):z(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();z(t)?this.state=36:t===F?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Os);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===F?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===F?this.closeTag():z(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case F:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=q,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Jt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case F:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
10
+ `),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=q,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
11
+ `),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:z(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Ns({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,D=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class Rs{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],P={key:null,source:t};let b=null,d=!1;const E=(y,m)=>{let I=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(I==null||(I=m[H](I),I==null))return}else if(I==null||(I=m(I),I==null))return}return I},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>E(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:E,copyToObject:(y,m,I,H)=>{const W=E(H??m,I);W!==void 0&&(y[m]=W)},copyTo:(y,m,I)=>{const H=E(I??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const I=m.indexOf(":");I!==-1&&(m=m.slice(I+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?P:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const I=m.indexOf(":");if(I!==-1&&(m=m.slice(I+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??P;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const ss=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},De=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),P=o.convert(w,i,n);return n?.parsedRefs?.set(i,P),P}catch(x){console.warn(x)}return null},Ut=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const P=De(w,b=>t.files[b],s,o,n);a.set(w,P)}return a},$s=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],Pe=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=$s[c]);let T=i("tint");if(T&&(s+=` ${u.T.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},ls=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),cs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},is={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Fs=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./DzE824T4cXRcKowY.cjs")),T=Promise.resolve().then(()=>require("./Df8ZAsCgZ69F33-C.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./CuldnUeQxpcu8oJ7.cjs")).then(d=>d.i));let w=null,P=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],P=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const E=new P.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.sf,m=y.beginPersist(),I={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Ee=[],ne=V=>d.files[V],fe=(V,U)=>{const Y=V.lastIndexOf("/"),ut=V.substring(0,Y+1)+"_rels/"+V.substring(Y+1,V.length)+".rels";let dt=U.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=De($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,E,yt),U.set(ut,dt)),dt},ae=(V,U,Y,ut=ht)=>{let dt=fe(U,ut).get(V),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=U.lastIndexOf("/"),xe=U.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=E?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((L,G,Qt,_,J,Z,wt)=>{const h=new Rs,Q=new u.De.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",D),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",D);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",D),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",D),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",D),e.copyTo("minLength",D),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=Pe(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",D,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",D,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Icon,e.copyTo("iconId",D),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",D),e.copyTo("hour",D),e.copyTo("minute",D),e.copyTo("month",D),e.copyTo("second",D),e.copyTo("year",D)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Td.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.Vr.fastStringToRange(p,is).colStart,pt=u.Vr.fastStringToRange(r.ref,is),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=cs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",D),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",D,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.Vr.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",D,"xSplit"),e.copyToObject(p,"rowIndex",D,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.Vr.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=Pe(l=>e.getAttribute(l));r&&(L.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",D),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",D),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(L,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(L,"outlineLevelCol",D,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(L,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(L,"outlineLevelRow",D,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",D,"outlineLevel"),e.copyTo("s",D,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const ms={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Dt=null,Yt=null,de=null,nt=null,$e=null,Me=null;const Ts=pt?.get("richData")??[],Fe=u.Vr.normalizeA1ToR1C1,je=u.D.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.D.createConflatingRanges();let ee,Pt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,zt="",Et="",Vt="",Ot="",It="",Lt="",Nt="",qe="",We="",_e="",ze="",Ue="",Ge="",Je="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const M=new Array(k);for(let N=0;N<k;N++){const at=g[N],$t=u.Vr.rangeToString(at),Mt=at.value[1],ie=u.Vr.resolveRelativeToA1(Mt,at.rowStart,at.colStart);M[N]=[$t,ie]}r.formulas=M}const st=Xe.done(!0),R=st.length;if(R>0){const M=new Array(R);for(let N=0;N<R;N++){const at=st[N],$t=u.Vr.rangeToString(at);M[N]=$t}r.volatile=M}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.D.createRangeComparator(u.k.Orientation.Column));const M=[];let N=null,at=-1,$t=-1,Mt=-1,ie=-1,vt=null;const Ze=Wt.length;Ze>0&&(N=Wt[0],at=N.colStart,$t=N.colEnd,Mt=N.rowEnd,ie=N.value,M.push(N));for(let Ft=1;Ft<Ze;Ft++)vt=Wt[Ft],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Mt+1!==vt.rowEnd?(M.push(vt),N=vt,at=N.colStart,$t=N.colEnd,Mt=N.rowEnd,ie=N.value):(Mt=vt.rowEnd,N.rowEnd=Mt);let Qe=[];for(let Ft=0;Ft<M.length;Ft++){const oe=M[Ft];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const M=it.tuples;r.data=M}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Dt=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Pt=!0)}return void(Pt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.Vr.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Pt=!0));let M=g.attributes.s;M!==void 0&&(M=parseInt(M),Rt&&Rt.value===M&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:M},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Et=g.attributes.customHeight,Et!==void 0&&(ft|=Ht.CustomHeight),Et!==We&&(mt=!0,We=Et),zt=g.attributes.ht,zt!==void 0&&(ft|=Ht.Ht),zt!==qe&&(mt=!0,qe=zt),Vt=g.attributes.hidden,Vt!==void 0&&(ft|=Ht.Hidden),Vt!==_e&&(mt=!0,_e=Vt),It=g.attributes.s,It!==void 0&&(ft|=Ht.S),It!==Ue&&(mt=!0,Ue=It),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==ze&&(mt=!0,ze=Ot),Lt=g.attributes.outlineLevel,Lt!==void 0&&(ft|=Ht.OutlineLevel),Lt!==Ge&&(mt=!0,Ge=Lt),Nt=g.attributes.collapsed,Nt!==void 0&&(ft|=Ht.Collapsed),Nt!==Je&&(mt=!0,Je=Nt),ft!==0)if(Be+1!==B||mt){const it=Et!==void 0&&(Et==="1"||Et==="true"),M=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&zt!==void 0?parseFloat(zt):-1,csz:it,h:Vt!==void 0&&(Vt==="1"||Vt==="true"),s:it&&It!==void 0&&It!=="0"?parseInt(It):0,cs:M,l:Lt===void 0||Lt==="0"?0:parseInt(Lt),cl:Nt!==void 0&&(Nt==="1"||Nt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Pt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Pt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=Ts[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.J.Error,v:R.getCode()};break}}}const k=u.Y.getBuiltInByLabel(g);k?gt={t:u.J.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.Vr.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Pt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Dt)if($e===Dt)nt=Me;else{if(nt=He.get(Dt),!nt){const k=[];de=Fe(g,B,K,k),nt=[de,k,g],He.set(Dt,nt)}$e=Dt,Me=nt}if(_t){const k=[];de=Fe(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Dt=null,void(Yt=null);Pt?C?.onText(g):rt||l?.onText(g)}}})(Q,L,h.createEventHandler(L,()=>{},Z),Z,ms,wt)})(tt,(L,G=!1)=>ae(L,$,G)??null,us,we,0,L=>{o&&(L=$+": "+L,o?.(L))},W),Bt=ss($,ne),xt=await(async(L,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./BB5pxJh1jhHsvVZ1.cjs"));global.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=L instanceof Uint8Array?L:new Uint8Array(L);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(L){throw console.warn(`Error parsing sheet: '${$}'`,L),new Error(`Error parsing sheet: '${$}'`,{cause:L})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const L="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,J)=>{_.type===L&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Re.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=ls(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ie.get(Q)),j||(j={id:u.F.uuidV4(),displayName:Q},Ie.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.F.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Ee.push(et())}else Xt=Y?ss($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(I),H.add(et),m.toResourceId(et)},yt):De($,ne,f,E,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:V=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const hs=d.Strings??[];for(let V=0;V<me;V++)le.push(hs[V]?.t??"");const Ve=new Map;let Oe=me;const us=V=>{const U=Ve.get(V);if(U!==void 0)return U;const Y=Oe;return Ve.set(V,Oe++),le.push(V),Y},ce=(Ut("richstructure",d,f,E,yt),Ut("richdata",d,f,E,yt),new Map),Ie=new Map,Le=Ut("people",d,f,E);let Ct=null;if(Le.size>0&&(Ct=Le.entries().next()?.value?.[1]?.persons,Ct)){const V=Ct.length;for(let U=0;U<V;U++){const Y=Ct[U];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=Ut("themes",d,f,E,yt);let Ne=null;if(Te&&Te.entries){let V=Te.entries().next();V?.value?.[1]&&(Ne=V.value[1])}const ds=new u.Ol(Ne);let he=Ut("styles",d,f,E,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.ea(he)));const ps=Ut("workbooks",d,f,E,yt);await Promise.all(Ee);const ye={...ps.entries().next().value[1],styles:he,theme:ds.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const gs={...n,resources:y,json:ye},fs=new u.Zy(gs);return H.forEach(V=>{V.deleteReference(I)}),m.endPersist(),fs}catch(d){let E="Unable to parse XLSX.";throw d instanceof u.Pe&&(E="Unable to open XLSX. There are too many rows or columns."),new Error(E,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./DzE824T4cXRcKowY.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((P,b)=>{const d={t:"z"},E=b.getCell().getStyle();if(!E.isNormal()){let f=E.getNumberFormat();f!==u.Ft.Type.General&&(f===u.Ft.Type.ShortDate?f="m/d/yyyy":f===u.Ft.Type.MediumDate?f="d-mmm-yy":f===u.Ft.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.Ft.Type.ShortTime?f="h:mm":f===u.Ft.Type.MediumTime?f="h:mm AM/PM":f===u.Ft.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(P!==null)switch(b.getType()){case u.J.Number:d.t="n",d.v=P;break;case u.J.String:d.t="s",d.v=P;break;case u.J.Boolean:d.t="b",d.v=P;break;case u.J.Error:d.t="e",d.v=P.toString();case u.J.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const P=[];T["!merges"]=P;for(let b=0;b<S.merges.length;b++)P.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const P=[];T["!cols"]=P;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let E=0;E<b.length;E++){const f=b[E];for(let m=P.length;m<=f.min-1;m++)P.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)P.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=cs,exports.c=i=>i?u.qt$1.roundAccurately(parseFloat(i)/9525,1):null,exports.d=Pe,exports.i=Fs,exports.p=i=>parseFloat(i)/6e4,exports.r=ls,exports.t=i=>i?u.qt$1.roundAccurately(parseFloat(i)/12700,4):null;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -10,4 +10,4 @@ Please use Chrome or Edge if external copy and paste is required.`,k=`You do not
10
10
  All copy and paste operations will be limited to the browser tab.`,jt={Safari:`The Safari browser does not support advanced copy and paste.
11
11
  Copy and paste will be limited to within the browser tab.
12
12
 
13
- 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=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{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})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!e?.source)return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./Dn1uL0GqyDGo3d67.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$=xt,exports.i=Gt;
13
+ 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=>{document.hasFocus()?e():globalThis.addEventListener?.("focus",()=>{e()},{once:!0}),document.activeElement.focus?.()}),B=async(e,t,r)=>{if(T()===y.Safari)return await r(new Error(jt.Safari));try{const n=async i=>{try{return await i()}catch(l){if(l.message?.includes("Document is not focused"))return!1;throw l}},o=await globalThis?.navigator?.permissions?.query({name:e,allowWithoutGesture:!0,allowWithoutSanitization:!0});let a=!1;if(o.state==="prompt"&&(a=await n(t)),a||o.state!=="granted"||(a=await t()),!a)return await r(new Error(o.state))}catch(n){return n.message==="No valid data on clipboard"||n.name==="DataError"?void 0:await r(n)}},Tt=async e=>{try{return await e.read({unsanitized:[h]})}catch{}return await e.read()};if(!globalThis.ClipboardItem){const e=(r,n)=>new Blob([n],{type:r});class t{constructor(n,o){this._items={},this._types=Object.keys(n);const a={},i=Object.keys(n);for(let l=0;l<i.length;l++){const s=i[l];let c=n[s];a[s]=typeof c=="string"?e(s,c):c}this._items=a,this._presentationStyle=o?.presentationStyle??"unspecified"}get types(){return this._types}getType(n){return Promise.resolve(this._items[n])}supports(n){return!0}}globalThis.ClipboardItem=t}const V=async(e,t=h)=>new Promise(async(r,n)=>{try{const o=await(async(a,i)=>{if(!a)return null;const l=await Tt(a);let s=!1;for(let c=0;!s&&l&&c<l.length;c++)if(s=l[c].types.includes(i),s)return await l[c].getType(i);return s?void 0:null})(e,t);if(o){const a=new FileReader;a.onload=()=>{r(a.result)},a.onerror=()=>{r("")},a.readAsText(o)}else r("")}catch(o){n(o)}}),dt=async(e,t=h)=>{const r=await V(e,t);if(!r)return null;let n=null;try{n=new DOMParser().parseFromString(r,h)}catch{console.warn("Can't parse html from clipboard.")}return n},C="clipboard-uuid",v="web text/uuid",ft=e=>`<div style="display:none" ${C}="${e}"/>`,Wt=(e,t)=>{let r=null;try{const n=new DOMParser().parseFromString(t,h);n.body.firstElementChild.setAttribute(C,e),r=n.getElementsByTagName("body")[0].innerHTML}catch(n){console.warn("Can't embed uuid.",n)}return r},pt=(e,t)=>{if(!t||!e)return!1;try{const r=t.querySelectorAll(`[${C}="${e}"]`);if(r&&r.length===1)return!0;if(t.querySelector("parsererror"))throw new Error("We are unable to parse node");return!1}catch{return!1}};class wt{constructor(t){if(t?.nativeClipboard===void 0||t?.nativeClipboard===!0)try{this._nativeClipboard=globalThis?.navigator.clipboard}catch{t?.nativeClipboard===!0&&console.warn("NativeClipboard option set to true but no native clipboard available.")}else this._nativeClipboard=t?.nativeClipboard===!1?null:t?.nativeClipboard;this._disableCheckOnFocus=t?.disableCheckOnFocus??!1,this._init()}async _checkForChanges(){this._nativeClipboard&&this._state&&!this._disableCheckOnFocus&&await B("clipboard-read",async()=>{await N();const t=await V(this._nativeClipboard,v);if(!this._state||t&&t===this._state.uuid)return!0;const r=await dt(this._nativeClipboard,h);return!this._state||(pt(this._state.uuid,r)||this.clear(),!0)},async t=>{t?.message==="denied"||t.message?.includes("Document is not focused")||T()===y.Safari||console.warn("Unable to detect clipboard changes: ",t)})}_init(){const t=this;this._listeners=new Map,this._listenersCapture=new Map,this._state=null,this._nativeClipboard&&(this._onFocus=()=>{t._checkForChanges()},this._onBlur=()=>{globalThis.addEventListener?.("focus",t._onFocus,{once:!0})},globalThis.addEventListener?.("blur",this._onBlur),this._nativeClipboard.addEventListener("clipboardchange",r=>{t._checkForChanges()}))}async read(){if(!this._nativeClipboard)return this._state?.items??null;const t=this;return await B("clipboard-read",async()=>{if(await N(),this._state?.uuid){const r=await V(this._nativeClipboard,v);if(r&&r===t._state.uuid)return!0;const n=await dt(this._nativeClipboard,h);if(pt(t._state?.uuid,n))return!0}return t._state={items:await Tt(this._nativeClipboard),uuid:null,ref:null},this.dispatchEvent(new Event("clipboardread")),!0},async r=>{this.dispatchEvent(new Event("clipboarderrorread"))}),this._state?.items??[]}async write(t){return this._write({uuid:R(),items:t,ref:null})}async _write(t){if(!this._nativeClipboard)return this._state=t,this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")),null;const r=this,n=[],o=t.uuid;let a=t.items??[];const i=()=>{r._state={uuid:o,ref:t.ref,items:n},r.dispatchEvent(new Event("clipboardwrite")),r.dispatchEvent(new Event("clipboardchange"))};await B("clipboard-write",async()=>{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})})));for(let l=0;l<Math.min(1,a.length);l++){const s=a[l];let c=s.types.indexOf(h),d=null;if(c!==-1){const f=await s.getType(h);d=await W(f),d&&(d=Wt(o,d))}if(!d&&s.types.includes(b)){const f=await s.getType(b);if(f){let p=null;typeof f=="string"?(console.warn("text as string",f),p=f):p=await W(f),p&&(d=`<div ${C}="${o}">${p}</div>`)}}if(!d&&s.types.includes(L)){const f=await s.getType(L),p=_t(await f.arrayBuffer());d=`<div ${C}="${o}"><img src="${Ot+p}"/></div>`}!d&&o&&(d=ft(o));const w=new Blob([d??""],{type:h}),u={};for(let f=0;f<s.types.length;f++){const p=s.types[f];u[p]=f===c?w:s.getType(p)}d&&c===-1&&(u[h]=w),o&&(u[v]=new Blob([o],{type:v})),n.push(new ClipboardItem(u))}try{n&&n.length!==0?await this._nativeClipboard.write(n):await(async l=>{l&&await l.writeText("")})(this._nativeClipboard)}catch(l){l.message?.includes("Document is not focused")||console.warn("Unable to write to native clipboard: ",l)}return i(),!0},async l=>{this.dispatchEvent(new Event("clipboarderrorwrite")),i()})}async writeReference(t){if(!t)return void this.clear();let r=null;const n={};try{const a=await t.toText?.()??null;a&&(n[b]=new Blob([a??""],{type:b}))}catch(a){r=a}try{const a=await t.toHtml?.()??null;a&&(n[h]=new Blob([a],{type:h}))}catch(a){r=a,console.warn("export to html",a)}try{const a=await t.toImage?.()??null;a&&(n[L]=a)}catch(a){r=a,console.warn("export to png",a)}const o=this._write({uuid:R(),ref:t,items:Object.keys(n).length>0?[new ClipboardItem(n)]:null});if(r)throw r;return o}clear(t=!1){this._state&&(this._state=null,t&&this._write({uuid:null,ref:null,items:null}),this.dispatchEvent(new Event("clipboardwrite")),this.dispatchEvent(new Event("clipboardchange")))}async readReference(){return await this.read(),this._state?.ref??null}readText(){return new Promise(async(t,r)=>{const n=await this.read();let o=null;for(let i=0;!o&&n&&i<n.length;i++)n[i].types.includes(b)&&(o=await n[i].getType(b));if(!o)return void t("");const a=new FileReader;a.onload=()=>{t(a.result)},a.readAsText(o),a.onerror=i=>{r(i)}})}async writeText(t){const r=[new ClipboardItem({[b]:new Blob([t],{type:b})})];return this._write({uuid:R(),items:r,ref:null})}addEventListener(t,r,n={}){const o=n?.capture?this._listenersCapture:this._listeners;let a=o.get(t);a||(a=new Map,o.set(t,a)),a.set(r,typeof n=="boolean"?{}:n)}dispatchEvent(t){if(!t)return;const r=n=>{const o=n.get(t.type);o&&o.forEach((a,i)=>{try{typeof i=="function"?i(t):i.handleEvent&&i.handleEvent(t),a.once&&o.delete(i)}catch(l){console.warn(l)}})};return r(this._listenersCapture),r(this._listeners),!0}removeEventListener(t,r,n){const o=n?.capture?this._listenersCapture:this._listeners,a=o.get(t);a&&(a.delete(r),a.size===0&&o.delete(t))}close(){globalThis.removeEventListener?.("focus",this._onFocus),globalThis.removeEventListener?.("blur",this._onBlur)}}var z;(z=wt||(wt={})).ErrorMessages=jt,z.Global=new z;let ht=null,q=null,M=null;const Vt=Object.freeze({compileTypescript:async function(e){if(!e?.source)return null;if(q&&xt.deepEqual(q,e))return ht;const t=await async function(){if(M)return M;const{TypeScriptCompiler:n}=await Promise.resolve().then(()=>require("./B2kFbeodTh3Gk-aQ.cjs"));return M=new n,M}(),r=await t.compileModule(e);return ht=r,q=e,r}}),Gt=Object.freeze(Object.defineProperty({__proto__:null,ScriptingUtils:Vt},Symbol.toStringTag,{value:"Module"}));exports.$=xt,exports.i=Gt;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.2
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("react"),t=require("./BnZdvx8z2BIDZv9J.cjs"),h=a.memo(p=>{const{title:y,onHide:f,autoFocusSel:b=".range-input input",context:j,notifier:l=t.h2,command:r,commands:c,...w}=p,[S,d]=a.useState(!1),[g,x]=a.useState(!1),m=a.useRef(null),[D,C]=a.useReducer(e=>e+1,0),[B,{width:P}]=t.f1();t.yi(r);const i=j??r.context(),o=i.table(),[v,N]=a.useState(()=>o?i.getNames().getRanges(o.getRange()):null),R=a.useMemo(()=>o?.getName()??"",[o]);t.tn(i.table(),{onAnchorCoordsChange(e){N(i.getNames().getRanges(e.getRange()))},onProtectedChange(e){C()}});const T=t.ye(e=>{i?.table().setName(e)},[i]),F=t.ye(e=>{i?.table().resize(e.at(0))},[i]);let u=null;return i.table()||(u=n.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:1,display:"flex",alignItems:"center",justifyItems:"center",justifyContent:"center",boxSizing:"border-box"},children:n.jsx("div",{children:"No table selected"})})),n.jsx(t.zw,{title:y??"Table Details",initialPosition:{y:"35"},autoFocusSel:b,refWindow:m,onHide:f,onFocus:()=>d(!0),onBlur:e=>{m?.current?.contains(e.relatedTarget)||d(!1)},PaperProps:{elevation:S?3:1},...w,children:n.jsxs(t.DialogContent,{dividers:!0,ref:B,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[n.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:i.table()?1:0},children:[n.jsx(t.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:n.jsx(t.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:n.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[n.jsx(t.VE,{formName:"name",defaultInput:R,value:o?.getName()??"No table",onChangeInput:T,onValidate:e=>{o&&o.getName().toLowerCase()===e.toLowerCase()||i?.getNames().validateName(e)},disabled:o?.isProtected()??!0,onFocus:e=>{g||e.target?.select(),x(!0)}}),n.jsx(t.BE,{formName:"range",value:v,onChangeInput:F,resolvedAddress:i.getNames().getRanges.bind(i.getNames()),disabled:o?.isProtected()??!0,onFocus:e=>{g||e.target?.select(),x(!0)}})]})})}),n.jsxs(t.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[n.jsx(t.Ft$1,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),n.jsx(t.yM,{disabled:o?.isProtected(),styleOptions:o?.getStyleOptions()??null,onStyleOptionsChange:e=>{o.updateStyleOptions(e)},showHeaderRow:o?.getShowHeaders(),onShowHeaderRowChange:e=>{try{o.setShowHeaders(e)}catch(s){l.showError(s)}},showTotalRow:o?.getShowTotals(),onShowTotalRowChange:e=>{try{o.setShowTotals(e)}catch(s){l.showError(s)}},showFilterButton:o?.getFilter()?o.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{o.setShowFilterButton(e)}catch(s){l.showError(s)}}}),n.jsx(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:n.jsx(t.IE,{table:o,styles:i.styles(),bodyStyle:i.bodyStyle(),cellHeight:30,isLive:!0})}),n.jsx(t.Ft$1,{orientation:"horizontal"}),n.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[n.jsx(t.Pe$1,{variant:t.Kt.Menuitem,command:c.getCommand("convertTableToRange"),commandState:o,icon:t.ke(n.jsx(t.js,{}))}),n.jsx(t.Pe$1,{variant:t.Kt.Menuitem,commandState:o,command:c.getCommand("deleteTable"),icon:t.ke(n.jsx(t.js,{}))})]})]})]}),u]})})});exports.TableDetailsWindow=h,exports.default=h;