@sheetxl/studio-vanilla 0.7.5 → 0.7.7

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 (208) hide show
  1. package/LICENSE.md +1 -1
  2. package/browser/cjs/{DtgzMHlfyHeAXjgF.cjs → 1Dnt0ANTHdjxETSZ.cjs} +1 -1
  3. package/browser/cjs/{BE-9cm3nACn3awgy.cjs → AFGPXXJy4XT9a4sl.cjs} +1 -1
  4. package/browser/cjs/{qHGOMnwcNQhF5hJK.cjs → B-DRcuaOZUOS5AMU.cjs} +1 -1
  5. package/browser/cjs/B7BbvcfK1qDzaFkU.cjs +6 -0
  6. package/browser/cjs/{D7HKuOM-LllPjJbc.cjs → B8TAKROBRJF-L83B.cjs} +2 -2
  7. package/browser/cjs/{pSQ1idMlzpT4UK0i.cjs → BBd3KPjI9z4IEpfd.cjs} +2 -2
  8. package/browser/cjs/{BlZO0VTkAeZHIiRF.cjs → BF7e6idd5EAbSe-5.cjs} +2 -2
  9. package/browser/cjs/BFZTyYmr0ydpu1Ri.cjs +6 -0
  10. package/browser/cjs/{Dh6N83HOXQnIi6eD.cjs → BFibWMggm34JCRTQ.cjs} +2 -2
  11. package/browser/cjs/{CowjlwpqcDbAgu6c.cjs → BIZ9GLrC0LfBPG_l.cjs} +2 -2
  12. package/browser/cjs/{D8bM6LcNtnUixiLd.cjs → BJRQKCTg7qCzDnCi.cjs} +1 -1
  13. package/browser/cjs/{C_-fevMsOzoeHUX1.cjs → BKYGUco6ubqF6p08.cjs} +3 -3
  14. package/browser/cjs/{BG5LXAwXTxvszJnw.cjs → BLBDkH1kQ7yBroDQ.cjs} +2 -2
  15. package/browser/cjs/{Cwnb4T0WdA2DpO6l.cjs → BSdEA609H-d2dczO.cjs} +2 -2
  16. package/browser/cjs/{DyetmnKituvbVpAa.cjs → Bm3QhiCF0C1LZr4q.cjs} +1 -1
  17. package/browser/cjs/BneuIxiCQWMGZKpu.cjs +6 -0
  18. package/browser/cjs/{O7wJ0khshNgDHhIc.cjs → BoYIRg5QNVKrlO1o.cjs} +1 -1
  19. package/browser/cjs/{Bi1ZxHFcefcZx6ZG.cjs → BpZPEUJROF3R8X8o.cjs} +1 -1
  20. package/browser/cjs/{B6UICJx5Bw3JbPvz.cjs → Bt7_s2Gsv6kQuZ8n.cjs} +1 -1
  21. package/browser/cjs/{BPumuWTJVZfqK5CF.cjs → By_M12tC09G2LrpY.cjs} +1 -1
  22. package/browser/cjs/{BhS7jv26uN8bTZHQ.cjs → C4pHJGPOoYRTdbji.cjs} +1 -1
  23. package/browser/cjs/{C59GU2KGToOpxqIu.cjs → C8FAAtGuznwvkc3K.cjs} +1 -1
  24. package/browser/cjs/{CA-8YHE5v74t05ah.cjs → CBX3gO9WQIHQl8He.cjs} +1 -1
  25. package/browser/cjs/CDQWmVCT_C4kt4z4.cjs +327 -0
  26. package/browser/cjs/CDbUGxSLtIqQcFJA.cjs +6 -0
  27. package/browser/cjs/{DrZp2De1Ceg32Kr5.cjs → CGbGQK87LoR7syZ2.cjs} +5 -5
  28. package/browser/cjs/CMH9g70xbNsRmba4.cjs +6 -0
  29. package/browser/cjs/CRZbe0vrznX0gec4.cjs +6 -0
  30. package/browser/cjs/{Vf_ah_b03vdfE3ru.cjs → CU9eF67hofMTnlvg.cjs} +1 -1
  31. package/browser/cjs/{w3tcpoHaegCl8_iT.cjs → CVJNmAx7_1hAsGM-.cjs} +1 -1
  32. package/browser/cjs/{B_PRKbKNzV31Ownq.cjs → CVhKqGf9u7VY_SdR.cjs} +1 -1
  33. package/browser/cjs/{DXPn20Z-hXJj0Bjc.cjs → CbuHVEgHJ-PN2nTC.cjs} +1 -1
  34. package/browser/cjs/CbzvhHU6HeixD_I0.cjs +11 -0
  35. package/browser/cjs/{D_dgAvL8PqalpMMm.cjs → CzUFi87fwOEv2c_X.cjs} +1 -1
  36. package/browser/cjs/{rnqMim6wQNkN8UU4.cjs → CzmekfFZOipvm9p8.cjs} +4 -4
  37. package/browser/cjs/{BlCgecmBdf9cl7oF.cjs → D0hBhQDMuGpldHoB.cjs} +1 -1
  38. package/browser/cjs/{CkkvS-F90xn4I7rJ.cjs → D1NKZY8fEGk-xu0l.cjs} +1 -1
  39. package/browser/cjs/{DmGAgS9-QDlvMpsH.cjs → D2tXQhW7Dvnm5yAX.cjs} +9 -9
  40. package/browser/cjs/D9q3XIB_Yfv-93Xd.cjs +6 -0
  41. package/browser/cjs/{CpY-5ZfeRzaP61dG.cjs → DDoFIZezJ5QxEijC.cjs} +8 -8
  42. package/browser/cjs/DQPqvdF3RMR6ocN9.cjs +7 -0
  43. package/browser/cjs/{CFR3i21biJwGBGDy.cjs → DR1070UPEnh9vSgI.cjs} +1 -1
  44. package/browser/cjs/{B7u_MAMs5OAq4GdF.cjs → DUGnz-6DG2d64bPN.cjs} +1 -1
  45. package/browser/cjs/{CkYsNsr2UZ6GJi0E.cjs → DYEwCN0j9-ut9msc.cjs} +1 -1
  46. package/browser/cjs/{gxwT1w-qgEmDMY0E.cjs → DhPAcnVndNoNTyEG.cjs} +1 -1
  47. package/browser/cjs/{DD4LnZu1J3JZmMST.cjs → DkLx6pMV8ccL8z_3.cjs} +2 -2
  48. package/browser/cjs/{hZddd0l0AwDjrIuc.cjs → Du7lT1PTtIz-NYNf.cjs} +1 -1
  49. package/browser/cjs/{Gj-mHeRNeqGqvlES.cjs → EVU5UM5IoTkYikI3.cjs} +1 -1
  50. package/browser/cjs/{BB1OETlqft3E7T5Z.cjs → PbtPWuRp8TEGAKWd.cjs} +1 -1
  51. package/browser/cjs/{DJmA92ScRYkRNHr8.cjs → TIGLxnYSTlonzaOE.cjs} +1 -1
  52. package/browser/cjs/{Dp2HaoMVlQBZmdJR.cjs → ULlk5i1EUx5ksTqm.cjs} +4 -4
  53. package/browser/cjs/{BA4xgI8-YLnoV8Nt.cjs → Va0pmZgEdlde9hBK.cjs} +188 -188
  54. package/browser/cjs/{C-KJcvl8tZsb4ira.cjs → Yf7jJGAVX09ZsdB5.cjs} +1 -1
  55. package/browser/cjs/{B7W2Oq164K4FSwFO.cjs → dwwTAvxsASYxLV2-.cjs} +1 -1
  56. package/browser/cjs/index.cjs +2 -2
  57. package/browser/cjs/{DRoIkxlMmTEzzgsq.cjs → tp3T4Y4k6rqq119C.cjs} +1 -1
  58. package/browser/cjs/{D58RZavNtO-WdBdw.cjs → tru9ZJTmej20u6bS.cjs} +1 -1
  59. package/browser/cjs/{BVkDkd0RVFvIZheb.cjs → y7Bomd49fYwjmegW.cjs} +1 -1
  60. package/{cdn/assets/BcEPkiSHERcWEWyl.js → browser/esm/-dzuo_Wj7VBnGDUj.mjs} +1 -1
  61. package/{cdn/assets/CeUbcEwp0cNaqj18.js → browser/esm/B9WgUACq7BGa52o0.mjs} +1 -1
  62. package/{cdn/assets/uHHIT_oas6bdcl7T.js → browser/esm/BD8BczjPJG9W-Wwx.mjs} +1 -1
  63. package/browser/esm/{KhEEeC1dy1pEML_5.mjs → BFkCRejnNGToEAbq.mjs} +11 -11
  64. package/{cdn/assets/C-yV4uS4-pk7T8wq.js → browser/esm/BRK9zryqPcYCdqaH.mjs} +1 -1
  65. package/browser/esm/{BiqoHhOyYEtpgfz5.mjs → BV7PHP-zb2ezFZwN.mjs} +1 -1
  66. package/browser/esm/Bf7V3mrqMy2JcLj6.mjs +149 -0
  67. package/browser/esm/Bl8Mbds4_g4irYW4.mjs +11 -0
  68. package/{cdn/assets/C-hXgLAdORdKqJmG.js → browser/esm/C2B6ZZypFHHcBtgN.mjs} +1 -1
  69. package/browser/esm/{BS5tM0LLXtmU6BC_.mjs → C3WMLOorMvTnqgVk.mjs} +17 -17
  70. package/browser/esm/{DmwjTNRMu3mrAhEh.mjs → C5zdw4KK0DA7Xxpv.mjs} +5 -5
  71. package/browser/esm/{D5HhLgZ6vcAus0c9.mjs → CAWVgaadqOqZLqMd.mjs} +1 -1
  72. package/{cdn/assets/CTXPqoD7oDVhBT4X.js → browser/esm/CDd7H-0sNO3a6_HD.mjs} +1 -1
  73. package/{cdn/assets/YUCx2g8ABxa1ExCE.js → browser/esm/CIePuRxeXL-pCqr6.mjs} +1 -1
  74. package/{cdn/assets/BoaC8MRCqtpP_goE.js → browser/esm/CIgIp7emlh-h5Tkp.mjs} +1 -1
  75. package/{cdn/assets/C0vrzB1RhP0BA__i.js → browser/esm/CLZ1oiAIiDhUh4ww.mjs} +1 -1
  76. package/browser/esm/CMTee4KqDOZMxil0.mjs +44 -0
  77. package/browser/esm/{sz9lJ3jlPzIUu-eI.mjs → COLScMrSH92V1QBs.mjs} +1 -1
  78. package/{cdn/assets/CZO2hFD3umTBnm9r.js → browser/esm/CSjCyt7aceQtuuQH.mjs} +1 -1
  79. package/{cdn/assets/D9oZfnx8XQICAuAR.js → browser/esm/CWFbko7h7uYHcSb4.mjs} +1 -1
  80. package/browser/esm/{CxS-0-9S1ecpPb9-.mjs → CX2j3a6eI-W-vHAV.mjs} +191 -191
  81. package/browser/esm/{CFIhGwAXjycz5dUq.mjs → CX8Vw2K-gX-Geldr.mjs} +143 -143
  82. package/{cdn/assets/vPZX1gXFAkrxoNqD.js → browser/esm/Cb2h80Rdfkc2yBwD.mjs} +2 -2
  83. package/browser/esm/{D3KGlFIc4iOEQmRQ.mjs → CfIlb4oS-hEuUXmr.mjs} +1 -1
  84. package/browser/esm/{QfpSUpja9WctKfdt.mjs → Cgu3L7rWlUfKbFNC.mjs} +2 -2
  85. package/browser/esm/{DcqxrKAC0CliCOd7.mjs → Cljc33Z0WZxiQD48.mjs} +53 -53
  86. package/{cdn/assets/B7HO8ZpVKQq-WpI7.js → browser/esm/Ct4D5jD2LgwWNypV.mjs} +1 -1
  87. package/{cdn/assets/BAQ9yj7xFyqsJPAd.js → browser/esm/Cwm7vw41FBiyBap8.mjs} +1 -1
  88. package/browser/esm/{Sz_hlqiUydAUV9O5.mjs → Cyefe5RSNySP6tcT.mjs} +2 -2
  89. package/{cdn/assets/BZ3YXob52SPxPFD0.js → browser/esm/D0bkJedCy5YwEz99.mjs} +1 -1
  90. package/browser/esm/{CF-pbKUy8CQ6SgES.mjs → DC1hfAh_7PsrjS9S.mjs} +1 -1
  91. package/browser/esm/{CyUfBBxuRU6CZ5Kh.mjs → DDUE_Wib21ixQxd9.mjs} +1 -1
  92. package/browser/esm/{4aFM9IYjAjyhZDlq.mjs → DOpGO4l1g7gO5ekA.mjs} +121 -121
  93. package/browser/esm/{swe5uQxGiNoljwcZ.mjs → DRwGtmg7N0TBtF7R.mjs} +1 -1
  94. package/{cdn/assets/CF4J6IDM30-WXhSx.js → browser/esm/DSGhERiou-5Ibeko.mjs} +1 -1
  95. package/browser/esm/{B4XZfefr-bz6Pdt9.mjs → DTbZV7szPb-PidC9.mjs} +8 -8
  96. package/browser/esm/{Dht4DZVbawQlW51S.mjs → DU3arW-SqDtRv3t4.mjs} +6 -6
  97. package/{cdn/assets/BXeU9MWWLu7OeigM.js → browser/esm/DViS2gssDOJR2t_d.mjs} +1 -1
  98. package/{cdn/assets/DB2_f-Fg1FAY2Uvx.js → browser/esm/DXJ2nb7A-gJDYaOg.mjs} +1 -1
  99. package/{cdn/assets/CA-iEdjENXePF7HK.js → browser/esm/DdzZuvu4slMZd3sW.mjs} +3 -3
  100. package/browser/esm/{B1TNjs3DJMr0pbtF.mjs → DpdapIkgiOkLU_jc.mjs} +2 -2
  101. package/{cdn/assets/BwuAACy86XQd0r9H.js → browser/esm/Dv_qFZLVmZ4aVY0G.mjs} +1 -1
  102. package/browser/esm/{CO6OkYBew2KKDX_5.mjs → F9Cwy_aefTGi6WoG.mjs} +1 -1
  103. package/browser/esm/{CWeaTt0irkvWrqL4.mjs → HKjRvq9Afdm8X4IO.mjs} +1 -1
  104. package/browser/esm/IymOl6PCKM5cdD59.mjs +45780 -0
  105. package/browser/esm/JNG5rnbnm1mveXHl.mjs +48 -0
  106. package/{cdn/assets/BkIUt0s6jqlrSO7t.js → browser/esm/LmdWOZpWumKhbIeQ.mjs} +1 -1
  107. package/{cdn/assets/Mdu783AKqLQFuFAi.js → browser/esm/TRoNOaX9xm77vhNo.mjs} +1 -1
  108. package/browser/esm/bfKo7TSL68OC9OZ8.mjs +39 -0
  109. package/{cdn/assets/C2IXaoRd-J1b0n7I.js → browser/esm/hWAXOspM00OjNXxf.mjs} +1 -1
  110. package/browser/esm/index.mjs +2 -2
  111. package/{cdn/assets/Dyqyl22FQ7u-5nQg.js → browser/esm/jHLE9-xV-wivIQzI.mjs} +1 -1
  112. package/browser/esm/{DcuQQrT98E_v-m7J.mjs → k-WybkgL_HctOBZL.mjs} +4 -4
  113. package/{cdn/assets/D0A-tJxbcY0qDNob.js → browser/esm/kOyTOCy58irfQ9hf.mjs} +1 -1
  114. package/browser/esm/pVwSjWKIVDRYwmKS.mjs +48 -0
  115. package/browser/esm/{DHXXvQ2x_fqmnpFp.mjs → pimj6QzQFEVJ2YR8.mjs} +2 -2
  116. package/browser/esm/{C7vHazx_6mthV4R9.mjs → qD_ZNq2dhIRKdKRj.mjs} +11 -11
  117. package/browser/esm/{BODVsKHVApv63hi5.mjs → w4rJuLfuST6h0X6K.mjs} +2 -2
  118. package/{browser/esm/BcEPkiSHERcWEWyl.mjs → cdn/assets/-dzuo_Wj7VBnGDUj.js} +1 -1
  119. package/cdn/assets/{Dtu0hv3Ab7CCrY4R.js → 0kt2tL10VoH7eLWk.js} +2 -2
  120. package/{browser/esm/prLy9D5nxrDTulYj.mjs → cdn/assets/B3XKN3j6OGaC2PeU.js} +2 -2
  121. package/cdn/assets/{AIT39BHt_2g-s3As.js → B6n-XFROq-mJr6X4.js} +136 -136
  122. package/{browser/esm/CeUbcEwp0cNaqj18.mjs → cdn/assets/B9WgUACq7BGa52o0.js} +1 -1
  123. package/cdn/assets/BCO9ENV5uM-3cC6k.js +45606 -0
  124. package/{browser/esm/uHHIT_oas6bdcl7T.mjs → cdn/assets/BD8BczjPJG9W-Wwx.js} +1 -1
  125. package/cdn/assets/{CDv_n4Q4fyeHGNC-.js → BEtGGlmsA5Vu0tOe.js} +18 -18
  126. package/cdn/assets/{DmKA7DQzHDu4_OqC.js → BQQZnaZ5HH_q0teH.js} +2 -2
  127. package/cdn/assets/{C2xJ1-8E3UvCDFVm.js → BQWb7WJpQdUBKjqJ.js} +191 -191
  128. package/cdn/assets/{BcyrqopK0U_CLy9L.js → BQ_uhzdW_ySk-rS3.js} +4 -4
  129. package/{browser/esm/C-yV4uS4-pk7T8wq.mjs → cdn/assets/BRK9zryqPcYCdqaH.js} +1 -1
  130. package/cdn/assets/{BiqoHhOyYEtpgfz5.js → BV7PHP-zb2ezFZwN.js} +1 -1
  131. package/cdn/assets/Bki_B5mRvivmATn8.js +151 -0
  132. package/cdn/assets/{Dt4YpmBXEJFgXMqH.js → Bmaqrt1Afut_jxeE.js} +2 -2
  133. package/cdn/assets/{CM3hIUGWZbcyiXoL.js → BozBaszO14QWRzV5.js} +3 -3
  134. package/cdn/assets/BrLkQrjXFwMtmii1.js +41 -0
  135. package/{browser/esm/C-hXgLAdORdKqJmG.mjs → cdn/assets/C2B6ZZypFHHcBtgN.js} +1 -1
  136. package/cdn/assets/{CHtu2w8dUH9qE_gV.js → C6H7cXzfs7xQB4iW.js} +6 -6
  137. package/cdn/assets/C6vzdOHft3HZWuxy.js +12 -0
  138. package/cdn/assets/{CrOJeFT3vEZBbGsU.js → C9zuuQStgoOfugfQ.js} +39 -39
  139. package/cdn/assets/{D5HhLgZ6vcAus0c9.js → CAWVgaadqOqZLqMd.js} +1 -1
  140. package/{browser/esm/CTXPqoD7oDVhBT4X.mjs → cdn/assets/CDd7H-0sNO3a6_HD.js} +1 -1
  141. package/{browser/esm/YUCx2g8ABxa1ExCE.mjs → cdn/assets/CIePuRxeXL-pCqr6.js} +1 -1
  142. package/{browser/esm/BoaC8MRCqtpP_goE.mjs → cdn/assets/CIgIp7emlh-h5Tkp.js} +1 -1
  143. package/{browser/esm/C0vrzB1RhP0BA__i.mjs → cdn/assets/CLZ1oiAIiDhUh4ww.js} +1 -1
  144. package/cdn/assets/{-C5nZ__wNloSiQBU.js → CN-ih7whNYnQh8PD.js} +3 -3
  145. package/{browser/esm/CZO2hFD3umTBnm9r.mjs → cdn/assets/CSjCyt7aceQtuuQH.js} +1 -1
  146. package/{browser/esm/D9oZfnx8XQICAuAR.mjs → cdn/assets/CWFbko7h7uYHcSb4.js} +1 -1
  147. package/cdn/assets/{D1oNCgzGxkEm86ML.js → CYQrF5RfAVqg1i0t.js} +1 -1
  148. package/cdn/assets/{D3KGlFIc4iOEQmRQ.js → CfIlb4oS-hEuUXmr.js} +1 -1
  149. package/cdn/assets/{DVWSXiPvUKCZl8c1.js → CfodwjJ4We7P3FOq.js} +1 -1
  150. package/cdn/assets/{D7levSDmgvF1R_cy.js → CpiCssHUOXBUIN_K.js} +52 -52
  151. package/{browser/esm/B7HO8ZpVKQq-WpI7.mjs → cdn/assets/Ct4D5jD2LgwWNypV.js} +1 -1
  152. package/cdn/assets/CugoceVTjknLDPZs.js +43 -0
  153. package/{browser/esm/BAQ9yj7xFyqsJPAd.mjs → cdn/assets/Cwm7vw41FBiyBap8.js} +1 -1
  154. package/{browser/esm/BZ3YXob52SPxPFD0.mjs → cdn/assets/D0bkJedCy5YwEz99.js} +1 -1
  155. package/cdn/assets/{ryvwL5F0lm91Z45H.js → D3G0eWNgbOrHH0SS.js} +123 -123
  156. package/cdn/assets/{BGYzQCmu8YtQv0hk.js → DBfMtT3sAy1ItCCQ.js} +3 -3
  157. package/cdn/assets/{CF-pbKUy8CQ6SgES.js → DC1hfAh_7PsrjS9S.js} +1 -1
  158. package/cdn/assets/{CyUfBBxuRU6CZ5Kh.js → DDUE_Wib21ixQxd9.js} +1 -1
  159. package/cdn/assets/DNLAdV0FAEdHf40R.js +46 -0
  160. package/cdn/assets/{BjqlgRc8H7Zwjgh4.js → DRguekK_Q_Gd9dVv.js} +4 -4
  161. package/cdn/assets/{swe5uQxGiNoljwcZ.js → DRwGtmg7N0TBtF7R.js} +1 -1
  162. package/{browser/esm/CF4J6IDM30-WXhSx.mjs → cdn/assets/DSGhERiou-5Ibeko.js} +1 -1
  163. package/{browser/esm/BXeU9MWWLu7OeigM.mjs → cdn/assets/DViS2gssDOJR2t_d.js} +1 -1
  164. package/{browser/esm/DB2_f-Fg1FAY2Uvx.mjs → cdn/assets/DXJ2nb7A-gJDYaOg.js} +1 -1
  165. package/{browser/esm/DU9bcHdSn8g_qYPK.mjs → cdn/assets/DfxyIgqC_EStNQyw.js} +13 -13
  166. package/cdn/assets/{CleWxPUcczhRfrHP.js → DkqE2-qY8H9T98WT.js} +4 -4
  167. package/cdn/assets/{BbpQ1Ci6AYjWQxnE.js → DsmpINqpSKnRqkx4.js} +2 -2
  168. package/{browser/esm/BwuAACy86XQd0r9H.mjs → cdn/assets/Dv_qFZLVmZ4aVY0G.js} +1 -1
  169. package/cdn/assets/{-RmAWseMjh618sly.js → Dvnx0PSv_jiWsIKe.js} +9 -9
  170. package/cdn/assets/{Do8_yi3_u501_TAo.js → F0iq1NszMJTVwyJd.js} +2 -2
  171. package/cdn/assets/{CO6OkYBew2KKDX_5.js → F9Cwy_aefTGi6WoG.js} +1 -1
  172. package/cdn/assets/{CWeaTt0irkvWrqL4.js → HKjRvq9Afdm8X4IO.js} +1 -1
  173. package/cdn/assets/HpghV8z9BTeDJHo1.js +50 -0
  174. package/{browser/esm/BkIUt0s6jqlrSO7t.mjs → cdn/assets/LmdWOZpWumKhbIeQ.js} +1 -1
  175. package/cdn/assets/{KyCZ140AgyGGZCcB.js → Ls9uzNrVr3yxkM2m.js} +14 -14
  176. package/{browser/esm/Mdu783AKqLQFuFAi.mjs → cdn/assets/TRoNOaX9xm77vhNo.js} +1 -1
  177. package/{browser/esm/C2IXaoRd-J1b0n7I.mjs → cdn/assets/hWAXOspM00OjNXxf.js} +1 -1
  178. package/{browser/esm/Dyqyl22FQ7u-5nQg.mjs → cdn/assets/jHLE9-xV-wivIQzI.js} +1 -1
  179. package/{browser/esm/D0A-tJxbcY0qDNob.mjs → cdn/assets/kOyTOCy58irfQ9hf.js} +1 -1
  180. package/cdn/assets/{D7hbzFFwi6pemjZ6.js → kPIrz_4t6rv8Lnkv.js} +2 -2
  181. package/cdn/assets/{qnEXpda2bHmKI7XO.js → z8mH2SruNZNb285Q.js} +2 -2
  182. package/cdn/index.js +2 -2
  183. package/cdn/loader.js +1 -1
  184. package/package.json +7 -8
  185. package/browser/cjs/B3cy0yECplxmF-ZV.cjs +0 -6
  186. package/browser/cjs/BG2KzPwReru_hA3S.cjs +0 -6
  187. package/browser/cjs/BR1gc9EjvJSJsyo5.cjs +0 -6
  188. package/browser/cjs/CENfRAWXnNjIFG_1.cjs +0 -11
  189. package/browser/cjs/C_RM79K9AMokH2QJ.cjs +0 -330
  190. package/browser/cjs/DBsNfJK9kgDaJIC5.cjs +0 -6
  191. package/browser/cjs/DOJeH6L1b_NYsknS.cjs +0 -6
  192. package/browser/cjs/DcntS4dVnAy4TwCl.cjs +0 -7
  193. package/browser/cjs/DhT5l1nC8v5n3mI2.cjs +0 -6
  194. package/browser/cjs/VqXvdfsWxA_K-5Ex.cjs +0 -6
  195. package/browser/esm/BY65rBGEqoRJMqBs.mjs +0 -147
  196. package/browser/esm/BfRx9yySN_e7ZQbb.mjs +0 -39
  197. package/browser/esm/C0enYEAhREbynMAD.mjs +0 -48
  198. package/browser/esm/C65IVLH_eOUfD06X.mjs +0 -58
  199. package/browser/esm/CYftWR0vSdUWRn2Z.mjs +0 -45223
  200. package/browser/esm/avKJgk0IGcf5bqxl.mjs +0 -48
  201. package/browser/esm/k6dplGzG2KotvgOY.mjs +0 -44
  202. package/cdn/assets/1dSwxtvs5jJNozC2.js +0 -60
  203. package/cdn/assets/CTQArMyY5sn7brEn.js +0 -50
  204. package/cdn/assets/CVBaJALDWZmlWWg2.js +0 -46
  205. package/cdn/assets/Cnl4kz_oDyI6jz9X.js +0 -43
  206. package/cdn/assets/Dxp8ZbLp35r7F-sp.js +0 -149
  207. package/cdn/assets/YNhHFwthgm8SLyHw.js +0 -45049
  208. package/cdn/assets/qQr5GMLkoqLrmdV0.js +0 -41
@@ -0,0 +1,11 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.7
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./CDQWmVCT_C4kt4z4.cjs"),rs=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",ks=new RegExp(`^[${rs}][-${rs}.0-9·̀-ͯ‿-⁀]*$`,"u");function us(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ns="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",Es=new RegExp(`^[${ns}][-${ns}.0-9·̀-ͯ‿-⁀]*$`,"u");function ds(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const Z=function(i){return i===32||i===10||i===13||i===9},As=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},ne=us,as=function(i){return us(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ps=[32,10,13,9],Ps=ks,Ds=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Os=ds,Is=function(i){return ds(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},Vs=Es,me="http://www.w3.org/XML/1998/namespace",Qt="http://www.w3.org/2000/xmlns/",Ls={__proto__:null,xml:me,xmlns:Qt},Ns={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},P=-1,ct=-2,W=13,jt=33,nt=10,vt=60,Gt=61,H=62,F=63,Zt=93,fe=i=>i===34||i===39,gs=[34,39],Rs=[...gs,91,H],Ms=[...gs,vt,Zt],$s=[Gt,F,...ps],js=[...ps,H,38,vt];function De(i,t,s){switch(t){case"xml":s!==me&&i.fail(`xml prefix must be bound to ${me}.`);break;case"xmlns":s!==Qt&&i.fail(`xmlns prefix must be bound to ${Qt}.`)}switch(s){case Qt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Qt}.`);break;case me:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Hs=i=>Vs.test(i),Xs=i=>Ps.test(i),ls={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Fs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Os,this.nameCheck=Is,this.isName=Hs,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Ls};const o=this.opt.additionalNamespaces;o!=null&&((function(n,a){for(const h of Object.keys(a))De(n,h,a[h])})(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=ne,this.nameCheck=as,this.isName=Xs,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ns),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ls[t]]=s}off(t){this[ls[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return P;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case nt:return this.line++,this.column=0,this.positionAtNewLine=this.position,nt;case 13:return t.charCodeAt(s+1)===nt&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,ct;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return P;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case nt:return this.line++,this.column=0,this.positionAtNewLine=this.position,nt;case 13:{const a=t.charCodeAt(s+1);a!==nt&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,ct;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===ct?nt:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===ct,h=a?nt:n;if(h===P||t.includes(h))return this.text+=o.slice(s,this.prevI),h;a&&(this.text+=`${o.slice(s,this.prevI)}
7
+ `,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case ct:this.text+=`${o.slice(s,this.prevI)}
8
+ `,s=this.i,n=nt;break;case P:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===P)return this.name+=t.slice(s),P;if(!as(o))return this.name+=t.slice(s,this.prevI),o===ct?nt:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===P||!Z(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=As,this.getCode=this.getCode10):(this.isChar=Ds,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case vt:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case P:break;default:this.unget(),this.state=W,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Rs);switch(t){case H:this.doctypeHandler?.(this.text),this.text="",this.state=W,this.doctype=!0;break;case P:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:fe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Ms);t!==P&&(this.text+=String.fromCodePoint(t),t===Zt?this.state=2:t===vt?this.state=6:fe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case F:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===H?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(F)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===H&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case ct:this.entity+=`${s.slice(t,this.prevI)}
9
+ `,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===W&&this.textHandler===void 0||(this.text+=a);break t}case P:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(ne(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case F:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=W,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==H?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=W}sCData(){this.captureToChar(Zt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Zt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case H:this.cdataHandler?.(this.text),this.text="",this.state=W;break;case Zt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===F||Z(t)?(this.fail("processing instruction without a target."),this.state=t===F?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===P)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===F;n||Z(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===F?this.state=26:Z(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(F)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===H){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=W}else t===F?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==F?t!==P&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo($s);if(t===F)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(Z(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===F)return this.state=jt,void this.fail("XML declaration is incomplete.");Z(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===F)return this.state=jt,void this.fail("XML declaration is incomplete.");Z(t)||(fe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,F]);if(t===F)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===P)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==F?(Z(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===H?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=W):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===P)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case H:this.openTag();break;case 47:this.state=35;break;default:Z(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===H?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==P&&(ne(t)?(this.unget(),this.state=37):t===H?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:Z(t)?this.state=38:t===H?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==P&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case P:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===H?this.openTag():ne(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();fe(t)?(this.q=t,this.state=40):Z(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case nt:case ct:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case vt:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case P:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();Z(t)?this.state=36:t===H?this.openTag():t===47?this.state=35:ne(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(js);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case vt:this.fail("disallowed character.");break;case P:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===H?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===H?this.closeTag():Z(t)?this.state=44:t!==P&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case H:this.closeTag();break;case P:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case vt:if(this.state=15,n!==void 0){const{text:a}=this,h=o.slice(t,this.prevI);a.length!==0?(n(a+h),this.text=""):h.length!==0&&n(h)}s=0;break t;case 38:this.state=14,this.entityReturnState=W,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Zt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case H:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case ct:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
10
+ `),t=this.i,s=0;break;case P:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case vt:if(this.state=15,o!==void 0){const{text:h}=this,f=s.slice(t,this.prevI);h.length!==0?(o(h+f),this.text=""):f.length!==0&&o(f)}break t;case 38:this.state=14,this.entityReturnState=W,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case ct:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
11
+ `),t=this.i;break;case P:o!==void 0&&(this.text+=s.slice(t));break t;default:Z(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const h=s.trim();this.currentXMLVersion==="1.0"&&h===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=h,De(this,n,h)}else if(t==="xmlns"){const h=s.trim();this.topNS[""]=h,De(this,"",h)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:h}=this.qname(s.name);s.prefix=a,s.local=h;const f=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),f===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:h,prefix:f,local:A}=a;let x,S;f===""?(x=h==="xmlns"?Qt:"",S=h):(x=this.resolve(f),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(f)}.`),x=f),S=`{${x}}${A}`),n.has(S)&&this.fail(`duplicate attribute: ${S}.`),n.add(S),a.uri=x,o[h]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Oe,mt;(mt=Oe||(Oe={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},mt.parseStream=async(i,t,s)=>{const o=new Fs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(mt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(mt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(mt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(mt.Events.Attribute,t.onAttribute),t.onText&&o.on(mt.Events.Text,t.onText),t.onError&&o.on(mt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(mt.Events.End,a)}for(;;){const{value:a,done:h}=await i.read();if(h)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ht=i=>{const t=parseFloat(i);return isNaN(t)?null:t},k=null;class Bs{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let h=null,f=null,A=null,x=null;const S=[],D={key:null,source:t};let b=null,R=!1;const _=(m,c)=>{let y=A.attributes[m];if(c){if(Array.isArray(c)){for(let O=0;O<c.length;O++)if(y==null||(y=c[O](y),y==null))return}else if(y==null||(y=c(y),y==null))return}return y},T={getSource:()=>b.source,setSource:m=>{b.source=m},setKey:m=>{b.key=m},getFrom:()=>A,getAttribute:(m,c)=>_(m,c)??null,hasAttribute:m=>T.getAttribute(m)!==null,getParent:()=>S[S.length-2].source,getPath:()=>{const m=[];for(let c=0;c<a.length;c++)m.push(a[c].local);return m.join("\\")},parseAttribute:_,copyToObject:(m,c,y,O)=>{const z=_(O??c,y);z!==void 0&&(m[c]=z)},copyTo:(m,c,y)=>{const O=_(y??m,c);O!==void 0&&(b.source[m]=O)},warn:m=>{o?o?.(m):console.warn(m)}};return{onOpenTag:m=>{let c=m.name;const y=c.indexOf(":");y!==-1&&(c=c.slice(y+1));const O=n.get(c);if(h={local:c,visitor:O,tag:m,destination:null},R)return a.push(h),f=c,void(A=m);x=h?.visitor??null,O&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,h.destination=b,b&&S.push(b)),a.push(h),f=c,A=m,R=x?.to===null,x?.openTag?.(T)},onCloseTag:m=>{let c=m.name;const y=c.indexOf(":");if(y!==-1&&(c=c.slice(y+1)),c!==f)throw new Error(`mismatch open/close tag: '${c}'/'${f}'`);R||x?.closeTag?.(T);const O=a.pop()??null;h=a[a.length-1]??null;const z=O?.destination;if(z){S.pop(),b=S[S.length-1]??D;const ut=O.visitor;ut&&ut.to&&z.source!==void 0&&(Array.isArray(ut.to)?b.source.push?b.source.push(z.source):o?.(`Unable to parse array for ${ut.from} at ${T.getPath()}`):z.key?b.source[z.key]=z.source:typeof ut.to=="string"&&(b.source[ut.to]=z.source))}f=h?.local??null,A=h?.tag??null,x=h?.visitor??null,R=!h?.destination},onText:m=>{x?.text?.(m,T)},onEnd:s}}}const cs=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const h=t(n);if(!h)return null;let f=h.content;try{s&&(f=s(f))}catch(A){console.warn(A)}return o?.parsedRefs?.set(i,f),f},Ie=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let h=n?.parsedRefs?.get(i);if(h!==void 0)return h;const f=t(a);if(!f)return null;const A=f.content;try{const x=new TextDecoder().decode(A),S=s.parseFromString(x,"text/xml"),D=o.convert(S,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},Ut=(i,t,s,o,n=null)=>{const a=new Map;let h=t.Directory[i];const f=h?h.length:0;for(let A=0;A<f;A++){const x=h[A];if(!x)continue;let S=x;S.startsWith("/")&&(S=S.substring(1));const D=Ie(S,b=>t.files[b],s,o,n);a.set(S,D)}return a},qs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],Ve=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const h=i("theme");h&&(s=qs[h]);let f=i("tint");if(f&&(s+=` ${d.T.AdjustmentType.ETint} ${parseFloat(f)}`),s)return s},fs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),ms=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ws=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},hs={colStart:0,colEnd:0,rowStart:0,rowEnd:0},_s=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,createWorkbookOptions:o={},...n}=t??{},a=[],h=t?.progress,f=h?.onStart?.(t?.name??"Parsing XLSX");await Promise.resolve(f);const A=h?.onProgress;let x=0;const S=Promise.resolve().then(()=>require("./D1NKZY8fEGk-xu0l.cjs")),D=Promise.resolve().then(()=>require("./BFibWMggm34JCRTQ.cjs"));let b=null;try{b=new DOMParser}catch{}let R=null;b||(R=Promise.resolve().then(()=>require("./PbtPWuRp8TEGAKWd.cjs")).then(c=>c.i));let _=null,T=null,m=null;try{const c=await Promise.all([S,D,R]);_=c[0],T=c[1],m=c[2]}catch(c){throw new Error("Unable to load XLSX parser.",{cause:c})}try{const c=_.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!c.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");c.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],c.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const y=new T.FromOOXMLConverter,O=b??new m.DOMParser,z=o?.resources??new d.tf,ut=z.beginPersist(),Le={},Ne=new Set,Te=new Map;Te.set("richTypes",[]);const Re=new Map,Me=[],ae=w=>c.files[w],ye=(w,B)=>{const Q=w.lastIndexOf("/"),et=w.substring(0,Q+1)+"_rels/"+w.substring(Q+1,w.length)+".rels";let dt=B.get(et);return dt||(dt=((L,ve,Se,Ce,Xt=null)=>{if(!L)return null;const st=Ie(L,ve,Se,Ce,Xt);if(!st)return null;const it=new Map,yt=Object.keys(st),Ft=yt.length;for(let bt=0;bt<Ft;bt++){const Bt=yt[bt],Ct=st[Bt];it.set(Bt,Ct)}return it})(et,ae,O,y,Tt),B.set(et,dt)),dt},le=(w,B,Q,et=Re)=>{let dt=ye(B,et).get(w),L=dt?.target;if(!L)return null;if(dt.targetMode==="External")return dt.target;const ve=B.lastIndexOf("/"),Se=B.substring(0,ve+1);L.startsWith("/")||(L=Se+L),L=(st=>{const it=st.split(/\/+/);return it.reduce((yt,Ft,bt)=>(Ft==="."?yt.splice(bt,1):Ft===".."&&yt.splice(bt-1,2),yt),it).join("/")})(L);const Ce=y?.getVisitorParamsState().get("dxfs");let Xt=et.get(L);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const st={};Xt=st;const it=async()=>{const yt=((M,X,Jt,U,J,G,Kt,kt)=>{const u=new Bs,K=new d.Lt.TransposedBuilder;let j=null;u.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",k)}}),u.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const I=l[p];I!=="rule"&&(r[I]=r.rule[I])}}delete r.rule}}),u.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",k),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=U?.get(l);p||(G?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",k),e.copyToObject(r,"text",k),e.copyToObject(r,"timePeriod",k)}}),u.registerVisitor({from:"colorScale",to:"colorScale"}),u.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),u.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",k),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),u.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),u.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",k),e.copyTo("value",ht,"val"),e.copyTo("gte",v)}}),u.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=Ve(p=>e.getAttribute(p));r.colors.push(l)}}),u.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),u.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),u.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Dynamic,e.copyTo("dynamicType",k,"type"),e.copyTo("val",ht),e.copyTo("maxVal",ht,"maxVal")}}),u.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",k)}}),u.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Top10,e.copyTo("filterVal",ht),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ht)}}),u.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",k)}}),u.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",k,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),u.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ht))}}),u.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=d.ku.Type.Custom,e.copyTo("and",v)}}),u.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",k),e.copyTo("value",ht,"val")}}),u.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",k)}}),u.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",k,"sortBy"),e.copyTo("dxfId",k,"sortBy"),e.copyTo("iconSet",k),e.copyTo("customList",k);const p=e.getAttribute("ref");if(p){const I=d.Eo.fastStringToRange(p,hs).colStart,Y=d.Eo.fastStringToRange(r.ref,hs),qt=Y.colStart;l.offset=Y?I-qt:I}l.reverse=e.getAttribute("descending",v)??!1}}),u.registerVisitor({from:"AlternateContent",to:null});const de=e=>{j=e.getSource(),e.copyTo("topLeft",k,"topLeftCell");const r=ms(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};u.registerVisitor({from:"sheetView",to:"view",openTag:e=>{de(e)},closeTag:()=>{j=null}}),u.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),u.registerVisitor({from:"customSheetView",to:[],openTag:e=>{de(e)},closeTag:()=>{j=null}}),u.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",k,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),u.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",k,"topLeftCell");const l=j.topLeft?d.Eo.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const I={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=d.Eo.cellToString(I)}}}),u.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=Ve(l=>e.getAttribute(l));r&&(M.tabColor=r)}}),u.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),u.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),u.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),u.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),u.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),u.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),u.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),u.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),u.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?X(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const I=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const Y=e.getAttribute("location");if(Y&&(I&&I!==Y&&console.warn("display and location are different",I,Y),p+="#"+Y),!p)return void console.warn("No address found for hyperlink. r:id",r);let qt;const xt=e.getAttribute("tooltip");qt=xt?{address:p,tooltip:xt}:p,e.setSource({r:l,v:qt})}}),u.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=X(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),u.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),u.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=X(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),u.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),u.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=I=>I===!0||I==="1"||I==="on"||I==="true"||I===!1||I==="0"||I==="off"||I==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",k,"hashValue"),e.copyToObject(p,"algorithm",k,"algorithmName"),e.copyToObject(p,"salt",k,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),u.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),u.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",k,"hashValue"),e.copyToObject(l,"algorithm",k,"algorithmName"),e.copyToObject(l,"salt",k,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),u.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(M,"defaultColSize",ht,"defaultColWidth"),e.copyToObject(M,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(M,"defaultRowSize",ht,"defaultRowHeight"),e.copyToObject(M,"outlineLevelRow",E,"outlineLevelRow")}}),u.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),u.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ht,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),u.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Yt=null;const Ss={onOpenTag:e=>{Yt===null&&(Yt="")},onText:e=>{Yt+=e},onEnd:()=>{const e=Jt(Yt);return Yt=null,e},onError:e=>{}};return((e,r,l,p,I,Y,qt)=>{let xt=!1,pe=!1,Wt=[],_t=!1,Et=null,te=null,ge=null,at=null,qe=null,We=null;const Cs=qt?.get("richData")??[],_e=d.Eo.normalizeA1ToR1C1,ze=d.Ht.createConflatingRanges(),Ue=new Map,ke=[];let ee=null;const Ge=d.Ht.createConflatingRanges();let se,At=!1,q=-1,tt=-1,pt=null,ie=null;const Ee=[];let Ae=null,Ze=-2,gt=0,zt="",Pt="",Dt="",Ot="",It="",Vt="",Lt="",Qe="",Je="",Ke="",Ye="",ts="",es="",ss="",ft=!0,Nt=null,Pe=0;return{...l,onEnd:()=>{Ee.length>0&&(r.rows=Ee);let g=ze.done(Ws);const C=g.length;if(C>0){const $=new Array(C);for(let V=0;V<C;V++){const lt=g[V],Rt=d.Eo.rangeToString(lt),Mt=lt.value[1],oe=d.Eo.resolveRelativeToA1(Mt,lt.rowStart,lt.colStart);$[V]=[Rt,oe]}r.formulas=$}const ot=Ge.done(!0),N=ot.length;if(N>0){const $=new Array(N);for(let V=0;V<N;V++){const lt=ot[V],Rt=d.Eo.rangeToString(lt);$[V]=Rt}r.volatile=$}if(ke.length>0&&(r.dynamicArray=[...ke]),Wt.length>0){Wt.sort(d.Ht.createRangeComparator(d.w.Orientation.Column));const $=[];let V=null,lt=-1,Rt=-1,Mt=-1,oe=-1,wt=null;const is=Wt.length;is>0&&(V=Wt[0],lt=V.colStart,Rt=V.colEnd,Mt=V.rowEnd,oe=V.value,$.push(V));for(let $t=1;$t<is;$t++)wt=Wt[$t],oe!==wt.value||lt!==wt.colStart||Rt!==wt.colEnd||Mt+1!==wt.rowEnd?($.push(wt),V=wt,lt=V.colStart,Rt=V.colEnd,Mt=V.rowEnd,oe=V.value):(Mt=wt.rowEnd,V.rowEnd=Mt);let os=[];for(let $t=0;$t<$.length;$t++){const re=$[$t];os.push({r:{colStart:re.colStart,colEnd:re.colEnd,rowStart:re.rowStart,rowEnd:re.rowEnd},v:re.value})}r.directStyles=os}const rt=e.build();if(rt){const $=rt.tuples;r.data=$}l?.onEnd?.()},onOpenTag:g=>{let C=g.name;const ot=C.indexOf(":");if(ot!==-1&&(C=C.slice(ot+1)),Pe++,Pe%196608==0&&I(Pe),se){const N=g.attributes;switch(C){case"v":pe=!0;break;case"f":switch(N.t??null){case null:case"normal":_t=!0;break;case"shared":const rt=N.si;te=N.ref,Et=rt;break;case"array":_t=!0,te=N.ref,ee=[te,!1];break;case"datatable":_t=!0,te=N.ref,_t=!0}N.ca!==void 0&&Ge.append(q,tt);break;case"is":return void(At=!0)}return void(At&&Y?.onOpenTag(g))}if(xt){if(C==="c"){se=g;const N=g.attributes.r;tt=d.Eo.fastStringToCol(N);const rt=g.attributes.t;rt===void 0?ie=null:(ie=rt,ie==="str"&&(At=!0));let $=g.attributes.s;$!==void 0&&($=parseInt($),Nt&&Nt.value===$&&Nt.colEnd+1===tt?Nt.colEnd=tt:(Nt={colStart:tt,rowStart:q,colEnd:tt,rowEnd:q,value:$},Wt.push(Nt)))}}else{if(C==="row"){xt=!0;const N=g.attributes.r;if(q=parseInt(N)-1,gt=0,Pt=g.attributes.customHeight,Pt!==void 0&&(gt|=Ht.CustomHeight),Pt!==Je&&(ft=!0,Je=Pt),zt=g.attributes.ht,zt!==void 0&&(gt|=Ht.Ht),zt!==Qe&&(ft=!0,Qe=zt),Dt=g.attributes.hidden,Dt!==void 0&&(gt|=Ht.Hidden),Dt!==Ke&&(ft=!0,Ke=Dt),It=g.attributes.s,It!==void 0&&(gt|=Ht.S),It!==ts&&(ft=!0,ts=It),Ot=g.attributes.customFormat,Ot!==void 0&&(gt|=Ht.CustomFormat),Ot!==Ye&&(ft=!0,Ye=Ot),Vt=g.attributes.outlineLevel,Vt!==void 0&&(gt|=Ht.OutlineLevel),Vt!==es&&(ft=!0,es=Vt),Lt=g.attributes.collapsed,Lt!==void 0&&(gt|=Ht.Collapsed),Lt!==ss&&(ft=!0,ss=Lt),gt!==0)if(Ze+1!==q||ft){const rt=Pt!==void 0&&(Pt==="1"||Pt==="true"),$=Ot!==void 0&&(Ot==="1"||Ot==="true");Ae={min:q,max:q,sz:rt&&zt!==void 0?parseFloat(zt):-1,csz:rt,h:Dt!==void 0&&(Dt==="1"||Dt==="true"),s:rt&&It!==void 0&&It!=="0"?parseInt(It):0,cs:$,l:Vt===void 0||Vt==="0"?0:parseInt(Vt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Ee.push(Ae)}else Ae.max=q;return Ze=q,void(ft=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(se){let C=g.name;const ot=C.indexOf(":");if(ot!==-1&&(C=C.slice(ot+1)),At)if(C==="is"||C==="v"){const N=Y?.onEnd();N!==null&&e.addValue(q,tt,""+N)}else Y?.onCloseTag?.(g);return pe&&(pe=!1),void(C==="c"&&(se=null,At=!1))}if(xt)return xt=!1,void(Nt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),pe){switch(pt=null,ie){case null:case"n":pt=parseFloat(g);break;case"b":pt=g==="1"||g==="true";break;case"s":pt=g;break;case"e":if(g==="#VALUE!"){const ot=se.attributes.vm;if(ot!==void 0){const N=Cs[parseInt(ot)-1];if(N&&N.isFormulaError){pt={t:d.M.Error,v:N.getCode()};break}}}const C=d.n.getBuiltInByLabel(g);C?pt={t:d.M.Error,v:C.getCode()}:(pt=g,p?.(`Unknown formula error '${g}' in cell ${d.Eo.cellToString({colIndex:tt,rowIndex:q})}`));break;case"str":case"inlineStr":At=!0}pt!==null&&e.addValue(q,tt,pt)}if(ee&&(ie==="e"&&(ee[1]=!0),ke.push(ee),ee=null),Et)if(qe===Et)at=We;else{if(at=Ue.get(Et),!at){const C=[];ge=_e(g,q,tt,C),at=[ge,C,g],Ue.set(Et,at)}qe=Et,We=at}if(_t){const C=[];ge=_e(g,q,tt,C),at=[ge,C,g]}if(at)return ze.append(q,tt,at),at=null,_t=!1,Et=null,void(te=null);At?Y?.onText(g):xt||l?.onText(g)}}})(K,M,u.createEventHandler(M,()=>{},G),G,e=>{x+=e,A?.(x)},Ss,kt)})(st,(M,X=!1)=>le(M,L,X)??null,ys,Ce,0,(M,X)=>{X=X?`${X} (${L})`:L,a.push([M,X])},0,Te),Ft=cs(L,ae),bt=await(async(M,X=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:G}=await Promise.resolve().then(()=>require("./CzUFi87fwOEv2c_X.cjs"));globalThis.ReadableStream=G}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Jt=new TextDecoder("utf-8");let U=0;const J=M instanceof Uint8Array?M:new Uint8Array(M);return new ReadableStream({pull(G){if(U>=J.byteLength)return void G.close();const Kt=J.subarray(U,Math.min(U+X,J.byteLength)),kt=Jt.decode(Kt,{stream:U+X<J.byteLength});G.enqueue(kt),U+=Kt.length}}).getReader()})(Ft);try{await Oe.parseStream(bt,yt,{xmlns:!1})}catch(M){throw console.warn(`Error parsing sheet: '${L}'`,M),new Error(`Error parsing sheet: '${L}'`,{cause:M})}const Bt=ye(L,et);let Ct,Be=new Map;if(Bt){const M="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let X;Bt.forEach((U,J)=>{U.type===M&&(Ct=le(J,L,!1,et)?.comments,Ct&&Ct.forEach(G=>{Be.set(G.id,G)}))});const Jt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Bt.forEach((U,J)=>{U.type===Jt&&(X=le(J,L,!1,et))}),X||Ct){const U=Ct??[],J=X?.comments;if(J){const G=X?.authors,Kt=J.length;for(let kt=0;kt<Kt;kt++){const u=J[kt];if(!u)continue;let K=G&&u.authorId!==void 0?G[u.authorId]:u.authorId;if(K&&K.startsWith("tc=")&&(K=fs(K.substring(3)),Be.has(K)))continue;let j=null;K&&(j=he.get(K)),j||(j=He.get(K)),j||(j={id:d.te.uuidV4(),displayName:K},He.set(j.displayName,j),he.set(j.id,j)),K=j?.id??null;const de={id:d.te.uuidV4(),personId:K,ref:u.ref,done:!1,asNote:!0,content:u.content};U.push(de)}}st.comments=U}}};Me.push(it())}else Xt=Q?cs(L,ae,st=>{const it=z.add({buffer:st});return it.addReference(Le),Ne.add(it),ut.toResourceId(it)},Tt):Ie(L,ae,O,y,Tt);return Xt},Tt={paramMap:Te,getRefs:ye,getRef:le,parsedRefs:Re,addPerson:w=>null},ce=[];let be=0;c.Strings&&(be=parseInt(c.Strings.Unique??c.Strings.length??0));const Ts=c.Strings??[];for(let w=0;w<be;w++)ce.push(Ts[w]?.t??"");const $e=new Map;let je=be;const ys=w=>{const B=$e.get(w);if(B!==void 0)return B;const Q=je;return $e.set(w,je++),ce.push(w),Q},he=(Ut("richstructure",c,O,y,Tt),Ut("richdata",c,O,y,Tt),new Map),He=new Map,Xe=Ut("people",c,O,y);let St=null;if(Xe.size>0&&(St=Xe.entries().next()?.value?.[1]?.persons,St)){const w=St.length;for(let B=0;B<w;B++){const Q=St[B];he.set(Q.id,Q),he.set(Q.displayName,Q)}}const xe=Ut("themes",c,O,y,Tt);let Fe=null;if(xe&&xe.entries){let w=xe.entries().next();w?.value?.[1]&&(Fe=w.value[1])}const bs=new d.rc(Fe);let ue=Ut("styles",c,O,y,Tt).entries().next()?.value[1];ue&&(ue=JSON.parse(d.oe(ue)));const xs=Ut("workbooks",c,O,y,Tt);await Promise.all(Me);const we={...xs.entries().next().value[1],styles:ue,theme:bs.toJSON()};ce.length>0&&(we.strings=ce),St&&St.length>0&&(we.people=St);const ws={...o,resources:z,json:we},vs=new d.qy(ws);if(Ne.forEach(w=>{w.deleteReference(Le)}),ut.endPersist(),a.length){const w=h?.onWarning;if(w)for(const B of a){const[Q,et]=B;w(Q,et)}}return h?.onComplete?.(x),vs}catch(c){let y="Unable to parse XLSX.";throw c instanceof d.ae&&(y="Unable to open XLSX. There are too many rows or columns."),new Error(y,{cause:c})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./D1NKZY8fEGk-xu0l.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const h=o.sheets[a],f=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,f,h.name);const A=h.sheet,x=i.getSheetAt(a),S=x.getUsedRange();if(S?(f["!ref"]=S.getA1(),S.forEach((D,b)=>{const R={t:"z"},_=b.getCell().getStyle();if(!_.isNormal()){let T=_.getNumberFormat();T!==d.je.Type.General&&(T===d.je.Type.ShortDate?T="m/d/yyyy":T===d.je.Type.MediumDate?T="d-mmm-yy":T===d.je.Type.LongDate?T="[$-x-sysdate]dddd, mmmm dd, yyyy":T===d.je.Type.ShortTime?T="h:mm":T===d.je.Type.MediumTime?T="h:mm AM/PM":T===d.je.Type.LongTime&&(T="h:mm:ss AM/PM"),R.z=T)}if(D!==null)switch(b.getType()){case d.M.Number:R.t="n",R.v=D;break;case d.M.String:R.t="s",R.v=D;break;case d.M.Boolean:R.t="b",R.v=D;break;case d.M.Error:R.t="e",R.v=D.toString();case d.M.RichData:}f[b.getA1()]=R})):f["!ref"]="A1:A1",A.merges?.length>0){const D=[];f["!merges"]=D;for(let b=0;b<A.merges.length;b++)D.push(s.utils.decode_range(A.merges[b]))}if(A.cols?.length>0){const D=[];f["!cols"]=D;const b=A.cols,R={width:A.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let _=0;_<b.length;_++){const T=b[_];for(let c=D.length;c<=T.min-1;c++)D.push(R);const m={};T.sz!==void 0&&(m.width=T.sz),T.h!==void 0&&(m.hidden=T.h),T.l!==void 0&&(m.level=T.l);for(let c=T.min;c<=T.max;c++)D.push(m)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=ms,exports.c=i=>i?d.te.roundAccurately(parseFloat(i)/9525,1):null,exports.d=Ve,exports.i=_s,exports.p=i=>parseFloat(i)/6e4,exports.r=fs,exports.t=i=>i?d.te.roundAccurately(parseFloat(i)/12700,4):null;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.5
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.7
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,9 +1,9 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.5
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.7
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./C_RM79K9AMokH2QJ.cjs");var xo=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,Pt=xo||Ms||Function("return this")(),At=Pt.Symbol,Co=Object.prototype,Us=Co.hasOwnProperty,Fs=Co.toString,Ae=At?At.toStringTag:void 0,Ds=Object.prototype.toString,zr=At?At.toStringTag:void 0;function Zt(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":zr&&zr in Object(t)?(function(n){var r=Us.call(n,Ae),i=n[Ae];try{n[Ae]=void 0;var o=!0}catch{}var s=Fs.call(n);return o&&(r?n[Ae]=i:delete n[Ae]),s})(t):(e=t,Ds.call(e));var e}function vt(t){return t!=null&&typeof t=="object"}function Tn(t){return typeof t=="symbol"||vt(t)&&Zt(t)=="[object Symbol]"}function An(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var B=Array.isArray,Vr=At?At.prototype:void 0,Hr=Vr?Vr.toString:void 0;function ko(t){if(typeof t=="string")return t;if(B(t))return An(t,ko)+"";if(Tn(t))return Hr?Hr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var js=/\s/,Bs=/^\s+/;function It(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var $s=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,Ks=parseInt,zs=1/0;function Vs(t){return t?(t=(function(e){if(typeof e=="number")return e;if(Tn(e))return NaN;if(It(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=It(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=(function(i){return i&&i.slice(0,(function(o){for(var s=o.length;s--&&js.test(o.charAt(s)););return s})(i)+1).replace(Bs,"")})(e);var r=Ws.test(e);return r||Gs.test(e)?Ks(e.slice(2),r?2:8):$s.test(e)?NaN:+e})(t))===zs||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0}function In(t){var e=Vs(t),n=e%1;return e==e?n?e-n:e:0}function de(t){return t}function Ht(t){if(!It(t))return!1;var e=Zt(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"}var Yr,bn=Pt["__core-js_shared__"],Xr=(Yr=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+Yr:"",Hs=Function.prototype.toString;function ie(t){if(t!=null){try{return Hs.call(t)}catch{}try{return t+""}catch{}}return""}var Ys=/^\[object .+?Constructor\]$/,Xs=Function.prototype,qs=Object.prototype,Zs=Xs.toString,Qs=qs.hasOwnProperty,Js=RegExp("^"+Zs.call(Qs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oe(t,e){var n,r,i=(n=t,r=e,n?.[r]);return(function(o){return!(!It(o)||(s=o,Xr&&Xr in s))&&(Ht(o)?Js:Ys).test(ie(o));var s})(i)?i:void 0}var ar=oe(Pt,"WeakMap"),qr=Object.create,ta=(function(){function t(){}return function(e){if(!It(e))return{};if(qr)return qr(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Z(){}var Zr,Pn,wn,ea=Date.now,an=(function(){try{var t=oe(Object,"defineProperty");return t({},"",{}),t}catch{}})(),na=an?function(t,e){return an(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:de,ra=(Zr=na,Pn=0,wn=0,function(){var t=ea(),e=16-(t-wn);if(wn=t,e>0){if(++Pn>=800)return arguments[0]}else Pn=0;return Zr.apply(void 0,arguments)});function bo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function Po(t,e,n,r){for(var i=t.length,o=n+-1;++o<i;)if(e(t[o],o,t))return o;return-1}function ia(t){return t!=t}function Cr(t,e,n){return e==e?(function(r,i,o){for(var s=o-1,a=r.length;++s<a;)if(r[s]===i)return s;return-1})(t,e,n):Po(t,ia,n)}function wo(t,e){return!(t==null||!t.length)&&Cr(t,e,0)>-1}var oa=/^(?:0|[1-9]\d*)$/;function Nn(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&(n=="number"||n!="symbol"&&oa.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,n){e=="__proto__"&&an?an(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Be(t,e){return t===e||t!=t&&e!=e}var sa=Object.prototype.hasOwnProperty;function yn(t,e,n){var r=t[e];sa.call(t,e)&&Be(r,n)&&(n!==void 0||e in t)||kr(t,e,n)}function cr(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;c===void 0&&(c=t[a]),i?kr(n,a,c):yn(n,a,c)}return n}var Qr=Math.max;function br(t,e){return ra((n=t,i=de,r=Qr((r=e)===void 0?n.length-1:r,0),function(){for(var o=arguments,s=-1,a=Qr(o.length-r,0),c=Array(a);++s<a;)c[s]=o[r+s];s=-1;for(var u=Array(r+1);++s<r;)u[s]=o[s];return u[r]=i(c),(function(l,h,N){switch(N.length){case 0:return l.call(h);case 1:return l.call(h,N[0]);case 2:return l.call(h,N[0],N[1]);case 3:return l.call(h,N[0],N[1],N[2])}return l.apply(h,N)})(n,this,u)}),t+"");var n,r,i}function Pr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}function wt(t){return t!=null&&Pr(t.length)&&!Ht(t)}function Mo(t,e,n){if(!It(n))return!1;var r=typeof e;return!!(r=="number"?wt(n)&&Nn(e,n.length):r=="string"&&e in n)&&Be(n[e],t)}var aa=Object.prototype;function $e(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||aa)}function Jr(t){return vt(t)&&Zt(t)=="[object Arguments]"}var Uo=Object.prototype,ca=Uo.hasOwnProperty,ua=Uo.propertyIsEnumerable,Rn=Jr((function(){return arguments})())?Jr:function(t){return vt(t)&&ca.call(t,"callee")&&!ua.call(t,"callee")},Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ti=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,ei=ti&&ti.exports===Fo?Pt.Buffer:void 0,Pe=(ei?ei.isBuffer:void 0)||function(){return!1},z={};function vn(t){return function(e){return t(e)}}z["[object Float32Array]"]=z["[object Float64Array]"]=z["[object Int8Array]"]=z["[object Int16Array]"]=z["[object Int32Array]"]=z["[object Uint8Array]"]=z["[object Uint8ClampedArray]"]=z["[object Uint16Array]"]=z["[object Uint32Array]"]=!0,z["[object Arguments]"]=z["[object Array]"]=z["[object ArrayBuffer]"]=z["[object Boolean]"]=z["[object DataView]"]=z["[object Date]"]=z["[object Error]"]=z["[object Function]"]=z["[object Map]"]=z["[object Number]"]=z["[object Object]"]=z["[object RegExp]"]=z["[object Set]"]=z["[object String]"]=z["[object WeakMap]"]=!1;var Do=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Le=Do&&typeof module=="object"&&module&&!module.nodeType&&module,Mn=Le&&Le.exports===Do&&xo.process,Xt=(function(){try{return Le&&Le.require&&Le.require("util").types||Mn&&Mn.binding&&Mn.binding("util")}catch{}})(),ni=Xt&&Xt.isTypedArray,wr=ni?vn(ni):function(t){return vt(t)&&Pr(t.length)&&!!z[Zt(t)]},la=Object.prototype.hasOwnProperty;function jo(t,e){var n=B(t),r=!n&&Rn(t),i=!n&&!r&&Pe(t),o=!n&&!r&&!i&&wr(t),s=n||r||i||o,a=s?(function(l,h){for(var N=-1,S=Array(l);++N<l;)S[N]=h(N);return S})(t.length,String):[],c=a.length;for(var u in t)!e&&!la.call(t,u)||s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Nn(u,c))||a.push(u);return a}function Bo(t,e){return function(n){return t(e(n))}}var ha=Bo(Object.keys,Object),fa=Object.prototype.hasOwnProperty;function $o(t){if(!$e(t))return ha(t);var e=[];for(var n in Object(t))fa.call(t,n)&&n!="constructor"&&e.push(n);return e}function Nt(t){return wt(t)?jo(t):$o(t)}var Un,da=Object.prototype.hasOwnProperty,dt=(Un=function(t,e){if($e(e)||wt(e))cr(e,Nt(e),t);else for(var n in e)da.call(e,n)&&yn(t,n,e[n])},br(function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Un.length>3&&typeof i=="function"?(r--,i):void 0,o&&Mo(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Un(t,s)}return t})),pa=Object.prototype.hasOwnProperty;function Wo(t){return wt(t)?jo(t,!0):(function(e){if(!It(e))return(function(o){var s=[];if(o!=null)for(var a in Object(o))s.push(a);return s})(e);var n=$e(e),r=[];for(var i in e)(i!="constructor"||!n&&pa.call(e,i))&&r.push(i);return r})(t)}var ma=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ea=/^\w*$/;function ur(t,e){if(B(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Tn(t))||Ea.test(t)||!ma.test(t)||e!=null&&t in Object(e)}var Ie=oe(Object,"create"),ga=Object.prototype.hasOwnProperty,Ta=Object.prototype.hasOwnProperty;function ee(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ge(t,e){for(var n=t.length;n--;)if(Be(t[n][0],e))return n;return-1}ee.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},ee.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ee.prototype.get=function(t){var e=this.__data__;if(Ie){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return ga.call(e,t)?e[t]:void 0},ee.prototype.has=function(t){var e=this.__data__;return Ie?e[t]!==void 0:Ta.call(e,t)},ee.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ie&&e===void 0?"__lodash_hash_undefined__":e,this};var Aa=Array.prototype.splice;function zt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zt.prototype.clear=function(){this.__data__=[],this.size=0},zt.prototype.delete=function(t){var e=this.__data__,n=Ge(e,t);return!(n<0||(n==e.length-1?e.pop():Aa.call(e,n,1),--this.size,0))},zt.prototype.get=function(t){var e=this.__data__,n=Ge(e,t);return n<0?void 0:e[n][1]},zt.prototype.has=function(t){return Ge(this.__data__,t)>-1},zt.prototype.set=function(t,e){var n=this.__data__,r=Ge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var we=oe(Pt,"Map");function Ke(t,e){var n,r,i=t.__data__;return((r=typeof(n=e))=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null)?i[typeof e=="string"?"string":"hash"]:i.map}function Wt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Mr.Cache||Wt),n}Wt.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(we||zt),string:new ee}},Wt.prototype.delete=function(t){var e=Ke(this,t).delete(t);return this.size-=e?1:0,e},Wt.prototype.get=function(t){return Ke(this,t).get(t)},Wt.prototype.has=function(t){return Ke(this,t).has(t)},Wt.prototype.set=function(t,e){var n=Ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Mr.Cache=Wt;var Fn,Dn,Ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Na=/\\(\\)?/g,ya=(Fn=Mr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ia,function(n,r,i,o){e.push(i?o.replace(Na,"$1"):r||n)}),e},function(t){return Dn.size===500&&Dn.clear(),t}),Dn=Fn.cache,Fn);function On(t,e){return B(t)?t:ur(t,e)?[t]:ya((function(n){return n==null?"":ko(n)})(t))}function Me(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lr(t,e){for(var n=0,r=(e=On(e,t)).length;t!=null&&n<r;)t=t[Me(e[n++])];return n&&n==r?t:void 0}function Ur(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ri=At?At.isConcatSpreadable:void 0;function Ra(t){return B(t)||Rn(t)||!!(ri&&t&&t[ri])}function Fr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ra),i||(i=[]);++o<s;){var a=t[o];n(a)?Ur(i,a):r||(i[i.length]=a)}return i}function yt(t){return t!=null&&t.length?Fr(t):[]}var Go=Bo(Object.getPrototypeOf,Object);function Ko(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function va(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function kt(t){var e=this.__data__=new zt(t);this.size=e.size}kt.prototype.clear=function(){this.__data__=new zt,this.size=0},kt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zt){var r=n.__data__;if(!we||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wt(r)}return n.set(t,e),this.size=n.size,this};var zo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ii=zo&&typeof module=="object"&&module&&!module.nodeType&&module,oi=ii&&ii.exports===zo?Pt.Buffer:void 0,si=oi?oi.allocUnsafe:void 0;function Dr(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Vo(){return[]}var Oa=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,jr=ai?function(t){return t==null?[]:(t=Object(t),Dr(ai(t),function(e){return Oa.call(t,e)}))}:Vo,Sa=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ur(e,jr(t)),t=Go(t);return e}:Vo;function Ho(t,e,n){var r=e(t);return B(t)?r:Ur(r,n(t))}function hr(t){return Ho(t,Nt,jr)}var fr=oe(Pt,"DataView"),dr=oe(Pt,"Promise"),he=oe(Pt,"Set"),ci="[object Map]",ui="[object Promise]",li="[object Set]",hi="[object WeakMap]",fi="[object DataView]",_a=ie(fr),La=ie(we),xa=ie(dr),Ca=ie(he),ka=ie(ar),Tt=Zt;(fr&&Tt(new fr(new ArrayBuffer(1)))!=fi||we&&Tt(new we)!=ci||dr&&Tt(dr.resolve())!=ui||he&&Tt(new he)!=li||ar&&Tt(new ar)!=hi)&&(Tt=function(t){var e=Zt(t),n=e=="[object Object]"?t.constructor:void 0,r=n?ie(n):"";if(r)switch(r){case _a:return fi;case La:return ci;case xa:return ui;case Ca:return li;case ka:return hi}return e});var ba=Object.prototype.hasOwnProperty,cn=Pt.Uint8Array,Pa=/\w*$/,di=At?At.prototype:void 0,pi=di?di.valueOf:void 0,mi=Xt&&Xt.isMap,wa=mi?vn(mi):function(t){return vt(t)&&Tt(t)=="[object Map]"},Ei=Xt&&Xt.isSet,Ma=Ei?vn(Ei):function(t){return vt(t)&&Tt(t)=="[object Set]"},Yo="[object Arguments]",Xo="[object Function]",qo="[object Object]",G={};function Qe(t,e,n,r,i,o){var s;if(s!==void 0)return s;if(!It(t))return t;var a,c,u,l=B(t);if(l)return c=(a=t).length,u=new a.constructor(c),c&&typeof a[0]=="string"&&ba.call(a,"index")&&(u.index=a.index,u.input=a.input),(function(m,y){var p=-1,T=m.length;for(y||(y=Array(T));++p<T;)y[p]=m[p];return y})(t,s=u);var h=Tt(t),N=h==Xo||h=="[object GeneratorFunction]";if(Pe(t))return(function(m){var y=m.length,p=si?si(y):new m.constructor(y);return m.copy(p),p})(t);if(h==qo||h==Yo||N&&!i)return s=N?{}:(function(m){return typeof m.constructor!="function"||$e(m)?{}:ta(Go(m))})(t),(function(m,y){return cr(m,jr(m),y)})(t,(function(m,y){return m&&cr(y,Nt(y),m)})(s,t));if(!G[h])return i?t:{};s=(function(m,y){var p,T,g,A,v,f,d,I=m.constructor;switch(y){case"[object ArrayBuffer]":return v=new(A=m).constructor(A.byteLength),new cn(v).set(new cn(A)),v;case"[object Boolean]":case"[object Date]":return new I(+m);case"[object DataView]":return g=(T=m).buffer,new T.constructor(g,T.byteOffset,T.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return d=(f=m).buffer,new f.constructor(d,f.byteOffset,f.length);case"[object Map]":case"[object Set]":return new I;case"[object Number]":case"[object String]":return new I(m);case"[object RegExp]":return(function(E){var R=new E.constructor(E.source,Pa.exec(E));return R.lastIndex=E.lastIndex,R})(m);case"[object Symbol]":return p=m,pi?Object(pi.call(p)):{}}})(t,h),o||(o=new kt);var S=o.get(t);if(S)return S;o.set(t,s),Ma(t)?t.forEach(function(m){s.add(Qe(m,e,n,m,t,o))}):wa(t)&&t.forEach(function(m,y){s.set(y,Qe(m,e,n,y,t,o))});var L=l?void 0:hr(t);return bo(L||t,function(m,y){L&&(m=t[y=m]),yn(s,y,Qe(m,e,n,y,t,o))}),s}function et(t){return Qe(t,4)}function Ue(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function fe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wt;++e<n;)this.add(t[e])}function Zo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Br(t,e){return t.has(e)}function gi(t,e,n,r,i,o){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var h=-1,N=!0,S=2&n?new fe:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var L=t[h],m=e[h];if(r)var y=s?r(m,L,h,e,t,o):r(L,m,h,t,e,o);if(y!==void 0){if(y)continue;N=!1;break}if(S){if(!Zo(e,function(p,T){if(!Br(S,T)&&(L===p||i(L,p,n,r,o)))return S.push(T)})){N=!1;break}}else if(L!==m&&!i(L,m,n,r,o)){N=!1;break}}return o.delete(t),o.delete(e),N}function Ua(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function $r(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}G[Yo]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object DataView]"]=G["[object Boolean]"]=G["[object Date]"]=G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Map]"]=G["[object Number]"]=G[qo]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object Symbol]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Error]"]=G[Xo]=G["[object WeakMap]"]=!1,fe.prototype.add=fe.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},fe.prototype.has=function(t){return this.__data__.has(t)};var Ti=At?At.prototype:void 0,jn=Ti?Ti.valueOf:void 0,Fa=Object.prototype.hasOwnProperty,Ai="[object Arguments]",Ii="[object Array]",ze="[object Object]",Ni=Object.prototype.hasOwnProperty;function pr(t,e,n,r,i){return t===e||(t==null||e==null||!vt(t)&&!vt(e)?t!=t&&e!=e:(function(o,s,a,c,u,l){var h=B(o),N=B(s),S=h?Ii:Tt(o),L=N?Ii:Tt(s),m=(S=S==Ai?ze:S)==ze,y=(L=L==Ai?ze:L)==ze,p=S==L;if(p&&Pe(o)){if(!Pe(s))return!1;h=!0,m=!1}if(p&&!m)return l||(l=new kt),h||wr(o)?gi(o,s,a,c,u,l):(function(f,d,I,E,R,U,x){switch(I){case"[object DataView]":if(f.byteLength!=d.byteLength||f.byteOffset!=d.byteOffset)return!1;f=f.buffer,d=d.buffer;case"[object ArrayBuffer]":return!(f.byteLength!=d.byteLength||!U(new cn(f),new cn(d)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Be(+f,+d);case"[object Error]":return f.name==d.name&&f.message==d.message;case"[object RegExp]":case"[object String]":return f==d+"";case"[object Map]":var O=Ua;case"[object Set]":var w=1&E;if(O||(O=$r),f.size!=d.size&&!w)return!1;var C=x.get(f);if(C)return C==d;E|=2,x.set(f,d);var k=gi(O(f),O(d),E,R,U,x);return x.delete(f),k;case"[object Symbol]":if(jn)return jn.call(f)==jn.call(d)}return!1})(o,s,S,a,c,u,l);if(!(1&a)){var T=m&&Ni.call(o,"__wrapped__"),g=y&&Ni.call(s,"__wrapped__");if(T||g){var A=T?o.value():o,v=g?s.value():s;return l||(l=new kt),u(A,v,a,c,l)}}return!!p&&(l||(l=new kt),(function(f,d,I,E,R,U){var x=1&I,O=hr(f),w=O.length;if(w!=hr(d).length&&!x)return!1;for(var C=w;C--;){var k=O[C];if(!(x?k in d:Fa.call(d,k)))return!1}var $=U.get(f),X=U.get(d);if($&&X)return $==d&&X==f;var W=!0;U.set(f,d),U.set(d,f);for(var rt=x;++C<w;){var mt=f[k=O[C]],xt=d[k];if(E)var Te=x?E(xt,mt,k,d,f,U):E(mt,xt,k,f,d,U);if(!(Te===void 0?mt===xt||R(mt,xt,I,E,U):Te)){W=!1;break}rt||(rt=k=="constructor")}if(W&&!rt){var nt=f.constructor,Qt=d.constructor;nt==Qt||!("constructor"in f)||!("constructor"in d)||typeof nt=="function"&&nt instanceof nt&&typeof Qt=="function"&&Qt instanceof Qt||(W=!1)}return U.delete(f),U.delete(d),W})(o,s,a,c,u,l))})(t,e,n,r,pr,i))}function yi(t){return t==t&&!It(t)}function Ri(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}}function Da(t,e){return t!=null&&e in Object(t)}function Qo(t,e,n){for(var r=-1,i=(e=On(e,t)).length,o=!1;++r<i;){var s=Me(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=t==null?0:t.length)&&Pr(i)&&Nn(s,i)&&(B(t)||Rn(t))}function bt(t){return typeof t=="function"?t:t==null?de:typeof t=="object"?B(t)?(function(e,n){return ur(e)&&yi(n)?Ri(Me(e),n):function(r){var i,o,s=(o=(i=r)==null?void 0:lr(i,e))===void 0?void 0:o;return s===void 0&&s===n?(function(a,c){return a!=null&&Qo(a,c,Da)})(r,e):pr(n,s,3)}})(t[0],t[1]):(function(e){var n=(function(r){for(var i=Nt(r),o=i.length;o--;){var s=i[o],a=r[s];i[o]=[s,a,yi(a)]}return i})(e);return n.length==1&&n[0][2]?Ri(n[0][0],n[0][1]):function(r){return r===e||(function(i,o,s){var a=s.length,c=a;if(i==null)return!c;for(i=Object(i);a--;){var u=s[a];if(u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<c;){var l=(u=s[a])[0],h=i[l],N=u[1];if(u[2]){if(h===void 0&&!(l in i))return!1}else if(!pr(N,h,3,void 0,new kt))return!1}return!0})(r,0,n)}})(t):(function(e){return ur(e)?(n=Me(e),function(r){return r?.[n]}):(function(r){return function(i){return lr(i,r)}})(e);var n})(t)}function ja(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}var vi,se=(vi=function(t,e){return t&&(function(n,r,i){for(var o=-1,s=Object(n),a=i(n),c=a.length;c--;){var u=a[++o];if(r(s[u],u,s)===!1)break}return n})(t,e,Nt)},function(t,e){if(t==null)return t;if(!wt(t))return vi(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&e(i[r],r,i)!==!1;);return t});function Ba(t,e,n,r){return se(t,function(i,o,s){e(r,i,n(i),s)}),r}var Jo=Object.prototype,$a=Jo.hasOwnProperty,mr=br(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Mo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=Wo(o),a=-1,c=s.length;++a<c;){var u=s[a],l=t[u];(l===void 0||Be(l,Jo[u])&&!$a.call(t,u))&&(t[u]=o[u])}return t});function Oi(t){return vt(t)&&wt(t)}var un=br(function(t,e){return Oi(t)?(function(n,r){var i=-1,o=wo,s=!0,a=n.length,c=[],u=r.length;if(!a)return c;r.length>=200&&(o=Br,s=!1,r=new fe(r));t:for(;++i<a;){var l=n[i],h=l;if(l=l!==0?l:0,s&&h==h){for(var N=u;N--;)if(r[N]===h)continue t;c.push(l)}else o(r,h,void 0)||c.push(l)}return c})(t,Fr(e,0,Oi,!0)):[]});function pe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function tt(t,e,n){var r=t==null?0:t.length;return r?Ko(t,(e=e===void 0?1:In(e))<0?0:e,r):[]}function Fe(t,e,n){var r=t==null?0:t.length;return r?Ko(t,0,(e=r-(e=e===void 0?1:In(e)))<0?0:e):[]}function M(t,e){var n;return(B(t)?bo:se)(t,typeof(n=e)=="function"?n:de)}function Wa(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ga(t,e){var n=!0;return se(t,function(r,i,o){return n=!!e(r,i,o)}),n}function Rt(t,e,n){return(B(t)?Wa:Ga)(t,bt(e))}function ts(t,e){var n=[];return se(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function Et(t,e){return(B(t)?Dr:ts)(t,bt(e))}var Si,Ka=Math.max,me=(Si=function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:In(n);return i<0&&(i=Ka(r+i,0)),Po(t,bt(e),i)},function(t,e,n){var r=Object(t);if(!wt(t)){var i=bt(e);t=Nt(t),e=function(s){return i(r[s],s,r)}}var o=Si(t,e,n);return o>-1?r[i?t[o]:o]:void 0});function Ot(t){return t&&t.length?t[0]:void 0}function za(t,e){var n=-1,r=wt(t)?Array(t.length):[];return se(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function b(t,e){return(B(t)?An:za)(t,bt(e))}function gt(t,e){return Fr(b(t,e))}var _i,Va=Object.prototype.hasOwnProperty,Ha=(_i=function(t,e,n){Va.call(t,n)?t[n].push(e):kr(t,n,[e])},function(t,e){return(B(t)?ja:Ba)(t,_i,bt(e),{})}),Ya=Object.prototype.hasOwnProperty;function Xa(t,e){return t!=null&&Ya.call(t,e)}function P(t,e){return t!=null&&Qo(t,e,Xa)}function ut(t){return typeof t=="string"||!B(t)&&vt(t)&&Zt(t)=="[object String]"}function Q(t){return t==null?[]:(function(e,n){return An(n,function(r){return e[r]})})(t,Nt(t))}var qa=Math.max;function at(t,e,n,r){t=wt(t)?t:Q(t),n=n?In(n):0;var i=t.length;return n<0&&(n=qa(i+n,0)),ut(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Cr(t,e,n)>-1}function Li(t,e,n){return t!=null&&t.length?Cr(t,e,0):-1}var Za=Object.prototype.hasOwnProperty;function K(t){if(t==null)return!0;if(wt(t)&&(B(t)||typeof t=="string"||typeof t.splice=="function"||Pe(t)||wr(t)||Rn(t)))return!t.length;var e=Tt(t);if(e=="[object Map]"||e=="[object Set]")return!t.size;if($e(t))return!$o(t).length;for(var n in t)if(Za.call(t,n))return!1;return!0}var xi=Xt&&Xt.isRegExp,Gt=xi?vn(xi):function(t){return vt(t)&&Zt(t)=="[object RegExp]"};function Vt(t){return t===void 0}function Qa(t,e,n,r){if(!It(t))return t;for(var i=-1,o=(e=On(e,t)).length,s=o-1,a=t;a!=null&&++i<o;){var c=Me(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=s){var l=a[c];(u=void 0)==null&&(u=It(l)?l:Nn(e[i+1])?[]:{})}yn(a,c,u),a=a[c]}return t}function St(t,e){if(t==null)return{};var n=An(Ho(t,Wo,Sa),function(r){return[r]});return e=bt(e),(function(r,i,o){for(var s=-1,a=i.length,c={};++s<a;){var u=i[s],l=lr(r,u);o(l,u)&&Qa(c,On(u,r),l)}return c})(t,n,function(r,i){return e(r,i[0])})}function Ja(t,e,n,r,i){return i(t,function(o,s,a){n=r?(r=!1,o):e(n,o,s,a)}),n}function ft(t,e,n){var r=B(t)?va:Ja,i=arguments.length<3;return r(t,bt(e),n,i,se)}function Je(t,e){return(B(t)?Dr:ts)(t,(function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}})(bt(e)))}function tc(t,e){var n;return se(t,function(r,i,o){return!(n=e(r,i,o))}),!!n}function es(t,e,n){return(B(t)?Zo:tc)(t,bt(e))}var ec=he&&1/$r(new he([,-0]))[1]==1/0?function(t){return new he(t)}:Z;function Er(t){return t&&t.length?(function(e){var n=-1,r=wo,i=e.length,o=!0,s=[],a=s;if(i>=200){var c=ec(e);if(c)return $r(c);o=!1,r=Br,a=new fe}else a=s;t:for(;++n<i;){var u=e[n],l=u;if(u=u!==0?u:0,o&&l==l){for(var h=a.length;h--;)if(a[h]===l)continue t;s.push(u)}else r(a,l,void 0)||(a!==s&&a.push(l),s.push(u))}return s})(t):[]}function gr(t){console&&console.error&&console.error(`Error: ${t}`)}function ns(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function rs(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function is(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function nc(t){return ut((e=t).LABEL)&&e.LABEL!==""?t.LABEL:t.name;var e}class Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),M(this.definition,n=>{n.accept(e)})}}class pt extends Mt{constructor(e){super([]),this.idx=1,dt(this,St(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Ee extends Mt{constructor(e){super(e.definition),this.orgText="",dt(this,St(e,n=>n!==void 0))}}class ht extends Mt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,dt(this,St(e,n=>n!==void 0))}}class lt extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ut extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ft extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class J extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class _t extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Lt extends Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,dt(this,St(e,n=>n!==void 0))}}class V{constructor(e){this.idx=1,dt(this,St(e,n=>n!==void 0))}accept(e){e.visit(this)}}function tn(t){function e(n){return b(n,tn)}if(t instanceof pt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ut(t.label)&&(n.label=t.label),n}if(t instanceof ht)return{type:"Alternative",definition:e(t.definition)};if(t instanceof lt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ut)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ft)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof J)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Lt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof V){const n={type:"Terminal",name:t.terminalType.name,label:nc(t.terminalType),idx:t.idx};ut(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Gt(r)?r.source:r),n}if(t instanceof Ee)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class ge{visit(e){const n=e;switch(n.constructor){case pt:return this.visitNonTerminal(n);case ht:return this.visitAlternative(n);case lt:return this.visitOption(n);case Ut:return this.visitRepetitionMandatory(n);case Ft:return this.visitRepetitionMandatoryWithSeparator(n);case _t:return this.visitRepetitionWithSeparator(n);case J:return this.visitRepetition(n);case Lt:return this.visitAlternation(n);case V:return this.visitTerminal(n);case Ee:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function ln(t,e=[]){return t instanceof lt||t instanceof J||t instanceof _t||(t instanceof Lt?es(t.definition,n=>ln(n,e)):!(t instanceof pt&&at(e,t))&&t instanceof Mt&&(t instanceof pt&&e.push(t),Rt(t.definition,n=>ln(n,e))))}function Ct(t){if(t instanceof pt)return"SUBRULE";if(t instanceof lt)return"OPTION";if(t instanceof Lt)return"OR";if(t instanceof Ut)return"AT_LEAST_ONE";if(t instanceof Ft)return"AT_LEAST_ONE_SEP";if(t instanceof _t)return"MANY_SEP";if(t instanceof J)return"MANY";if(t instanceof V)return"CONSUME";throw Error("non exhaustive match")}class Sn{walk(e,n=[]){M(e.definition,(r,i)=>{const o=tt(e.definition,i+1);if(r instanceof pt)this.walkProdRef(r,o,n);else if(r instanceof V)this.walkTerminal(r,o,n);else if(r instanceof ht)this.walkFlat(r,o,n);else if(r instanceof lt)this.walkOption(r,o,n);else if(r instanceof Ut)this.walkAtLeastOne(r,o,n);else if(r instanceof Ft)this.walkAtLeastOneSep(r,o,n);else if(r instanceof _t)this.walkManySep(r,o,n);else if(r instanceof J)this.walkMany(r,o,n);else{if(!(r instanceof Lt))throw Error("non exhaustive match");this.walkOr(r,o,n)}})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);M(e.definition,o=>{const s=new ht({definition:[o]});this.walk(s,i)})}}function Ci(t,e,n){return[new lt({definition:[new V({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function xe(t){if(t instanceof pt)return xe(t.referencedRule);if(t instanceof V)return[t.terminalType];if((function(e){return e instanceof ht||e instanceof lt||e instanceof J||e instanceof Ut||e instanceof Ft||e instanceof _t||e instanceof V||e instanceof Ee})(t))return(function(e){let n=[];const r=e.definition;let i,o=0,s=r.length>o,a=!0;for(;s&&a;)i=r[o],a=ln(i),n=n.concat(xe(i)),o+=1,s=r.length>o;return Er(n)})(t);if((function(e){return e instanceof Lt})(t))return(function(e){return Er(yt(b(e.definition,n=>xe(n))))})(t);throw Error("non exhaustive match")}const os="_~IN~_";class rc extends Sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=(o=e.referencedRule,s=e.idx,o.name+s+os+this.topProd.name);var o,s;const a=n.concat(r),c=xe(new ht({definition:a}));this.follows[i]=c}}function F(t){return t.charCodeAt(0)}function Bn(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ne(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ae(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ki(t){return t.type==="Character"}const hn=[];for(let t=F("0");t<=F("9");t++)hn.push(t);const fn=[F("_")].concat(hn);for(let t=F("a");t<=F("z");t++)fn.push(t);for(let t=F("A");t<=F("Z");t++)fn.push(t);const bi=[F(" "),F("\f"),F(`
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./CDQWmVCT_C4kt4z4.cjs");var xo=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,Pt=xo||Ms||Function("return this")(),At=Pt.Symbol,Co=Object.prototype,Us=Co.hasOwnProperty,Fs=Co.toString,Ae=At?At.toStringTag:void 0,Ds=Object.prototype.toString,zr=At?At.toStringTag:void 0;function Zt(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":zr&&zr in Object(t)?(function(n){var r=Us.call(n,Ae),i=n[Ae];try{n[Ae]=void 0;var o=!0}catch{}var s=Fs.call(n);return o&&(r?n[Ae]=i:delete n[Ae]),s})(t):(e=t,Ds.call(e));var e}function vt(t){return t!=null&&typeof t=="object"}function Tn(t){return typeof t=="symbol"||vt(t)&&Zt(t)=="[object Symbol]"}function An(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var B=Array.isArray,Vr=At?At.prototype:void 0,Hr=Vr?Vr.toString:void 0;function ko(t){if(typeof t=="string")return t;if(B(t))return An(t,ko)+"";if(Tn(t))return Hr?Hr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var js=/\s/,Bs=/^\s+/;function It(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var $s=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Gs=/^0o[0-7]+$/i,Ks=parseInt,zs=1/0;function Vs(t){return t?(t=(function(e){if(typeof e=="number")return e;if(Tn(e))return NaN;if(It(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=It(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=(function(i){return i&&i.slice(0,(function(o){for(var s=o.length;s--&&js.test(o.charAt(s)););return s})(i)+1).replace(Bs,"")})(e);var r=Ws.test(e);return r||Gs.test(e)?Ks(e.slice(2),r?2:8):$s.test(e)?NaN:+e})(t))===zs||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0}function In(t){var e=Vs(t),n=e%1;return e==e?n?e-n:e:0}function de(t){return t}function Ht(t){if(!It(t))return!1;var e=Zt(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"}var Yr,bn=Pt["__core-js_shared__"],Xr=(Yr=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+Yr:"",Hs=Function.prototype.toString;function ie(t){if(t!=null){try{return Hs.call(t)}catch{}try{return t+""}catch{}}return""}var Ys=/^\[object .+?Constructor\]$/,Xs=Function.prototype,qs=Object.prototype,Zs=Xs.toString,Qs=qs.hasOwnProperty,Js=RegExp("^"+Zs.call(Qs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oe(t,e){var n,r,i=(n=t,r=e,n?.[r]);return(function(o){return!(!It(o)||(s=o,Xr&&Xr in s))&&(Ht(o)?Js:Ys).test(ie(o));var s})(i)?i:void 0}var ar=oe(Pt,"WeakMap"),qr=Object.create,ta=(function(){function t(){}return function(e){if(!It(e))return{};if(qr)return qr(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Z(){}var Zr,Pn,wn,ea=Date.now,an=(function(){try{var t=oe(Object,"defineProperty");return t({},"",{}),t}catch{}})(),na=an?function(t,e){return an(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:de,ra=(Zr=na,Pn=0,wn=0,function(){var t=ea(),e=16-(t-wn);if(wn=t,e>0){if(++Pn>=800)return arguments[0]}else Pn=0;return Zr.apply(void 0,arguments)});function bo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function Po(t,e,n,r){for(var i=t.length,o=n+-1;++o<i;)if(e(t[o],o,t))return o;return-1}function ia(t){return t!=t}function Cr(t,e,n){return e==e?(function(r,i,o){for(var s=o-1,a=r.length;++s<a;)if(r[s]===i)return s;return-1})(t,e,n):Po(t,ia,n)}function wo(t,e){return!(t==null||!t.length)&&Cr(t,e,0)>-1}var oa=/^(?:0|[1-9]\d*)$/;function Nn(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&(n=="number"||n!="symbol"&&oa.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,n){e=="__proto__"&&an?an(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Be(t,e){return t===e||t!=t&&e!=e}var sa=Object.prototype.hasOwnProperty;function yn(t,e,n){var r=t[e];sa.call(t,e)&&Be(r,n)&&(n!==void 0||e in t)||kr(t,e,n)}function cr(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=void 0;c===void 0&&(c=t[a]),i?kr(n,a,c):yn(n,a,c)}return n}var Qr=Math.max;function br(t,e){return ra((n=t,i=de,r=Qr((r=e)===void 0?n.length-1:r,0),function(){for(var o=arguments,s=-1,a=Qr(o.length-r,0),c=Array(a);++s<a;)c[s]=o[r+s];s=-1;for(var u=Array(r+1);++s<r;)u[s]=o[s];return u[r]=i(c),(function(l,h,N){switch(N.length){case 0:return l.call(h);case 1:return l.call(h,N[0]);case 2:return l.call(h,N[0],N[1]);case 3:return l.call(h,N[0],N[1],N[2])}return l.apply(h,N)})(n,this,u)}),t+"");var n,r,i}function Pr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991}function wt(t){return t!=null&&Pr(t.length)&&!Ht(t)}function Mo(t,e,n){if(!It(n))return!1;var r=typeof e;return!!(r=="number"?wt(n)&&Nn(e,n.length):r=="string"&&e in n)&&Be(n[e],t)}var aa=Object.prototype;function $e(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||aa)}function Jr(t){return vt(t)&&Zt(t)=="[object Arguments]"}var Uo=Object.prototype,ca=Uo.hasOwnProperty,ua=Uo.propertyIsEnumerable,Rn=Jr((function(){return arguments})())?Jr:function(t){return vt(t)&&ca.call(t,"callee")&&!ua.call(t,"callee")},Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ti=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,ei=ti&&ti.exports===Fo?Pt.Buffer:void 0,Pe=(ei?ei.isBuffer:void 0)||function(){return!1},z={};function vn(t){return function(e){return t(e)}}z["[object Float32Array]"]=z["[object Float64Array]"]=z["[object Int8Array]"]=z["[object Int16Array]"]=z["[object Int32Array]"]=z["[object Uint8Array]"]=z["[object Uint8ClampedArray]"]=z["[object Uint16Array]"]=z["[object Uint32Array]"]=!0,z["[object Arguments]"]=z["[object Array]"]=z["[object ArrayBuffer]"]=z["[object Boolean]"]=z["[object DataView]"]=z["[object Date]"]=z["[object Error]"]=z["[object Function]"]=z["[object Map]"]=z["[object Number]"]=z["[object Object]"]=z["[object RegExp]"]=z["[object Set]"]=z["[object String]"]=z["[object WeakMap]"]=!1;var Do=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Le=Do&&typeof module=="object"&&module&&!module.nodeType&&module,Mn=Le&&Le.exports===Do&&xo.process,Xt=(function(){try{return Le&&Le.require&&Le.require("util").types||Mn&&Mn.binding&&Mn.binding("util")}catch{}})(),ni=Xt&&Xt.isTypedArray,wr=ni?vn(ni):function(t){return vt(t)&&Pr(t.length)&&!!z[Zt(t)]},la=Object.prototype.hasOwnProperty;function jo(t,e){var n=B(t),r=!n&&Rn(t),i=!n&&!r&&Pe(t),o=!n&&!r&&!i&&wr(t),s=n||r||i||o,a=s?(function(l,h){for(var N=-1,S=Array(l);++N<l;)S[N]=h(N);return S})(t.length,String):[],c=a.length;for(var u in t)!e&&!la.call(t,u)||s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Nn(u,c))||a.push(u);return a}function Bo(t,e){return function(n){return t(e(n))}}var ha=Bo(Object.keys,Object),fa=Object.prototype.hasOwnProperty;function $o(t){if(!$e(t))return ha(t);var e=[];for(var n in Object(t))fa.call(t,n)&&n!="constructor"&&e.push(n);return e}function Nt(t){return wt(t)?jo(t):$o(t)}var Un,da=Object.prototype.hasOwnProperty,dt=(Un=function(t,e){if($e(e)||wt(e))cr(e,Nt(e),t);else for(var n in e)da.call(e,n)&&yn(t,n,e[n])},br(function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Un.length>3&&typeof i=="function"?(r--,i):void 0,o&&Mo(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var s=e[n];s&&Un(t,s)}return t})),pa=Object.prototype.hasOwnProperty;function Wo(t){return wt(t)?jo(t,!0):(function(e){if(!It(e))return(function(o){var s=[];if(o!=null)for(var a in Object(o))s.push(a);return s})(e);var n=$e(e),r=[];for(var i in e)(i!="constructor"||!n&&pa.call(e,i))&&r.push(i);return r})(t)}var ma=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ea=/^\w*$/;function ur(t,e){if(B(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Tn(t))||Ea.test(t)||!ma.test(t)||e!=null&&t in Object(e)}var Ie=oe(Object,"create"),ga=Object.prototype.hasOwnProperty,Ta=Object.prototype.hasOwnProperty;function ee(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ge(t,e){for(var n=t.length;n--;)if(Be(t[n][0],e))return n;return-1}ee.prototype.clear=function(){this.__data__=Ie?Ie(null):{},this.size=0},ee.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ee.prototype.get=function(t){var e=this.__data__;if(Ie){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return ga.call(e,t)?e[t]:void 0},ee.prototype.has=function(t){var e=this.__data__;return Ie?e[t]!==void 0:Ta.call(e,t)},ee.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ie&&e===void 0?"__lodash_hash_undefined__":e,this};var Aa=Array.prototype.splice;function zt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zt.prototype.clear=function(){this.__data__=[],this.size=0},zt.prototype.delete=function(t){var e=this.__data__,n=Ge(e,t);return!(n<0||(n==e.length-1?e.pop():Aa.call(e,n,1),--this.size,0))},zt.prototype.get=function(t){var e=this.__data__,n=Ge(e,t);return n<0?void 0:e[n][1]},zt.prototype.has=function(t){return Ge(this.__data__,t)>-1},zt.prototype.set=function(t,e){var n=this.__data__,r=Ge(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var we=oe(Pt,"Map");function Ke(t,e){var n,r,i=t.__data__;return((r=typeof(n=e))=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null)?i[typeof e=="string"?"string":"hash"]:i.map}function Wt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Mr.Cache||Wt),n}Wt.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(we||zt),string:new ee}},Wt.prototype.delete=function(t){var e=Ke(this,t).delete(t);return this.size-=e?1:0,e},Wt.prototype.get=function(t){return Ke(this,t).get(t)},Wt.prototype.has=function(t){return Ke(this,t).has(t)},Wt.prototype.set=function(t,e){var n=Ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Mr.Cache=Wt;var Fn,Dn,Ia=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Na=/\\(\\)?/g,ya=(Fn=Mr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Ia,function(n,r,i,o){e.push(i?o.replace(Na,"$1"):r||n)}),e},function(t){return Dn.size===500&&Dn.clear(),t}),Dn=Fn.cache,Fn);function On(t,e){return B(t)?t:ur(t,e)?[t]:ya((function(n){return n==null?"":ko(n)})(t))}function Me(t){if(typeof t=="string"||Tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lr(t,e){for(var n=0,r=(e=On(e,t)).length;t!=null&&n<r;)t=t[Me(e[n++])];return n&&n==r?t:void 0}function Ur(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var ri=At?At.isConcatSpreadable:void 0;function Ra(t){return B(t)||Rn(t)||!!(ri&&t&&t[ri])}function Fr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=Ra),i||(i=[]);++o<s;){var a=t[o];n(a)?Ur(i,a):r||(i[i.length]=a)}return i}function yt(t){return t!=null&&t.length?Fr(t):[]}var Go=Bo(Object.getPrototypeOf,Object);function Ko(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function va(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function kt(t){var e=this.__data__=new zt(t);this.size=e.size}kt.prototype.clear=function(){this.__data__=new zt,this.size=0},kt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},kt.prototype.get=function(t){return this.__data__.get(t)},kt.prototype.has=function(t){return this.__data__.has(t)},kt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof zt){var r=n.__data__;if(!we||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wt(r)}return n.set(t,e),this.size=n.size,this};var zo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ii=zo&&typeof module=="object"&&module&&!module.nodeType&&module,oi=ii&&ii.exports===zo?Pt.Buffer:void 0,si=oi?oi.allocUnsafe:void 0;function Dr(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Vo(){return[]}var Oa=Object.prototype.propertyIsEnumerable,ai=Object.getOwnPropertySymbols,jr=ai?function(t){return t==null?[]:(t=Object(t),Dr(ai(t),function(e){return Oa.call(t,e)}))}:Vo,Sa=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ur(e,jr(t)),t=Go(t);return e}:Vo;function Ho(t,e,n){var r=e(t);return B(t)?r:Ur(r,n(t))}function hr(t){return Ho(t,Nt,jr)}var fr=oe(Pt,"DataView"),dr=oe(Pt,"Promise"),he=oe(Pt,"Set"),ci="[object Map]",ui="[object Promise]",li="[object Set]",hi="[object WeakMap]",fi="[object DataView]",_a=ie(fr),La=ie(we),xa=ie(dr),Ca=ie(he),ka=ie(ar),Tt=Zt;(fr&&Tt(new fr(new ArrayBuffer(1)))!=fi||we&&Tt(new we)!=ci||dr&&Tt(dr.resolve())!=ui||he&&Tt(new he)!=li||ar&&Tt(new ar)!=hi)&&(Tt=function(t){var e=Zt(t),n=e=="[object Object]"?t.constructor:void 0,r=n?ie(n):"";if(r)switch(r){case _a:return fi;case La:return ci;case xa:return ui;case Ca:return li;case ka:return hi}return e});var ba=Object.prototype.hasOwnProperty,cn=Pt.Uint8Array,Pa=/\w*$/,di=At?At.prototype:void 0,pi=di?di.valueOf:void 0,mi=Xt&&Xt.isMap,wa=mi?vn(mi):function(t){return vt(t)&&Tt(t)=="[object Map]"},Ei=Xt&&Xt.isSet,Ma=Ei?vn(Ei):function(t){return vt(t)&&Tt(t)=="[object Set]"},Yo="[object Arguments]",Xo="[object Function]",qo="[object Object]",G={};function Qe(t,e,n,r,i,o){var s;if(s!==void 0)return s;if(!It(t))return t;var a,c,u,l=B(t);if(l)return c=(a=t).length,u=new a.constructor(c),c&&typeof a[0]=="string"&&ba.call(a,"index")&&(u.index=a.index,u.input=a.input),(function(m,y){var p=-1,T=m.length;for(y||(y=Array(T));++p<T;)y[p]=m[p];return y})(t,s=u);var h=Tt(t),N=h==Xo||h=="[object GeneratorFunction]";if(Pe(t))return(function(m){var y=m.length,p=si?si(y):new m.constructor(y);return m.copy(p),p})(t);if(h==qo||h==Yo||N&&!i)return s=N?{}:(function(m){return typeof m.constructor!="function"||$e(m)?{}:ta(Go(m))})(t),(function(m,y){return cr(m,jr(m),y)})(t,(function(m,y){return m&&cr(y,Nt(y),m)})(s,t));if(!G[h])return i?t:{};s=(function(m,y){var p,T,g,A,v,f,d,I=m.constructor;switch(y){case"[object ArrayBuffer]":return v=new(A=m).constructor(A.byteLength),new cn(v).set(new cn(A)),v;case"[object Boolean]":case"[object Date]":return new I(+m);case"[object DataView]":return g=(T=m).buffer,new T.constructor(g,T.byteOffset,T.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return d=(f=m).buffer,new f.constructor(d,f.byteOffset,f.length);case"[object Map]":case"[object Set]":return new I;case"[object Number]":case"[object String]":return new I(m);case"[object RegExp]":return(function(E){var R=new E.constructor(E.source,Pa.exec(E));return R.lastIndex=E.lastIndex,R})(m);case"[object Symbol]":return p=m,pi?Object(pi.call(p)):{}}})(t,h),o||(o=new kt);var S=o.get(t);if(S)return S;o.set(t,s),Ma(t)?t.forEach(function(m){s.add(Qe(m,e,n,m,t,o))}):wa(t)&&t.forEach(function(m,y){s.set(y,Qe(m,e,n,y,t,o))});var L=l?void 0:hr(t);return bo(L||t,function(m,y){L&&(m=t[y=m]),yn(s,y,Qe(m,e,n,y,t,o))}),s}function et(t){return Qe(t,4)}function Ue(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function fe(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wt;++e<n;)this.add(t[e])}function Zo(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Br(t,e){return t.has(e)}function gi(t,e,n,r,i,o){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var h=-1,N=!0,S=2&n?new fe:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var L=t[h],m=e[h];if(r)var y=s?r(m,L,h,e,t,o):r(L,m,h,t,e,o);if(y!==void 0){if(y)continue;N=!1;break}if(S){if(!Zo(e,function(p,T){if(!Br(S,T)&&(L===p||i(L,p,n,r,o)))return S.push(T)})){N=!1;break}}else if(L!==m&&!i(L,m,n,r,o)){N=!1;break}}return o.delete(t),o.delete(e),N}function Ua(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function $r(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}G[Yo]=G["[object Array]"]=G["[object ArrayBuffer]"]=G["[object DataView]"]=G["[object Boolean]"]=G["[object Date]"]=G["[object Float32Array]"]=G["[object Float64Array]"]=G["[object Int8Array]"]=G["[object Int16Array]"]=G["[object Int32Array]"]=G["[object Map]"]=G["[object Number]"]=G[qo]=G["[object RegExp]"]=G["[object Set]"]=G["[object String]"]=G["[object Symbol]"]=G["[object Uint8Array]"]=G["[object Uint8ClampedArray]"]=G["[object Uint16Array]"]=G["[object Uint32Array]"]=!0,G["[object Error]"]=G[Xo]=G["[object WeakMap]"]=!1,fe.prototype.add=fe.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},fe.prototype.has=function(t){return this.__data__.has(t)};var Ti=At?At.prototype:void 0,jn=Ti?Ti.valueOf:void 0,Fa=Object.prototype.hasOwnProperty,Ai="[object Arguments]",Ii="[object Array]",ze="[object Object]",Ni=Object.prototype.hasOwnProperty;function pr(t,e,n,r,i){return t===e||(t==null||e==null||!vt(t)&&!vt(e)?t!=t&&e!=e:(function(o,s,a,c,u,l){var h=B(o),N=B(s),S=h?Ii:Tt(o),L=N?Ii:Tt(s),m=(S=S==Ai?ze:S)==ze,y=(L=L==Ai?ze:L)==ze,p=S==L;if(p&&Pe(o)){if(!Pe(s))return!1;h=!0,m=!1}if(p&&!m)return l||(l=new kt),h||wr(o)?gi(o,s,a,c,u,l):(function(f,d,I,E,R,U,x){switch(I){case"[object DataView]":if(f.byteLength!=d.byteLength||f.byteOffset!=d.byteOffset)return!1;f=f.buffer,d=d.buffer;case"[object ArrayBuffer]":return!(f.byteLength!=d.byteLength||!U(new cn(f),new cn(d)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Be(+f,+d);case"[object Error]":return f.name==d.name&&f.message==d.message;case"[object RegExp]":case"[object String]":return f==d+"";case"[object Map]":var O=Ua;case"[object Set]":var w=1&E;if(O||(O=$r),f.size!=d.size&&!w)return!1;var C=x.get(f);if(C)return C==d;E|=2,x.set(f,d);var k=gi(O(f),O(d),E,R,U,x);return x.delete(f),k;case"[object Symbol]":if(jn)return jn.call(f)==jn.call(d)}return!1})(o,s,S,a,c,u,l);if(!(1&a)){var T=m&&Ni.call(o,"__wrapped__"),g=y&&Ni.call(s,"__wrapped__");if(T||g){var A=T?o.value():o,v=g?s.value():s;return l||(l=new kt),u(A,v,a,c,l)}}return!!p&&(l||(l=new kt),(function(f,d,I,E,R,U){var x=1&I,O=hr(f),w=O.length;if(w!=hr(d).length&&!x)return!1;for(var C=w;C--;){var k=O[C];if(!(x?k in d:Fa.call(d,k)))return!1}var $=U.get(f),X=U.get(d);if($&&X)return $==d&&X==f;var W=!0;U.set(f,d),U.set(d,f);for(var rt=x;++C<w;){var mt=f[k=O[C]],xt=d[k];if(E)var Te=x?E(xt,mt,k,d,f,U):E(mt,xt,k,f,d,U);if(!(Te===void 0?mt===xt||R(mt,xt,I,E,U):Te)){W=!1;break}rt||(rt=k=="constructor")}if(W&&!rt){var nt=f.constructor,Qt=d.constructor;nt==Qt||!("constructor"in f)||!("constructor"in d)||typeof nt=="function"&&nt instanceof nt&&typeof Qt=="function"&&Qt instanceof Qt||(W=!1)}return U.delete(f),U.delete(d),W})(o,s,a,c,u,l))})(t,e,n,r,pr,i))}function yi(t){return t==t&&!It(t)}function Ri(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}}function Da(t,e){return t!=null&&e in Object(t)}function Qo(t,e,n){for(var r=-1,i=(e=On(e,t)).length,o=!1;++r<i;){var s=Me(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=t==null?0:t.length)&&Pr(i)&&Nn(s,i)&&(B(t)||Rn(t))}function bt(t){return typeof t=="function"?t:t==null?de:typeof t=="object"?B(t)?(function(e,n){return ur(e)&&yi(n)?Ri(Me(e),n):function(r){var i,o,s=(o=(i=r)==null?void 0:lr(i,e))===void 0?void 0:o;return s===void 0&&s===n?(function(a,c){return a!=null&&Qo(a,c,Da)})(r,e):pr(n,s,3)}})(t[0],t[1]):(function(e){var n=(function(r){for(var i=Nt(r),o=i.length;o--;){var s=i[o],a=r[s];i[o]=[s,a,yi(a)]}return i})(e);return n.length==1&&n[0][2]?Ri(n[0][0],n[0][1]):function(r){return r===e||(function(i,o,s){var a=s.length,c=a;if(i==null)return!c;for(i=Object(i);a--;){var u=s[a];if(u[2]?u[1]!==i[u[0]]:!(u[0]in i))return!1}for(;++a<c;){var l=(u=s[a])[0],h=i[l],N=u[1];if(u[2]){if(h===void 0&&!(l in i))return!1}else if(!pr(N,h,3,void 0,new kt))return!1}return!0})(r,0,n)}})(t):(function(e){return ur(e)?(n=Me(e),function(r){return r?.[n]}):(function(r){return function(i){return lr(i,r)}})(e);var n})(t)}function ja(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}var vi,se=(vi=function(t,e){return t&&(function(n,r,i){for(var o=-1,s=Object(n),a=i(n),c=a.length;c--;){var u=a[++o];if(r(s[u],u,s)===!1)break}return n})(t,e,Nt)},function(t,e){if(t==null)return t;if(!wt(t))return vi(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&e(i[r],r,i)!==!1;);return t});function Ba(t,e,n,r){return se(t,function(i,o,s){e(r,i,n(i),s)}),r}var Jo=Object.prototype,$a=Jo.hasOwnProperty,mr=br(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Mo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=Wo(o),a=-1,c=s.length;++a<c;){var u=s[a],l=t[u];(l===void 0||Be(l,Jo[u])&&!$a.call(t,u))&&(t[u]=o[u])}return t});function Oi(t){return vt(t)&&wt(t)}var un=br(function(t,e){return Oi(t)?(function(n,r){var i=-1,o=wo,s=!0,a=n.length,c=[],u=r.length;if(!a)return c;r.length>=200&&(o=Br,s=!1,r=new fe(r));t:for(;++i<a;){var l=n[i],h=l;if(l=l!==0?l:0,s&&h==h){for(var N=u;N--;)if(r[N]===h)continue t;c.push(l)}else o(r,h,void 0)||c.push(l)}return c})(t,Fr(e,0,Oi,!0)):[]});function pe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function tt(t,e,n){var r=t==null?0:t.length;return r?Ko(t,(e=e===void 0?1:In(e))<0?0:e,r):[]}function Fe(t,e,n){var r=t==null?0:t.length;return r?Ko(t,0,(e=r-(e=e===void 0?1:In(e)))<0?0:e):[]}function M(t,e){var n;return(B(t)?bo:se)(t,typeof(n=e)=="function"?n:de)}function Wa(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ga(t,e){var n=!0;return se(t,function(r,i,o){return n=!!e(r,i,o)}),n}function Rt(t,e,n){return(B(t)?Wa:Ga)(t,bt(e))}function ts(t,e){var n=[];return se(t,function(r,i,o){e(r,i,o)&&n.push(r)}),n}function Et(t,e){return(B(t)?Dr:ts)(t,bt(e))}var Si,Ka=Math.max,me=(Si=function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:In(n);return i<0&&(i=Ka(r+i,0)),Po(t,bt(e),i)},function(t,e,n){var r=Object(t);if(!wt(t)){var i=bt(e);t=Nt(t),e=function(s){return i(r[s],s,r)}}var o=Si(t,e,n);return o>-1?r[i?t[o]:o]:void 0});function Ot(t){return t&&t.length?t[0]:void 0}function za(t,e){var n=-1,r=wt(t)?Array(t.length):[];return se(t,function(i,o,s){r[++n]=e(i,o,s)}),r}function b(t,e){return(B(t)?An:za)(t,bt(e))}function gt(t,e){return Fr(b(t,e))}var _i,Va=Object.prototype.hasOwnProperty,Ha=(_i=function(t,e,n){Va.call(t,n)?t[n].push(e):kr(t,n,[e])},function(t,e){return(B(t)?ja:Ba)(t,_i,bt(e),{})}),Ya=Object.prototype.hasOwnProperty;function Xa(t,e){return t!=null&&Ya.call(t,e)}function P(t,e){return t!=null&&Qo(t,e,Xa)}function ut(t){return typeof t=="string"||!B(t)&&vt(t)&&Zt(t)=="[object String]"}function Q(t){return t==null?[]:(function(e,n){return An(n,function(r){return e[r]})})(t,Nt(t))}var qa=Math.max;function at(t,e,n,r){t=wt(t)?t:Q(t),n=n?In(n):0;var i=t.length;return n<0&&(n=qa(i+n,0)),ut(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Cr(t,e,n)>-1}function Li(t,e,n){return t!=null&&t.length?Cr(t,e,0):-1}var Za=Object.prototype.hasOwnProperty;function K(t){if(t==null)return!0;if(wt(t)&&(B(t)||typeof t=="string"||typeof t.splice=="function"||Pe(t)||wr(t)||Rn(t)))return!t.length;var e=Tt(t);if(e=="[object Map]"||e=="[object Set]")return!t.size;if($e(t))return!$o(t).length;for(var n in t)if(Za.call(t,n))return!1;return!0}var xi=Xt&&Xt.isRegExp,Gt=xi?vn(xi):function(t){return vt(t)&&Zt(t)=="[object RegExp]"};function Vt(t){return t===void 0}function Qa(t,e,n,r){if(!It(t))return t;for(var i=-1,o=(e=On(e,t)).length,s=o-1,a=t;a!=null&&++i<o;){var c=Me(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=s){var l=a[c];(u=void 0)==null&&(u=It(l)?l:Nn(e[i+1])?[]:{})}yn(a,c,u),a=a[c]}return t}function St(t,e){if(t==null)return{};var n=An(Ho(t,Wo,Sa),function(r){return[r]});return e=bt(e),(function(r,i,o){for(var s=-1,a=i.length,c={};++s<a;){var u=i[s],l=lr(r,u);o(l,u)&&Qa(c,On(u,r),l)}return c})(t,n,function(r,i){return e(r,i[0])})}function Ja(t,e,n,r,i){return i(t,function(o,s,a){n=r?(r=!1,o):e(n,o,s,a)}),n}function ft(t,e,n){var r=B(t)?va:Ja,i=arguments.length<3;return r(t,bt(e),n,i,se)}function Je(t,e){return(B(t)?Dr:ts)(t,(function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}})(bt(e)))}function tc(t,e){var n;return se(t,function(r,i,o){return!(n=e(r,i,o))}),!!n}function es(t,e,n){return(B(t)?Zo:tc)(t,bt(e))}var ec=he&&1/$r(new he([,-0]))[1]==1/0?function(t){return new he(t)}:Z;function Er(t){return t&&t.length?(function(e){var n=-1,r=wo,i=e.length,o=!0,s=[],a=s;if(i>=200){var c=ec(e);if(c)return $r(c);o=!1,r=Br,a=new fe}else a=s;t:for(;++n<i;){var u=e[n],l=u;if(u=u!==0?u:0,o&&l==l){for(var h=a.length;h--;)if(a[h]===l)continue t;s.push(u)}else r(a,l,void 0)||(a!==s&&a.push(l),s.push(u))}return s})(t):[]}function gr(t){console&&console.error&&console.error(`Error: ${t}`)}function ns(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function rs(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function is(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}function nc(t){return ut((e=t).LABEL)&&e.LABEL!==""?t.LABEL:t.name;var e}class Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),M(this.definition,n=>{n.accept(e)})}}class pt extends Mt{constructor(e){super([]),this.idx=1,dt(this,St(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Ee extends Mt{constructor(e){super(e.definition),this.orgText="",dt(this,St(e,n=>n!==void 0))}}class ht extends Mt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,dt(this,St(e,n=>n!==void 0))}}class lt extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ut extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Ft extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class J extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class _t extends Mt{constructor(e){super(e.definition),this.idx=1,dt(this,St(e,n=>n!==void 0))}}class Lt extends Mt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,dt(this,St(e,n=>n!==void 0))}}class V{constructor(e){this.idx=1,dt(this,St(e,n=>n!==void 0))}accept(e){e.visit(this)}}function tn(t){function e(n){return b(n,tn)}if(t instanceof pt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ut(t.label)&&(n.label=t.label),n}if(t instanceof ht)return{type:"Alternative",definition:e(t.definition)};if(t instanceof lt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Ut)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ft)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionWithSeparator",idx:t.idx,separator:tn(new V({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof J)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Lt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof V){const n={type:"Terminal",name:t.terminalType.name,label:nc(t.terminalType),idx:t.idx};ut(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=Gt(r)?r.source:r),n}if(t instanceof Ee)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class ge{visit(e){const n=e;switch(n.constructor){case pt:return this.visitNonTerminal(n);case ht:return this.visitAlternative(n);case lt:return this.visitOption(n);case Ut:return this.visitRepetitionMandatory(n);case Ft:return this.visitRepetitionMandatoryWithSeparator(n);case _t:return this.visitRepetitionWithSeparator(n);case J:return this.visitRepetition(n);case Lt:return this.visitAlternation(n);case V:return this.visitTerminal(n);case Ee:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function ln(t,e=[]){return t instanceof lt||t instanceof J||t instanceof _t||(t instanceof Lt?es(t.definition,n=>ln(n,e)):!(t instanceof pt&&at(e,t))&&t instanceof Mt&&(t instanceof pt&&e.push(t),Rt(t.definition,n=>ln(n,e))))}function Ct(t){if(t instanceof pt)return"SUBRULE";if(t instanceof lt)return"OPTION";if(t instanceof Lt)return"OR";if(t instanceof Ut)return"AT_LEAST_ONE";if(t instanceof Ft)return"AT_LEAST_ONE_SEP";if(t instanceof _t)return"MANY_SEP";if(t instanceof J)return"MANY";if(t instanceof V)return"CONSUME";throw Error("non exhaustive match")}class Sn{walk(e,n=[]){M(e.definition,(r,i)=>{const o=tt(e.definition,i+1);if(r instanceof pt)this.walkProdRef(r,o,n);else if(r instanceof V)this.walkTerminal(r,o,n);else if(r instanceof ht)this.walkFlat(r,o,n);else if(r instanceof lt)this.walkOption(r,o,n);else if(r instanceof Ut)this.walkAtLeastOne(r,o,n);else if(r instanceof Ft)this.walkAtLeastOneSep(r,o,n);else if(r instanceof _t)this.walkManySep(r,o,n);else if(r instanceof J)this.walkMany(r,o,n);else{if(!(r instanceof Lt))throw Error("non exhaustive match");this.walkOr(r,o,n)}})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new lt({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Ci(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);M(e.definition,o=>{const s=new ht({definition:[o]});this.walk(s,i)})}}function Ci(t,e,n){return[new lt({definition:[new V({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function xe(t){if(t instanceof pt)return xe(t.referencedRule);if(t instanceof V)return[t.terminalType];if((function(e){return e instanceof ht||e instanceof lt||e instanceof J||e instanceof Ut||e instanceof Ft||e instanceof _t||e instanceof V||e instanceof Ee})(t))return(function(e){let n=[];const r=e.definition;let i,o=0,s=r.length>o,a=!0;for(;s&&a;)i=r[o],a=ln(i),n=n.concat(xe(i)),o+=1,s=r.length>o;return Er(n)})(t);if((function(e){return e instanceof Lt})(t))return(function(e){return Er(yt(b(e.definition,n=>xe(n))))})(t);throw Error("non exhaustive match")}const os="_~IN~_";class rc extends Sn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=(o=e.referencedRule,s=e.idx,o.name+s+os+this.topProd.name);var o,s;const a=n.concat(r),c=xe(new ht({definition:a}));this.follows[i]=c}}function F(t){return t.charCodeAt(0)}function Bn(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function Ne(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function ae(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function ki(t){return t.type==="Character"}const hn=[];for(let t=F("0");t<=F("9");t++)hn.push(t);const fn=[F("_")].concat(hn);for(let t=F("a");t<=F("z");t++)fn.push(t);for(let t=F("A");t<=F("Z");t++)fn.push(t);const bi=[F(" "),F("\f"),F(`
7
7
  `),F("\r"),F(" "),F("\v"),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F(" "),F("\u2028"),F("\u2029"),F(" "),F(" "),F(" "),F("\uFEFF")],ic=/[0-9a-fA-F]/,Ve=/[0-9]/,oc=/[1-9]/;class Tr{visitChildren(e){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}let en={};const sc=new class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Ne(n,"global");break;case"i":Ne(n,"ignoreCase");break;case"m":Ne(n,"multiLine");break;case"u":Ne(n,"unicode");break;case"y":Ne(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}ae(e);const n=this.disjunction();return this.consumeChar(")"),{type:e,value:n,loc:this.loc(t)}}return(function(){throw Error("Internal Error - Should never get here!")})()}quantifier(t=!1){let e;const n=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:r,atMost:r};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),e={atLeast:r,atMost:i}):e={atLeast:r,atMost:1/0},this.consumeChar("}")}if(t===!0&&e===void 0)return;ae(e)}if(t!==!0||e!==void 0)return ae(e)?(this.peekChar(0)==="?"?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(n),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}if(t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),ae(t))return t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[F(`
8
8
  `),F("\r"),F("\u2028"),F("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=hn;break;case"D":t=hn,e=!0;break;case"s":t=bi;break;case"S":t=bi,e=!0;break;case"w":t=fn;break;case"W":t=fn,e=!0}if(ae(t))return{type:"Set",value:t,complement:e}}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=F("\f");break;case"n":t=F(`
9
9
  `);break;case"r":t=F("\r");break;case"t":t=F(" ");break;case"v":t=F("\v")}if(ae(t))return{type:"Character",value:t}}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:F("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:F(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -110,7 +110,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
110
110
  This error was thrown during the "grammar recording phase" For more info see:
111
111
  https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,e){return Re.call(this,lt,t,e)}atLeastOneInternalRecord(t,e){Re.call(this,Ut,e,t)}atLeastOneSepFirstInternalRecord(t,e){Re.call(this,Ft,e,t,oo)}manyInternalRecord(t,e){Re.call(this,J,e,t)}manySepFirstInternalRecord(t,e){Re.call(this,_t,e,t,oo)}orInternalRecord(t,e){return Uc.call(this,t,e)}subruleInternalRecord(t,e,n){if(En(e),!t||P(t,"ruleName")===!1){const s=new Error(`<SUBRULE${ao(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
112
112
  inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}const r=pe(this.recordingProdStack),i=t.ruleName,o=new pt({idx:e,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(o),this.outputCst?Mc:xn}consumeInternalRecord(t,e,n){if(En(e),!us(t)){const o=new Error(`<CONSUME${ao(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
113
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const r=pe(this.recordingProdStack),i=new V({idx:e,terminalType:t,label:n?.LABEL});return r.definition.push(i),vs}},class{initPerformanceTracer(t){if(P(t,"traceInitPerf")){const e=t.traceInitPerf,n=typeof e=="number";this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Kt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);const{time:r,value:i}=rs(e),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(n=>{if(n==="constructor")return;const r=Object.getOwnPropertyDescriptor(e,n);r&&(r.get||r.set)?Object.defineProperty(Yn.prototype,n,r):Yn.prototype[n]=t.prototype[n]})});class Fc extends De{constructor(e,n=Kt){const r=et(n);r.outputCst=!1,super(e,r)}}const Dc=D({name:"WhiteSpace",pattern:/\s+/,group:ot.SKIPPED}),Os=D({name:"String",pattern:/"(""|[^"])*"/}),jc=D({name:"SingleQuotedString",pattern:/'(''|[^'])*'/}),Bc=D({name:"SheetQuoted",pattern:/'((?![\\/[\]*?:]).)+?'!/}),$c=D({name:"FunctionToken",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\(/}),Ss=D({name:"NamedTableReference",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\[/}),Wc=D({name:"BracketedString",pattern:/\[([^[\]]*)\]/,longer_alt:[Ss,Os]}),_s=D({name:"LiteralError",pattern:/#PARSE!|#NULL!|#DIV\/0!|#VALUE!|#NUM!|#FIELD!|#N\/A|#GETTING_DATA|#SPILL!|#CONNECT!|#BLOCKED!|#UNKNOWN!|#FIELD!|#CALC!|#BUSY!|#PYTHON!|#TIMEOUT!/}),Ls=D({name:"RefError",pattern:/#REF!|#NAME\?/}),Gc=D({name:"Sheet",pattern:/[A-Za-z_.\d\u007F-\uFFFF]+!/}),Kc=/^[a-zA-Z_][a-zA-Z0-9_.?]*:?/,Cn=D({name:"Name",pattern:{exec:(t,e)=>{try{const n=Kc.exec(t.substring(e));if(n){const r=n[0];if(r.endsWith(":")){const i=r.length;return r[i-2]==="."?[r.substring(0,i-2)]:[r.substring(0,i-1)]}return[r]}}catch(n){console.warn("Error parsing name",n)}return null}},line_breaks:!1,start_chars_hint:(()=>{const t=[];for(let e=65;e<=90;e++)t.push(e);for(let e=97;e<=122;e++)t.push(e);for(let e=48;e<=57;e++)t.push(e);return t})()}),zc=D({name:"Cell",pattern:/[$]?[A-Za-z]{1,3}[$]?[1-9][0-9]*/,longer_alt:Cn}),Vc=D({name:"Column",pattern:/[$]?[A-Za-z]{1,3}/,longer_alt:Cn}),Hc=D({name:"AbsRow",pattern:/[$][0-9]+/,longer_alt:Cn}),Yc=D({name:"NumberToken",pattern:/[0-9]+[.]?[0-9]*([eE][+-][0-9]+)?/}),Xc=D({name:"Boolean",pattern:/TRUE|FALSE/i}),qc=D({name:"Comma",pattern:/,/}),Zc=D({name:"RangeUnion",pattern:/:/}),Qc=D({name:"RangeTrimFull",pattern:/\.:\./}),Jc=D({name:"RangeTrimLeading",pattern:/\.:/}),tu=D({name:"RangeTrimTrailing",pattern:/:\./}),eu=D({name:"Semicolon",pattern:/;/}),nu=D({name:"OpenParen",pattern:/\(/}),ru=D({name:"CloseParen",pattern:/\)/}),iu=D({name:"OpenSquareParen",pattern:/\[/}),ou=D({name:"CloseSquareParen",pattern:/]/});D({name:"exclamationMark",pattern:/!/});const su=D({name:"OpenCurlyParen",pattern:/{/}),au=D({name:"CloseCurlyParen",pattern:/}/}),cu=D({name:"QuoteS",pattern:/'/}),co=D({name:"MulOp",pattern:/\*/}),uu=D({name:"PlusOp",pattern:/\+/}),lu=D({name:"DivOp",pattern:/\//}),hu=D({name:"MinOp",pattern:/-/}),fu=D({name:"ImplicitIntersectOp",pattern:/@/}),du=D({name:"ConcatOp",pattern:/&/}),pu=D({name:"ExOp",pattern:/\^/}),mu=D({name:"PercentOp",pattern:/%/}),xs=D({name:"TableSpecifier",pattern:/#(All|Data|Headers|Totals|This Row)/i}),Eu=D({name:"ArrayAnchorOp",pattern:/#/,longer_alt:[xs,_s,Ls]}),gu=D({name:"GtOp",pattern:/>/}),Tu=D({name:"EqOp",pattern:/=/}),Au=D({name:"LtOp",pattern:/</}),Cs=[Dc,Os,Bc,jc,$c,Ss,Wc,_s,Ls,Gc,zc,Xc,Vc,Hc,xs,Eu,fu,Cn,Yc,qc,Qc,Jc,tu,Zc,eu,nu,ru,iu,ou,su,au,cu,co,uu,lu,hu,du,pu,co,mu,D({name:"NeqOp",pattern:/<>/}),D({name:"GteOp",pattern:/>=/}),D({name:"LteOp",pattern:/<=/}),gu,Tu,Au],Iu=new ot(Cs,{ensureOptimizations:!0}),Gr={};Cs.forEach(t=>{Gr[t.name]=t});const qt={boolean:3,string:2,number:1},Nu=(t,e)=>{let n=t+e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},yu=(t,e)=>{let n=t-e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},ks=(t,e)=>{let n=t*e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},bs=(t,e)=>{if(e===0)return 1/0;let n=t/e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},Ru=(t,e)=>{const n=t**e;return isFinite(n)?n:Number.NaN},vu=(t="",e="")=>(t===null&&(t=""),e===null&&(e=""),typeof t=="boolean"&&(t=t?"TRUE":"FALSE"),typeof e=="boolean"&&(e=e?"TRUE":"FALSE"),""+t+e),Ou=(t=null,e=null)=>typeof t==typeof e&&t===e,Su=(t=null,e=null)=>typeof t!=typeof e||t!==e,_u=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>e:qt[n]>qt[r]},Lu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>=e:qt[n]>=qt[r]},xu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<e:qt[n]<qt[r]},Cu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<=e:qt[n]<=qt[r]},ku={type:_.M.Number,coerce:!0,includeBoolean:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},bu={type:_.M.String,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},Ps={type:null,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},le=(t,e,n,r)=>{if(e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),typeof e=="number"&&typeof n=="number")return r(e,n);let i,o;return e?.isIRange?i=e:n?.isIRange&&(o=n),i||o?(i||(i=t.getRange(e)),i.broadcast(n,r,ku).fillEmpty(0)):(e=_.Ye(e,_.we(e,!0),_.M.Number,!0,!1),n=_.Ye(n,_.we(n,!0),_.M.Number,!0,!1),e instanceof _.n.Value?e:n instanceof _.n.Value?n:r(e,n))},ce=(t,e,n,r)=>{let i,o;return e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),e?.isIRange?(i=e,o=n):n?.isIRange&&(i=n,o=e),i?i.broadcast(o,r,Ps):r(e,n)},uo=(t,e)=>{e==null&&(e=0);let n,r=1;if(t==="+")return e;if(t!=="-")throw new _.n.Value(`Unrecognized prefix: ${t}`);return r=-r,e?.isIRange&&(n=e),n?n.broadcast(r,ks,Ps):typeof(e=_.Ye(e,_.we(e,!0),_.M.Number))!="number"||isNaN(e)?_.n.BuiltIn.Value:e*r},ve=(t,e,n,r)=>{if(!e||(e.isIReferenceRange&&(e=e.getCoords()),e.colStart===void 0)||(n.isIReferenceRange&&(n=n.getCoords()),n.colStart===void 0))return _.n.BuiltIn.Ref;const i=r(e,n);return i?t.getReference(i):_.n.BuiltIn.Null},Pu={"+":(t,e,n)=>le(t,e,n,Nu),"-":(t,e,n)=>le(t,e,n,yu),"*":(t,e,n)=>le(t,e,n,ks),"/":(t,e,n)=>le(t,e,n,bs),"^":(t,e,n)=>le(t,e,n,Ru)," ":(t,e,n,r)=>ve(t,e,n,_.Ht.intersectRanges),":":(t,e,n,r)=>ve(t,e,n,_.Ht.unionRanges),".:.":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,3,3)},".:":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,1,1)},":.":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,2,2)},"&":(t,e,n)=>((r,i,o,s)=>{if(i!==null&&i.colStart!==void 0&&(i=r.getValueAt(i.rowStart,i.colStart)),o!==null&&o.colStart!==void 0&&(o=r.getValueAt(o.rowStart,o.colStart)),typeof i=="string"&&typeof o=="string")return s(i,o);let a,c;return i?.isIRange?a=i:o?.isIRange&&(c=o),a||c?(a||(a=r.getRange(i)),a.broadcast(o,s,bu)):s(i=_.Ye(i,_.we(i,!0),_.M.String),o=_.Ye(o,_.we(o,!0),_.M.String))})(t,e,n,vu),"=":(t,e,n)=>ce(t,e,n,Ou),"<>":(t,e,n)=>ce(t,e,n,Su),">":(t,e,n)=>ce(t,e,n,_u),"<":(t,e,n)=>ce(t,e,n,xu),">=":(t,e,n)=>ce(t,e,n,Lu),"<=":(t,e,n)=>ce(t,e,n,Cu)},wu={"-":(t,e)=>uo("-",e),"+":(t,e)=>uo("+",e),"@":(t,e)=>{if(!e||!e.isIReferenceRange)return e;const n=e.getCoords(),r=e,i=t.getPosition(),o=r.getHeight(),s=r.getWidth();if(s>1&&o>1)return _.n.BuiltIn.Value;if(o>1){const a=i.rowIndex-n.rowStart;if(a>=0&&a<o)return r.getValueAt(a,0)}else{if(!(s>1))return r.getValueAt(0,0);{const a=i.colIndex-n.colStart;if(a>=0&&a<s)return r.getValueAt(0,a)}}return _.n.BuiltIn.Value}},Mu={"%":(t,e)=>le(t,e,100,bs),"#":(t,e)=>t.getSpillAt(e.rowStart,e.colStart)||_.n.BuiltIn.Ref};function lo(t){const e=(t=t.toUpperCase()).length;let n=0;for(let r=0;r<e;r++){const i=t.charCodeAt(r);isNaN(i)||(n+=(i-64)*26**(e-r-1))}return n}function Xn(t){return{type:"cell",value:Object.freeze({colIndex:t.colIndex,rowIndex:t.rowIndex,$colIndex:t.$colIndex||!1,$rowIndex:t.$rowIndex||!1}),inputs:null,isReference:!0}}function ho(t,e){const n=t.startsWith("$");n&&(t=t.substring(1));let r=parseInt(t)-1;return n||r===Number.MIN_SAFE_INTEGER||(r-=e.colIndex),{type:"cell",value:Object.freeze({colIndex:Number.MIN_SAFE_INTEGER,$colIndex:!1,rowIndex:r,$rowIndex:n}),inputs:null,isReference:!0}}function fo(t,e){return{type:"function",value:t=t.toUpperCase(),inputs:e}}function qn(t,e){return{type:"tableReference",value:t,inputs:e}}function Zn(t){return{type:"tableSpecifier",value:t,inputs:null,isReference:!0}}function Lr(t,e,n,r=!1){const i={type:"infix",value:t,inputs:[e,n]};return r&&(i.isReference=!0),i}function Qn(t,e,n=!1){const r={type:"postfix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function _e(t,e,n=!1){const r={type:"prefix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function Jn(t){return{type:"named",value:t,inputs:null,isReference:!0}}function po(t){return{type:"number",value:Number(t),isLiteral:!0}}function tr(t){let e=t;const n=t&&t.length>1&&t[0]==='"'&&t[t.length-1]==='"';return n&&(e=t.substring(1,t.length-1)),{type:n?"quotedString":"string",value:e,isLiteral:!0}}function mo(t){return{type:"boolean",value:t==="TRUE"||t.toUpperCase()==="TRUE",isLiteral:!0}}function Eo(t){return{type:"error",value:_.n.getBuiltInByLabel(t.toUpperCase()),isLiteral:!0}}function gn(t){return{type:"error",value:t?_.n.getBuiltInByLabel(t.toUpperCase()):_.n.BuiltIn.Ref,inputs:null,isReference:!0}}function je(t,e){return(function n(r,i){const o=r.inputs;let s;if(o){const u=o.length;for(let l=0;l<u;l++){const h=o[l],N=n(h,r);N!==h&&(s||(s=[...o]),s[l]=N)}}const a=s?{...r,inputs:s}:r,c=e(a,i);return c===void 0?a:c})(t,void 0)||this}function sn(t,e){let n=0,r=je(t,g=>{const A={...g};return A.evalIndex=n++,A});const i=new Array(n),o=new Set,s=new Map;let a;const c=new Map,u=[],l=[];r=je(r,(g,A)=>{const v=g.type,f=g.evalIndex;if(i[f]=null,g.isReference){const d=g,I={node:g,index:c.size,op:null,value:null,inputs:null};if(c.set(d,I),v==="cell"){const E=d.value;return E.$colIndex&&(I.hasHorizontalAbs=!0),E.$rowIndex&&(I.hasVerticalAbs=!0),I.value=s.size,s.set(d,s.size),o.add(I),g.refIndex=l.length,void l.push(I.index)}if(v==="infix"||v==="prefix"||v==="postfix"||v==="spill"){const E=d.inputs,R=E.length,U=g.value;I.op=U;const x=new Array(R);I.inputs=x;for(let O=0;O<R;O++){const w=E[O],C=c.get(w);C&&(C.hasHorizontalAbs&&(I.hasHorizontalAbs=!0),C.hasVerticalAbs&&(I.hasVerticalAbs=!0)),x[O]=C?C.index:-1,o.delete(C)}if(o.add(I),ws.includes(U)){const O=E[0],w=!!O&&O.type==="cell",C=E[1],k=!!C&&C.type==="cell";w&&k&&(l.splice(C.refIndex,1),C.refIndex=O.refIndex,g.refIndex=O.refIndex,l[O.refIndex]=I.index)}else U==="#"&&(g.refIndex=E[0].refIndex);return void u.push(g)}if(v==="error"||v==="named"){a||(a=new Map);const E=d.value;let R=a.get(E);return I.op=v,R===void 0&&(R=a.size,a.set(E,R)),I.value=R,o.add(I),g.refIndex=l.length,void l.push(I.index)}v==="tableReference"&&(I.op=v),v==="tableSpecifier"&&(I.op=v),v==="structuredArg"&&(I.op=v)}else if(A&&A.isReference){const d=g,I={node:g,index:c.size,op:"function",value:g.value,inputs:null};c.set(d,I)}if(g.isLiteral)if(v!=="array")i[f]=g.value;else{const d=g.value,I=d.length,E=new Array(I);for(let R=0;R<I;R++){const U=d[R].value,x=U.length,O=new Array(x);for(let w=0;w<x;w++){const C=U[w];let k=C.value;if(C.type==="prefix"){const $=C.value;k=C.inputs[0].value,$==="-"&&(k=-k)}O[w]=k}E[R]=O}i[f]=_.b0(E)}else{if(v!=="empty")return u.push(g),g;i[f]=void 0}});const h=new Array(s.size);s.forEach((g,A)=>{const v=A.value,f=v.colIndex,d=v.rowIndex,I=v.$colIndex,E=v.$rowIndex,R={colStart:f,rowStart:d,colEnd:f,rowEnd:d,$colStart:I,$rowStart:E,$colEnd:I,$rowEnd:E};f===Number.MIN_SAFE_INTEGER&&(R.colEnd=Number.MAX_SAFE_INTEGER),d===Number.MIN_SAFE_INTEGER&&(R.rowEnd=Number.MAX_SAFE_INTEGER),v.sheetName&&(R.sheetName=v.sheetName),h[g]=R});const N=h.length,S=new Array(N);for(let g=0;g<N;g++)S[g]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const L=new Array(c.size);let m;c.forEach(g=>{L[g.index]=g}),a&&(m=[],a.forEach((g,A)=>{m.push(A)}));const y=[];o.forEach(g=>{y.push(g.index)});const p=u.length;for(let g=0;g<p;g++){const A=u[g],v=A.type;if(v==="infix"){const f=A.value;A.fn=Pu[f]}else if(v==="prefix"){const f=A.value;A.fn=wu[f]}else if(v==="postfix"){const f=A.value;A.fn=Mu[f]}}const T=(function(g){const A=[],v=(I,E)=>{const R={type:I.type,value:I.value};I.evalIndex!==void 0&&(R.evalIndex=I.evalIndex),I.refIndex!==void 0&&(R.refIndex=I.refIndex),E&&(R.ctx=E),A.push(R)},f=(I,E,R,U)=>{if(E==null||A.length>1&&I==="whitespace"&&A[A.length-1].type==="whitespace")return;const x={type:I,value:E};R&&(x.ctx=R),U!==void 0&&(x.evalIndex=U),A.push(x)};(function I(E,R,U){const x=E.evalIndex??U??0,O=E.type,w=(C,k,$)=>{if(!C)return;const X=C.length;for(let W=0;W<X;W++)I(C[W],k,$),W<X-1&&f("comma",",",k)};if(E.isLiteral){if(f("whitespace",E.wsBefore,R),O==="array"){f("type","{",R);const C=E.value,k=C.length;for(let $=0;$<k;$++){const X=C[$],W=X.value,rt=W.length;for(let mt=0;mt<rt;mt++){const xt=W[mt];f("whitespace",xt.wsBefore,R),I(xt,R,x),f("whitespace",xt.wsAfter,R),mt<rt-1&&f("comma",",",R)}$<k-1&&(f("whitespace",X.wsBefore,R),f("comma",";",R),f("whitespace",X.wsAfter,R))}E.error||f("type","}",R)}else O==="quotedString"&&(E={type:O,value:'"'+E.value+'"'}),v(E,R);f("whitespace",E.wsAfter,R)}else if(O==="infix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[1],R,x);else if(O==="prefix")f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[0],R,x);else if(O==="postfix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R);else{f("whitespace",E.wsBefore,R);const C=E.inputs;switch(O){case"function":v(E,R);const k={name:String(E.value),argIndex:-1};if(f("paren","(",k,E.evalIndex),C){const X=C.length;for(let W=0;W<X;W++){const rt={...k,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren",")",k,E.evalIndex);break;case"cell":v(E,R);break;case"paren":f(O,"(",R,x),w(C,R,x),E.error||f(O,")",R,x);break;case"squareParen":f(O,"[",R,x),w(C,R,x),E.error||f(O,"]",R,x);break;case"tableReference":v(E,R);const $={name:String(E.value),argIndex:-1};if(f("paren","[",$),C){const X=C.length;for(let W=0;W<X;W++){const rt={...$,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren","]",$);break;default:E.value!==void 0&&v(E,R),C&&C.forEach(X=>I(X,R,x))}f("whitespace",E.wsAfter,R)}})(g);const d=A.length;for(let I=0;I<d;I++){const E=A[I];if(E.type==="whitespace"&&E.evalIndex===void 0){const R=A[I+1];R&&R.evalIndex!==void 0&&(E.evalIndex=R.evalIndex)}}return A})(r);return{ast:r,evaluations:i,executions:u,precedentsAbsolute:S,precedentsExecute:L,precedentsNamed:m,precedentsRelative:h,precedentsRoot:y,references:l,tokens:T,error:e}}function go(t,e){let n,r=-1,i="";Number.isSafeInteger(t.previousToken?.startLine)?(r=t.previousToken.startLine,n=t.previousToken.endColumn+1):Number.isSafeInteger(t.token?.startLine)&&(r=t.token.startLine,n=t.token.startColumn),r!==-1?(i+=`
113
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const r=pe(this.recordingProdStack),i=new V({idx:e,terminalType:t,label:n?.LABEL});return r.definition.push(i),vs}},class{initPerformanceTracer(t){if(P(t,"traceInitPerf")){const e=t.traceInitPerf,n=typeof e=="number";this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Kt.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);const{time:r,value:i}=rs(e),o=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${t}> time: ${r}ms`),this.traceInitIndent--,i}return e()}}].forEach(t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach(n=>{if(n==="constructor")return;const r=Object.getOwnPropertyDescriptor(e,n);r&&(r.get||r.set)?Object.defineProperty(Yn.prototype,n,r):Yn.prototype[n]=t.prototype[n]})});class Fc extends De{constructor(e,n=Kt){const r=et(n);r.outputCst=!1,super(e,r)}}const Dc=D({name:"WhiteSpace",pattern:/\s+/,group:ot.SKIPPED}),Os=D({name:"String",pattern:/"(""|[^"])*"/}),jc=D({name:"SingleQuotedString",pattern:/'(''|[^'])*'/}),Bc=D({name:"SheetQuoted",pattern:/'((?![\\/[\]*?:]).)+?'!/}),$c=D({name:"FunctionToken",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\(/}),Ss=D({name:"NamedTableReference",pattern:/[A-Za-z_]+[A-Za-z_0-9.]*\[/}),Wc=D({name:"BracketedString",pattern:/\[([^[\]]*)\]/,longer_alt:[Ss,Os]}),_s=D({name:"LiteralError",pattern:/#PARSE!|#NULL!|#DIV\/0!|#VALUE!|#NUM!|#FIELD!|#N\/A|#GETTING_DATA|#SPILL!|#CONNECT!|#BLOCKED!|#UNKNOWN!|#FIELD!|#CALC!|#BUSY!|#PYTHON!|#TIMEOUT!/}),Ls=D({name:"RefError",pattern:/#REF!|#NAME\?/}),Gc=D({name:"Sheet",pattern:/[A-Za-z_.\d\u007F-\uFFFF]+!/}),Kc=/^[a-zA-Z_][a-zA-Z0-9_.?]*:?/,Cn=D({name:"Name",pattern:{exec:(t,e)=>{try{const n=Kc.exec(t.substring(e));if(n){const r=n[0];if(r.endsWith(":")){const i=r.length;return r[i-2]==="."?[r.substring(0,i-2)]:[r.substring(0,i-1)]}return[r]}}catch(n){console.warn("Error parsing name",n)}return null}},line_breaks:!1,start_chars_hint:(()=>{const t=[];for(let e=65;e<=90;e++)t.push(e);for(let e=97;e<=122;e++)t.push(e);for(let e=48;e<=57;e++)t.push(e);return t})()}),zc=D({name:"Cell",pattern:/[$]?[A-Za-z]{1,3}[$]?[1-9][0-9]*/,longer_alt:Cn}),Vc=D({name:"Column",pattern:/[$]?[A-Za-z]{1,3}/,longer_alt:Cn}),Hc=D({name:"AbsRow",pattern:/[$][0-9]+/,longer_alt:Cn}),Yc=D({name:"NumberToken",pattern:/[0-9]+[.]?[0-9]*([eE][+-][0-9]+)?/}),Xc=D({name:"Boolean",pattern:/TRUE|FALSE/i}),qc=D({name:"Comma",pattern:/,/}),Zc=D({name:"RangeUnion",pattern:/:/}),Qc=D({name:"RangeTrimFull",pattern:/\.:\./}),Jc=D({name:"RangeTrimLeading",pattern:/\.:/}),tu=D({name:"RangeTrimTrailing",pattern:/:\./}),eu=D({name:"Semicolon",pattern:/;/}),nu=D({name:"OpenParen",pattern:/\(/}),ru=D({name:"CloseParen",pattern:/\)/}),iu=D({name:"OpenSquareParen",pattern:/\[/}),ou=D({name:"CloseSquareParen",pattern:/]/});D({name:"exclamationMark",pattern:/!/});const su=D({name:"OpenCurlyParen",pattern:/{/}),au=D({name:"CloseCurlyParen",pattern:/}/}),cu=D({name:"QuoteS",pattern:/'/}),co=D({name:"MulOp",pattern:/\*/}),uu=D({name:"PlusOp",pattern:/\+/}),lu=D({name:"DivOp",pattern:/\//}),hu=D({name:"MinOp",pattern:/-/}),fu=D({name:"ImplicitIntersectOp",pattern:/@/}),du=D({name:"ConcatOp",pattern:/&/}),pu=D({name:"ExOp",pattern:/\^/}),mu=D({name:"PercentOp",pattern:/%/}),xs=D({name:"TableSpecifier",pattern:/#(All|Data|Headers|Totals|This Row)/i}),Eu=D({name:"ArrayAnchorOp",pattern:/#/,longer_alt:[xs,_s,Ls]}),gu=D({name:"GtOp",pattern:/>/}),Tu=D({name:"EqOp",pattern:/=/}),Au=D({name:"LtOp",pattern:/</}),Cs=[Dc,Os,Bc,jc,$c,Ss,Wc,_s,Ls,Gc,zc,Xc,Vc,Hc,xs,Eu,fu,Cn,Yc,qc,Qc,Jc,tu,Zc,eu,nu,ru,iu,ou,su,au,cu,co,uu,lu,hu,du,pu,co,mu,D({name:"NeqOp",pattern:/<>/}),D({name:"GteOp",pattern:/>=/}),D({name:"LteOp",pattern:/<=/}),gu,Tu,Au],Iu=new ot(Cs,{ensureOptimizations:!0}),Gr={};Cs.forEach(t=>{Gr[t.name]=t});const qt={boolean:3,string:2,number:1},Nu=(t,e)=>{let n=t+e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},yu=(t,e)=>{let n=t-e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},ks=(t,e)=>{let n=t*e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},bs=(t,e)=>{if(e===0)return 1/0;let n=t/e;return n=Math.abs(n)<99e-14?0:n,isFinite(n)?n:Number.NaN},Ru=(t,e)=>{const n=t**e;return isFinite(n)?n:Number.NaN},vu=(t="",e="")=>(t===null&&(t=""),e===null&&(e=""),typeof t=="boolean"&&(t=t?"TRUE":"FALSE"),typeof e=="boolean"&&(e=e?"TRUE":"FALSE"),""+t+e),Ou=(t=null,e=null)=>typeof t==typeof e&&t===e,Su=(t=null,e=null)=>typeof t!=typeof e||t!==e,_u=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>e:qt[n]>qt[r]},Lu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t>=e:qt[n]>=qt[r]},xu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<e:qt[n]<qt[r]},Cu=(t=null,e=null)=>{const n=typeof t,r=typeof e;return n===r?t<=e:qt[n]<=qt[r]},ku={type:_.M.Number,coerce:!0,includeBoolean:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},bu={type:_.M.String,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},Ps={type:null,coerce:!0,includeMistyped:!0,mismatchFill:_.n.BuiltIn.NA},le=(t,e,n,r)=>{if(e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),typeof e=="number"&&typeof n=="number")return r(e,n);let i,o;return e?.isIRange?i=e:n?.isIRange&&(o=n),i||o?(i||(i=t.getRange(e)),i.broadcast(n,r,ku).fillEmpty(0)):(e=_.on(e,_.Ce$1(e,!0),_.M.Number,!0,!1),n=_.on(n,_.Ce$1(n,!0),_.M.Number,!0,!1),e instanceof _.n.Value?e:n instanceof _.n.Value?n:r(e,n))},ce=(t,e,n,r)=>{let i,o;return e!==null&&e.colStart!==void 0&&(e=t.getValueAt(e.rowStart,e.colStart)),n!==null&&n.colStart!==void 0&&(n=t.getValueAt(n.rowStart,n.colStart)),e?.isIRange?(i=e,o=n):n?.isIRange&&(i=n,o=e),i?i.broadcast(o,r,Ps):r(e,n)},uo=(t,e)=>{e==null&&(e=0);let n,r=1;if(t==="+")return e;if(t!=="-")throw new _.n.Value(`Unrecognized prefix: ${t}`);return r=-r,e?.isIRange&&(n=e),n?n.broadcast(r,ks,Ps):typeof(e=_.on(e,_.Ce$1(e,!0),_.M.Number))!="number"||isNaN(e)?_.n.BuiltIn.Value:e*r},ve=(t,e,n,r)=>{if(!e||(e.isIReferenceRange&&(e=e.getCoords()),e.colStart===void 0)||(n.isIReferenceRange&&(n=n.getCoords()),n.colStart===void 0))return _.n.BuiltIn.Ref;const i=r(e,n);return i?t.getReference(i):_.n.BuiltIn.Null},Pu={"+":(t,e,n)=>le(t,e,n,Nu),"-":(t,e,n)=>le(t,e,n,yu),"*":(t,e,n)=>le(t,e,n,ks),"/":(t,e,n)=>le(t,e,n,bs),"^":(t,e,n)=>le(t,e,n,Ru)," ":(t,e,n,r)=>ve(t,e,n,_.Ht.intersectRanges),":":(t,e,n,r)=>ve(t,e,n,_.Ht.unionRanges),".:.":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,3,3)},".:":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,1,1)},":.":(t,e,n,r)=>{const i=ve(t,e,n,_.Ht.unionRanges);return t.getFunction("TRIMRANGE").execute(i,2,2)},"&":(t,e,n)=>((r,i,o,s)=>{if(i!==null&&i.colStart!==void 0&&(i=r.getValueAt(i.rowStart,i.colStart)),o!==null&&o.colStart!==void 0&&(o=r.getValueAt(o.rowStart,o.colStart)),typeof i=="string"&&typeof o=="string")return s(i,o);let a,c;return i?.isIRange?a=i:o?.isIRange&&(c=o),a||c?(a||(a=r.getRange(i)),a.broadcast(o,s,bu)):s(i=_.on(i,_.Ce$1(i,!0),_.M.String),o=_.on(o,_.Ce$1(o,!0),_.M.String))})(t,e,n,vu),"=":(t,e,n)=>ce(t,e,n,Ou),"<>":(t,e,n)=>ce(t,e,n,Su),">":(t,e,n)=>ce(t,e,n,_u),"<":(t,e,n)=>ce(t,e,n,xu),">=":(t,e,n)=>ce(t,e,n,Lu),"<=":(t,e,n)=>ce(t,e,n,Cu)},wu={"-":(t,e)=>uo("-",e),"+":(t,e)=>uo("+",e),"@":(t,e)=>{if(!e||!e.isIReferenceRange)return e;const n=e.getCoords(),r=e,i=t.getPosition(),o=r.getHeight(),s=r.getWidth();if(s>1&&o>1)return _.n.BuiltIn.Value;if(o>1){const a=i.rowIndex-n.rowStart;if(a>=0&&a<o)return r.getValueAt(a,0)}else{if(!(s>1))return r.getValueAt(0,0);{const a=i.colIndex-n.colStart;if(a>=0&&a<s)return r.getValueAt(0,a)}}return _.n.BuiltIn.Value}},Mu={"%":(t,e)=>le(t,e,100,bs),"#":(t,e)=>t.getSpillAt(e.rowStart,e.colStart)||_.n.BuiltIn.Ref};function lo(t){const e=(t=t.toUpperCase()).length;let n=0;for(let r=0;r<e;r++){const i=t.charCodeAt(r);isNaN(i)||(n+=(i-64)*26**(e-r-1))}return n}function Xn(t){return{type:"cell",value:Object.freeze({colIndex:t.colIndex,rowIndex:t.rowIndex,$colIndex:t.$colIndex||!1,$rowIndex:t.$rowIndex||!1}),inputs:null,isReference:!0}}function ho(t,e){const n=t.startsWith("$");n&&(t=t.substring(1));let r=parseInt(t)-1;return n||r===Number.MIN_SAFE_INTEGER||(r-=e.colIndex),{type:"cell",value:Object.freeze({colIndex:Number.MIN_SAFE_INTEGER,$colIndex:!1,rowIndex:r,$rowIndex:n}),inputs:null,isReference:!0}}function fo(t,e){return{type:"function",value:t=t.toUpperCase(),inputs:e}}function qn(t,e){return{type:"tableReference",value:t,inputs:e}}function Zn(t){return{type:"tableSpecifier",value:t,inputs:null,isReference:!0}}function Lr(t,e,n,r=!1){const i={type:"infix",value:t,inputs:[e,n]};return r&&(i.isReference=!0),i}function Qn(t,e,n=!1){const r={type:"postfix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function _e(t,e,n=!1){const r={type:"prefix",value:t,inputs:[e]};return n&&(r.isReference=!0),r}function Jn(t){return{type:"named",value:t,inputs:null,isReference:!0}}function po(t){return{type:"number",value:Number(t),isLiteral:!0}}function tr(t){let e=t;const n=t&&t.length>1&&t[0]==='"'&&t[t.length-1]==='"';return n&&(e=t.substring(1,t.length-1)),{type:n?"quotedString":"string",value:e,isLiteral:!0}}function mo(t){return{type:"boolean",value:t==="TRUE"||t.toUpperCase()==="TRUE",isLiteral:!0}}function Eo(t){return{type:"error",value:_.n.getBuiltInByLabel(t.toUpperCase()),isLiteral:!0}}function gn(t){return{type:"error",value:t?_.n.getBuiltInByLabel(t.toUpperCase()):_.n.BuiltIn.Ref,inputs:null,isReference:!0}}function je(t,e){return(function n(r,i){const o=r.inputs;let s;if(o){const u=o.length;for(let l=0;l<u;l++){const h=o[l],N=n(h,r);N!==h&&(s||(s=[...o]),s[l]=N)}}const a=s?{...r,inputs:s}:r,c=e(a,i);return c===void 0?a:c})(t,void 0)||this}function sn(t,e){let n=0,r=je(t,g=>{const A={...g};return A.evalIndex=n++,A});const i=new Array(n),o=new Set,s=new Map;let a;const c=new Map,u=[],l=[];r=je(r,(g,A)=>{const v=g.type,f=g.evalIndex;if(i[f]=null,g.isReference){const d=g,I={node:g,index:c.size,op:null,value:null,inputs:null};if(c.set(d,I),v==="cell"){const E=d.value;return E.$colIndex&&(I.hasHorizontalAbs=!0),E.$rowIndex&&(I.hasVerticalAbs=!0),I.value=s.size,s.set(d,s.size),o.add(I),g.refIndex=l.length,void l.push(I.index)}if(v==="infix"||v==="prefix"||v==="postfix"||v==="spill"){const E=d.inputs,R=E.length,U=g.value;I.op=U;const x=new Array(R);I.inputs=x;for(let O=0;O<R;O++){const w=E[O],C=c.get(w);C&&(C.hasHorizontalAbs&&(I.hasHorizontalAbs=!0),C.hasVerticalAbs&&(I.hasVerticalAbs=!0)),x[O]=C?C.index:-1,o.delete(C)}if(o.add(I),ws.includes(U)){const O=E[0],w=!!O&&O.type==="cell",C=E[1],k=!!C&&C.type==="cell";w&&k&&(l.splice(C.refIndex,1),C.refIndex=O.refIndex,g.refIndex=O.refIndex,l[O.refIndex]=I.index)}else U==="#"&&(g.refIndex=E[0].refIndex);return void u.push(g)}if(v==="error"||v==="named"){a||(a=new Map);const E=d.value;let R=a.get(E);return I.op=v,R===void 0&&(R=a.size,a.set(E,R)),I.value=R,o.add(I),g.refIndex=l.length,void l.push(I.index)}v==="tableReference"&&(I.op=v),v==="tableSpecifier"&&(I.op=v),v==="structuredArg"&&(I.op=v)}else if(A&&A.isReference){const d=g,I={node:g,index:c.size,op:"function",value:g.value,inputs:null};c.set(d,I)}if(g.isLiteral)if(v!=="array")i[f]=g.value;else{const d=g.value,I=d.length,E=new Array(I);for(let R=0;R<I;R++){const U=d[R].value,x=U.length,O=new Array(x);for(let w=0;w<x;w++){const C=U[w];let k=C.value;if(C.type==="prefix"){const $=C.value;k=C.inputs[0].value,$==="-"&&(k=-k)}O[w]=k}E[R]=O}i[f]=_.c_(E)}else{if(v!=="empty")return u.push(g),g;i[f]=void 0}});const h=new Array(s.size);s.forEach((g,A)=>{const v=A.value,f=v.colIndex,d=v.rowIndex,I=v.$colIndex,E=v.$rowIndex,R={colStart:f,rowStart:d,colEnd:f,rowEnd:d,$colStart:I,$rowStart:E,$colEnd:I,$rowEnd:E};f===Number.MIN_SAFE_INTEGER&&(R.colEnd=Number.MAX_SAFE_INTEGER),d===Number.MIN_SAFE_INTEGER&&(R.rowEnd=Number.MAX_SAFE_INTEGER),v.sheetName&&(R.sheetName=v.sheetName),h[g]=R});const N=h.length,S=new Array(N);for(let g=0;g<N;g++)S[g]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const L=new Array(c.size);let m;c.forEach(g=>{L[g.index]=g}),a&&(m=[],a.forEach((g,A)=>{m.push(A)}));const y=[];o.forEach(g=>{y.push(g.index)});const p=u.length;for(let g=0;g<p;g++){const A=u[g],v=A.type;if(v==="infix"){const f=A.value;A.fn=Pu[f]}else if(v==="prefix"){const f=A.value;A.fn=wu[f]}else if(v==="postfix"){const f=A.value;A.fn=Mu[f]}}const T=(function(g){const A=[],v=(I,E)=>{const R={type:I.type,value:I.value};I.evalIndex!==void 0&&(R.evalIndex=I.evalIndex),I.refIndex!==void 0&&(R.refIndex=I.refIndex),E&&(R.ctx=E),A.push(R)},f=(I,E,R,U)=>{if(E==null||A.length>1&&I==="whitespace"&&A[A.length-1].type==="whitespace")return;const x={type:I,value:E};R&&(x.ctx=R),U!==void 0&&(x.evalIndex=U),A.push(x)};(function I(E,R,U){const x=E.evalIndex??U??0,O=E.type,w=(C,k,$)=>{if(!C)return;const X=C.length;for(let W=0;W<X;W++)I(C[W],k,$),W<X-1&&f("comma",",",k)};if(E.isLiteral){if(f("whitespace",E.wsBefore,R),O==="array"){f("type","{",R);const C=E.value,k=C.length;for(let $=0;$<k;$++){const X=C[$],W=X.value,rt=W.length;for(let mt=0;mt<rt;mt++){const xt=W[mt];f("whitespace",xt.wsBefore,R),I(xt,R,x),f("whitespace",xt.wsAfter,R),mt<rt-1&&f("comma",",",R)}$<k-1&&(f("whitespace",X.wsBefore,R),f("comma",";",R),f("whitespace",X.wsAfter,R))}E.error||f("type","}",R)}else O==="quotedString"&&(E={type:O,value:'"'+E.value+'"'}),v(E,R);f("whitespace",E.wsAfter,R)}else if(O==="infix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[1],R,x);else if(O==="prefix")f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R),I(E.inputs[0],R,x);else if(O==="postfix")I(E.inputs[0],R,x),f("whitespace",E.wsBefore,R),v(E,R),f("whitespace",E.wsAfter,R);else{f("whitespace",E.wsBefore,R);const C=E.inputs;switch(O){case"function":v(E,R);const k={name:String(E.value),argIndex:-1};if(f("paren","(",k,E.evalIndex),C){const X=C.length;for(let W=0;W<X;W++){const rt={...k,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren",")",k,E.evalIndex);break;case"cell":v(E,R);break;case"paren":f(O,"(",R,x),w(C,R,x),E.error||f(O,")",R,x);break;case"squareParen":f(O,"[",R,x),w(C,R,x),E.error||f(O,"]",R,x);break;case"tableReference":v(E,R);const $={name:String(E.value),argIndex:-1};if(f("paren","[",$),C){const X=C.length;for(let W=0;W<X;W++){const rt={...$,argIndex:W};I(C[W],rt,x),W<X-1&&f("comma",",",rt)}}E.error||f("paren","]",$);break;default:E.value!==void 0&&v(E,R),C&&C.forEach(X=>I(X,R,x))}f("whitespace",E.wsAfter,R)}})(g);const d=A.length;for(let I=0;I<d;I++){const E=A[I];if(E.type==="whitespace"&&E.evalIndex===void 0){const R=A[I+1];R&&R.evalIndex!==void 0&&(E.evalIndex=R.evalIndex)}}return A})(r);return{ast:r,evaluations:i,executions:u,precedentsAbsolute:S,precedentsExecute:L,precedentsNamed:m,precedentsRelative:h,precedentsRoot:y,references:l,tokens:T,error:e}}function go(t,e){let n,r=-1,i="";Number.isSafeInteger(t.previousToken?.startLine)?(r=t.previousToken.startLine,n=t.previousToken.endColumn+1):Number.isSafeInteger(t.token?.startLine)&&(r=t.token.startLine,n=t.token.startColumn),r!==-1?(i+=`
114
114
  `+e.split(`
115
115
  `)[r-1]+`
116
116
  `,i+=Array(n-1).fill(" ").join("")+`^
@@ -121,4 +121,4 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
121
121
  `)[l-1]+`
122
122
  `;throw N+=Array(h-1).fill(" ").join("")+`^
123
123
  `,u.message=N+`Error at position ${l}:${h}
124
- `+u.message,u.errorLocation={line:l,column:h},new _.n.Parse(u.message,{line:l,column:h,offset:u.offset,length:u.length})}return c})(n);let i;if(!r)return i={type:"text",value:n},i;const o=r.tokens;this.input=o,this.inputTextLength=n.length;const s=e.getPosition();return this.position=s,this.astErrors=[],this.reset(),i=this.intersectOp(),i=je(i,(a,c)=>{let u=a.type;if(u==="function"&&a.value&&a.value.toUpperCase().startsWith("_XLFN.")){const l=a.value.substring(6);let h=a.image.substring(6),N=a;l==="ANCHORARRAY"?(N=Qn("#",a.inputs[0],!0),h="#"):l==="SINGLE"?(N=_e("@",a.inputs[0],!0),h="@"):N=fo(l,a.inputs),er(N,a),N.image=h,u=(a=N).type}if(c?.isReference){const l=c.value;if((l===":"||l===".:."||l===".:"||l===":.")&&Number.isInteger(a.value)){const h=c.inputs[0]===a?c.inputs[1]:c.inputs[0];if(h&&Number.isInteger(h.value)){const N=ho(a.image,s);return er(N,a),N}}}else if(u==="cell"){const l=a.value;if(l.rowIndex===Number.MIN_SAFE_INTEGER||l.colIndex>=16384){const h=Jn(a.image);return er(h,a),h}}return a}),i}build(e,n){if(n.length===0)throw Error("Input must not be empty.");let r,i,o;try{r=this._createAST(e,n)}catch(c){o=c instanceof _.n.Parse?c:new _.n.Parse(c.message,c)}const s=this.errors;s.length>0&&(o=go(s[0],n));const a=this.astErrors;return a.length>0&&(o=go(a[0],n)),i=r?sn(r,o):{ast:null,evaluations:_.te.EmptyArray,executions:_.te.EmptyArray,precedentsAbsolute:_.te.EmptyArray,precedentsExecute:_.te.EmptyArray,precedentsNamed:null,precedentsRelative:_.te.EmptyArray,precedentsRoot:_.te.EmptyArray,references:_.te.EmptyArray,tokens:_.te.EmptyArray,error:o},i}}class be{constructor(e,n){this._options=e,this._compiled=n}getTextAt(e,n,r=!1){return r?_.yw(this._compiled.tokens):_.Ew(this._compiled.tokens,e,n)}getTokens(){return this._compiled.tokens}getError(){return this._compiled.error??null}isEquals(e){if(!(e&&e instanceof be))return!1;if(this===e)return!0;const n=this._compiled.tokens,r=e._compiled.tokens;return n.length===r.length&&_.yw(n)===_.yw(r)}getReferences(){const e=this._compiled,n=e.references,r=n.length;if(r===0)return _.te.EmptyArray;const i=e.precedentsExecute,o=e.precedentsRelative,s=new Array(r);for(let a=0;a<r;a++){const c=i[n[a]],u=c.inputs;if(u&&u.length===2){const l=o[i[u[0]].value],h=o[i[u[1]].value];s[a]={colStart:l.colStart,rowStart:l.rowStart,colEnd:h.colEnd,rowEnd:h.rowEnd,$colStart:l.$colStart,$rowStart:l.$rowStart,$colEnd:h.$colEnd,$rowEnd:h.$rowEnd,sheetName:l.sheetName}}else if(c.node.type==="cell"){const l=o[c.value];s[a]={...l}}else if(c.op==="named"){const l=e.precedentsNamed;s[a]=l[c.value]}else c.op==="error"&&(s[a]=c.node.value)}return s}setReferenceAt(e,n){const r=this._compiled,i=r.references;if(i.length===0)return _.te.EmptyArray;const o=r.precedentsExecute,s=i[e];if(s===void 0)throw new Error(`Invalid reference index: ${e}`);const a=o[s],c=a.node,u=c.inputs??_.te.EmptyArray;let l,h,N=!1;n&&(l={colIndex:n.colStart,rowIndex:n.rowStart,$colIndex:n.$colStart??!1,$rowIndex:n.$rowStart??!1},n.sheetName&&(l.sheetName=n.sheetName),N=!_.Ht.isSingleCell(n),N&&(h={colIndex:n.colEnd,rowIndex:n.rowEnd,$colIndex:n.$colEnd??!1,$rowIndex:n.$rowEnd??!1},n.colEnd===Number.MAX_SAFE_INTEGER&&(h.colIndex=Number.MIN_SAFE_INTEGER),n.rowEnd===Number.MAX_SAFE_INTEGER&&(h.rowIndex=Number.MIN_SAFE_INTEGER)));const S=u.length===2;let L=-1,m=-1;if(S)L=u[0].evalIndex,m=u[1].evalIndex;else{if(c.type!=="cell")throw a.op==="named"?new Error("Cannot setReference for a named reference"):new Error(`Invalidate reference index: ${e}`);L=c.evalIndex}const y=this._compiled.ast,p=je(y,A=>{if(!A||!A.isReference)return;const v=A.type;if(!n&&ws.includes(A.value)){const E=u[0],R=u[1];let U=E.evalIndex===L,x=R.evalIndex===m;if(U||x){const O=gn();return O.image="#REF!",O}}if(v!=="cell"&&v!=="error")return;const f=A.evalIndex;let d,I=f===L;if(I||f===m){if(n)if(S===N){let E=I?l:h;d={...A},d.value=E,d.image=null}else d=N?Lr(":",Xn(l),Xn(h),!0):Xn(l);else d=gn(),d.image="#REF!";return d}});if(p===y)return this;const T=sn(p,this._compiled.error),g=this._options;return new be(g,T)}_resolveNamed(e,n,r,i){const o=this._options?.getNamed;if(!o)return _.n.BuiltIn.Name;let s=o?.(e,this._options.getSheetName?.())?.[0];return s?(s.isFormulaError||(s=_.Yw(s,n,r,i)),s):_.n.BuiltIn.Name}getDirectPrecedentsAt(e,n,r=!1,i,o){const s=this._compiled,a=s.precedentsRoot,c=a.length;if(c===0)return _.te.EmptyArray;const u=s.precedentsRelative,l=s.precedentsAbsolute,h=u.length;for(let p=0;p<h;p++){const T=u[p];let g=l[p],A=_.Yw(T,e,n,g);l[p]=A}let N=!1;const S=s.precedentsExecute,L=S.length,m=xr;for(let p=0;p<L;p++){const T=S[p],g=T.op;if(!g){const I=l[T.value];m[T.index]=I;continue}if(g==="named"){N=!0,m[T.index]=this._resolveNamed(T.node.value,e,n);continue}if(g==="error"){m[T.index]=T.node.value;continue}if(g==="@"||g==="#"){m[T.index]=m[T.inputs[0]];continue}const A=T.inputs;if(!A)continue;let v=m[A[0]];if(v===void 0){m[T.index]=_.n.BuiltIn.Value;continue}if(v.isFormulaError){m[T.index]=v;continue}let f,d=m[A[1]];d!==void 0?d.isFormulaError?m[T.index]=d:(g===" "?f=_.Ht.intersectRanges(v,d):g!==":"&&g!==".:."&&g!==":."&&g!==".:"||(f=m[T.index]=_.Ht.unionRanges(v,d)),m[T.index]=f??_.n.BuiltIn.Null):m[T.index]=_.n.BuiltIn.Value}const y=new Array(c);for(let p=0;p<c;p++){const T=a[p],g=m[T];if(y[p]=g?.rowStart!==void 0?{...g}:g,i||o){const A=S[T];N&&A.op==="named"?(i&&(i[p]=g.$colStart||g.$colEnd),o&&(o[p]=g.$rowStart||g.$rowEnd)):(i&&(i[p]=A.hasVerticalAbs),o&&(o[p]=A.hasHorizontalAbs))}}return y}evaluate(e,n,r){const i=e.getPosition(),o=i?.rowIndex??0,s=i?.colIndex??0;let a=this._compiled;if(n!==void 0){let f;if(je(a.ast,d=>{d.evalIndex===n&&(f=d)}),!f)throw new Error(`Invalid evalIndex: ${n}`);a=sn(f,a.error)}if(a.error)return a.error;const c=a.evaluations,u=a.executions;let l,h;r||(r=this._resolvePrecedents(e));const N=a.precedentsExecute,S=a.precedentsRelative,L=a.precedentsAbsolute,m=N.length;for(let f=0;f<m;f++){const d=N[f],I=d.op;if(I){if(I==="named"){const E=d.node;let R=this._resolveNamed(d.node.value,o,s);R?.colStart!==void 0&&(R=e.getReference(R)),c[E.evalIndex]=R}else if(I==="error"){const E=d.node;c[E.evalIndex]=d.node.value}}else{const E=S[d.value];let R=L[f];const U=_.Yw(E,o,s,R),x=d.node;c[x.evalIndex]=U}}const y=a.precedentsRoot,p=y.length;if(p!==r.length)return _.n.BuiltIn.Parse;for(let f=0;f<p;f++){const d=N[y[f]].node;let I=r[f];I.isIRange&&d.type==="cell"&&I.size>1&&(I=I.getValueAt(0,0)??null),c[d.evalIndex]=I}let T;const g=f=>{const d=f.inputs,I=d?d.length:0;let E;switch(f.type){case"infix":const R=f.value;let U=c[d[0].evalIndex],x=c[d[1].evalIndex];if(R==="+"&&typeof U=="number"&&typeof x=="number"){const k=U+x;return Math.abs(k)<99e-14?0:k}if(R==="-"&&typeof U=="number"&&typeof x=="number"){const k=U-x;return Math.abs(k)<99e-14?0:k}if(U&&U.isFormulaError)return U;if(x&&x.isFormulaError)return x;const O=f.fn;return E=O?O(e,U,x):_.n.BuiltIn.Value,E=_.ji(E,null),E;case"function":T||(T=new Array(I)),T.length!==I&&(T.length=I);for(let k=0;k<I;k++)T[k]=c[d[k].evalIndex];return E=this._callFunction(e,f,T),E&&typeof E.then=="function"?E.then(k=>{k=_.ji(k,e),E instanceof _.n.Known&&(h=E),c[f.evalIndex]=k}).catch(k=>{const $=k instanceof _.n.Known?k:new _.n.Value("Uncaught error",{cause:k});c[f.evalIndex]=$}):E instanceof _.n.Known&&(h=E),E;case"prefix":case"postfix":let w=c[d[0].evalIndex];if(w&&w.isFormulaError)return w;const C=f.fn;return E=C?C(e,w):_.n.BuiltIn.Value,E;case"paren":if(I===1)return c[d[0].evalIndex];{const k=new Array(I);for(let $=0;$<I;$++)k[$]=c[d[$].evalIndex];return k}case"named":return null;case"empty":return}};let A=u.length;for(let f=0;f<A;f++){const d=u[f];if(h)return h;if(l)l=l.then(()=>{const I=g(d);return c[d.evalIndex]=I,I});else{const I=g(d);c[d.evalIndex]=I,I&&typeof I.then=="function"&&(l=I)}}if(l)return l.then(()=>{const f=c[c.length-1];return this._finalizeReturnValue(e,f)});const v=c[c.length-1];return this._finalizeReturnValue(e,v)}_resolvePrecedents(e){const n=e.getPosition(),r=n?.rowIndex??0,i=n?.colIndex??0,o=this.getDirectPrecedentsAt(r,i),s=o.length;let a;if(s>0){a=new Array(s);for(let c=0;c<s;c++){const u=o[c];if(u instanceof _.n.Known)a[c]=u;else if(Array.isArray(u)){const l=new Array(u.length);for(let h=0;h<u.length;h++)l[h]=e.getReference(u[h]);a[c]=l}else a[c]=e.getReference(u)}}else a=_.te.EmptyArray;return a}wrapImplicit(e,n,r){const i=this._compiled.ast;if(!i||!i.isReference)return this;if(i.type==="cell")return this;if(i.value==="@")return this;if(!r)return this;const o=_.en(n)+_.un(e);if(r.has(o))return this;const s=sn(_e("@",i,!0),this._compiled.error);return new be(this._options,s)}_callFunction(e,n,r){const i=n?.cacheFn??e.getFunction(n.value);if(!i)return new _.n.Parse;const o=i.isBuiltIn();let s;o?n.cacheFn=i:this._context=e;try{s=i.execute(...r)}catch(a){s=a instanceof _.n.Known?a:new _.n.Value(a.message,{cause:a})}return o||(this._context=null),s===void 0?new _.n.Parse:s}_finalizeReturnValue(e,n){if(n&&n.colStart!==void 0&&(n=e.getValueAt(n.rowStart,n.colStart)),Array.isArray(n))if(n.length===1&&Array.isArray(n[0])&&n[0].length===1)n=n[0][0],Array.isArray(n)&&(n=_.n.BuiltIn.Value);else try{n=e.getRange(n)}catch{n=_.n.BuiltIn.Value}return n?.isIRange?n.size===1?(n=n.getValueAt(0,0,pl),(n=_.ji(n,e))===null&&(n=0)):n=n.fillEmpty(0):(n=_.ji(n,e))===null&&(n=0),n}get[Symbol.toStringTag](){return"[FormulaBlock]"}toString(){const e=this._compiled;if(e.error)return e.error.toString();const n=this._context;if(n){const r=n.getPosition();return this.getTextAt(r.rowIndex,r.colIndex)}return _.yw(e.tokens)}}const xr=new Array(20);for(let t=0;t<xr.length;t++)xr[t]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const pl={type:null};exports.FormulaParser=class{constructor(t){this._options={getEntireCoords:_.Ml,...t},this._astBuilder=new dl}parse(t,e){t.getPosition().sheetName;const n=this._astBuilder.build(t,e);return new be(this._options,n)}eval(t,e){return this.parse(t,e).evaluate(t)}};
124
+ `+u.message,u.errorLocation={line:l,column:h},new _.n.Parse(u.message,{line:l,column:h,offset:u.offset,length:u.length})}return c})(n);let i;if(!r)return i={type:"text",value:n},i;const o=r.tokens;this.input=o,this.inputTextLength=n.length;const s=e.getPosition();return this.position=s,this.astErrors=[],this.reset(),i=this.intersectOp(),i=je(i,(a,c)=>{let u=a.type;if(u==="function"&&a.value&&a.value.toUpperCase().startsWith("_XLFN.")){const l=a.value.substring(6);let h=a.image.substring(6),N=a;l==="ANCHORARRAY"?(N=Qn("#",a.inputs[0],!0),h="#"):l==="SINGLE"?(N=_e("@",a.inputs[0],!0),h="@"):N=fo(l,a.inputs),er(N,a),N.image=h,u=(a=N).type}if(c?.isReference){const l=c.value;if((l===":"||l===".:."||l===".:"||l===":.")&&Number.isInteger(a.value)){const h=c.inputs[0]===a?c.inputs[1]:c.inputs[0];if(h&&Number.isInteger(h.value)){const N=ho(a.image,s);return er(N,a),N}}}else if(u==="cell"){const l=a.value;if(l.rowIndex===Number.MIN_SAFE_INTEGER||l.colIndex>=16384){const h=Jn(a.image);return er(h,a),h}}return a}),i}build(e,n){if(n.length===0)throw Error("Input must not be empty.");let r,i,o;try{r=this._createAST(e,n)}catch(c){o=c instanceof _.n.Parse?c:new _.n.Parse(c.message,c)}const s=this.errors;s.length>0&&(o=go(s[0],n));const a=this.astErrors;return a.length>0&&(o=go(a[0],n)),i=r?sn(r,o):{ast:null,evaluations:_.te.EmptyArray,executions:_.te.EmptyArray,precedentsAbsolute:_.te.EmptyArray,precedentsExecute:_.te.EmptyArray,precedentsNamed:null,precedentsRelative:_.te.EmptyArray,precedentsRoot:_.te.EmptyArray,references:_.te.EmptyArray,tokens:_.te.EmptyArray,error:o},i}}class be{constructor(e,n){this._options=e,this._compiled=n}getTextAt(e,n,r=!1){return r?_.hy(this._compiled.tokens):_.dy(this._compiled.tokens,e,n)}getTokens(){return this._compiled.tokens}getError(){return this._compiled.error??null}isEquals(e){if(!(e&&e instanceof be))return!1;if(this===e)return!0;const n=this._compiled.tokens,r=e._compiled.tokens;return n.length===r.length&&_.hy(n)===_.hy(r)}getReferences(){const e=this._compiled,n=e.references,r=n.length;if(r===0)return _.te.EmptyArray;const i=e.precedentsExecute,o=e.precedentsRelative,s=new Array(r);for(let a=0;a<r;a++){const c=i[n[a]],u=c.inputs;if(u&&u.length===2){const l=o[i[u[0]].value],h=o[i[u[1]].value];s[a]={colStart:l.colStart,rowStart:l.rowStart,colEnd:h.colEnd,rowEnd:h.rowEnd,$colStart:l.$colStart,$rowStart:l.$rowStart,$colEnd:h.$colEnd,$rowEnd:h.$rowEnd,sheetName:l.sheetName}}else if(c.node.type==="cell"){const l=o[c.value];s[a]={...l}}else if(c.op==="named"){const l=e.precedentsNamed;s[a]=l[c.value]}else c.op==="error"&&(s[a]=c.node.value)}return s}setReferenceAt(e,n){const r=this._compiled,i=r.references;if(i.length===0)return _.te.EmptyArray;const o=r.precedentsExecute,s=i[e];if(s===void 0)throw new Error(`Invalid reference index: ${e}`);const a=o[s],c=a.node,u=c.inputs??_.te.EmptyArray;let l,h,N=!1;n&&(l={colIndex:n.colStart,rowIndex:n.rowStart,$colIndex:n.$colStart??!1,$rowIndex:n.$rowStart??!1},n.sheetName&&(l.sheetName=n.sheetName),N=!_.Ht.isSingleCell(n),N&&(h={colIndex:n.colEnd,rowIndex:n.rowEnd,$colIndex:n.$colEnd??!1,$rowIndex:n.$rowEnd??!1},n.colEnd===Number.MAX_SAFE_INTEGER&&(h.colIndex=Number.MIN_SAFE_INTEGER),n.rowEnd===Number.MAX_SAFE_INTEGER&&(h.rowIndex=Number.MIN_SAFE_INTEGER)));const S=u.length===2;let L=-1,m=-1;if(S)L=u[0].evalIndex,m=u[1].evalIndex;else{if(c.type!=="cell")throw a.op==="named"?new Error("Cannot setReference for a named reference"):new Error(`Invalidate reference index: ${e}`);L=c.evalIndex}const y=this._compiled.ast,p=je(y,A=>{if(!A||!A.isReference)return;const v=A.type;if(!n&&ws.includes(A.value)){const E=u[0],R=u[1];let U=E.evalIndex===L,x=R.evalIndex===m;if(U||x){const O=gn();return O.image="#REF!",O}}if(v!=="cell"&&v!=="error")return;const f=A.evalIndex;let d,I=f===L;if(I||f===m){if(n)if(S===N){let E=I?l:h;d={...A},d.value=E,d.image=null}else d=N?Lr(":",Xn(l),Xn(h),!0):Xn(l);else d=gn(),d.image="#REF!";return d}});if(p===y)return this;const T=sn(p,this._compiled.error),g=this._options;return new be(g,T)}_resolveNamed(e,n,r,i){const o=this._options?.getNamed;if(!o)return _.n.BuiltIn.Name;let s=o?.(e,this._options.getSheetName?.())?.[0];return s?(s.isFormulaError||(s=_.Gy(s,n,r,i)),s):_.n.BuiltIn.Name}getDirectPrecedentsAt(e,n,r=!1,i,o){const s=this._compiled,a=s.precedentsRoot,c=a.length;if(c===0)return _.te.EmptyArray;const u=s.precedentsRelative,l=s.precedentsAbsolute,h=u.length;for(let p=0;p<h;p++){const T=u[p];let g=l[p],A=_.Gy(T,e,n,g);l[p]=A}let N=!1;const S=s.precedentsExecute,L=S.length,m=xr;for(let p=0;p<L;p++){const T=S[p],g=T.op;if(!g){const I=l[T.value];m[T.index]=I;continue}if(g==="named"){N=!0,m[T.index]=this._resolveNamed(T.node.value,e,n);continue}if(g==="error"){m[T.index]=T.node.value;continue}if(g==="@"||g==="#"){m[T.index]=m[T.inputs[0]];continue}const A=T.inputs;if(!A)continue;let v=m[A[0]];if(v===void 0){m[T.index]=_.n.BuiltIn.Value;continue}if(v.isFormulaError){m[T.index]=v;continue}let f,d=m[A[1]];d!==void 0?d.isFormulaError?m[T.index]=d:(g===" "?f=_.Ht.intersectRanges(v,d):g!==":"&&g!==".:."&&g!==":."&&g!==".:"||(f=m[T.index]=_.Ht.unionRanges(v,d)),m[T.index]=f??_.n.BuiltIn.Null):m[T.index]=_.n.BuiltIn.Value}const y=new Array(c);for(let p=0;p<c;p++){const T=a[p],g=m[T];if(y[p]=g?.rowStart!==void 0?{...g}:g,i||o){const A=S[T];N&&A.op==="named"?(i&&(i[p]=g.$colStart||g.$colEnd),o&&(o[p]=g.$rowStart||g.$rowEnd)):(i&&(i[p]=A.hasVerticalAbs),o&&(o[p]=A.hasHorizontalAbs))}}return y}evaluate(e,n,r){const i=e.getPosition(),o=i?.rowIndex??0,s=i?.colIndex??0;let a=this._compiled;if(n!==void 0){let f;if(je(a.ast,d=>{d.evalIndex===n&&(f=d)}),!f)throw new Error(`Invalid evalIndex: ${n}`);a=sn(f,a.error)}if(a.error)return a.error;const c=a.evaluations,u=a.executions;let l,h;r||(r=this._resolvePrecedents(e));const N=a.precedentsExecute,S=a.precedentsRelative,L=a.precedentsAbsolute,m=N.length;for(let f=0;f<m;f++){const d=N[f],I=d.op;if(I){if(I==="named"){const E=d.node;let R=this._resolveNamed(d.node.value,o,s);R?.colStart!==void 0&&(R=e.getReference(R)),c[E.evalIndex]=R}else if(I==="error"){const E=d.node;c[E.evalIndex]=d.node.value}}else{const E=S[d.value];let R=L[f];const U=_.Gy(E,o,s,R),x=d.node;c[x.evalIndex]=U}}const y=a.precedentsRoot,p=y.length;if(p!==r.length)return _.n.BuiltIn.Parse;for(let f=0;f<p;f++){const d=N[y[f]].node;let I=r[f];I.isIRange&&d.type==="cell"&&I.size>1&&(I=I.getValueAt(0,0)??null),c[d.evalIndex]=I}let T;const g=f=>{const d=f.inputs,I=d?d.length:0;let E;switch(f.type){case"infix":const R=f.value;let U=c[d[0].evalIndex],x=c[d[1].evalIndex];if(R==="+"&&typeof U=="number"&&typeof x=="number"){const k=U+x;return Math.abs(k)<99e-14?0:k}if(R==="-"&&typeof U=="number"&&typeof x=="number"){const k=U-x;return Math.abs(k)<99e-14?0:k}if(U&&U.isFormulaError)return U;if(x&&x.isFormulaError)return x;const O=f.fn;return E=O?O(e,U,x):_.n.BuiltIn.Value,E=_.pa(E,null),E;case"function":T||(T=new Array(I)),T.length!==I&&(T.length=I);for(let k=0;k<I;k++)T[k]=c[d[k].evalIndex];return E=this._callFunction(e,f,T),E&&typeof E.then=="function"?E.then(k=>{k=_.pa(k,e),E instanceof _.n.Known&&(h=E),c[f.evalIndex]=k}).catch(k=>{const $=k instanceof _.n.Known?k:new _.n.Value("Uncaught error",{cause:k});c[f.evalIndex]=$}):E instanceof _.n.Known&&(h=E),E;case"prefix":case"postfix":let w=c[d[0].evalIndex];if(w&&w.isFormulaError)return w;const C=f.fn;return E=C?C(e,w):_.n.BuiltIn.Value,E;case"paren":if(I===1)return c[d[0].evalIndex];{const k=new Array(I);for(let $=0;$<I;$++)k[$]=c[d[$].evalIndex];return k}case"named":return null;case"empty":return}};let A=u.length;for(let f=0;f<A;f++){const d=u[f];if(h)return h;if(l)l=l.then(()=>{const I=g(d);return c[d.evalIndex]=I,I});else{const I=g(d);c[d.evalIndex]=I,I&&typeof I.then=="function"&&(l=I)}}if(l)return l.then(()=>{const f=c[c.length-1];return this._finalizeReturnValue(e,f)});const v=c[c.length-1];return this._finalizeReturnValue(e,v)}_resolvePrecedents(e){const n=e.getPosition(),r=n?.rowIndex??0,i=n?.colIndex??0,o=this.getDirectPrecedentsAt(r,i),s=o.length;let a;if(s>0){a=new Array(s);for(let c=0;c<s;c++){const u=o[c];if(u instanceof _.n.Known)a[c]=u;else if(Array.isArray(u)){const l=new Array(u.length);for(let h=0;h<u.length;h++)l[h]=e.getReference(u[h]);a[c]=l}else a[c]=e.getReference(u)}}else a=_.te.EmptyArray;return a}wrapImplicit(e,n,r){const i=this._compiled.ast;if(!i||!i.isReference)return this;if(i.type==="cell")return this;if(i.value==="@")return this;if(!r)return this;const o=_.cn$1(n)+_.yn(e);if(r.has(o))return this;const s=sn(_e("@",i,!0),this._compiled.error);return new be(this._options,s)}_callFunction(e,n,r){const i=n?.cacheFn??e.getFunction(n.value);if(!i)return new _.n.Parse;const o=i.isBuiltIn();let s;o?n.cacheFn=i:this._context=e;try{s=i.execute(...r)}catch(a){s=a instanceof _.n.Known?a:new _.n.Value(a.message,{cause:a})}return o||(this._context=null),s===void 0?new _.n.Parse:s}_finalizeReturnValue(e,n){if(n&&n.colStart!==void 0&&(n=e.getValueAt(n.rowStart,n.colStart)),Array.isArray(n))if(n.length===1&&Array.isArray(n[0])&&n[0].length===1)n=n[0][0],Array.isArray(n)&&(n=_.n.BuiltIn.Value);else try{n=e.getRange(n)}catch{n=_.n.BuiltIn.Value}return n?.isIRange?n.size===1?(n=n.getValueAt(0,0,pl),(n=_.pa(n,e))===null&&(n=0)):n=n.fillEmpty(0):(n=_.pa(n,e))===null&&(n=0),n}get[Symbol.toStringTag](){return"[FormulaBlock]"}toString(){const e=this._compiled;if(e.error)return e.error.toString();const n=this._context;if(n){const r=n.getPosition();return this.getTextAt(r.rowIndex,r.colIndex)}return _.hy(e.tokens)}}const xr=new Array(20);for(let t=0;t<xr.length;t++)xr[t]={colStart:0,rowStart:0,colEnd:0,rowEnd:0,sheetName:null};const pl={type:null};exports.FormulaParser=class{constructor(t){this._options={getEntireCoords:_.ac,...t},this._astBuilder=new dl}parse(t,e){t.getPosition().sheetName;const n=this._astBuilder.build(t,e);return new be(this._options,n)}eval(t,e){return this.parse(t,e).evaluate(t)}};
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.5
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.7
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.5
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.7
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.