@sheetxl/studio-vanilla 0.8.0-beta.1 → 0.8.0-beta.3

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 (478) hide show
  1. package/browser/cjs/00npLPxW7DhY7cIJ.cjs +5 -0
  2. package/browser/cjs/1gbSV4OYBoEWTygY2.cjs +1 -0
  3. package/browser/cjs/7SCJ4vwRZW4B71kq.cjs +8 -0
  4. package/browser/cjs/9LTjOB1_w-bikScD.cjs +1 -0
  5. package/browser/cjs/AVUt0iNPhRf4R5xb.cjs +1 -0
  6. package/browser/cjs/{aYuNpndpwcZG5eik2.cjs → B2fdTYeKGNugWRgn2.cjs} +2 -2
  7. package/browser/cjs/B4ANcw0mAmhe2Aeb2.cjs +1 -0
  8. package/browser/cjs/B6IXpae7f0J8Ocq62.cjs +1 -0
  9. package/browser/cjs/B6vy56yEA1I3B74O.cjs +1 -0
  10. package/browser/cjs/B7QDcu7uACQA1y3h.cjs +1 -0
  11. package/browser/cjs/B7oyN0rn95Kyes8D2.cjs +1 -0
  12. package/browser/cjs/BArvhvpcrQEcbcyY.cjs +1 -0
  13. package/browser/cjs/{Ci8Uu7_b4lwwRLAD2.cjs → BC3OSmoFNyA52TRp2.cjs} +1 -1
  14. package/browser/cjs/{_H5j4dU7HOBYTawU.cjs → BDmBYZigchoACsQx.cjs} +1 -1
  15. package/browser/cjs/BFmgMQoM5sQsWIxf2.cjs +1 -0
  16. package/browser/cjs/BIN8L9V0hoUwMh64.cjs +1 -0
  17. package/browser/cjs/BPWKnUtyoTrtW567.cjs +1 -0
  18. package/browser/cjs/BcROQ4pvVajDQ1em.cjs +1 -0
  19. package/browser/cjs/BjjAQLiorKWXy3g5.cjs +4 -0
  20. package/browser/cjs/Bncc0oXhFMdj_HuR2.cjs +1 -0
  21. package/browser/cjs/BoRfsJCaLzUHQseD.cjs +1 -0
  22. package/browser/cjs/BqQgEaUREvuFHYoW.cjs +1 -0
  23. package/browser/cjs/{Cm21F18ga8TluA9h.cjs → BtAs67e7WBCglqc5.cjs} +1 -1
  24. package/browser/cjs/BxFSy-hOEbyllj-r2.cjs +22 -0
  25. package/browser/cjs/{CRx1WvmgBjT8WVyB2.cjs → C0g87ndP2zMUbX6f2.cjs} +1 -1
  26. package/browser/cjs/C0xAhPzztP9a24zR.cjs +5 -0
  27. package/browser/cjs/C2SohnuJK8Urc7Fx2.cjs +2 -0
  28. package/browser/cjs/C3scwi-q2KqEM39H.cjs +126 -0
  29. package/browser/cjs/C4cZxb9nRtzTCA402.cjs +1 -0
  30. package/browser/cjs/C9q3zr8iCIoYDrdA2.cjs +1 -0
  31. package/browser/cjs/CBLwtHFYNB1BTpSS.cjs +1 -0
  32. package/browser/cjs/{lEQC21-Sk4lwHy2r2.cjs → CFxueP0tbpmvY1Ip2.cjs} +1 -1
  33. package/browser/cjs/CGtG2pvGgTAnImBg2.cjs +8 -0
  34. package/browser/cjs/CH0vbLpwoyU7oOFk.cjs +11 -0
  35. package/browser/cjs/CKtdmbeMjJ2udO8s.cjs +1 -0
  36. package/browser/cjs/CQ-W9AUNHdts8pmY.cjs +1 -0
  37. package/browser/cjs/CQ5x8oFPDaU6OCJf.cjs +3 -0
  38. package/browser/cjs/CRcv32tHTbGSGtkh2.cjs +1 -0
  39. package/browser/cjs/{DsIHLUKUrSrYhFHl.cjs → CTObzk4r7C71x9Ep2.cjs} +1 -1
  40. package/browser/cjs/CUyKbhM67853Rnt22.cjs +1 -0
  41. package/browser/cjs/CVHRh1RGDSgqfAm4.cjs +2 -0
  42. package/browser/cjs/CVHc_cJddJk7J3Zt.cjs +1 -0
  43. package/browser/cjs/CaJGoNwTL6pAJ6a42.cjs +1 -0
  44. package/browser/cjs/{bGMaev70Zd_NXqLM2.cjs → CcqhH_Ign02tLFbU2.cjs} +1 -1
  45. package/browser/cjs/CdsreHc3A0wBhEy9.cjs +14 -0
  46. package/browser/cjs/CfXcRa4RlFmqU0Op.cjs +1 -0
  47. package/browser/cjs/CgyU8XPzm6O1a93m.cjs +41 -0
  48. package/browser/cjs/CzGNIWwu8KL3tcCO2.cjs +1 -0
  49. package/browser/cjs/D-8QQWC-67PplJdV2.cjs +1 -0
  50. package/browser/cjs/D6XEHfNbKx-9qZye.cjs +32 -0
  51. package/browser/cjs/{a0Z-SXs_N71CtqYb2.cjs → D6YaqporVrSewZpm2.cjs} +1 -1
  52. package/browser/cjs/D6m2M4H6JZaYZ4El2.cjs +1 -0
  53. package/browser/cjs/{DIbdDzNf_3S2RYZN.cjs → D9SdUvJVa64UoGj9.cjs} +1 -1
  54. package/browser/cjs/DCVnwgmc5HuYp_iv2.cjs +1 -0
  55. package/browser/cjs/{EeOVMRq7TuptFKTc2.cjs → DF4l8xrxkcLkgExp.cjs} +1 -1
  56. package/browser/cjs/DNnMGL1ff8hutxSd.cjs +1 -0
  57. package/browser/cjs/{D19RglhKiroWfpQn2.cjs → DOEhH2HGT1Zv0irr2.cjs} +1 -1
  58. package/browser/cjs/DQOt8XSpXyhsrF9N.cjs +93 -0
  59. package/browser/cjs/{CnZfa45XxA-9Jhmp.cjs → DRmo6uoGoqtiVff82.cjs} +1 -1
  60. package/browser/cjs/DSXLVieENYN9qXYl.cjs +1 -0
  61. package/browser/cjs/{BEJFcqVMDMKOvs11.cjs → DUXRl3eYfSwbhAfx.cjs} +1 -1
  62. package/browser/cjs/{B9EI7wviSkHS9ZkH.cjs → DWdUSWl4MXn2-MLU.cjs} +1 -1
  63. package/browser/cjs/DWyoF5GqKXce_GmT2.cjs +3 -0
  64. package/browser/cjs/Df3jw0eHS0X-qFvT.cjs +1 -0
  65. package/browser/cjs/{DiZDRPIgbO3sQ8Vb.cjs → Doiqeo4Qlie45lbl.cjs} +1 -1
  66. package/browser/cjs/Dp2fPEReFhDsI01j.cjs +3 -0
  67. package/browser/cjs/DpFg69dDCPoOK2BY2.cjs +1 -0
  68. package/browser/cjs/{Du4jBiFxRIF1OjD4.cjs → Dtxj9JR14A-uliu52.cjs} +1 -1
  69. package/browser/cjs/{CpJJh4UnFl1_qFui.cjs → Dx7GQ4ALtNG3kshu.cjs} +1 -1
  70. package/browser/cjs/{DG-AY_xO8RKHtEBE.cjs → Dy50BSaRMmRISD2Y.cjs} +1 -2
  71. package/browser/cjs/LD1P-jAXleebK12X.cjs +7 -0
  72. package/browser/cjs/P0AUOlaMi9tyE0vN.cjs +3747 -0
  73. package/browser/cjs/PmwvZPFhqmL4DO58.cjs +1 -0
  74. package/browser/cjs/Qp04O3ALK3M9d3At.cjs +54 -0
  75. package/browser/cjs/SATfdSwNygvlOSKC2.cjs +1 -0
  76. package/browser/cjs/XRCcogT-Iqd3Wv6R2.cjs +1 -0
  77. package/browser/cjs/{BziOCn_XEGT4ynN5.cjs → Z_6RasaVpnIv1MHk.cjs} +1 -1
  78. package/browser/cjs/Zz5dLT_2gLI18Jmx.cjs +7 -0
  79. package/browser/cjs/a4xpA8d_d22-GKos.cjs +1 -0
  80. package/browser/cjs/cexWxRluo6g-NG_u.cjs +1 -0
  81. package/browser/cjs/{C5rQELB0TUeXY6VM.cjs → ge8Wd-0WC6oMuJZR.cjs} +1 -1
  82. package/browser/cjs/iYn00uzmSLl2T0oN2.cjs +1 -0
  83. package/browser/cjs/index.cjs +2 -2
  84. package/browser/cjs/kj_kwD7S9uUbhKiz2.cjs +1 -0
  85. package/browser/cjs/qA_ElZ6f49Un56OC.cjs +1 -0
  86. package/browser/cjs/s2c8Pr4obSACz8Lu2.cjs +1 -0
  87. package/browser/cjs/{hzUo76TXMOBqsI3U2.cjs → uAWsHfi-JD_ZQIT82.cjs} +1 -1
  88. package/browser/cjs/uRXkwHKoe-2HtXuR.cjs +1 -0
  89. package/browser/cjs/{DxQkFYAFNZubVdn22.cjs → y4KFnuCKf8r5oFal2.cjs} +1 -1
  90. package/browser/esm/{CZWIS7FuqNjbheSw.mjs → 2eBMkUK0-HxaCmDY.mjs} +40 -40
  91. package/browser/esm/{DzDwSOBdJh_lx_NM.mjs → 53nnk5W22gJW7Ddx.mjs} +241 -241
  92. package/{cdn/assets/BCZjYGV8AqIZghBH.js → browser/esm/5SHS088DeaZ82qmD2.mjs} +69 -4
  93. package/browser/esm/{B4vYIE3kSPTxCgpf2.mjs → 5shGy9JSRzvoIfDE2.mjs} +6 -6
  94. package/browser/esm/{-vgNEEXiEad4bltZ.mjs → 74Ynqpv5NPbb_8vB.mjs} +15762 -16413
  95. package/browser/esm/B-VKr_KwiWjDeAP5.mjs +3343 -0
  96. package/{cdn/assets/BDkVAo0CDCTE04ZJ.js → browser/esm/B08GCyGdLNiXtb_R.mjs} +1 -1
  97. package/browser/esm/{3y_bCend8tkaewDG2.mjs → B0F5gtNQjANAfRw32.mjs} +19 -27
  98. package/browser/esm/B0gZ5e38MXWbEDS_.mjs +25 -0
  99. package/browser/esm/{D3G3tI3DVCUF3Gdk.mjs → B45vVm2Ma1i2b6_F.mjs} +1 -1
  100. package/browser/esm/B5z-uoALcLY2ABTo.mjs +27 -0
  101. package/{cdn/assets/Bv_96nwOEMHN9Sa0.js → browser/esm/B72sK2NRGAke-aCk2.mjs} +27 -29
  102. package/{cdn/assets/DQ4o4dG7gWbL1X8F.js → browser/esm/B8q1hrKv7LAL4xmM2.mjs} +2 -2
  103. package/{cdn/assets/DIQf1pX-j-dWQu_e.js → browser/esm/BCQJVniXgm81YQ0v2.mjs} +141 -140
  104. package/browser/esm/{CR3jgkduTLczbMjH2.mjs → BCcbek_TFOdgqxXq.mjs} +1 -1
  105. package/browser/esm/{1guzFZp1LHz_FwfL.mjs → BEb3QhWwGW8rErZy.mjs} +1 -1
  106. package/browser/esm/{CU1d8OvDv5TU6fSd.mjs → BGRNyE5ar4c3ggrS.mjs} +465 -366
  107. package/browser/esm/{fJ1McMt7xzRA_lUX.mjs → BHIVjD6BdBS3BAWp.mjs} +15 -15
  108. package/browser/esm/BH_qL-oGqwG-7JKF.mjs +87746 -0
  109. package/browser/esm/BJ26E2DhS1Jz4nUY2.mjs +514 -0
  110. package/browser/esm/BJVcTpMN-u5XhMVE2.mjs +47 -0
  111. package/browser/esm/BNgf4HZDOKYBkvL3.mjs +15495 -0
  112. package/browser/esm/BOMJTicRKnx01hw-.mjs +155 -0
  113. package/browser/esm/{8V-VceXEjpADM8qK2.mjs → BPZxx-OH0wACHLsN2.mjs} +1 -1
  114. package/browser/esm/BQIRHi8T3P5MZtan.mjs +15 -0
  115. package/browser/esm/{Dc0BDcQUGy_WIVFa.mjs → BQhVWbI9uag9iRfX2.mjs} +1 -1
  116. package/{cdn/assets/D_t53-8k73CNpV-p2.js → browser/esm/BSWXx2rKOMPxLLs8.mjs} +88 -72
  117. package/browser/esm/{CJPemkFUzhcAD_qR.mjs → BUjTEjAeByh6MKpn.mjs} +1 -1
  118. package/{cdn/assets/B5ZqqASTcBEV5L9K.js → browser/esm/BUokT-PbfvYzD63f2.mjs} +1 -1
  119. package/browser/esm/BYAZ3XZq8XXkOulw.mjs +758 -0
  120. package/browser/esm/BYPIn5AkddMzMcsa2.mjs +117 -0
  121. package/browser/esm/{CH0of3GZTzHviuQV.mjs → BcPnGFFKCddWgOch.mjs} +1 -1
  122. package/browser/esm/{BCkXtOM3yKocv7L-2.mjs → BgwzL8v2pmR5HJXW.mjs} +1 -1
  123. package/browser/esm/BiomOxscV1M0Uw2n.mjs +37 -0
  124. package/browser/esm/{DTaVECXVrgvC48BE.mjs → Bj42pxe5AuY4bF2e.mjs} +3 -3
  125. package/browser/esm/{DBL3Qp5jyPrFg7KI2.mjs → BmC-_QeQ-53oyorq2.mjs} +1 -1
  126. package/browser/esm/{DW72HwfnJtQxzoGa.mjs → BnHE1Z6WkOfTWheU2.mjs} +2 -2
  127. package/{cdn/assets/BHBJtVTiQByD_y9j2.js → browser/esm/BoWCDK44X4tp02_4.mjs} +2 -2
  128. package/browser/esm/{DVZ_UnchuMRveDG32.mjs → Bq7qy-C7tVkiIaDE2.mjs} +42 -4
  129. package/browser/esm/{Cc5IufffX4N-8QpE.mjs → BrzXFBoYDjcG3ct8.mjs} +3 -3
  130. package/browser/esm/{BOl4FzJRD7MplCU72.mjs → BsY_DyFxoqjRHTv02.mjs} +1 -1
  131. package/{cdn/assets/COA_SZY2x8q6t4BD.js → browser/esm/Bsfof8nD-exhrNwn.mjs} +7 -6
  132. package/browser/esm/BtC6lEbd98TeKGsX2.mjs +298 -0
  133. package/browser/esm/BuoHLVUSwf-mq0hg2.mjs +32 -0
  134. package/browser/esm/{R5bs6kCQSZmsCXz-.mjs → BwbR2Dao5LgLYQgV.mjs} +1 -1
  135. package/browser/esm/ByQakLd0YFwc0Lgl.mjs +91 -0
  136. package/browser/esm/{DuPdSe-EXFTx9dsc2.mjs → C-97pwItkHA3s5rD2.mjs} +16 -16
  137. package/browser/esm/{DMLwXmjo28k_iNEU.mjs → C02og4vKxq9qpIUA.mjs} +1866 -1401
  138. package/{cdn/assets/BykiUmcpDgSRNQI1.js → browser/esm/C0HHZ3XLqp0LgRuW.mjs} +1 -1
  139. package/browser/esm/C213T1hhBphljJTF2.mjs +19 -0
  140. package/browser/esm/{Dnx3_xXfRlD6ECfZ2.mjs → C3A-yJ12PN-CPPnI2.mjs} +5 -5
  141. package/browser/esm/{DQ-0yyFAwoWtxmhV2.mjs → C5Oex2msskTvaCQ92.mjs} +1 -1
  142. package/{cdn/assets/8f9hCbpXTTYEgG31.js → browser/esm/C5u9ds7LUh9JJEbW2.mjs} +2 -2
  143. package/browser/esm/{BVRzmIk5PujkT_Ap.mjs → C6D3gk0GBvvDjawh.mjs} +563 -534
  144. package/browser/esm/{BHmYoIIbNW3GdcqV2.mjs → C7b3GyO7FCiMLeyn.mjs} +1 -1
  145. package/browser/esm/{BqTFwWLbXXJ0Fu-X2.mjs → C8qOmdaHh4WQkzEy.mjs} +2 -2
  146. package/browser/esm/CD44l4eg_lxr7kgn2.mjs +115 -0
  147. package/{cdn/assets/iXWgTu3qpYZHcx1J.js → browser/esm/CDxmuF7Iay8T4cnU.mjs} +963 -946
  148. package/browser/esm/CS38A8yr4eKvdDZm.mjs +159 -0
  149. package/browser/esm/CSu0Md4a1JIZrirV.mjs +3324 -0
  150. package/{cdn/assets/BMRav2VAqEzDSp3r.js → browser/esm/CU1J-I76aVm-KPP6.mjs} +37 -3
  151. package/{cdn/assets/D9-wpGVbTS9rRpxx.js → browser/esm/CVbPAnmNN3TxMkq4.mjs} +1 -1
  152. package/browser/esm/{qG5zdZZAe6mQIJo32.mjs → CXvcyGN4L9iDr1LK2.mjs} +5 -5
  153. package/{cdn/assets/CopfZ7Y1Zn_PDNXK.js → browser/esm/CZN6c8yBDjLVTVpH.mjs} +16 -11
  154. package/{cdn/assets/DOsbSsKsexrBoeXa2.js → browser/esm/C__tNzwz0i7bQrSu2.mjs} +17 -18
  155. package/browser/esm/CcPFyWALYlJWf17T2.mjs +58 -0
  156. package/browser/esm/{47Yv4X226-93If7L.mjs → CcuNkPxT6rqElgbZ2.mjs} +1 -1
  157. package/{cdn/assets/C1ZePT2B182vSnxW.js → browser/esm/Cjbksosgv7NZFNE0.mjs} +1 -1
  158. package/browser/esm/{BD7RxHQgrqy_4tb5.mjs → CjxOVBbWLFeUZza82.mjs} +2 -2
  159. package/browser/esm/CksEMRqAqI-_nekb.mjs +149 -0
  160. package/{cdn/assets/DZDynaLqNeVaDoiH2.js → browser/esm/CnB5AuoIz-49NXD_.mjs} +3 -3
  161. package/{cdn/assets/DRc_Wi5c7WdKHTVN.js → browser/esm/Co06Uf-tv1IuVQhe.mjs} +6 -6
  162. package/browser/esm/{D6SKy2BtcWkhfiA02.mjs → CpzLNwtfx0Zd0OZ0.mjs} +2 -5
  163. package/{cdn/assets/Cbw0JeJURvQyxIoa.js → browser/esm/CwRAK6IVjIYuwofE.mjs} +1 -1
  164. package/{cdn/assets/CtXoSHbCUKMY-tSJ2.js → browser/esm/CyS1VLOdAweeZsMV.mjs} +48 -2
  165. package/browser/esm/CyomJv3_vWy4trRe2.mjs +33 -0
  166. package/browser/esm/{Be4QC65cR8N84rTn.mjs → D-1WiFWkKNPWXppx2.mjs} +1 -1
  167. package/browser/esm/D16eCDM3k1_Fk-MN.mjs +225 -0
  168. package/browser/esm/{DZbR5R1fNikjgqYb.mjs → D3Qv3--VfvVHImXW.mjs} +1 -1
  169. package/{cdn/assets/BJEpPEyFWtLzMIq-2.js → browser/esm/D5j8qMZCamJQ82pi.mjs} +1809 -1038
  170. package/{cdn/assets/CdMv3f8Gyxh8q2RR.js → browser/esm/D718rIGL3d_m1mjm2.mjs} +1 -1
  171. package/browser/esm/{BPv6Pw1hW-sV5Fya.mjs → DAhlDEV6ehTRvrj72.mjs} +1 -1
  172. package/browser/esm/{CEN8dYSpN2oew8HH.mjs → DB_I2ygTnDxYiYyc.mjs} +526 -350
  173. package/browser/esm/{D4VqLbEWag8lTWzC2.mjs → DGde1GUi2j-ZUPJW2.mjs} +121 -94
  174. package/browser/esm/DJUnZsVsvwRT_Onq2.mjs +8 -0
  175. package/browser/esm/{DXWmgQSeh0_HDxZj.mjs → DLgM7RXEEfx33zms.mjs} +4 -4
  176. package/browser/esm/DNxL1aQIN6J2PLV7.mjs +35 -0
  177. package/browser/esm/{BjTf3XA9Swj0ngpH.mjs → DRRx9F2h6V-Q957j.mjs} +2 -2
  178. package/{cdn/assets/hFSDx-LnUOObv-6h.js → browser/esm/DZGMsbIACs9TKYrM2.mjs} +2 -2
  179. package/browser/esm/{DFdU1DsC1lXOrejZ.mjs → Dcpd3kkjvidrDQuN.mjs} +1814 -1737
  180. package/browser/esm/{7rixDGGrR72lXkMV.mjs → DevyWm6bXV7lW2dr.mjs} +97 -54
  181. package/browser/esm/{Gy0CHZTvn4hY-rkx2.mjs → DfIwClWz03Qw38-O.mjs} +1 -1
  182. package/{cdn/assets/CAPgMrAKg07EREFD2.js → browser/esm/Dg7wE0RZdHeJv537.mjs} +1 -1
  183. package/browser/esm/Dj_S0P34nk_fjFoh2.mjs +427 -0
  184. package/browser/esm/DjyzSKZNfvxPmFqi.mjs +3342 -0
  185. package/browser/esm/{9_bymSfTn_rR_v6W.mjs → DlHJ7zkV6AMCtYPP.mjs} +6 -6
  186. package/browser/esm/{B1NoGosH2YQh01g7.mjs → DnLi57ylUOd3DUek.mjs} +6 -6
  187. package/{cdn/assets/BVjXdv_wkL1x_8ZJ2.js → browser/esm/DoAKAH3cmECZGboo2.mjs} +1 -1
  188. package/browser/esm/Dok4MRpMgkcsNzp4.mjs +589 -0
  189. package/browser/esm/{Blc1T4zLkp8bRC_n2.mjs → DpORFFFF3LUx_zsT2.mjs} +22 -22
  190. package/{cdn/assets/DvlpP6sUZ9Qzl9s22.js → browser/esm/Ds5mE3-q83ZhE-2T.mjs} +193 -172
  191. package/browser/esm/Du5dlbWtpboIrJk-2.mjs +394 -0
  192. package/{cdn/assets/Chq4BwbjH0sbIkJN2.js → browser/esm/DuMveAGZv1j1YAwO.mjs} +28 -13
  193. package/browser/esm/{C6CK_4GD9IpxKglV2.mjs → GETgdmj9xZWcFrIC2.mjs} +2391 -2900
  194. package/browser/esm/GJUYPKfNptRZyU9r.mjs +267 -0
  195. package/browser/esm/{vcRSnmAqjwKglEkY.mjs → JDCQtP0lkncrmnpC2.mjs} +2 -2
  196. package/browser/esm/{BceIETi6JJRW6Ss62.mjs → OsRyVy3M_rNtmU472.mjs} +13 -13
  197. package/{cdn/assets/DrUEYcXg6N2D2s1Z.js → browser/esm/OtaDVRqZVyi7IBBa.mjs} +51 -11
  198. package/browser/esm/OyyHiDjohIf4lZX62.mjs +119 -0
  199. package/browser/esm/QEPUcBp4VkPz75h8.mjs +637 -0
  200. package/{cdn/assets/CpnA5TZRkPDt4HnM2.js → browser/esm/R0Xd51SJLUebJwYv.mjs} +2 -2
  201. package/browser/esm/{DMX-ZlC_ljcf7oUN.mjs → S4MMwlNd4kcK3RDU.mjs} +1 -1
  202. package/browser/esm/{CsufM5aF6VTLKDWM.mjs → VaST17rbOSkMsGyn.mjs} +12 -12
  203. package/browser/esm/{DtXC6uPF2LLktqFE.mjs → WfqSQXib2MuH663g.mjs} +2 -2
  204. package/browser/esm/{CG5v2hAwGR5Ptufn.mjs → XuGWliVSRCNi5it12.mjs} +1 -1
  205. package/browser/esm/Z83G4i9Tvq4z2kCB.mjs +87 -0
  206. package/browser/esm/_cZz4ZhEEr54LYNe2.mjs +32 -0
  207. package/browser/esm/{NekeSGoazNCraGNC2.mjs → cDMkMgN5tB-wni7c2.mjs} +15 -15
  208. package/{cdn/assets/Clfp7SznkOrJoQvL.js → browser/esm/efVOgresgMXMdh7J2.mjs} +3 -3
  209. package/{cdn/assets/CGqvy5LwQ4z9J2oD.js → browser/esm/gXemYPUoPvaUd055.mjs} +1 -1
  210. package/browser/esm/index.mjs +6 -6
  211. package/browser/esm/kef_IwcJES4VXcNa2.mjs +238 -0
  212. package/browser/esm/{oYdWyqsKo9ejAdVm.mjs → lfNgkSweNYs6v7g2.mjs} +2 -2
  213. package/browser/esm/{BLcn1kGRsjURZSzk.mjs → lfNgkSweNYs6v7g22.mjs} +2 -2
  214. package/{cdn/assets/EwzqnZl1lTr56hH-.js → browser/esm/mbUWaIl3SJkdbWx02.mjs} +1 -1
  215. package/browser/esm/vDg2R-517z6mPR3B2.mjs +280 -0
  216. package/browser/esm/{CfvrjQGuf7vXiQCB.mjs → vP8Rb-lgzeerBAx4.mjs} +1 -1
  217. package/cdn/assets/0uSu6ChH_CTmXM2q2.js +226 -0
  218. package/{browser/esm/BCZjYGV8AqIZghBH.mjs → cdn/assets/5SHS088DeaZ82qmD.js} +69 -4
  219. package/cdn/assets/8rILuc7bVIGEeb97.js +394 -0
  220. package/cdn/assets/9ra2y9Srlg_Pw7Q32.js +590 -0
  221. package/cdn/assets/B-ylRvlizyArIFrd.js +15496 -0
  222. package/{browser/esm/BDkVAo0CDCTE04ZJ2.mjs → cdn/assets/B08GCyGdLNiXtb_R2.js} +1 -1
  223. package/cdn/assets/B0gZ5e38MXWbEDS_.js +25 -0
  224. package/cdn/assets/{C8mUyjJ26jsHGl_D.js → B15uSTYXbbRVKP0X2.js} +7 -7
  225. package/cdn/assets/{BixsQGDDf3Iv_PtW2.js → B1Lxf24mP-fwn03r2.js} +1866 -1401
  226. package/cdn/assets/{D3G3tI3DVCUF3Gdk2.js → B45vVm2Ma1i2b6_F.js} +1 -1
  227. package/cdn/assets/B63SfOuKJt36aTr_.js +8 -0
  228. package/cdn/assets/B69EK_yDF3V8Rq2r2.js +299 -0
  229. package/{browser/esm/Bv_96nwOEMHN9Sa02.mjs → cdn/assets/B72sK2NRGAke-aCk.js} +27 -29
  230. package/cdn/assets/{DW7JlG-SQEdLYNar2.js → B7SJVFUHxy16UJRA.js} +41 -3
  231. package/{browser/esm/DQ4o4dG7gWbL1X8F2.mjs → cdn/assets/B8q1hrKv7LAL4xmM.js} +2 -2
  232. package/cdn/assets/{DVS_5oDniuAFH3vT2.js → BAbRLjxqebqVPyto2.js} +2451 -2960
  233. package/cdn/assets/BCOGONuWSq4hgADu.js +4426 -0
  234. package/cdn/assets/{CR3jgkduTLczbMjH.js → BCcbek_TFOdgqxXq2.js} +1 -1
  235. package/cdn/assets/{1guzFZp1LHz_FwfL2.js → BEb3QhWwGW8rErZy2.js} +1 -1
  236. package/cdn/assets/BHpE1nCbJEbRdzIG2.js +118 -0
  237. package/cdn/assets/BJVcTpMN-u5XhMVE.js +47 -0
  238. package/cdn/assets/{B55nrhIK6gAAu4ZA.js → BLpNuslYLGia3h9t2.js} +2 -2
  239. package/cdn/assets/{8V-VceXEjpADM8qK.js → BPZxx-OH0wACHLsN.js} +1 -1
  240. package/cdn/assets/BQIRHi8T3P5MZtan2.js +15 -0
  241. package/cdn/assets/{Dc0BDcQUGy_WIVFa.js → BQhVWbI9uag9iRfX.js} +1 -1
  242. package/{browser/esm/D_t53-8k73CNpV-p.mjs → cdn/assets/BSWXx2rKOMPxLLs82.js} +88 -72
  243. package/cdn/assets/{CBuvbUg67ah_3BOZ.js → BUeKY15yUtNX2nYg.js} +2 -2
  244. package/cdn/assets/{CJPemkFUzhcAD_qR.js → BUjTEjAeByh6MKpn.js} +1 -1
  245. package/{browser/esm/B5ZqqASTcBEV5L9K2.mjs → cdn/assets/BUokT-PbfvYzD63f.js} +1 -1
  246. package/cdn/assets/BWbSIhQVBaXJNFgl.js +3324 -0
  247. package/cdn/assets/{tVOVNvOs6ro8FXqa2.js → BZDRat2zTkUEg9cR.js} +16 -16
  248. package/cdn/assets/{c6VvwMHfXubjjtyj.js → BeFqINcF0gIgBnB1.js} +16 -16
  249. package/cdn/assets/{DJwQ9abZkyFO9Doy.js → Beyy1fJJeov2iYL4.js} +4 -4
  250. package/cdn/assets/{BCkXtOM3yKocv7L-.js → BgwzL8v2pmR5HJXW2.js} +1 -1
  251. package/cdn/assets/BiomOxscV1M0Uw2n.js +37 -0
  252. package/cdn/assets/{DBL3Qp5jyPrFg7KI.js → BmC-_QeQ-53oyorq.js} +1 -1
  253. package/{browser/esm/BHBJtVTiQByD_y9j.mjs → cdn/assets/BoWCDK44X4tp02_42.js} +2 -2
  254. package/cdn/assets/{BOl4FzJRD7MplCU7.js → BsY_DyFxoqjRHTv0.js} +1 -1
  255. package/{browser/esm/COA_SZY2x8q6t4BD.mjs → cdn/assets/Bsfof8nD-exhrNwn.js} +7 -6
  256. package/cdn/assets/{BzUU8y1IFjREzgog2.js → BsiuCRJjX2LRrDF22.js} +20 -28
  257. package/cdn/assets/BuPGWNRZMMyn4fm8.js +268 -0
  258. package/cdn/assets/Bub12rk6wWVZVNx62.js +496 -0
  259. package/cdn/assets/BuoHLVUSwf-mq0hg.js +32 -0
  260. package/cdn/assets/{DbEGszSW_J_k96KJ.js → ButSau4Lf36Oe3GD.js} +2 -2
  261. package/cdn/assets/{R5bs6kCQSZmsCXz-2.js → BwbR2Dao5LgLYQgV2.js} +1 -1
  262. package/{browser/esm/B0HA_dHcr0kKfudQ.mjs → cdn/assets/C-F-eIvIRbCAMD662.js} +194 -171
  263. package/cdn/assets/{BhDLR-jtbOOG-tl12.js → C-KWjRT0CUb-bkvj2.js} +8 -8
  264. package/{browser/esm/BykiUmcpDgSRNQI12.mjs → cdn/assets/C0HHZ3XLqp0LgRuW2.js} +1 -1
  265. package/cdn/assets/C213T1hhBphljJTF.js +19 -0
  266. package/cdn/assets/{Dnx3_xXfRlD6ECfZ.js → C3A-yJ12PN-CPPnI.js} +5 -5
  267. package/cdn/assets/C4vZWmW5DZLQTTAx.js +758 -0
  268. package/cdn/assets/{DQ-0yyFAwoWtxmhV2.js → C5Oex2msskTvaCQ9.js} +1 -1
  269. package/{browser/esm/8f9hCbpXTTYEgG312.mjs → cdn/assets/C5u9ds7LUh9JJEbW.js} +2 -2
  270. package/cdn/assets/{BHmYoIIbNW3GdcqV.js → C7b3GyO7FCiMLeyn2.js} +1 -1
  271. package/cdn/assets/C8W7e-O1V1Mo2HOp.js +35 -0
  272. package/cdn/assets/{BqTFwWLbXXJ0Fu-X.js → C8qOmdaHh4WQkzEy.js} +2 -2
  273. package/cdn/assets/{Ce5A_D4YBgi_s2KF.js → CEyEKBYpjE5GGcmE.js} +13 -13
  274. package/{browser/esm/Dg5wjQp0fArKXlM3.mjs → cdn/assets/CJoCbCtXkTbj6-nC.js} +16 -11
  275. package/cdn/assets/{j8nXVEYbO2kPuEYQ.js → CLEhV4ZVh2Jf4WLI.js} +3 -3
  276. package/{browser/esm/BMRav2VAqEzDSp3r2.mjs → cdn/assets/CU1J-I76aVm-KPP6.js} +37 -3
  277. package/{browser/esm/D9-wpGVbTS9rRpxx.mjs → cdn/assets/CVbPAnmNN3TxMkq4.js} +1 -1
  278. package/cdn/assets/{2CuCH0wi9XPgVzE42.js → CWIp4JC2SCM6lg-s.js} +11 -9
  279. package/cdn/assets/{BKEzd89UphJ8q1pp2.js → CXKguOBpJrsoXPTQ.js} +485 -386
  280. package/cdn/assets/CXgMJ_MuMQRu0isj2.js +159 -0
  281. package/cdn/assets/{qG5zdZZAe6mQIJo3.js → CXvcyGN4L9iDr1LK.js} +5 -5
  282. package/cdn/assets/{DnzDlqizzNkbhJP7.js → CYFmWcVbnUCDPJ8m.js} +2 -2
  283. package/cdn/assets/{CF8m5SqeMaRkGIYM.js → C_W3L9-im26Qc-Ub.js} +2 -2
  284. package/cdn/assets/Cb7x4GW2rRvj_q2Z.js +87 -0
  285. package/cdn/assets/CcOMQhQN8PPKQulw2.js +428 -0
  286. package/cdn/assets/CcPFyWALYlJWf17T.js +58 -0
  287. package/{browser/esm/Bl6bX86tSq8hfyb2.mjs → cdn/assets/CcXDdl0SsmyEFtmU.js} +965 -944
  288. package/cdn/assets/{47Yv4X226-93If7L2.js → CcuNkPxT6rqElgbZ.js} +1 -1
  289. package/cdn/assets/CdDTtABobc5txUF6.js +149 -0
  290. package/cdn/assets/CdTHBpWoW1Fu4Dg_.js +27 -0
  291. package/cdn/assets/{CT3G9YRPVfKtHWwf2.js → Cdm7E0sw56lpdqRU2.js} +17 -17
  292. package/cdn/assets/{mtrwY1hjJeYlmzC-.js → Cf-bndowUtxZ6tmG.js} +3 -3
  293. package/cdn/assets/{DaBczM5xU9ev5_or.js → CiTCEuoCSDCy9khR.js} +2 -2
  294. package/{browser/esm/C1ZePT2B182vSnxW2.mjs → cdn/assets/Cjbksosgv7NZFNE02.js} +1 -1
  295. package/cdn/assets/{DvItgGbf8IOWPyxd.js → CmRLwDXiK3woZrVI.js} +15461 -16112
  296. package/{browser/esm/DRc_Wi5c7WdKHTVN2.mjs → cdn/assets/Co06Uf-tv1IuVQhe.js} +6 -6
  297. package/cdn/assets/Cpkl0peJbfEXl6ta2.js +239 -0
  298. package/cdn/assets/{D6SKy2BtcWkhfiA0.js → CpzLNwtfx0Zd0OZ02.js} +2 -5
  299. package/cdn/assets/{CpYlf4dXa_V2v-iS2.js → CukMw9Sc4iO21aRQ2.js} +1109 -955
  300. package/cdn/assets/{EjOJX5m8OEL-IjPB.js → CwGEi_5ErUTrkWRj.js} +7 -7
  301. package/{browser/esm/Cbw0JeJURvQyxIoa.mjs → cdn/assets/CwRAK6IVjIYuwofE2.js} +1 -1
  302. package/cdn/assets/{-2S675KWulPRlVNb2.js → Cx1HsOCOdZoKJDEN2.js} +14 -14
  303. package/{browser/esm/BqwvP0318zI2izeL2.mjs → cdn/assets/Cy6Cst4s2vE_WWKK2.js} +27 -26
  304. package/{browser/esm/CtXoSHbCUKMY-tSJ.mjs → cdn/assets/CyS1VLOdAweeZsMV2.js} +48 -2
  305. package/cdn/assets/CyomJv3_vWy4trRe.js +33 -0
  306. package/cdn/assets/{Be4QC65cR8N84rTn2.js → D-1WiFWkKNPWXppx.js} +1 -1
  307. package/cdn/assets/{DZbR5R1fNikjgqYb.js → D3Qv3--VfvVHImXW.js} +1 -1
  308. package/cdn/assets/D6B6VvRh1cfT2e-M2.js +116 -0
  309. package/{browser/esm/CdMv3f8Gyxh8q2RR2.mjs → cdn/assets/D718rIGL3d_m1mjm.js} +1 -1
  310. package/cdn/assets/D7WMzCfJnKIfTbdg.js +280 -0
  311. package/cdn/assets/{C_Io1QC4CeLGRBrz.js → D8sc6gCXnfpn7W79.js} +2 -2
  312. package/cdn/assets/DA4QV7VUyNUEfx1k2.js +156 -0
  313. package/cdn/assets/{BPv6Pw1hW-sV5Fya.js → DAhlDEV6ehTRvrj7.js} +1 -1
  314. package/cdn/assets/{gspQcUnmlRIwG609.js → DBKHpCvbeQU-Y4eS2.js} +5 -5
  315. package/cdn/assets/{CEN8dYSpN2oew8HH2.js → DB_I2ygTnDxYiYyc2.js} +526 -350
  316. package/cdn/assets/{DLEdaT0MmrOxMa2h2.js → DKwpjlUd2pFOI9yp2.js} +64 -64
  317. package/cdn/assets/{BNybEGR813e3aNIv.js → DW3_Jr-4VdZZqNEg.js} +1817 -1740
  318. package/{browser/esm/hFSDx-LnUOObv-6h2.mjs → cdn/assets/DZGMsbIACs9TKYrM.js} +2 -2
  319. package/cdn/assets/{Gy0CHZTvn4hY-rkx.js → DfIwClWz03Qw38-O2.js} +1 -1
  320. package/{browser/esm/CAPgMrAKg07EREFD.mjs → cdn/assets/Dg7wE0RZdHeJv5372.js} +1 -1
  321. package/{browser/esm/BVjXdv_wkL1x_8ZJ2.mjs → cdn/assets/DoAKAH3cmECZGboo2.js} +1 -1
  322. package/cdn/assets/FAaqx6EbN4JxNuNL2.js +87746 -0
  323. package/{browser/esm/CPUlpDM6aAzZzCat2.mjs → cdn/assets/FHIg3Yb5Rn05W1F22.js} +142 -139
  324. package/{browser/esm/CQM87ZBN7Yzn4Yxr.mjs → cdn/assets/FbLFNYdTqRtQ7QiS.js} +9 -9
  325. package/cdn/assets/{vcRSnmAqjwKglEkY2.js → JDCQtP0lkncrmnpC.js} +2 -2
  326. package/cdn/assets/{D-fJXasEYyfRUcj2.js → KOiR-1SNAX7AiEes.js} +3 -3
  327. package/cdn/assets/KS5XJUWdKvEezJfs2.js +264 -0
  328. package/{browser/esm/B4iT_CduJeJunwBc.mjs → cdn/assets/OTQWLENoZ1cSiDQb2.js} +28 -13
  329. package/{browser/esm/DrUEYcXg6N2D2s1Z2.mjs → cdn/assets/OtaDVRqZVyi7IBBa2.js} +51 -11
  330. package/cdn/assets/OyyHiDjohIf4lZX6.js +119 -0
  331. package/cdn/assets/{DKeLjEJPO9nT3bpr.js → PLFw1pLjdLQLrlB0.js} +242 -242
  332. package/cdn/assets/S4MMwlNd4kcK3RDU.js +24 -0
  333. package/cdn/assets/S4MMwlNd4kcK3RDU2.js +24 -0
  334. package/cdn/assets/{CG5v2hAwGR5Ptufn2.js → XuGWliVSRCNi5it1.js} +1 -1
  335. package/cdn/assets/_cZz4ZhEEr54LYNe.js +32 -0
  336. package/cdn/assets/{DCnA2-zB7W_QB-tD2.js → bQ6G23JQrt4l2Ls92.js} +566 -537
  337. package/{browser/esm/Clfp7SznkOrJoQvL.mjs → cdn/assets/efVOgresgMXMdh7J.js} +3 -3
  338. package/{browser/esm/CGqvy5LwQ4z9J2oD2.mjs → cdn/assets/gXemYPUoPvaUd055.js} +1 -1
  339. package/cdn/assets/{UYgwKnPX3US3Cj2k2.js → hHkEq7qn0rj2XKD82.js} +75 -48
  340. package/cdn/assets/{D1MA2ed2cLMt7hV9.js → hqW1sMr576y2S1qX.js} +41 -41
  341. package/cdn/assets/mI8tvfP8ed2Zerre.js +3344 -0
  342. package/{browser/esm/EwzqnZl1lTr56hH-2.mjs → cdn/assets/mbUWaIl3SJkdbWx0.js} +1 -1
  343. package/{browser/esm/RW23HF8taEtW8q9D.mjs → cdn/assets/n_NkstgVVwl2iAnp.js} +2 -2
  344. package/cdn/assets/ryzcqI-93l1HBuTe2.js +91 -0
  345. package/cdn/assets/{CfvrjQGuf7vXiQCB2.js → vP8Rb-lgzeerBAx42.js} +1 -1
  346. package/cdn/assets/{CHttngK66Ido5dWW.js → w65zHFqjAp_NlbXg2.js} +7 -7
  347. package/cdn/index.js +2 -2
  348. package/package.json +3 -3
  349. package/browser/cjs/2zXD3NPfuQT2KSZq.cjs +0 -7
  350. package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
  351. package/browser/cjs/B19QM3SGmPKKwD_o.cjs +0 -1
  352. package/browser/cjs/B4JJfKSI4ppwU8552.cjs +0 -1
  353. package/browser/cjs/B5YBx0GqLor3i0O1.cjs +0 -1
  354. package/browser/cjs/BC2gCQkR1iykfAuC.cjs +0 -1
  355. package/browser/cjs/BEVqcFGFU6Ri9y8T.cjs +0 -5
  356. package/browser/cjs/BEzaum_kgG4yAOx0.cjs +0 -1
  357. package/browser/cjs/BF-38Z7Z0FZOPl192.cjs +0 -1
  358. package/browser/cjs/BIQZDBQfv3Qm5iC8.cjs +0 -4
  359. package/browser/cjs/BSCgCfORdZz1Ii5S.cjs +0 -2
  360. package/browser/cjs/BZr-IqNS1skh1hr6.cjs +0 -21
  361. package/browser/cjs/BfzzZ9IR27ZPzj-8.cjs +0 -3
  362. package/browser/cjs/Bgke3PtMSF2Iaen4.cjs +0 -1
  363. package/browser/cjs/BnccBYHCCq9TGFx4.cjs +0 -8
  364. package/browser/cjs/BwLx9ix5Sq7suAYP2.cjs +0 -1
  365. package/browser/cjs/C-HOJozu5NgCil1q.cjs +0 -1
  366. package/browser/cjs/C2oTW2DjZypuqq7x.cjs +0 -1
  367. package/browser/cjs/C6yxQPAEgcGWAhYR.cjs +0 -33
  368. package/browser/cjs/C9C-pr-T_ThweQX92.cjs +0 -1
  369. package/browser/cjs/CPgCih_KEqnUZ9Rv.cjs +0 -3
  370. package/browser/cjs/CSNCOmYEOR-iTJ7K.cjs +0 -5
  371. package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +0 -1
  372. package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +0 -1
  373. package/browser/cjs/CcneNtiqtKppCa-p.cjs +0 -57
  374. package/browser/cjs/CeF0DZ-k4DB8M47I.cjs +0 -1
  375. package/browser/cjs/Clu7XiAsCB48GDXN2.cjs +0 -1
  376. package/browser/cjs/CojEXZgX08waZOoq.cjs +0 -1
  377. package/browser/cjs/CrDTTLE9EvaGDSD4.cjs +0 -88
  378. package/browser/cjs/Cty5pi0fwToP1GWe.cjs +0 -7
  379. package/browser/cjs/CvV18ZJgssoHMkdf2.cjs +0 -2
  380. package/browser/cjs/Cy-4IMt-AbR-ifP3.cjs +0 -126
  381. package/browser/cjs/CyGzzWYDy-IniKCq2.cjs +0 -7
  382. package/browser/cjs/CzgwTfy2072Dmt5u.cjs +0 -1
  383. package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
  384. package/browser/cjs/DFHxNnJ-lHtv0hIq.cjs +0 -1
  385. package/browser/cjs/DH3WXPfGHwWJW0nH.cjs +0 -1
  386. package/browser/cjs/DNCC-QNp2I7saV-I.cjs +0 -1
  387. package/browser/cjs/DNy-UU3NKNqQQngF.cjs +0 -1
  388. package/browser/cjs/DPjEO7dwhCFd8DHR2.cjs +0 -2
  389. package/browser/cjs/DfMJOaJ0GcUiSn4Q.cjs +0 -1
  390. package/browser/cjs/DsFZgtSQpC75d1M02.cjs +0 -1
  391. package/browser/cjs/DvSvfeo9V0Abfd3q2.cjs +0 -1
  392. package/browser/cjs/E-IqDztfMb_xdszH.cjs +0 -1
  393. package/browser/cjs/ElcoSB--cCpS6i7R2.cjs +0 -1
  394. package/browser/cjs/KNCocKN9uPR0tvUS.cjs +0 -1
  395. package/browser/cjs/Kr8f1inOTt-MICaP2.cjs +0 -1
  396. package/browser/cjs/Kvn916ebqGc4t6hv2.cjs +0 -1
  397. package/browser/cjs/PM3PrEWG3WHKxaDx.cjs +0 -1
  398. package/browser/cjs/YG320hBA20Dl3HoU2.cjs +0 -1
  399. package/browser/cjs/bIaGoYEDSBCrAaB6.cjs +0 -1
  400. package/browser/cjs/fqTQ_p3ehzUvc1tF2.cjs +0 -1
  401. package/browser/cjs/h3dw1jAp2J5Pu4p32.cjs +0 -1
  402. package/browser/cjs/i2VboqjlOcozI9MQ.cjs +0 -12
  403. package/browser/cjs/jev6VGWTdgEgm4Yk2.cjs +0 -1
  404. package/browser/cjs/ppSJKdLn646BZOzg.cjs +0 -1
  405. package/browser/cjs/xBcvszV6x7ys-m532.cjs +0 -1
  406. package/browser/esm/At60x9FEPePwPP_J.mjs +0 -51151
  407. package/browser/esm/B4h6iO7hQ9lCR7kj.mjs +0 -11273
  408. package/browser/esm/BBtOlJMVlsWorNJH.mjs +0 -824
  409. package/browser/esm/BQDXkeSabbxB5DUB2.mjs +0 -47
  410. package/browser/esm/BUCKq_2lHPd1ndvw.mjs +0 -149
  411. package/browser/esm/BX4f6i2WMBMKFVCq.mjs +0 -99
  412. package/browser/esm/BZsx0QHg1RZlM9ZN.mjs +0 -15
  413. package/browser/esm/BhxX7CZWSOlV2Dsz.mjs +0 -224
  414. package/browser/esm/BhzLZRz2N8RxjQ_U.mjs +0 -34
  415. package/browser/esm/BkSb_vyWe-AhyEDa.mjs +0 -4423
  416. package/browser/esm/Bp9qFBIcpIGXvMgo.mjs +0 -134
  417. package/browser/esm/C0rS1uBqfsj-gPR8.mjs +0 -152
  418. package/browser/esm/CGGJWgWSPZ0aP_C3.mjs +0 -87
  419. package/browser/esm/CGyydD3tRb0ik50l2.mjs +0 -20
  420. package/browser/esm/CY1zykikO58_ADk8.mjs +0 -3188
  421. package/browser/esm/Cb-FUOYcyRSkHG6u2.mjs +0 -238
  422. package/browser/esm/Cd8HXAJlflkkTXxc.mjs +0 -53
  423. package/browser/esm/CfuhUkrvOq11d9FR.mjs +0 -44
  424. package/browser/esm/Ckl3FLCOeqw7yhkP2.mjs +0 -82
  425. package/browser/esm/CpjX81WsWJbXMUoT.mjs +0 -3655
  426. package/browser/esm/DDOO4tcrO4OfMUDe.mjs +0 -25
  427. package/browser/esm/DDUYQ8FPeh1TJU24.mjs +0 -538
  428. package/browser/esm/DVJd6McdAG5udItH.mjs +0 -27
  429. package/browser/esm/DVQNQmjI2PKkwiOw2.mjs +0 -514
  430. package/browser/esm/D_zNx76HGunFi7xJ.mjs +0 -509
  431. package/browser/esm/DfRGH6mEtIVDWEYN2.mjs +0 -304
  432. package/browser/esm/DnuaqN0xfgqzl8qG.mjs +0 -2687
  433. package/browser/esm/nguMxPB9LKexKBRX.mjs +0 -219
  434. package/browser/esm/qzhFT2j-mpQEQnKs.mjs +0 -16386
  435. package/cdn/assets/2UHIeioUPXrwtZy-2.js +0 -83
  436. package/cdn/assets/BAhvL7M7ZcgZ8eDc2.js +0 -48
  437. package/cdn/assets/BM7OqAUEUk-up7_82.js +0 -134
  438. package/cdn/assets/BNuoKAzs4zkxSocG2.js +0 -44
  439. package/cdn/assets/BU6uQhQhpaLElTT82.js +0 -225
  440. package/cdn/assets/BVgTMDEoPgsWFmku.js +0 -510
  441. package/cdn/assets/BWlMK76Aj2d4ygsH.js +0 -538
  442. package/cdn/assets/BZsx0QHg1RZlM9ZN2.js +0 -15
  443. package/cdn/assets/Bl6C6xWT8E6b7OwJ2.js +0 -239
  444. package/cdn/assets/CGyydD3tRb0ik50l.js +0 -20
  445. package/cdn/assets/CH0of3GZTzHviuQV.js +0 -24
  446. package/cdn/assets/CH0of3GZTzHviuQV2.js +0 -24
  447. package/cdn/assets/Crkvq5j5KIa6eTLI2.js +0 -51151
  448. package/cdn/assets/Cv-KXN9kl0UeMezQ.js +0 -824
  449. package/cdn/assets/CvtkpvGzCHhNuwTm.js +0 -16386
  450. package/cdn/assets/D9gETGi23d14kT7u2.js +0 -99
  451. package/cdn/assets/D9joTG0Z2zdWHAEa2.js +0 -4423
  452. package/cdn/assets/DC9obE_EVmxtvXCf.js +0 -11275
  453. package/cdn/assets/DDNivpFWzQ3AIJia.js +0 -2687
  454. package/cdn/assets/DDOO4tcrO4OfMUDe.js +0 -25
  455. package/cdn/assets/DEUY_zuVwmptMX4l.js +0 -150
  456. package/cdn/assets/DTCtbG90ip7Z7LaG.js +0 -220
  457. package/cdn/assets/D_HeH7AJqWoxehn52.js +0 -53
  458. package/cdn/assets/DfRGH6mEtIVDWEYN.js +0 -304
  459. package/cdn/assets/WLUhtyUNK5QJ7Pff.js +0 -34
  460. package/cdn/assets/c7aIqKLOO4pvUsV12.js +0 -220
  461. package/cdn/assets/mtI43hWjdp4E3Z_-.js +0 -152
  462. package/cdn/assets/nmR_PgTW7GrlbHHZ.js +0 -27
  463. package/cdn/assets/vTCuFafvRlSaT9wy.js +0 -87
  464. /package/browser/cjs/{1XrWGMP3GmsQOMIX2.cjs → 1XrWGMP3GmsQOMIX.cjs} +0 -0
  465. /package/browser/cjs/{4nReftSsKWmnRdtf2.cjs → 4nReftSsKWmnRdtf.cjs} +0 -0
  466. /package/browser/cjs/{507hQYooKKjnRzsZ2.cjs → 507hQYooKKjnRzsZ.cjs} +0 -0
  467. /package/browser/cjs/{BAxVLKkxFgI6cXnR.cjs → BAxVLKkxFgI6cXnR2.cjs} +0 -0
  468. /package/browser/cjs/{C2uDl8VIJqh58YF_.cjs → C2uDl8VIJqh58YF_2.cjs} +0 -0
  469. /package/browser/cjs/{CV4KQsHluMqo1I2Q.cjs → CV4KQsHluMqo1I2Q2.cjs} +0 -0
  470. /package/browser/cjs/{CXlzsh_WHCOsErJ12.cjs → CXlzsh_WHCOsErJ1.cjs} +0 -0
  471. /package/browser/cjs/{D8-KovdJ0LjxqCe2.cjs → D8-KovdJ0LjxqCe22.cjs} +0 -0
  472. /package/browser/cjs/{DDnGLOLTqLFsdUDS2.cjs → DDnGLOLTqLFsdUDS.cjs} +0 -0
  473. /package/browser/cjs/{DM7-R_ltoLbA9jde2.cjs → DM7-R_ltoLbA9jde.cjs} +0 -0
  474. /package/browser/cjs/{DNKyaSruDogoBd2H2.cjs → DNKyaSruDogoBd2H.cjs} +0 -0
  475. /package/browser/cjs/{Dx79LP1-YCQg8B87.cjs → Dx79LP1-YCQg8B872.cjs} +0 -0
  476. /package/browser/cjs/{JfM6P_qoQQTWakZf.cjs → JfM6P_qoQQTWakZf2.cjs} +0 -0
  477. /package/browser/cjs/{CbLXP9WY38wTcGn5.cjs → NcNz8RfT5V889CMT2.cjs} +0 -0
  478. /package/browser/cjs/{z_rZE1OHFPpdGBh42.cjs → z_rZE1OHFPpdGBh4.cjs} +0 -0
@@ -0,0 +1,4426 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.8.0-beta.3
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { i as e, t } from "./BSWXx2rKOMPxLLs82.js";
8
+ import { n, p as r, z as i } from "./DB_I2ygTnDxYiYyc2.js";
9
+ import { C as a, It as o, S as s, W as c, Xt as l, _t as u, an as d, et as f, jt as p, o as m, on as h, ot as g } from "./FAaqx6EbN4JxNuNL2.js";
10
+ import { h as _, p as v } from "./CukMw9Sc4iO21aRQ2.js";
11
+ import { $ as y, B as b, D as x, G as S, J as C, K as w, M as T, R as E, S as D, T as O, U as k, V as ee, X as A, Y as j, Z as M, a as te, at as ne, b as re, c as ie, d as ae, et as N, f as oe, g as se, h as ce, i as P, j as le, k as F, m as ue, n as I, r as de, rt as fe, s as pe, t as me, tt as he, v as ge, w as _e, y as ve, z as ye } from "./B1Lxf24mP-fwn03r2.js";
12
+ var be = "resourcesById", L = class {
13
+ constructor(e) {
14
+ this._kind = e.kind, this._contentType = e.contentType, this._relTypeUri = e.relTypeUri, this._path = e.path;
15
+ }
16
+ getKind() {
17
+ return this._kind;
18
+ }
19
+ getContentType(e) {
20
+ return this._contentType;
21
+ }
22
+ getRelTypeUri(e) {
23
+ return this._relTypeUri;
24
+ }
25
+ getPath(e) {
26
+ return typeof this._path == "function" ? this._path(e) : this._path;
27
+ }
28
+ }, xe = class e {
29
+ constructor(e, t, n) {
30
+ this.zipWriter = e, this.outputKind = t, this.outWritable = n;
31
+ }
32
+ static createUint8Array(t) {
33
+ let n = new P(new T(), t);
34
+ return new e(n, "uint8array");
35
+ }
36
+ static createBlob(t) {
37
+ let n = new P(new k("application/zip"), t);
38
+ return new e(n, "blob");
39
+ }
40
+ static createWritableStream(t, n) {
41
+ let r = new P(t, n);
42
+ return new e(r, "writable", t);
43
+ }
44
+ async add(e, t, n) {
45
+ let r = function(e) {
46
+ let t = e.replace(/\\/g, "/").trim();
47
+ for (; t.startsWith("/");) t = t.slice(1);
48
+ return t;
49
+ }(e), i = {
50
+ level: n?.level,
51
+ password: n?.password,
52
+ encryptionStrength: n?.encryptionStrength,
53
+ zipCrypto: n?.zipCrypto,
54
+ lastModDate: n?.lastModDate,
55
+ keepOrder: n?.keepOrder,
56
+ uncompressedSize: n?.uncompressedSize,
57
+ dataDescriptor: n?.dataDescriptor,
58
+ passThrough: n?.passThrough,
59
+ compressionMethod: n?.compressionMethod,
60
+ signature: n?.signature
61
+ };
62
+ if (typeof t == "string") return void await this.zipWriter.add(r, new he(t), i);
63
+ if (t instanceof Uint8Array || ArrayBuffer.isView(t) || t && typeof t.byteLength == "number" && typeof t.byteOffset == "number") {
64
+ try {
65
+ await this.zipWriter.add(r, new F(t), i);
66
+ } catch (e) {
67
+ throw console.log("Error adding Uint8Array source to zip:", r, i), e;
68
+ }
69
+ return;
70
+ }
71
+ let a = (o = t) && typeof o.getReader == "function" ? t : function(e) {
72
+ let t = e[Symbol.asyncIterator]();
73
+ return new ReadableStream({
74
+ async pull(e) {
75
+ let { value: n, done: r } = await t.next();
76
+ r ? e.close() : e.enqueue(n);
77
+ },
78
+ async cancel(e) {
79
+ if (typeof t.return == "function") try {
80
+ await t.return(e);
81
+ } catch {}
82
+ }
83
+ });
84
+ }(t);
85
+ var o;
86
+ await this.zipWriter.add(r, a, i);
87
+ }
88
+ async close(e) {
89
+ let t = e?.comment, n = await this.zipWriter.close(t, {});
90
+ return this.outputKind === "writable" ? this.outWritable ?? n : n;
91
+ }
92
+ };
93
+ function Se(e) {
94
+ let t = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), n = (e) => t(e).replace(/"/g, "&quot;"), r = (e) => {
95
+ if (!e) return "";
96
+ let t = "";
97
+ for (let [r, i] of Object.entries(e)) i !== void 0 && !1 !== i && (t += !0 === i ? ` ${r}="1"` : ` ${r}="${n(String(i))}"`);
98
+ return t;
99
+ }, i = new TextEncoder(), a = "", o = () => {
100
+ a &&= (e.write(i.encode(a)), "");
101
+ }, s = (e) => {
102
+ a += e, a.length > 65536 && o();
103
+ }, c = [], l = null, u = [], d = !0;
104
+ return {
105
+ decl() {
106
+ s("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
107
+ },
108
+ pushDefaultNamespace(e) {
109
+ c.push(e), l = e;
110
+ },
111
+ getDefaultNamespace: () => c.length > 0 ? c[c.length - 1] : null,
112
+ popDefaultNamespace() {
113
+ c.length > 0 && (c.pop(), l = c.length > 0 ? c[c.length - 1] : null);
114
+ },
115
+ start(e, t) {
116
+ d && u.push({
117
+ tag: e,
118
+ attrs: t,
119
+ bufferPos: a.length
120
+ });
121
+ let n = e;
122
+ l && e.indexOf(":") === -1 && (n = `${l}:${e}`), s(`<${n}${r(t)}>`);
123
+ },
124
+ empty(e, t) {
125
+ let n = e;
126
+ l && e.indexOf(":") === -1 && (n = `${l}:${e}`), s(`<${n}${r(t)}/>`);
127
+ },
128
+ text(e) {
129
+ s(t(String(e)));
130
+ },
131
+ raw(e) {
132
+ s(e);
133
+ },
134
+ end(e) {
135
+ let t;
136
+ if (d) {
137
+ if (u.length === 0) throw Error(`XML Writer: Unexpected end tag </${e}> - no matching start tag`);
138
+ if (t = u[u.length - 1], t.tag !== e) throw Error(`XML Writer: End tag </${e}> does not match start tag <${t.tag}>`);
139
+ }
140
+ let n = e;
141
+ if (l && e.indexOf(":") === -1 && (n = `${l}:${e}`), d) {
142
+ let e = a.length, i = `<${n}${r(t.attrs)}>`.length;
143
+ e === t.bufferPos + i ? (a = a.slice(0, t.bufferPos), s(`<${n}${r(t.attrs)}/>`)) : s(`</${n}>`), u.pop();
144
+ } else s(`</${n}>`);
145
+ },
146
+ close() {
147
+ o();
148
+ },
149
+ setValidationDisabled(e) {
150
+ d = !e;
151
+ }
152
+ };
153
+ }
154
+ function Ce(e) {
155
+ switch (e.kind) {
156
+ case "bytes": return e.bytes;
157
+ case "text": return e.text;
158
+ case "stream": return e.stream;
159
+ case "xmlStream": {
160
+ let t = [], n = Se({ write: (e) => t.push(e) });
161
+ return e.writeXml(n), n.close(), function(e) {
162
+ let t = 0;
163
+ for (let n of e) t += n.byteLength;
164
+ let n = new Uint8Array(t), r = 0;
165
+ for (let t of e) n.set(t, r), r += t.byteLength;
166
+ return n;
167
+ }(t);
168
+ }
169
+ case "xmlStreamed": return e.write();
170
+ }
171
+ }
172
+ function we(e) {
173
+ let t = R(e);
174
+ if (!t) return "_rels/.rels";
175
+ let n = t.lastIndexOf("/"), r = n >= 0 ? t.slice(0, n) : "";
176
+ return `${r ? `${r}/_rels` : "_rels"}/${n >= 0 ? t.slice(n + 1) : t}.rels`;
177
+ }
178
+ function R(e) {
179
+ let t = (e ?? "").replace(/\\/g, "/").trim();
180
+ for (; t.startsWith("/");) t = t.slice(1);
181
+ return t;
182
+ }
183
+ function Te(e) {
184
+ let t = (e ?? "").replace(/\\/g, "/").trim();
185
+ return t.startsWith("/") || (t = "/" + t), t;
186
+ }
187
+ function Ee(e) {
188
+ let t = /^rId(\d+)$/.exec(e);
189
+ return t ? parseInt(t[1], 10) : 2 ** 53 - 1;
190
+ }
191
+ function z(e) {
192
+ return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;").replace(/>/g, "&gt;");
193
+ }
194
+ function De(e, t, n, r = !1) {
195
+ let i = t;
196
+ if (t.startsWith("/")) i = t.slice(1);
197
+ else {
198
+ if (!e) throw Error(`Relative path "${t}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);
199
+ i = (e.includes("/") ? e.slice(0, e.lastIndexOf("/") + 1) : "") + t;
200
+ }
201
+ if (i = Oe(i), !i.includes("{n}")) {
202
+ if (!r && n.has(i)) throw Error(`Path already existing path: ${i}`);
203
+ return i;
204
+ }
205
+ let a, o = 1;
206
+ do
207
+ if (a = i.replace(/{n}/g, String(o)), o++, o > 1e4) throw Error(`Failed to resolve path template "${t}" after 10000 attempts. This likely indicates a bug or an impossible constraint.`);
208
+ while (n.has(a));
209
+ return a;
210
+ }
211
+ function Oe(e) {
212
+ let t = e.split("/"), n = [];
213
+ for (let r of t) if (r !== "" && r !== ".") if (r === "..") {
214
+ if (n.length === 0) throw Error(`Invalid path: too many ".." segments in "${e}"`);
215
+ n.pop();
216
+ } else n.push(r);
217
+ return n.join("/");
218
+ }
219
+ function ke(e, t) {
220
+ if (!e) return t;
221
+ let n = e.includes("/") ? e.slice(0, e.lastIndexOf("/")) : "", r = n ? n.split("/") : [], i = t.split("/"), a = 0, o = Math.min(r.length, i.length - 1);
222
+ for (let e = 0; e < o && r[e] === i[e]; e++) a++;
223
+ let s = r.length - a;
224
+ return "../".repeat(s) + i.slice(a).join("/");
225
+ }
226
+ function Ae(e) {
227
+ return new TextEncoder().encode(e);
228
+ }
229
+ var je = class {
230
+ constructor(e) {
231
+ this.rels = [], this.usedIds = /* @__PURE__ */ new Set(), this.reservedIds = /* @__PURE__ */ new Set(), this.nextId = 1, this.sourcePart = R(e);
232
+ }
233
+ add(e, t, n) {
234
+ let r = n?.idHint && !this.usedIds.has(n.idHint) ? n.idHint : void 0;
235
+ if (!r) do
236
+ r = "rId" + this.nextId++;
237
+ while (this.usedIds.has(r) || this.reservedIds.has(r));
238
+ let i = /^rId(\d+)$/.exec(r);
239
+ return i && (this.nextId = Math.max(this.nextId, parseInt(i[1], 10) + 1)), this.usedIds.add(r), this.rels.push({
240
+ id: r,
241
+ type: e,
242
+ target: t,
243
+ targetMode: n?.external ? "External" : void 0
244
+ }), r;
245
+ }
246
+ reserve(e) {
247
+ for (let t of e) {
248
+ if (!t) continue;
249
+ this.reservedIds.add(t);
250
+ let e = /^rId(\d+)$/.exec(t);
251
+ e && (this.nextId = Math.max(this.nextId, parseInt(e[1], 10) + 1));
252
+ }
253
+ }
254
+ list() {
255
+ return this.rels;
256
+ }
257
+ toXmlBytes() {
258
+ let e = [...this.rels].sort((e, t) => Ee(t.id) - Ee(e.id) || e.id.localeCompare(t.id)), t = [];
259
+ t.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), t.push(`<Relationships xmlns="${Me}">`);
260
+ for (let n of e) {
261
+ let e = [
262
+ `Id="${z(n.id)}"`,
263
+ `Type="${z(n.type)}"`,
264
+ `Target="${z(n.target)}"`
265
+ ];
266
+ n.targetMode === "External" && e.push("TargetMode=\"External\""), t.push(`<Relationship ${e.join(" ")}/>`);
267
+ }
268
+ return t.push("</Relationships>"), Ae(t.join(""));
269
+ }
270
+ }, Me = "http://schemas.openxmlformats.org/package/2006/relationships", Ne = class {
271
+ constructor() {
272
+ this._defaultsSet = /* @__PURE__ */ new Set(), this._overridesSet = /* @__PURE__ */ new Set(), this._defaults = [], this._overrides = [];
273
+ }
274
+ addDefault(e, t) {
275
+ let n = function(e) {
276
+ let t = (e ?? "").trim().toLowerCase();
277
+ return t.startsWith(".") && (t = t.slice(1)), t;
278
+ }(e);
279
+ this._defaultsSet.has(n) || (this._defaultsSet.add(n), this._defaults.push({
280
+ key: n,
281
+ content: t
282
+ }));
283
+ }
284
+ addOverride(e, t) {
285
+ let n = Te(e);
286
+ this._overridesSet.has(n) || (this._overridesSet.add(n), this._overrides.push({
287
+ key: n,
288
+ content: t
289
+ }));
290
+ }
291
+ replaceOverride(e, t) {
292
+ let n = Te(e);
293
+ if (!this._overridesSet.has(n)) return;
294
+ let r = this._overrides.find((e) => e.key === n);
295
+ r && (r.content = t);
296
+ }
297
+ toXmlBytes() {
298
+ let e = [];
299
+ e.push("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"), e.push(`<Types xmlns="${Pe}">`);
300
+ let t = this._defaults.reverse();
301
+ this.addDefault("rels", "application/vnd.openxmlformats-package.relationships+xml"), this.addDefault("xml", "application/xml");
302
+ for (let { key: n, content: r } of t) e.push(`<Default Extension="${z(n)}" ContentType="${z(r)}"/>`);
303
+ let n = this._overrides;
304
+ for (let { key: t, content: r } of n) e.push(`<Override PartName="${z(t)}" ContentType="${z(r)}"/>`);
305
+ return e.push("</Types>"), Ae(e.join(""));
306
+ }
307
+ }, Pe = "http://schemas.openxmlformats.org/package/2006/content-types", Fe = class {
308
+ constructor(e) {
309
+ this.parts = [], this.relsRoot = new je(""), this.relsByPart = /* @__PURE__ */ new Map(), this.contentTypes = new Ne(), this.zip = e;
310
+ }
311
+ addContentType(e, t) {
312
+ let n = R(e);
313
+ this.contentTypes.addOverride("/" + n, t);
314
+ }
315
+ addDefaultType(e, t) {
316
+ this.contentTypes.addDefault(e, t);
317
+ }
318
+ replaceContentType(e, t) {
319
+ this.contentTypes.replaceOverride("/" + R(e), t);
320
+ }
321
+ addPart(e, t, n, r) {
322
+ let i = R(e);
323
+ this.parts.push({
324
+ path: i,
325
+ body: t,
326
+ optionsZip: r
327
+ }), n && this.contentTypes.addOverride("/" + i, n);
328
+ }
329
+ rels(e) {
330
+ let t = R(e || "");
331
+ if (!t) return this.relsRoot;
332
+ let n = this.relsByPart.get(t);
333
+ return n || (n = new je(t), this.relsByPart.set(t, n)), n;
334
+ }
335
+ async emit() {
336
+ let e = [...this.parts].sort((e, t) => e.path.localeCompare(t.path));
337
+ for (let t of e) {
338
+ let e = Ce(t.body);
339
+ await this.zip.add(t.path, e, t.optionsZip);
340
+ }
341
+ let t = this.relsRoot.toXmlBytes();
342
+ await this.zip.add("_rels/.rels", t, {});
343
+ let n = [...this.relsByPart.values()].sort((e, t) => e.sourcePart.localeCompare(t.sourcePart));
344
+ for (let e of n) {
345
+ let t = we(e.sourcePart), n = e.toXmlBytes();
346
+ await this.zip.add(t, n, {});
347
+ }
348
+ let r = this.contentTypes.toXmlBytes();
349
+ await this.zip.add("[Content_Types].xml", r, {});
350
+ }
351
+ async build(e) {
352
+ return await this.emit(), await this.zip.close(e);
353
+ }
354
+ }, Ie = /* @__PURE__ */ new Set(["xl/calcChain.xml"]), Le = [/^xl\/slicers\//i, /^xl\/slicerCaches\//i];
355
+ function Re(e) {
356
+ return e === "[Content_Types].xml" || ze.test(e);
357
+ }
358
+ var ze = /^(?:(.*)\/)?_rels\/(.*)\.rels$/;
359
+ function Be(e) {
360
+ if (e === "_rels/.rels") return "";
361
+ let t = ze.exec(e);
362
+ if (!t) return null;
363
+ let n = t[1] ?? "", r = t[2];
364
+ return n ? `${n}/${r}` : r;
365
+ }
366
+ function Ve(e) {
367
+ return e.startsWith("#");
368
+ }
369
+ function He(e, t) {
370
+ if (t.startsWith("/")) return Oe(t);
371
+ let n = e.includes("/") ? e.slice(0, e.lastIndexOf("/")) : "";
372
+ return Oe((n ? n + "/" : "") + t);
373
+ }
374
+ var Ue = class {
375
+ constructor(e, t, n) {
376
+ this._queue = [], this._scheduledByNodeKey = /* @__PURE__ */ new Map(), this._nodesByPath = /* @__PURE__ */ new Map(), this._writtenPaths = /* @__PURE__ */ new Set(), this._explicitRelTargets = /* @__PURE__ */ new Set(), this._partWriter = new Fe(e), this._registry = t, this._options = n ?? {}, this._mapState = this._options.mapState ?? /* @__PURE__ */ new Map(), this._sourcePackage = this._options.sourcePackage ?? null, this._macroEnabled = this._options.macroEnabled ?? !1, this._reserveSourceRelIds("");
377
+ }
378
+ _isSourcePartCarried(e) {
379
+ let t = this._sourcePackage;
380
+ return !(!t || !t.has(e) || Ie.has(e) || t.isAbsorbed(e) || !this._macroEnabled && e === "xl/vbaProject.bin" || Re(e) || t.hasStructuralChange() && function(e) {
381
+ return Le.some((t) => t.test(e));
382
+ }(e));
383
+ }
384
+ _reserveSourceRelIds(e) {
385
+ let t = this._sourcePackage?.getPart(we(e));
386
+ t && this._partWriter.rels(e).reserve(C(t.data).map((e) => e.id));
387
+ }
388
+ async waitEmit() {
389
+ let e = this._queue;
390
+ for (; e.length;) {
391
+ let t = e.shift();
392
+ await this._processPart(t);
393
+ }
394
+ }
395
+ async build(e) {
396
+ return await this.waitEmit(), this._passthroughSourceParts(), this._applyWorkbookContentTypeVariant(), await this._partWriter.build(e ?? {});
397
+ }
398
+ _passthroughSourceParts() {
399
+ let e = this._sourcePackage;
400
+ if (!e) return;
401
+ let t = new Set(this._writtenPaths), n = [];
402
+ for (let r of e.getNames()) t.has(r) || this._isSourcePartCarried(r) && n.push(r);
403
+ let r = new Set(t);
404
+ for (let e of n) r.add(e);
405
+ let i = e.getPart("[Content_Types].xml"), a = i ? le(i.data) : null;
406
+ if (a) for (let { ext: e, contentType: t } of a.defaults) this._partWriter.addDefaultType(e, t);
407
+ for (let t of n) {
408
+ let n = e.getPart(t), r = a?.overrides.get("/" + t);
409
+ n.raw ? this._partWriter.addPart(t, {
410
+ kind: "bytes",
411
+ bytes: n.raw.compressedData
412
+ }, r, {
413
+ passThrough: !0,
414
+ compressionMethod: n.raw.compressionMethod,
415
+ signature: n.raw.signature,
416
+ uncompressedSize: n.uncompressedSize
417
+ }) : this._partWriter.addPart(t, {
418
+ kind: "bytes",
419
+ bytes: n.data
420
+ }, r), this._writtenPaths.add(t);
421
+ }
422
+ for (let n of e.getNames()) {
423
+ if (n === "[Content_Types].xml" || !Re(n)) continue;
424
+ let i = Be(n);
425
+ i !== null && (i === "" || r.has(i)) && (e.isAbsorbed(i) || this._mergeSourceRelsInto(i, e.getPart(n).data, t, r));
426
+ }
427
+ }
428
+ _applyWorkbookContentTypeVariant() {
429
+ this._macroEnabled && this._partWriter.replaceContentType("xl/workbook.xml", "application/vnd.ms-excel.sheet.macroEnabled.main+xml");
430
+ }
431
+ _mergeSourceRelsInto(e, t, n, r) {
432
+ let i = this._partWriter.rels(e), a = e === "" || n.has(e);
433
+ for (let o of C(t)) {
434
+ if (o.external || Ve(o.target)) {
435
+ i.add(o.type, o.target, {
436
+ external: o.external,
437
+ idHint: o.id
438
+ });
439
+ continue;
440
+ }
441
+ let t = He(e, o.target);
442
+ a && (n.has(t) || this._explicitRelTargets.has(`${e}::${t}`)) || (r.has(t) ? i.add(o.type, o.target, { idHint: o.id }) : this._registry.ownsRelType(o.type) || Ie.has(t) || this._sourcePackage?.isAbsorbed(t) || console.warn(`Dropping preserved relationship to missing part '${t}'`, e || "(root)"));
443
+ }
444
+ }
445
+ addPart(e, t, n, r) {
446
+ return this._addPartInternal("", e, t, n, r);
447
+ }
448
+ _addPartInternal(e, t, n, r, i) {
449
+ let a = this._registry.get(t);
450
+ if (!a) throw Error(`No emitter registered for kind '${t}'.`);
451
+ let o = a.getContentType(n), s = a.getRelTypeUri(n), c = r ?? a.getPath?.(n);
452
+ if (!c) throw Error("No path provided in either argument or emitter.");
453
+ let l = this._writtenPaths, u = De(e, c, l), d = `${t}:${u}`, f = this._scheduledByNodeKey.get(d);
454
+ if (!f) {
455
+ let e;
456
+ this._reserveSourceRelIds(u), f = {
457
+ kind: t,
458
+ key: d,
459
+ payload: n,
460
+ path: u,
461
+ contentType: o,
462
+ promise: new Promise((t) => {
463
+ e = t;
464
+ }),
465
+ resolve: e
466
+ }, this._scheduledByNodeKey.set(d, f), this._queue.push(f);
467
+ }
468
+ let p = this._nodesByPath.get(e);
469
+ p || (p = /* @__PURE__ */ new Set(), this._nodesByPath.set(e, p)), p.add(d), !o || s || e || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", u);
470
+ let m = null;
471
+ if (s) {
472
+ let t = ke(e, f.path);
473
+ m = this._partWriter.rels(e).add(s, t, { idHint: i });
474
+ }
475
+ return l.add(u), {
476
+ path: u,
477
+ contentTypeUri: o,
478
+ relId: m
479
+ };
480
+ }
481
+ addBinary(e, t, n, r, i = !1, a) {
482
+ return this._addBinaryInternal("", e, t, n, r, i, a);
483
+ }
484
+ _addBinaryInternal(e, t, n, r, i, a = !1, o) {
485
+ if (!i) throw Error("No path provided for binary.");
486
+ if (!n) throw Error("No content type provided for binary.");
487
+ let s = this._writtenPaths, c = De(e, i, s, a), l = null;
488
+ if (r) {
489
+ let t = ke(e, c);
490
+ l = this._partWriter.rels(e).add(r, t, { idHint: o });
491
+ }
492
+ if (e || this._partWriter.rels("").add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", c), !s.has(c)) {
493
+ let e = c.split(".").pop() || "";
494
+ e && this._partWriter.addDefaultType(e, n), this._partWriter.addPart(c, {
495
+ kind: "bytes",
496
+ bytes: t
497
+ }, void 0, {
498
+ level: 0,
499
+ uncompressedSize: t.byteLength,
500
+ dataDescriptor: !1
501
+ }), s.add(c);
502
+ }
503
+ return {
504
+ path: c,
505
+ contentTypeUri: n,
506
+ relId: l
507
+ };
508
+ }
509
+ async _waitForDescendants(e) {
510
+ let t = this._nodesByPath.get(e);
511
+ if (!t || t.size === 0) return;
512
+ let n = [];
513
+ for (let e of t) {
514
+ let t = this._scheduledByNodeKey.get(e);
515
+ if (t) {
516
+ let e = this._processPart(t);
517
+ n.push(e);
518
+ }
519
+ }
520
+ await Promise.all(n);
521
+ }
522
+ async _processPart(e) {
523
+ if (e.processed) return e.promise;
524
+ e.processed = !0;
525
+ let t = this._registry.get(e.kind), n = e.path;
526
+ this._partWriter.addContentType(e.path, e.contentType);
527
+ try {
528
+ let r, i = [], a = { write: (e) => {
529
+ i.push(e);
530
+ } };
531
+ await t.emit(e.payload, {
532
+ getXMLWriter: () => r || (r = Se(a), r),
533
+ addPart: (e, t, r, i) => this._addPartInternal(n, e, t, r, i),
534
+ addBinary: (e, t, r, i, a = !1, o) => this._addBinaryInternal(n, e, t, r, i, a, o),
535
+ addExternal: (e, t, r) => ({
536
+ path: t,
537
+ contentTypeUri: null,
538
+ relId: this._partWriter.rels(n).add(e, t, {
539
+ external: !0,
540
+ idHint: r
541
+ })
542
+ }),
543
+ addRelationship: (e, t, r) => {
544
+ if (!this._writtenPaths.has(t) && !this._isSourcePartCarried(t)) return null;
545
+ let i = ke(n, t), a = this._partWriter.rels(n).add(e, i, { idHint: r });
546
+ return this._explicitRelTargets.add(`${n}::${t}`), a;
547
+ },
548
+ waitEmit: () => this._waitForDescendants(e.path),
549
+ getPath: () => e.path,
550
+ getSharedStates: () => this._mapState,
551
+ warn: (t, n, r) => {
552
+ let i = n ?? e.path, a = this._options.onWarning;
553
+ a ? a(t, i, r) : console.warn(t, i);
554
+ },
555
+ log: (t, n) => {
556
+ console.warn(t, n ?? e.path);
557
+ }
558
+ });
559
+ let o = function(e) {
560
+ let t = 0;
561
+ for (let n of e) t += n.byteLength;
562
+ let n = new Uint8Array(t), r = 0;
563
+ for (let t of e) n.set(t, r), r += t.byteLength;
564
+ return n;
565
+ }(i), s = this._options.onPartEmitted;
566
+ s && await s(e.kind, e.path, o), We && (console.log(`\n=== ${e.path} ===`), console.log(function(e, t) {
567
+ return function(e, t = " ") {
568
+ let n = "", r = 0, i = e.split(/(<[^>]+>)/g).filter(Boolean);
569
+ for (let e = 0; e < i.length; e++) {
570
+ let a = i[e];
571
+ if (a.trim()) if (a.startsWith("<?")) n += a + "\n";
572
+ else if (a.startsWith("</")) r--, r < 0 && console.warn(`XML formatting warning: negative indentation depth: ${a}`), n += t.repeat(Math.max(r, 0)) + a + "\n";
573
+ else if (a.startsWith("<")) {
574
+ let e = a.endsWith("/>");
575
+ n += t.repeat(r) + a + "\n", e || r++;
576
+ } else n += t.repeat(r) + a.trim() + "\n";
577
+ }
578
+ return n;
579
+ }(function(e) {
580
+ return new TextDecoder("utf-8").decode(e);
581
+ }(e), t);
582
+ }(o))), this._partWriter.addPart(e.path, {
583
+ kind: "bytes",
584
+ bytes: o
585
+ }, e.contentType);
586
+ } catch (t) {
587
+ throw this._options.onPartError?.(e.kind, e.path, t), t;
588
+ } finally {
589
+ this._nodesByPath.delete(e.path), this._scheduledByNodeKey.delete(e.key), e.resolve();
590
+ }
591
+ }
592
+ }, We = !1, Ge = class {
593
+ constructor() {
594
+ this.map = /* @__PURE__ */ new Map();
595
+ }
596
+ register(e) {
597
+ let t = e.getKind();
598
+ if (this.map.has(t)) throw Error(`Duplicate part kind: ${t}`);
599
+ this.map.set(t, e);
600
+ }
601
+ get(e) {
602
+ let t = this.map.get(e);
603
+ if (!t) throw Error(`Unknown part kind: ${e}`);
604
+ return t;
605
+ }
606
+ has(e) {
607
+ return this.map.has(e);
608
+ }
609
+ ownsRelType(e) {
610
+ for (let t of this.map.values()) if (t.getRelTypeUri() === e) return !0;
611
+ return !1;
612
+ }
613
+ };
614
+ function Ke(e, t, n) {
615
+ e && (e.algorithm && (t[n ? `${n}AlgorithmName` : "algorithmName"] = e.algorithm), e.hash && (t[n ? `${n}HashValue` : "hashValue"] = e.hash), e.salt && (t[n ? `${n}SaltValue` : "saltValue"] = e.salt), e.spinCount !== void 0 && (t[n ? `${n}SpinCount` : "spinCount"] = e.spinCount));
616
+ }
617
+ var qe = "hiddenFormulaXfs", Je = class {
618
+ constructor(e, t) {
619
+ this._variants = /* @__PURE__ */ new Map(), this._sources = [], this._json = e, this._styles = t, this._directCount = Math.max(1, e?.direct?.length ?? 0);
620
+ }
621
+ getHiddenXf(e) {
622
+ let t = this._variants.get(e);
623
+ return t !== void 0 || (this._isShown(e) ? t = e : (t = this._directCount + this._sources.length, this._sources.push(e)), this._variants.set(e, t)), t;
624
+ }
625
+ getSources() {
626
+ return this._sources;
627
+ }
628
+ _isShown(e) {
629
+ let t = this._json?.direct?.[e], n = t?.protection?.showFormulas;
630
+ if (n !== void 0) return n;
631
+ let r = (e === 0 ? void 0 : t?.named) ?? f.BuiltInName.Normal;
632
+ return this._styles.getNamedStyles().getByName(r)?.toJSON().style?.protection?.showFormulas ?? !1;
633
+ }
634
+ }, Ye = class {
635
+ constructor() {
636
+ this._daprFMBks = [], this._daprFMBkMap = /* @__PURE__ */ new Map(), this._rvFMBks = [], this._rvFMBkMap = /* @__PURE__ */ new Map(), this._valueMeta = [];
637
+ }
638
+ registerArrayCell(e) {
639
+ let t = +!!e, n = `1,${t}`, r = this._daprFMBkMap.get(n);
640
+ return r === void 0 && (r = this._daprFMBks.length, this._daprFMBks.push({
641
+ fDynamic: 1,
642
+ fCollapsed: t
643
+ }), this._daprFMBkMap.set(n, r)), r + 1;
644
+ }
645
+ registerRichValueCell(e) {
646
+ let t = this._rvFMBkMap.get(e);
647
+ t === void 0 && (t = this._rvFMBks.length, this._rvFMBks.push(e), this._rvFMBkMap.set(e, t));
648
+ let n = this._valueMeta.length;
649
+ return this._valueMeta.push(t), n + 1;
650
+ }
651
+ hasCellMeta() {
652
+ return this._daprFMBks.length > 0;
653
+ }
654
+ hasValueMeta() {
655
+ return this._valueMeta.length > 0;
656
+ }
657
+ hasAny() {
658
+ return this.hasCellMeta() || this.hasValueMeta();
659
+ }
660
+ getDAPRFutureMetadataBlocks() {
661
+ return this._daprFMBks;
662
+ }
663
+ getRVFutureMetadataBlocks() {
664
+ return this._rvFMBks;
665
+ }
666
+ getValueMeta() {
667
+ return this._valueMeta;
668
+ }
669
+ }, Xe = class {
670
+ constructor(e, t = console.warn) {
671
+ this._entries = [], this._keyMap = /* @__PURE__ */ new Map(), this._metaCollector = e, this._onWarn = t;
672
+ }
673
+ add(t) {
674
+ if (t == null) return this._onWarn?.("RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!"), this._registerFallback();
675
+ if (e.isError(t)) {
676
+ let e = t.getCode(), n = this._register(`_error:${e}`, { errorType: "" + (e - 1) }, Ze);
677
+ return this._metaCollector.registerRichValueCell(n);
678
+ }
679
+ return t.isIRichData && t.getType(), this._onWarn?.("RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!", t), this._registerFallback();
680
+ }
681
+ _registerFallback() {
682
+ let t = this._register("_error:fallback", { errorType: e.Code.Unknown - 1 }, Ze);
683
+ return this._metaCollector.registerRichValueCell(t);
684
+ }
685
+ _register(e, t, n) {
686
+ let r = this._keyMap.get(e);
687
+ return r === void 0 && (r = this._entries.length, this._entries.push({
688
+ handler: n,
689
+ rawValue: t
690
+ }), this._keyMap.set(e, r)), r;
691
+ }
692
+ getCount() {
693
+ return this._entries.length;
694
+ }
695
+ hasAny() {
696
+ return this._entries.length > 0;
697
+ }
698
+ getEntries() {
699
+ return this._entries;
700
+ }
701
+ uniqueHandlers() {
702
+ let e = /* @__PURE__ */ new Set(), t = [];
703
+ for (let n of this._entries) e.has(n.handler) || (e.add(n.handler), t.push(n.handler));
704
+ return t;
705
+ }
706
+ handlerStructureIndex(e) {
707
+ let t = 0, n = /* @__PURE__ */ new Set();
708
+ for (let r of this._entries) if (!n.has(r.handler)) {
709
+ if (r.handler === e) return t;
710
+ n.add(r.handler), t++;
711
+ }
712
+ return -1;
713
+ }
714
+ }, Ze = new class {
715
+ constructor(e, t) {
716
+ this.type = e, this.props = t;
717
+ }
718
+ getValues(e) {
719
+ return this.props.map(([t, , n = ""]) => {
720
+ let r = e?.[t];
721
+ return r == null ? n : "" + r;
722
+ });
723
+ }
724
+ }("_error", [[
725
+ "errorType",
726
+ "i",
727
+ ""
728
+ ], [
729
+ "subType",
730
+ "i",
731
+ "0"
732
+ ]]), Qe = "application/xml", $e = async (e, t) => {
733
+ let n = e.parts, r = n ? n.length : 0;
734
+ for (let i = 0; i < r; i++) {
735
+ let r = n[i];
736
+ try {
737
+ await et(r, t);
738
+ } catch (n) {
739
+ t.log(`Unable to write the part '${r.name ?? r.id}' referenced by '${e.name ?? e.id}'`, n);
740
+ }
741
+ }
742
+ }, et = async (e, t, n) => {
743
+ let r = e.resId === void 0 ? void 0 : t.getSharedStates().get(be)?.get(e.resId);
744
+ if (!r) return e.resId === void 0 ? t.addPart("embeddedPart", e, n, e.id) : (t.log(`The part '${e.name ?? e.id}' cites resource ${e.resId}, which is not in the workbook.`), null);
745
+ let i = await r.getExternalURI();
746
+ if (i) {
747
+ let n = t.addExternal(e.type, i, e.id);
748
+ return n.relId !== e.id && t.log(`The external reference '${e.id}' was written as '${n.relId}'; the markup will not find it.`), n;
749
+ }
750
+ let a = await r.toBuffer();
751
+ return t.addBinary(new Uint8Array(a), e.contentType || Qe, e.type, n ?? `./${tt(e.name)}`, !1, e.id);
752
+ }, tt = (e) => {
753
+ let t = e && /^[\w.\-~%]+$/.test(e) ? e : "part.xml", n = t.lastIndexOf("."), r = n > 0 ? t.slice(0, n) : t, i = n > 0 ? t.slice(n) : "";
754
+ return `${r.replace(/\d+$/, "")}{n}${i}`;
755
+ }, nt = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml", rt = (e, t) => e.getSharedStates().get("pivotCachePaths")?.get(t) ?? null, it = "fileVersion", at = "sheetParts", ot = "externalLinkParts";
756
+ function st(e) {
757
+ if (!e || e.indexOf("[") === -1) return [];
758
+ let t = [], n = e.replace(/"(?:[^"]|"")*"/g, "");
759
+ for (let e of n.matchAll(/\[(\d+)\]/g)) {
760
+ let n = Number(e[1]);
761
+ n > 0 && !t.includes(n) && t.push(n);
762
+ }
763
+ return t;
764
+ }
765
+ var ct = {
766
+ auto: "auto",
767
+ automaticExceptTables: "autoNoTable",
768
+ manual: "manual"
769
+ };
770
+ function B(e, t, n, r) {
771
+ if (!n) return;
772
+ let i = typeof n == "string" ? t.parseColor(n) : n;
773
+ r && e.start(r);
774
+ let a = i.getType(), o = i.getVal(), s = i.getAdjustments(), c = s && s.length > 0;
775
+ switch (a) {
776
+ case "scheme":
777
+ c ? (e.start("schemeClr", { val: o }), V(e, s), e.end("schemeClr")) : e.empty("schemeClr", { val: o });
778
+ break;
779
+ case "named":
780
+ if (d.isSystem(o)) {
781
+ let t = i.getLastColor() ?? i.getBaseColor().toHex().toString(!1).replace("#", "");
782
+ c ? (e.start("sysClr", {
783
+ val: o,
784
+ lastClr: t
785
+ }), V(e, s), e.end("sysClr")) : e.empty("sysClr", {
786
+ val: o,
787
+ lastClr: t
788
+ });
789
+ } else c ? (e.start("prstClr", { val: o }), V(e, s), e.end("prstClr")) : e.empty("prstClr", { val: o });
790
+ break;
791
+ case "auto": {
792
+ let t = i.getLastColor() ?? i.getBaseColor().toHex().toString(!1).replace("#", "");
793
+ c ? (e.start("sysClr", {
794
+ val: "windowText",
795
+ lastClr: t
796
+ }), V(e, s), e.end("sysClr")) : e.empty("sysClr", {
797
+ val: "windowText",
798
+ lastClr: t
799
+ });
800
+ break;
801
+ }
802
+ case "index":
803
+ c ? (e.start("srgbClr", { val: o }), V(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: o });
804
+ break;
805
+ case "hsl":
806
+ let t = i.toHex().toString();
807
+ c ? (e.start("srgbClr", { val: t }), V(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: t });
808
+ break;
809
+ case "rgb":
810
+ case "lrgb":
811
+ let n = i.toHex().toString();
812
+ c ? (e.start("srgbClr", { val: n }), V(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: n });
813
+ break;
814
+ case "hex":
815
+ let r = o.replace("#", "").toUpperCase();
816
+ c ? (e.start("srgbClr", { val: r }), V(e, s), e.end("srgbClr")) : e.empty("srgbClr", { val: r });
817
+ break;
818
+ default:
819
+ let a = o.replace("#", "").toUpperCase();
820
+ e.empty("srgbClr", { val: a });
821
+ }
822
+ r && e.end(r);
823
+ }
824
+ function V(e, t) {
825
+ if (t && t.length !== 0) for (let n of t) for (let [t, r] of Object.entries(n)) {
826
+ if (r == null) continue;
827
+ let n = t;
828
+ if (n) if (typeof r == "boolean") e.empty(n);
829
+ else {
830
+ let i;
831
+ if (t === "alpha" || t === "alphaOff" || t === "alphaMod") i = Math.round(1e5 * r);
832
+ else {
833
+ if (t === "eTint") {
834
+ if (r < 0) {
835
+ e.empty("shade", { val: Math.round(1e5 * (1 + r)).toString() });
836
+ continue;
837
+ }
838
+ e.empty("tint", { val: Math.round(1e5 * r).toString() });
839
+ continue;
840
+ }
841
+ i = Math.round(1e3 * r);
842
+ }
843
+ e.empty(n, { val: i.toString() });
844
+ }
845
+ }
846
+ }
847
+ function H(e, t, n, r, i = !1, a = !1) {
848
+ if (!n) return;
849
+ let s = typeof n == "string" ? t.parseColor(n) : n, c = () => {
850
+ e.empty(r, { rgb: ht(s.toHex().toString(!0)) });
851
+ }, l = s.getAdjustments(), u = l && l.length > 0, d = s.getType();
852
+ if (d !== o.Type.Auto) {
853
+ if (d === o.Type.Scheme) {
854
+ let t = s.getVal(), n = lt[t] ?? t, i = ft.get(n);
855
+ if (i === void 0 && n !== "phClr") return console.warn(`Color scheme not in theme. schemeVal=${t} themeKey=${n}`), c();
856
+ let a = {};
857
+ if (a.theme = i, u) {
858
+ if (!function(e) {
859
+ for (let t of e) switch (Object.keys(t)[0]) {
860
+ case o.AdjustmentType.Tint:
861
+ case o.AdjustmentType.ETint:
862
+ case o.AdjustmentType.Shade:
863
+ case o.AdjustmentType.Lum:
864
+ case o.AdjustmentType.LumOff:
865
+ case o.AdjustmentType.LumMod:
866
+ case o.AdjustmentType.Alpha:
867
+ case o.AdjustmentType.AlphaOff:
868
+ case o.AdjustmentType.AlphaMod: continue;
869
+ default: return !1;
870
+ }
871
+ return !0;
872
+ }(l)) return c();
873
+ let e, t = l.length === 1 ? l[0][o.AdjustmentType.ETint] : void 0;
874
+ if (t !== void 0) e = pt(t);
875
+ else {
876
+ let t = s.getBaseColor().toHex().toString(!0), n = s.toHex().toString(!0);
877
+ e = pt(function(e, t) {
878
+ let n = U(e, 0, 255), r = U(t, 0, 255);
879
+ return Math.abs(r - n) < 1e-9 ? 0 : r < n ? n <= 1e-9 ? -1 : U(r / n - 1, -1, 0) : 255 - n <= 1e-9 ? 0 : U((r - n) / (255 - n), 0, 1);
880
+ }(mt(t), mt(n)));
881
+ }
882
+ e !== 0 && (a.tint = e);
883
+ }
884
+ e.empty(r, a);
885
+ return;
886
+ }
887
+ if (d === o.Type.Index) {
888
+ let t = s.getVal(), n = t.substring(5, t.length);
889
+ e.empty(r, { indexed: Number(n) });
890
+ return;
891
+ }
892
+ return c();
893
+ }
894
+ e.empty(r, { auto: 1 });
895
+ }
896
+ var lt = {
897
+ bg1: "lt1",
898
+ tx1: "dk1",
899
+ bg2: "lt2",
900
+ tx2: "dk2",
901
+ accent1: "accent1",
902
+ accent2: "accent2",
903
+ accent3: "accent3",
904
+ accent4: "accent4",
905
+ accent5: "accent5",
906
+ accent6: "accent6",
907
+ hlink: "hlink",
908
+ folHlink: "folHlink"
909
+ }, ut = Object.freeze([
910
+ "lt1",
911
+ "dk1",
912
+ "lt2",
913
+ "dk2",
914
+ "accent1",
915
+ "accent2",
916
+ "accent3",
917
+ "accent4",
918
+ "accent5",
919
+ "accent6",
920
+ "hlink",
921
+ "folHlink"
922
+ ]), dt = Object.freeze([
923
+ "dk1",
924
+ "lt1",
925
+ "dk2",
926
+ "lt2",
927
+ "accent1",
928
+ "accent2",
929
+ "accent3",
930
+ "accent4",
931
+ "accent5",
932
+ "accent6",
933
+ "hlink",
934
+ "folHlink"
935
+ ]), ft = new Map(ut.map((e, t) => [e, t]));
936
+ function U(e, t, n) {
937
+ return Math.max(t, Math.min(n, e));
938
+ }
939
+ function pt(e) {
940
+ let t = U(e, -1, 1);
941
+ return Math.abs(t) < 1e-12 ? 0 : t;
942
+ }
943
+ function mt(e) {
944
+ let t = function(e) {
945
+ let t = e.replace(/^#/, "").toUpperCase();
946
+ if (t.length === 8) return t.slice(2);
947
+ if (t.length === 6) return t;
948
+ throw Error(`Invalid hex: ${e}`);
949
+ }(e), n = parseInt(t.slice(0, 2), 16) / 255, r = parseInt(t.slice(2, 4), 16) / 255, i = parseInt(t.slice(4, 6), 16) / 255;
950
+ return (Math.max(n, r, i) + Math.min(n, r, i)) / 2 * 255;
951
+ }
952
+ function ht(e) {
953
+ let t = e.replace(/^#/, "").toUpperCase();
954
+ if (t.length === 8) return t;
955
+ if (t.length === 6) return "FF" + t;
956
+ throw Error(`Invalid hex: ${e}`);
957
+ }
958
+ function gt(e, t = !1) {
959
+ let n = e;
960
+ return n.length === 8 && (n = n.substring(2, 8)), n.length === 6 && (n = (t ? "00" : "FF") + n), n.toUpperCase();
961
+ }
962
+ function _t(e) {
963
+ return `[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n ${e.getContent()}`;
964
+ }
965
+ function vt(e, t) {
966
+ if (typeof t == "string") return void yt(e, t);
967
+ let n = t.runs;
968
+ for (let t = 0; t < n.length; t++) {
969
+ let r = n[t];
970
+ e.start("r"), (r.bold || r.italic || r.size !== void 0 || r.font || r.color) && (e.start("rPr"), r.bold && e.empty("b"), r.italic && e.empty("i"), r.size !== void 0 && e.empty("sz", { val: r.size }), r.color && e.empty("color", { rgb: "FF" + r.color.replace(/^#/, "").toUpperCase() }), r.font && e.empty("rFont", { val: r.font }), e.end("rPr")), yt(e, r.text ?? ""), e.end("r");
971
+ }
972
+ }
973
+ function yt(e, t) {
974
+ e.start("t", oe.test(t) || /[\n\r]/.test(t) ? b : void 0), e.text(t), e.end("t");
975
+ }
976
+ function bt(e) {
977
+ let t = e.getRanges();
978
+ if (t.isInvalid()) return null;
979
+ let n = t.getCoords()[0];
980
+ return n ? {
981
+ ref: a.cellToString({
982
+ rowIndex: n.rowStart,
983
+ colIndex: n.colStart
984
+ }),
985
+ row: n.rowStart,
986
+ col: n.colStart
987
+ } : null;
988
+ }
989
+ function W(e, t, n, r, a = !1, o = !1) {
990
+ let c = r.getTheme();
991
+ if (a && t.start("fill"), typeof n == "string" && (n = {
992
+ type: s.Type.Solid,
993
+ color: n
994
+ }), n.type === s.Type.None) a ? t.empty("patternFill", { patternType: "none" }) : t.empty("noFill");
995
+ else if (n.type === s.Type.Solid) {
996
+ let e = n;
997
+ a ? t.start("patternFill", { patternType: "solid" }) : t.start("solidFill"), e.color && (a ? H(t, c, e.color, "fgColor") : B(t, c, e.color)), a ? t.end("patternFill") : t.end("solidFill");
998
+ } else if (n.type === s.Type.Pattern) {
999
+ let e = n, r = e.patternType || "solid";
1000
+ t.start("patternFill", { patternType: r }), e.foreground && (a ? H(t, c, o ? e.background : e.foreground, "fgColor") : B(t, c, o ? e.background : e.foreground)), e.background && (a ? H(t, c, o ? e.foreground : e.background, "bgColor") : B(t, c, o ? e.foreground : e.background)), t.end("patternFill");
1001
+ } else if (n.type === s.Type.Gradient && a) {
1002
+ let e = n, r = {}, i = e.gradientType;
1003
+ if (i !== s.GradientType.Path && i !== s.GradientType.Linear || (r.type = i), e.angle !== void 0) {
1004
+ let t = (e.angle - 90) % 360;
1005
+ t !== 0 && (r.degree = String(t));
1006
+ }
1007
+ let a = e.focus;
1008
+ a && (a.left && (r.left = String(a.left)), a.right && (r.right = String(a.right)), a.top && (r.top = String(a.top)), a.bottom && (r.bottom = String(a.bottom))), t.start("gradientFill", r);
1009
+ let o = e.stops;
1010
+ if (o && o.length > 0) for (let e of o) {
1011
+ let n, r = 0;
1012
+ if (typeof e == "string" || typeof e == "object" && !("offset" in e)) n = e, r = 0;
1013
+ else {
1014
+ let t = e;
1015
+ r = t.offset || 0, n = t.color;
1016
+ }
1017
+ t.start("stop", { position: String(r) }), n && H(t, c, n, "color"), t.end("stop");
1018
+ }
1019
+ t.end("gradientFill");
1020
+ } else if (n.type === s.Type.Gradient) {
1021
+ let e = n, r = {};
1022
+ e.isRotatedWithShape !== void 0 && (r.rotWithShape = e.isRotatedWithShape ? "1" : "0"), t.start("gradFill", r), t.start("gsLst");
1023
+ let a = e.stops;
1024
+ if (a && a.length > 0) for (let e of a) {
1025
+ let n, r = 0;
1026
+ if (typeof e == "string" || typeof e == "object" && !("offset" in e)) n = e;
1027
+ else {
1028
+ let t = e;
1029
+ r = t.offset || 0, n = t.color;
1030
+ }
1031
+ t.start("gs", { pos: String(i.roundAccurately(1e3 * r, 0)) }), n && B(t, c, n), t.end("gs");
1032
+ }
1033
+ t.end("gsLst");
1034
+ let o = e.gradientType;
1035
+ if (o && o !== s.GradientType.Linear) {
1036
+ let n = o === "radial" ? "circle" : o;
1037
+ t.start("path", { path: n });
1038
+ let r = e.focus;
1039
+ if (r) {
1040
+ let e = {};
1041
+ r.t !== void 0 && (e.t = String(i.roundAccurately(1e3 * r.t, 0))), r.l !== void 0 && (e.l = String(i.roundAccurately(1e3 * r.l, 0))), r.b !== void 0 && (e.b = String(i.roundAccurately(1e3 * r.b, 0))), r.r !== void 0 && (e.r = String(i.roundAccurately(1e3 * r.r, 0))), t.empty("fillToRect", e);
1042
+ }
1043
+ t.end("path");
1044
+ } else {
1045
+ let n = {};
1046
+ e.angle !== void 0 && (n.ang = String(i.roundAccurately(6e4 * e.angle, 0)));
1047
+ let r = e.scaled;
1048
+ r !== void 0 && (n.scaled = r ? "1" : "0"), t.empty("lin", n);
1049
+ }
1050
+ t.end("gradFill");
1051
+ } else a ? t.empty("patternFill", { patternType: "none" }) : t.empty("noFill");
1052
+ a && t.end("fill");
1053
+ }
1054
+ var xt = (e, t, n, r) => {
1055
+ if (!n) return t.start("ln"), t.empty("noFill"), void t.end("ln");
1056
+ typeof n == "string" && (n = { fill: n });
1057
+ let a = n, o = {};
1058
+ if (a.width !== void 0 && (o.w = String(q(a.width))), a.lineCap !== void 0 && (o.cap = St(a.lineCap)), a.compound !== void 0 && (o.cmpd = a.compound), a.align !== void 0 && (o.algn = a.align), t.start("ln", o), W(0, t, a.fill ?? Et, r), Array.isArray(a.dash)) {
1059
+ t.start("custDash");
1060
+ for (let e = 0; e < a.dash.length; e += 2) t.empty("ds", {
1061
+ d: String(i.roundAccurately(1e3 * a.dash[e], 0)),
1062
+ sp: String(i.roundAccurately(1e3 * (a.dash[e + 1] ?? 0), 0))
1063
+ });
1064
+ t.end("custDash");
1065
+ } else typeof a.dash == "string" && t.empty("prstDash", { val: a.dash });
1066
+ if (a.lineJoin === _.LineJoin.Round) t.empty("round");
1067
+ else if (a.lineJoin === _.LineJoin.Bevel) t.empty("bevel");
1068
+ else if (a.lineJoin === _.LineJoin.Miter) {
1069
+ let e = {};
1070
+ a.miterLimit !== void 0 && (e.lim = String(i.roundAccurately(1e5 * a.miterLimit, 0))), t.empty("miter", e);
1071
+ }
1072
+ t.end("ln");
1073
+ }, St = (e) => e === "round" ? "rnd" : e === "butt" ? "flat" : e === "square" ? "sq" : e, Ct = (e, t, n, r = void 0, i = !1) => {
1074
+ if (!n || !(n.fill || n.stroke || n.effects?.length || i)) return;
1075
+ let a = e.getXMLWriter();
1076
+ r && a.start(r), a.pushDefaultNamespace("a"), n.fill && W(0, a, n.fill, t), n.stroke && xt(0, a, n.stroke, t), n.effects?.length ? wt(e, a, t.getTheme(), n.effects) : i && a.empty("effectLst"), a.popDefaultNamespace(), r && a.end(r);
1077
+ }, wt = (e, t, n, r) => {
1078
+ t.start("effectLst");
1079
+ for (let e of r) Tt(t, n, e);
1080
+ t.end("effectLst");
1081
+ }, Tt = (e, t, n) => {
1082
+ switch (n.type) {
1083
+ case v.Type.OuterShadow: {
1084
+ let r = n, a = {};
1085
+ r.blur !== void 0 && (a.blurRad = String(q(r.blur))), r.distance !== void 0 && (a.dist = String(q(r.distance))), r.angle !== void 0 && (a.dir = String(Y(r.angle))), r.alignment !== void 0 && (a.algn = r.alignment), r.isRotatedWithShape !== void 0 && (a.rotWithShape = r.isRotatedWithShape ? "1" : "0"), r.scaleX !== void 0 && (a.sx = String(i.roundAccurately(1e3 * r.scaleX, 0))), r.scaleY !== void 0 && (a.sy = String(i.roundAccurately(1e3 * r.scaleY, 0))), r.skewX !== void 0 && (a.kx = String(Y(r.skewX))), r.skewY !== void 0 && (a.ky = String(Y(r.skewY))), e.start("outerShdw", a), B(e, t, r.color), e.end("outerShdw");
1086
+ break;
1087
+ }
1088
+ case v.Type.InnerShadow: {
1089
+ let r = n, i = {};
1090
+ r.blur !== void 0 && (i.blurRad = String(q(r.blur))), r.distance !== void 0 && (i.dist = String(q(r.distance))), r.angle !== void 0 && (i.dir = String(Y(r.angle))), e.start("innerShdw", i), B(e, t, r.color), e.end("innerShdw");
1091
+ break;
1092
+ }
1093
+ case v.Type.PresetShadow: {
1094
+ let r = n, i = { prst: r.preset };
1095
+ r.distance !== void 0 && (i.dist = String(q(r.distance))), r.angle !== void 0 && (i.dir = String(Y(r.angle))), e.start("prstShdw", i), B(e, t, r.color), e.end("prstShdw");
1096
+ break;
1097
+ }
1098
+ case v.Type.Glow: {
1099
+ let r = n, i = {};
1100
+ r.radius !== void 0 && (i.rad = String(q(r.radius))), e.start("glow", i), B(e, t, r.color), e.end("glow");
1101
+ break;
1102
+ }
1103
+ case v.Type.SoftEdge: {
1104
+ let t = n, r = {};
1105
+ t.radius !== void 0 && (r.rad = String(q(t.radius))), e.empty("softEdge", r);
1106
+ break;
1107
+ }
1108
+ case v.Type.Reflection: {
1109
+ let t = n, r = {};
1110
+ t.blur !== void 0 && (r.blurRad = String(q(t.blur))), t.distance !== void 0 && (r.dist = String(q(t.distance))), t.angle !== void 0 && (r.dir = String(Y(t.angle))), t.fadeAngle !== void 0 && (r.fadeDir = String(Y(t.fadeAngle))), t.startAlpha !== void 0 && (r.stA = String(i.roundAccurately(1e3 * t.startAlpha, 0))), t.startPosition !== void 0 && (r.stPos = String(i.roundAccurately(1e3 * t.startPosition, 0))), t.endAlpha !== void 0 && (r.endA = String(i.roundAccurately(1e3 * t.endAlpha, 0))), t.endPosition !== void 0 && (r.endPos = String(i.roundAccurately(1e3 * t.endPosition, 0))), t.scaleX !== void 0 && (r.sx = String(i.roundAccurately(1e3 * t.scaleX, 0))), t.scaleY !== void 0 && (r.sy = String(i.roundAccurately(1e3 * t.scaleY, 0))), t.skewX !== void 0 && (r.kx = String(Y(t.skewX))), t.skewY !== void 0 && (r.ky = String(Y(t.skewY))), t.alignment !== void 0 && (r.algn = t.alignment), t.isRotatedWithShape !== void 0 && (r.rotWithShape = t.isRotatedWithShape ? "1" : "0"), e.empty("reflection", r);
1111
+ break;
1112
+ }
1113
+ }
1114
+ }, Et = { type: "none" }, G = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", K = "imagesWritten", Dt = {
1115
+ mime: "image/png",
1116
+ ext: "png"
1117
+ }, q = (e = 0) => i.roundAccurately(12700 * e, 0), J = (e = 0) => i.roundAccurately(9525 * e, 0), Y = (e) => 6e4 * e, Ot = (e = 0) => i.roundAccurately(100 * e, 2), kt = class {
1118
+ constructor() {
1119
+ this._dxfs = [], this._byKey = /* @__PURE__ */ new Map();
1120
+ }
1121
+ add(e) {
1122
+ let t = JSON.stringify(e), n = this._byKey.get(t);
1123
+ return n === void 0 && (n = this._dxfs.length, this._dxfs.push(e), this._byKey.set(t, n)), n;
1124
+ }
1125
+ getDxfs() {
1126
+ return this._dxfs;
1127
+ }
1128
+ getCount() {
1129
+ return this._dxfs.length;
1130
+ }
1131
+ }, At = "cfDxfs", jt = [
1132
+ "font",
1133
+ "fill",
1134
+ "borders",
1135
+ "numberFormat",
1136
+ "alignment"
1137
+ ];
1138
+ function Mt(e, t, r) {
1139
+ if (t) {
1140
+ if (t.named) {
1141
+ let n = t.named, a = n.toLowerCase(), o = r.namedStyleMap;
1142
+ if (!o.has(a)) {
1143
+ o.set(a, "" + o.size);
1144
+ let t = e.getNamedStyles().getByName(n).toJSON();
1145
+ Mt(e, t.style ?? i.EmptyObject, r), r.namedStyles.push(t);
1146
+ }
1147
+ }
1148
+ t.font && function(e, t, r) {
1149
+ if (!t) return;
1150
+ let i = n.JSONStableStringify(t), a = r.fontMap;
1151
+ if (!a.has(i)) {
1152
+ let e = a.size;
1153
+ a.set(i, "" + e), r.fonts.push(t);
1154
+ }
1155
+ }(0, t.font, r), t.fill && function(e, t, r) {
1156
+ if (!t) return;
1157
+ let i = n.JSONStableStringify(t), a = r.fillMap;
1158
+ if (!a.has(i) && typeof t == "object" && t.type) {
1159
+ let e = a.size;
1160
+ a.set(i, "" + e), r.fills.push(t);
1161
+ }
1162
+ }(0, t.fill, r), t.borders && function(e, t, r) {
1163
+ if (!t) return;
1164
+ let i = n.JSONStableStringify(t), a = r.borderMap;
1165
+ if (!a.has(i)) {
1166
+ let e = a.size;
1167
+ a.set(i, "" + e), r.borders.push(t);
1168
+ }
1169
+ }(0, t.borders, r), t.numberFormat !== void 0 && function(e, t, n) {
1170
+ if (!t) return;
1171
+ let r = p.toBuiltInID(t), i = n.numFmtMap;
1172
+ if (!i.has(r)) {
1173
+ let e = 0;
1174
+ typeof r == "number" ? e = r : (e = n.numFmtsCustom.length + zt, n.numFmtsCustom.push(r)), i.set(t, "" + e);
1175
+ }
1176
+ }(0, t.numberFormat, r);
1177
+ }
1178
+ }
1179
+ function Nt(e, t, n) {
1180
+ if (!t) return;
1181
+ let r = t.name.toLowerCase();
1182
+ n.namedStyleMap.has(r) || (n.namedStyleMap.set(r, "" + n.namedStyleMap.size), n.namedStyles.push(t), Mt(e, t.style, n));
1183
+ }
1184
+ function Pt(e, t, n, r, i = !1) {
1185
+ let a = r.getDefaultFontSize(), o = r.getTheme().getFontScheme().getMinorFont() ?? "Calibri", s = r.getNormal().getFont().getColor();
1186
+ t.start("font"), n.weight && n.weight >= 700 && t.empty("b"), n.style && n.style !== "normal" && t.empty("i"), n.strike && t.empty("strike"), n.underline && t.empty("u", { val: n.underline }), n.outline && t.empty("outline"), n.shadow && t.empty("shadow"), n.extend && t.empty("extend");
1187
+ let c = n.verticalAlign;
1188
+ c && (c === "super" && (c = "superscript"), c === "sub" && (c = "subscript"), t.empty("vertAlign", { val: c })), i ? n.size !== void 0 && t.empty("sz", { val: String(n.size) }) : t.empty("sz", { val: String(n.size ?? a) }), H(t, r.getTheme(), n.color ?? s, "color", !i);
1189
+ let l = !i || n.family && n.family !== o;
1190
+ if (l && (t.empty("name", { val: n.family ?? o }), n.fallbacks && n.fallbacks.length > 0)) {
1191
+ let e = n.fallbacks;
1192
+ e.includes("serif") ? t.empty("family", { val: 1 }) : e.includes("sans-serif") ? t.empty("family", { val: 2 }) : e.includes("monospace") ? t.empty("family", { val: 3 }) : e.includes("cursive") ? t.empty("family", { val: 4 }) : e.includes("fantasy") && t.empty("family", { val: 5 });
1193
+ }
1194
+ n.charset !== void 0 && n.charset !== null && t.empty("charset", { val: String(n.charset) });
1195
+ let u = n.scheme ?? (n.family === void 0 ? "minor" : void 0);
1196
+ l && u !== void 0 && u !== "none" && t.empty("scheme", { val: u }), t.end("font");
1197
+ }
1198
+ function X(e, t, n, r, i, a = !1) {
1199
+ if (!i || i.style === "none" || !i.style) return void (a && !i || t.empty(r));
1200
+ t.start(r, { style: i.style });
1201
+ let o = i.color;
1202
+ o && H(t, n, o, "color", !a, a), t.end(r);
1203
+ }
1204
+ function Ft(e, t, n, r, i = !1) {
1205
+ let a = {};
1206
+ i ? (a.diagonalUp = "0", a.diagonalDown = "0") : (n.diagonalUp && (a.diagonalUp = "1"), n.diagonalDown && (a.diagonalDown = "1")), t.start("border", a), X(0, t, r, "left", n.left, i), X(0, t, r, "right", n.right, i), X(0, t, r, "top", n.top, i), X(0, t, r, "bottom", n.bottom, i), i ? (X(0, t, r, "vertical", n.vertical, i), X(0, t, r, "horizontal", n.horizontal, i)) : X(0, t, r, "diagonal", n.diagonalUp ?? n.diagonalDown, i), t.end("border");
1207
+ }
1208
+ function It(e, t, n, r = !1) {
1209
+ let i = {};
1210
+ n.horizontal && n.horizontal !== c.HorizontalAlignment.General && (i.horizontal = n.horizontal), n.vertical && n.vertical !== c.VerticalAlignment.Bottom && (i.vertical = n.vertical);
1211
+ let a = n.rotation;
1212
+ n.stacked && (i.textRotation = "255", a = 0), a && (a >= 270 && a < 360 ? a = 360 - a : a > 0 && a <= 90 && (a += 90), i.textRotation = String(a));
1213
+ let o = n.overflow;
1214
+ switch (o === c.Overflow.Wrap && (i.wrapText = "1"), n.indent && (i.indent = "" + n.indent), n.relativeIndent && (i.relativeIndent = "" + n.relativeIndent), n.justifyLastLine && (i.justifyLastLine = "1"), o === c.Overflow.Shrink && (i.shrinkToFit = "1"), n.readingDirection) {
1215
+ case c.ReadingDirection.Auto: break;
1216
+ case c.ReadingDirection.LeftToRight:
1217
+ i.readingOrder = "1";
1218
+ break;
1219
+ case c.ReadingDirection.RightToLeft: i.readingOrder = "2";
1220
+ }
1221
+ return Object.keys(i).length > 0 ? i : null;
1222
+ }
1223
+ function Lt(e, t, r, i, a, o, s = !1) {
1224
+ let c = {}, l = null, u = i.named;
1225
+ u && (l = r.getNamedStyles().getByName(u).toJSON().style);
1226
+ let d = i.font ?? l?.font, p = d ? a.fontMap.get(n.JSONStableStringify(d)) ?? 0 : 0, m = i.fill ?? l?.fill, h = m ? a.fillMap.get(n.JSONStableStringify(m)) ?? 0 : 0, g = i.borders ?? l?.borders, _ = g ? a.borderMap.get(n.JSONStableStringify(g)) ?? 0 : 0, v = i.numberFormat ?? l?.numberFormat;
1227
+ if (c.numFmtId = (v === void 0 ? void 0 : a.numFmtMap.get(v)) ?? "0", c.fontId = String(p), c.fillId = String(h), c.borderId = String(_), o) {
1228
+ let e = i.named ?? f.BuiltInName.Normal;
1229
+ c.xfId = a.namedStyleMap.get(e.toLowerCase());
1230
+ }
1231
+ let y = null, b = i.alignment ?? l?.alignment;
1232
+ b && (y = It(0, 0, b)), i.font && (c.applyFont = "1"), i.fill && (c.applyFill = "1"), i.numberFormat && (c.applyNumberFormat = "1"), i.borders && (c.applyBorder = "1"), y && (c.applyAlignment = "1");
1233
+ let x = null, S = i.protection?.alwaysUnlocked ?? l?.protection?.alwaysUnlocked ?? !1;
1234
+ (S || s) && (x = {}, S && (x.locked = "0"), s && (x.hidden = "1"), c.applyProtection = "1"), i.quotePrefix && (c.quotePrefix = "1"), y || x ? (t.start("xf", c), y && t.empty("alignment", y), x && t.empty("protection", x), t.end("xf")) : t.empty("xf", c);
1235
+ }
1236
+ function Rt(e, t, n, r, i, a = "dxf", o = zt) {
1237
+ if (t.start(a), n.font && Pt(0, t, n.font, r, !0), n.numberFormat !== void 0 && n.numberFormat !== null) {
1238
+ let e = p.toBuiltInID(n.numberFormat), r = typeof e == "number", i = r ? p.builtInFormat(e) : String(e);
1239
+ i && t.empty("numFmt", {
1240
+ numFmtId: String(r ? e : o++),
1241
+ formatCode: i
1242
+ });
1243
+ }
1244
+ if (n.fill && W(0, t, n.fill, r, !0, !0), n.alignment) {
1245
+ let e = It(0, 0, n.alignment, !0);
1246
+ e && t.empty("alignment", e);
1247
+ }
1248
+ return n.borders && Ft(0, t, n.borders, i, !0), t.end(a), o;
1249
+ }
1250
+ var zt = 164, Bt = Object.freeze([
1251
+ "wholeTable",
1252
+ "headerRow",
1253
+ "totalRow",
1254
+ "firstColumn",
1255
+ "lastColumn",
1256
+ "firstRowStripe",
1257
+ "secondRowStripe",
1258
+ "firstColumnStripe",
1259
+ "secondColumnStripe",
1260
+ "firstHeaderCell",
1261
+ "lastHeaderCell",
1262
+ "firstTotalCell",
1263
+ "lastTotalCell"
1264
+ ]), Vt = g.BuiltInOperatorNames, Ht = (e, t, n, r, i, a) => {
1265
+ let o = r.sorts, s = o ? o.length : 0;
1266
+ if (s === 0) return;
1267
+ let c = {};
1268
+ if (s > 0) {
1269
+ let e = o[0].criteria?.collatorOptions;
1270
+ e && (c.caseSensitive = typeof e != "object" || Array.isArray(e) || e.sensitivity !== "case" && e.sensitivity !== "variant" ? "0" : "1");
1271
+ }
1272
+ c.ref = n.getRange().toString(), c["xmlns:xlrd2"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2", t.start("sortState", c);
1273
+ for (let e = 0; e < s; e++) {
1274
+ let n = o[e], r = n.criteria ?? {}, s = n.index + a.colStart, c = {};
1275
+ r.reverse && (c.descending = "1"), c.ref = i.getIntersect({
1276
+ colStart: s,
1277
+ rowStart: a.rowStart,
1278
+ colEnd: s,
1279
+ rowEnd: a.rowEnd
1280
+ }).toString(), r.sortOn && (c.sortBy = r.sortOn), r.dxfId !== void 0 && (c.dxfId = r.dxfId), r.iconSet !== void 0 && (c.iconSet = r.iconSet), r.customList !== void 0 && (c.customList = r.customList), t.empty("sortCondition", c);
1281
+ }
1282
+ t.end("sortState");
1283
+ }, Ut = (e, t, n, r, i = !1) => {
1284
+ let a = n.getRange();
1285
+ n.isShowTotals() && (a = a.getResizeBy(-1, 0));
1286
+ let o = a.getCoords(), s = r.sort, c = r.filter, l = c ? c.conditions : void 0, u = l ? l.length : 0, d = r.hiddenButtons, f = {};
1287
+ f.ref = a.toString();
1288
+ let p, m = [];
1289
+ for (let e = 0; e < u; e++) {
1290
+ let t = l[e];
1291
+ m[t.index] = { ...t };
1292
+ }
1293
+ if (Array.isArray(d) && d.length > 0) {
1294
+ let e = d.length;
1295
+ p = Array(d[e - 1]);
1296
+ for (let t = 0; t < e; t++) p[d[t]] = !0;
1297
+ }
1298
+ if (m || d || p || i) {
1299
+ let c = 0;
1300
+ r.columns ? c = r.columns.length : i && (c = a.getColumnCount()), t.start("autoFilter", f);
1301
+ for (let n = 0; n < c; n++) {
1302
+ let r = !0 === d || !0 === p?.[n], i = m[n];
1303
+ (i || r) && Gt(e, t, n, i, r);
1304
+ }
1305
+ s && i && Ht(0, t, n, s, a, o), t.end("autoFilter");
1306
+ } else t.empty("autoFilter", f);
1307
+ s && !i && Ht(0, t, n, s, a, o);
1308
+ }, Wt = (e, t, n) => {
1309
+ let r = _e(n, (t) => e.warn(t, n));
1310
+ if (!r) return;
1311
+ let i = { operator: r.operator };
1312
+ r.val !== void 0 && (i.val = r.val), t.empty("customFilter", i);
1313
+ }, Gt = (e, t, n, r, i) => {
1314
+ let a = {};
1315
+ a.colId = "" + n, i && (a.hiddenButton = "1"), r ? (t.start("filterColumn", a), ((e, t, n) => {
1316
+ let r = n.operator;
1317
+ if (r !== g.BuiltInOperatorNames.Expression) if (r !== g.BuiltInOperatorNames.Unique) {
1318
+ if (r === g.BuiltInOperatorNames.Color) {
1319
+ let e = n.param, r = {};
1320
+ e.cellColor !== void 0 && (r.cellColor = e.cellColor ? "1" : "0"), e.styleId !== void 0 && (r.dxfId = e.styleId), t.empty("colorFilter", r);
1321
+ }
1322
+ if (Kt(r)) if (r === "between") {
1323
+ let r = n.param;
1324
+ t.start("customFilters", { and: "1" }), Wt(e, t, {
1325
+ operator: Vt.GreaterThanEqualTo,
1326
+ param: r.from
1327
+ }), Wt(e, t, {
1328
+ operator: Vt.LessThanEqualTo,
1329
+ param: r.to
1330
+ }), t.end("customFilters");
1331
+ } else if (r === g.BuiltInOperatorNames.Not) {
1332
+ let r = n.param;
1333
+ D(r?.operator) ? (t.start("customFilters"), Wt(e, t, n), t.end("customFilters")) : e.warn("Not rule with non-comparison criteria not supported in OOXML", r);
1334
+ } else if (r === g.BuiltInOperatorNames.And || r === g.BuiltInOperatorNames.Or) {
1335
+ let i = n.param, a = i.length;
1336
+ if (a > 0) {
1337
+ let n = {};
1338
+ r === g.BuiltInOperatorNames.And && a > 1 && (n.and = "1"), t.start("customFilters", n);
1339
+ for (let n = 0; n < a; n++) {
1340
+ let r = i[n], a = r.operator === Vt.Not && D(r.param?.operator);
1341
+ D(r.operator) || a ? Wt(e, t, r) : e.warn("Only Comparison criteria supported in Union conditions for Table AutoFilters", r);
1342
+ }
1343
+ t.end("customFilters");
1344
+ }
1345
+ } else D(r) && (t.start("customFilters"), Wt(e, t, n), t.end("customFilters"));
1346
+ if (r === g.BuiltInOperatorNames.TimePeriod) {
1347
+ let e = n.param, r = {};
1348
+ e.type && (r.type = e.type), e.anchorDate !== void 0 && (r.val = "" + e.anchorDate), e.maxVal !== void 0 && (r.maxVal = "" + e.maxVal), t.empty("dynamicFilter", r);
1349
+ }
1350
+ if (r === g.BuiltInOperatorNames.Average) {
1351
+ let e = n.param, r = {}, i = e.type;
1352
+ i && (i === g.AverageType.Above ? r.type = "aboveAverage" : i === g.AverageType.Below && (r.type = "belowAverage")), e.stdDevs !== void 0 && (r.val = "" + e.stdDevs), t.empty("dynamicFilter", r);
1353
+ }
1354
+ if (r === g.BuiltInOperatorNames.InSet) {
1355
+ let e = n.param;
1356
+ if (e.dateGroups) {
1357
+ let n = e.dateGroups, r = n.length;
1358
+ t.start("dateGroupItem");
1359
+ for (let e = 0; e < r; e++) {
1360
+ let r = n[e], i = {};
1361
+ r.day !== void 0 && (i.day = "" + r.day), r.hour !== void 0 && (i.hour = "" + r.hour), r.minute !== void 0 && (i.minute = "" + r.minute), r.second !== void 0 && (i.second = "" + r.second), r.year !== void 0 && (i.year = "" + r.year), r.month !== void 0 && (i.month = "" + r.month), i.dateTimeGrouping = r.group, t.empty("dateGroupItem", i);
1362
+ }
1363
+ t.end("dateGroupItem");
1364
+ }
1365
+ if (e.items) {
1366
+ let n = e.items, r = n.length;
1367
+ t.start("filters");
1368
+ for (let e = 0; e < r; e++) {
1369
+ let r = n[e];
1370
+ t.empty("filter", { val: "" + r });
1371
+ }
1372
+ t.end("filters");
1373
+ }
1374
+ }
1375
+ if (r === g.BuiltInOperatorNames.Icon) {
1376
+ let e = n.param, r = {};
1377
+ e.iconSet !== void 0 && (r.iconSet = e.iconSet), e.iconId !== void 0 && (r.iconId = "" + e.iconId), t.empty("iconFilter", r);
1378
+ }
1379
+ if (r === g.BuiltInOperatorNames.TopN) {
1380
+ let e = n.param, r = {};
1381
+ e.percent && (r.percent = "1"), e.top !== void 0 && (r.top = e.top ? "1" : "0"), e.limit !== void 0 && (r.val = "" + e.limit), e.filterVal !== void 0 && (r.filterVal = "" + e.filterVal), t.empty("top10", r);
1382
+ }
1383
+ } else e.warn("Unique conditions not supported in Table AutoFilters", n);
1384
+ else e.warn("Expression conditions not supported in Table AutoFilters", n);
1385
+ })(e, t, r), t.end("filterColumn")) : t.empty("filterColumn", a);
1386
+ }, Kt = (e) => e === g.BuiltInOperatorNames.GreaterThan || e === g.BuiltInOperatorNames.GreaterThanEqualTo || e === g.BuiltInOperatorNames.LessThan || e === g.BuiltInOperatorNames.LessThanEqualTo || e === g.BuiltInOperatorNames.EqualTo || e === g.BuiltInOperatorNames.And || e === g.BuiltInOperatorNames.Or || e === g.BuiltInOperatorNames.Not || e === "between", qt = {
1387
+ names: /* @__PURE__ */ new Set(),
1388
+ perFormula: [],
1389
+ affects: () => !1
1390
+ }, Jt = 1048576;
1391
+ function Yt(e, t) {
1392
+ let n = t.type;
1393
+ n === l.ColorStopType.AutoMin ? n = l.ColorStopType.Min : n === l.ColorStopType.AutoMax && (n = l.ColorStopType.Max), e.empty("cfvo", {
1394
+ type: n,
1395
+ val: t.value,
1396
+ gte: t.exclusive ? "0" : void 0
1397
+ });
1398
+ }
1399
+ function Xt(e, t) {
1400
+ let n = {
1401
+ type: t.type,
1402
+ gte: t.exclusive ? "0" : void 0
1403
+ };
1404
+ t.value === void 0 ? e.empty("x14:cfvo", n) : (e.start("x14:cfvo", n), e.start("xm:f"), e.text(t.value), e.end("xm:f"), e.end("x14:cfvo"));
1405
+ }
1406
+ var Zt = /* @__PURE__ */ new Set([
1407
+ f.IconSet.Arrows3,
1408
+ f.IconSet.ArrowsGray3,
1409
+ f.IconSet.Flags3,
1410
+ f.IconSet.Signs3,
1411
+ f.IconSet.Symbols3,
1412
+ f.IconSet.Symbols3_2,
1413
+ f.IconSet.TrafficLights3,
1414
+ f.IconSet.TrafficLights3_2,
1415
+ f.IconSet.Arrows4,
1416
+ f.IconSet.ArrowsGray4,
1417
+ f.IconSet.Rating4,
1418
+ f.IconSet.RedToBlack4,
1419
+ f.IconSet.TrafficLights4,
1420
+ f.IconSet.Arrows5,
1421
+ f.IconSet.ArrowsGray5,
1422
+ f.IconSet.Quarters5,
1423
+ f.IconSet.Rating5
1424
+ ]);
1425
+ function Qt(e) {
1426
+ return (e.icon?.length ?? 0) > 0 || e.iconSet !== void 0 && !Zt.has(e.iconSet);
1427
+ }
1428
+ function $t(e, t, n, r, a, o, s, c, u) {
1429
+ let d = r.scale;
1430
+ r.ext && e.warn("Conditional format extension payload is not written to xlsx; it will be lost.");
1431
+ let f, p = {
1432
+ type: a.type,
1433
+ dxfId: r.style && Object.keys(r.style).length > 0 ? c.add(r.style) : void 0,
1434
+ priority: s,
1435
+ stopIfTrue: Z(r.stopIfTrue),
1436
+ aboveAverage: Z(a.aboveAverage),
1437
+ equalAverage: Z(a.equalAverage),
1438
+ stdDev: a.stdDev,
1439
+ bottom: Z(a.bottom),
1440
+ percent: Z(a.percent),
1441
+ rank: a.rank,
1442
+ operator: a.operator,
1443
+ text: a.text,
1444
+ timePeriod: a.timePeriod
1445
+ };
1446
+ d?.type === l.ScaleType.DataBar && function(e) {
1447
+ if (e.gradient || e.borderColor || e.negativeFillColor || e.negativeBorderColor || e.axisColor || e.axisPosition || e.direction) return !0;
1448
+ let t = e.stops, n = t ? t.length : 0;
1449
+ for (let e = 0; e < n; e++) {
1450
+ let n = t[e].type;
1451
+ if (n === l.ColorStopType.AutoMin || n === l.ColorStopType.AutoMax) return !0;
1452
+ }
1453
+ return !1;
1454
+ }(d) && (f = fe(i.uuidV4), u.push({
1455
+ guid: f,
1456
+ sqref: o,
1457
+ priority: s,
1458
+ scale: d
1459
+ }));
1460
+ let m = a.formulas, h = m ? m.length : 0;
1461
+ if (h !== 0 || d) {
1462
+ t.start("cfRule", p);
1463
+ for (let e = 0; e < h; e++) t.start("formula"), t.text(m[e]), t.end("formula");
1464
+ if (d?.type === l.ScaleType.ColorScale) {
1465
+ let e = d.stops ?? [];
1466
+ t.start("colorScale");
1467
+ for (let n = 0; n < e.length; n++) Yt(t, e[n]);
1468
+ for (let r = 0; r < e.length; r++) H(t, n, e[r].color, "color");
1469
+ t.end("colorScale");
1470
+ } else if (d?.type === l.ScaleType.DataBar) {
1471
+ let e = d.stops ?? [];
1472
+ t.start("dataBar", {
1473
+ minLength: d.minLength,
1474
+ maxLength: d.maxLength,
1475
+ showValue: Z(d.showValue)
1476
+ });
1477
+ for (let n = 0; n < e.length; n++) Yt(t, e[n]);
1478
+ d.color && H(t, n, d.color, "color"), t.end("dataBar");
1479
+ } else if (d?.type === l.ScaleType.IconSet) {
1480
+ let e = d.stops ?? [];
1481
+ t.start("iconSet", {
1482
+ iconSet: d.iconSet,
1483
+ reverse: Z(d.reverse),
1484
+ showValue: Z(d.showValue)
1485
+ });
1486
+ for (let n = 0; n < e.length; n++) Yt(t, e[n]);
1487
+ t.end("iconSet");
1488
+ }
1489
+ f && (t.start("extLst"), t.start("ext", {
1490
+ uri: "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}",
1491
+ "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
1492
+ }), t.start("x14:id"), t.text(f), t.end("x14:id"), t.end("ext"), t.end("extLst")), t.end("cfRule");
1493
+ } else t.empty("cfRule", p);
1494
+ }
1495
+ function en(e) {
1496
+ let t = 2 ** 53 - 1, n = 2 ** 53 - 1, r = e.split(" ");
1497
+ for (let e = 0; e < r.length; e++) {
1498
+ if (!r[e]) continue;
1499
+ let i = a.fastStringToRange(r[e]);
1500
+ i.rowStart < t && (t = i.rowStart), i.colStart < n && (n = i.colStart);
1501
+ }
1502
+ return a.cellToString({
1503
+ rowIndex: t,
1504
+ colIndex: n
1505
+ });
1506
+ }
1507
+ function tn(e) {
1508
+ if (typeof e == "string") return e.split(",").join(" ");
1509
+ if (Array.isArray(e)) {
1510
+ let t = [];
1511
+ for (let n = 0; n < e.length; n++) {
1512
+ let r = a.rangeToString(e[n]);
1513
+ r && t.push(r);
1514
+ }
1515
+ return t.length > 0 ? t.join(" ") : null;
1516
+ }
1517
+ return a.rangeToString(e);
1518
+ }
1519
+ function Z(e) {
1520
+ if (e !== void 0) return e ? "1" : "0";
1521
+ }
1522
+ function nn(e) {
1523
+ if (typeof e != "string") return !1;
1524
+ let t = !1;
1525
+ for (let n = 0; n < e.length; n++) {
1526
+ let r = e[n];
1527
+ if (r === "\"") t = !t;
1528
+ else if (r === "!" && !t) return !0;
1529
+ }
1530
+ return !1;
1531
+ }
1532
+ function rn(e) {
1533
+ let t = e.formulas, n = t ? t.length : 0;
1534
+ for (let e = 0; e < n; e++) if (nn(t[e])) return !0;
1535
+ return !1;
1536
+ }
1537
+ function an(e) {
1538
+ let t = 2 ** 53 - 1, n = 2 ** 53 - 1, r = e.split(" ");
1539
+ for (let e = 0; e < r.length; e++) {
1540
+ if (!r[e]) continue;
1541
+ let i = a.fastStringToRange(r[e]);
1542
+ i.rowStart < t && (t = i.rowStart), i.colStart < n && (n = i.colStart);
1543
+ }
1544
+ return t === 2 ** 53 - 1 ? null : {
1545
+ rowIndex: t,
1546
+ colIndex: n
1547
+ };
1548
+ }
1549
+ function on(e, t, n) {
1550
+ if (typeof e != "string" || !e || !t || !n) return e;
1551
+ try {
1552
+ let r = n.parse(e, t);
1553
+ return r && h.image(n.spell(r, !0), { at: t }) || e;
1554
+ } catch {
1555
+ return e;
1556
+ }
1557
+ }
1558
+ function sn(e, t, n) {
1559
+ let r, i = e?.stops;
1560
+ if (!i || !n) return e;
1561
+ for (let e = 0; e < i.length; e++) {
1562
+ let a = i[e]?.value;
1563
+ if (typeof a != "string") continue;
1564
+ let o = on(a, t, n);
1565
+ o !== a && (r ||= [...i], r[e] = {
1566
+ ...i[e],
1567
+ value: o
1568
+ });
1569
+ }
1570
+ return r ? {
1571
+ ...e,
1572
+ stops: r
1573
+ } : e;
1574
+ }
1575
+ function cn(e, t, n, r) {
1576
+ if (!r?.xml) return;
1577
+ let i = e.addPart("legacyDrawing", r);
1578
+ t.empty(n, { "r:id": i.relId });
1579
+ }
1580
+ var ln = (e) => e.content?.type !== "control", un = (e, t, n) => {
1581
+ e.start(t), e.start("xdr:col"), e.text(n.c ?? 0), e.end("xdr:col"), e.start("xdr:colOff"), e.text(J(n.x)), e.end("xdr:colOff"), e.start("xdr:row"), e.text(n.r ?? 0), e.end("xdr:row"), e.start("xdr:rowOff"), e.text(J(n.y)), e.end("xdr:rowOff"), e.end(t);
1582
+ }, dn = {
1583
+ r: void 0,
1584
+ s: void 0,
1585
+ t: void 0,
1586
+ cm: void 0,
1587
+ vm: void 0
1588
+ }, fn = {
1589
+ r: void 0,
1590
+ s: void 0,
1591
+ customFormat: void 0,
1592
+ hidden: void 0,
1593
+ ht: void 0,
1594
+ customHeight: void 0,
1595
+ "x14ac:dyDescent": "0.25",
1596
+ outlineLevel: void 0,
1597
+ collapsed: void 0
1598
+ }, pn = {
1599
+ t: void 0,
1600
+ aca: void 0,
1601
+ ref: void 0,
1602
+ ca: void 0,
1603
+ si: void 0
1604
+ }, mn = {
1605
+ t: "shared",
1606
+ aca: void 0,
1607
+ ref: void 0,
1608
+ ca: void 0,
1609
+ si: void 0
1610
+ }, hn = {
1611
+ t: "array",
1612
+ aca: void 0,
1613
+ ref: void 0,
1614
+ ca: void 0,
1615
+ si: void 0
1616
+ };
1617
+ function gn(e, t, n, r) {
1618
+ n && (t.start(r), t.empty("latin", { typeface: n }), t.empty("ea", { typeface: "" }), t.empty("cs", { typeface: "" }), t.end(r));
1619
+ }
1620
+ var _n = (e) => e.toISOString().split(".")[0] + "Z", vn = (e, t, n) => {
1621
+ switch (t) {
1622
+ case "creator":
1623
+ e.start("dc:creator"), e.text(n), e.end("dc:creator");
1624
+ break;
1625
+ case "lastModifiedBy":
1626
+ e.start("cp:lastModifiedBy"), e.text(n), e.end("cp:lastModifiedBy");
1627
+ break;
1628
+ case "created":
1629
+ e.start("dcterms:created", { "xsi:type": "dcterms:W3CDTF" }), e.text(n), e.end("dcterms:created");
1630
+ break;
1631
+ case "modified": e.start("dcterms:modified", { "xsi:type": "dcterms:W3CDTF" }), e.text(n), e.end("dcterms:modified");
1632
+ }
1633
+ }, Q = (e, t, n, r) => {
1634
+ t.start(n), t.text(r), t.end(n);
1635
+ }, yn = {
1636
+ minSupportedVersion: "120000",
1637
+ copy: "1",
1638
+ pasteAll: "1",
1639
+ pasteValues: "1",
1640
+ merge: "1",
1641
+ splitFirst: "1",
1642
+ rowColShift: "1",
1643
+ clearFormats: "1",
1644
+ clearComments: "1",
1645
+ assign: "1",
1646
+ coerce: "1"
1647
+ }, bn = (e, t, n = i.EmptyArray) => {
1648
+ if (!t) return { ...n };
1649
+ let { text: r, runs: a, color: o, size: s, kern: c, weight: l, style: u, b: d, i: f, spc: p, baseline: m, ...h } = t, g = {
1650
+ ...n,
1651
+ ...h
1652
+ };
1653
+ return s !== void 0 && (g.sz = "" + Ot(s)), d !== void 0 && (g.b = d ? "1" : "0"), l !== void 0 && (g.b = l > 500 ? "1" : "0"), f !== void 0 && (g.i = f ? "1" : "0"), u !== void 0 && (g.i = u === "italic" ? "1" : "0"), c !== void 0 && (g.kern = "" + Ot(c)), p !== void 0 && (g.spc = "" + Ot(p)), m !== void 0 && (g.baseline = "" + Ot(m)), g;
1654
+ }, xn = (e, t, n) => {
1655
+ if (!n) return;
1656
+ let r = e.getXMLWriter();
1657
+ r.start("txBody"), r.pushDefaultNamespace("a"), Cn(e, t, {
1658
+ vertOverflow: "clip",
1659
+ horzOverflow: "clip",
1660
+ rtlCol: "0",
1661
+ anchor: "ctr"
1662
+ }), r.empty("lstStyle"), ((e, t, n) => {
1663
+ if (!n) return;
1664
+ let r = e.getXMLWriter();
1665
+ r.pushDefaultNamespace("a"), typeof n == "string" && (n = { runs: [{ text: n }] }), r.start("p"), r.empty("pPr", { algn: "ctr" });
1666
+ let i = bn(0, n, {
1667
+ ...wn,
1668
+ size: t.getDefaultFontSize()
1669
+ }), a = n?.runs, o = a ? a.length : 0;
1670
+ if (o > 0) for (let e = 0; e < o; e++) {
1671
+ let n = a[e];
1672
+ r.start("r", {});
1673
+ let i = bn(0, n, wn), o = n.color;
1674
+ o ? (r.start("rPr", i), W(0, r, o, t), r.end("rPr")) : r.empty("rPr", i), r.start("t"), r.text(n?.text ?? ""), r.end("t"), r.end("r");
1675
+ }
1676
+ else r.empty("endParaRPr", i);
1677
+ r.end("p"), r.popDefaultNamespace();
1678
+ })(e, t, n), r.popDefaultNamespace(), r.end("txBody");
1679
+ }, Sn = (e, t, n) => {
1680
+ if (!n) return;
1681
+ let r = e.getXMLWriter(), i = bn(0, n);
1682
+ r.empty("defRPr", i);
1683
+ }, Cn = (e, t, n) => {
1684
+ if (!n) return;
1685
+ let r = e.getXMLWriter(), { spAutoFit: i, ...a } = n;
1686
+ i ? (r.start("bodyPr", a), r.empty("spAutoFit"), r.end("bodyPr")) : r.empty("bodyPr", a);
1687
+ }, wn = Object.freeze({ lang: "en-US" }), Tn = (e, t) => {
1688
+ if (t.length !== 0) {
1689
+ e.start("a:extLst");
1690
+ for (let n of t) {
1691
+ let t = {}, r = n[0];
1692
+ r && (t.uri = r), e.start("a:ext", t), e.empty(n[1], n[2]), e.end("a:ext");
1693
+ }
1694
+ e.end("a:extLst");
1695
+ }
1696
+ }, En = async (e, t, n, r, i) => {
1697
+ let a, o = e.getSharedStates(), s = r.getContent().getResource(), c = await s.getExternalURI();
1698
+ if (c) a = e.addExternal(G, c);
1699
+ else if (a = n.get(s), !a) {
1700
+ let t = o.get(K);
1701
+ t || (t = /* @__PURE__ */ new Map(), o.set(K, t));
1702
+ let r = t.get(s);
1703
+ if (!r) {
1704
+ let e = await s.toBuffer();
1705
+ r = {
1706
+ bytes: new Uint8Array(e),
1707
+ type: await s.getType() ?? Dt,
1708
+ index: t.size + 1
1709
+ }, t.set(s, r);
1710
+ }
1711
+ a = e.addBinary(r.bytes, r.type.mime, G, `../media/image${r.index}.${r.type.ext}`, !0), n.set(s, a);
1712
+ }
1713
+ let l = { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships" };
1714
+ c ? l["r:link"] = a.relId : l["r:embed"] = a.relId;
1715
+ let u = [];
1716
+ c || u.push([
1717
+ "{28A0092B-C50C-407E-A947-70E740481C1C}",
1718
+ "a14:useLocalDpi",
1719
+ {
1720
+ "xmlns:a14": "http://schemas.microsoft.com/office/drawing/2010/main",
1721
+ val: "0"
1722
+ }
1723
+ ]);
1724
+ let d = e.getXMLWriter();
1725
+ d.start("pic"), d.start("nvPicPr"), Pn(e, d, r, i, t), In(e, d, r, i), d.end("nvPicPr"), d.start("blipFill"), d.start("a:blip", l), Tn(d, u), d.end("a:blip"), d.start("a:stretch"), d.empty("a:fillRect"), d.end("a:stretch"), d.end("blipFill"), Mn(e, t, n, r, i), d.end("pic");
1726
+ }, Dn = async (e, t, n, r, i, a) => {
1727
+ let o = i.content?.json, s = o?.xml, c = o?.part;
1728
+ if (!s || !c) return $(e, t, n, r, i);
1729
+ let l = await et(c, e, "../charts/chart{n}.xml");
1730
+ if (!l?.relId) return $(e, t, n, r, i);
1731
+ let u = l.relId === c.id ? s : s.replace(`r:id="${c.id}"`, `r:id="${l.relId}"`);
1732
+ a !== void 0 && typeof i.content?.json?.sourceId == "number" && (u = u.replace(`cNvPr id="${i.content.json.sourceId}"`, `cNvPr id="${a}"`)), e.getXMLWriter().raw(u);
1733
+ }, On = async (e, t, n, r, i) => $(e, t, n, r, i), kn = async (e, t, n, r, i) => $(e, t, n, r, i), An = async (e, t, n, r, i) => $(e, t, n, r, i), jn = async (e, t, n, r, i, a) => {
1734
+ let o = i.content?.json, s = o?.xml;
1735
+ if (!s) return $(e, t, n, r, i);
1736
+ let c = a !== void 0 && typeof o?.sourceId == "number" ? s.replace(`cNvPr id="${o.sourceId}"`, `cNvPr id="${a}"`) : s;
1737
+ e.getXMLWriter().raw(c);
1738
+ }, $ = async (e, t, n, r, i) => {
1739
+ (async (e, t, n, r, i) => {
1740
+ let a = e.getXMLWriter(), o = {}, s = i.content?.json, c = s?.type ?? "sp", l = t.getStyles();
1741
+ c === "cxnSp" ? (o.macro = "", a.start("cxnSp", o), a.start("nvCxnSpPr"), Pn(e, a, r, i, t), Fn(e, a, r, i, t), a.start("cNvCxnSpPr"), a.empty("a:stCnx", {
1742
+ id: "0",
1743
+ idx: "0"
1744
+ }), a.end("cNvCxnSpPr"), a.end("nvCxnSpPr"), Mn(e, t, n, r, i), Nn(e, t, n, r, i), xn(e, l, s?.text), a.end("cxnSp")) : c === "grpSp" || (o.macro = "", o.textlink = "", a.start("sp", o), a.start("nvSpPr"), Pn(e, a, r, i, t), Fn(e, a, r, i, t), a.end("nvSpPr"), Mn(e, t, n, r, i), Nn(e, t, n, r, i), xn(e, l, s?.text), a.end("sp"));
1745
+ })(e, t, n, r, {
1746
+ ...i,
1747
+ content: {
1748
+ type: "shape",
1749
+ json: {
1750
+ fill: "bg1",
1751
+ stroke: {
1752
+ width: 2,
1753
+ fill: "red"
1754
+ },
1755
+ text: { runs: [{
1756
+ text: "Unsupported Type: " + (i.content?.type ?? "unknown"),
1757
+ color: "tx1"
1758
+ }] }
1759
+ }
1760
+ }
1761
+ });
1762
+ }, Mn = (e, t, n, r, i) => {
1763
+ let a = e.getXMLWriter(), o = i.content?.json, s = o?.geometry ?? "rect", c = t.getStyles();
1764
+ a.start("spPr"), a.pushDefaultNamespace("a"), Ln(a, r, i), a.start("prstGeom", { prst: s }), a.empty("avLst"), a.end("prstGeom"), Ct(e, c, o), a.popDefaultNamespace(), a.end("spPr");
1765
+ }, Nn = (e, t, n, r, i) => {
1766
+ let a = e.getXMLWriter();
1767
+ a.start("style"), a.pushDefaultNamespace("a"), a.start("lnRef", { idx: "1" }), a.start("schemeClr", { val: "accent1" }), a.empty("shade", { val: "15000" }), a.end("schemeClr"), a.end("lnRef"), a.start("fillRef", { idx: "1" }), a.empty("schemeClr", { val: "accent1" }), a.end("fillRef"), a.start("effectRef", { idx: "0" }), a.empty("schemeClr", { val: "accent1" }), a.end("effectRef"), a.start("fontRef", { idx: "minor" }), a.empty("schemeClr", { val: "lt1" }), a.end("fontRef"), a.popDefaultNamespace(), a.end("style");
1768
+ }, Pn = (e, t, n, r, a) => {
1769
+ let o = e.getSharedStates(), s = o.get("uniqueIdCounter");
1770
+ s || (s = /* @__PURE__ */ new Map(), o.set("uniqueIdCounter", s));
1771
+ let c = s.get(a) ?? 1;
1772
+ c++, s.set(a, c);
1773
+ let l = {
1774
+ id: "" + c,
1775
+ name: r.name
1776
+ };
1777
+ r.description && (l.descr = r.description), r.hidden && (l.hidden = "1");
1778
+ let u = [];
1779
+ u.push([
1780
+ "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}",
1781
+ "a16:creationId",
1782
+ {
1783
+ "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main",
1784
+ id: `{${i.uuidV4().toUpperCase()}}`
1785
+ }
1786
+ ]), t.start("cNvPr", l), Tn(t, u), t.end("cNvPr");
1787
+ }, Fn = (e, t, n, r, i) => {
1788
+ t.empty("cNvSpPr");
1789
+ }, In = (e, t, n, r) => {
1790
+ let i = {};
1791
+ if (r.lockAspect && (i.noChangeAspect = "1"), r.locks) for (let e of Object.keys(r.locks)) !0 === r.locks[e] && (i[e] = "1");
1792
+ t.start("cNvPicPr", {}), t.empty("a:picLocks", i), t.end("cNvPicPr");
1793
+ }, Ln = (e, t, n) => {
1794
+ let r = t.getBounds(), i = {}, a = n.rotation;
1795
+ a !== void 0 && a !== 0 && (i.rot = "" + Y(a)), e.start("xfrm", i), e.start("off", {
1796
+ x: J(r.x),
1797
+ y: J(r.y)
1798
+ }), e.end("off"), e.start("ext", {
1799
+ cx: J(r.width),
1800
+ cy: J(r.height)
1801
+ }), e.end("ext"), e.end("xfrm");
1802
+ }, Rn = (e, t, n) => {
1803
+ e.start(t), e.start("col"), e.text(n.c ?? 0), e.end("col"), e.start("colOff"), e.text(J(n.x)), e.end("colOff"), e.start("row"), e.text(n.r ?? 0), e.end("row"), e.start("rowOff"), e.text(J(n.y)), e.end("rowOff"), e.end(t);
1804
+ }, zn = async (e, t, n) => {
1805
+ let r = await n.getExternalURI();
1806
+ if (r) return void e.addExternal(G, r);
1807
+ let i = e.getSharedStates(), a = i.get(K);
1808
+ a || (a = /* @__PURE__ */ new Map(), i.set(K, a));
1809
+ let o = a.get(n);
1810
+ if (!o) {
1811
+ let e = await n.toBuffer();
1812
+ o = {
1813
+ bytes: new Uint8Array(e),
1814
+ type: await n.getType() ?? Dt,
1815
+ index: a.size + 1
1816
+ }, a.set(n, o);
1817
+ }
1818
+ let s = e.addBinary(o.bytes, o.type.mime, G, `../media/image${o.index}.${o.type.ext}`, !0, t);
1819
+ s.relId !== t && e.log(`Legacy drawing image '${t}' was written as '${s.relId}'; the markup will not find it.`);
1820
+ };
1821
+ function Bn(e, t, n, r, i, a, o, s) {
1822
+ let c = {
1823
+ ref: t,
1824
+ dT: (i ?? /* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"),
1825
+ personId: r ? Vn(r) : void 0,
1826
+ id: Vn(n),
1827
+ parentId: o ? Vn(o) : void 0,
1828
+ done: s ? "1" : void 0
1829
+ };
1830
+ e.start("threadedComment", c), e.start("text", oe.test(a) || /[\n\r]/.test(a) ? b : void 0), e.text(a), e.end("text"), e.end("threadedComment");
1831
+ }
1832
+ function Vn(e) {
1833
+ return `{${e.replace(/^\{|\}$/g, "").toUpperCase()}}`;
1834
+ }
1835
+ var Hn = 0, Un = (e, t, n, r) => {
1836
+ let i = e.getSharedStates().get(A);
1837
+ if (!i) return r;
1838
+ try {
1839
+ let e = t.getDataRange().getCoords(), a = {
1840
+ rowIndex: e.rowStart,
1841
+ colIndex: e.colStart + n
1842
+ }, o = i.parse(r, a);
1843
+ return o && h.image(i.spell(o, !1, t.getName()), { at: a }) || r;
1844
+ } catch {
1845
+ return r;
1846
+ }
1847
+ }, Wn = /* @__PURE__ */ new Map([
1848
+ [101, "average"],
1849
+ [102, "countNums"],
1850
+ [103, "count"],
1851
+ [104, "max"],
1852
+ [105, "min"],
1853
+ [107, "stdDev"],
1854
+ [109, "sum"],
1855
+ [110, "var"]
1856
+ ]), Gn = {
1857
+ rowIndex: 0,
1858
+ colIndex: 0
1859
+ };
1860
+ function Kn(t, n, r, i) {
1861
+ if (i == null) return;
1862
+ Gn.rowIndex = n, Gn.colIndex = r;
1863
+ let o, s, c = a.cellToString(Gn);
1864
+ switch (typeof i) {
1865
+ case "number":
1866
+ s = "" + i;
1867
+ break;
1868
+ case "boolean":
1869
+ o = "b", s = i ? "1" : "0";
1870
+ break;
1871
+ case "string":
1872
+ o = "str", s = i;
1873
+ break;
1874
+ default: {
1875
+ let t = i;
1876
+ if (t.t !== "e") return;
1877
+ o = "e", s = e.getBuiltInByCode(t.v)?.getLabel() ?? e.BuiltIn.Value.getLabel();
1878
+ }
1879
+ }
1880
+ t.start("cell", o ? {
1881
+ r: c,
1882
+ t: o
1883
+ } : { r: c }), t.start("v"), t.text(s), t.end("v"), t.end("cell");
1884
+ }
1885
+ var qn = (e, t, n, r, i, a = "0") => {
1886
+ let o = i?.color, s = { idx: i?.idx ?? a };
1887
+ o === void 0 ? t.empty(r, s) : (t.start(r, s), o === "auto" ? t.empty("styleClr", { val: "auto" }) : (t.pushDefaultNamespace("a"), B(t, n.getTheme(), o), t.popDefaultNamespace()), t.end(r));
1888
+ }, Jn = Object.freeze([
1889
+ {
1890
+ type: "axisTitle",
1891
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
1892
+ defRPr: {
1893
+ size: 10,
1894
+ kern: 12
1895
+ }
1896
+ },
1897
+ {
1898
+ type: "categoryAxis",
1899
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
1900
+ stroke: {
1901
+ width: .75,
1902
+ cap: "flat",
1903
+ cmpd: "sng",
1904
+ algn: "ctr",
1905
+ round: !0,
1906
+ fill: "tx1 lumMod 15 lumOff 85"
1907
+ },
1908
+ defRPr: {
1909
+ size: 9,
1910
+ kern: 12
1911
+ }
1912
+ },
1913
+ {
1914
+ type: "chartArea",
1915
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
1916
+ fontRef: { color: "tx1" },
1917
+ fill: {
1918
+ type: "solid",
1919
+ color: "bg1"
1920
+ },
1921
+ stroke: {
1922
+ width: .75,
1923
+ cap: "flat",
1924
+ cmpd: "sng",
1925
+ algn: "ctr",
1926
+ round: !0,
1927
+ fill: "tx1 lumMod 15 lumOff 85"
1928
+ },
1929
+ defRPr: {
1930
+ size: 10,
1931
+ kern: 12
1932
+ }
1933
+ },
1934
+ {
1935
+ type: "dataLabel",
1936
+ fontRef: { color: "tx1 lumMod 75 lumOff 25" },
1937
+ defRPr: {
1938
+ size: 9,
1939
+ kern: 12
1940
+ }
1941
+ },
1942
+ {
1943
+ type: "dataLabelCallout",
1944
+ fontRef: { color: "dk1 lumMod 65 lumOff 35" },
1945
+ fill: {
1946
+ type: "solid",
1947
+ color: "lt1"
1948
+ },
1949
+ stroke: { fill: "dk1 lumMod 25 lumOff 75" },
1950
+ defRPr: {
1951
+ size: 9,
1952
+ kern: 12
1953
+ },
1954
+ bodyPr: {
1955
+ rot: "0",
1956
+ spcFirstLastPara: "1",
1957
+ vertOverflow: "clip",
1958
+ horzOverflow: "clip",
1959
+ vert: "horz",
1960
+ wrap: "square",
1961
+ lIns: "36576",
1962
+ tIns: "18288",
1963
+ rIns: "36576",
1964
+ bIns: "18288",
1965
+ anchor: "ctr",
1966
+ anchorCtr: "1",
1967
+ spAutoFit: "true"
1968
+ }
1969
+ },
1970
+ {
1971
+ type: "dataPoint",
1972
+ fillRef: {
1973
+ idx: "1",
1974
+ color: "auto"
1975
+ },
1976
+ fontRef: { color: "tx1" }
1977
+ },
1978
+ {
1979
+ type: "dataPoint3D",
1980
+ fillRef: {
1981
+ idx: "1",
1982
+ color: "auto"
1983
+ },
1984
+ fontRef: { color: "tx1" }
1985
+ },
1986
+ {
1987
+ type: "dataPointLine",
1988
+ lineRef: { color: "auto" },
1989
+ fillRef: { idx: "1" },
1990
+ fontRef: { color: "tx1" },
1991
+ stroke: {
1992
+ width: 2.25,
1993
+ cap: "rnd",
1994
+ fill: "phClr",
1995
+ round: !0
1996
+ }
1997
+ },
1998
+ {
1999
+ type: "dataPointMarker",
2000
+ lineRef: { color: "auto" },
2001
+ fillRef: {
2002
+ idx: "1",
2003
+ color: "auto"
2004
+ },
2005
+ fontRef: { color: "tx1" },
2006
+ stroke: {
2007
+ width: .75,
2008
+ fill: "phClr"
2009
+ }
2010
+ },
2011
+ {
2012
+ type: "dataPointMarkerLayout",
2013
+ mods: {
2014
+ symbol: "circle",
2015
+ size: "5"
2016
+ },
2017
+ empty: !0
2018
+ },
2019
+ {
2020
+ type: "dataPointWireframe",
2021
+ lineRef: { color: "auto" },
2022
+ fillRef: { idx: "1" },
2023
+ fontRef: { color: "tx1" },
2024
+ stroke: {
2025
+ width: .75,
2026
+ cap: "rnd",
2027
+ fill: "phClr",
2028
+ round: !0
2029
+ }
2030
+ },
2031
+ {
2032
+ type: "dataTable",
2033
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2034
+ fill: { type: "none" },
2035
+ stroke: {
2036
+ width: .75,
2037
+ cap: "flat",
2038
+ cmpd: "sng",
2039
+ algn: "ctr",
2040
+ round: !0,
2041
+ fill: "tx1 lumMod 15 lumOff 85"
2042
+ },
2043
+ defRPr: {
2044
+ size: 9,
2045
+ kern: 12
2046
+ }
2047
+ },
2048
+ {
2049
+ type: "downBar",
2050
+ fontRef: { color: "tx1" },
2051
+ fill: {
2052
+ type: "solid",
2053
+ color: "dk1 lumMod 75 lumOff 25"
2054
+ },
2055
+ stroke: {
2056
+ width: .75,
2057
+ cap: "flat",
2058
+ cmpd: "sng",
2059
+ algn: "ctr",
2060
+ round: !0,
2061
+ fill: "tx1 lumMod 65 lumOff 35"
2062
+ }
2063
+ },
2064
+ {
2065
+ type: "dropLine",
2066
+ fontRef: { color: "tx1" },
2067
+ stroke: {
2068
+ width: .75,
2069
+ cap: "flat",
2070
+ cmpd: "sng",
2071
+ algn: "ctr",
2072
+ round: !0,
2073
+ fill: "tx1 lumMod 35 lumOff 65"
2074
+ }
2075
+ },
2076
+ {
2077
+ type: "errorBar",
2078
+ fontRef: { color: "tx1" },
2079
+ stroke: {
2080
+ width: .75,
2081
+ cap: "flat",
2082
+ cmpd: "sng",
2083
+ algn: "ctr",
2084
+ round: !0,
2085
+ fill: "tx1 lumMod 65 lumOff 35"
2086
+ }
2087
+ },
2088
+ {
2089
+ type: "floor",
2090
+ fontRef: { color: "tx1" },
2091
+ fill: { type: "none" },
2092
+ stroke: {}
2093
+ },
2094
+ {
2095
+ type: "gridlineMajor",
2096
+ fontRef: { color: "tx1" },
2097
+ stroke: {
2098
+ width: .75,
2099
+ cap: "flat",
2100
+ cmpd: "sng",
2101
+ algn: "ctr",
2102
+ round: !0,
2103
+ fill: "tx1 lumMod 15 lumOff 85"
2104
+ }
2105
+ },
2106
+ {
2107
+ type: "gridlineMinor",
2108
+ fontRef: { color: "tx1" },
2109
+ stroke: {
2110
+ width: .75,
2111
+ cap: "flat",
2112
+ cmpd: "sng",
2113
+ algn: "ctr",
2114
+ round: !0,
2115
+ fill: "tx1 lumMod 5 lumOff 95"
2116
+ }
2117
+ },
2118
+ {
2119
+ type: "hiLoLine",
2120
+ fontRef: { color: "tx1" },
2121
+ stroke: {
2122
+ width: .75,
2123
+ cap: "flat",
2124
+ cmpd: "sng",
2125
+ algn: "ctr",
2126
+ round: !0,
2127
+ fill: "tx1 lumMod 50 lumOff 50"
2128
+ }
2129
+ },
2130
+ {
2131
+ type: "leaderLine",
2132
+ fontRef: { color: "tx1" },
2133
+ stroke: {
2134
+ width: .75,
2135
+ cap: "flat",
2136
+ cmpd: "sng",
2137
+ algn: "ctr",
2138
+ round: !0,
2139
+ fill: "tx1 lumMod 35 lumOff 65"
2140
+ }
2141
+ },
2142
+ {
2143
+ type: "legend",
2144
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2145
+ defRPr: {
2146
+ size: 9,
2147
+ kern: 12
2148
+ }
2149
+ },
2150
+ {
2151
+ type: "plotArea",
2152
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
2153
+ fontRef: { color: "tx1" }
2154
+ },
2155
+ {
2156
+ type: "plotArea3D",
2157
+ mods: { mods: "allowNoFillOverride allowNoLineOverride" },
2158
+ fontRef: { color: "tx1" }
2159
+ },
2160
+ {
2161
+ type: "seriesAxis",
2162
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2163
+ defRPr: {
2164
+ size: 9,
2165
+ kern: 12
2166
+ }
2167
+ },
2168
+ {
2169
+ type: "seriesLine",
2170
+ fontRef: { color: "tx1" },
2171
+ stroke: {
2172
+ width: .75,
2173
+ cap: "flat",
2174
+ cmpd: "sng",
2175
+ algn: "ctr",
2176
+ round: !0,
2177
+ fill: "tx1 lumMod 35 lumOff 65"
2178
+ }
2179
+ },
2180
+ {
2181
+ type: "title",
2182
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2183
+ defRPr: {
2184
+ size: 14,
2185
+ b: !1,
2186
+ kern: 12,
2187
+ spc: 0,
2188
+ baseline: 0
2189
+ }
2190
+ },
2191
+ {
2192
+ type: "trendline",
2193
+ lineRef: { color: "auto" },
2194
+ fontRef: { color: "tx1" },
2195
+ stroke: {
2196
+ width: 1.5,
2197
+ cap: "rnd",
2198
+ fill: "phClr",
2199
+ prstDash: "sysDot"
2200
+ }
2201
+ },
2202
+ {
2203
+ type: "trendlineLabel",
2204
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2205
+ defRPr: {
2206
+ size: 9,
2207
+ kern: 12
2208
+ }
2209
+ },
2210
+ {
2211
+ type: "upBar",
2212
+ fontRef: { color: "tx1" },
2213
+ fill: {
2214
+ type: "solid",
2215
+ color: "lt1"
2216
+ },
2217
+ stroke: {
2218
+ width: .75,
2219
+ cap: "flat",
2220
+ cmpd: "sng",
2221
+ algn: "ctr",
2222
+ round: !0,
2223
+ fill: "tx1 lumMod 65 lumOff 35"
2224
+ }
2225
+ },
2226
+ {
2227
+ type: "valueAxis",
2228
+ fontRef: { color: "tx1 lumMod 65 lumOff 35" },
2229
+ defRPr: {
2230
+ size: 9,
2231
+ kern: 12
2232
+ }
2233
+ },
2234
+ {
2235
+ type: "wall",
2236
+ fontRef: { color: "tx1" },
2237
+ fill: { type: "none" },
2238
+ stroke: {}
2239
+ }
2240
+ ]), Yn = Object.freeze([
2241
+ [0, 0],
2242
+ [6e4, 0],
2243
+ [8e4, 2e4],
2244
+ [8e4, 0],
2245
+ [6e4, 4e4],
2246
+ [5e4, 0],
2247
+ [7e4, 3e4],
2248
+ [7e4, 0],
2249
+ [5e4, 5e4]
2250
+ ]), Xn = [
2251
+ new class extends L {
2252
+ constructor() {
2253
+ super({
2254
+ kind: "workbook",
2255
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
2256
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
2257
+ path: "/xl/workbook.xml"
2258
+ });
2259
+ }
2260
+ async emit(e, t) {
2261
+ let n = t.getXMLWriter();
2262
+ n.decl(), n.start("workbook", {
2263
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2264
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
2265
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
2266
+ "mc:Ignorable": "x15 xr xr6 xr10 xr2",
2267
+ "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main",
2268
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
2269
+ "xmlns:xr6": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision6",
2270
+ "xmlns:xr10": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision10",
2271
+ "xmlns:xr2": "http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"
2272
+ });
2273
+ let r = t.getSharedStates().get(be), i = await e.toJSON({
2274
+ ignoreData: !0,
2275
+ resources: (e, t) => (r?.set(t, e), null),
2276
+ includeHeaderStyles: !0,
2277
+ splitDirectBorders: !0
2278
+ });
2279
+ t.getSharedStates().set(A, E(i.names, function(e) {
2280
+ let t = [], n = e.sheets ?? [];
2281
+ for (let e = 0; e < n.length; e++) {
2282
+ let r = n[e]?.sheet?.tables;
2283
+ if (r) for (let e = 0; e < r.length; e++) {
2284
+ let n = r[e], i = Array.isArray(n) ? n[1]?.name : n?.v?.name;
2285
+ i && t.push(String(i));
2286
+ }
2287
+ }
2288
+ return t;
2289
+ }(i))), function(e, t) {
2290
+ let n = e.getSharedStates().get(it);
2291
+ n && t.empty("fileVersion", n);
2292
+ }(t, n), function(e, t, n, r) {
2293
+ let i = {}, a = n.getCodeName();
2294
+ a && (i.codeName = a), n.getRuntime().isDate1904() && (i.date1904 = "1"), r.updateLinks && (i.updateLinks = r.updateLinks), t.empty("workbookPr", i);
2295
+ }(0, n, e, i), function(e, t, n, r) {
2296
+ let i = r.protection;
2297
+ if (!i || i.workbook) return;
2298
+ let a = {};
2299
+ Ke(i.password ?? {}, a, "workbook"), Ke(i.revisionsPassword ?? {}, a, "revisions");
2300
+ for (let e of ye) {
2301
+ let t = ae(e, i[e.key]);
2302
+ t !== null && (a[e.attribute] = t);
2303
+ }
2304
+ t.empty("workbookProtection", a);
2305
+ }(0, n, 0, i), function(e, t, n) {
2306
+ t.start("bookViews");
2307
+ let r = n.getView(), i = {};
2308
+ r.isShowHorizontalScrollbar() || (i.showHorizontalScroll = "0"), r.isShowVerticalScrollbar() || (i.showVerticalScroll = "0"), r.isShowTabs() || (i.showSheetTabs = "0");
2309
+ let a = r.getTabRatio();
2310
+ a !== 600 && (i.tabRatio = a);
2311
+ let o = n.getSelectedSheet().getIndex();
2312
+ o !== 0 && (i.activeTab = "" + o), t.empty("workbookView", i), t.end("bookViews");
2313
+ }(0, n, e, i.view);
2314
+ let a = await (async (e, t) => {
2315
+ let n = [], r = t ? t.length : 0;
2316
+ if (r === 0) return n;
2317
+ let i = /* @__PURE__ */ new Map();
2318
+ e.getSharedStates().set("pivotCachePaths", i);
2319
+ for (let a = 0; a < r; a++) {
2320
+ let r = t[a], o = r.cacheId, s = r.part;
2321
+ if (s?.xml && !i.has(o)) try {
2322
+ let t = await et({
2323
+ ...s,
2324
+ type: s.type || "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition",
2325
+ contentType: s.contentType || "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
2326
+ }, e, "/xl/pivotCache/pivotCacheDefinition{n}.xml");
2327
+ if (!t?.relId) continue;
2328
+ i.set(o, t.path), n.push({
2329
+ cacheId: o,
2330
+ relId: t.relId
2331
+ });
2332
+ } catch (t) {
2333
+ e.log(`Unable to write the pivot cache ${o}; the pivot tables on it will be dropped.`, t);
2334
+ }
2335
+ }
2336
+ return n;
2337
+ })(t, i.pivotCaches);
2338
+ (function(e, t) {
2339
+ t.getComments().some((e) => !e.isNote()) && e.addPart("persons", t.getPeople());
2340
+ })(t, e), n.start("sheets");
2341
+ let o = t.getSharedStates(), s = e.getStrings().beginPersist();
2342
+ o.set("persistStrings", s);
2343
+ let c = new Ye();
2344
+ o.set("metaCollector", c);
2345
+ let l = new Xe(c, t.log.bind(t));
2346
+ o.set("persistRichTypes", l), o.set(qe, new Je(i.styles, e.getStyles()));
2347
+ try {
2348
+ let r = e.getSheets().getItems({ visibility: u.Visibility.VeryHidden }), a = i.sheets, c = e.getSelectedSheet(), l = r.length, d = ((e, t) => {
2349
+ let n = Array(t), r = /* @__PURE__ */ new Set(), i = 1;
2350
+ for (let a = 0; a < t; a++) {
2351
+ let t = e?.[a]?.sheetId;
2352
+ t === void 0 || !Number.isInteger(t) || t < 1 || r.has(t) || (r.add(t), n[a] = t, t >= i && (i = t + 1));
2353
+ }
2354
+ for (let e = 0; e < t; e++) if (n[e] === void 0) {
2355
+ for (; r.has(i);) i++;
2356
+ r.add(i), n[e] = i++;
2357
+ }
2358
+ return n;
2359
+ })(a, l), f = ((e, t, n) => {
2360
+ let r = t.length, i = Array(r), a = new Set(n?.values() ?? []), o = /* @__PURE__ */ new Set();
2361
+ for (let a = 0; a < r; a++) {
2362
+ let r = e?.[a]?.sheetId;
2363
+ if (r === void 0 || t[a] !== r) continue;
2364
+ let s = n?.get(r);
2365
+ s && !o.has(s) && (o.add(s), i[a] = s);
2366
+ }
2367
+ let s = 1;
2368
+ for (let e = 0; e < r; e++) {
2369
+ if (i[e]) continue;
2370
+ let t;
2371
+ do
2372
+ t = `xl/worksheets/sheet${s++}.xml`;
2373
+ while (a.has(t) || o.has(t));
2374
+ o.add(t), i[e] = t;
2375
+ }
2376
+ return i;
2377
+ })(a, d, o.get(at));
2378
+ for (let e = 0; e < l; e++) {
2379
+ let i = r[e], o = "" + d[e], l = {
2380
+ name: i.getName(),
2381
+ sheetId: o
2382
+ }, u = i.getVisibility();
2383
+ u === "hidden" ? l.state = "hidden" : u === "veryHidden" && (l.state = "veryHidden");
2384
+ let p = a[e].sheet;
2385
+ l["r:id"] = t.addPart("worksheet", {
2386
+ model: i,
2387
+ isSelected: c === i,
2388
+ json: p,
2389
+ persistStrings: s
2390
+ }, "/" + f[e]).relId, n.empty("sheet", l);
2391
+ }
2392
+ await t.waitEmit();
2393
+ let p = e.getTheme();
2394
+ t.addPart("theme", {
2395
+ model: p,
2396
+ json: i.theme
2397
+ }), await t.waitEmit(), t.addPart("styles", {
2398
+ styles: e.getStyles(),
2399
+ theme: e.getTheme(),
2400
+ json: i.styles
2401
+ }), await t.waitEmit();
2402
+ let m = await s.toJSONAsync();
2403
+ m && m.length > 0 && (t.addPart("sharedStrings", {
2404
+ model: m,
2405
+ json: m
2406
+ }), await t.waitEmit());
2407
+ let h = o.get("persistRichTypes");
2408
+ h?.hasAny() && (t.addPart("richValue", h), t.addPart("richValueStructure", h), t.addPart("richValueTypes", null), await t.waitEmit());
2409
+ let g = o.get("metaCollector");
2410
+ g?.hasAny() && (t.addPart("metadata", g), await t.waitEmit()), o.delete("persistRichTypes"), o.delete("metaCollector"), o.delete("persistStrings");
2411
+ } catch (e) {
2412
+ throw e;
2413
+ } finally {
2414
+ s.endPersist();
2415
+ }
2416
+ n.end("sheets"), function(e, t, n) {
2417
+ let r = n.externalBooks, i = r ? r.length : 0;
2418
+ if (i === 0) return;
2419
+ let a = e.getSharedStates().get(ot), o = /* @__PURE__ */ new Set();
2420
+ if (a) for (let e = 0; e < i; e++) !r[e] && a[e] && o.add(a[e]);
2421
+ let s = [], c = 1;
2422
+ for (let t = 0; t < i; t++) {
2423
+ let n = r[t];
2424
+ if (n) {
2425
+ let t;
2426
+ do
2427
+ t = `xl/externalLinks/externalLink${c++}.xml`;
2428
+ while (o.has(t));
2429
+ s.push(e.addPart("externalLink", n, "/" + t).relId);
2430
+ continue;
2431
+ }
2432
+ let i = a?.[t], l = i ? e.addRelationship("http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink", i) : null;
2433
+ l ? s.push(l) : e.log(`External link [${t + 1}] cannot be written and is being dropped; later links will renumber.`);
2434
+ }
2435
+ if (s.length !== 0) {
2436
+ t.start("externalReferences");
2437
+ for (let e = 0; e < s.length; e++) t.empty("externalReference", { "r:id": s[e] });
2438
+ t.end("externalReferences");
2439
+ }
2440
+ }(t, n, i), function(e, t, n, r) {
2441
+ let i = e.getSharedStates().get(A), a = r.names, o = a ? a.length : 0;
2442
+ if (o === 0) return;
2443
+ let s = r.externalBooks?.length ?? 0, c = /* @__PURE__ */ new Map(), l = n.getSheets().getItems({ visibility: u.Visibility.VeryHidden });
2444
+ for (let e = 0; e < l.length; e++) c.set(l[e].getName().toLowerCase(), e);
2445
+ t.start("definedNames");
2446
+ for (let n = 0; n < o; n++) {
2447
+ let r = a[n], o = { name: r.name };
2448
+ if (r.comment && (o.comment = r.comment), r.scope) {
2449
+ let t = c.get(r.scope.toLowerCase());
2450
+ t === void 0 ? e.log(`Defined name '${r.name}' is scoped to unknown sheet '${r.scope}'; writing it as global.`) : o.localSheetId = "" + t;
2451
+ }
2452
+ r.hidden && (o.hidden = "1");
2453
+ let l = i.writeName(r.ref);
2454
+ for (let t of st(l)) t > s && e.log(`Defined name '${r.name}' cites external book [${t}], but only ${s} ${s === 1 ? "is" : "are"} written; Excel will report the file as needing repair.`);
2455
+ t.start("definedName", o), t.text(l), t.end("definedName");
2456
+ }
2457
+ t.end("definedNames");
2458
+ }(t, n, e, i), function(e, t, n) {
2459
+ let r = n.getCalculation().toJSON(), i = { calcId: e.getSharedStates().get("calcId") ?? "191029" }, a = (e, t) => {
2460
+ let n = r[e];
2461
+ typeof n == "boolean" && (i[t] = n ? "1" : "0");
2462
+ };
2463
+ if (r.calcMode) {
2464
+ let e = ct[r.calcMode];
2465
+ e && e !== "auto" && (i.calcMode = e);
2466
+ }
2467
+ a("fullCalcOnLoad", "fullCalcOnLoad"), a("calcOnSave", "calcOnSave"), a("calcCompleted", "calcCompleted"), a("fullPrecision", "fullPrecision"), a("forceFullCalc", "forceFullCalc"), a("concurrentCalc", "concurrentCalc"), r.refMode && (i.refMode = r.refMode), r.iterate && (i.iterate = "1"), r.maxIteration !== void 0 && (i.iterateCount = String(r.maxIteration)), r.maxIterateChange !== void 0 && (i.iterateDelta = String(r.maxIterateChange)), t.empty("calcPr", i);
2468
+ }(t, n, e), function(e, t) {
2469
+ if (t.length !== 0) {
2470
+ e.start("pivotCaches");
2471
+ for (let n = 0; n < t.length; n++) e.empty("pivotCache", {
2472
+ cacheId: t[n].cacheId,
2473
+ "r:id": t[n].relId
2474
+ });
2475
+ e.end("pivotCaches");
2476
+ }
2477
+ }(n, a), function(e, t) {
2478
+ let n = e.getSharedStates().get("calcFeatures") ?? "<ext uri=\"{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}\" xmlns:xcalcf=\"http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures\"><xcalcf:calcFeatures><xcalcf:feature name=\"microsoft.com:RD\"/><xcalcf:feature name=\"microsoft.com:Single\"/><xcalcf:feature name=\"microsoft.com:FV\"/><xcalcf:feature name=\"microsoft.com:CNMTM\"/><xcalcf:feature name=\"microsoft.com:LET_WF\"/><xcalcf:feature name=\"microsoft.com:LAMBDA_WF\"/><xcalcf:feature name=\"microsoft.com:ARRAYTEXT_WF\"/></xcalcf:calcFeatures></ext>";
2479
+ t.start("extLst"), t.raw(n), t.end("extLst");
2480
+ }(t, n), n.end("workbook"), n.close();
2481
+ }
2482
+ }(),
2483
+ new class extends L {
2484
+ constructor() {
2485
+ super({
2486
+ kind: "worksheet",
2487
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
2488
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
2489
+ path: () => "/xl/worksheets/sheet{n}.xml"
2490
+ });
2491
+ }
2492
+ async emit(n, o) {
2493
+ let s = o.getXMLWriter(), c = n.model, u = n.json;
2494
+ s.decl(), s.start("worksheet", {
2495
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
2496
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
2497
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
2498
+ "mc:Ignorable": "x14ac",
2499
+ "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"
2500
+ }), function(e, t, n) {
2501
+ let r = n.getTabColor(), i = n.getCodeName(), a = {};
2502
+ i && (a.codeName = i), n.isConditionalFormatCalculationEnabled() || (a.enableFormatConditionsCalculation = "0");
2503
+ let o = n.getOutlineSettings(), s = {};
2504
+ o.summaryBelow || (s.summaryBelow = "0"), o.summaryRight || (s.summaryRight = "0"), o.showOutlineSymbols || (s.showOutlineSymbols = "0"), o.applyStyles && (s.applyStyles = "1");
2505
+ let c = Object.keys(s).length > 0, l = !!r || c;
2506
+ if (l || Object.keys(a).length !== 0) {
2507
+ if (!l) return void t.empty("sheetPr", a);
2508
+ t.start("sheetPr", a), r && H(t, n.getStyles().getTheme(), r, "tabColor", !1), c && t.empty("outlinePr", s), t.end("sheetPr");
2509
+ }
2510
+ }(0, s, c), function(e, t, n, i) {
2511
+ let a = n.getUsedRange({ features: [] }), o = a ? a.getCoords() : null, s = y, c = w, l = i.directStyles, u = l ? l.length : 0;
2512
+ for (let e = 0; e < u; e++) {
2513
+ let t = n.getRange(l[e][0]).getCoords();
2514
+ if (t.colEnd === c) {
2515
+ let e = o?.colStart ?? 0;
2516
+ t = {
2517
+ ...t,
2518
+ colStart: e,
2519
+ colEnd: e
2520
+ };
2521
+ }
2522
+ if (t.rowEnd === s) {
2523
+ let e = o?.rowStart ?? 0;
2524
+ t = {
2525
+ ...t,
2526
+ rowStart: e,
2527
+ rowEnd: e
2528
+ };
2529
+ }
2530
+ o = r.unionRanges(o, t);
2531
+ }
2532
+ let d = i.merges, f = d ? d.length : 0;
2533
+ for (let e = 0; e < f; e++) {
2534
+ let t = n.getRange(d[e]).getCoords();
2535
+ t.colEnd === c && (t = { ...o }, t.colStart = o?.colStart ?? 0, t.colEnd = t.colStart), t.rowEnd === s && (t = { ...t }, t.rowStart = o?.rowStart ?? 0, t.rowEnd = t.rowStart), o = r.unionRanges(o, t);
2536
+ }
2537
+ let p = "A1";
2538
+ o && (a = n.getRange(o), p = o.colStart === o.colEnd && o.rowStart === o.rowEnd ? a.getAddress() : `${a.getIntersect({
2539
+ colStart: o.colStart,
2540
+ rowStart: o.rowStart,
2541
+ colEnd: o.colStart,
2542
+ rowEnd: o.rowStart
2543
+ }).getAddress()}:${a.getIntersect({
2544
+ colStart: o.colEnd,
2545
+ rowStart: o.rowEnd,
2546
+ colEnd: o.colEnd,
2547
+ rowEnd: o.rowEnd
2548
+ }).getAddress()}`), t.empty("dimension", { ref: p });
2549
+ }(0, s, c, u), function(e, t, n, r, i) {
2550
+ let o = n.getView(), s = o.getTopLeft(), c = n.getRowHeaders().getIndex(s.top), l = n.getColumnHeaders().getIndex(s.left), u = a.cellToString({
2551
+ colIndex: l,
2552
+ rowIndex: c
2553
+ });
2554
+ t.start("sheetViews");
2555
+ let d = {};
2556
+ o.isShowFormulas() && (d.showFormulas = "1"), o.isShowColumnGridlines() || o.isShowRowGridlines() || (d.showGridLines = "0"), o.isShowColumnHeaders() || o.isShowRowHeaders() || (d.showRowColHeaders = "0"), o.isShowZeros() || (d.showZeros = "0"), o.isRightToLeft() && (d.rightToLeft = "1"), i && (d.tabSelected = "1"), u !== "A1" && (d.topLeftCell = u);
2557
+ let f = o.getZoomScale();
2558
+ f !== 100 && (d.zoomScale = f, d.zoomScaleNormal = f);
2559
+ let p = o.getGridLineColor();
2560
+ if (p) {
2561
+ d.defaultGridColor = "0";
2562
+ let e = p.toRGBA(), t = e.red, r = e.green, i = e.blue, a = n.getStyles().getIndexedColors(), o = a.length, s = 0, c = Number.MAX_VALUE;
2563
+ for (let e = 0; e < o; e++) {
2564
+ let n = a[e].toRGBA(), o = (t - n.red) ** 2 + (r - n.green) ** 2 + (i - n.blue) ** 2;
2565
+ o < c && (c = o, s = e);
2566
+ }
2567
+ d.colorId = "" + s;
2568
+ }
2569
+ d.workbookViewId = "0";
2570
+ let m = n.getSelection().getCoords(), h = a.cellToString(m.cell), g = {}, _ = o.getFreezePanes(), v = _.coords ?? {}, y = v.colIndex ?? 0, b = v.rowIndex ?? 0;
2571
+ if (y > 0 || b > 0) {
2572
+ let e = _.topLeft ?? {}, r = e.top ?? 0, i = e.left ?? 0, o = n.getRowHeaders().getIndex(r), c = n.getColumnHeaders().getIndex(i), l = y - c, u = b - o, f = Math.max(y, n.getColumnHeaders().getIndex(s.left + n.getColumnHeaders().getOffset(y) - i)), p = Math.max(b, n.getRowHeaders().getIndex(s.top + n.getRowHeaders().getOffset(b) - r)), m = a.cellToString({
2573
+ colIndex: c,
2574
+ rowIndex: o
2575
+ });
2576
+ m === "A1" ? delete d.topLeftCell : d.topLeftCell = m, t.start("sheetView", d);
2577
+ let h = {};
2578
+ if (l > 0 && (h.xSplit = l), u > 0 && (h.ySplit = u), h.topLeftCell = a.cellToString({
2579
+ colIndex: f,
2580
+ rowIndex: p
2581
+ }), h.state = "frozen", y === 0) {
2582
+ h.activePane = "bottomLeft", t.empty("pane", h);
2583
+ let e = a.cellToString({
2584
+ colIndex: f,
2585
+ rowIndex: o
2586
+ });
2587
+ e !== "A1" && t.empty("selection", {
2588
+ activeCell: e,
2589
+ sqref: e
2590
+ }), g.pane = "bottomLeft";
2591
+ } else if (b === 0) {
2592
+ h.activePane = "topRight", t.empty("pane", h);
2593
+ let e = a.cellToString({
2594
+ colIndex: c,
2595
+ rowIndex: p
2596
+ });
2597
+ e !== "A1" && t.empty("selection", {
2598
+ activeCell: e,
2599
+ sqref: e
2600
+ }), g.pane = "topRight";
2601
+ } else {
2602
+ h.activePane = "bottomRight", t.empty("pane", h), m !== "A1" && t.empty("selection", {
2603
+ activeCell: m,
2604
+ sqref: m
2605
+ });
2606
+ let e = a.cellToString({
2607
+ colIndex: f,
2608
+ rowIndex: o
2609
+ });
2610
+ t.empty("selection", {
2611
+ pane: "topRight",
2612
+ activeCell: e,
2613
+ sqref: e
2614
+ });
2615
+ let n = a.cellToString({
2616
+ colIndex: c,
2617
+ rowIndex: p
2618
+ });
2619
+ t.empty("selection", {
2620
+ pane: "bottomLeft",
2621
+ activeCell: n,
2622
+ sqref: n
2623
+ }), g.pane = "bottomRight";
2624
+ }
2625
+ } else t.start("sheetView", d);
2626
+ g.activeCell = h;
2627
+ let x = m.ranges, S = x ? x.length : 0;
2628
+ if (S > 0) {
2629
+ let e = "";
2630
+ for (let t = 0; t < S; t++) {
2631
+ let n = x[t];
2632
+ t > 0 && (e += " "), e += a.rangeToString(n);
2633
+ }
2634
+ g.sqref = e, (m.rangeIndex ?? 0) > 0 && (g.activeCellId = "" + m.rangeIndex);
2635
+ } else h === "A1" ? g = null : g.sqref = h;
2636
+ g && t.empty("selection", g), t.end("sheetView"), t.end("sheetViews");
2637
+ }(0, s, c, 0, n.isSelected), function(e, t, n, r) {
2638
+ let i = r.defaultColSize, a = r.defaultRowSize, o = {};
2639
+ i !== void 0 && (o.defaultColWidth = i), o.defaultRowHeight = a ?? .75 * n.getRowHeaders().getDefaultSize(), a !== void 0 && (o.customHeight = "1"), o["x14ac:dyDescent"] = "0.25", t.empty("sheetFormatPr", o);
2640
+ }(0, s, c, u);
2641
+ let d = !1 === u.protection?.showFormulas ? o.getSharedStates().get("hiddenFormulaXfs") ?? null : null;
2642
+ (function(e, t, n, r, i) {
2643
+ let o = r.cols ? a.refsToRuns(r.cols, !0) : null, s = o ? o.length : 0;
2644
+ n.getEntireRange().getColumnEnd();
2645
+ let c = n.getColumnHeaders().getDefaultSizeNative(), l = i ? i.getHiddenXf(0) : 0, u = 1, d = (e) => {
2646
+ l !== 0 && e >= u && t.empty("col", {
2647
+ min: u,
2648
+ max: e,
2649
+ width: c,
2650
+ style: l
2651
+ });
2652
+ };
2653
+ if (s > 0 || l !== 0) {
2654
+ t.start("cols");
2655
+ for (let e = 0; e < s; e++) {
2656
+ let n = o[e], r = n.min + 1, a = w + 1;
2657
+ if (r > a) continue;
2658
+ let s = Math.min(n.max + 1, a);
2659
+ d(r - 1), u = s + 1;
2660
+ let l = {
2661
+ min: r,
2662
+ max: s
2663
+ }, f = n.value, p = f.sz;
2664
+ p === void 0 ? l.width = c : p !== 0 && (l.width = Math.round(256 * p) / 256);
2665
+ let m = i ? i.getHiddenXf(f.s ?? 0) : f.s;
2666
+ m && (l.style = m), f.h !== void 0 && (l.hidden = 1), f.csz && (l.customWidth = 1), f.l !== void 0 && (l.outlineLevel = f.l), f.cl !== void 0 && (l.collapsed = 1), t.empty("col", l);
2667
+ }
2668
+ d(w + 1), t.end("cols");
2669
+ }
2670
+ })(0, s, c, u, d), function(n, r, i, o, s, c) {
2671
+ let l = n.getSharedStates(), u = l.get("persistStrings"), d = l.get("metaCollector"), f = l.get("persistRichTypes"), p = 0, m = 0, g = i.getUsedRange(), _ = 0, v = o.rows ? a.refsToRuns(o.rows, !1) : null, y = v ? v.length : 0, x = v?.[y - 1]?.max ?? -1, S = o.cols ? a.refsToRuns(o.cols, !0) : null, C = S ? S.length : 0, w = S?.[C - 1]?.max ?? -1;
2672
+ if (g || y > 0) {
2673
+ let l = .75, g = o.defaultRowSize ?? i.getRowHeaders().getDefaultSize() * l, y = i.getStyles().getNormal().getBestFit().height * l, C = (e, t) => {
2674
+ let n = fn;
2675
+ if (n.r = "" + (e + 1), n.s = void 0, n.customFormat = void 0, n.hidden = void 0, n.ht = void 0, n.customHeight = void 0, n.outlineLevel = void 0, n.collapsed = void 0, !t) return n;
2676
+ let r = t.value;
2677
+ r.s !== void 0 && (n.s = "" + (c ? c.getHiddenXf(r.s) : r.s), n.customFormat = "1"), r.h && (n.hidden = "1");
2678
+ let i = r.csz ?? !1, a = r.sz ?? g;
2679
+ return (a !== y || i) && (n.ht = "" + a), i && (n.customHeight = "1"), r.l !== void 0 && (n.outlineLevel = "" + r.l), r.cl !== void 0 && (n.collapsed = "" + r.cl), n;
2680
+ }, T = 0, D = v?.[T] ?? null, O = D?.min ?? 2 ** 53 - 1, k = D?.max ?? 2 ** 53 - 1, ee = D?.value?.s, A = -1, j = 0, M = S?.[j] ?? null, ne = M?.min ?? 2 ** 53 - 1, re = M?.max ?? 2 ** 53 - 1, ie = M?.value?.s, ae = (e, t = !1) => {
2681
+ if (A !== e) {
2682
+ for (A !== -1 && (r.end("row"), j !== 0 && (j = 0, M = S?.[j] ?? null, ne = M?.min ?? 2 ** 53 - 1, re = M?.max ?? 2 ** 53 - 1, ie = M?.value?.s)); A + 1 <= e;) {
2683
+ A++, D && A > k && (D = v[++T] ?? null, D ? (O = D.min, k = D.max, ee = D.value?.s) : (O = 2 ** 53 - 1, k = 2 ** 53 - 1, ee = void 0)), A < O && A < e && (A = D ? Math.min(O, e) : e);
2684
+ let n = A < e || t && A === e, i = C(A, D && A >= O && A <= k ? D : null);
2685
+ n ? r.empty("row", i) : r.start("row", i);
2686
+ }
2687
+ if (e < A) {
2688
+ let t = C(e, null);
2689
+ r.start("row", t);
2690
+ }
2691
+ }
2692
+ };
2693
+ r.setValidationDisabled(!0), r.start("sheetData");
2694
+ let N = [];
2695
+ N.push(((e, t, n) => {
2696
+ if (!n) return [];
2697
+ let r = 0;
2698
+ for (let i = 0; i < n.length; i++) {
2699
+ let a = n[i][0], o = t.getRange(a).getCoords();
2700
+ if (r += (o.rowEnd - o.rowStart + 1) * (o.colEnd - o.colStart + 1), r > Jt) return e.warn(`Direct styles cover more than ${Jt} cells; not writing the styles from '${a}' on. A range that size belongs in a column or row style.`), n.slice(0, i);
2701
+ }
2702
+ return n;
2703
+ })(n, i, o.directStyles));
2704
+ let ce = o.formulas, P = ce ? ce.length : 0;
2705
+ if (P > 0) {
2706
+ let e = /* @__PURE__ */ new Map();
2707
+ if (s.names.size > 0 && o.formulaArray) for (let t of o.formulaArray) try {
2708
+ let n = i.getRange(t[0]).getCoords();
2709
+ e.set(`${n.rowStart},${n.colStart}`, n);
2710
+ } catch {}
2711
+ let t = [];
2712
+ if (o.formulaArray) for (let e of o.formulaArray) try {
2713
+ t.push(i.getRange(e[0]).getCoords());
2714
+ } catch {}
2715
+ let r = (e) => {
2716
+ for (let n = 0; n < t.length; n++) {
2717
+ let r = t[n];
2718
+ if (r.rowStart <= e.rowEnd && r.rowEnd >= e.rowStart && r.colStart <= e.colEnd && r.colEnd >= e.colStart) return !0;
2719
+ }
2720
+ return !1;
2721
+ }, c = n.getSharedStates().get("xlsxFormulaDialect") ?? E(i.getCalculation().getNamedFormulas().toJSON(), i.getTables().getItems().map((e) => e.getName())), l = i.getEntireRange().getCoords(), u = [];
2722
+ for (let e of i.getTables().getItems()) u.push([e.getRange().getCoords(), e.getName()]);
2723
+ let d = (e, t) => {
2724
+ for (let n = 0; n < u.length; n++) {
2725
+ let r = u[n][0];
2726
+ if (e >= r.rowStart && e <= r.rowEnd && t >= r.colStart && t <= r.colEnd) return u[n][1];
2727
+ }
2728
+ return null;
2729
+ }, f = /* @__PURE__ */ new Set();
2730
+ for (let e = 0; e < t.length; e++) f.add(`${t[e].rowStart},${t[e].colStart}`);
2731
+ let p = [];
2732
+ for (let t = 0; t < P; t++) {
2733
+ let o = ce[t];
2734
+ try {
2735
+ let n = o[0], u = i.getRange(n), m = u.getCoords(), g = o[1], v = null, y = {
2736
+ rowIndex: m.rowStart,
2737
+ colIndex: m.colStart
2738
+ }, b = c.parse(g, y), x = b ? c.annotate(b) : void 0, S = b ? c.spell(b, f.has(`${m.rowStart},${m.colStart}`), d(m.rowStart, m.colStart)) : null, C = S ? h.imager(S, { entireCoords: l }) : null;
2739
+ C && (g = C(y));
2740
+ let w = !0 === x?.cm, T = !0 === x?.ca;
2741
+ if (s.affects(t)) {
2742
+ v = null, w = !1;
2743
+ let t = (e, t, n) => {
2744
+ let r = {
2745
+ rowStart: e,
2746
+ colStart: t,
2747
+ rowEnd: e,
2748
+ colEnd: t
2749
+ };
2750
+ p.push([r, {
2751
+ coords: r,
2752
+ formula: n,
2753
+ sharedId: null,
2754
+ ref: a.rangeToString(r),
2755
+ isDynamicRange: !1,
2756
+ isWrapped: !0
2757
+ }]);
2758
+ }, n = e.get(`${m.rowStart},${m.colStart}`), r = n !== void 0 && (n.rowEnd > n.rowStart || n.colEnd > n.colStart), o = !1;
2759
+ if (r) {
2760
+ let e = se(g, u.getCell().getValue());
2761
+ if (e !== null) for (let r = n.rowStart; r <= n.rowEnd; r++) for (let s = n.colStart; s <= n.colEnd; s++) {
2762
+ if (r === n.rowStart && s === n.colStart) {
2763
+ t(r, s, e), o = !0;
2764
+ continue;
2765
+ }
2766
+ let c = de(i.getRange(a.rangeToString({
2767
+ rowStart: r,
2768
+ colStart: s,
2769
+ rowEnd: r,
2770
+ colEnd: s
2771
+ })).getCell().getValue());
2772
+ c !== null && t(r, s, c);
2773
+ }
2774
+ } else u.forEach((e, n) => {
2775
+ let r = n.getCoords(), i = se(C?.(r) ?? g, n.getCell().getValue());
2776
+ i !== null && (t(r.rowIndex, r.colIndex, i), o = !0);
2777
+ }, { includeEmpty: !0 });
2778
+ if (o) continue;
2779
+ }
2780
+ let E = g.indexOf("!") !== -1 || g.indexOf("[") !== -1;
2781
+ w || u.isSingleCell() || E || r(m) || (v = "" + _++);
2782
+ let D = v !== null || u.isSingleCell() ? null : C, O = [m, {
2783
+ coords: m,
2784
+ formula: g,
2785
+ sharedId: v,
2786
+ ref: n,
2787
+ isDynamicRange: w,
2788
+ isExcelVolatile: T,
2789
+ memberImage: D
2790
+ }];
2791
+ p.push(O);
2792
+ } catch (e) {
2793
+ n.log(`Could not write the formula '${o[1]}' over '${o[0]}'; those cells are written as values only. ${e}`);
2794
+ continue;
2795
+ }
2796
+ }
2797
+ N.push(p);
2798
+ } else N.push([]);
2799
+ let le = o.volatile, F = le ? le.length : 0;
2800
+ if (F > 0) {
2801
+ let e = Array(F);
2802
+ for (let t = 0; t < F; t++) {
2803
+ let n = le[t];
2804
+ try {
2805
+ e[t] = [i.getRange(n).getCoords(), !0];
2806
+ } catch (e) {
2807
+ console.warn(`Failed to parse volatile: ${n}`, e);
2808
+ continue;
2809
+ }
2810
+ }
2811
+ N.push(e);
2812
+ } else N.push([]);
2813
+ let ue = o.formulaArray, I = ue ? ue.length : 0;
2814
+ if (I > 0) {
2815
+ let e = Array(I);
2816
+ for (let t = 0; t < I; t++) {
2817
+ let n = ue[t];
2818
+ try {
2819
+ let r = n[0];
2820
+ e[t] = [i.getRange(r).getCoords(), {
2821
+ ref: r,
2822
+ kind: n[1] ?? "dynamic"
2823
+ }];
2824
+ } catch (e) {
2825
+ console.warn(`Failed to parse formula array: ${n}`, e);
2826
+ continue;
2827
+ }
2828
+ }
2829
+ N.push(e);
2830
+ } else N.push([]);
2831
+ i.getEntireRange().forEach((i, a) => {
2832
+ let o = a.getCoords(), s = o.rowIndex, l = o.colIndex;
2833
+ A !== s && ae(s);
2834
+ let h = a.getInjectedReference(0);
2835
+ if (h === void 0 && ee !== void 0 && s >= O && s <= k && (h = ee), h === void 0) {
2836
+ for (; l <= w && l > re;) j++, M = S?.[j] ?? null, ne = M?.min ?? 2 ** 53 - 1, re = M?.max ?? 2 ** 53 - 1, ie = M?.value?.s;
2837
+ ie !== void 0 && l >= ne && l <= re && (h = ie);
2838
+ }
2839
+ let g = a.getType(), _ = null;
2840
+ P > 0 && (_ = a.getInjectedReference(1) ?? null);
2841
+ let v = !1;
2842
+ F > 0 && (v = a.getInjectedReference(2) ?? !1);
2843
+ let y = null;
2844
+ I > 0 && (y = a.getInjectedReference(3) ?? null);
2845
+ let x = y?.kind === "error", C = y?.kind === "fixed", T = dn;
2846
+ T.r = a.getAddress(), T.s = void 0, T.t = void 0, T.cm = void 0, T.vm = void 0, c && (h = c.getHiddenXf(h ?? 0)), h !== void 0 && h !== 0 && (T.s = "" + h);
2847
+ let E = null, D = null;
2848
+ switch (g) {
2849
+ case t.Boolean:
2850
+ E = i ? "1" : "0", D = "b";
2851
+ break;
2852
+ case t.Error:
2853
+ let n = i.getCode();
2854
+ if (D = "e", n > 7) E = e.BuiltIn.Value.getLabel(), T.vm = "" + f.add(i);
2855
+ else if (n < 1) {
2856
+ let e;
2857
+ D = "s", _ ? (e = "=" + _.formula, _ = null) : e = "" + i.getLabel(), E = "" + u.add(e), p++;
2858
+ } else E = "" + i.getLabel();
2859
+ break;
2860
+ case t.Number:
2861
+ E = "" + i, D = null;
2862
+ break;
2863
+ case t.String:
2864
+ E = i, _ ? (D = "str", E = i) : (D = "s", E = "" + u.add(E), p++);
2865
+ break;
2866
+ case t.RichData: D = "e", E = e.BuiltIn.Value.getLabel(), T.vm = "" + f.add(i);
2867
+ }
2868
+ D && (T.t = D);
2869
+ let N = !_?.isWrapped && (y !== null || (_?.isDynamicRange ?? !1));
2870
+ if (_ !== null || E !== null) {
2871
+ if (N && _ !== null && !C && (T.cm = "" + d.registerArrayCell(x)), r.start("c", T), _) {
2872
+ let e = s === _.coords.rowStart && l === _.coords.colStart, t = _.formula;
2873
+ _.memberImage && !e && (t = _.memberImage({
2874
+ rowIndex: s,
2875
+ colIndex: l
2876
+ }));
2877
+ let n, i = null, a = _.sharedId;
2878
+ if (a) {
2879
+ n = mn;
2880
+ let e = _.coords;
2881
+ e.colStart === l && e.rowStart === s ? (n.ref = _.ref, n.si = a, i = _.formula) : (n.ref = void 0, n.si = a);
2882
+ } else N ? (n = hn, n.aca = x ? "1" : void 0, n.ref = x ? T.r : y?.ref ?? T.r, i = t) : (n = pn, i = t);
2883
+ n.ca = v || x || _.isExcelVolatile ? "1" : void 0, i ? (r.start("f", n), r.text(i), r.end("f")) : r.empty("f", n);
2884
+ }
2885
+ E !== null && (D === "str" && E ? (r.start("v", oe.test(E) ? b : void 0), r.text(te(E))) : (r.start("v"), E && r.text(E)), r.end("v")), r.end("c");
2886
+ } else m++ < Jt ? r.empty("c", T) : m === 1048577 && n.warn(`Reached ${Jt} style-only cells at '${T.r}'; not writing the rest.`);
2887
+ }, {
2888
+ injectReferences: N,
2889
+ features: []
2890
+ }), A !== -1 && A >= x ? r.end("row") : ae(x, !0), r.end("sheetData"), r.setValidationDisabled(!1);
2891
+ } else r.empty("sheetData");
2892
+ if (p > 0) {
2893
+ let e = l.get("stringsCount") ?? 0;
2894
+ l.set("stringsCount", e + p);
2895
+ }
2896
+ }(o, s, c, u, await (async (e, t) => {
2897
+ let n = t ? t.length : 0;
2898
+ if (n === 0) return qt;
2899
+ let r = /* @__PURE__ */ new Set(), i = Array(n);
2900
+ for (let e = 0; e < n; e++) {
2901
+ i[e] = null;
2902
+ try {
2903
+ let n = h.parse(t[e][1]);
2904
+ if (!n) continue;
2905
+ let a = null, o = (e) => {
2906
+ let t = null;
2907
+ e.type === "function" ? t = String(e.value) : e.type === "call" && e.inputs?.[0]?.type === "named" && (t = String(e.inputs[0].value?.name ?? "")), t && (t = t.toUpperCase(), r.add(t), (a ??= /* @__PURE__ */ new Set()).add(t));
2908
+ let n = e.inputs;
2909
+ if (n) for (let e = 0; e < n.length; e++) n[e] && o(n[e]);
2910
+ };
2911
+ o(n), i[e] = a;
2912
+ } catch {}
2913
+ }
2914
+ let a = e.getWorkbook();
2915
+ if (!a) return qt;
2916
+ let o = await ne(a, r);
2917
+ return o.size === 0 ? qt : {
2918
+ names: o,
2919
+ perFormula: i,
2920
+ affects: (e) => {
2921
+ let t = i[e];
2922
+ if (!t) return !1;
2923
+ for (let e of t) if (o.has(e)) return !0;
2924
+ return !1;
2925
+ }
2926
+ };
2927
+ })(c, u.formulas), d), function(e, t, n, r) {
2928
+ let i = r.protection;
2929
+ if (!i) return;
2930
+ let a = {};
2931
+ i.sheet || Ke(i.password ?? {}, a);
2932
+ for (let e of I) {
2933
+ let t = ae(e, i[e.key]);
2934
+ t !== null && (a[e.attribute] = t);
2935
+ }
2936
+ t.empty("sheetProtection", a);
2937
+ }(0, s, 0, u), function(e, t, n, r) {
2938
+ let i = r.protectedRanges, a = i ? i.length : 0;
2939
+ if (a === 0) return;
2940
+ let o = [];
2941
+ for (let t = 0; t < a; t++) {
2942
+ let n, r, a = i[t];
2943
+ Array.isArray(a) ? (n = a[0], r = a[1]) : (n = a.r, r = a.v);
2944
+ let s = tn(n);
2945
+ if (!s || !r) {
2946
+ e.log("Skipping protectedRange with no range.");
2947
+ continue;
2948
+ }
2949
+ if (!r.name) {
2950
+ e.log("Skipping protectedRange with no name.");
2951
+ continue;
2952
+ }
2953
+ let c = {};
2954
+ Ke(r.password ?? {}, c), c.sqref = s, c.name = r.name, r.securityDescriptor && (c.securityDescriptor = r.securityDescriptor), o.push(c);
2955
+ }
2956
+ if (o.length !== 0) {
2957
+ t.start("protectedRanges");
2958
+ for (let e = 0; e < o.length; e++) t.empty("protectedRange", o[e]);
2959
+ t.end("protectedRanges");
2960
+ }
2961
+ }(o, s, 0, u);
2962
+ let f = u.autoTable;
2963
+ if (f) {
2964
+ let e, t = f;
2965
+ e = Array.isArray(t) ? t[1] : t.v, Ut(o, s, c.getAutoTable(), e, !0);
2966
+ }
2967
+ (function(e, t, n, r) {
2968
+ let i = r.merges ? r.merges.length : 0;
2969
+ if (i > 0) {
2970
+ t.start("mergeCells", { count: i });
2971
+ for (let e = 0; e < i; e++) {
2972
+ let n = r.merges[e], i = typeof n == "string" ? n : a.rangeToString(n);
2973
+ t.empty("mergeCell", { ref: i });
2974
+ }
2975
+ t.end("mergeCells");
2976
+ }
2977
+ })(0, s, 0, u);
2978
+ let p = function(e, t, n, r) {
2979
+ let a = [], o = r.conditionals, s = o ? o.length : 0;
2980
+ if (s === 0) return a;
2981
+ let c = e.getSharedStates(), u = c.get(At);
2982
+ u || (u = new kt(), c.set(At, u));
2983
+ let d = n.getStyles().getTheme(), f = c.get(A), p = null, m = 0;
2984
+ for (let n = 0; n < s; n++) {
2985
+ let r, s, c = o[n];
2986
+ Array.isArray(c) ? (r = c[0], s = c[1]) : (r = c.r, s = c.v);
2987
+ let h = tn(r);
2988
+ if (!h || !s) {
2989
+ e.log("Skipping conditionalFormatting with no range.");
2990
+ continue;
2991
+ }
2992
+ let g = an(h), _ = sn(s.scale, g, f);
2993
+ _ !== s.scale && (s = {
2994
+ ...s,
2995
+ scale: _
2996
+ });
2997
+ let v = _ ? { type: _.type } : x(s.condition, en(h), (t, n) => e.warn(t, void 0, n));
2998
+ v ? (v.formulas &&= v.formulas.map((e) => on(e, g, f)), _?.type === l.ScaleType.IconSet && Qt(_) ? (m++, a.push({
2999
+ guid: fe(i.uuidV4),
3000
+ sqref: h,
3001
+ priority: m,
3002
+ scale: _
3003
+ })) : _ || !rn(v) ? (h !== p && (p !== null && t.end("conditionalFormatting"), t.start("conditionalFormatting", {
3004
+ sqref: h,
3005
+ pivot: s.pivot ? "1" : void 0
3006
+ }), p = h), m++, $t(e, t, d, s, v, h, m, u, a)) : (m++, a.push({
3007
+ guid: fe(i.uuidV4),
3008
+ sqref: h,
3009
+ priority: m,
3010
+ rule: v,
3011
+ style: s.style,
3012
+ stopIfTrue: s.stopIfTrue
3013
+ }))) : s.condition || e.log("Skipping conditional format with neither a condition nor a scale.");
3014
+ }
3015
+ return p !== null && t.end("conditionalFormatting"), a;
3016
+ }(o, s, c, u), m = function(e, t, n, r) {
3017
+ let i = [], a = e.getSharedStates().get(A), o = r.validations, s = o ? o.length : 0;
3018
+ if (s === 0) return i;
3019
+ let c = [];
3020
+ for (let t = 0; t < s; t++) {
3021
+ let n, r, s = o[t];
3022
+ Array.isArray(s) ? (n = s[0], r = s[1]) : (n = s.r, r = s.v);
3023
+ let l = tn(n);
3024
+ if (!l || !r) {
3025
+ e.log("Skipping dataValidation with no range.");
3026
+ continue;
3027
+ }
3028
+ r.ext && e.warn("DataValidation extension payload is not written to xlsx; it will be lost.");
3029
+ let u = (t, n) => e.warn(t, void 0, n), d = ce(r.condition, u), { type: f, operator: p } = d ?? {}, m = an(l), h = on(d?.formula1, m, a), g = on(d?.formula2, m, a), _ = {
3030
+ type: f,
3031
+ operator: p,
3032
+ allowBlank: Z(r.condition?.includeBlanks ?? !1),
3033
+ showDropDown: r.hideDropdown ? "1" : void 0,
3034
+ showInputMessage: Z(r.showPromptMessage),
3035
+ showErrorMessage: Z(r.showAlertMessage),
3036
+ errorStyle: r.alertStyle ?? "stop",
3037
+ errorTitle: pe(r.alertTitle, "errorTitle", u),
3038
+ error: pe(r.alert, "error", u),
3039
+ promptTitle: pe(r.promptTitle, "promptTitle", u),
3040
+ prompt: pe(r.prompt, "prompt", u),
3041
+ imeMode: r.imeMode
3042
+ };
3043
+ nn(h) || nn(g) ? i.push({
3044
+ attrs: _,
3045
+ formula1: h,
3046
+ formula2: g,
3047
+ sqref: l
3048
+ }) : (_.sqref = l, c.push({
3049
+ attrs: _,
3050
+ formula1: h,
3051
+ formula2: g
3052
+ }));
3053
+ }
3054
+ if (c.length === 0) return i;
3055
+ t.start("dataValidations", { count: c.length });
3056
+ for (let e = 0; e < c.length; e++) {
3057
+ let { attrs: n, formula1: r, formula2: i } = c[e];
3058
+ r !== void 0 || i !== void 0 ? (t.start("dataValidation", n), r !== void 0 && (t.start("formula1"), t.text(r), t.end("formula1")), i !== void 0 && (t.start("formula2"), t.text(i), t.end("formula2")), t.end("dataValidation")) : t.empty("dataValidation", n);
3059
+ }
3060
+ return t.end("dataValidations"), i;
3061
+ }(o, s, 0, u);
3062
+ (function(e, t, n, r) {
3063
+ let i = r.hyperlinks, a = i ? i.length : 0;
3064
+ if (a !== 0) {
3065
+ t.start("hyperlinks");
3066
+ for (let n = 0; n < a; n++) {
3067
+ let r, a, o = i[n];
3068
+ Array.isArray(o) ? (a = o[0], r = o[1]) : (a = o.r, r = o.v), typeof r == "string" && (r = { address: r });
3069
+ let s = r.address ?? "", c = s.indexOf("#"), l = c === -1 ? s : s.substring(0, c), u = c === -1 ? "" : s.substring(c + 1), d = {};
3070
+ d.ref = a, l && (d["r:id"] = e.addExternal("http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", l).relId), u && (d.location = u), r.screenTip && (d.tooltip = r.screenTip), t.empty("hyperlink", d);
3071
+ }
3072
+ t.end("hyperlinks");
3073
+ }
3074
+ })(o, s, 0, u), function(e, t, n, r) {
3075
+ let i = r.pageMargins;
3076
+ t.empty("pageMargins", {
3077
+ left: i?.left ?? .7,
3078
+ right: i?.right ?? .7,
3079
+ top: i?.top ?? .75,
3080
+ bottom: i?.bottom ?? .75,
3081
+ header: i?.header ?? .3,
3082
+ footer: i?.footer ?? .3
3083
+ });
3084
+ }(0, s, 0, u), function(e, t, n, r) {
3085
+ let i = r.movables?.filter(ln);
3086
+ if ((i ? i.length : 0) === 0 || !i.some((e) => {
3087
+ let t = e.content?.type;
3088
+ if (t === "picture" || t === "chart") return !0;
3089
+ if (t === "shape") {
3090
+ let t = e.content?.json?.type;
3091
+ return t === "sp" || t === "cxnSp";
3092
+ }
3093
+ return !1;
3094
+ })) return;
3095
+ let a = n.getMovables().getItems().filter((e, t) => ln(r.movables[t])), o = e.addPart("drawing", {
3096
+ sheet: n,
3097
+ movables: a,
3098
+ jsonMovables: i,
3099
+ resources: n.getResources()
3100
+ });
3101
+ t.empty("drawing", { "r:id": o.relId });
3102
+ }(o, s, c, u);
3103
+ let g = function(e) {
3104
+ let t = e.getComments().toArray();
3105
+ if (t.length === 0) return null;
3106
+ let n = [];
3107
+ for (let e = 0; e < t.length; e++) {
3108
+ let r = t[e], i = bt(r);
3109
+ i && n.push({
3110
+ comment: r,
3111
+ ...i
3112
+ });
3113
+ }
3114
+ return n.length === 0 ? null : (n.sort((e, t) => e.row - t.row || e.col - t.col), {
3115
+ sheet: e,
3116
+ comments: n
3117
+ });
3118
+ }(c);
3119
+ var _, v;
3120
+ cn(o, s, "legacyDrawing", ((e, t) => {
3121
+ if (!t) return e;
3122
+ let n = e?.xml ?? null, r = ge(n ?? ""), i = [], a = t.comments;
3123
+ for (let e = 0; e < a.length; e++) {
3124
+ let { comment: t, row: n, col: o } = a[e], s = t.toJSON()?.box, c = s?.xml ? ie(s.xml).notes[0] : void 0;
3125
+ if (c) {
3126
+ let e = me(c.xml);
3127
+ e !== null && (r = Math.max(r, e)), i.push(ve(c, n, o));
3128
+ } else i.push(re(n, o, ++r));
3129
+ }
3130
+ let o = ue(n, i);
3131
+ return o ? o === n ? e : e ? {
3132
+ ...e,
3133
+ xml: o
3134
+ } : { xml: o } : e;
3135
+ })(((e, t) => {
3136
+ if (!e?.xml) return e;
3137
+ let n = t.movables;
3138
+ if (!n) return e;
3139
+ let r = /* @__PURE__ */ new Map(), i = n.length;
3140
+ for (let e = 0; e < i; e++) {
3141
+ let t = n[e];
3142
+ if (ln(t)) continue;
3143
+ let i = t.content?.json?.shapeId;
3144
+ typeof i == "number" && r.set(i, t);
3145
+ }
3146
+ if (r.size === 0) return e;
3147
+ let a = e.xml.replace(/<v:shape\b[\s\S]*?<\/v:shape>/g, (e) => {
3148
+ let t = /\bo:spid="_x0000_s(\d+)"/.exec(e) ?? /\bid="_x0000_s(\d+)"/.exec(e), n = t ? r.get(parseInt(t[1], 10)) : void 0;
3149
+ if (!n) return e;
3150
+ let i = n.anchor, a = [
3151
+ i.tl.c,
3152
+ i.tl.r,
3153
+ i.br.c,
3154
+ i.br.r
3155
+ ];
3156
+ return e.replace(/(<x:Anchor>)([\s\d,-]*)(<\/x:Anchor>)/, (e, t, n, r) => {
3157
+ let i = n.split(",").map((e) => e.trim());
3158
+ if (i.length !== 8) return e;
3159
+ let o = i.slice();
3160
+ for (let e = 0; e < 4; e++) o[2 * e] = String(a[e] ?? 0);
3161
+ return o.join(",") === i.join(",") ? e : `${t}${o.join(", ")}${r}`;
3162
+ });
3163
+ });
3164
+ return a === e.xml ? e : {
3165
+ ...e,
3166
+ xml: a
3167
+ };
3168
+ })(u.legacyDrawing ?? null, u), g)), cn(o, s, "legacyDrawingHF", u.legacyDrawingHF ?? null), await async function(e, t, n) {
3169
+ let r = n.getPicture();
3170
+ if (!r) return;
3171
+ let i, a = r.getResource(), o = await a.getExternalURI();
3172
+ if (o) i = e.addExternal(G, o);
3173
+ else {
3174
+ let t = e.getSharedStates(), n = t.get(K);
3175
+ n || (n = /* @__PURE__ */ new Map(), t.set(K, n));
3176
+ let r = n.get(a);
3177
+ if (!r) {
3178
+ let e = await a.toBuffer();
3179
+ r = {
3180
+ bytes: new Uint8Array(e),
3181
+ type: await a.getType() ?? Dt,
3182
+ index: n.size + 1
3183
+ }, n.set(a, r);
3184
+ }
3185
+ i = e.addBinary(r.bytes, r.type.mime, G, `../media/image${r.index}.${r.type.ext}`, !0);
3186
+ }
3187
+ t.empty("picture", { "r:id": i.relId });
3188
+ }(o, s, c), await async function(e, t, n) {
3189
+ let r = n.movables;
3190
+ if (!r || r.every(ln)) return;
3191
+ let i = [], a = r.length;
3192
+ for (let t = 0; t < a; t++) {
3193
+ let n = r[t];
3194
+ if (ln(n)) continue;
3195
+ let a, o = n.content?.json ?? {}, s = o.part;
3196
+ if (s) try {
3197
+ a = (await et(s.type ? s : {
3198
+ ...s,
3199
+ type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp"
3200
+ }, e, "../ctrlProps/ctrlProp{n}.xml"))?.relId ?? void 0;
3201
+ } catch (t) {
3202
+ e.log(`Unable to write the properties of the control '${n.name}'`, t);
3203
+ }
3204
+ a ? i.push({
3205
+ jsonMovable: n,
3206
+ jsonControl: o,
3207
+ relId: a
3208
+ }) : e.log(`The control '${n.name}' has no properties to write and was dropped.`);
3209
+ }
3210
+ if (i.length === 0) return;
3211
+ t.start("mc:AlternateContent", {
3212
+ "xmlns:x14": M,
3213
+ "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
3214
+ }), t.start("mc:Choice", { Requires: "x14" }), t.start("controls");
3215
+ let o = i.length;
3216
+ for (let e = 0; e < o; e++) {
3217
+ let { jsonMovable: n, jsonControl: r, relId: a } = i[e];
3218
+ t.start("mc:AlternateContent"), t.start("mc:Choice", { Requires: "x14" }), t.start("control", {
3219
+ shapeId: r.shapeId,
3220
+ "r:id": a,
3221
+ name: n.name ?? void 0
3222
+ });
3223
+ let o = n.anchorType ?? "twoCell";
3224
+ t.start("controlPr", r.props), t.start("anchor", {
3225
+ moveWithCells: o === "absolute" ? void 0 : "1",
3226
+ sizeWithCells: o === "twoCell" ? "1" : void 0
3227
+ }), un(t, "from", n.anchor.tl), un(t, "to", n.anchor.br), t.end("anchor"), r.xml && t.raw(r.xml), t.end("controlPr"), t.end("control"), t.end("mc:Choice"), t.end("mc:AlternateContent");
3228
+ }
3229
+ t.end("controls"), t.end("mc:Choice"), t.end("mc:AlternateContent");
3230
+ }(o, s, u), function(e, t, n, r) {
3231
+ let i = r.tables, a = i ? i.length : 0;
3232
+ if (a === 0) return;
3233
+ let o = n.getTables().getItems();
3234
+ t.start("tableParts", { count: a });
3235
+ for (let n = 0; n < a; n++) {
3236
+ let r, a, s = i[n];
3237
+ Array.isArray(s) ? (a = s[0], r = s[1]) : (a = s.r, r = s.v);
3238
+ let c = e.addPart("table", {
3239
+ json: r,
3240
+ model: o[n],
3241
+ ref: a
3242
+ }), l = {};
3243
+ l["r:id"] = c.relId, t.empty("tablePart", l);
3244
+ }
3245
+ t.end("tableParts");
3246
+ }(o, s, c, u), function(e, t, n, r, i) {
3247
+ if (r.length === 0 && i.length === 0) return;
3248
+ let a = n.getStyles(), o = a.getTheme();
3249
+ if (t.start("extLst"), r.length > 0) {
3250
+ t.start("ext", {
3251
+ uri: N,
3252
+ "xmlns:x14": M
3253
+ }), t.start("x14:conditionalFormattings");
3254
+ for (let e = 0; e < r.length; e++) {
3255
+ let { guid: n, sqref: i, priority: s, scale: c, rule: u, style: d, stopIfTrue: f } = r[e];
3256
+ if (t.start("x14:conditionalFormatting", { "xmlns:xm": "http://schemas.microsoft.com/office/excel/2006/main" }), c) if (c.type === l.ScaleType.DataBar) {
3257
+ t.start("x14:cfRule", {
3258
+ type: "dataBar",
3259
+ id: n
3260
+ }), t.start("x14:dataBar", {
3261
+ minLength: c.minLength,
3262
+ maxLength: c.maxLength,
3263
+ gradient: c.gradient ? void 0 : "0",
3264
+ border: c.borderColor ? "1" : void 0,
3265
+ direction: c.direction,
3266
+ negativeBarColorSameAsPositive: c.negativeFillColor ? "0" : "1",
3267
+ negativeBarBorderColorSameAsPositive: c.negativeBorderColor ? "0" : void 0,
3268
+ axisPosition: c.axisPosition
3269
+ });
3270
+ let e = c.stops ?? [];
3271
+ if (e.length === 0) Xt(t, { type: l.ColorStopType.AutoMin }), Xt(t, { type: l.ColorStopType.AutoMax });
3272
+ else for (let n = 0; n < e.length; n++) Xt(t, e[n]);
3273
+ c.borderColor && H(t, o, c.borderColor, "x14:borderColor"), c.negativeFillColor && H(t, o, c.negativeFillColor, "x14:negativeFillColor"), c.negativeBorderColor && H(t, o, c.negativeBorderColor, "x14:negativeBorderColor"), c.axisColor && H(t, o, c.axisColor, "x14:axisColor"), t.end("x14:dataBar"), t.end("x14:cfRule");
3274
+ } else {
3275
+ t.start("x14:cfRule", {
3276
+ type: "iconSet",
3277
+ priority: s,
3278
+ id: n
3279
+ }), t.start("x14:iconSet", {
3280
+ iconSet: c.iconSet,
3281
+ reverse: Z(c.reverse),
3282
+ showValue: Z(c.showValue),
3283
+ custom: (c.icon?.length ?? 0) > 0 ? "1" : void 0
3284
+ });
3285
+ let e = c.stops ?? [];
3286
+ for (let n = 0; n < e.length; n++) Xt(t, e[n]);
3287
+ let r = c.icon ?? [];
3288
+ for (let e = 0; e < r.length; e++) t.empty("x14:cfIcon", {
3289
+ iconSet: r[e].set,
3290
+ iconId: r[e].id
3291
+ });
3292
+ t.end("x14:iconSet"), t.end("x14:cfRule");
3293
+ }
3294
+ else {
3295
+ t.start("x14:cfRule", {
3296
+ type: u.type,
3297
+ priority: s,
3298
+ stopIfTrue: Z(f),
3299
+ aboveAverage: Z(u.aboveAverage),
3300
+ equalAverage: Z(u.equalAverage),
3301
+ stdDev: u.stdDev,
3302
+ bottom: Z(u.bottom),
3303
+ percent: Z(u.percent),
3304
+ rank: u.rank,
3305
+ operator: u.operator,
3306
+ text: u.text,
3307
+ timePeriod: u.timePeriod,
3308
+ id: n
3309
+ });
3310
+ let e = u.formulas ?? [];
3311
+ for (let n = 0; n < e.length; n++) t.start("xm:f"), t.text(e[n]), t.end("xm:f");
3312
+ d && Object.keys(d).length > 0 && Rt(0, t, d, a, o, "x14:dxf"), t.end("x14:cfRule");
3313
+ }
3314
+ t.start("xm:sqref"), t.text(i), t.end("xm:sqref"), t.end("x14:conditionalFormatting");
3315
+ }
3316
+ t.end("x14:conditionalFormattings"), t.end("ext");
3317
+ }
3318
+ if (i.length > 0) {
3319
+ t.start("ext", {
3320
+ uri: ee,
3321
+ "xmlns:x14": M
3322
+ }), t.start("x14:dataValidations", {
3323
+ "xmlns:xm": O,
3324
+ count: i.length
3325
+ });
3326
+ for (let e = 0; e < i.length; e++) {
3327
+ let { attrs: n, formula1: r, formula2: a, sqref: o } = i[e];
3328
+ t.start("x14:dataValidation", n), r !== void 0 && (t.start("x14:formula1"), t.start("xm:f"), t.text(r), t.end("xm:f"), t.end("x14:formula1")), a !== void 0 && (t.start("x14:formula2"), t.start("xm:f"), t.text(a), t.end("xm:f"), t.end("x14:formula2")), t.start("xm:sqref"), t.text(o), t.end("xm:sqref"), t.end("x14:dataValidation");
3329
+ }
3330
+ t.end("x14:dataValidations"), t.end("ext");
3331
+ }
3332
+ t.end("extLst");
3333
+ }(0, s, c, p, m), function(e, t) {
3334
+ let n = t.pivotTables, r = n ? n.length : 0;
3335
+ for (let t = 0; t < r; t++) {
3336
+ let r = n[t], i = r.part;
3337
+ i?.xml && (rt(e, r.cacheId) ? e.addPart("pivotTable", r) : e.log(`The pivot table '${i.name ?? ""}' has no cache with id ${r.cacheId} and was dropped.`));
3338
+ }
3339
+ }(o, u), _ = o, (v = g) && (_.addPart("comments", v), v.comments.some((e) => !e.comment.isNote()) && _.addPart("threadedComments", v)), s.end("worksheet"), s.close();
3340
+ }
3341
+ }(),
3342
+ new class extends L {
3343
+ constructor() {
3344
+ super({
3345
+ kind: "sharedStrings",
3346
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
3347
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
3348
+ path: "/xl/sharedStrings.xml"
3349
+ });
3350
+ }
3351
+ async emit(e, t) {
3352
+ let n = t.getXMLWriter(), r = e.json, i = r ? r.length : 0, a = t.getSharedStates().get("stringsCount") ?? 0;
3353
+ n.decl(), n.start("sst", {
3354
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
3355
+ count: a,
3356
+ uniqueCount: i
3357
+ });
3358
+ for (let e = 0; e < i; e++) {
3359
+ let t = r[e];
3360
+ n.start("si");
3361
+ let i = oe.test(t) ? b : void 0;
3362
+ n.start("t", i), n.text(te(t)), n.end("t"), n.end("si");
3363
+ }
3364
+ n.end("sst"), n.close();
3365
+ }
3366
+ }(),
3367
+ new class extends L {
3368
+ constructor() {
3369
+ super({
3370
+ kind: "theme",
3371
+ contentType: "application/vnd.openxmlformats-officedocument.theme+xml",
3372
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
3373
+ path: "/xl/theme/theme{n}.xml"
3374
+ });
3375
+ }
3376
+ async emit(e, t) {
3377
+ let n = t.getXMLWriter(), r = e.model, i = e.json;
3378
+ n.decl(), n.pushDefaultNamespace("a"), n.start("theme", {
3379
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
3380
+ name: r.getName() || "Office Theme"
3381
+ }), n.start("themeElements"), function(e, t, n, r) {
3382
+ let i = n?.getColorScheme();
3383
+ if (i) {
3384
+ t.start(r, { name: i.getName() || "Office" });
3385
+ for (let e of dt) t.start(e), B(t, n, i["get" + e.charAt(0).toUpperCase() + e.slice(1)]()), t.end(e);
3386
+ t.end(r);
3387
+ }
3388
+ }(0, n, r, "clrScheme"), function(e, t, n, r) {
3389
+ n && (t.start(r, { name: n.getName() || "Office" }), gn(0, t, n.getMajorFont() || "Calibri Light", "majorFont"), gn(0, t, n.getMinorFont() || "Calibri", "minorFont"), t.end(r));
3390
+ }(0, n, r.getFontScheme(), "fontScheme"), function(e, t, n, r, i) {
3391
+ i?.fillStyleLst && i?.lnStyleLst && i?.effectStyleLst && i?.bgFillStyleLst ? function(e, t, n, r, i) {
3392
+ let a = { getTheme: () => r };
3393
+ t.start(n, { name: "Office" }), t.start("fillStyleLst");
3394
+ for (let e of i.fillStyleLst) W(0, t, e, a);
3395
+ t.end("fillStyleLst"), t.start("lnStyleLst");
3396
+ for (let e of i.lnStyleLst) xt(0, t, e, a);
3397
+ t.end("lnStyleLst"), t.start("effectStyleLst");
3398
+ for (let n of i.effectStyleLst) t.start("effectStyle"), n.length > 0 ? wt(e, t, r, n) : t.empty("effectLst"), t.end("effectStyle");
3399
+ t.end("effectStyleLst"), t.start("bgFillStyleLst");
3400
+ for (let e of i.bgFillStyleLst) W(0, t, e, a);
3401
+ t.end("bgFillStyleLst"), t.end(n);
3402
+ }(e, t, n, r, i) : i?.formatSchemeXml ? t.raw(i.formatSchemeXml) : (t.start(n, { name: "Office" }), function(e, t) {
3403
+ t.start("fillStyleLst"), t.start("solidFill"), t.empty("schemeClr", { val: "phClr" }), t.end("solidFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "50000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "35000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "37000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "15000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("lin", {
3404
+ ang: "16200000",
3405
+ scaled: "1"
3406
+ }), t.end("gradFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "51000" }), t.empty("satMod", { val: "130000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "80000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "93000" }), t.empty("satMod", { val: "130000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "94000" }), t.empty("satMod", { val: "135000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("lin", {
3407
+ ang: "16200000",
3408
+ scaled: "0"
3409
+ }), t.end("gradFill"), t.end("fillStyleLst");
3410
+ }(0, t), function(e, t) {
3411
+ t.start("lnStyleLst");
3412
+ let n = [
3413
+ 9525,
3414
+ 25400,
3415
+ 38100
3416
+ ];
3417
+ for (let e = 0; e < 3; e++) t.start("ln", {
3418
+ w: n[e].toString(),
3419
+ cap: "flat",
3420
+ cmpd: "sng",
3421
+ algn: "ctr"
3422
+ }), t.start("solidFill"), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "95000" }), t.empty("satMod", { val: "105000" }), t.end("schemeClr"), t.end("solidFill"), t.empty("prstDash", { val: "solid" }), t.end("ln");
3423
+ t.end("lnStyleLst");
3424
+ }(0, t), function(e, t) {
3425
+ t.start("effectStyleLst");
3426
+ for (let e = 0; e < 3; e++) t.start("effectStyle"), t.start("effectLst"), e === 2 && (t.start("outerShdw", {
3427
+ blurRad: "40000",
3428
+ dist: "20000",
3429
+ dir: "5400000",
3430
+ rotWithShape: "0"
3431
+ }), t.start("srgbClr", { val: "000000" }), t.empty("alpha", { val: "38000" }), t.end("srgbClr"), t.end("outerShdw")), t.end("effectLst"), t.end("effectStyle");
3432
+ t.end("effectStyleLst");
3433
+ }(0, t), function(e, t) {
3434
+ t.start("bgFillStyleLst"), t.start("solidFill"), t.empty("schemeClr", { val: "phClr" }), t.end("solidFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "40000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "40000" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "45000" }), t.empty("shade", { val: "99000" }), t.empty("satMod", { val: "350000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "20000" }), t.empty("satMod", { val: "255000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("path", { path: "circle" }), t.empty("fillToRect", {
3435
+ l: "50000",
3436
+ t: "-80000",
3437
+ r: "50000",
3438
+ b: "180000"
3439
+ }), t.end("gradFill"), t.start("gradFill", { rotWithShape: "1" }), t.start("gsLst"), t.start("gs", { pos: "0" }), t.start("schemeClr", { val: "phClr" }), t.empty("tint", { val: "80000" }), t.empty("satMod", { val: "300000" }), t.end("schemeClr"), t.end("gs"), t.start("gs", { pos: "100000" }), t.start("schemeClr", { val: "phClr" }), t.empty("shade", { val: "30000" }), t.empty("satMod", { val: "200000" }), t.end("schemeClr"), t.end("gs"), t.end("gsLst"), t.empty("path", { path: "circle" }), t.empty("fillToRect", {
3440
+ l: "50000",
3441
+ t: "50000",
3442
+ r: "50000",
3443
+ b: "50000"
3444
+ }), t.end("gradFill"), t.end("bgFillStyleLst");
3445
+ }(0, t), t.end(n));
3446
+ }(t, n, "fmtScheme", r, i), n.end("themeElements"), n.start("objectDefaults"), n.end("objectDefaults"), n.start("extraClrSchemeLst"), n.end("extraClrSchemeLst"), n.end("theme"), n.close();
3447
+ }
3448
+ }(),
3449
+ new class extends L {
3450
+ constructor() {
3451
+ super({
3452
+ kind: "styles",
3453
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
3454
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
3455
+ path: "/xl/styles.xml"
3456
+ });
3457
+ }
3458
+ async emit(e, t) {
3459
+ let r = t.getXMLWriter(), a = e.json, o = (e.theme, e.styles);
3460
+ r.decl(), r.start("styleSheet", {
3461
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
3462
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
3463
+ "mc:Ignorable": "x14ac x16r2 xr",
3464
+ "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",
3465
+ "xmlns:x16r2": "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main",
3466
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision"
3467
+ });
3468
+ let s = function(e, t) {
3469
+ let n = t?.direct;
3470
+ n && n.length !== 0 || (n = [{}]);
3471
+ let r = n.length, i = Array(r);
3472
+ for (let t = 0; t < r; t++) {
3473
+ let r = t === 0 ? {
3474
+ ...n[t],
3475
+ named: f.BuiltInName.Normal
3476
+ } : n[t], a = e.resolve(r), o = {};
3477
+ r.named !== void 0 && (o.named = r.named), r.quotePrefix !== void 0 && (o.quotePrefix = r.quotePrefix), r.protection !== void 0 && (o.protection = r.protection);
3478
+ for (let e = 0; e < jt.length; e++) {
3479
+ let t = jt[e];
3480
+ if (r[t] === void 0 && t !== "alignment") continue;
3481
+ let n = a?.[t] ?? r[t];
3482
+ n !== void 0 && (o[t] = n);
3483
+ }
3484
+ i[t] = o;
3485
+ }
3486
+ return i;
3487
+ }(o, a), c = function(e, t, r) {
3488
+ let a = {
3489
+ fontMap: /* @__PURE__ */ new Map(),
3490
+ fonts: [],
3491
+ fillMap: /* @__PURE__ */ new Map(),
3492
+ fills: [],
3493
+ borderMap: /* @__PURE__ */ new Map(),
3494
+ borders: [],
3495
+ numFmtMap: /* @__PURE__ */ new Map(),
3496
+ numFmtsCustom: [],
3497
+ namedStyleMap: /* @__PURE__ */ new Map(),
3498
+ namedStyles: []
3499
+ };
3500
+ (function(e, t) {
3501
+ let r = (e.getNamedStyles().getByName(f.BuiltInName.Normal).toJSON().style ?? {}).font ?? {};
3502
+ t.fontMap.set(n.JSONStableStringify(r), "0"), t.fonts.push(r);
3503
+ })(e, a), function(e) {
3504
+ let t = { type: "none" };
3505
+ e.fillMap.set(n.JSONStableStringify(t), "0"), e.fills.push(t);
3506
+ let r = {
3507
+ type: "pattern",
3508
+ patternType: "gray125"
3509
+ };
3510
+ e.fillMap.set(n.JSONStableStringify(r), "1"), e.fills.push(r);
3511
+ }(a), function(e) {
3512
+ let t = {
3513
+ bottom: { style: "none" },
3514
+ left: { style: "none" },
3515
+ right: { style: "none" },
3516
+ top: { style: "none" }
3517
+ };
3518
+ e.borderMap.set(n.JSONStableStringify(t), "0"), e.borders.push(t);
3519
+ }(a), function(e, t) {
3520
+ Nt(e, e.getNamedStyles().getByName(f.BuiltInName.Normal).toJSON(), t);
3521
+ }(e, a);
3522
+ let o = t?.named ?? i.EmptyArray;
3523
+ for (let t of o) Nt(e, t, a);
3524
+ for (let t of r) Mt(e, t, a);
3525
+ return a;
3526
+ }(o, a, s), l = t.getSharedStates().get(At), u = function(e, t = 0) {
3527
+ let n = e?.tables;
3528
+ if (!n) return null;
3529
+ let r = n.styles;
3530
+ if (!r) return null;
3531
+ let i = [], a = /* @__PURE__ */ new Map(), o = Object.keys(r), s = [...Bt].reverse();
3532
+ for (let e of o) {
3533
+ let n = r[e];
3534
+ for (let r of s) {
3535
+ let o = n[r];
3536
+ if (!o) continue;
3537
+ let s = {};
3538
+ if (o.font && (s.font = o.font), o.fill && (s.fill = o.fill), o.borders && (s.borders = o.borders), o.numberFormat !== void 0 && (s.numberFormat = o.numberFormat), Object.keys(s).length === 0) continue;
3539
+ let c = t + i.length;
3540
+ i.push(s);
3541
+ let l = `${e}:${r}`;
3542
+ a.set(l, c);
3543
+ }
3544
+ }
3545
+ return {
3546
+ dxfs: i,
3547
+ dxfIndexMap: a
3548
+ };
3549
+ }(a, l?.getCount() ?? 0);
3550
+ (function(e, t, n) {
3551
+ let r = n.numFmtsCustom, i = r.length;
3552
+ if (i !== 0) {
3553
+ t.start("numFmts", { count: String(i) });
3554
+ for (let e = 0; e < i; e++) {
3555
+ let n = r[e];
3556
+ t.empty("numFmt", {
3557
+ numFmtId: String(e + zt),
3558
+ formatCode: n
3559
+ });
3560
+ }
3561
+ t.end("numFmts");
3562
+ }
3563
+ })(0, r, c), function(e, t, n, r) {
3564
+ let i = r.fonts, a = i.length;
3565
+ t.start("fonts", {
3566
+ count: String(a),
3567
+ "x14ac:knownFonts": "1"
3568
+ });
3569
+ for (let e of i) Pt(0, t, e, n);
3570
+ t.end("fonts");
3571
+ }(0, r, o, c), function(e, t, n, r) {
3572
+ let i = r.fills, a = i.length;
3573
+ t.start("fills", { count: String(a) });
3574
+ for (let e of i) W(0, t, e, n, !0);
3575
+ t.end("fills");
3576
+ }(0, r, o, c), function(e, t, n, r) {
3577
+ let i = r.borders, a = i.length;
3578
+ t.start("borders", { count: String(a) });
3579
+ let o = n.getTheme();
3580
+ for (let e of i) Ft(0, t, e, o, !1);
3581
+ t.end("borders");
3582
+ }(0, r, o, c), function(e, t, n, r, a) {
3583
+ let o = a.namedStyles, s = o.length;
3584
+ t.start("cellStyleXfs", { count: String(s) });
3585
+ for (let e of o) Lt(0, t, n, e.style ?? i.EmptyObject, a, !1);
3586
+ t.end("cellStyleXfs");
3587
+ }(0, r, o, 0, c), function(e, t, n, r, i, a) {
3588
+ let o = r.length, s = a?.getSources() ?? [];
3589
+ t.start("cellXfs", { count: String(o + s.length) });
3590
+ for (let e = 0; e < o; e++) Lt(0, t, n, r[e], i, !0);
3591
+ for (let e = 0; e < s.length; e++) Lt(0, t, n, r[s[e]], i, !0, !0);
3592
+ t.end("cellXfs");
3593
+ }(0, r, o, s, c, t.getSharedStates().get(qe)), function(e, t, n, r, i) {
3594
+ let a = i.namedStyles, o = a.length;
3595
+ t.start("cellStyles", { count: String(o) });
3596
+ let s = i.namedStyleMap;
3597
+ for (let e = 0; e < o; e++) {
3598
+ let r = a[e], i = r.name, o = i.toLowerCase(), c = {
3599
+ name: i,
3600
+ xfId: s.get(o)
3601
+ };
3602
+ r.hidden && (c.hidden = "1"), r.iLevel && (c.iLevel = String(r.iLevel));
3603
+ let l = null;
3604
+ l = o === f.BuiltInName.Normal.toLowerCase() ? 0 : n.getNamedStyles().getByName(i).getBuiltInID(), l !== null && (c.builtinId = String(l), c.customBuiltin = "1"), t.empty("cellStyle", c);
3605
+ }
3606
+ t.end("cellStyles");
3607
+ }(0, r, o, 0, c), function(e, t, n, r, i) {
3608
+ let a = [...i?.getDxfs() ?? [], ...r?.dxfs ?? []];
3609
+ if (a.length === 0) return void t.empty("dxfs", { count: "0" });
3610
+ let o = n.getTheme();
3611
+ t.start("dxfs", { count: String(a.length) });
3612
+ let s = zt;
3613
+ for (let e of a) s = Rt(0, t, e, n, o, "dxf", s);
3614
+ t.end("dxfs");
3615
+ }(0, r, o, u, l), function(e, t, n, r, i) {
3616
+ let a = r?.tables, o = a?.styles ?? null, s = o ? Object.keys(o) : null, c = s ? s.length : 0, l = {
3617
+ count: String(c),
3618
+ defaultTableStyle: a?.defaultTableStyle ?? "TableStyleMedium2",
3619
+ defaultPivotStyle: a?.defaultPivotStyle ?? "PivotStyleLight16"
3620
+ };
3621
+ if (c !== 0) {
3622
+ t.start("tableStyles", l);
3623
+ for (let e of s) {
3624
+ let n = o[e], r = [];
3625
+ for (let e of Bt) {
3626
+ let t = n[e];
3627
+ t && r.push([e, t]);
3628
+ }
3629
+ let a = {
3630
+ name: e,
3631
+ pivot: n.pivot ? "1" : "0",
3632
+ count: String(r.length)
3633
+ };
3634
+ t.start("tableStyle", a);
3635
+ for (let [n, a] of r) {
3636
+ let r = `${e}:${n}`, o = i?.dxfIndexMap.get(r) ?? "0", s = {};
3637
+ s.type = n, a.size !== void 0 && (s.size = String(a.size)), s.dxfId = String(o), t.empty("tableStyleElement", s);
3638
+ }
3639
+ t.end("tableStyle");
3640
+ }
3641
+ t.end("tableStyles");
3642
+ } else t.empty("tableStyles", l);
3643
+ }(0, r, 0, a, u), function(e, t, n, r) {
3644
+ let i = r?.indexedColors && r.indexedColors.length > 0, a = r?.mruColors && r.mruColors.length > 0;
3645
+ if (i || a) {
3646
+ if (t.start("colors"), i) {
3647
+ t.start("indexedColors");
3648
+ for (let e of r.indexedColors) {
3649
+ let n = gt(e, !0);
3650
+ t.empty("rgbColor", { rgb: n });
3651
+ }
3652
+ t.end("indexedColors");
3653
+ }
3654
+ if (a) {
3655
+ t.start("mruColors");
3656
+ for (let e of r.mruColors) {
3657
+ let n = gt(e);
3658
+ t.empty("color", { rgb: n });
3659
+ }
3660
+ t.end("mruColors");
3661
+ }
3662
+ t.end("colors");
3663
+ }
3664
+ }(0, r, 0, a), function(e, t) {
3665
+ t.start("extLst"), t.start("ext", {
3666
+ uri: "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}",
3667
+ "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
3668
+ }), t.empty("x14:slicerStyles", { defaultSlicerStyle: "SlicerStyleLight1" }), t.end("ext"), t.start("ext", {
3669
+ uri: "{9260A510-F301-46a8-8635-F512D64BE5F5}",
3670
+ "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"
3671
+ }), t.empty("x15:timelineStyles", { defaultTimelineStyle: "TimeSlicerStyleLight1" }), t.end("ext"), t.end("extLst");
3672
+ }(0, r), r.end("styleSheet"), r.close();
3673
+ }
3674
+ }(),
3675
+ new class extends L {
3676
+ constructor() {
3677
+ super({
3678
+ kind: "propsCore",
3679
+ contentType: "application/vnd.openxmlformats-package.core-properties+xml",
3680
+ relTypeUri: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
3681
+ path: "/docProps/core.xml"
3682
+ });
3683
+ }
3684
+ async emit(e, t) {
3685
+ let n = t.getXMLWriter();
3686
+ n.decl(), n.start("cp:coreProperties", {
3687
+ "xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
3688
+ "xmlns:dc": "http://purl.org/dc/elements/1.1/",
3689
+ "xmlns:dcterms": "http://purl.org/dc/terms/",
3690
+ "xmlns:dcmitype": "http://purl.org/dc/dcmitype/",
3691
+ "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
3692
+ });
3693
+ let r = /* @__PURE__ */ new Date(), i = [
3694
+ ["creator", "SheetXL"],
3695
+ ["lastModifiedBy", "SheetXL"],
3696
+ ["created", _n(r)],
3697
+ ["modified", _n(r)]
3698
+ ];
3699
+ for (let e of i) vn(n, e[0], e[1]);
3700
+ n.end("cp:coreProperties"), n.close();
3701
+ }
3702
+ }(),
3703
+ new class extends L {
3704
+ constructor() {
3705
+ super({
3706
+ kind: "propsApp",
3707
+ contentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml",
3708
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
3709
+ path: "/docProps/app.xml"
3710
+ });
3711
+ }
3712
+ async emit(e, t) {
3713
+ let n = t.getXMLWriter(), r = e.model, i = await m.getDetails(), a = j(i.getBuildVersion()), o = i.getLicensee() || "";
3714
+ n.setValidationDisabled(!0), n.decl(), n.start("Properties", {
3715
+ xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",
3716
+ "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
3717
+ }), Q(0, n, "Application", "SheetXL"), Q(0, n, "DocSecurity", "0"), Q(0, n, "ScaleCrop", "false"), ((e, t, n) => {
3718
+ let r = n.getSheets().getItems({ visibility: u.Visibility.Hidden }).map((e) => e.getName()), i = n.getNames().getItems({ type: "formula" }).filter((e) => !!e.getRanges?.()).map((e) => e.getName());
3719
+ t.start("HeadingPairs"), t.start("vt:vector", {
3720
+ size: i.length > 0 ? "4" : "2",
3721
+ baseType: "variant"
3722
+ }), t.start("vt:variant"), t.start("vt:lpstr"), t.text("Worksheets"), t.end("vt:lpstr"), t.end("vt:variant"), t.start("vt:variant"), t.start("vt:i4"), t.text("" + r.length), t.end("vt:i4"), t.end("vt:variant"), i.length > 0 && (t.start("vt:variant"), t.start("vt:lpstr"), t.text("Named Ranges"), t.end("vt:lpstr"), t.end("vt:variant"), t.start("vt:variant"), t.start("vt:i4"), t.text("" + i.length), t.end("vt:i4"), t.end("vt:variant")), t.end("vt:vector"), t.end("HeadingPairs"), t.start("TitlesOfParts"), t.start("vt:vector", {
3723
+ size: "" + (r.length + i.length),
3724
+ baseType: "lpstr"
3725
+ });
3726
+ for (let e of r) t.start("vt:lpstr"), t.text(e), t.end("vt:lpstr");
3727
+ for (let e of i) t.start("vt:lpstr"), t.text(e), t.end("vt:lpstr");
3728
+ t.end("vt:vector"), t.end("TitlesOfParts");
3729
+ })(0, n, r), Q(0, n, "Company", o), Q(0, n, "LinksUpToDate", "false"), Q(0, n, "SharedDoc", "false"), Q(0, n, "HyperlinksChanged", "false"), Q(0, n, "AppVersion", a), n.end("Properties"), n.close();
3730
+ }
3731
+ }(),
3732
+ new class extends L {
3733
+ constructor() {
3734
+ super({
3735
+ kind: "metadata",
3736
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
3737
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
3738
+ path: "/xl/metadata.xml"
3739
+ });
3740
+ }
3741
+ emit(e, t) {
3742
+ let n = t.getXMLWriter(), r = e.hasCellMeta(), i = e.hasValueMeta(), a = e.getDAPRFutureMetadataBlocks(), o = e.getRVFutureMetadataBlocks(), s = e.getValueMeta(), c = 0, l = 0, u = 0;
3743
+ r && (c = ++u), i && (l = ++u);
3744
+ let d = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" };
3745
+ if (r && (d["xmlns:xda"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"), i && (d["xmlns:xlrd"] = "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata"), n.decl(), n.start("metadata", d), n.start("metadataTypes", { count: u }), r && n.empty("metadataType", {
3746
+ name: "XLDAPR",
3747
+ ...yn,
3748
+ cellMeta: "1"
3749
+ }), i && n.empty("metadataType", {
3750
+ name: "XLRICHVALUE",
3751
+ ...yn
3752
+ }), n.end("metadataTypes"), r) {
3753
+ n.start("futureMetadata", {
3754
+ name: "XLDAPR",
3755
+ count: a.length
3756
+ });
3757
+ for (let e of a) n.start("bk"), n.start("extLst"), n.start("ext", { uri: "{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}" }), n.empty("xda:dynamicArrayProperties", {
3758
+ fDynamic: e.fDynamic,
3759
+ fCollapsed: e.fCollapsed
3760
+ }), n.end("ext"), n.end("extLst"), n.end("bk");
3761
+ n.end("futureMetadata");
3762
+ }
3763
+ if (i) {
3764
+ n.start("futureMetadata", {
3765
+ name: "XLRICHVALUE",
3766
+ count: o.length
3767
+ });
3768
+ for (let e of o) n.start("bk"), n.start("extLst"), n.start("ext", { uri: "{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}" }), n.empty("xlrd:rvb", { i: e }), n.end("ext"), n.end("extLst"), n.end("bk");
3769
+ n.end("futureMetadata");
3770
+ }
3771
+ if (r) {
3772
+ n.start("cellMetadata", { count: a.length });
3773
+ for (let e = 0; e < a.length; e++) n.start("bk"), n.empty("rc", {
3774
+ t: c,
3775
+ v: e
3776
+ }), n.end("bk");
3777
+ n.end("cellMetadata");
3778
+ }
3779
+ if (i) {
3780
+ n.start("valueMetadata", { count: s.length });
3781
+ for (let e of s) n.start("bk"), n.empty("rc", {
3782
+ t: l,
3783
+ v: e
3784
+ }), n.end("bk");
3785
+ n.end("valueMetadata");
3786
+ }
3787
+ n.end("metadata"), n.close();
3788
+ }
3789
+ }(),
3790
+ new class extends L {
3791
+ constructor() {
3792
+ super({
3793
+ kind: "richValue",
3794
+ contentType: "application/vnd.ms-excel.rdrichvalue+xml",
3795
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue",
3796
+ path: "./richData/rdrichvalue.xml"
3797
+ });
3798
+ }
3799
+ async emit(e, t) {
3800
+ let n = t.getXMLWriter(), r = e.getEntries(), i = r.length;
3801
+ n.decl(), n.start("rvData", {
3802
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata",
3803
+ count: i
3804
+ });
3805
+ for (let t of r) {
3806
+ let r = e.handlerStructureIndex(t.handler);
3807
+ n.start("rv", { s: r });
3808
+ let i = t.handler.getValues(t.rawValue);
3809
+ for (let e of i) n.start("v"), n.text(e), n.end("v");
3810
+ n.end("rv");
3811
+ }
3812
+ n.end("rvData"), n.close();
3813
+ }
3814
+ }(),
3815
+ new class extends L {
3816
+ constructor() {
3817
+ super({
3818
+ kind: "richValueStructure",
3819
+ contentType: "application/vnd.ms-excel.rdrichvaluestructure+xml",
3820
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure",
3821
+ path: "./richData/rdrichvaluestructure.xml"
3822
+ });
3823
+ }
3824
+ async emit(e, t) {
3825
+ let n = t.getXMLWriter(), r = e.uniqueHandlers(), i = r.length;
3826
+ n.decl(), n.start("rvStructures", {
3827
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata",
3828
+ count: i
3829
+ });
3830
+ for (let e of r) {
3831
+ n.start("s", { t: e.type });
3832
+ for (let [t, r] of e.props) n.empty("k", {
3833
+ n: t,
3834
+ t: r
3835
+ });
3836
+ n.end("s");
3837
+ }
3838
+ n.end("rvStructures"), n.close();
3839
+ }
3840
+ }(),
3841
+ new class extends L {
3842
+ constructor() {
3843
+ super({
3844
+ kind: "richValueTypes",
3845
+ contentType: "application/vnd.ms-excel.rdrichvaluetypes+xml",
3846
+ relTypeUri: "http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes",
3847
+ path: "./richData/rdRichValueTypes.xml"
3848
+ });
3849
+ }
3850
+ async emit(e, t) {
3851
+ let n = t.getXMLWriter();
3852
+ n.decl(), n.start("rvTypesInfo", {
3853
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2",
3854
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
3855
+ "mc:Ignorable": "x",
3856
+ "xmlns:x": "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
3857
+ });
3858
+ let r = [
3859
+ ["_self", ["ExcludeFromFile", "ExcludeFromCalcComparison"]],
3860
+ ["_DisplayString", ["ExcludeFromCalcComparison"]],
3861
+ ["_Flags", ["ExcludeFromCalcComparison"]],
3862
+ ["_Format", ["ExcludeFromCalcComparison"]],
3863
+ ["_SubLabel", ["ExcludeFromCalcComparison"]],
3864
+ ["_Attribution", ["ExcludeFromCalcComparison"]],
3865
+ ["_Icons", ["ExcludeFromCalcComparison"]],
3866
+ ["_Display", ["ExcludeFromCalcComparison"]],
3867
+ ["_CanonicalPropertyNames", ["ExcludeFromCalcComparison"]],
3868
+ ["_ClassificationId", ["ExcludeFromCalcComparison"]]
3869
+ ];
3870
+ n.start("global"), n.start("keyFlags");
3871
+ for (let [e, t] of r) {
3872
+ n.start("key", { name: e });
3873
+ for (let e of t) n.empty("flag", {
3874
+ name: e,
3875
+ value: "1"
3876
+ });
3877
+ n.end("key");
3878
+ }
3879
+ n.end("keyFlags"), n.end("global"), n.end("rvTypesInfo"), n.close();
3880
+ }
3881
+ }(),
3882
+ new class extends L {
3883
+ constructor() {
3884
+ super({
3885
+ kind: "drawing",
3886
+ contentType: "application/vnd.openxmlformats-officedocument.drawing+xml",
3887
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
3888
+ path: "../drawings/drawing{n}.xml"
3889
+ });
3890
+ }
3891
+ async emit(e, t) {
3892
+ let n = t.getXMLWriter();
3893
+ n.decl(), n.pushDefaultNamespace("xdr"), n.start("wsDr", {
3894
+ "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
3895
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main"
3896
+ });
3897
+ let r = /* @__PURE__ */ new Map(), i = e.sheet, a = e.movables, o = e.jsonMovables, s = o ? o.length : 0, c = 0;
3898
+ for (let e = 0; e < s; e++) {
3899
+ let t = o[e].content?.json?.sourceId;
3900
+ typeof t == "number" && t > c && (c = t);
3901
+ }
3902
+ let l, u = /* @__PURE__ */ new Map();
3903
+ if (c > 0) {
3904
+ let e = t.getSharedStates();
3905
+ l = e.get("uniqueIdCounter"), l || (l = /* @__PURE__ */ new Map(), e.set("uniqueIdCounter", l)), l.set(i, Math.max(l.get(i) ?? 1, c));
3906
+ let n = /* @__PURE__ */ new Set();
3907
+ for (let e = 0; e < s; e++) {
3908
+ let t = o[e].content?.json?.sourceId;
3909
+ if (typeof t == "number") if (n.has(t)) {
3910
+ let t = l.get(i) + 1;
3911
+ l.set(i, t), u.set(o[e], t);
3912
+ } else n.add(t);
3913
+ }
3914
+ }
3915
+ for (let e = 0; e < s; e++) {
3916
+ let s = o[e], c = a[e], l = s.content?.type;
3917
+ switch (n.start("twoCellAnchor", { editAs: s.anchorType || "twoCell" }), Rn(n, "from", s.anchor.tl), Rn(n, "to", s.anchor.br), l) {
3918
+ case "picture":
3919
+ await En(t, i, r, c, s);
3920
+ break;
3921
+ case "chart":
3922
+ await Dn(t, i, r, c, s, u.get(s));
3923
+ break;
3924
+ case "shape":
3925
+ await jn(t, i, r, c, s, u.get(s));
3926
+ break;
3927
+ case "smartArt":
3928
+ await On(t, i, r, c, s);
3929
+ break;
3930
+ case "slicer":
3931
+ await kn(t, i, r, c, s);
3932
+ break;
3933
+ case "graphicFrame":
3934
+ await An(t, i, r, c, s);
3935
+ break;
3936
+ default: await $(t, i, r, c, s);
3937
+ }
3938
+ n.empty("clientData"), n.end("twoCellAnchor");
3939
+ }
3940
+ n.end("wsDr"), n.close();
3941
+ }
3942
+ }(),
3943
+ new class extends L {
3944
+ constructor() {
3945
+ super({
3946
+ kind: "legacyDrawing",
3947
+ contentType: "application/vnd.openxmlformats-officedocument.vmlDrawing",
3948
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",
3949
+ path: "../drawings/vmlDrawing{n}.vml"
3950
+ });
3951
+ }
3952
+ async emit(e, t) {
3953
+ let n = e.images, r = n ? n.length : 0;
3954
+ if (r > 0) {
3955
+ let e = t.getSharedStates().get(be);
3956
+ for (let i = 0; i < r; i++) {
3957
+ let r = n[i], a = e?.get(r.resId);
3958
+ if (a) try {
3959
+ await zn(t, r.id, a);
3960
+ } catch (e) {
3961
+ t.log(`Unable to write legacy drawing image '${r.id}'`, e);
3962
+ }
3963
+ else t.log(`Legacy drawing image '${r.id}' has no resource ${r.resId} and was not written.`);
3964
+ }
3965
+ }
3966
+ let i = t.getXMLWriter();
3967
+ i.setValidationDisabled(!0), i.raw(e.xml), i.close();
3968
+ }
3969
+ }(),
3970
+ new class extends L {
3971
+ constructor() {
3972
+ super({
3973
+ kind: "embeddedPart",
3974
+ contentType: Qe,
3975
+ relTypeUri: ""
3976
+ });
3977
+ }
3978
+ getContentType(e) {
3979
+ return e?.contentType || Qe;
3980
+ }
3981
+ getRelTypeUri(e) {
3982
+ return e?.type ?? "";
3983
+ }
3984
+ getPath(e) {
3985
+ return `./${tt(e.name)}`;
3986
+ }
3987
+ async emit(e, t) {
3988
+ await $e(e, t);
3989
+ let n = t.getXMLWriter();
3990
+ n.setValidationDisabled(!0), n.raw(e.xml ?? ""), n.close();
3991
+ }
3992
+ }(),
3993
+ new class extends L {
3994
+ constructor() {
3995
+ super({
3996
+ kind: "pivotTable",
3997
+ contentType: nt,
3998
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable",
3999
+ path: "../pivotTables/pivotTable{n}.xml"
4000
+ });
4001
+ }
4002
+ getContentType(e) {
4003
+ return e?.part?.contentType || nt;
4004
+ }
4005
+ async emit(e, t) {
4006
+ let n = e.part;
4007
+ await $e(n, t);
4008
+ let r = rt(t, e.cacheId);
4009
+ if (!r || !t.addRelationship("http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition", r)) throw Error(`Pivot table '${n.name ?? ""}' has no cache with id ${e.cacheId}.`);
4010
+ let i = t.getXMLWriter();
4011
+ i.setValidationDisabled(!0), i.raw(n.xml ?? ""), i.close();
4012
+ }
4013
+ }(),
4014
+ new class extends L {
4015
+ constructor() {
4016
+ super({
4017
+ kind: "comments",
4018
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
4019
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",
4020
+ path: "../comments{n}.xml"
4021
+ });
4022
+ }
4023
+ async emit(e, t) {
4024
+ let n = t.getXMLWriter();
4025
+ n.decl(), n.start("comments", {
4026
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
4027
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
4028
+ "mc:Ignorable": "xr",
4029
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision"
4030
+ });
4031
+ let r = [], i = /* @__PURE__ */ new Map(), a = (e) => {
4032
+ let t = i.get(e);
4033
+ return t === void 0 && (t = r.length, r.push(e), i.set(e, t)), t;
4034
+ }, o = e.comments, s = [];
4035
+ for (let e = 0; e < o.length; e++) {
4036
+ let { comment: t, ref: n } = o[e];
4037
+ t.isNote() ? s.push({
4038
+ ref: n,
4039
+ authorId: a(t.getAuthor()?.getDisplayName() ?? ""),
4040
+ content: t.getRichContent() ?? t.getContent()
4041
+ }) : s.push({
4042
+ ref: n,
4043
+ authorId: a(`tc={${t.getId().toUpperCase()}}`),
4044
+ content: _t(t)
4045
+ });
4046
+ }
4047
+ n.start("authors");
4048
+ for (let e = 0; e < r.length; e++) n.start("author"), n.text(r[e]), n.end("author");
4049
+ n.end("authors"), n.start("commentList");
4050
+ for (let e = 0; e < s.length; e++) {
4051
+ let t = s[e];
4052
+ n.start("comment", {
4053
+ ref: t.ref,
4054
+ authorId: t.authorId,
4055
+ shapeId: 0
4056
+ }), n.start("text"), vt(n, t.content), n.end("text"), n.end("comment");
4057
+ }
4058
+ n.end("commentList"), n.end("comments"), n.close();
4059
+ }
4060
+ }(),
4061
+ new class extends L {
4062
+ constructor() {
4063
+ super({
4064
+ kind: "threadedComments",
4065
+ contentType: "application/vnd.ms-excel.threadedcomments+xml",
4066
+ relTypeUri: "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",
4067
+ path: "../threadedComments/threadedComment{n}.xml"
4068
+ });
4069
+ }
4070
+ async emit(e, t) {
4071
+ let n = t.getXMLWriter();
4072
+ n.decl(), n.start("ThreadedComments", {
4073
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",
4074
+ "xmlns:x": "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
4075
+ });
4076
+ let r = e.comments;
4077
+ for (let e = 0; e < r.length; e++) {
4078
+ let { comment: t, ref: i } = r[e];
4079
+ if (t.isNote()) continue;
4080
+ Bn(n, i, t.getId(), t.getAuthor()?.getId(), t.getCreationDate(), t.getContent(), null, t.isResolved());
4081
+ let a = t.getReplies();
4082
+ for (let e = 0; e < a.length; e++) {
4083
+ let r = a[e];
4084
+ Bn(n, i, r.getId(), r.getAuthor()?.getId(), r.getCreationDate(), r.getContent(), t.getId(), !1);
4085
+ }
4086
+ }
4087
+ n.end("ThreadedComments"), n.close();
4088
+ }
4089
+ }(),
4090
+ new class extends L {
4091
+ constructor() {
4092
+ super({
4093
+ kind: "persons",
4094
+ contentType: "application/vnd.ms-excel.person+xml",
4095
+ relTypeUri: "http://schemas.microsoft.com/office/2017/10/relationships/person",
4096
+ path: "persons/person.xml"
4097
+ });
4098
+ }
4099
+ async emit(e, t) {
4100
+ let n = t.getXMLWriter();
4101
+ n.decl(), n.start("personList", {
4102
+ xmlns: "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",
4103
+ "xmlns:x": "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
4104
+ });
4105
+ let r = e.toArray();
4106
+ for (let e = 0; e < r.length; e++) {
4107
+ let t = r[e];
4108
+ n.empty("person", {
4109
+ displayName: t.getDisplayName(),
4110
+ id: Vn(t.getId()),
4111
+ userId: t.getUserId() ?? t.getDisplayName(),
4112
+ providerId: t.getProviderId() ?? "None"
4113
+ });
4114
+ }
4115
+ n.end("personList"), n.close();
4116
+ }
4117
+ }(),
4118
+ new class extends L {
4119
+ constructor() {
4120
+ super({
4121
+ kind: "table",
4122
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
4123
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
4124
+ path: "../tables/table{n}.xml"
4125
+ });
4126
+ }
4127
+ async emit(e, t) {
4128
+ let n = t.getXMLWriter();
4129
+ n.decl();
4130
+ let r = {
4131
+ xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
4132
+ "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006",
4133
+ "mc:Ignorable": "xr xr3",
4134
+ "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
4135
+ "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"
4136
+ }, i = e.json, a = e.model;
4137
+ a.isShowHeaders(), r.id = ++Hn, r.name = i.name?.trim(), r.displayName = i.description ?? i.name, r.ref = e.ref, i.headerRowCount !== 1 && (r.headerRowCount = i.headerRowCount), i.totalsRowCount !== 0 && (r.totalsRowCount = i.totalsRowCount), i.totalsRowShown || a.isShowTotals() || (r.totalsRowShown = "0"), n.start("table", r), a.isShowHeaders() && Ut(t, n, a, i), ((e, t, n, r) => {
4138
+ let i = r.columns, a = i ? i.length : 0;
4139
+ if (a !== 0) {
4140
+ t.start("tableColumns", { count: a });
4141
+ for (let o = 0; o < a; o++) {
4142
+ let a = i[o];
4143
+ typeof a == "string" && (a = { name: a });
4144
+ let s = {};
4145
+ s.id = o + 1, s.name = a.name ?? `Column${o + 1}`;
4146
+ let c = null, l = a.totalsRowFormula;
4147
+ if (typeof l == "number") {
4148
+ let e = Wn.get(l);
4149
+ e ? s.totalsRowFunction = e : c = `SUBTOTAL(${l},${r.name?.trim()}[${s.name}])`;
4150
+ } else l && (c = Un(e, n, o, l.startsWith("=") ? l.substring(1) : l));
4151
+ c && (s.totalsRowFunction = "custom"), a.totalsRowLabel && (s.totalsRowLabel = a.totalsRowLabel);
4152
+ let u = a.calculatedColumnFormula ? Un(e, n, o, a.calculatedColumnFormula) : null;
4153
+ (c || u) && (t.start("tableColumn", s), u && (t.start("calculatedColumnFormula"), t.text(u), t.end("calculatedColumnFormula"))), c && (t.start("totalsRowFormula"), t.text(c), t.end("totalsRowFormula")), c || u ? t.end("tableColumn") : t.empty("tableColumn", s);
4154
+ }
4155
+ t.end("tableColumns");
4156
+ }
4157
+ })(t, n, a, i), ((e, t, n) => {
4158
+ let r = {
4159
+ name: n.getStyle().getName(),
4160
+ showFirstColumn: n.isShowHighlightFirstColumn() ? "1" : "0",
4161
+ showLastColumn: n.isShowHighlightLastColumn() ? "1" : "0",
4162
+ showRowStripes: n.isShowBandedRows() ? "1" : "0",
4163
+ showColumnStripes: n.isShowBandedColumns() ? "1" : "0"
4164
+ };
4165
+ t.empty("tableStyleInfo", r);
4166
+ })(0, n, a), n.end("table"), n.close();
4167
+ }
4168
+ }(),
4169
+ new class extends L {
4170
+ constructor() {
4171
+ super({
4172
+ kind: "externalLink",
4173
+ contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml",
4174
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",
4175
+ path: "../externalLinks/externalLink{n}.xml"
4176
+ });
4177
+ }
4178
+ async emit(e, t) {
4179
+ let n = t.getXMLWriter(), r = e.sources ?? [], i = r.findIndex((e) => e.role === "book");
4180
+ i < 0 && r.length > 0 && (i = 0);
4181
+ let a = null, o = null;
4182
+ for (let e = 0; e < r.length; e++) {
4183
+ let n = r[e], s = t.addExternal(n.type || "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath", n.target).relId;
4184
+ e === i ? a = s : n.role === "absoluteUrl" && (o = s);
4185
+ }
4186
+ a || t.log("External book has no path relationship; Excel cannot locate its source.", e.sheetNames), n.decl();
4187
+ let s = { xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" };
4188
+ (e.mceIgnorable || o) && (s["xmlns:mc"] = "http://schemas.openxmlformats.org/markup-compatibility/2006", s["mc:Ignorable"] = "x14 xxl21", s["xmlns:x14"] = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main", s["xmlns:xxl21"] = "http://schemas.microsoft.com/office/spreadsheetml/2021/extlinks2021"), n.start("externalLink", s);
4189
+ let c = { "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships" };
4190
+ a && (c["r:id"] = a), n.start("externalBook", c), o && (n.start("xxl21:alternateUrls"), n.empty("xxl21:absoluteUrl", { "r:id": o }), n.end("xxl21:alternateUrls")), function(e, t) {
4191
+ let n = t.sheetNames, r = n ? n.length : 0;
4192
+ if (r !== 0) {
4193
+ e.start("sheetNames");
4194
+ for (let t = 0; t < r; t++) e.empty("sheetName", { val: n[t] });
4195
+ e.end("sheetNames");
4196
+ }
4197
+ }(n, e), function(e, t) {
4198
+ let n = t.definedNames, r = n ? n.length : 0;
4199
+ if (r !== 0) {
4200
+ e.start("definedNames");
4201
+ for (let t = 0; t < r; t++) {
4202
+ let r = n[t], i = {
4203
+ name: r.name,
4204
+ refersTo: r.refersTo
4205
+ };
4206
+ r.sheetIndex !== void 0 && (i.sheetId = "" + r.sheetIndex), e.empty("definedName", i);
4207
+ }
4208
+ e.end("definedNames");
4209
+ }
4210
+ }(n, e), function(e, t) {
4211
+ let n = t.sheetDataSet, r = n ? n.length : 0;
4212
+ if (r !== 0) {
4213
+ e.start("sheetDataSet");
4214
+ for (let t = 0; t < r; t++) {
4215
+ let r = n[t], i = { sheetId: "" + r.sheetIndex };
4216
+ r.refreshError && (i.refreshError = "1");
4217
+ let a = r.data, o = a ? a.length : 0;
4218
+ if (o !== 0) {
4219
+ e.start("sheetData", i);
4220
+ for (let t = 0; t < o; t++) {
4221
+ let [n, r] = a[t];
4222
+ e.start("row", { r: "" + (n + 1) });
4223
+ let i = r.length;
4224
+ for (let t = 0; t < i; t++) {
4225
+ let [i, a] = r[t], o = a.length;
4226
+ for (let t = 0; t < o; t++) Kn(e, n, i + t, a.at(t));
4227
+ }
4228
+ e.end("row");
4229
+ }
4230
+ e.end("sheetData");
4231
+ } else e.empty("sheetData", i);
4232
+ }
4233
+ e.end("sheetDataSet");
4234
+ }
4235
+ }(n, e), n.end("externalBook"), n.end("externalLink"), n.close();
4236
+ }
4237
+ }(),
4238
+ new class extends L {
4239
+ constructor() {
4240
+ super({
4241
+ kind: "chart",
4242
+ contentType: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
4243
+ relTypeUri: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
4244
+ path: "../charts/chart{n}.xml"
4245
+ });
4246
+ }
4247
+ async emit(e, t) {
4248
+ let n = t.getXMLWriter();
4249
+ n.decl(), n.pushDefaultNamespace("c"), n.start("chartSpace", {
4250
+ "xmlns:c": "http://schemas.openxmlformats.org/drawingml/2006/chart",
4251
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
4252
+ "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
4253
+ "xmlns:c16r2": "http://schemas.microsoft.com/office/drawing/2015/06/chart"
4254
+ }), n.empty("date1904", { val: "0" }), n.empty("lang", { val: "en-US" }), n.empty("roundedCorners", { val: "0" }), ((e, t) => {
4255
+ t.start("mc:AlternateContent", { "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006" }), t.start("mc:Choice", {
4256
+ Requires: "c14",
4257
+ "xmlns:c14": "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"
4258
+ }), t.empty("c14:style", { val: "102" }), t.end("mc:Choice"), t.start("mc:Fallback"), t.empty("c:style", { val: "2" }), t.end("mc:Fallback"), t.end("mc:AlternateContent");
4259
+ })(0, n, e.model, e.json), ((e, t, n, r, i) => {
4260
+ t.start("chart"), ((e, t, n, r, i) => {
4261
+ t.start("title"), t.empty("overlay", { val: "0" }), Ct(e, n, i, "spPr", !0), t.end("title"), t.empty("autoTitleDeleted", { val: "0" });
4262
+ })(e, t, n, 0, i), ((e, t, n, r, i) => {
4263
+ t.start("plotArea"), t.empty("layout"), Ct(e, n, i, "spPr", !0), t.end("plotArea");
4264
+ })(e, t, n, 0, i), t.empty("plotVisOnly", { val: "1" }), t.empty("dispBlanksAs", { val: "gap" }), t.empty("showDLblsOverMax", { val: "0" }), t.end("chart");
4265
+ })(t, n, e.styles, e.model, e.json), ((e, t) => {
4266
+ t.start("printSettings"), t.empty("headerFooter"), t.empty("pageMargins", {
4267
+ b: "0.75",
4268
+ l: "0.7",
4269
+ r: "0.7",
4270
+ t: "0.75",
4271
+ header: "0.3",
4272
+ footer: "0.3"
4273
+ }), t.empty("pageSetup"), t.end("printSettings");
4274
+ })(0, n, e.model, e.json), n.end("chartSpace"), n.popDefaultNamespace(), n.close(), t.addPart("chartStyle", { styles: e.styles }), t.addPart("chartColors", { styles: e.styles });
4275
+ }
4276
+ }(),
4277
+ new class extends L {
4278
+ constructor() {
4279
+ super({
4280
+ kind: "chartStyle",
4281
+ contentType: "application/vnd.ms-office.chartstyle+xml",
4282
+ relTypeUri: "http://schemas.microsoft.com/office/2011/relationships/chartStyle",
4283
+ path: "./style{n}.xml"
4284
+ });
4285
+ }
4286
+ async emit(e, t) {
4287
+ let n = t.getXMLWriter();
4288
+ n.pushDefaultNamespace("cs"), n.start("chartStyle", {
4289
+ "xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
4290
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
4291
+ id: "297"
4292
+ }), ((e, t, n, r) => {
4293
+ let i = n.length;
4294
+ for (let a = 0; a < i; a++) {
4295
+ let i = n[a];
4296
+ i.empty ? t.empty(i.type, i.mods) : (t.start(i.type, i.mods), qn(0, t, r, "lnRef", i.lineRef, "0"), qn(0, t, r, "fillRef", i.fillRef, "0"), qn(0, t, r, "effectRef", i.effectRef, "0"), qn(0, t, r, "fontRef", i.fontRef, "minor"), Ct(e, r, i, "spPr"), Sn(e, 0, i.defRPr), Cn(e, r, i.bodyPr), t.end(i.type));
4297
+ }
4298
+ })(t, n, Jn, e.styles), n.end("chartStyle"), n.close();
4299
+ }
4300
+ }(),
4301
+ new class extends L {
4302
+ constructor() {
4303
+ super({
4304
+ kind: "chartColors",
4305
+ contentType: "application/vnd.ms-office.chartcolorstyle+xml",
4306
+ relTypeUri: "http://schemas.microsoft.com/office/2011/relationships/chartColorStyle",
4307
+ path: "./colors{n}.xml"
4308
+ });
4309
+ }
4310
+ async emit(e, t) {
4311
+ let n = t.getXMLWriter();
4312
+ n.pushDefaultNamespace("cs"), n.start("cs:colorStyle", {
4313
+ "xmlns:cs": "http://schemas.microsoft.com/office/drawing/2012/chartStyle",
4314
+ "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main",
4315
+ meth: "cycle",
4316
+ id: "10"
4317
+ }), n.empty("a:schemeClr", { val: "accent1" }), n.empty("a:schemeClr", { val: "accent2" }), n.empty("a:schemeClr", { val: "accent3" }), n.empty("a:schemeClr", { val: "accent4" }), n.empty("a:schemeClr", { val: "accent5" }), n.empty("a:schemeClr", { val: "accent6" }), ((e, t, n) => {
4318
+ let r = n.length;
4319
+ for (let e = 0; e < r; e++) {
4320
+ let r = n[e], i = {}, a = r[0], o = r[1];
4321
+ a || o ? (t.start("variation", i), a && t.empty("a:lumMod", { val: a }), o && t.empty("a:lumOff", { val: o }), t.end("variation")) : t.empty("variation", i);
4322
+ }
4323
+ })(0, n, Yn), n.end("cs:colorStyle"), n.close();
4324
+ }
4325
+ }()
4326
+ ], Zn = (e) => {
4327
+ let t = e.getPart("xl/_rels/workbook.xml.rels");
4328
+ if (!t) return null;
4329
+ let n = /* @__PURE__ */ new Map();
4330
+ for (let e of C(t.data)) {
4331
+ if (!e.id) continue;
4332
+ let t = e.external ? e.target : Oe(e.target.startsWith("/") ? e.target : "xl/" + e.target);
4333
+ n.set(e.id, {
4334
+ type: e.type,
4335
+ target: t,
4336
+ external: e.external
4337
+ });
4338
+ }
4339
+ return n;
4340
+ }, Qn = (e) => {
4341
+ let t = e.getPart("xl/workbook.xml");
4342
+ return t ? new TextDecoder("utf-8").decode(t.data) : null;
4343
+ }, $n = (e) => {
4344
+ let t = er.get(e);
4345
+ if (t !== void 0) return t;
4346
+ let n = e.getPart("xl/workbook.xml"), r = n ? new TextDecoder("utf-8").decode(n.data) : null;
4347
+ return er.set(e, r), r;
4348
+ }, er = /* @__PURE__ */ new WeakMap(), tr = async (e, t) => {
4349
+ let n = new Ge();
4350
+ for (let e of Xn) n.register(e);
4351
+ let r = nr, i = xe.createUint8Array({
4352
+ lastModDate: new Date(1899, 11, 29, 19, 0, 0),
4353
+ level: r
4354
+ }), a = t?.format === "Excel" || t?.format === "ExcelMacro" ? S(e) : null, o = /* @__PURE__ */ new Map(), s = a ? ((e) => {
4355
+ let t = e.getPart("xl/workbook.xml");
4356
+ if (!t) return null;
4357
+ let n = new TextDecoder("utf-8").decode(t.data.subarray(0, 4096)).match(/<fileVersion\b([^>]*)\/?>/);
4358
+ if (!n) return null;
4359
+ let r = {};
4360
+ for (let e of n[1].matchAll(/([\w:]+)="([^"]*)"/g)) r[e[1]] = e[2];
4361
+ return Object.keys(r).length > 0 ? r : null;
4362
+ })(a) : null;
4363
+ s && (t?.macroEnabled || delete s.codeName, o.set(it, s));
4364
+ let c = a ? ((e) => {
4365
+ let t = $n(e)?.match(/<calcPr\b[^>]*?\bcalcId="([^"]*)"/);
4366
+ return t ? t[1] : null;
4367
+ })(a) : null;
4368
+ c !== null && o.set("calcId", c);
4369
+ let l = a ? ((e) => {
4370
+ let t = $n(e)?.match(/<ext\b[^>]*>\s*<xcalcf:calcFeatures\b[\s\S]*?<\/xcalcf:calcFeatures>\s*<\/ext>/);
4371
+ return t ? t[0] : null;
4372
+ })(a) : null;
4373
+ l !== null && o.set("calcFeatures", l);
4374
+ let u = a ? ((e) => {
4375
+ let t = Qn(e);
4376
+ if (!t) return null;
4377
+ let n = /<externalReferences\b[^>]*>([\s\S]*?)<\/externalReferences>/.exec(t);
4378
+ if (!n) return null;
4379
+ let r = [...n[1].matchAll(/<externalReference\b[^>]*\sr:id="([^"]*)"/g)].map((e) => e[1]);
4380
+ if (r.length === 0) return null;
4381
+ let i = Zn(e);
4382
+ return i ? r.map((e) => {
4383
+ let t = i.get(e);
4384
+ return t && !t.external ? t.target : null;
4385
+ }) : null;
4386
+ })(a) : null;
4387
+ u && o.set(ot, u);
4388
+ let d = a ? ((e) => {
4389
+ let t = Qn(e), n = t ? Zn(e) : null;
4390
+ if (!t || !n) return null;
4391
+ let r = /* @__PURE__ */ new Map();
4392
+ for (let e of t.matchAll(/<sheet\b([^>]*)\/?>/g)) {
4393
+ let t = /\bsheetId="(\d+)"/.exec(e[1])?.[1], i = /\br:id="([^"]*)"/.exec(e[1])?.[1];
4394
+ if (!t || !i) continue;
4395
+ let a = n.get(i);
4396
+ a && !a.external && a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" && r.set(parseInt(t, 10), a.target);
4397
+ }
4398
+ return r.size > 0 ? r : null;
4399
+ })(a) : null;
4400
+ d && o.set(at, d), o.set(be, /* @__PURE__ */ new Map());
4401
+ let f = [], p = new Ue(i, n, {
4402
+ strictDuplicateChildren: !0,
4403
+ onPartEmitted: t?.onPartEmitted,
4404
+ onWarning: (e, t, n) => {
4405
+ f.push([
4406
+ e,
4407
+ t,
4408
+ n
4409
+ ]);
4410
+ },
4411
+ mapState: o,
4412
+ sourcePackage: a,
4413
+ macroEnabled: t?.macroEnabled ?? !1
4414
+ });
4415
+ p.addPart("workbook", e, "/xl/workbook.xml"), await p.waitEmit(), p.addPart("propsCore", {}), p.addPart("propsApp", { model: e });
4416
+ let m = await p.build(), h = t?.progress?.onWarning;
4417
+ if (f.length && h) {
4418
+ let e = /* @__PURE__ */ new Set();
4419
+ for (let [n, r, i] of f) {
4420
+ let a = i ?? n;
4421
+ e.has(a) || (e.add(a), h.call(t.progress, n, r));
4422
+ }
4423
+ }
4424
+ return m.byteOffset === 0 && m.byteLength === m.buffer.byteLength ? m.buffer : m.slice().buffer;
4425
+ }, nr = 1;
4426
+ export { tr as writeXLSX };