@sheetxl/mcp 0.8.0-beta.15 → 0.8.0-beta.17

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 (234) hide show
  1. package/LICENSE.md +8 -7
  2. package/agent/instructions.md +15 -4
  3. package/assets/{Cf9LpgZz-W5blzy_.js → -cMvbaW1kvHslPKX.js} +3 -3
  4. package/assets/{BFdeov2e_xUQPEY_.js → 0kfwZuOHUkJmVjg6.js} +7 -7
  5. package/assets/{B7gUyrfLln3TiyKM.js → 1feDuXw6tBXu2XFg.js} +2 -2
  6. package/assets/{BbAmA46MhQSu3ZF_.js → 4qMP71Fe1Ep8kbOX.js} +2 -2
  7. package/assets/{CduNzsdbTigxH-ZK.js → 7TRx0dMYnL2i4tqL.js} +163 -163
  8. package/assets/{DEW2GxfGYqVFvrfg.js → 8cVPexxAVrFJ9QLX.js} +2 -2
  9. package/assets/{C4z2IilWTuu2TWXw.js → APP8AzsNgQXHTalA.js} +3 -3
  10. package/assets/{BleMG0hAQgjE8fTa.js → AnF1Kh3Vo2AniIYO.js} +3 -3
  11. package/assets/{C0CiMKC3lWK1z9p5.js → B2BfjRdJGZs6afVL.js} +3 -3
  12. package/assets/{BFXeoFUbuc4IKTz9.js → B2UxLSteMiPlg8Uu.js} +2 -2
  13. package/assets/{BJxfinOazQqqByc-.js → B3mh2tuvP-lMP6f_.js} +2 -2
  14. package/assets/{PpFbmF0DFeUdpb9I.js → B6NnxkSmEzCGZEZA.js} +2 -2
  15. package/assets/{xmTQJJVyCrcq77WR.js → B7Nqa7V-v0cxGBux.js} +2 -2
  16. package/assets/{DsCI_ZYm_jDjXF3J.js → B7OyFSpBb1eBvMVd.js} +52 -52
  17. package/assets/{ClNQN3vEg5b5qUDp.js → B8JX7a6VZlBNA_Bd.js} +2435 -2447
  18. package/assets/{DPCKMM7sgWbrtB8z.js → B9J8nV-dh6jHpzZI.js} +2 -2
  19. package/assets/{BuUEsifnQALe49uk.js → B9M_sgHpoc-op6FF.js} +2 -2
  20. package/assets/{BeLr36oL3jmeXFFi.js → BBC_WF8BcAH-k_cQ.js} +2 -2
  21. package/assets/{B5lHOOQ_rkP4Mi2r.js → BGZ_ltNFYvnAmbVR.js} +2 -2
  22. package/assets/{iujMYIEPx_v3sdPf.js → BJBoygm-gY68bLAP.js} +996 -995
  23. package/assets/BJdWgj1hv57eGVl4.js +2039 -0
  24. package/assets/{DcWTBOi_iBFc6U4J.js → BKRLtOdVOUTrLjQN.js} +8 -8
  25. package/assets/{DpdHDTFOeuzDVNEe.js → BKjovBsLpX2Fkhov.js} +78 -77
  26. package/assets/{BCy1zP97fsiIcvj6.js → BMJhHHX2LWgOJWGz.js} +2 -2
  27. package/assets/{fDMpDhXp36CatF-G.js → BOx4Ut_Rme7NH34X.js} +2 -2
  28. package/assets/{9U9XCqqdn-q3i2fj.js → BQYpVYbvfWuUJgdx.js} +2 -2
  29. package/assets/{DJiLWtmPR2OQNjzi.js → BS4ZsfH5D6aemSpO.js} +2 -2
  30. package/assets/{BlPubAFi7DY7VrAo.js → BSAdmOdx3brRE9LW.js} +2 -2
  31. package/assets/{BtjqpAKczftx91BQ.js → BSY9Tbmz6VEY_F_x.js} +2 -2
  32. package/assets/{S16s2h9qoYVBlVEa.js → BT8AGlSg2t7V1QNj.js} +1454 -1366
  33. package/assets/{Dz8UUJ7Xc2oN5PBG.js → BUV7BlOZcuPgDZ__.js} +2 -2
  34. package/assets/{B2udpZ-uIaql3AUh.js → BX5xFncPLyeN7TqA.js} +6 -6
  35. package/assets/{CGBGyaCGdlZFQYK0.js → Bcak_hZpcIkB2gJD.js} +2 -2
  36. package/assets/{vZZi_iKYHm05gAye.js → BdijGsy5W7yZ_I_n.js} +2 -2
  37. package/assets/{CMWAsUQ66V8fYrME.js → BebXDUnlrDDRGW60.js} +3 -3
  38. package/assets/{wfVh0olISLRWdv9Q.js → BgldX21zhey2aR9D.js} +2 -2
  39. package/assets/{SHZe9VOU1prGs1F9.js → BhCbCEPpDzhg5nqL.js} +2 -2
  40. package/assets/{ZuYfVKlp41IJnrOS.js → Bj4BFLBC9Tf6SGSt.js} +2 -2
  41. package/assets/BjhAYfsKC8iEbtgn.js +169 -0
  42. package/assets/BjnQVl1lb1KEbt2D.js +529 -0
  43. package/assets/{CWl6oHiJxkNKRixk.js → BlbxiLf1zD6_fWZs.js} +2 -2
  44. package/assets/{BjqQjxBuoXza8oqg.js → BmM-nHMAAuNatCcN.js} +3 -4
  45. package/assets/{DD8HNAUFroTCuD-b.js → Bni-y4FJS4rkFYtn.js} +3305 -2147
  46. package/assets/{Cfhv_Yw_LT8VzAMt.js → BodrfKIAhDFD-X3t.js} +2 -2
  47. package/assets/{D8J14MLlN2HRXdXB.js → BvDcHHJvQMRHthm-.js} +2 -2
  48. package/assets/{hulrR0PldUxMJm_F.js → Bw_FtA-1886HMCLJ.js} +4 -4
  49. package/assets/{BOPsJmq7v7HOKUkO.js → Bxkx8QokmRNyXbOI.js} +12 -12
  50. package/assets/{CNz3LdmvsOEJoLO9.js → Bz1ImBvJwPwBrA5j.js} +2 -2
  51. package/assets/C2NPIWe0pLs3PAZM.js +7 -0
  52. package/assets/{LEJp05fjmflKgyqF.js → C2ZX6ffXsMaEr2d2.js} +452 -448
  53. package/assets/{Bg95xYj5siqhHVEz.js → C3Q-fjiZZ15waCq_.js} +3 -3
  54. package/assets/{CJ5WQnaoCsdr5gf4.js → C46RpMrfF6FiEFI7.js} +2 -2
  55. package/assets/{ChWpsFGl-BYOnX_A.js → C4deMY87Q_haYyLF.js} +2 -2
  56. package/assets/C7iHn3y3HVBHflpA.js +2563 -0
  57. package/assets/{C7ONfuYIWRmDu_vs.js → CJF3P7U7yBQVF2Cg.js} +2 -2
  58. package/assets/{DvUUArnZwoYOKOuk.js → CLgvdaqeFlESLvbF.js} +2 -2
  59. package/assets/{Crt2kLdGIlBHANgg.js → CLze192iF2o-aETZ.js} +2 -2
  60. package/assets/{F_f0jJqM5MrXGbwC.js → CMRLNLqYkiqCLMRa.js} +4 -4
  61. package/assets/{D-ffk16w8c5w0mxI.js → COa691om4fLN4CUy.js} +2 -2
  62. package/assets/CSLLHl-zum7m1CJl.js +14 -0
  63. package/assets/{DVchxwp6w6lu2Ihu.js → CUbCBf24Ie4A2l4R.js} +3 -3
  64. package/assets/{xnhBSX6lAcmBM65y.js → CWLleOolFzyT0COW.js} +2 -2
  65. package/assets/{Cg51xaLRUkVOMdCZ.js → CaJ9j3l0cERnYqDS.js} +2 -2
  66. package/assets/{BQMDOjNBMjAx9WiW.js → CfA8o-FNret9-D6Y.js} +2 -2
  67. package/assets/{BbcUxIZe3YXywsQR.js → Cl7HHR6Vc9S4n3AP.js} +2 -2
  68. package/assets/{BG5kgbDRXMc0re6W.js → CqjNsZ2OB4Kx6J3s.js} +9 -9
  69. package/assets/{By-7OWXShMlFFejV.js → CqwEHSKivMYw7tRZ.js} +2 -2
  70. package/assets/{BTQhJQ3e0hsiousD.js → Cr6lm0oXZJaaoAmD.js} +2 -2
  71. package/assets/{CudNpUD78SrtJIiy.js → CshK6Ew7OQ7mngI3.js} +3 -3
  72. package/assets/{DoILAmhKUOlKWRVw.js → CsiIgnb_L2x2Go6g.js} +2 -2
  73. package/assets/{Bn8D2bebQ2tFfwQt.js → CtmrBbpapaNwjwNB.js} +47 -45
  74. package/assets/{Diee6f_qAmcZBd2_.js → CwRhhoL5ynbe78dB.js} +2 -2
  75. package/assets/{DDnwKPJSznyfYDZS.js → CyI1eGGzJX8nJXaT.js} +3 -3
  76. package/assets/{BRzp6DEIYUgM3NkN.js → Cz4H3Qge2u8er3Ny.js} +4 -4
  77. package/assets/{D7oUtYjetuykGhQ5.js → D0OQ6ka8so0BWPwL.js} +2 -2
  78. package/assets/{_fUXIv6nKvgZkhxn.js → D336KioeSjd-T8n3.js} +3 -3
  79. package/assets/D5L35C8cbX16BSCF.js +4676 -0
  80. package/assets/{jadLBUNBVR9mbZ35.js → D5VFuX1h50V2jLmZ.js} +830 -515
  81. package/assets/{Bh0PNKlrR4VAqnP8.js → D6ON3ZLcTAXV3fO6.js} +35694 -30239
  82. package/assets/{LyLlBk--VJD2V-f8.js → DDhPOQPc-lpyZrUJ.js} +34 -34
  83. package/assets/{FzNG48GE_wso6RII.js → DE4xC78p5UtS7wH6.js} +2 -2
  84. package/assets/{OVRdpPUzR0-ueTxE.js → DF7-oRscXc_vkMo8.js} +2 -2
  85. package/assets/{CMK6tIDVqYYvK4GZ.js → DMuOMpgIhVgB3eG8.js} +2 -2
  86. package/assets/{CecTe22WURiXbVdY.js → DPKeRb9GKmh_WCPv.js} +386 -372
  87. package/assets/{oxjm7Yr7u7MeaO5P.js → DSsH28SW8CMrSL-q.js} +2 -2
  88. package/assets/{Btys7KwtvV3hz2F6.js → DV6WSFmSEKfb3d2s.js} +109 -109
  89. package/assets/{JO3zH9hupFSV6vj2.js → DYJcfrNUUJQtxXWX.js} +2 -2
  90. package/assets/{BZPTaa0WjpoUAbgZ.js → D_peM8fbRgGaWvpq.js} +2 -2
  91. package/assets/{DTfl-4Iboi6TQU5m.js → DeEZvPW-VvlE28oE.js} +4 -4
  92. package/assets/Dgi2xwb2DN2Gybj3.js +7 -0
  93. package/assets/{Cf2dcwmmmf13Rywg.js → DidhZpf9qJAei29Y.js} +2 -2
  94. package/assets/{DB-tkqI6wFXDKEfB.js → Dkg-LQVsZlrHk7A8.js} +2 -2
  95. package/assets/DnTfXqCnRCe-1QYI.js +199 -0
  96. package/assets/{B9US2ZrF93KOjmAx.js → DoBvgI3Ry8DlGzwQ.js} +2 -2
  97. package/assets/{DH7sGHzxUqIQkDnd.js → DrHVew6gwOB6oxCn.js} +2 -2
  98. package/assets/{CvngwB17_ve4W49b.js → Dre79rTMoYYikNuB.js} +69 -69
  99. package/assets/{_d5XJ7dn1CKKYrep.js → DsCNtBR5jCeqmLBS.js} +3 -3
  100. package/assets/{jPUOH4FHF4b-rapv.js → Dzz3yrKbECzg6caR.js} +2 -2
  101. package/assets/{BrcQmHcE7Hcr1erJ.js → FvxN6PPps-rNPDo8.js} +2 -2
  102. package/assets/G2Wjyx_ETCAcofwm.js +7166 -0
  103. package/assets/{CXHslDxkWCuEcCSQ.js → IGAV8DdYH32cW8XU.js} +2 -2
  104. package/assets/{U1XXGEPuuqIAzYl1.js → Jd71-QCmFEcDcYSw.js} +2 -2
  105. package/assets/{B-MqXm_7luDLwazY.js → Ljri8sTW3dWT4clD.js} +2 -2
  106. package/assets/{BQbF1RkUH8WyXqSD.js → MW2nt7se27FlH9Yb.js} +25 -19
  107. package/assets/{FS9NbEKgQvz5wqvZ.js → Mgs_OJP41a-Nfac3.js} +2 -2
  108. package/assets/{DwLZpYUp85UHBE3H.js → OHBzl-tZOi9Ni8YV.js} +2 -2
  109. package/assets/{DA_ar3QKLKtJ9fJD.js → PbBzI4PlKpCgULLd.js} +2 -2
  110. package/assets/{C7Z1li2XjWi6bkrp.js → UH_biJmLrI9SvckA.js} +4 -4
  111. package/assets/{DlBdhv6NHgrNp5Yo.js → Xe7sA_mEwDQpJjcF.js} +3 -3
  112. package/assets/{D0CHDsemn0S31ltt.js → YFiGplEq1G4XdCJ2.js} +2 -2
  113. package/assets/{DKLm4nWzynGw1Kr9.js → YQtUMMGmb1_WFsh_.js} +2 -2
  114. package/assets/{B4VnJacrzr1x4PHR.js → dcvgOfBmWFTsXoT8.js} +5 -5
  115. package/assets/{C2OrZ8LZ-TI6eYG0.js → iBgLe32XErisaUSr.js} +2 -2
  116. package/assets/{B2Ek-DWpZMGJ0V1Z.js → kpS1vY0DcE9p8JnI.js} +3 -3
  117. package/assets/{CxjchwpiqxPM1XKd.js → lcIaYgz4tQGBlzlo.js} +80 -80
  118. package/assets/{CwPBmcY6xSP8dNlh.js → nQbVdQrfdz3osBdi.js} +12 -12
  119. package/assets/{DwWngYJTgC0KLbih.js → oJNJQJEDQCsjHSmo.js} +2 -2
  120. package/assets/{BPwmBu_aouERJjiW.js → qgW-p2sFhMtuu5yw.js} +2 -2
  121. package/assets/{C97xDe_wBbLZh_uW.js → z24-oIqP_fu2hsOt.js} +2 -2
  122. package/assets/{BsQZI1vXTRE63Zy-.js → z7nDK_gfX7G37XbZ.js} +345 -235
  123. package/index.js +1976 -1910
  124. package/lib.js +2 -2
  125. package/licenses/dependencies.txt +245 -180
  126. package/package.json +4 -9
  127. package/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
  128. package/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
  129. package/screenshot-page/assets/{CSUd8n1H0VBfREnk.js → -N4OYIMgf6f5vgNy.js} +1 -1
  130. package/screenshot-page/assets/7Xk_eQAcM_HgWrOC.js +1 -0
  131. package/screenshot-page/assets/B1W17rc9ilPFCh31.js +1 -0
  132. package/screenshot-page/assets/B8UkvH0o9n_G5UO9.js +3 -0
  133. package/screenshot-page/assets/{DQWHkaQeNXft9j8b.js → B8qybUclSjEYP5FJ.js} +2 -2
  134. package/screenshot-page/assets/{DXQLzGmxoyN3kfQi.js → BD96fN2dSVuoME09.js} +7 -7
  135. package/screenshot-page/assets/BE8ea8S0Q-qogeEs.js +2 -0
  136. package/screenshot-page/assets/{BUjI304IvdJnFXH3.js → BKwVcuWOKeH2xREA.js} +1 -1
  137. package/screenshot-page/assets/{BcOdl17EeFSxnAiq.js → BMf827t1Ul65MHd5.js} +1 -1
  138. package/screenshot-page/assets/BMwQInar0xVS5FRu.js +1 -0
  139. package/screenshot-page/assets/BNMBa8EZgWX2Eb3c.js +1 -0
  140. package/screenshot-page/assets/{Bf7xq8PyF4ohjMzP.js → BQCyH9YbEgnH78Ke.js} +2 -2
  141. package/screenshot-page/assets/{D6Jpaz2YkhOfzxDB.js → BYQZ8o8k3-MDoNat.js} +1 -1
  142. package/screenshot-page/assets/BcDxaEii3arJqOym.js +1 -0
  143. package/screenshot-page/assets/Be-rukvcufhLamH5.js +1 -0
  144. package/screenshot-page/assets/{CZf9s6otzzoaBlSs.js → BftXEPOuf5Uwxpud.js} +1 -1
  145. package/screenshot-page/assets/{TfhknTx8vxQkw4zV.js → Bh33WyohJvbKZVQN.js} +2 -2
  146. package/screenshot-page/assets/{CykecBozGGFl26KA.js → Btgo0VFTT0JxuaP3.js} +74 -68
  147. package/screenshot-page/assets/C2ty_K_uix4ooip6.js +1 -0
  148. package/screenshot-page/assets/{B-KIwD5F_5S-NsPg.js → C71ZZMVLfHdPl441.js} +1 -1
  149. package/screenshot-page/assets/C9mUKjQ3yEzRu9j2.js +2 -0
  150. package/screenshot-page/assets/{hp_-JA1DMK4Yoztn.js → CB2mQ5rbaSw2W4ik.js} +23 -23
  151. package/screenshot-page/assets/{CIged53b3hHKxa-o.js → CCVAsuUimIJOkBnk.js} +1 -1
  152. package/screenshot-page/assets/CFfgJlXaIS8QMx5O.js +1 -0
  153. package/screenshot-page/assets/{DGXDfjkGZjMRAXPg.js → CN8u05DjKwNHbUHN.js} +1 -1
  154. package/screenshot-page/assets/COoMVTzF50qBNFEu.js +39 -0
  155. package/screenshot-page/assets/CSMEGhAHxl5-4FxB.js +1 -0
  156. package/screenshot-page/assets/{BSdFVGZNhU6YHbMI.js → CT7cY57t9j1sBhAy.js} +1 -1
  157. package/screenshot-page/assets/{l32n8O_A78Qqduv3.js → CTjUtxDw6Z2I9OGc.js} +1 -1
  158. package/screenshot-page/assets/CUZobZ3mfNAdEisS.js +1 -0
  159. package/screenshot-page/assets/{DmbuCapSSCYIa3yk.js → C_OuKbe6z1it80cj.js} +1 -1
  160. package/screenshot-page/assets/{CpbohdgEaEsVDi9J.js → C_vPl50T1L5HWnhv.js} +1 -1
  161. package/screenshot-page/assets/Cbcv49b9jWyY4HKj.js +2 -0
  162. package/screenshot-page/assets/{CbUDukmvDZmVfhJH.js → CfkssmHURDicfYvR.js} +1 -1
  163. package/screenshot-page/assets/CtZFqwLoeJOvwFrl.js +42 -0
  164. package/screenshot-page/assets/Cz6KFmsp267l_VZS.js +1 -0
  165. package/screenshot-page/assets/{DDQWM8rNYCYzKa9R.js → D0koRjO2KnWQ1fNV.js} +1 -1
  166. package/screenshot-page/assets/D6CzedWHXTesD55R.js +1 -0
  167. package/screenshot-page/assets/DCP8JXEeiwAMiVD2.js +1 -0
  168. package/screenshot-page/assets/DEpn6VGd30cHEJOS.js +1 -0
  169. package/screenshot-page/assets/DQAZPADvH5lhlMnK.js +1 -0
  170. package/screenshot-page/assets/DQBUH0j44Vtrykua.js +13 -0
  171. package/screenshot-page/assets/{CqR3hGrC956TkCMj.js → DRncpwDkZZX8rL9S.js} +1 -1
  172. package/screenshot-page/assets/DSKOOgcJQeqIc9Us.js +3 -0
  173. package/screenshot-page/assets/DTrnAtpccj55fGg5.js +1 -0
  174. package/screenshot-page/assets/{Bj-vfAT28PK-tWWa.js → DXaM3CulPA3aPGV1.js} +2 -2
  175. package/screenshot-page/assets/{BFaiQZKle44Rhyou.js → D_rtIYQ7FDC2CoEn.js} +1 -1
  176. package/screenshot-page/assets/{BTboCICZ-951XWsi.js → DcUOAH274IbYOuK1.js} +1 -1
  177. package/screenshot-page/assets/{gG0AFZ45VxS_moMw.js → DdXSKhFUAsKUsQ1u.js} +1 -1
  178. package/screenshot-page/assets/{DyLWQxXXTw5uwPVy.js → DeyRZ5rprDbRbuf4.js} +1 -1
  179. package/screenshot-page/assets/{D47ePD4x1lVazNdl.js → DgtqX4DiBgkepVZZ.js} +1 -1
  180. package/screenshot-page/assets/Djl40tfWoPJSvqtv.js +1 -0
  181. package/screenshot-page/assets/{BUGXf2DEBog16Slb.js → DqXO_Zw1Cp7rAQ04.js} +2 -2
  182. package/screenshot-page/assets/{21oAESJyBGXeHegm.js → DtihumgXQ7ETaN0A.js} +2 -2
  183. package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +2 -0
  184. package/screenshot-page/assets/{BHqg55S-4_OoAu3P.js → LYyM_ig973jLdOU0.js} +2 -2
  185. package/screenshot-page/assets/TCImIYUUdVD4Z35I.js +1 -0
  186. package/screenshot-page/assets/Tph2vYqw17-NBCtd.js +1 -0
  187. package/screenshot-page/assets/XgsioU5Px1T5gKAY.js +1 -0
  188. package/screenshot-page/assets/dQsis-90Up-pIkSq.js +4 -0
  189. package/screenshot-page/assets/dXn1GWWjYmuLb1HF.js +586 -0
  190. package/screenshot-page/assets/nM1r2xslndIMKlI2.js +2 -0
  191. package/screenshot-page/index.html +12 -12
  192. package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
  193. package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
  194. package/types/scripting-api.json +9967 -9497
  195. package/types/scripting-enums.json +27 -0
  196. package/types/scripting.d.ts +2282 -166
  197. package/assets/BBb_3gEGzmEzbTIk.js +0 -359
  198. package/assets/BSxTn2BhkEEeF9x_.js +0 -2346
  199. package/assets/CWVWdbY1B1-WLl9k.js +0 -199
  200. package/assets/CZTSZL3T_f-vSXqM.js +0 -7
  201. package/assets/DaoSWy3EFlqpZaLr.js +0 -4437
  202. package/assets/Dht2mcOSyYlPY32b.js +0 -14
  203. package/assets/DkibD_CEVePaoj_y.js +0 -7
  204. package/assets/jiEe5eKV3BFPBWfi.js +0 -6294
  205. package/screenshot-page/assets/0MTaPYjKud2Q9QG9.js +0 -1
  206. package/screenshot-page/assets/B2MJPcMcsuv6FekC.js +0 -1
  207. package/screenshot-page/assets/B4PbXdzBe9BsoZ0e.js +0 -2
  208. package/screenshot-page/assets/BQfe-XTIOGeUnD9B.js +0 -1
  209. package/screenshot-page/assets/BTMW3ukmc44U2fy7.js +0 -1
  210. package/screenshot-page/assets/B_W2QroTKADz3ABp.js +0 -2
  211. package/screenshot-page/assets/BksaQEoZr5OWq-_d.js +0 -3
  212. package/screenshot-page/assets/BnoVwUBEor8NgQNs.js +0 -4
  213. package/screenshot-page/assets/BzQ5GyiXq8gTz-H-.js +0 -1
  214. package/screenshot-page/assets/C2Wh2h27c7FUb8Yk.js +0 -1
  215. package/screenshot-page/assets/C81mK8aZKZAAS-AB.js +0 -1
  216. package/screenshot-page/assets/Ca6nxdhEuLLty3d7.js +0 -2
  217. package/screenshot-page/assets/CwqNb7JYzC03lCj0.js +0 -1
  218. package/screenshot-page/assets/CzhH7lTYQrYGHct6.js +0 -1
  219. package/screenshot-page/assets/D66vSE1ConAuENmB.js +0 -586
  220. package/screenshot-page/assets/DCVUZ_ayOXFwV2d_.js +0 -3
  221. package/screenshot-page/assets/DFE-fKq5NV7_O8V6.js +0 -1
  222. package/screenshot-page/assets/DK_QSosKV62NDcuT.js +0 -42
  223. package/screenshot-page/assets/DTFRGj188QuLKEXw.js +0 -1
  224. package/screenshot-page/assets/DXWWyJlMSWgDFxs1.js +0 -10
  225. package/screenshot-page/assets/DZDRRw-62D6Zw7qs.js +0 -1
  226. package/screenshot-page/assets/DeAKjatTVaZ0u_FY.js +0 -1
  227. package/screenshot-page/assets/Dsx0NUmGIxS7SvZ8.js +0 -1
  228. package/screenshot-page/assets/IRtoU5oVgBWu9rnK.js +0 -2
  229. package/screenshot-page/assets/Q5EKmzoJZCE81Om-.js +0 -2
  230. package/screenshot-page/assets/VvqAh6BWzaD5OUPF.js +0 -1
  231. package/screenshot-page/assets/fGlPAximvsxzPzGA.js +0 -1
  232. package/screenshot-page/assets/rPOkVKdPbFpTG6AY.js +0 -1
  233. package/screenshot-page/assets/sHBomL5R4-_px8rD.js +0 -1
  234. package/screenshot-page/assets/skRJ2qjA7kcmnOsh.js +0 -39
@@ -1,36 +1,36 @@
1
1
  /**
2
- * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.15
2
+ * @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { ht as e } from "./BQMDOjNBMjAx9WiW.js";
8
- import { a as t } from "./iujMYIEPx_v3sdPf.js";
9
- import { a as n, c as r, d as i, o as s, p as l } from "./BQbF1RkUH8WyXqSD.js";
10
- import { Ai as o, B as a, Fi as u, Fr as c, Gr as f, In as p, Mn as d, Mt as g, Pt as v, U as h, Xt as m, Yt as y, _i as I, bi as b, c as x, ea as R, ei as E, f as T, fr as A, gi as S, gr as w, ha as C, ir as N, it as F, mr as P, mt as L, ni as k, ra as $, ta as O, va as B, y as V } from "./Bh0PNKlrR4VAqnP8.js";
11
- var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e, t) => w(e - t, e), U = (e, t) => A(e * t), _ = (e, t) => 0 === t ? i.BuiltIn.Div0 : A(e / t), j = (e, t) => {
7
+ import { ht as e } from "./CfA8o-FNret9-D6Y.js";
8
+ import { i as t } from "./BJBoygm-gY68bLAP.js";
9
+ import { a as n, c as r, d as i, o as s, p as l } from "./MW2nt7se27FlH9Yb.js";
10
+ import { At as o, Ea as a, Er as u, Fi as c, H as f, Ht as p, Jr as d, Lt as g, Ma as v, R as h, Rn as m, St as y, _a as I, an as b, bt as x, cn as R, d as E, f as T, gn as A, ia as S, jn as w, kn as C, mr as N, or as F, pn as P, t as L, ti as k, u as $, wa as O, yi as B, z as V } from "./D6ON3ZLcTAXV3fO6.js";
11
+ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => c(e + t, e), W = (e, t) => c(e - t, e), U = (e, t) => B(e * t), _ = (e, t) => 0 === t ? i.BuiltIn.Div0 : B(e / t), j = (e, t) => {
12
12
  if (0 === e) {
13
13
  if (t < 0) return i.BuiltIn.Div0;
14
14
  if (0 === t) return NaN;
15
15
  }
16
16
  if (e < 0) {
17
- if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return A(e ** t);
17
+ if (Number.isInteger(t) && Math.abs(t) <= 4294967294) return B(e ** t);
18
18
  const n = Number((1 / t).toPrecision(15));
19
- return Number.isInteger(n) && 1 === Math.abs(n % 2) ? A(-((-e) ** t)) : NaN;
19
+ return Number.isInteger(n) && 1 === Math.abs(n % 2) ? B(-((-e) ** t)) : NaN;
20
20
  }
21
- return A(e ** t);
21
+ return B(e ** t);
22
22
  }, G = (e = "", t = "") => {
23
23
  null === e && (e = ""), null === t && (t = "");
24
24
  const n = typeof t;
25
- "boolean" == typeof e && (e = F(e)), "boolean" === n && (t = F(t));
25
+ "boolean" == typeof e && (e = f(e)), "boolean" === n && (t = f(t));
26
26
  const r = "" + e + t;
27
27
  return r.length > s.MAX_TEXT_LENGTH ? r.slice(0, s.MAX_TEXT_LENGTH) : r;
28
- }, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n), K = (e, t = null, n = null) => e.compare(t, n) > 0, Z = (e, t = null, n = null) => e.compare(t, n) >= 0, q = (e, t = null, n = null) => e.compare(t, n) < 0, Y = (e, t = null, n = null) => e.compare(t, n) <= 0, J = {
28
+ }, H = (e, t = null, n = null) => 0 === e.compare(t, n), X = (e, t = null, n = null) => 0 !== e.compare(t, n), K = (e, t = null, n = null) => e.compare(t, n) > 0, Z = (e, t = null, n = null) => e.compare(t, n) >= 0, q = (e, t = null, n = null) => e.compare(t, n) < 0, J = (e, t = null, n = null) => e.compare(t, n) <= 0, Q = {
29
29
  type: l.Number,
30
30
  coerce: [l.Boolean, l.String],
31
31
  onError: "value",
32
32
  misalignValue: i.BuiltIn.NA
33
- }, Q = {
33
+ }, Y = {
34
34
  type: l.String,
35
35
  coerce: [l.Boolean, l.Number],
36
36
  onError: "value",
@@ -45,19 +45,19 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
45
45
  let s, o;
46
46
  if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
47
47
  const s = e.getRuntime();
48
- return t = f(s, t, b(t, !0), l.Number, !0), n = f(s, n, b(n, !0), l.Number, !0), t && i.isError(t) ? t : n && i.isError(n) ? n : r(t, n);
48
+ return t = T(s, t, u(t, !0), l.Number, !0), n = T(s, n, u(n, !0), l.Number, !0), t && i.isError(t) ? t : n && i.isError(n) ? n : r(t, n);
49
49
  }
50
- const a = !s, u = a ? t : n;
51
- return (s ?? o).broadcast(u, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n : E(a ? r(n, t) : r(t, n), e), J).fillEmpty(0);
50
+ const a = !s, c = a ? t : n;
51
+ return (s ?? o).broadcast(c, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n : h(a ? r(n, t) : r(t, n), e), Q).fillEmpty(0);
52
52
  }, re = (e, t, r, s) => {
53
- if (d(t) || d(r)) return i.BuiltIn.Value;
53
+ if (a(t) || a(r)) return i.BuiltIn.Value;
54
54
  if (n(t) || n(r)) return i.BuiltIn.Value;
55
55
  if (null !== t && void 0 !== t.colStart && (t = e.getValueAt(t.rowStart, t.colStart, t.scope)) && i.isError(t)) return t;
56
56
  if (null !== r && void 0 !== r.colStart && (r = e.getValueAt(r.rowStart, r.colStart, r.scope)) && i.isError(r)) return r;
57
57
  let l, o;
58
58
  t = te(t), r = te(r);
59
- let a = !1;
60
- return t?.isIRange ? (l = t, o = r) : r?.isIRange && (l = r, o = t, a = !0), l ? l.broadcast(o, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n : (t = ie(t), n = ie(n), a ? s(e, n, t) : s(e, t, n)), ee) : i.isError(t) ? t : i.isError(r) ? r : s(e, ie(t), ie(r));
59
+ let u = !1;
60
+ return t?.isIRange ? (l = t, o = r) : r?.isIRange && (l = r, o = t, u = !0), l ? l.broadcast(o, (t, n) => t && i.isError(t) ? t : n && i.isError(n) ? n : (t = ie(t), n = ie(n), u ? s(e, n, t) : s(e, t, n)), ee) : i.isError(t) ? t : i.isError(r) ? r : s(e, ie(t), ie(r));
61
61
  }, ie = (e) => {
62
62
  if (!0 !== e?.isIRichData) return e;
63
63
  const t = e.toPrimitive?.();
@@ -70,9 +70,9 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
70
70
  if ("-" !== t) throw new i.Value(`Unrecognized prefix: ${t}`);
71
71
  if (s = -s, n?.isIRange && (r = n), !r) {
72
72
  const t = e.getRuntime();
73
- return "number" != typeof (n = f(t, n, b(n, !0), l.Number, !0)) ? i.BuiltIn.Value : n * s;
73
+ return "number" != typeof (n = T(t, n, u(n, !0), l.Number, !0)) ? i.BuiltIn.Value : n * s;
74
74
  }
75
- return r.broadcast(s, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : U(e, t), J);
75
+ return r.broadcast(s, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : U(e, t), Q);
76
76
  }, le = (e) => e.getCode() <= i.Code.NA ? e : i.BuiltIn.Value, oe = (e, t, n, r, s) => {
77
77
  if (i.isError(t)) return le(t);
78
78
  if (n && i.isError(n)) return le(n);
@@ -93,18 +93,18 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
93
93
  "*": (e, t, n) => ne(e, t, n, U),
94
94
  "/": (e, t, n) => ne(e, t, n, _),
95
95
  "^": (e, t, n) => ne(e, t, n, j),
96
- " ": (e, t, n, r) => oe(e, t, n, h, "either"),
97
- ":": (e, t, n, r) => oe(e, t, n, B, "start"),
96
+ " ": (e, t, n, r) => oe(e, t, n, m, "either"),
97
+ ":": (e, t, n, r) => oe(e, t, n, S, "start"),
98
98
  ".:.": (e, t, n, r) => {
99
- const i = oe(e, t, n, B, "start");
99
+ const i = oe(e, t, n, S, "start");
100
100
  return e.getFunction("TRIMRANGE").execute(i, 3, 3);
101
101
  },
102
102
  ".:": (e, t, n, r) => {
103
- const i = oe(e, t, n, B, "start");
103
+ const i = oe(e, t, n, S, "start");
104
104
  return e.getFunction("TRIMRANGE").execute(i, 1, 1);
105
105
  },
106
106
  ":.": (e, t, n, r) => {
107
- const i = oe(e, t, n, B, "start");
107
+ const i = oe(e, t, n, S, "start");
108
108
  return e.getFunction("TRIMRANGE").execute(i, 2, 2);
109
109
  },
110
110
  "&": (e, t, n) => ((e, t, n, r) => {
@@ -114,17 +114,17 @@ var z = (e, t) => e + t, D = (e, t) => e - t, M = (e, t) => w(e + t, e), W = (e,
114
114
  let s, o;
115
115
  if (t?.isIRange ? s = t : n?.isIRange && (o = n), !s && !o) {
116
116
  const s = e.getRuntime();
117
- return t = f(s, t, b(t, !0), l.String, !1), n = f(s, n, b(n, !0), l.String, !1), i.isError(t) ? t : i.isError(n) ? n : r(t, n);
117
+ return t = T(s, t, u(t, !0), l.String, !1), n = T(s, n, u(n, !0), l.String, !1), i.isError(t) ? t : i.isError(n) ? n : r(t, n);
118
118
  }
119
- const a = !s, u = a ? t : n;
120
- return (s ?? o).broadcast(u, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : a ? r(t, e) : r(e, t), Q);
119
+ const a = !s, c = a ? t : n;
120
+ return (s ?? o).broadcast(c, (e, t) => e && i.isError(e) ? e : t && i.isError(t) ? t : a ? r(t, e) : r(e, t), Y);
121
121
  })(e, t, n, G),
122
122
  "=": (e, t, n) => re(e, t, n, H),
123
123
  "<>": (e, t, n) => re(e, t, n, X),
124
124
  ">": (e, t, n) => re(e, t, n, K),
125
125
  "<": (e, t, n) => re(e, t, n, q),
126
126
  ">=": (e, t, n) => re(e, t, n, Z),
127
- "<=": (e, t, n) => re(e, t, n, Y)
127
+ "<=": (e, t, n) => re(e, t, n, J)
128
128
  }, ue = {
129
129
  "+": (e, t, n) => ne(e, t, n, M),
130
130
  "-": (e, t, n) => ne(e, t, n, W)
@@ -159,38 +159,38 @@ var de = class {
159
159
  value: null,
160
160
  inputs: null
161
161
  };
162
- if (this.references.set(e, t), n === $.Cell) {
162
+ if (this.references.set(e, t), n === F.Cell) {
163
163
  const n = e.value;
164
164
  n.$colIndex && (t.hasHorizontalAbs = !0), n.$rowIndex && (t.hasVerticalAbs = !0), t.value = this.cells.size, this.cells.set(e, this.cells.size), this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
165
165
  return;
166
166
  }
167
- if (n === $.Infix || n === $.Prefix || n === $.Postfix || n === $.List) {
167
+ if (n === F.Infix || n === F.Prefix || n === F.Postfix || n === F.List) {
168
168
  const n = e.inputs || [], r = n.length, i = e.value;
169
169
  t.op = i;
170
- const s = p(r);
170
+ const s = o(r);
171
171
  t.inputs = s;
172
172
  for (let e = 0; e < r; e++) {
173
173
  const r = n[e], i = this.references.get(r);
174
174
  i ? (i.hasHorizontalAbs && (t.hasHorizontalAbs = !0), i.hasVerticalAbs && (t.hasVerticalAbs = !0), s[e] = i.index) : s[e] = -1, i && this.rootReferences.delete(i);
175
175
  }
176
- if (this.rootReferences.add(t), Ke.includes(i)) {
177
- const r = n[0], i = !!r && r.type === $.Cell, s = n[1], l = !!s && s.type === $.Cell;
176
+ if (this.rootReferences.add(t), qe.includes(i)) {
177
+ const r = n[0], i = !!r && r.type === F.Cell, s = n[1], l = !!s && s.type === F.Cell;
178
178
  i && l && void 0 !== s.referenceIndex && void 0 !== r.referenceIndex && (this.referenceIndices.splice(s.referenceIndex, 1), s.referenceIndex = r.referenceIndex, e.referenceIndex = r.referenceIndex, this.referenceIndices[r.referenceIndex] = t.index);
179
179
  } else "#" === i && n[0] && (e.referenceIndex = n[0].referenceIndex);
180
180
  return;
181
181
  }
182
- if (n === $.Error || n === $.Named) {
183
- const r = n === $.Named ? e.value.nameId : x(e.value);
182
+ if (n === F.Error || n === F.Named) {
183
+ const r = n === F.Named ? e.value.nameId : N(e.value);
184
184
  let i = this.names.get(r);
185
185
  t.op = n, void 0 === i && (i = this.names.size, this.names.set(r, i)), t.value = i, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, this.referenceIndices.push(t.index);
186
186
  return;
187
187
  }
188
- if (n === $.TableReference) return t.op = n, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, void this.referenceIndices.push(t.index);
188
+ if (n === F.TableReference) return t.op = n, this.rootReferences.add(t), e.referenceIndex = this.referenceIndices.length, void this.referenceIndices.push(t.index);
189
189
  } else if (t && t.isReference) {
190
190
  const t = {
191
191
  node: e,
192
192
  index: this.references.size,
193
- op: $.Function,
193
+ op: F.Function,
194
194
  value: e.value,
195
195
  inputs: null
196
196
  };
@@ -198,11 +198,11 @@ var de = class {
198
198
  }
199
199
  }
200
200
  };
201
- function ge(e, t = !1, n = T) {
201
+ function ge(e, t = !1, n = b) {
202
202
  const r = [], i = /* @__PURE__ */ new Set(), s = (e, n, s) => {
203
203
  const l = {
204
204
  type: e.type,
205
- value: e.type === $.Error ? P(e.value) : e.value
205
+ value: e.type === F.Error ? $(e.value) : e.value
206
206
  };
207
207
  void 0 !== e.image && (l.text = ((e) => {
208
208
  const n = t ? e.value?.scopeImage : void 0;
@@ -212,7 +212,7 @@ function ge(e, t = !1, n = T) {
212
212
  return void 0 !== o && (l.evalIndex = o), n && (l.context = n), void 0 !== e.referenceIndex && (l.referenceIndex = e.referenceIndex), e.isReference && i.add(l), r.push(l), l;
213
213
  }, l = (e, t, n, i, s) => {
214
214
  if (null == t) return;
215
- if (r.length > 1 && e === $.Whitespace && r[r.length - 1].type === $.Whitespace) return;
215
+ if (r.length > 1 && e === F.Whitespace && r[r.length - 1].type === F.Whitespace) return;
216
216
  const l = {
217
217
  type: e,
218
218
  value: t,
@@ -220,62 +220,62 @@ function ge(e, t = !1, n = T) {
220
220
  };
221
221
  void 0 !== i && (l.evalIndex = i), n && (l.context = n), r.push(l);
222
222
  };
223
- (function e(o, u, c) {
224
- const f = o.evalIndex ?? c ?? 0, p = o.type, d = (t, r, i) => {
223
+ (function e(o, a, u) {
224
+ const c = o.evalIndex ?? u ?? 0, f = o.type, p = (t, r, i) => {
225
225
  if (!t) return;
226
226
  const s = t.length;
227
- for (let o = 0; o < s; o++) e(t[o], r, i), o < s - 1 && l($.Separator, ",", r, i, n.separatorFunction);
227
+ for (let o = 0; o < s; o++) e(t[o], r, i), o < s - 1 && l(F.Separator, ",", r, i, n.separatorFunction);
228
228
  };
229
229
  if (o.isLiteral) {
230
- if (l($.Whitespace, o.wsBefore, u, f), p === $.Array) {
231
- l($.Type, "{", u, f);
230
+ if (l(F.Whitespace, o.wsBefore, a, c), f === F.Array) {
231
+ l(F.Type, "{", a, c);
232
232
  const t = o.value, r = t.length;
233
233
  for (let i = 0; i < r; i++) {
234
- const s = t[i], o = s.value, a = o.length;
235
- for (let t = 0; t < a; t++) {
234
+ const s = t[i], o = s.value, u = o.length;
235
+ for (let t = 0; t < u; t++) {
236
236
  const r = o[t];
237
- l($.Whitespace, r.wsBefore, u, f), e(r, u, f), l($.Whitespace, r.wsAfter, u, f), t < a - 1 && l($.Separator, ",", u, f, n.separatorColumn);
237
+ l(F.Whitespace, r.wsBefore, a, c), e(r, a, c), l(F.Whitespace, r.wsAfter, a, c), t < u - 1 && l(F.Separator, ",", a, c, n.separatorColumn);
238
238
  }
239
- i < r - 1 && (l($.Whitespace, s.wsBefore, u, f), l($.Separator, ";", u, f, n.separatorRow), l($.Whitespace, s.wsAfter, u, f));
239
+ i < r - 1 && (l(F.Whitespace, s.wsBefore, a, c), l(F.Separator, ";", a, c, n.separatorRow), l(F.Whitespace, s.wsAfter, a, c));
240
240
  }
241
- o.error || l($.Type, "}", u, f);
242
- } else p === $.String ? (o = {
243
- type: p,
241
+ o.error || l(F.Type, "}", a, c);
242
+ } else f === F.String ? (o = {
243
+ type: f,
244
244
  value: "\"" + `${o.value}`.replace(/"/g, "\"\"") + "\"",
245
245
  image: o.image
246
- }, s(o, u, f)) : s(o, u, f);
247
- l($.Whitespace, o.wsAfter, u, f);
248
- } else if (p === $.Infix) e(o.inputs[0], u, f), l($.Whitespace, o.wsBefore, u, f), s(o, u, f), l($.Whitespace, o.wsAfter, u, f), e(o.inputs[1], u, f);
249
- else if (p === $.Prefix) l($.Whitespace, o.wsBefore, u, f), s(o, u, f), l($.Whitespace, o.wsAfter, u, f), o.inputs && e(o.inputs[0], u, f);
250
- else if (p === $.Postfix) {
251
- o.inputs?.[0] && e(o.inputs[0], u, f), l($.Whitespace, o.wsBefore, u, f);
252
- const t = s(o, u, f), n = r[r.length - 2];
253
- "#" === o.value && void 0 !== t.text && !o.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), l($.Whitespace, o.wsAfter, u, f);
246
+ }, s(o, a, c)) : s(o, a, c);
247
+ l(F.Whitespace, o.wsAfter, a, c);
248
+ } else if (f === F.Infix) e(o.inputs[0], a, c), l(F.Whitespace, o.wsBefore, a, c), s(o, a, c), l(F.Whitespace, o.wsAfter, a, c), e(o.inputs[1], a, c);
249
+ else if (f === F.Prefix) l(F.Whitespace, o.wsBefore, a, c), s(o, a, c), l(F.Whitespace, o.wsAfter, a, c), o.inputs && e(o.inputs[0], a, c);
250
+ else if (f === F.Postfix) {
251
+ o.inputs?.[0] && e(o.inputs[0], a, c), l(F.Whitespace, o.wsBefore, a, c);
252
+ const t = s(o, a, c), n = r[r.length - 2];
253
+ "#" === o.value && void 0 !== t.text && !o.wsBefore && i.has(n) && (n.text = (n.text ?? "") + t.text, t.text = ""), l(F.Whitespace, o.wsAfter, a, c);
254
254
  } else {
255
- l($.Whitespace, o.wsBefore, u, f);
256
- const c = o.inputs;
257
- switch (p) {
258
- case $.Function: {
255
+ l(F.Whitespace, o.wsBefore, a, c);
256
+ const u = o.inputs;
257
+ switch (f) {
258
+ case F.Function: {
259
259
  const t = String(o.value), i = {
260
- type: $.Function,
260
+ type: F.Function,
261
261
  value: t,
262
262
  text: o.image ?? t,
263
263
  evalIndex: o.evalIndex
264
264
  };
265
- u && (i.context = u), r.push(i);
265
+ a && (i.context = a), r.push(i);
266
266
  const s = {
267
267
  name: t,
268
268
  argIndex: -1,
269
269
  type: o.binder?.kind ?? "function"
270
270
  };
271
- if (u?.bound && (s.bound = u.bound), l($.Paren, "(", s, o.evalIndex), c) {
272
- const t = c.length, r = o.binder?.kind, i = "lambda" === r ? 1 : "let" === r ? 2 : 0;
271
+ if (a?.bound && (s.bound = a.bound), l(F.Paren, "(", s, o.evalIndex), u) {
272
+ const t = u.length, r = o.binder?.kind, i = "lambda" === r ? 1 : "let" === r ? 2 : 0;
273
273
  let a = s.bound;
274
274
  for (let o = 0; o < t; o++) {
275
- const u = i && o >= i ? c[o - i] : void 0;
276
- if (u?.binding?.declaration) {
277
- const e = u.value.nameId, t = "let" === r ? bt(c[o - 1]) : void 0;
278
- a = It(a, t ? {
275
+ const f = i && o >= i ? u[o - i] : void 0;
276
+ if (f?.binding?.declaration) {
277
+ const e = f.value.nameId, t = "let" === r ? Rt(u[o - 1]) : void 0;
278
+ a = xt(a, t ? {
279
279
  name: e,
280
280
  params: t
281
281
  } : { name: e });
@@ -284,47 +284,47 @@ function ge(e, t = !1, n = T) {
284
284
  ...s,
285
285
  argIndex: o
286
286
  };
287
- a && (p.bound = a), e(c[o], p, f), o < t - 1 && l($.Separator, ",", p, f, n.separatorFunction);
287
+ a && (p.bound = a), e(u[o], p, c), o < t - 1 && l(F.Separator, ",", p, c, n.separatorFunction);
288
288
  }
289
289
  }
290
- o.error || l($.Paren, ")", s, o.evalIndex);
290
+ o.error || l(F.Paren, ")", s, o.evalIndex);
291
291
  break;
292
292
  }
293
- case $.Call: {
294
- const t = a(o), i = r.length;
295
- if (t && e(t, u, f), t?.type === $.Named) for (let e = i; e < r.length; e++) {
293
+ case F.Call: {
294
+ const t = P(o), i = r.length;
295
+ if (t && e(t, a, c), t?.type === F.Named) for (let e = i; e < r.length; e++) {
296
296
  const t = r[e];
297
- t.type !== $.Whitespace && (t.evalIndex = o.evalIndex, t.type === $.Named && (t.type = $.Function, t.value = t.value.name));
297
+ t.type !== F.Whitespace && (t.evalIndex = o.evalIndex, t.type === F.Named && (t.type = F.Function, t.value = t.value.name));
298
298
  }
299
299
  const s = {
300
- name: t?.type === $.Named ? t.value.nameId : "",
300
+ name: t?.type === F.Named ? t.value.nameId : "",
301
301
  argIndex: -1,
302
302
  type: "function"
303
303
  };
304
- u?.bound && (s.bound = u.bound), l($.Paren, "(", s, o.evalIndex);
305
- const c = C(o), p = c.length;
306
- for (let t = 0; t < p; t++) {
304
+ a?.bound && (s.bound = a.bound), l(F.Paren, "(", s, o.evalIndex);
305
+ const u = x(o), f = u.length;
306
+ for (let t = 0; t < f; t++) {
307
307
  const r = {
308
308
  ...s,
309
309
  argIndex: t
310
310
  };
311
- e(c[t], r, f), t < p - 1 && l($.Separator, ",", r, f, n.separatorFunction);
311
+ e(u[t], r, c), t < f - 1 && l(F.Separator, ",", r, c, n.separatorFunction);
312
312
  }
313
- o.error || l($.Paren, ")", s, o.evalIndex);
313
+ o.error || l(F.Paren, ")", s, o.evalIndex);
314
314
  break;
315
315
  }
316
- case $.Cell:
317
- s(o, u, f);
316
+ case F.Cell:
317
+ s(o, a, c);
318
318
  break;
319
- case $.Paren:
320
- l(p, "(", u, f), d(c, u, f), o.error || l(p, ")", u, f);
319
+ case F.Paren:
320
+ l(f, "(", a, c), p(u, a, c), o.error || l(f, ")", a, c);
321
321
  break;
322
- case $.TableReference: {
322
+ case F.TableReference: {
323
323
  const n = o.value?.tableId ?? "", s = {
324
324
  name: n,
325
325
  argIndex: -1,
326
326
  type: "table"
327
- }, a = r.length, p = o.image;
327
+ }, f = r.length, p = o.image;
328
328
  let d, g = !1;
329
329
  if (n && p) {
330
330
  let e = 0;
@@ -333,72 +333,72 @@ function ge(e, t = !1, n = T) {
333
333
  -1 !== t && 33 === p.charCodeAt(t + 1) && (e = t + 2);
334
334
  }
335
335
  const n = p.indexOf("[", e);
336
- if (g = 0 === n && null != c, n > 0) d = p.slice(0, n);
337
- else if (!c) {
336
+ if (g = 0 === n && null != u, n > 0) d = p.slice(0, n);
337
+ else if (!u) {
338
338
  const e = p.lastIndexOf("!");
339
339
  d = t || -1 === e ? p : p.slice(e + 1);
340
340
  }
341
341
  }
342
- if (!n || g && t || l($.TableReference, n, u, f, d), c && l($.Paren, "[", s, f), c) {
343
- const t = c.length;
342
+ if (!n || g && t || l(F.TableReference, n, a, c, d), u && l(F.Paren, "[", s, c), u) {
343
+ const t = u.length;
344
344
  for (let n = 0; n < t; n++) {
345
345
  const r = {
346
346
  ...s,
347
347
  argIndex: n
348
348
  };
349
- e(c[n], r, f), n < t - 1 && l($.Separator, ",", r, f);
349
+ e(u[n], r, c), n < t - 1 && l(F.Separator, ",", r, c);
350
350
  }
351
351
  }
352
- c && !o.error && l($.Paren, "]", s, f);
352
+ u && !o.error && l(F.Paren, "]", s, c);
353
353
  const v = o.referenceIndex;
354
- for (let e = a; e < r.length; e++) void 0 !== v && (r[e].referenceIndex = v), i.add(r[e]);
354
+ for (let e = f; e < r.length; e++) void 0 !== v && (r[e].referenceIndex = v), i.add(r[e]);
355
355
  break;
356
356
  }
357
- case $.TableSpecifier:
358
- case $.TableColumn: {
357
+ case F.TableSpecifier:
358
+ case F.TableColumn: {
359
359
  const e = o.image, t = null != e && e.startsWith("[") && e.endsWith("]");
360
- t && l($.Paren, "[", u, f);
360
+ t && l(F.Paren, "[", a, c);
361
361
  const n = {
362
- table: "table" === u?.type ? u.name : "",
362
+ table: "table" === a?.type ? a.name : "",
363
363
  name: o.value
364
364
  }, i = {
365
- type: p,
365
+ type: f,
366
366
  value: n,
367
367
  text: t ? e.slice(1, -1) : e ?? n.name
368
368
  };
369
- void 0 !== f && (i.evalIndex = f), u && (i.context = u), r.push(i), t && l($.Paren, "]", u, f);
369
+ void 0 !== c && (i.evalIndex = c), a && (i.context = a), r.push(i), t && l(F.Paren, "]", a, c);
370
370
  break;
371
371
  }
372
- case $.List:
373
- d(c, u, f);
372
+ case F.List:
373
+ p(u, a, c);
374
374
  break;
375
- case $.Named: {
376
- const e = s(o, u, f), t = o.value;
375
+ case F.Named: {
376
+ const e = s(o, a, c), t = o.value;
377
377
  e.value = t.scope ? {
378
378
  name: t.nameId,
379
379
  scope: t.scope
380
- } : { name: t.nameId }, o.binding?.declaration && o.binding.optional && (e.value.optional = !0), o.binding && (e.type = $.Parameter, o.binding.declaration && (e.value.declaration = !0)), delete e.referenceIndex;
380
+ } : { name: t.nameId }, o.binding?.declaration && o.binding.optional && (e.value.optional = !0), o.binding && (e.type = F.Parameter, o.binding.declaration && (e.value.declaration = !0)), delete e.referenceIndex;
381
381
  break;
382
382
  }
383
- default: void 0 !== o.value && s(o, u, f), c && c.forEach((t) => e(t, u, f));
383
+ default: void 0 !== o.value && s(o, a, c), u && u.forEach((t) => e(t, a, c));
384
384
  }
385
- l($.Whitespace, o.wsAfter, u, f);
385
+ l(F.Whitespace, o.wsAfter, a, c);
386
386
  }
387
387
  })(e);
388
388
  const o = /* @__PURE__ */ new Map();
389
- for (const e of r) if (e.type === $.Cell && void 0 !== e.referenceIndex) {
389
+ for (const e of r) if (e.type === F.Cell && void 0 !== e.referenceIndex) {
390
390
  const t = o.get(e.referenceIndex);
391
391
  t ? t.push(e) : o.set(e.referenceIndex, [e]);
392
392
  }
393
393
  for (const e of o.values()) 1 === e.length ? e[0].refSide = "self" : (e[0].refSide = "left", e[e.length - 1].refSide = "right");
394
- const u = /* @__PURE__ */ new Map();
394
+ const a = /* @__PURE__ */ new Map();
395
395
  for (const e of r) if (void 0 !== e.referenceIndex && void 0 !== e.evalIndex) {
396
- const t = u.get(e.referenceIndex);
397
- (void 0 === t || e.evalIndex < t) && u.set(e.referenceIndex, e.evalIndex);
396
+ const t = a.get(e.referenceIndex);
397
+ (void 0 === t || e.evalIndex < t) && a.set(e.referenceIndex, e.evalIndex);
398
398
  }
399
- if (u.size > 0) {
399
+ if (a.size > 0) {
400
400
  for (const e of r) if (void 0 !== e.referenceIndex) {
401
- const t = u.get(e.referenceIndex);
401
+ const t = a.get(e.referenceIndex);
402
402
  void 0 !== t && (e.evalIndex = t);
403
403
  }
404
404
  }
@@ -408,19 +408,19 @@ function ve(e, t) {
408
408
  let n = "";
409
409
  for (let r = 0; r < e.length; r++) {
410
410
  const i = e[r], s = i.type;
411
- if (s === $.Cell || s === $.Named || s === $.Error) {
412
- const e = s === $.Cell ? i.value?.scope : ($.Named, i.value?.scope ?? void 0), r = s === $.Error ? void 0 !== i.text && I(i.text) : i.text?.includes("!") ?? !1;
411
+ if (s === F.Cell || s === F.Named || s === F.Error) {
412
+ const e = s === F.Cell ? i.value?.scope : (F.Named, i.value?.scope ?? void 0), r = s === F.Error ? void 0 !== i.text && d(i.text) : i.text?.includes("!") ?? !1;
413
413
  if (e && void 0 !== i.text && !r) {
414
414
  const r = t?.resolve(R.Sheet, e)?.toString() ?? e;
415
- n += y(r) + "!" + i.text;
415
+ n += w(r) + "!" + i.text;
416
416
  continue;
417
417
  }
418
- if (s === $.Named) {
418
+ if (s === F.Named) {
419
419
  n += i.text ?? i.value?.name ?? "";
420
420
  continue;
421
421
  }
422
422
  }
423
- if (s === $.Parameter) {
423
+ if (s === F.Parameter) {
424
424
  n += i.text ?? i.value?.name ?? "";
425
425
  continue;
426
426
  }
@@ -431,40 +431,40 @@ function ve(e, t) {
431
431
  }
432
432
  function he(e, t) {
433
433
  let n;
434
- if (O(e, (e) => {
434
+ if (v(e, (e) => {
435
435
  e.evalIndex === t && (n = e);
436
436
  }), !n) return [];
437
437
  const r = ge(n);
438
- return r.length > 1 && r[0].type === $.Whitespace && r.shift(), r.length > 1 && r[r.length - 1].type === $.Whitespace && r.pop(), r;
438
+ return r.length > 1 && r[0].type === F.Whitespace && r.shift(), r.length > 1 && r[r.length - 1].type === F.Whitespace && r.pop(), r;
439
439
  }
440
440
  function me(e) {
441
- return O(e, (e) => {
442
- if (e.type !== $.TableReference) return;
441
+ return v(e, (e) => {
442
+ if (e.type !== F.TableReference) return;
443
443
  const t = function(e) {
444
444
  if (null !== e.value && "object" == typeof e.value) return e.value;
445
445
  const t = e.value, n = e.inputs;
446
446
  let r = !1, i = !1, s = !1, l = !1, o = null, a = null, u = !1;
447
- const f = (e) => {
448
- e?.type === $.TableColumn && (o = e.value, a = e.value);
447
+ const c = (e) => {
448
+ e?.type === F.TableColumn && (o = e.value, a = e.value);
449
449
  };
450
450
  if (n) for (const e of n) {
451
451
  const t = e.type;
452
- if (t === $.TableSpecifier) {
452
+ if (t === F.TableSpecifier) {
453
453
  const t = e.value.toUpperCase().trim();
454
454
  "#ALL" === t ? i = !0 : "#HEADERS" === t ? s = !0 : "#TOTALS" === t ? l = !0 : "#DATA" === t ? r = !0 : "@" !== t && "#THIS ROW" !== t || (u = !0);
455
- } else if (t === $.TableColumn) f(e);
456
- else if (t === $.Infix && ":" === e.value) {
455
+ } else if (t === F.TableColumn) c(e);
456
+ else if (t === F.Infix && ":" === e.value) {
457
457
  const t = e.inputs?.[0], n = e.inputs?.[1];
458
- t?.type === $.TableColumn && (o = t.value), n?.type === $.TableColumn && (a = n.value);
459
- } else if (t === $.Prefix && "@" === e.value) {
458
+ t?.type === F.TableColumn && (o = t.value), n?.type === F.TableColumn && (a = n.value);
459
+ } else if (t === F.Prefix && "@" === e.value) {
460
460
  u = !0;
461
461
  const t = e.inputs?.[0];
462
- t?.type === $.Infix && ":" === t.value ? (t.inputs?.[0]?.type === $.TableColumn && (o = t.inputs[0].value), t.inputs?.[1]?.type === $.TableColumn && (a = t.inputs[1].value)) : f(t);
462
+ t?.type === F.Infix && ":" === t.value ? (t.inputs?.[0]?.type === F.TableColumn && (o = t.inputs[0].value), t.inputs?.[1]?.type === F.TableColumn && (a = t.inputs[1].value)) : c(t);
463
463
  }
464
464
  }
465
465
  return {
466
466
  tableId: t,
467
- spec: c(i, s, r, l),
467
+ spec: p(i, s, r, l),
468
468
  columnFromId: o,
469
469
  columnToId: a,
470
470
  isThisRow: u
@@ -477,16 +477,16 @@ function me(e) {
477
477
  });
478
478
  }
479
479
  function ye(e) {
480
- return O(e, (e) => {
481
- if (e.type !== $.TableReference) return;
480
+ return v(e, (e) => {
481
+ if (e.type !== F.TableReference) return;
482
482
  const t = e.inputs;
483
483
  if (!t) return;
484
- if (-1 === t.findIndex((e) => e.type === $.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim())) return;
484
+ if (-1 === t.findIndex((e) => e.type === F.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim())) return;
485
485
  const n = [];
486
486
  let r;
487
- for (const e of t) e.type === $.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim() || (e.type !== $.TableColumn && (e.type !== $.Infix || ":" !== e.value) || r ? n.push(e) : r = e);
487
+ for (const e of t) e.type === F.TableSpecifier && "#THIS ROW" === e.value.toUpperCase().trim() || (e.type !== F.TableColumn && (e.type !== F.Infix || ":" !== e.value) || r ? n.push(e) : r = e);
488
488
  if (!r) return n.push({
489
- type: $.Prefix,
489
+ type: F.Prefix,
490
490
  value: "@",
491
491
  inputs: null,
492
492
  isReference: !0
@@ -498,15 +498,15 @@ function ye(e) {
498
498
  ...r,
499
499
  image: i.slice(1, -1)
500
500
  } : r;
501
- return n.push(o("@", s, !0)), {
501
+ return n.push(L("@", s, !0)), {
502
502
  ...e,
503
503
  inputs: n
504
504
  };
505
505
  });
506
506
  }
507
507
  function Ie(e) {
508
- return O(e, (e) => {
509
- if (e.type !== $.TableReference) return;
508
+ return v(e, (e) => {
509
+ if (e.type !== F.TableReference) return;
510
510
  if (0 !== e.inputs?.length || e.error) return;
511
511
  const t = e.value;
512
512
  return ("string" == typeof t ? t : t?.tableId) ? {
@@ -516,8 +516,8 @@ function Ie(e) {
516
516
  });
517
517
  }
518
518
  function be(e) {
519
- return O(e, (e) => {
520
- if (e.type !== $.TableReference || !e.inputs) return;
519
+ return v(e, (e) => {
520
+ if (e.type !== F.TableReference || !e.inputs) return;
521
521
  const t = e.value, n = "string" == typeof t ? t : t?.tableId, r = e.image;
522
522
  if (!n || 91 !== r?.charCodeAt(0)) return;
523
523
  const i = r.indexOf("]");
@@ -527,7 +527,7 @@ function be(e) {
527
527
  });
528
528
  }
529
529
  var xe = (e) => {
530
- if (e?.type !== $.TableSpecifier) return 4;
530
+ if (e?.type !== F.TableSpecifier) return 4;
531
531
  switch (e.value.toUpperCase().trim()) {
532
532
  case "#ALL": return 0;
533
533
  case "#HEADERS": return 1;
@@ -537,8 +537,8 @@ var xe = (e) => {
537
537
  }
538
538
  };
539
539
  function Re(e) {
540
- return O(e, (e) => {
541
- if (e.type !== $.TableReference) return;
540
+ return v(e, (e) => {
541
+ if (e.type !== F.TableReference) return;
542
542
  const t = e.inputs;
543
543
  if (!t || t.length < 2) return;
544
544
  const n = t.map((e, t) => ({
@@ -555,8 +555,8 @@ function Re(e) {
555
555
  function Ee(t) {
556
556
  if (!t) return e.EmptyArray;
557
557
  let n = e.EmptyArray;
558
- return O(t, (t) => {
559
- if (t.type !== $.Named || t.binding) return;
558
+ return v(t, (t) => {
559
+ if (t.type !== F.Named || t.binding) return;
560
560
  const r = t.value.nameId;
561
561
  r && (n === e.EmptyArray && (n = []), n.includes(r) || n.push(r));
562
562
  }), n;
@@ -564,12 +564,12 @@ function Ee(t) {
564
564
  function Te(t, n) {
565
565
  if (!t) return e.EmptyArray;
566
566
  let r = e.EmptyArray;
567
- return O(t, (t, i, s) => {
567
+ return v(t, (t, i, s) => {
568
568
  if (!t.isReference) return;
569
569
  if (i?.isReference) return;
570
570
  const l = t.type;
571
- if (l === $.Named || l === $.Error || l === $.TableReference) return;
572
- if (pe(s, $.TableReference)) return;
571
+ if (l === F.Named || l === F.Error || l === F.TableReference) return;
572
+ if (pe(s, F.TableReference)) return;
573
573
  const o = function(e) {
574
574
  let t = e;
575
575
  for (; t;) {
@@ -582,66 +582,69 @@ function Te(t, n) {
582
582
  let r = e;
583
583
  for (let e = t.length - 1; e >= 0; e--) {
584
584
  const i = t[e];
585
- if (i.type === $.Paren || i.isReference) {
585
+ if (i.type === F.Paren || i.isReference) {
586
586
  r = i;
587
587
  continue;
588
588
  }
589
- if (i.type !== $.Function) return !0;
589
+ if (i.type !== F.Function) return !0;
590
590
  const s = n?.(String(i.value));
591
591
  if (!s) return !0;
592
592
  const l = i.inputs ? i.inputs.indexOf(r) : -1;
593
- return "p" !== (l >= 0 ? Oe(s.getDeclaration().getParameters(), l) : null)?.getRangeType();
593
+ return "p" !== (l >= 0 ? Ve(s.getDeclaration().getParameters(), l) : null)?.getRangeType();
594
594
  }
595
595
  return !0;
596
596
  }(t, s, n) && (r === e.EmptyArray && (r = []), r.includes(o) || r.push(o));
597
597
  }), r.length > 1 && r.sort((e, t) => e - t), r;
598
598
  }
599
- var Ae = /* @__PURE__ */ new Set(["SUBTOTAL", "AGGREGATE"]);
600
- function Se(e, t) {
599
+ var Ae = /* @__PURE__ */ new Set(["SUBTOTAL", "AGGREGATE"]), Se = /* @__PURE__ */ new Set(["GETPIVOTDATA"]);
600
+ function we(e, t) {
601
+ return Ce(e, t, Ae);
602
+ }
603
+ function Ce(e, t, n) {
601
604
  if (!e || !t) return !1;
602
- let n = !1;
603
- return O(e, (e) => {
604
- if (n || e.type !== $.Function) return;
605
- const r = t(e.value)?.getName();
606
- r && Ae.has(r.toUpperCase()) && (n = !0);
607
- }), n;
605
+ let r = !1;
606
+ return v(e, (e) => {
607
+ if (r || e.type !== F.Function) return;
608
+ const i = t(e.value)?.getName();
609
+ i && n.has(i.toUpperCase()) && (r = !0);
610
+ }), r;
608
611
  }
609
- function we(e, t) {
612
+ function Ne(e, t) {
610
613
  if (!e || !t) return !1;
611
614
  let n = !1;
612
- return O(e, (e) => {
613
- n || e.type !== $.Function || "TABLE" === t(e.value)?.getName().toUpperCase() && (n = !0);
615
+ return v(e, (e) => {
616
+ n || e.type !== F.Function || "TABLE" === t(e.value)?.getName().toUpperCase() && (n = !0);
614
617
  }), n;
615
618
  }
616
- function Ce(e, t) {
619
+ function Fe(e, t) {
617
620
  if (!e || !t) return !1;
618
621
  let n = !1;
619
- return O(e, (e) => {
620
- n || e.type !== $.Function || !0 === t(e.value)?.getDeclaration().getReturnType()?.isVolatile() && (n = !0);
622
+ return v(e, (e) => {
623
+ n || e.type !== F.Function || !0 === t(e.value)?.getDeclaration().getReturnType()?.isVolatile() && (n = !0);
621
624
  }), n;
622
625
  }
623
- var Ne = Object.freeze({
626
+ var Pe = Object.freeze({
624
627
  value: !1,
625
628
  array: !1
626
- }), Fe = (e, t) => {
629
+ }), Le = (e, t) => {
627
630
  const n = function(e, t) {
628
- if (!e || !t) return Ne;
631
+ if (!e || !t) return Pe;
629
632
  let n = !1, r = !1;
630
- return O(e, (e) => {
633
+ return v(e, (e) => {
631
634
  if (n) return;
632
635
  const i = e.type;
633
- if (i === $.Named) return void (void 0 === e.binding && (n = !0));
634
- if (i === $.Prefix) return void ("@" === e.value && (n = !0));
635
- if (i === $.Call) return void (n = !0);
636
- if (i !== $.Function) return;
636
+ if (i === F.Named) return void (void 0 === e.binding && (n = !0));
637
+ if (i === F.Prefix) return void ("@" === e.value && (n = !0));
638
+ if (i === F.Call) return void (n = !0);
639
+ if (i !== F.Function) return;
637
640
  if (void 0 !== e.binder) return;
638
641
  const s = t(e.value);
639
642
  if (!s) return void (n = !0);
640
643
  if (r || !0 !== e.implicitIntersect) return;
641
644
  const l = s.getDeclaration().getParameters(), o = e.inputs;
642
645
  if (o) for (let e = 0; e < o.length; e++) {
643
- const n = Oe(l, e);
644
- if (null !== n && n.isValueOrRange() && Me(o[e], t)) return void (r = !0);
646
+ const n = Ve(l, e);
647
+ if (null !== n && n.isValueOrRange() && Ue(o[e], t)) return void (r = !0);
645
648
  }
646
649
  }), {
647
650
  value: !n && !r,
@@ -652,48 +655,48 @@ var Ne = Object.freeze({
652
655
  isBlankCacheable: n.value,
653
656
  isBlankCacheableArray: n.array
654
657
  };
655
- }, Pe = (e, t) => {
658
+ }, ke = (e, t) => {
656
659
  const n = e.length;
657
660
  if (0 === n) return null;
658
661
  if (t < n - 1) return e[t];
659
662
  const r = e[n - 1], i = r.getRepeatingTypes();
660
663
  return i && 0 !== i.length ? i[(t - (n - 1)) % i.length] : t < n ? e[t] : r.isRest() ? r : null;
661
664
  };
662
- function Le(t) {
665
+ function $e(t) {
663
666
  if (!t) return e.EmptyArray;
664
667
  let n = e.EmptyArray;
665
668
  const r = (t) => {
666
669
  t && (n === e.EmptyArray && (n = []), n.includes(t) || n.push(t));
667
670
  }, i = (e) => {
668
- "string" == typeof e && r(g(e)?.bookId);
671
+ "string" == typeof e && r(y(e)?.bookId);
669
672
  };
670
- return O(t, (e) => {
671
- if (e.type === $.Named) {
673
+ return v(t, (e) => {
674
+ if (e.type === F.Named) {
672
675
  if (e.binding) return;
673
676
  const t = e.value;
674
677
  r(t.nameId), i(t.scope);
675
- } else if (e.type === $.TableReference) {
678
+ } else if (e.type === F.TableReference) {
676
679
  const t = e.value;
677
680
  r("string" == typeof t ? t : t?.tableId);
678
- } else if (e.type === $.Cell) {
681
+ } else if (e.type === F.Cell) {
679
682
  const t = e.value?.scope;
680
- i(t), m(t) && r(t);
681
- } else e.type === $.Error && i(e.value?.scope);
683
+ i(t), C(t) && r(t);
684
+ } else e.type === F.Error && i(e.value?.scope);
682
685
  }), n;
683
686
  }
684
- var ke = (e, t) => {
687
+ var Oe = (e, t) => {
685
688
  if (!0 === e.lazyArg) return !0;
686
689
  if ("lambda" !== t?.binder?.kind) return !1;
687
690
  const n = t.inputs;
688
691
  return n[n.length - 1] === e;
689
- }, $e = /* @__PURE__ */ new Set([
692
+ }, Be = /* @__PURE__ */ new Set([
690
693
  "IF",
691
694
  "IFS",
692
695
  "SWITCH",
693
696
  "CHOOSE",
694
697
  "IFERROR",
695
698
  "IFNA"
696
- ]), Oe = (e, t) => {
699
+ ]), Ve = (e, t) => {
697
700
  const n = e.length;
698
701
  if (0 === n) return null;
699
702
  if (t < n) return e[t];
@@ -701,24 +704,24 @@ var ke = (e, t) => {
701
704
  if (!r.isRest()) return null;
702
705
  const i = r.getRepeatingTypes();
703
706
  return i && 0 !== i.length ? i[(t - (n - 1)) % i.length] : r;
704
- }, Be = (e) => null !== e.getScalarType() && null === e.getRangeType() && null === e.getLambda() && !e.isValueOrRange(), Ve = (e, t, n) => !(e.isRest() || !Be(e) || !Me(t, n) || e.isNoLift() && ze(t, n)), ze = (e, t) => {
707
+ }, ze = (e) => null !== e.getScalarType() && null === e.getRangeType() && null === e.getLambda() && !e.isValueOrRange(), De = (e, t, n) => !(e.isRest() || !ze(e) || !Ue(t, n) || e.isNoLift() && Me(t, n)), Me = (e, t) => {
705
708
  if (!e) return !1;
706
709
  const n = e.inputs;
707
710
  switch (e.type) {
708
- case $.Cell:
709
- case $.Named:
710
- case $.TableReference: return !0;
711
- case $.Infix:
712
- case $.Prefix:
713
- case $.Postfix: return !0 === e.isReference && "@" !== e.value;
714
- case $.Paren:
715
- case $.List: return !!n && 1 === n.length && ze(n[0], t);
716
- case $.Function: {
711
+ case F.Cell:
712
+ case F.Named:
713
+ case F.TableReference: return !0;
714
+ case F.Infix:
715
+ case F.Prefix:
716
+ case F.Postfix: return !0 === e.isReference && "@" !== e.value;
717
+ case F.Paren:
718
+ case F.List: return !!n && 1 === n.length && Me(n[0], t);
719
+ case F.Function: {
717
720
  if (void 0 !== e.binder) return !1;
718
721
  const i = String(e.value).toUpperCase();
719
- if ($e.has(i)) {
722
+ if (Be.has(i)) {
720
723
  if (!n) return !1;
721
- for (let e = 0; e < n.length; e++) if (ze(n[e], t)) return !0;
724
+ for (let e = 0; e < n.length; e++) if (Me(n[e], t)) return !0;
722
725
  return !1;
723
726
  }
724
727
  const s = t?.(e.value);
@@ -726,54 +729,54 @@ var ke = (e, t) => {
726
729
  }
727
730
  default: return !1;
728
731
  }
729
- }, De = (e, t) => {
732
+ }, We = (e, t) => {
730
733
  if (!e) return !1;
731
- for (let n = 0; n < e.length; n++) if (Me(e[n], t)) return !0;
734
+ for (let n = 0; n < e.length; n++) if (Ue(e[n], t)) return !0;
732
735
  return !1;
733
736
  };
734
- function Me(e, t) {
737
+ function Ue(e, t) {
735
738
  if (!e) return !1;
736
739
  if (void 0 !== e.arrayValued) return e.arrayValued;
737
740
  let n;
738
741
  const i = e.type, s = e.inputs;
739
742
  switch (i) {
740
- case $.Array:
743
+ case F.Array:
741
744
  n = !0;
742
745
  break;
743
- case $.Cell: {
746
+ case F.Cell: {
744
747
  const t = e.value;
745
748
  n = t.rowIndex === Number.MIN_SAFE_INTEGER || t.colIndex === Number.MIN_SAFE_INTEGER;
746
749
  break;
747
750
  }
748
- case $.Named:
749
- case $.Call:
750
- case $.TableReference:
751
+ case F.Named:
752
+ case F.Call:
753
+ case F.TableReference:
751
754
  n = !0;
752
755
  break;
753
- case $.Infix:
754
- case $.Prefix:
755
- case $.Postfix:
756
- n = e.isReference ? "@" !== e.value : De(s, t);
756
+ case F.Infix:
757
+ case F.Prefix:
758
+ case F.Postfix:
759
+ n = e.isReference ? "@" !== e.value : We(s, t);
757
760
  break;
758
- case $.Paren:
759
- case $.List:
760
- n = !s || 1 !== s.length || Me(s[0], t);
761
+ case F.Paren:
762
+ case F.List:
763
+ n = !s || 1 !== s.length || Ue(s[0], t);
761
764
  break;
762
- case $.Function: {
765
+ case F.Function: {
763
766
  const i = e.binder;
764
767
  if (void 0 !== i) {
765
- n = "lambda" === i.kind || !!s && Me(s[s.length - 1], t);
768
+ n = "lambda" === i.kind || !!s && Ue(s[s.length - 1], t);
766
769
  break;
767
770
  }
768
771
  const l = String(e.value).toUpperCase();
769
- if ($e.has(l)) {
770
- n = De(s, t);
772
+ if (Be.has(l)) {
773
+ n = We(s, t);
771
774
  break;
772
775
  }
773
776
  if ("INDEX" === l) {
774
777
  if (n = !1, s) for (let e = 1; e < s.length; e++) {
775
778
  const r = s[e];
776
- if (!r || r.type === $.Empty || r.isLiteral && 0 === r.value || Me(r, t)) {
779
+ if (!r || r.type === F.Empty || r.isLiteral && 0 === r.value || Ue(r, t)) {
777
780
  n = !0;
778
781
  break;
779
782
  }
@@ -793,7 +796,7 @@ function Me(e, t) {
793
796
  }
794
797
  return e.arrayValued = n, n;
795
798
  }
796
- function We(e, t) {
799
+ function _e(e, t) {
797
800
  if (void 0 !== e.firstCell) return;
798
801
  const n = (e, r) => {
799
802
  if (!e) return;
@@ -801,17 +804,17 @@ function We(e, t) {
801
804
  const i = e.inputs;
802
805
  if (!i) return;
803
806
  const s = e.type;
804
- if (s === $.Infix || s === $.Prefix || s === $.Postfix) {
807
+ if (s === F.Infix || s === F.Prefix || s === F.Postfix) {
805
808
  const t = r && !e.isReference;
806
809
  for (let e = 0; e < i.length; e++) n(i[e], t);
807
810
  return;
808
811
  }
809
- if (s === $.Paren || s === $.List) {
812
+ if (s === F.Paren || s === F.List) {
810
813
  const e = r && 1 === i.length;
811
814
  for (let t = 0; t < i.length; t++) n(i[t], e);
812
815
  return;
813
816
  }
814
- if (s === $.Function) {
817
+ if (s === F.Function) {
815
818
  const s = e.binder;
816
819
  if (void 0 !== s) {
817
820
  const e = i.length - 1;
@@ -820,8 +823,8 @@ function We(e, t) {
820
823
  }
821
824
  const l = r ? t?.(e.value)?.getDeclaration().getParameters() : null;
822
825
  for (let e = 0; e < i.length; e++) {
823
- const t = l ? Oe(l, e) : null;
824
- n(i[e], null !== t && (Be(t) || Ge(t)));
826
+ const t = l ? Ve(l, e) : null;
827
+ n(i[e], null !== t && (ze(t) || Xe(t)));
825
828
  }
826
829
  return;
827
830
  }
@@ -829,35 +832,35 @@ function We(e, t) {
829
832
  };
830
833
  n(e, !0);
831
834
  }
832
- var Ue = /* @__PURE__ */ new Set([
835
+ var je = /* @__PURE__ */ new Set([
833
836
  "=",
834
837
  "<>",
835
838
  "<",
836
839
  ">",
837
840
  "<=",
838
841
  ">="
839
- ]), _e = /* @__PURE__ */ new Set(["ROW", "COLUMN"]);
840
- function je(e, t) {
842
+ ]), Ge = /* @__PURE__ */ new Set(["ROW", "COLUMN"]);
843
+ function He(e, t) {
841
844
  if (!e || !t) return null;
842
845
  const n = (e) => t(e.value)?.getName().toUpperCase() ?? null;
843
846
  let r = !1;
844
- if (O(e, (e) => {
845
- (e.hasLazyArgs || e.type === $.Call || void 0 !== e.binder) && (r = !0);
847
+ if (v(e, (e) => {
848
+ (e.hasLazyArgs || e.type === F.Call || void 0 !== e.binder) && (r = !0);
846
849
  }), r) return null;
847
- const i = (e) => e.type === $.Number, s = (e) => e.type === $.Number || e.type === $.String || e.type === $.Boolean, l = (e) => {
850
+ const i = (e) => e.type === F.Number, s = (e) => e.type === F.Number || e.type === F.String || e.type === F.Boolean, l = (e) => {
848
851
  if (!e) return !1;
849
852
  const t = e.inputs;
850
853
  switch (e.type) {
851
- case $.Paren: return 1 === t?.length && l(t[0]);
852
- case $.Prefix: return ("-" === e.value || "+" === e.value) && l(t?.[0]);
853
- case $.Infix: {
854
+ case F.Paren: return 1 === t?.length && l(t[0]);
855
+ case F.Prefix: return ("-" === e.value || "+" === e.value) && l(t?.[0]);
856
+ case F.Infix: {
854
857
  if ("+" !== e.value && "-" !== e.value && "*" !== e.value) return !1;
855
858
  const [n, r] = t ?? [];
856
859
  return !(!n || !r) && (l(n) && (l(r) || i(r)) || i(n) && l(r));
857
860
  }
858
- case $.Function: {
861
+ case F.Function: {
859
862
  const r = n(e);
860
- if (null !== r && _e.has(r)) return !t || 0 === t.length || 1 === t.length && t[0]?.type === $.Cell;
863
+ if (null !== r && Ge.has(r)) return !t || 0 === t.length || 1 === t.length && t[0]?.type === F.Cell;
861
864
  if ("MOD" === r && 2 === t?.length) {
862
865
  const e = t[1];
863
866
  return l(t[0]) && i(e) && 0 !== e.value;
@@ -870,13 +873,13 @@ function je(e, t) {
870
873
  if (!e) return !1;
871
874
  const t = e.inputs;
872
875
  switch (e.type) {
873
- case $.Paren: return 1 === t?.length && o(t[0]);
874
- case $.Infix: {
875
- if (!Ue.has(e.value)) return !1;
876
+ case F.Paren: return 1 === t?.length && o(t[0]);
877
+ case F.Infix: {
878
+ if (!je.has(e.value)) return !1;
876
879
  const [n, r] = t ?? [];
877
880
  return !(!n || !r) && (l(n) && (l(r) || s(r)) || s(n) && l(r));
878
881
  }
879
- case $.Function: {
882
+ case F.Function: {
880
883
  const r = n(e);
881
884
  if (!t || 0 === t.length) return !1;
882
885
  if ("ISODD" === r || "ISEVEN" === r) return 1 === t.length && l(t[0]);
@@ -886,7 +889,7 @@ function je(e, t) {
886
889
  for (let n = 0; n < t.length; n++) {
887
890
  const r = t[n];
888
891
  if (!r) return !1;
889
- if (r.type !== $.Boolean) {
892
+ if (r.type !== F.Boolean) {
890
893
  if (!o(r)) return !1;
891
894
  e = !0;
892
895
  }
@@ -910,7 +913,7 @@ function je(e, t) {
910
913
  for (let t = 0; t < 1 << c; t++) {
911
914
  const n = (e) => {
912
915
  const r = a.indexOf(e);
913
- if (-1 !== r) return N(t & 1 << r ? "TRUE" : "FALSE");
916
+ if (-1 !== r) return I(t & 1 << r ? "TRUE" : "FALSE");
914
917
  const i = { ...e };
915
918
  return delete i.evalIndex, delete i.firstCell, delete i.inLazy, delete i.lazyArg, delete i.hasLazyArgs, delete i.deferred, e.inputs && (i.inputs = e.inputs.map((e) => e ? n(e) : e)), i;
916
919
  };
@@ -918,10 +921,10 @@ function je(e, t) {
918
921
  }
919
922
  return f;
920
923
  }
921
- var Ge = (e) => "*" === e.getRangeType() && null === e.getLambda() && e.getArrayDepth() <= (e.isRest() ? 1 : 0);
922
- function He(e, n, r, i = !1, s = null, l = null) {
923
- let o, a, u = r;
924
- u = me(u), i || (u = ye(u), u = Re(u), u = Ie(u), u = be(u)), [o, a] = function(e) {
924
+ var Xe = (e) => "*" === e.getRangeType() && null === e.getLambda() && e.getArrayDepth() <= (e.isRest() ? 1 : 0);
925
+ function Ke(e, n, r, i = !1, s = null, l = null) {
926
+ let a, u, c = r;
927
+ c = me(c), i || (c = ye(c), c = Re(c), c = Ie(c), c = be(c)), [a, u] = function(e) {
925
928
  const t = /* @__PURE__ */ new Map();
926
929
  let n = 0;
927
930
  const r = [e];
@@ -935,67 +938,67 @@ function He(e, n, r, i = !1, s = null, l = null) {
935
938
  return t.forEach((e, n) => {
936
939
  n && n.inputs && (e.inputs = n.inputs.map((e) => t.get(e) ?? e));
937
940
  }), [t.get(e), n];
938
- }(u);
939
- const c = p(a), f = [], d = [], g = new de();
940
- let h, m = !1;
941
+ }(c);
942
+ const f = o(u), p = [], d = [], h = new de();
943
+ let m, y = !1;
941
944
  (function(e, t) {
942
945
  if (!e || !t) return;
943
946
  const n = (e) => {
944
947
  if (!e) return;
945
- e.inLazy = !0, e.type === $.Named && (e.deferredResolve = !0);
948
+ e.inLazy = !0, e.type === F.Named && (e.deferredResolve = !0);
946
949
  const t = e.inputs;
947
950
  if (t) for (let e = 0; e < t.length; e++) n(t[e]);
948
951
  };
949
- O(e, (e) => {
950
- if (e.type !== $.Function) return;
952
+ v(e, (e) => {
953
+ if (e.type !== F.Function) return;
951
954
  if (void 0 !== e.binder) return;
952
955
  const r = e.inputs;
953
956
  if (!r || 0 === r.length) return;
954
957
  const i = t(e.value)?.getDeclaration().getParameters();
955
958
  if (i) for (let t = 0; t < r.length; t++) {
956
959
  const s = r[t];
957
- s && s.type !== $.Empty && Pe(i, t)?.isLazy() && (s.lazyArg = !0, e.hasLazyArgs = !0, n(s));
960
+ s && s.type !== F.Empty && ke(i, t)?.isLazy() && (s.lazyArg = !0, e.hasLazyArgs = !0, n(s));
958
961
  }
959
962
  });
960
- })(o, l);
961
- const y = (e) => {
962
- void 0 === h && (h = /* @__PURE__ */ new Map());
963
- let t = h.get(e);
964
- return void 0 === t && h.set(e, t = []), t;
965
- }, I = (e, t) => {
966
- void 0 === e ? f.push(t) : y(e).push(t);
967
- }, b = (e) => {
968
- e?.type !== $.Infix || "+" !== e.value && "-" !== e.value || (e.snapsCancellation = !0);
963
+ })(a, l);
964
+ const I = (e) => {
965
+ void 0 === m && (m = /* @__PURE__ */ new Map());
966
+ let t = m.get(e);
967
+ return void 0 === t && m.set(e, t = []), t;
968
+ }, x = (e, t) => {
969
+ void 0 === e ? p.push(t) : I(e).push(t);
970
+ }, R = (e) => {
971
+ e?.type !== F.Infix || "+" !== e.value && "-" !== e.value || (e.snapsCancellation = !0);
969
972
  };
970
- o = O(o, (t, n, r) => {
973
+ a = v(a, (t, n, r) => {
971
974
  const i = t.type, s = t.evalIndex;
972
- if (c[s] = null, i === $.TableColumn || i === $.TableSpecifier || t.isReference && pe(r, $.TableReference)) return;
973
- if (m = m || !Qe(t), t.binding?.declaration) return d[t.binding.slot] = -1, void (c[s] = void 0);
975
+ if (f[s] = null, i === F.TableColumn || i === F.TableSpecifier || t.isReference && pe(r, F.TableReference)) return;
976
+ if (y = y || !tt(t), t.binding?.declaration) return d[t.binding.slot] = -1, void (f[s] = void 0);
974
977
  const l = ((e, t, n) => {
975
- if (ke(e, t)) return e;
976
- for (let e = n.length - 1; e >= 0; e--) if (ke(n[e], n[e - 1])) return n[e];
978
+ if (Oe(e, t)) return e;
979
+ for (let e = n.length - 1; e >= 0; e--) if (Oe(n[e], n[e - 1])) return n[e];
977
980
  })(t, n, r);
978
- l === t && y(t), void 0 !== l && i === $.Named && (t.deferredResolve = !0);
979
- const o = t.binder;
980
- if (o && "let" === o.kind) {
981
+ l === t && I(t), void 0 !== l && i === F.Named && (t.deferredResolve = !0);
982
+ const a = t.binder;
983
+ if (a && "let" === a.kind) {
981
984
  const e = t.inputs, n = e?.length ?? 0;
982
985
  let r = 0;
983
- for (let t = 0; t + 1 < n && r < o.slots.length; t += 2) e[t]?.binding?.declaration && (d[o.slots[r++]] = e[t + 1]?.evalIndex ?? -1);
986
+ for (let t = 0; t + 1 < n && r < a.slots.length; t += 2) e[t]?.binding?.declaration && (d[a.slots[r++]] = e[t + 1]?.evalIndex ?? -1);
984
987
  }
985
- if ((t.isReference || n && n.isReference) && (g.processNode(t, n), t.isReference)) {
986
- if (i === $.Named) return void (void 0 !== l && I(l, t));
987
- if (i === $.Cell || i === $.TableReference || i === $.Error) return;
988
- if (i === $.Infix || i === $.Prefix || i === $.Postfix || i === $.List) return void I(l, t);
988
+ if ((t.isReference || n && n.isReference) && (h.processNode(t, n), t.isReference)) {
989
+ if (i === F.Named) return void (void 0 !== l && x(l, t));
990
+ if (i === F.Cell || i === F.TableReference || i === F.Error) return;
991
+ if (i === F.Infix || i === F.Prefix || i === F.Postfix || i === F.List) return void x(l, t);
989
992
  }
990
- if (t.isLiteral) if (i !== $.Array) c[s] = t.value;
993
+ if (t.isLiteral) if (i !== F.Array) f[s] = t.value;
991
994
  else {
992
- const n = t.value, r = n.length, i = p(r);
995
+ const n = t.value, r = n.length, i = o(r);
993
996
  for (let e = 0; e < r; e++) {
994
- const t = n[e].value, r = t.length, s = p(r);
997
+ const t = n[e].value, r = t.length, s = o(r);
995
998
  for (let e = 0; e < r; e++) {
996
999
  const n = t[e];
997
1000
  let r = null;
998
- if (n && (r = n.type === $.Error ? x(n.value) : n.value, n.type === $.Prefix)) {
1001
+ if (n && (r = n.type === F.Error ? N(n.value) : n.value, n.type === F.Prefix)) {
999
1002
  const e = n.value;
1000
1003
  r = n.inputs[0].value, "-" === e && (r = -r);
1001
1004
  }
@@ -1003,18 +1006,18 @@ function He(e, n, r, i = !1, s = null, l = null) {
1003
1006
  }
1004
1007
  i[e] = s;
1005
1008
  }
1006
- const l = S(i);
1007
- c[s] = new k(e, l.values, l.coords, void 0, l.isLiteral);
1009
+ const l = g(i);
1010
+ f[s] = new V(e, l.values, l.coords, void 0, l.isLiteral);
1008
1011
  }
1009
1012
  else {
1010
- if (i !== $.Empty) return "lambda" === t.binder?.kind && b(t.inputs[t.inputs.length - 1]), I(l, t), t;
1011
- c[s] = void 0;
1013
+ if (i !== F.Empty) return "lambda" === t.binder?.kind && R(t.inputs[t.inputs.length - 1]), x(l, t), t;
1014
+ f[s] = void 0;
1012
1015
  }
1013
- }), b(o), h?.forEach((e, t) => {
1016
+ }), R(a), m?.forEach((e, t) => {
1014
1017
  t.deferred = e;
1015
1018
  });
1016
- const R = p(g.cells.size);
1017
- g.cells.forEach((e, t) => {
1019
+ const T = o(h.cells.size);
1020
+ h.cells.forEach((e, t) => {
1018
1021
  const n = t.value, r = n.colIndex, i = n.rowIndex, s = n.$colIndex, l = n.$rowIndex, o = {
1019
1022
  colStart: r,
1020
1023
  rowStart: i,
@@ -1025,47 +1028,47 @@ function He(e, n, r, i = !1, s = null, l = null) {
1025
1028
  $colEnd: s,
1026
1029
  $rowEnd: l
1027
1030
  };
1028
- r === Number.MIN_SAFE_INTEGER && (o.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (o.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (o.scope = n.scope), R[e] = o;
1031
+ r === Number.MIN_SAFE_INTEGER && (o.colEnd = Number.MAX_SAFE_INTEGER), i === Number.MIN_SAFE_INTEGER && (o.rowEnd = Number.MAX_SAFE_INTEGER), n.scope && (o.scope = n.scope), T[e] = o;
1029
1032
  });
1030
- const E = R.length, A = p(E);
1031
- for (let e = 0; e < E; e++) A[e] = {
1033
+ const A = T.length, S = o(A);
1034
+ for (let e = 0; e < A; e++) S[e] = {
1032
1035
  colStart: 0,
1033
1036
  rowStart: 0,
1034
1037
  colEnd: 0,
1035
1038
  rowEnd: 0,
1036
1039
  scope: null
1037
1040
  };
1038
- const w = p(g.references.size);
1039
- g.references.forEach((e) => {
1041
+ const w = o(h.references.size);
1042
+ h.references.forEach((e) => {
1040
1043
  w[e.index] = e;
1041
1044
  });
1042
1045
  const C = [];
1043
- g.rootReferences.forEach((e) => {
1046
+ h.rootReferences.forEach((e) => {
1044
1047
  C.push(e.index);
1045
1048
  }), function(e, t, n = !1) {
1046
1049
  if (n) {
1047
1050
  const t = (e) => {
1048
1051
  if (!e) return;
1049
1052
  const n = e.type;
1050
- n !== $.Function && n !== $.Call || (e.implicitIntersect = !0);
1053
+ n !== F.Function && n !== F.Call || (e.implicitIntersect = !0);
1051
1054
  const r = e.inputs;
1052
1055
  if (r) for (let e = 0; e < r.length; e++) t(r[e]);
1053
1056
  };
1054
1057
  t(e);
1055
1058
  return;
1056
1059
  }
1057
- const r = (e) => Me(e, t), i = (e, n) => {
1060
+ const r = (e) => Ue(e, t), i = (e, n) => {
1058
1061
  if (!e) return;
1059
1062
  const s = e.type;
1060
- s !== $.Function && s !== $.Call || (e.implicitIntersect = n);
1063
+ s !== F.Function && s !== F.Call || (e.implicitIntersect = n);
1061
1064
  const l = e.inputs;
1062
1065
  if (l) {
1063
- if (s === $.Infix || s === $.Prefix || s === $.Postfix) {
1066
+ if (s === F.Infix || s === F.Prefix || s === F.Postfix) {
1064
1067
  const t = !e.isReference;
1065
1068
  for (let e = 0; e < l.length; e++) i(l[e], (!t || !r(l[e])) && n);
1066
1069
  return;
1067
1070
  }
1068
- if (s === $.Function) {
1071
+ if (s === F.Function) {
1069
1072
  const r = e.binder;
1070
1073
  if (void 0 !== r) {
1071
1074
  const e = "lambda" !== r.kind && n;
@@ -1077,8 +1080,8 @@ function He(e, n, r, i = !1, s = null, l = null) {
1077
1080
  if (s) for (let e = 0; e < l.length && !o; e++) {
1078
1081
  const n = l[e];
1079
1082
  if (!n) continue;
1080
- const r = Oe(s, e);
1081
- r && Ve(r, n, t) && (o = !0);
1083
+ const r = Ve(s, e);
1084
+ r && De(r, n, t) && (o = !0);
1082
1085
  }
1083
1086
  o && (e.implicitIntersect = !1);
1084
1087
  for (let e = 0; e < l.length; e++) i(l[e], !o && n);
@@ -1088,53 +1091,54 @@ function He(e, n, r, i = !1, s = null, l = null) {
1088
1091
  }
1089
1092
  };
1090
1093
  i(e, !r(e));
1091
- }(o, l, !0 === r.legacyIntersect);
1092
- const N = (e) => {
1094
+ }(a, l, !0 === r.legacyIntersect);
1095
+ const P = (e) => {
1093
1096
  const t = e.length;
1094
1097
  for (let n = 0; n < t; n++) {
1095
1098
  const t = e[n], r = t.type;
1096
- if (r === $.Infix) {
1099
+ if (r === F.Infix) {
1097
1100
  if (!0 === t.snapsCancellation) {
1098
1101
  t.fn = ue[t.value];
1099
1102
  continue;
1100
1103
  }
1101
1104
  t.fn = ae[t.value];
1102
- } else r === $.Prefix ? t.fn = ce[t.value] : r === $.Postfix && (t.fn = fe[t.value]);
1105
+ } else r === F.Prefix ? t.fn = ce[t.value] : r === F.Postfix && (t.fn = fe[t.value]);
1103
1106
  }
1104
1107
  };
1105
- let F;
1106
- N(f), h?.forEach(N);
1107
- const P = i ? v(t(e.getLocale()).decimal) : T, L = {
1108
+ let L;
1109
+ P(p), m?.forEach(P);
1110
+ const k = i ? E(t(e.getLocale()).decimal) : b, $ = {
1108
1111
  runtime: e,
1109
1112
  symbols: n,
1110
1113
  getFunction: l,
1111
- ast: o,
1112
- evaluations: c,
1113
- executions: f,
1114
+ ast: a,
1115
+ evaluations: f,
1116
+ executions: p,
1114
1117
  bindings: d,
1115
- referencesAbsolute: A,
1118
+ referencesAbsolute: S,
1116
1119
  referencesExecute: w,
1117
- referencesRelative: R,
1120
+ referencesRelative: T,
1118
1121
  referencesRoot: C,
1119
- referenceIndices: g.referenceIndices,
1120
- formatReferenceIndices: Te(o, l),
1121
- getTokens: () => F ??= ge(o, i, P),
1122
- namedIds: Ee(o),
1123
- symbolIds: Le(o),
1124
- hasTotals: Se(o, l),
1125
- hasDataTable: we(o, l),
1126
- hasVolatile: Ce(o, l),
1127
- ...Fe(o, l),
1128
- isReferenceOnly: !m,
1122
+ referenceIndices: h.referenceIndices,
1123
+ formatReferenceIndices: Te(a, l),
1124
+ getTokens: () => L ??= ge(a, i, k),
1125
+ namedIds: Ee(a),
1126
+ symbolIds: $e(a),
1127
+ hasTotals: we(a, l),
1128
+ hasPivotData: Ce(a, l, Se),
1129
+ hasDataTable: Ne(a, l),
1130
+ hasVolatile: Fe(a, l),
1131
+ ...Le(a, l),
1132
+ isReferenceOnly: !y,
1129
1133
  error: s,
1130
1134
  transform: (t) => {
1131
- let r = O(o, t);
1132
- return r === o ? L : He(e, n, r, i, s, l);
1135
+ let r = v(a, t);
1136
+ return r === a ? $ : Ke(e, n, r, i, s, l);
1133
1137
  }
1134
1138
  };
1135
- return L;
1139
+ return $;
1136
1140
  }
1137
- function Xe(e) {
1141
+ function Ze(e) {
1138
1142
  let t = -1, n = -1;
1139
1143
  return Number.isSafeInteger(e.previousToken?.startLine) ? (t = e.previousToken.startLine, n = e.previousToken.endColumn + 1) : Number.isSafeInteger(e.token?.startLine) && (t = e.token.startLine, n = e.token.startColumn), -1 !== t ? (e.errorLocation = {
1140
1144
  line: t,
@@ -1165,29 +1169,29 @@ Object.freeze([
1165
1169
  ">="
1166
1170
  ]
1167
1171
  ]);
1168
- var Ke = Object.freeze([
1172
+ var qe = Object.freeze([
1169
1173
  ":",
1170
1174
  ".:.",
1171
1175
  ".:",
1172
1176
  ":."
1173
- ]), Ze = Object.freeze([
1177
+ ]), Je = Object.freeze([
1174
1178
  ":",
1175
1179
  " ",
1176
1180
  ".:.",
1177
1181
  ".:",
1178
1182
  ":."
1179
- ]), qe = Object.freeze(["@"]), Ye = Object.freeze(["#"]), Je = Object.freeze(Ze.concat(Ye)), Qe = (Object.freeze(Ze.concat(qe).concat(Ye)), (e) => {
1183
+ ]), Qe = Object.freeze(["@"]), Ye = Object.freeze(["#"]), et = Object.freeze(Je.concat(Ye)), tt = (Object.freeze(Je.concat(Qe).concat(Ye)), (e) => {
1180
1184
  if (!e) return !1;
1181
1185
  const t = e.type;
1182
- if (t === $.Cell) return !0;
1183
- if (t === $.TableReference) return !0;
1184
- if (t === $.Infix) {
1185
- if (!Ze.includes(e.value)) return !1;
1186
+ if (t === F.Cell) return !0;
1187
+ if (t === F.TableReference) return !0;
1188
+ if (t === F.Infix) {
1189
+ if (!Je.includes(e.value)) return !1;
1186
1190
  const t = e.inputs, n = t[0], r = t[1];
1187
- return Qe(n) && Qe(r);
1191
+ return tt(n) && tt(r);
1188
1192
  }
1189
- return t === $.List && (e.inputs?.every(Qe) ?? !1);
1190
- }), et = (e) => !!(e && (e.type === $.Infix && Je.includes(e.value) || e.type === $.Postfix && Ye.includes(e.value) || e.type === $.Array || e.type === $.TableReference)), tt = Object.freeze([
1193
+ return t === F.List && (e.inputs?.every(tt) ?? !1);
1194
+ }), nt = (e) => !!(e && (e.type === F.Infix && et.includes(e.value) || e.type === F.Postfix && Ye.includes(e.value) || e.type === F.Array || e.type === F.TableReference)), rt = Object.freeze([
1191
1195
  "+",
1192
1196
  "-",
1193
1197
  "*",
@@ -1200,18 +1204,18 @@ var Ke = Object.freeze([
1200
1204
  "<",
1201
1205
  ">=",
1202
1206
  "<="
1203
- ]), nt = Object.freeze(["-", "+"]), rt = (e, t) => {
1207
+ ]), it = Object.freeze(["-", "+"]), st = (e, t) => {
1204
1208
  if (!e) return !1;
1205
1209
  const n = e.type;
1206
- if (e.isLiteral) return n !== $.Error;
1207
- if (n === $.Paren || n === $.List) {
1210
+ if (e.isLiteral) return n !== F.Error;
1211
+ if (n === F.Paren || n === F.List) {
1208
1212
  const n = e.inputs;
1209
- return !(!n || 0 === n.length) && n.every((e) => rt(e, t));
1213
+ return !(!n || 0 === n.length) && n.every((e) => st(e, t));
1210
1214
  }
1211
- if (n === $.Infix) return tt.includes(e.value);
1212
- if (n === $.Prefix) return nt.includes(e.value);
1213
- if (n === $.Postfix) return "%" === e.value;
1214
- if (n === $.Function) {
1215
+ if (n === F.Infix) return rt.includes(e.value);
1216
+ if (n === F.Prefix) return it.includes(e.value);
1217
+ if (n === F.Postfix) return "%" === e.value;
1218
+ if (n === F.Function) {
1215
1219
  if (!t) return !1;
1216
1220
  const n = t(e.value);
1217
1221
  if (!n) return !1;
@@ -1219,37 +1223,37 @@ var Ke = Object.freeze([
1219
1223
  return "p" !== i && (null !== i || null === r.getLambda() && null != r.getScalarType());
1220
1224
  }
1221
1225
  return !1;
1222
- }, it = (e, t) => {
1226
+ }, lt = (e, t) => {
1223
1227
  if (!e) return null;
1224
1228
  let n = null;
1225
1229
  const r = (e) => {
1226
1230
  if (n || !e) return;
1227
- if (e.type === $.Infix && " " === e.value) {
1231
+ if (e.type === F.Infix && " " === e.value) {
1228
1232
  const r = e.inputs, i = r?.[0], s = r?.[1];
1229
- if (rt(i, t)) return void (n = i);
1230
- if (rt(s, t)) return void (n = s);
1233
+ if (st(i, t)) return void (n = i);
1234
+ if (st(s, t)) return void (n = s);
1231
1235
  }
1232
1236
  const i = e.inputs;
1233
1237
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1234
1238
  };
1235
1239
  return r(e), n;
1236
- }, st = (e, t) => {
1240
+ }, ot = (e, t) => {
1237
1241
  if (!e) return null;
1238
1242
  let n = null;
1239
1243
  const r = (e) => {
1240
1244
  if (n || !e) return;
1241
- if (e.type === $.Postfix && "#" === e.value) {
1245
+ if (e.type === F.Postfix && "#" === e.value) {
1242
1246
  const r = e.inputs?.[0];
1243
- if (r && rt(r, t)) return void (n = r);
1247
+ if (r && st(r, t)) return void (n = r);
1244
1248
  }
1245
1249
  const i = e.inputs;
1246
1250
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1247
1251
  };
1248
1252
  return r(e), n;
1249
- }, lt = (e) => {
1253
+ }, at = (e) => {
1250
1254
  for (let t = 0; t < e.length; t++) if (e[t].getRepeatingTypes()) return t;
1251
1255
  return -1;
1252
- }, ot = (e, t, n) => {
1256
+ }, ut = (e, t, n) => {
1253
1257
  const r = e[t].getRepeatingTypes(), i = r.length, s = t, l = e.length - t - 1;
1254
1258
  let o = l;
1255
1259
  for (; o > 0 && e[t + o].isOptional();) o--;
@@ -1274,12 +1278,12 @@ var Ke = Object.freeze([
1274
1278
  };
1275
1279
  }
1276
1280
  return null;
1277
- }, at = (e) => {
1281
+ }, ct = (e) => {
1278
1282
  if (!e) return null;
1279
1283
  let t = null;
1280
1284
  const n = (e) => {
1281
1285
  if (t || !e) return;
1282
- if (e.type === $.Array && Array.isArray(e.value)) {
1286
+ if (e.type === F.Array && Array.isArray(e.value)) {
1283
1287
  const n = e.value, r = (n[0]?.value)?.length ?? 0;
1284
1288
  for (let e = 1; e < n.length && !t; e++) {
1285
1289
  const i = (n[e]?.value)?.length ?? 0;
@@ -1290,19 +1294,19 @@ var Ke = Object.freeze([
1290
1294
  if (r) for (let e = 0; e < r.length && !t; e++) n(r[e]);
1291
1295
  };
1292
1296
  return n(e), t;
1293
- }, ut = (e, t) => {
1297
+ }, ft = (e, t) => {
1294
1298
  if (!e || !t) return null;
1295
1299
  let n = null;
1296
1300
  const r = (e) => {
1297
1301
  if (n || !e) return;
1298
- if (e.type === $.Function) {
1302
+ if (e.type === F.Function) {
1299
1303
  const r = e.value, i = t(r);
1300
1304
  if (i) {
1301
1305
  const t = i.getDeclaration(), s = t.getParameters(), l = e.inputs?.length ?? 0, o = t.getMaxArguments();
1302
1306
  if (l > o) return void (n = `Too many arguments for ${r}. The most it accepts is ${o}, but got ${l}.`);
1303
- const a = s.length > 0 ? lt(s) : -1, u = s.length > 0 && s[s.length - 1].isRest();
1307
+ const a = s.length > 0 ? at(s) : -1, u = s.length > 0 && s[s.length - 1].isRest();
1304
1308
  if (a >= 0) {
1305
- if (!ot(s, a, l)) {
1309
+ if (!ut(s, a, l)) {
1306
1310
  const e = s[a].getRepeatingTypes().length, t = s.length - 1;
1307
1311
  n = 1 === e ? `Too few arguments for ${r}. Expected at least ${t + 1}, but got ${l}.` : `Wrong number of arguments for ${r}. Expected ${t} plus a multiple of ${e}, but got ${l}.`;
1308
1312
  }
@@ -1317,24 +1321,24 @@ var Ke = Object.freeze([
1317
1321
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1318
1322
  };
1319
1323
  return r(e), n;
1320
- }, ct = (e, t) => {
1324
+ }, pt = (e, t) => {
1321
1325
  if (!e || !t) return null;
1322
1326
  let n = null;
1323
1327
  const r = (e) => {
1324
1328
  if (n || !e) return;
1325
- if (e.type === $.Function) {
1329
+ if (e.type === F.Function) {
1326
1330
  const r = t(e.value);
1327
1331
  if (r) {
1328
1332
  const i = r.getDeclaration().getParameters(), s = e.inputs;
1329
1333
  if (i.length > 0 && s) {
1330
1334
  const e = ((e, t) => {
1331
- const n = new Array(t), r = e.length, i = r > 0 ? lt(e) : -1;
1335
+ const n = new Array(t), r = e.length, i = r > 0 ? at(e) : -1;
1332
1336
  if (i < 0) {
1333
1337
  const i = r > 0 ? e[r - 1] : null, s = !!i && i.isRest();
1334
1338
  for (let l = 0; l < t; l++) n[l] = l < r ? e[l] : s ? i : null;
1335
1339
  return n;
1336
1340
  }
1337
- const s = e[i].getRepeatingTypes(), l = s.length, o = i, a = ot(e, i, t), u = a ? a.suffix : r - i - 1, c = Math.max(0, t - o - u);
1341
+ const s = e[i].getRepeatingTypes(), l = s.length, o = i, a = ut(e, i, t), u = a ? a.suffix : r - i - 1, c = Math.max(0, t - o - u);
1338
1342
  for (let a = 0; a < t; a++) if (a < o) n[a] = e[a];
1339
1343
  else if (a < o + c) n[a] = s[(a - o) % l];
1340
1344
  else {
@@ -1345,7 +1349,7 @@ var Ke = Object.freeze([
1345
1349
  })(i, s.length);
1346
1350
  for (let r = 0; r < s.length && !n; r++) {
1347
1351
  const i = e[r];
1348
- i && "p" === i.getRangeType() && rt(s[r], t) && (n = s[r]);
1352
+ i && "p" === i.getRangeType() && st(s[r], t) && (n = s[r]);
1349
1353
  }
1350
1354
  }
1351
1355
  }
@@ -1354,42 +1358,42 @@ var Ke = Object.freeze([
1354
1358
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1355
1359
  };
1356
1360
  return r(e), n;
1357
- }, ft = (e, t) => {
1361
+ }, dt = (e, t) => {
1358
1362
  if (!e) return null;
1359
1363
  let n = null;
1360
1364
  const r = (e) => {
1361
1365
  if (n || !e) return;
1362
- if (e.type === $.Call) {
1366
+ if (e.type === F.Call) {
1363
1367
  const r = e.inputs?.[0];
1364
- if (r && rt(r, t)) return void (n = "This expression always produces a value, so it cannot be called as a function.");
1368
+ if (r && st(r, t)) return void (n = "This expression always produces a value, so it cannot be called as a function.");
1365
1369
  }
1366
1370
  const i = e.inputs;
1367
1371
  if (i) for (let e = 0; e < i.length && !n; e++) r(i[e]);
1368
1372
  };
1369
1373
  return r(e), n;
1370
- }, pt = (e, t) => {
1371
- if (e.type !== $.Function) return;
1374
+ }, gt = (e, t) => {
1375
+ if (e.type !== F.Function) return;
1372
1376
  const n = e.value;
1373
1377
  if ("string" != typeof n) return;
1374
1378
  const r = (t?.(n)?.getName() ?? n).toUpperCase();
1375
1379
  return "LET" === r ? "let" : "LAMBDA" === r ? "lambda" : void 0;
1376
- }, dt = (e) => {
1377
- if (e?.type !== $.Named) return;
1380
+ }, vt = (e) => {
1381
+ if (e?.type !== F.Named) return;
1378
1382
  const t = e.value;
1379
1383
  return t?.nameId && !t.scope && !0 !== t.optional ? t.nameId : void 0;
1380
- }, gt = /^[A-Za-z_\\][A-Za-z0-9_\\]*$/, vt = /* @__PURE__ */ new Set(["TRUE", "FALSE"]), ht = (e) => {
1381
- if (e?.type === $.Named) {
1384
+ }, ht = /^[A-Za-z_\\][A-Za-z0-9_\\]*$/, mt = /* @__PURE__ */ new Set(["TRUE", "FALSE"]), yt = (e) => {
1385
+ if (e?.type === F.Named) {
1382
1386
  const t = e.value;
1383
1387
  if (!0 !== t?.optional || !t.nameId || t.scope) return;
1384
1388
  return t.nameId;
1385
1389
  }
1386
- if (e?.type !== $.TableReference) return;
1390
+ if (e?.type !== F.TableReference) return;
1387
1391
  const t = e.value;
1388
1392
  let n;
1389
1393
  if (null === t || "string" == typeof t) {
1390
1394
  if (t) return;
1391
1395
  const r = e.inputs;
1392
- if (!r || 1 !== r.length || r[0]?.type !== $.TableColumn) return;
1396
+ if (!r || 1 !== r.length || r[0]?.type !== F.TableColumn) return;
1393
1397
  const i = r[0].value;
1394
1398
  if ("string" != typeof i) return;
1395
1399
  n = i;
@@ -1399,29 +1403,29 @@ var Ke = Object.freeze([
1399
1403
  if (!e.columnFromId || e.columnFromId !== e.columnToId) return;
1400
1404
  n = e.columnFromId;
1401
1405
  }
1402
- return gt.test(n) && !vt.has(n.toUpperCase()) && e.image === `[${n}]` ? n : void 0;
1403
- }, mt = (e) => {
1404
- const t = u(e.image ?? e.value);
1406
+ return ht.test(n) && !mt.has(n.toUpperCase()) && e.image === `[${n}]` ? n : void 0;
1407
+ }, It = (e) => {
1408
+ const t = O(e.image ?? e.value);
1405
1409
  t.image = e.image ?? e.value, t.wsBefore = e.wsBefore;
1406
1410
  const n = {
1407
- type: $.Call,
1411
+ type: F.Call,
1408
1412
  value: null,
1409
1413
  inputs: [t, ...e.inputs ?? []],
1410
1414
  wsAfter: e.wsAfter
1411
1415
  };
1412
1416
  return e.error && (n.error = e.error), n;
1413
1417
  };
1414
- function yt(e, t) {
1415
- return e && t ? O(e, (e) => {
1416
- if (e.type === $.Function && "string" == typeof e.value && !t(e.value)) return mt(e);
1418
+ function bt(e, t) {
1419
+ return e && t ? v(e, (e) => {
1420
+ if (e.type === F.Function && "string" == typeof e.value && !t(e.value)) return It(e);
1417
1421
  }) : e;
1418
1422
  }
1419
- function It(e, t) {
1423
+ function xt(e, t) {
1420
1424
  const n = t.name.toUpperCase(), r = e ? e.filter((e) => e.name.toUpperCase() !== n) : [];
1421
1425
  return r.push(t), r;
1422
1426
  }
1423
- function bt(e) {
1424
- if (e?.type !== $.Function || "lambda" !== e.binder?.kind) return;
1427
+ function Rt(e) {
1428
+ if (e?.type !== F.Function || "lambda" !== e.binder?.kind) return;
1425
1429
  const t = e.inputs ?? [], n = [];
1426
1430
  for (let e = 0; e < t.length - 1; e++) {
1427
1431
  const r = t[e];
@@ -1434,19 +1438,19 @@ function bt(e) {
1434
1438
  }
1435
1439
  return n;
1436
1440
  }
1437
- var xt = /* @__PURE__ */ new Set([
1441
+ var Et = /* @__PURE__ */ new Set([
1438
1442
  "IF",
1439
1443
  "IFERROR",
1440
1444
  "IFNA"
1441
1445
  ]);
1442
- function Rt(e, t) {
1443
- if (!e || e.type !== $.Function || "string" != typeof e.value) return e;
1446
+ function Tt(e, t) {
1447
+ if (!e || e.type !== F.Function || "string" != typeof e.value) return e;
1444
1448
  const n = (t?.(e.value)?.getName() ?? e.value).toUpperCase();
1445
- if (!xt.has(n)) return e;
1449
+ if (!Et.has(n)) return e;
1446
1450
  const r = e.inputs;
1447
1451
  let i;
1448
1452
  if (r) for (let e = 0; e < r.length; e++) {
1449
- const n = Rt(r[e], t);
1453
+ const n = Tt(r[e], t);
1450
1454
  n !== r[e] && ((i ??= [...r])[e] = n);
1451
1455
  }
1452
1456
  return {
@@ -1455,7 +1459,7 @@ function Rt(e, t) {
1455
1459
  passOmitted: !0
1456
1460
  };
1457
1461
  }
1458
- function Et(e, t = null) {
1462
+ function At(e, t = null) {
1459
1463
  if (!e) return e;
1460
1464
  const n = [];
1461
1465
  let r = 0;
@@ -1475,15 +1479,15 @@ function Et(e, t = null) {
1475
1479
  } : e;
1476
1480
  }, s = (e) => {
1477
1481
  if (!e) return e;
1478
- const l = pt(e, t);
1482
+ const l = gt(e, t);
1479
1483
  if (l) return ((e, l) => {
1480
1484
  const o = e.inputs, a = o?.length ?? 0;
1481
1485
  if (!o || a < 1) return i(e);
1482
1486
  const u = n.length, c = [], f = [...o], p = (e, t = !1) => {
1483
1487
  const i = f[e];
1484
- let s = dt(i), l = !1;
1488
+ let s = vt(i), l = !1;
1485
1489
  if (void 0 === s && t) {
1486
- if (s = ht(i), void 0 === s) return;
1490
+ if (s = yt(i), void 0 === s) return;
1487
1491
  l = !0;
1488
1492
  } else if (void 0 === s) return;
1489
1493
  const o = r++;
@@ -1493,7 +1497,7 @@ function Et(e, t = null) {
1493
1497
  name: s
1494
1498
  }), c.push(o), f[e] = l ? {
1495
1499
  ...i,
1496
- type: $.Named,
1500
+ type: F.Named,
1497
1501
  value: {
1498
1502
  nameId: s,
1499
1503
  scope: null
@@ -1518,7 +1522,7 @@ function Et(e, t = null) {
1518
1522
  for (let e = 0; e < a - 1; e++) p(e, !0);
1519
1523
  f[a - 1] && (f[a - 1] = s(f[a - 1]));
1520
1524
  } else {
1521
- for (let e = 0; e + 1 < a; e += 2) f[e + 1] && (f[e + 1] = Rt(s(f[e + 1]), t)), p(e);
1525
+ for (let e = 0; e + 1 < a; e += 2) f[e + 1] && (f[e + 1] = Tt(s(f[e + 1]), t)), p(e);
1522
1526
  a % 2 == 1 && f[a - 1] && (f[a - 1] = s(f[a - 1]));
1523
1527
  }
1524
1528
  for (; n.length > u;) n.pop();
@@ -1531,22 +1535,22 @@ function Et(e, t = null) {
1531
1535
  }
1532
1536
  };
1533
1537
  })(e, l);
1534
- if (e.type === $.Function && "string" == typeof e.value) {
1538
+ if (e.type === F.Function && "string" == typeof e.value) {
1535
1539
  const r = e.value.toUpperCase();
1536
- if (n.some((e) => e.key === r) && !t?.(e.value)) return i(mt(e));
1540
+ if (n.some((e) => e.key === r) && !t?.(e.value)) return i(It(e));
1537
1541
  }
1538
1542
  if (n.length > 0 && e.isReference && ":" === e.value && 2 === e.inputs?.length) {
1539
1543
  const [t, r] = e.inputs;
1540
- if (Tt(t) && Tt(r)) {
1544
+ if (St(t) && St(r)) {
1541
1545
  const s = t.image.toUpperCase(), l = r.image.toUpperCase();
1542
1546
  if (n.some((e) => e.key === s || e.key === l)) return i({
1543
1547
  ...e,
1544
- inputs: [At(t), At(r)]
1548
+ inputs: [wt(t), wt(r)]
1545
1549
  });
1546
1550
  }
1547
1551
  }
1548
- if (e.type === $.Named) {
1549
- const t = dt(e);
1552
+ if (e.type === F.Named) {
1553
+ const t = vt(e);
1550
1554
  if (void 0 !== t) {
1551
1555
  const r = t.toUpperCase();
1552
1556
  for (let i = n.length - 1; i >= 0; i--) {
@@ -1565,7 +1569,7 @@ function Et(e, t = null) {
1565
1569
  return e;
1566
1570
  }
1567
1571
  const o = i(e);
1568
- if (o.type === $.Function && "string" == typeof o.value && "ISOMITTED" === (t?.(o.value)?.getName() ?? o.value).toUpperCase()) {
1572
+ if (o.type === F.Function && "string" == typeof o.value && "ISOMITTED" === (t?.(o.value)?.getName() ?? o.value).toUpperCase()) {
1569
1573
  const e = o.inputs;
1570
1574
  if (e) {
1571
1575
  let n;
@@ -1578,7 +1582,7 @@ function Et(e, t = null) {
1578
1582
  };
1579
1583
  continue;
1580
1584
  }
1581
- const s = Rt(i, t);
1585
+ const s = Tt(i, t);
1582
1586
  s !== i && ((n ??= [...e])[r] = s);
1583
1587
  }
1584
1588
  if (n) return {
@@ -1591,54 +1595,54 @@ function Et(e, t = null) {
1591
1595
  };
1592
1596
  return s(e);
1593
1597
  }
1594
- var Tt = (e) => {
1595
- if (e?.type !== $.Cell || void 0 === e.image) return !1;
1598
+ var St = (e) => {
1599
+ if (e?.type !== F.Cell || void 0 === e.image) return !1;
1596
1600
  const t = e.value;
1597
1601
  return t.rowIndex === Number.MIN_SAFE_INTEGER && !0 !== t.$colIndex && !t.scope;
1598
- }, At = (e) => {
1599
- const t = u(e.image);
1600
- return V(t, e), t;
1601
- }, St = (e) => e?.type === $.Cell, wt = (e, t = null) => {
1602
+ }, wt = (e) => {
1603
+ const t = O(e.image);
1604
+ return k(t, e), t;
1605
+ }, Ct = (e) => e?.type === F.Cell, Nt = (e, t = null) => {
1602
1606
  if (!e) return e;
1603
1607
  let n = !1;
1604
1608
  const r = (e) => {
1605
1609
  if (n || !e) return;
1606
- const i = pt(e, t), s = e.inputs;
1610
+ const i = gt(e, t), s = e.inputs;
1607
1611
  if (i && s) {
1608
1612
  const e = "let" === i ? 2 : 1;
1609
- for (let t = 0; t < s.length - 1; t += e) if (St(s[t])) return void (n = !0);
1613
+ for (let t = 0; t < s.length - 1; t += e) if (Ct(s[t])) return void (n = !0);
1610
1614
  }
1611
1615
  if (s) for (let e = 0; e < s.length && !n; e++) r(s[e]);
1612
1616
  };
1613
1617
  if (r(e), !n) return e;
1614
1618
  let i = null;
1615
- const s = O(e, (e) => {
1616
- if (e?.type !== $.Cell) return;
1619
+ const s = v(e, (e) => {
1620
+ if (e?.type !== F.Cell) return;
1617
1621
  const t = e.value, n = e.image;
1618
1622
  if (!0 === t?.$colIndex || !0 === t?.$rowIndex) return void (i ??= `'${n ?? "a reference"}' cannot be absolute here. A LET/LAMBDA name that is a cell reference makes every reference in the formula a name, and a name cannot contain '$'.`);
1619
1623
  if (void 0 === n) return;
1620
- const r = u(n);
1621
- V(r, e);
1624
+ const r = O(n);
1625
+ k(r, e);
1622
1626
  const s = t?.scope;
1623
1627
  return s && (r.value.scope = s, r.value.scopeImage = t.scopeImage), r;
1624
1628
  });
1625
1629
  return i ?? s;
1626
- }, Ct = (e, t) => {
1630
+ }, Ft = (e, t) => {
1627
1631
  if (!e) return null;
1628
1632
  let n = null;
1629
1633
  const r = (e) => {
1630
1634
  if (n || !e) return;
1631
- const i = pt(e, t);
1635
+ const i = gt(e, t);
1632
1636
  i && ((e, t) => {
1633
1637
  const r = "let" === t ? "LET" : "LAMBDA", i = e.inputs, s = i?.length ?? 0;
1634
1638
  if (!i || s < 2) return;
1635
1639
  if ("let" === t && s % 2 == 0) return void (n = `Wrong number of arguments for LET. Expected name/value pairs followed by a calculation, but got ${s}.`);
1636
- if ("lambda" === t && i[s - 1]?.type === $.Empty) return void (n = "LAMBDA has no calculation: the last argument is empty.");
1640
+ if ("lambda" === t && i[s - 1]?.type === F.Empty) return void (n = "LAMBDA has no calculation: the last argument is empty.");
1637
1641
  const l = /* @__PURE__ */ new Set(), o = "let" === t ? 2 : 1;
1638
1642
  let a = !1;
1639
1643
  for (let e = 0; e < s - 1; e += o) {
1640
- let s = dt(i[e]);
1641
- if (void 0 === s && "lambda" === t) s = ht(i[e]), void 0 !== s && (a = !0);
1644
+ let s = vt(i[e]);
1645
+ if (void 0 === s && "lambda" === t) s = yt(i[e]), void 0 !== s && (a = !0);
1642
1646
  else if (void 0 !== s && a) return void (n = `Required name '${s}' cannot follow an optional name in ${r}.`);
1643
1647
  if (void 0 === s) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot be the output of a formula.`);
1644
1648
  if (s.includes(".")) return void (n = `Expected a name in ${r} argument ${e + 1}; a name cannot contain '.'.`);
@@ -1652,7 +1656,7 @@ var Tt = (e) => {
1652
1656
  };
1653
1657
  return r(e), n;
1654
1658
  };
1655
- function Nt(e, t, n, r, i) {
1659
+ function Pt(e, t, n, r, i) {
1656
1660
  const s = r;
1657
1661
  let l;
1658
1662
  const o = () => (void 0 === l && (l = i && n ? t.bind(R.Table, "", { at: {
@@ -1660,10 +1664,10 @@ function Nt(e, t, n, r, i) {
1660
1664
  rowIndex: i.rowIndex,
1661
1665
  colIndex: i.colIndex
1662
1666
  } }) : null), l);
1663
- return O(e, (e, r, i = []) => {
1667
+ return v(e, (e, r, i = []) => {
1664
1668
  let l;
1665
1669
  const a = e.type;
1666
- if (a === $.Cell) {
1670
+ if (a === F.Cell) {
1667
1671
  const n = e.value;
1668
1672
  if (n?.scope) {
1669
1673
  const r = t.bind(R.Sheet, n.scope, s);
@@ -1672,35 +1676,35 @@ function Nt(e, t, n, r, i) {
1672
1676
  scope: r
1673
1677
  });
1674
1678
  }
1675
- } else if (a === $.Named) {
1679
+ } else if (a === F.Named) {
1676
1680
  const r = e.value;
1677
1681
  if (r && !e.binding) {
1678
1682
  const i = function(e, t, n, r) {
1679
1683
  if (t.scope) {
1680
1684
  const e = n.bind(R.Sheet, t.scope, r);
1681
- if (null === e || L(e)) return;
1685
+ if (null === e || A(e)) return;
1682
1686
  }
1683
1687
  const i = n.bind(R.Table, t.nameId, { existing: !0 });
1684
1688
  if (null === i) return;
1685
1689
  const s = {
1686
- type: $.TableReference,
1690
+ type: F.TableReference,
1687
1691
  value: i,
1688
1692
  inputs: null,
1689
1693
  isReference: !0
1690
1694
  };
1691
- V(s, e);
1695
+ k(s, e);
1692
1696
  const l = t.scopeImage;
1693
1697
  return "string" == typeof l && void 0 !== e.image && (s.image = l + e.image), s;
1694
1698
  }(e, r, t, s);
1695
1699
  if (i) return i;
1696
- const o = r.scope ? t.bind(R.Sheet, r.scope, s) : null, a = (null !== o ? L(o) ? o : t.resolve(R.Sheet, o)?.toString() ?? r.scope : r.scope) ?? n, u = t.bind(R.NamedFormula, r.nameId, a ? { scope: a } : void 0);
1700
+ const o = r.scope ? t.bind(R.Sheet, r.scope, s) : null, a = (null !== o ? A(o) ? o : t.resolve(R.Sheet, o)?.toString() ?? r.scope : r.scope) ?? n, u = t.bind(R.NamedFormula, r.nameId, a ? { scope: a } : void 0);
1697
1701
  null === u && null === o || (l || (l = { ...e }), l.value = {
1698
1702
  ...r,
1699
1703
  nameId: u ?? r.nameId,
1700
1704
  ...null !== o ? { scope: o } : void 0
1701
1705
  });
1702
1706
  }
1703
- } else if (a === $.Error) {
1707
+ } else if (a === F.Error) {
1704
1708
  const n = e.value;
1705
1709
  if (n?.scope) {
1706
1710
  const r = t.bind(R.Sheet, n.scope, s);
@@ -1709,25 +1713,25 @@ function Nt(e, t, n, r, i) {
1709
1713
  scope: r
1710
1714
  });
1711
1715
  }
1712
- } else if (a === $.TableReference) {
1716
+ } else if (a === F.TableReference) {
1713
1717
  const n = e.value;
1714
1718
  if (n) {
1715
1719
  const r = t.bind(R.Table, n);
1716
1720
  l || (l = { ...e }), null !== r && (l.value = r);
1717
1721
  } else if ("string" == typeof n) {
1718
1722
  const n = o();
1719
- if (null !== n && Ft(e, t)) return {
1723
+ if (null !== n && Lt(e, t)) return {
1720
1724
  ...e,
1721
1725
  value: n
1722
1726
  };
1723
1727
  }
1724
- } else if (a === $.TableColumn) {
1728
+ } else if (a === F.TableColumn) {
1725
1729
  const n = e.value;
1726
1730
  if (n) {
1727
- const r = pe(i, $.TableReference), s = r?.value || (r ? o() ?? void 0 : void 0), a = t.bind(R.TableColumn, n, s ? { tableName: s } : void 0);
1731
+ const r = pe(i, F.TableReference), s = r?.value || (r ? o() ?? void 0 : void 0), a = t.bind(R.TableColumn, n, s ? { tableName: s } : void 0);
1728
1732
  l || (l = { ...e }), null !== a && (l.value = a);
1729
1733
  }
1730
- } else if (a === $.Function) {
1734
+ } else if (a === F.Function) {
1731
1735
  const n = e.value;
1732
1736
  if (n) {
1733
1737
  const r = t.bind(R.Function, n);
@@ -1737,24 +1741,24 @@ function Nt(e, t, n, r, i) {
1737
1741
  return l;
1738
1742
  });
1739
1743
  }
1740
- function Ft(e, t) {
1744
+ function Lt(e, t) {
1741
1745
  let n = !0;
1742
1746
  const r = e.inputs;
1743
1747
  if (!r) return !0;
1744
- for (let e = 0; e < r.length && n; e++) O(r[e], (e) => {
1745
- e.type === $.TableColumn && null === t.resolve(R.TableColumn, e.value) && (n = !1);
1748
+ for (let e = 0; e < r.length && n; e++) v(r[e], (e) => {
1749
+ e.type === F.TableColumn && null === t.resolve(R.TableColumn, e.value) && (n = !1);
1746
1750
  });
1747
1751
  return n;
1748
1752
  }
1749
- function Pt(e, t) {
1753
+ function kt(e, t) {
1750
1754
  let n = null;
1751
- return O(e, (e) => {
1752
- if (n || e.type !== $.TableReference) return;
1755
+ return v(e, (e) => {
1756
+ if (n || e.type !== F.TableReference) return;
1753
1757
  if ("" === e.value) return void (n = "A structured reference without a table name must be in a table that has its columns.");
1754
1758
  const r = e.value;
1755
1759
  if (!t || "string" != typeof r) return;
1756
1760
  const i = t.resolve(R.Table, r)?.toString() ?? r;
1757
- null === t.bind(R.Table, i, { existing: !0 }) ? n = `There is no table named '${i}'.` : Ft(e, t) || (n = "The table has no such column.");
1761
+ null === t.bind(R.Table, i, { existing: !0 }) ? n = `There is no table named '${i}'.` : Lt(e, t) || (n = "The table has no such column.");
1758
1762
  }), n;
1759
1763
  }
1760
- export { ye as A, je as C, ut as D, ue as E, ve as O, it as S, me as T, et as _, It as a, ge as b, Re as c, Ke as d, ae as f, ct as g, ce as h, Ie as i, yt as j, wt as k, We as l, be as m, Et as n, Nt as o, at as p, He as r, Pt as s, Ct as t, Xe as u, fe as v, st as w, he as x, ft as y };
1764
+ export { xt as A, nt as C, lt as D, qe as E, ue as O, me as S, pt as T, fe as _, Ke as a, he as b, Re as c, ae as d, be as f, dt as g, ct as h, Ie as i, ye as j, ve as k, Ze as l, ce as m, Ft as n, Nt as o, bt as p, He as r, Pt as s, At as t, _e as u, ft as v, ot as w, kt as x, ge as y };