@sheetxl/mcp 0.8.0-beta.15 → 0.8.0-beta.16
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.
- package/LICENSE.md +8 -7
- package/assets/{OVRdpPUzR0-ueTxE.js → -PtBguqpLi7Nr4Df.js} +2 -2
- package/assets/{BOPsJmq7v7HOKUkO.js → 2GLqCzpAJP6jbaRx.js} +12 -12
- package/assets/{BPwmBu_aouERJjiW.js → 3_NofB4A4Qhl-4YY.js} +2 -2
- package/assets/{CGBGyaCGdlZFQYK0.js → 3t-I20nDzFHBd5UJ.js} +2 -2
- package/assets/{hulrR0PldUxMJm_F.js → 4vS8pASPZSU7QcRZ.js} +4 -4
- package/assets/{Bh0PNKlrR4VAqnP8.js → 5B_tapYOcjOv1wGO.js} +35528 -30074
- package/assets/{FS9NbEKgQvz5wqvZ.js → 8NrxfSWBHDaEJvhz.js} +2 -2
- package/assets/{oxjm7Yr7u7MeaO5P.js → 9MXt8KXdWlbEJNc2.js} +2 -2
- package/assets/{CduNzsdbTigxH-ZK.js → AjWB-QdIkr07kToW.js} +189 -189
- package/assets/{DvUUArnZwoYOKOuk.js → B16N6VSLY5HPgVkD.js} +2 -2
- package/assets/{C0CiMKC3lWK1z9p5.js → B2YEEPHIkNcezk9T.js} +3 -3
- package/assets/{CNz3LdmvsOEJoLO9.js → B3MqN3t5naY3moOk.js} +2 -2
- package/assets/BBPjYcS8XKQREith.js +199 -0
- package/assets/{B4VnJacrzr1x4PHR.js → BCSRsSAEPlwR59H5.js} +5 -5
- package/assets/{CMK6tIDVqYYvK4GZ.js → BIUUGUhypimIDg2a.js} +2 -2
- package/assets/{iujMYIEPx_v3sdPf.js → BNrpvJZtIL0Ex_wE.js} +996 -995
- package/assets/{DA_ar3QKLKtJ9fJD.js → BR66nPIzyzlOcP10.js} +2 -2
- package/assets/{CvngwB17_ve4W49b.js → BRLA4pJWiYdpW-69.js} +73 -73
- package/assets/{Crt2kLdGIlBHANgg.js → BUAq-ENCmL0XGLIu.js} +2 -2
- package/assets/{Bn8D2bebQ2tFfwQt.js → BYqyNLuwXl7GKuzh.js} +43 -41
- package/assets/{ZuYfVKlp41IJnrOS.js → BZbxPclVVopktv3l.js} +2 -2
- package/assets/{Cf9LpgZz-W5blzy_.js → B_nQLUWaxp-Q1IfV.js} +3 -3
- package/assets/{BbcUxIZe3YXywsQR.js → BbDKWV_FQAICqZjP.js} +2 -2
- package/assets/{B2udpZ-uIaql3AUh.js → BbXlmp8W_cbr75FN.js} +6 -6
- package/assets/{CxjchwpiqxPM1XKd.js → BdMebk9YSA0oxQ_d.js} +70 -70
- package/assets/{JO3zH9hupFSV6vj2.js → Bdt9nQs8gDIzu_IG.js} +2 -2
- package/assets/{Cf2dcwmmmf13Rywg.js → BiE9M6RctwQ339_7.js} +2 -2
- package/assets/{BJxfinOazQqqByc-.js → BiGm1tKvxUh8oWbD.js} +2 -2
- package/assets/{DH7sGHzxUqIQkDnd.js → BjDsx_FHl0mShqHX.js} +2 -2
- package/assets/{DB-tkqI6wFXDKEfB.js → BlIrJwQGEASCgJdZ.js} +2 -2
- package/assets/{DD8HNAUFroTCuD-b.js → BlWfQ5HPEehB_lPz.js} +3288 -2130
- package/assets/BpgPKKZwxXklRyo7.js +7 -0
- package/assets/{D7oUtYjetuykGhQ5.js → BrtLeTsrulaU6osB.js} +2 -2
- package/assets/{LyLlBk--VJD2V-f8.js → BsFWmVYPrLyh5Dre.js} +34 -34
- package/assets/{DJiLWtmPR2OQNjzi.js → BtNRIFE92ka4hATo.js} +2 -2
- package/assets/{DKLm4nWzynGw1Kr9.js → BuhHuKVWppW4L8AV.js} +2 -2
- package/assets/{C4z2IilWTuu2TWXw.js → C-AIgWmHugqMcl9J.js} +3 -3
- package/assets/{U1XXGEPuuqIAzYl1.js → C-gN7uBg-MWHRo4g.js} +2 -2
- package/assets/{vZZi_iKYHm05gAye.js → C0JSC9gVwR1QxopD.js} +2 -2
- package/assets/{Cfhv_Yw_LT8VzAMt.js → C2dG4GHThf9O-IJy.js} +2 -2
- package/assets/{Cg51xaLRUkVOMdCZ.js → C3Wibs7QGFZ1FI7W.js} +2 -2
- package/assets/{BuUEsifnQALe49uk.js → C75i_5ip7OhGkuiF.js} +2 -2
- package/assets/{DDnwKPJSznyfYDZS.js → C95HXhZkkhnUx_aE.js} +3 -3
- package/assets/{CWl6oHiJxkNKRixk.js → CAEhAL7-0FG7jdzN.js} +2 -2
- package/assets/{D-ffk16w8c5w0mxI.js → CAMrW5ypKhgn105y.js} +2 -2
- package/assets/{B-MqXm_7luDLwazY.js → CBPkPTmeaEokFPSI.js} +2 -2
- package/assets/{xnhBSX6lAcmBM65y.js → CDqG64rXHp9-2tXr.js} +2 -2
- package/assets/{ClNQN3vEg5b5qUDp.js → CFdJvXLSbUrvNera.js} +2435 -2447
- package/assets/{PpFbmF0DFeUdpb9I.js → CG8zvnxueimOY7wm.js} +2 -2
- package/assets/{BsQZI1vXTRE63Zy-.js → CIqJdIUKSLZkNwHy.js} +345 -235
- package/assets/{_fUXIv6nKvgZkhxn.js → CJa8JVvKGVBz8Q7q.js} +3 -3
- package/assets/{CwPBmcY6xSP8dNlh.js → CK9h6iDOreaI8GEt.js} +12 -12
- package/assets/CL1-ziDI0aAaVbhJ.js +7 -0
- package/assets/{C7ONfuYIWRmDu_vs.js → CVRc6jQcH155Z89u.js} +2 -2
- package/assets/{B9US2ZrF93KOjmAx.js → CVbRpT7QPHOMgwTx.js} +2 -2
- package/assets/CW-ivE6pl3V7vKuT.js +2563 -0
- package/assets/{F_f0jJqM5MrXGbwC.js → CX-6eYkcr5y0VmQm.js} +4 -4
- package/assets/{BlPubAFi7DY7VrAo.js → CZepo1lDTQp1myg6.js} +2 -2
- package/assets/{D8J14MLlN2HRXdXB.js → C_0RM0w6Pw70Bx_Y.js} +2 -2
- package/assets/{C2OrZ8LZ-TI6eYG0.js → Ci7-PIIhZwb2mVv5.js} +2 -2
- package/assets/{BleMG0hAQgjE8fTa.js → Cl98sBOj9GM2XnFe.js} +3 -3
- package/assets/{DwWngYJTgC0KLbih.js → CoIjAX2gECGb3Wxl.js} +2 -2
- package/assets/{DcWTBOi_iBFc6U4J.js → Co_y6GfwJTYtOmlt.js} +8 -8
- package/assets/{BQMDOjNBMjAx9WiW.js → CrwtgrD7BbXyCkx0.js} +2 -2
- package/assets/{CJ5WQnaoCsdr5gf4.js → CsjjeeOHE2624pGt.js} +2 -2
- package/assets/Ct5VTtdW77k-WcP_.js +529 -0
- package/assets/{DwLZpYUp85UHBE3H.js → CvJkwRgwm80S2bcd.js} +2 -2
- package/assets/{fDMpDhXp36CatF-G.js → D-irgQZ2WmkP9dnK.js} +2 -2
- package/assets/{BFdeov2e_xUQPEY_.js → D1g6IOzdvInVLV-x.js} +7 -7
- package/assets/{Btys7KwtvV3hz2F6.js → D2YdqNWXwSHJMPbA.js} +109 -109
- package/assets/{BQbF1RkUH8WyXqSD.js → D3bxrF1Ys2GSVfQH.js} +25 -19
- package/assets/{wfVh0olISLRWdv9Q.js → D7iU4kaxzl_PojNt.js} +2 -2
- package/assets/{DTfl-4Iboi6TQU5m.js → D7ibkNIu_Pn4TeBD.js} +4 -4
- package/assets/DBANZf_eAzaCFdIj.js +4676 -0
- package/assets/{DoILAmhKUOlKWRVw.js → DBMZF6PRHCko9K9R.js} +2 -2
- package/assets/{BFXeoFUbuc4IKTz9.js → DEIkGoOZ_WeuY0Lj.js} +2 -2
- package/assets/{xmTQJJVyCrcq77WR.js → DFAqI-o57Kd_Azlt.js} +2 -2
- package/assets/{BtjqpAKczftx91BQ.js → DFn_thWGK0_EZI5k.js} +2 -2
- package/assets/{DlBdhv6NHgrNp5Yo.js → DFvs1LVzXKm1N5M2.js} +3 -3
- package/assets/{DVchxwp6w6lu2Ihu.js → DJdRl2yX9DP_D8kh.js} +3 -3
- package/assets/{BG5kgbDRXMc0re6W.js → DKRa_Oc4XqB3DABB.js} +9 -9
- package/assets/{BZPTaa0WjpoUAbgZ.js → DLhlBqwsDnmscAuL.js} +2 -2
- package/assets/{BRzp6DEIYUgM3NkN.js → DMhtIFfkX-DZT_e3.js} +4 -4
- package/assets/{DpdHDTFOeuzDVNEe.js → DNhfziNrJGdL8BYs.js} +78 -77
- package/assets/{jadLBUNBVR9mbZ35.js → DOZ40EyxD3m0gCos.js} +809 -494
- package/assets/{SHZe9VOU1prGs1F9.js → DQcus4X_kTKIIyX6.js} +2 -2
- package/assets/{C7Z1li2XjWi6bkrp.js → DR9xHYH6v5G0lOqf.js} +4 -4
- package/assets/{DsCI_ZYm_jDjXF3J.js → DTLbKr_XIJMwQJmk.js} +52 -52
- package/assets/{_d5XJ7dn1CKKYrep.js → DaILIYfy-jPVTXjz.js} +3 -3
- package/assets/{S16s2h9qoYVBlVEa.js → Dd8CHUZz7xuYTfp-.js} +1444 -1356
- package/assets/{B5lHOOQ_rkP4Mi2r.js → DdrsYdX3bLixdb_9.js} +2 -2
- package/assets/DfWWAHOjmhqvN3m_.js +7166 -0
- package/assets/{9U9XCqqdn-q3i2fj.js → DfzLOnWTNL_2J90y.js} +2 -2
- package/assets/{BTQhJQ3e0hsiousD.js → Dg4JXbd1yPGNZOtL.js} +2 -2
- package/assets/Di4ehJD7muvtcrN3.js +169 -0
- package/assets/{BbAmA46MhQSu3ZF_.js → DmLbqbAez7Dzwyl7.js} +2 -2
- package/assets/{CudNpUD78SrtJIiy.js → Dp-dLoOaBndV2N5i.js} +3 -3
- package/assets/DsTi7zHk_Xl37bAD.js +14 -0
- package/assets/{Diee6f_qAmcZBd2_.js → DvFwVzuc5YfagNnH.js} +2 -2
- package/assets/{D0CHDsemn0S31ltt.js → Dy67BUF2yd8VRPwL.js} +2 -2
- package/assets/{LEJp05fjmflKgyqF.js → DzkccbbE6iXMqQDO.js} +451 -447
- package/assets/{B7gUyrfLln3TiyKM.js → Gqh12ggLm5KlvN3v.js} +2 -2
- package/assets/{BjqQjxBuoXza8oqg.js → JC8UUcu6m23qqrr3.js} +3 -4
- package/assets/{ChWpsFGl-BYOnX_A.js → LwFDS0HxPZKiiEnN.js} +2 -2
- package/assets/{BeLr36oL3jmeXFFi.js → POdlv6cpSx6ftJxx.js} +2 -2
- package/assets/{CMWAsUQ66V8fYrME.js → QVWayvB03YMyTKt3.js} +3 -3
- package/assets/{Dz8UUJ7Xc2oN5PBG.js → SB2aKOIVln0EkgXR.js} +2 -2
- package/assets/SaCo3me4_hw2b1L4.js +2039 -0
- package/assets/{CecTe22WURiXbVdY.js → TNQaiw20sEAEUiK5.js} +386 -372
- package/assets/{jPUOH4FHF4b-rapv.js → W2FU69Pfo4chpqtk.js} +2 -2
- package/assets/{CXHslDxkWCuEcCSQ.js → YXC__Myl-BuIFW6s.js} +2 -2
- package/assets/{DPCKMM7sgWbrtB8z.js → Z01wJImjl6lBMpf4.js} +2 -2
- package/assets/{C97xDe_wBbLZh_uW.js → h6EQSu5n2vTsu2yd.js} +2 -2
- package/assets/{FzNG48GE_wso6RII.js → iULnLPcNKVpz00r7.js} +2 -2
- package/assets/{DEW2GxfGYqVFvrfg.js → iqQWGoJaPha0_8lU.js} +2 -2
- package/assets/{BrcQmHcE7Hcr1erJ.js → nDmE2I07HvkpRdR0.js} +2 -2
- package/assets/{Bg95xYj5siqhHVEz.js → nmB0nnkFQf5NWo0i.js} +3 -3
- package/assets/{BCy1zP97fsiIcvj6.js → pQUJKbHGetb7dcOr.js} +2 -2
- package/assets/{B2Ek-DWpZMGJ0V1Z.js → rfwqMukKbJBeJBuC.js} +3 -3
- package/assets/{By-7OWXShMlFFejV.js → soSlr334Fv1j5t2m.js} +2 -2
- package/index.js +2010 -1944
- package/lib.js +2 -2
- package/licenses/dependencies.txt +259 -194
- package/package.json +4 -9
- package/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/screenshot-page/assets/{CSUd8n1H0VBfREnk.js → -N4OYIMgf6f5vgNy.js} +1 -1
- package/screenshot-page/assets/{B4PbXdzBe9BsoZ0e.js → B7eQ3rE-7Vayb_4O.js} +1 -1
- package/screenshot-page/assets/B8i4Sr2kMQAXp0rb.js +4 -0
- package/screenshot-page/assets/{DQWHkaQeNXft9j8b.js → B8qybUclSjEYP5FJ.js} +2 -2
- package/screenshot-page/assets/BIHbD4jMsk3NetOd.js +1 -0
- package/screenshot-page/assets/BIrVK5hdDCUYmxGO.js +1 -0
- package/screenshot-page/assets/{l32n8O_A78Qqduv3.js → BJ2r2WfEL3SgkBAX.js} +1 -1
- package/screenshot-page/assets/BJviQwDXR5L6l1DA.js +1 -0
- package/screenshot-page/assets/BM78thqEW6HwXFAK.js +13 -0
- package/screenshot-page/assets/{BcOdl17EeFSxnAiq.js → BMf827t1Ul65MHd5.js} +1 -1
- package/screenshot-page/assets/BMwQInar0xVS5FRu.js +1 -0
- package/screenshot-page/assets/{BUjI304IvdJnFXH3.js → BU5S8KEzPmIA_Flm.js} +1 -1
- package/screenshot-page/assets/{D6Jpaz2YkhOfzxDB.js → BYQZ8o8k3-MDoNat.js} +1 -1
- package/screenshot-page/assets/{CZf9s6otzzoaBlSs.js → BftXEPOuf5Uwxpud.js} +1 -1
- package/screenshot-page/assets/Bir0SSOHX0w2yo8h.js +1 -0
- package/screenshot-page/assets/{CykecBozGGFl26KA.js → Btgo0VFTT0JxuaP3.js} +74 -68
- package/screenshot-page/assets/C2H2lX8eyKpxpP6M.js +2 -0
- package/screenshot-page/assets/{B-KIwD5F_5S-NsPg.js → C71ZZMVLfHdPl441.js} +1 -1
- package/screenshot-page/assets/CFfgJlXaIS8QMx5O.js +1 -0
- package/screenshot-page/assets/{DGXDfjkGZjMRAXPg.js → CN8u05DjKwNHbUHN.js} +1 -1
- package/screenshot-page/assets/CQFj5AGXfIA9z9zI.js +1 -0
- package/screenshot-page/assets/{gG0AFZ45VxS_moMw.js → CRsTnamLrPN5-Dsi.js} +1 -1
- package/screenshot-page/assets/CYfkL98Zu43S8-50.js +42 -0
- package/screenshot-page/assets/{DXQLzGmxoyN3kfQi.js → CZa1rha3RnQUWyOk.js} +7 -7
- package/screenshot-page/assets/{CpbohdgEaEsVDi9J.js → C_vPl50T1L5HWnhv.js} +1 -1
- package/screenshot-page/assets/{CbUDukmvDZmVfhJH.js → CfkssmHURDicfYvR.js} +1 -1
- package/screenshot-page/assets/{Bj-vfAT28PK-tWWa.js → CguXw0IcKNPbmAbj.js} +2 -2
- package/screenshot-page/assets/{DmbuCapSSCYIa3yk.js → ClzJdxlUDDtBYjH8.js} +1 -1
- package/screenshot-page/assets/{BTboCICZ-951XWsi.js → CqyMYduWKFvmMs_Z.js} +1 -1
- package/screenshot-page/assets/CzsoLbEIUVK5ia1C.js +1 -0
- package/screenshot-page/assets/D2IHCJ1QWDKwmhge.js +1 -0
- package/screenshot-page/assets/D6CzedWHXTesD55R.js +1 -0
- package/screenshot-page/assets/D7biuwkvm3zAwsBa.js +39 -0
- package/screenshot-page/assets/D8s3sJnhFxbI3Dqn.js +1 -0
- package/screenshot-page/assets/{hp_-JA1DMK4Yoztn.js → DDkL9PZPXAggW2Yr.js} +19 -19
- package/screenshot-page/assets/DEpn6VGd30cHEJOS.js +1 -0
- package/screenshot-page/assets/{CIged53b3hHKxa-o.js → DLFFFQjTi5Ji1940.js} +1 -1
- package/screenshot-page/assets/DMxrNtfw275en7pm.js +1 -0
- package/screenshot-page/assets/{CqR3hGrC956TkCMj.js → DRncpwDkZZX8rL9S.js} +1 -1
- package/screenshot-page/assets/DTrnAtpccj55fGg5.js +1 -0
- package/screenshot-page/assets/D_kJ3WunvjIINcHC.js +1 -0
- package/screenshot-page/assets/{BFaiQZKle44Rhyou.js → D_rtIYQ7FDC2CoEn.js} +1 -1
- package/screenshot-page/assets/{Bf7xq8PyF4ohjMzP.js → Db6bZVJ-184DJIoe.js} +2 -2
- package/screenshot-page/assets/{DyLWQxXXTw5uwPVy.js → DeyRZ5rprDbRbuf4.js} +1 -1
- package/screenshot-page/assets/{D47ePD4x1lVazNdl.js → DgtqX4DiBgkepVZZ.js} +1 -1
- package/screenshot-page/assets/DhB6GjSJIeTmIODk.js +1 -0
- package/screenshot-page/assets/Dn5PwRw7rrTKNnql.js +586 -0
- package/screenshot-page/assets/{TfhknTx8vxQkw4zV.js → Dq7wGcTrNIshovlT.js} +2 -2
- package/screenshot-page/assets/{BUGXf2DEBog16Slb.js → DqXO_Zw1Cp7rAQ04.js} +2 -2
- package/screenshot-page/assets/{21oAESJyBGXeHegm.js → DtihumgXQ7ETaN0A.js} +2 -2
- package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +2 -0
- package/screenshot-page/assets/DyiVrm8mEnEaoZHa.js +3 -0
- package/screenshot-page/assets/{BHqg55S-4_OoAu3P.js → LYyM_ig973jLdOU0.js} +2 -2
- package/screenshot-page/assets/TilS2JSBGVkd1za3.js +3 -0
- package/screenshot-page/assets/Tph2vYqw17-NBCtd.js +1 -0
- package/screenshot-page/assets/UKFgEuwI1UMhPqKF.js +2 -0
- package/screenshot-page/assets/XgsioU5Px1T5gKAY.js +1 -0
- package/screenshot-page/assets/cTMKPkmZF8FWQaMn.js +1 -0
- package/screenshot-page/assets/hlxJ87-H830aSZBQ.js +1 -0
- package/screenshot-page/assets/{DDQWM8rNYCYzKa9R.js → lgeNUp9cU20IAotv.js} +1 -1
- package/screenshot-page/assets/nM1r2xslndIMKlI2.js +2 -0
- package/screenshot-page/assets/{BSdFVGZNhU6YHbMI.js → rOzyaU7hqchMbhRL.js} +1 -1
- package/screenshot-page/index.html +12 -12
- package/screenshot-page/resources/locales/@sheetxl/sdk/de/model.msg.json +82 -1
- package/screenshot-page/resources/locales/@sheetxl/sdk/en/model.msg.json +80 -1
- package/types/scripting-api.json +9967 -9497
- package/types/scripting-enums.json +27 -0
- package/types/scripting.d.ts +2282 -166
- package/assets/BBb_3gEGzmEzbTIk.js +0 -359
- package/assets/BSxTn2BhkEEeF9x_.js +0 -2346
- package/assets/CWVWdbY1B1-WLl9k.js +0 -199
- package/assets/CZTSZL3T_f-vSXqM.js +0 -7
- package/assets/DaoSWy3EFlqpZaLr.js +0 -4437
- package/assets/Dht2mcOSyYlPY32b.js +0 -14
- package/assets/DkibD_CEVePaoj_y.js +0 -7
- package/assets/jiEe5eKV3BFPBWfi.js +0 -6294
- package/screenshot-page/assets/0MTaPYjKud2Q9QG9.js +0 -1
- package/screenshot-page/assets/B2MJPcMcsuv6FekC.js +0 -1
- package/screenshot-page/assets/BQfe-XTIOGeUnD9B.js +0 -1
- package/screenshot-page/assets/BTMW3ukmc44U2fy7.js +0 -1
- package/screenshot-page/assets/B_W2QroTKADz3ABp.js +0 -2
- package/screenshot-page/assets/BksaQEoZr5OWq-_d.js +0 -3
- package/screenshot-page/assets/BnoVwUBEor8NgQNs.js +0 -4
- package/screenshot-page/assets/BzQ5GyiXq8gTz-H-.js +0 -1
- package/screenshot-page/assets/C2Wh2h27c7FUb8Yk.js +0 -1
- package/screenshot-page/assets/C81mK8aZKZAAS-AB.js +0 -1
- package/screenshot-page/assets/Ca6nxdhEuLLty3d7.js +0 -2
- package/screenshot-page/assets/CwqNb7JYzC03lCj0.js +0 -1
- package/screenshot-page/assets/CzhH7lTYQrYGHct6.js +0 -1
- package/screenshot-page/assets/D66vSE1ConAuENmB.js +0 -586
- package/screenshot-page/assets/DCVUZ_ayOXFwV2d_.js +0 -3
- package/screenshot-page/assets/DFE-fKq5NV7_O8V6.js +0 -1
- package/screenshot-page/assets/DK_QSosKV62NDcuT.js +0 -42
- package/screenshot-page/assets/DTFRGj188QuLKEXw.js +0 -1
- package/screenshot-page/assets/DXWWyJlMSWgDFxs1.js +0 -10
- package/screenshot-page/assets/DZDRRw-62D6Zw7qs.js +0 -1
- package/screenshot-page/assets/DeAKjatTVaZ0u_FY.js +0 -1
- package/screenshot-page/assets/Dsx0NUmGIxS7SvZ8.js +0 -1
- package/screenshot-page/assets/IRtoU5oVgBWu9rnK.js +0 -2
- package/screenshot-page/assets/Q5EKmzoJZCE81Om-.js +0 -2
- package/screenshot-page/assets/VvqAh6BWzaD5OUPF.js +0 -1
- package/screenshot-page/assets/fGlPAximvsxzPzGA.js +0 -1
- package/screenshot-page/assets/rPOkVKdPbFpTG6AY.js +0 -1
- package/screenshot-page/assets/sHBomL5R4-_px8rD.js +0 -1
- package/screenshot-page/assets/skRJ2qjA7kcmnOsh.js +0 -39
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{K as e,Kt as t,W as n}from"./DuYb_otrRZZDq6-f.js";import{i as r}from"./BMf827t1Ul65MHd5.js";import{An as i,W as a,l as o,q as s}from"./D7biuwkvm3zAwsBa.js";var c=[`customMenu`,`description`,`help`,`statusBar`,`shortcutKey`],l=[`function`,`vbProcedure`,`xlm`,`publishToServer`,`workbookParameter`],u=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`,d=class extends Error{},f=()=>{throw new d},p={t:`z`,v:0},m=/<([snbdemx])((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/g,h=(e,t,n)=>{try{return _(e,t,n)}catch(e){if(e instanceof d)return null;throw e}},g=e=>{let t=i(e,`cacheSource`);if(!t||a(t.attributes).get(`type`)!==`worksheet`)return;let n=i(e,`worksheetSource`,t.contentStart,t.end);if(!n)return;let r=a(n.attributes);if(r.has(`r:id`))return;let o={};for(let e of[`ref`,`sheet`,`name`]){let t=r.get(e);t!==void 0&&(o[e]=t)}return o},_=(e,t,n)=>{let r=e.xml??f(),o=ee(r,`pivotCacheDefinition`)??f(),c=a(o.attributes),l=c.get(`r:id`),u=e.parts?.find(e=>e.id===l&&e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords`)?.xml??null;l!==void 0&&u===null&&f();let d=g(r)??f(),p=i(r,`cacheSource`)??f(),m=i(r,`worksheetSource`,p.contentStart,p.end)??f(),h=i(r,`cacheFields`)??f(),_=[],re=h.contentStart;for(;;){let e=i(r,`cacheField`,re,h.contentEnd);if(!e)break;_.push(ne(r,e,_.length,t,n)),re=e.end}let v=i(r,`calculatedItems`);v&&te(r,v,_);let ie=u===null?parseInt(c.get(`recordCount`)??`0`,10):y(u,_.filter(e=>e.records!==null),t),b=[],ae=[];for(let e=0;e<_.length;e++){let t=_[e];t.hasDate&&t.hasNumber?t.json.dateItems=t.dateItems:t.hasDate&&(t.json.dates=!0),t.items.length>0&&b.push([e,[[0,t.items]]]),t.records&&t.records.length>0&&ae.push([e,[[0,t.records]]])}let oe=v?r.substring(0,v.start)+r.substring(v.end):r,se=i(oe,`cacheFields`)??f(),x=oe.substring(0,se.start)+oe.substring(se.end),S=r.substring(m.start,m.start+m.attributes.length+16);x=x.replace(S,()=>`<worksheetSource`+s(m.attributes,[`ref`,`sheet`,`name`])),x=x.replace(o.tag,()=>`<pivotCacheDefinition`+s(o.attributes,[`r:id`,`recordCount`,`refreshOnLoad`]));let C={source:d,fields:_.map(e=>e.json),items:b,recordCount:ie,rest:x};u!==null&&(C.records=ae);let ce=c.get(`refreshOnLoad`);return ce!==`1`&&ce!==`true`||(C.refreshOnLoad=!0),C},ee=(e,t)=>{let n=RegExp(`<${t}((?:\\s+[^\\s=/>]+\\s*=\\s*(?:"[^"]*"|'[^']*'))*)`).exec(e);return n?{tag:n[0],attributes:n[1]}:null},te=(e,t,n)=>{let r=t.contentStart;for(;;){let o=i(e,`calculatedItem`,r,t.contentEnd);if(!o)break;r=o.end;let s=a(o.attributes).get(`formula`)??f(),c=[...e.substring(o.contentStart,o.contentEnd).matchAll(/<reference\s[^>]*?field="(\d+)"[^>]*>\s*<x(?:\s+v="(\d+)")?\s*\/>\s*<\/reference>/g)];c.length!==1&&f();let l=n[parseInt(c[0][1],10)]??f();(l.json.calculatedItems??=[]).push({item:c[0][2]?parseInt(c[0][2],10):0,formula:s})}},ne=(e,t,n,r,c)=>{let l=a(t.attributes),u={name:l.get(`name`)??f()},d=l.get(`numFmtId`),p=d===void 0?void 0:c(parseInt(d,10));p!==void 0&&(u.numberFormat=p);let h=l.get(`databaseField`)===`0`;h&&(u.noRecords=!0);let g=l.get(`formula`);g!==void 0&&(u.formula=g);let _=i(e,`fieldGroup`,t.contentStart,t.contentEnd);_&&(u.group=((e,t,n,r)=>{let s=a(t.attributes),c=e=>e===void 0?void 0:parseInt(e,10),l={base:c(s.get(`base`))??n,items:[]},u=c(s.get(`par`));u!==void 0&&(l.parent=u);let d=i(e,`groupItems`,t.contentStart,t.contentEnd);if(d){let t=e.substring(d.contentStart,d.contentEnd);m.lastIndex=0;let n,i=0,o={items:l.items,hasDate:!1,hasNumber:!1,dateItems:[]};for(;n=m.exec(t);)(n[3]!==`/`||t.substring(i,n.index).trim())&&f(),l.items.push(v(n[1],a(n[2]).get(`v`),o,r)),i=m.lastIndex;t.substring(i).trim()&&f(),o.hasDate&&(l.dateItems=o.dateItems)}let p=i(e,`rangePr`,t.contentStart,t.contentEnd);if(p){let e=a(p.attributes),t=e.get(`groupBy`)??`range`,n=t!==`range`,i=t=>{let i=e.get(`${t}${n?`Date`:`Num`}`)??f(),a=n?o(i,r):Number(i);return a!==null&&Number.isFinite(a)?a:f()},s={by:n?t:`numbers`,start:i(`start`),end:i(`end`)},c=e.get(`groupInterval`);c!==void 0&&(s.interval=Number(c)),e.get(`autoStart`)===`0`&&(s.fixedStart=!0),e.get(`autoEnd`)===`0`&&(s.fixedEnd=!0),l.range=s}let h=i(e,`discretePr`,t.contentStart,t.contentEnd);if(h){let t=e.substring(h.contentStart,h.contentEnd);l.discrete=Array.from(t.matchAll(/<x((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*\/>/g),e=>c(a(e[1]).get(`v`))??0)}return l})(e,_,n,r));let ee=h?null:i(e,`sharedItems`,t.contentStart,t.contentEnd),te={json:u,items:[],byValue:null,records:h?null:[],hasDate:!1,hasNumber:!1,dateItems:[]},ne=[ee,_].filter(e=>!!e).sort((e,t)=>e.start-t.start),y=``,ie=t.contentStart;for(let t of ne)y+=e.substring(ie,t.start),ie=t.end;y+=e.substring(ie,t.contentEnd),ee&&re(e.substring(ee.contentStart,ee.contentEnd),te,r),h||te.items.length!==0||(u.inline=!0,te.byValue=new Map);let b=s(t.attributes,[`name`,`numFmtId`,`databaseField`,`formula`]);return(b.trim()||y.trim())&&(u.rest=y.trim()?`<cacheField${b}>${y}</cacheField>`:`<cacheField${b}/>`),te},re=(e,t,n)=>{m.lastIndex=0;let r,i=0;for(;r=m.exec(e);){e.substring(i,r.index).trim()&&f();let[,o,s,c]=r;c===`/`&&o!==`x`||f();let l=a(s);for(let e of l.keys())e!==`v`&&e!==`u`&&e!==`f`&&f();let u=l.get(`u`);u!==`1`&&u!==`true`||(t.json.unused??=[]).push(t.items.length),t.items.push(v(o,l.get(`v`),t,n)),i=m.lastIndex}e.substring(i).trim()&&f()},v=(e,t,n,i)=>{switch(e){case`m`:return p;case`s`:return t??f();case`n`:{let e=t===void 0?NaN:Number(t);return Number.isFinite(e)||f(),n.hasNumber=!0,e}case`d`:{let e=t===void 0?null:o(t,i);return e===null&&f(),n.hasDate=!0,n.dateItems.push(n.items.length),e}case`b`:return t===`1`||t===`true`;case`e`:{let e=t===void 0?void 0:r.getBuiltInByLabel(t);return e||f(),{t:`e`,v:e.getCode()}}default:return f()}},y=(e,t,n)=>{let r=i(e,`pivotCacheRecords`)??f(),a=e.substring(r.contentStart,r.contentEnd),o=/<r>([\s\S]*?)<\/r>|<r\/>/g,s,c=0,l=0;for(;s=o.exec(a);)a.substring(l,s.index).trim()&&f(),ie(s[1]??``,t,n),c++,l=o.lastIndex;return a.substring(l).trim()&&f(),c},ie=(e,t,n)=>{m.lastIndex=0;let r,i=0,o=0;for(;r=m.exec(e);){e.substring(o,r.index).trim()&&f();let[,s,c,l]=r;l!==`/`&&f();let u=t[i++]??f(),d=a(c);for(let e of d.keys())e!==`v`&&f();let p=d.get(`v`);if(s===`x`){let e=p===void 0?NaN:Number(p);(u.byValue||!Number.isInteger(e)||e<0||e>=u.items.length)&&f(),u.records.push(e)}else{let e=u.byValue??f(),t=s+(p??``),r=e.get(t);r===void 0&&(r=u.items.length,u.items.push(v(s,p,u,n)),e.set(t,r)),u.records.push(r)}o=m.lastIndex}(e.substring(o).trim()||i!==t.length)&&f()},b=/<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!DOCTYPE[^>]*>|<(\/?)([^\s/>]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|([^<]+)/g,ae={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},oe=e=>e.indexOf(`&`)===-1?e:e.replace(/&(#x[0-9a-fA-F]+|#\d+|\w+);/g,(e,t)=>{if(t[0]!==`#`)return ae[t]??e;let n=t[1]===`x`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Number.isFinite(n)?String.fromCodePoint(n):e}),se=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},x=e=>{let t={name:``,qname:``,attrs:``,children:[],start:0,end:e.length,contentStart:0,contentEnd:e.length},n=[t];b.lastIndex=0;for(let t=b.exec(e);t;t=b.exec(e)){let e=n[n.length-1];if(t[1]!==void 0)e.children.push(t[1]);else if(t[6]!==void 0)e.children.push(oe(t[6]));else if(t[3]!==void 0){if(t[2]){if(n.length>1){let e=n.pop();e.contentEnd=t.index,e.end=t.index+t[0].length}continue}let r=t.index+t[0].length,i={name:se(t[3]),qname:t[3],attrs:t[4]??``,children:[],start:t.index,end:r,contentStart:r,contentEnd:r};e.children.push(i),t[5]||n.push(i)}}return t.children.find(e=>typeof e!=`string`)??null},S=e=>e.children.filter(e=>typeof e!=`string`),C=e=>{let t=``;for(let n of e.children)typeof n==`string`&&(t+=n);return t},ce=`http://schemas.openxmlformats.org/drawingml/2006/chart`,le=`http://purl.oclc.org/ooxml/drawingml/chart`,ue=`http://schemas.openxmlformats.org/drawingml/2006/main`,de=`http://purl.oclc.org/ooxml/drawingml/main`,fe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,pe=`http://schemas.microsoft.com/office/drawing/2012/chart`,me=`http://schemas.microsoft.com/office/drawing/2014/chartex`,he=`http://www.w3.org/XML/1998/namespace`,w={c:`c`,a:`a`,r:`r`,c15:`c15`,cx:`cx`},ge=e=>e===ce||e===le,_e=e=>e===ue||e===de,ve=e=>e===me,ye=Object.freeze({xml:he}),be=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,T=e=>{let t=[];be.lastIndex=0;for(let n=be.exec(e.attrs);n;n=be.exec(e.attrs))t.push([n[1],oe(n[2]??n[3]??``)]);return t},xe=(e,t)=>{let n=null;for(let[r,i]of T(e))r===`xmlns`?(n??={...t})[``]=i:r.startsWith(`xmlns:`)&&((n??={...t})[r.slice(6)]=i);return n??t},Se=(e,t)=>t[(e=>{let t=e.indexOf(`:`);return t===-1?``:e.slice(0,t)})(e.qname)],Ce=class{constructor(){this._parts=[]}open(e,t,n=!1){let r=`<`+e;if(t)for(let[e,n]of t)r+=` ${e}="${we(n)}"`;return this._parts.push(r+(n?`/>`:`>`)),this}close(e){return this._parts.push(`</${e}>`),this}val(e,t){return this.open(e,[[`val`,t]],!0)}text(e){return this._parts.push((e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`))(e)),this}raw(e){return this._parts.push(e),this}toString(){return this._parts.join(``)}},we=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`),E=e=>e===`1`||e===`true`||e!==`0`&&e!==`false`&&null,D=e=>e?`1`:`0`,Te=/^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/,O=e=>{let t=E(e);return t===null?Te.test(e)?String(Number(e)):e:D(t)},Ee=new Set(`date1904.roundedCorners.autoTitleDeleted.plotVisOnly.showDLblsOverMax.varyColors.marker.smooth.invertIfNegative.bubble3D.delete.showLegendKey.showVal.showCatName.showSerName.showPercent.showBubbleSize.showLeaderLines.overlay.rAngAx.showHorzBorder.showVertBorder.showOutline.showKeys.auto.noMultiLvlLbl.wireframe.showNegBubbles.autoUpdate.applyToFront.applyToSides.applyToEnd.chartObject.data.formatting.selection.userInterface`.split(`.`)),De=(e,t,n=!1)=>{let r=xe(e,t),i=Se(e,r)??``,a=[];for(let[t,n]of T(e)){if(t===`xmlns`||t.startsWith(`xmlns:`))continue;let e=t.indexOf(`:`),i=e===-1?t:`{${r[t.slice(0,e)]??t.slice(0,e)}}${t.slice(e+1)}`;a.push(`${i}=${JSON.stringify(O(n))}`)}let o=S(e),s=o.length===0?e.children.join(``):``;a.length===0&&o.length===0&&s===``&&ge(i)&&Ee.has(e.name)&&a.push(`val="1"`),a.sort();let c=`<{${i}}${e.name}${a.length?` `+a.join(` `):``}>`;if(o.length>0){let t=[];for(let i of e.children)typeof i==`string`?i.trim()!==``&&t.push(JSON.stringify(i)):t.push(De(i,r,n));n&&t.sort(),c+=t.join(``)}else s!==``&&(c+=JSON.stringify(s));return c+`</>`},Oe=class{constructor(e,t){this.xml=e,this.rootScope=t,this.kept=0,this.reordered=0;let n=Object.values(t).find(ge)??ce,r=_e(t[w.a])?t[w.a]:ue;this.writeScope={...t,[w.c]:n,[w.cx]:me,[w.a]:r,[w.r]:t[w.r]??fe}}markupOf(e,t){let n=this.xml.slice(e.start,e.end),r=new Set(T(e).map(([e])=>e).filter(e=>e===`xmlns`||e.startsWith(`xmlns:`))),i=``;for(let e of Object.keys(t))e!==`xml`&&t[e]!==this.rootScope[e]&&(r.has(e===``?`xmlns`:`xmlns:${e}`)||(i+=e===``?` xmlns="${t[e]}"`:` xmlns:${e}="${t[e]}"`));if(i){let t=1+e.qname.length;n=n.slice(0,t)+i+n.slice(t)}return n}},ke=(e,t)=>{switch(e){case`c`:return ge(t);case`c15`:return t===pe;case`cx`:return ve(t);default:return _e(t)}},k=(e,t,n,r)=>{let i=xe(e,n),a={},o,s;for(let[n,r]of T(e)){let e=t.attributes?.find(e=>e.name===n),i=e?e.read(r):void 0;e&&i!==void 0&&O(e.write(i))===O(r)?a[e.key]=i:(o??={})[n]=r}let c=-1,l=``,u={};for(let n of S(e)){let e=xe(n,i),o=Se(n,e),d=t.fields.findIndex(e=>e.tags.includes(n.name)&&ke(e.ns,o)),f=d===-1?null:t.fields[d],p=f&&!f.many?f.get?f.get(a):a[f.key]:void 0,m=d>c||d===c&&!!f?.many;if(f&&p===void 0&&(m||!f.many)){let t=f.read(n,e,r);if(t!==void 0){f.many?(a[f.key]??=[]).push(t):f.set?f.set(a,t):a[f.key]=t,u[f.key]=(u[f.key]??0)+1,m?(c=d,l=n.name):r.reordered++;continue}}let h=c===-1?null:t.fields[c],g={after:l,xml:r.markupOf(n,i)};h?.many&&(g.at=u[h.key]),(s??=[]).push(g)}return(o||s)&&(a.unknown={},s&&(a.unknown.elements=s),o&&(a.unknown.attributes=o)),t.afterRead?.(a,e,i,r),a},A=(e,t,n,r)=>{let i=[];for(let e of r.attributes??[]){let t=n[e.key];t!==void 0&&i.push([e.name,e.write(t)])}let a=n.unknown;if(a?.attributes)for(let e of Object.keys(a.attributes))i.push([e,a.attributes[e]]);for(let e of r.declares?.(n)??[])i.some(([t])=>t===e[0])||i.push(e);let o=new Ce,s=a?.elements?[...a.elements]:[],c=e=>{for(let t=0;t<s.length;t++)e(s[t])&&(o.raw(s[t].xml),s.splice(t--,1))};c(e=>e.after===``);for(let e of r.fields){let t=e.get?e.get(n):n[e.key],r=t=>e.tags.includes(t.after);if(e.many){let n=t??[];for(let t=0;t<n.length;t++)e.write(o,n[t]),c(e=>r(e)&&e.at===t+1)}else t!==void 0&&e.write(o,t);c(r)}c(()=>!0);let l=o.toString();l===``?e.open(t,i,!0):e.open(t,i).raw(l).close(t)},j=(e,t)=>`${w[e]}:${t}`,M=(e,t,n=e,r=`c`)=>({tags:[e],key:n,ns:r,read:e=>{let n=(e=>{if(S(e).length>0)return;let t=null;for(let[n,r]of T(e)){if(n!==`val`)return;t=r}return t})(e);if(n===void 0)return;if(t===`bool`)return n===null||(E(n)??void 0);if(n===null)return;if(t===`str`)return n;let r=Number(n);return Number.isFinite(r)&&(t!==`int`||Number.isInteger(r))&&O(String(r))===O(n)?r:void 0},write:(n,i)=>{n.val(j(r,e),t===`bool`?D(i):String(i))}}),N=(e,t=e,n=`c`)=>({tags:[e],key:t,ns:n,read:e=>{if(!(S(e).length>0||T(e).some(([e])=>!e.startsWith(`xmlns`))))return C(e)},write:(t,r)=>{let i=j(n,e);r===``?t.open(i,null,!0):t.open(i).text(r).close(i)}}),P=(e,t,n=e,r)=>{let i=r?.ns??`c`,a=typeof t==`function`?t:()=>t;return{tags:[e],key:n,ns:i,many:r?.many,read:(e,t,n)=>k(e,a(),t,n),write:(t,n)=>A(t,j(i,e),n,a())}},F=(e,t,n=e,r=1)=>({name:e,key:n,read:e=>{if(t===`str`)return e;if(t===`bool`)return E(e)??void 0;let n=Number(e);return Number.isFinite(n)&&(t!==`int`||Number.isInteger(n))?r===1?n:n/r:void 0},write:e=>t===`bool`?D(e):t===`str`?e:String(r===1?e:Math.round(e*r))}),Ae=(e,t,n,r)=>({name:e,key:t,read:n,write:r}),je=e=>({...e,read:(t,n,r)=>{let i=e.read(t,n,r);if(i===void 0)return;let a=new Ce;e.write(a,i);let o=((e,t)=>{let n=x(e);return n?De(n,t):null})(a.toString(),r.writeScope)===De(t,n);return o||r.kept++,o?i:void 0}}),I=e=>`a:${e}`,Me=new Set([`bg1`,`tx1`,`bg2`,`tx2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`,`phClr`,`dk1`,`lt1`,`dk2`,`lt2`]),Ne=new Set(`scrollBar.background.activeCaption.inactiveCaption.menu.window.windowFrame.menuText.windowText.captionText.activeBorder.inactiveBorder.appWorkspace.highlight.highlightText.btnFace.btnShadow.grayText.btnText.inactiveCaptionText.btnHighlight.3dDkShadow.3dLight.infoText.infoBk.hotLight.gradientActiveCaption.gradientInactiveCaption.menuHighlight.menuBar`.split(`.`)),Pe=[`scrgbClr`,`srgbClr`,`hslClr`,`sysClr`,`schemeClr`,`prstClr`],Fe=e=>e===`hue`||e===`hueOff`||e===`hueMod`?6e4:e===`alpha`||e===`alphaOff`||e===`alphaMod`?1e5:1e3,L=(e,t)=>{let n={};for(let[r,i]of T(e)){if(!t.includes(r))return null;n[r]=i}return n},R=/^-?\d+$/,Ie=e=>{let t=S(e);return t.length===0?null:t.length>1||!Pe.includes(t[0].name)?void 0:(e=>{let t;switch(e.name){case`scrgbClr`:{let n=L(e,[`r`,`g`,`b`]);if(!(n&&R.test(n.r??``)&&R.test(n.g??``)&&R.test(n.b??``)))return;t=`lrgb(${Number(n.r)/1e3},${Number(n.g)/1e3},${Number(n.b)/1e3})`;break}case`hslClr`:{let n=L(e,[`hue`,`sat`,`lum`]);if(!(n&&R.test(n.hue??``)&&R.test(n.sat??``)&&R.test(n.lum??``)))return;t=`hsl(${Number(n.hue)/6e4},${Number(n.sat)/1e3},${Number(n.lum)/1e3})`;break}case`sysClr`:{let n=L(e,[`val`,`lastClr`]);if(!n?.val||!Ne.has(n.val))return;t=n.lastClr===void 0?n.val:`${n.val} lastClr ${n.lastClr}`;break}default:{let n=L(e,[`val`]);if(!n?.val||/\s/.test(n.val)||(Me.has(n.val)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(n.val)?`srgbClr`:`prstClr`)!==e.name)return;t=n.val}}for(let n of S(e)){if(S(n).length>0)return;let e=L(n,[`val`]);if(!e)return;if(e.val!==void 0){if(!R.test(e.val))return;t+=` ${n.name} ${Number(e.val)/Fe(n.name)}`}else t+=` ${n.name}`}return t})(t[0])},Le=/^-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i,Re=(e,n)=>{let r=(e=>{let t=e.trim(),n=/^[a-z]+\([^)]*\)|^[^\s,]+/i.exec(t)?.[0]??t,r=t.slice(n.length).split(/\s*,\s*|\s+/).filter(e=>e!==``);return[n.replace(/\s+/g,``),...r]})(n),i=r.shift(),a,o,s=/^(lrgb|hsl)\(([^,]+),([^,]+),([^)]+)\)$/.exec(i);if(s?.[1]===`lrgb`)a=`scrgbClr`,o=[[`r`,String(Math.round(1e3*Number(s[2])))],[`g`,String(Math.round(1e3*Number(s[3])))],[`b`,String(Math.round(1e3*Number(s[4])))]];else if(s?.[1]===`hsl`)a=`hslClr`,o=[[`hue`,String(Math.round(6e4*Number(s[2])))],[`sat`,String(Math.round(1e3*Number(s[3])))],[`lum`,String(Math.round(1e3*Number(s[4])))]];else if(r[0]===`lastClr`||Ne.has(i))a=`sysClr`,o=[[`val`,i]],r[0]===`lastClr`&&(r.shift(),o.push([`lastClr`,r.shift()]));else{let e=(e=>{if(Me.has(e)||/^[0-9A-Fa-f]{6}$/.test(e)||/^[a-z]+$/i.test(e))return null;let n;try{n=new t(e)}catch{return null}let r=n.getType();return r===`hex`||r===`rgb`||r===`hsl`?n.toHex().toString(!1).replace(`#`,``).toUpperCase():null})(i);a=e?`srgbClr`:Me.has(i)?`schemeClr`:/^[0-9A-Fa-f]{6}$/.test(i)?`srgbClr`:`prstClr`,o=[[`val`,e??i]]}if(r.length!==0){e.open(I(a),o);for(let t=0;t<r.length;t++){let n=r[t];t+1<r.length&&Le.test(r[t+1])?e.val(I(n),String(Math.round(Number(r[++t])*Fe(n)))):e.open(I(n),null,!0)}e.close(I(a))}else e.open(I(a),o,!0)},ze=(e,t,n,r)=>{n===void 0?e.open(I(t),r,!0):(e.open(I(t),r),Re(e,n),e.close(I(t)))},Be=[`noFill`,`solidFill`,`gradFill`,`pattFill`,`grpFill`],Ve=e=>{let t=L(e,[`l`,`t`,`r`,`b`]);if(!t)return;let n={};return t.l!==void 0&&(n.left=Number(t.l)/1e3),t.t!==void 0&&(n.top=Number(t.t)/1e3),t.r!==void 0&&(n.right=Number(t.r)/1e3),t.b!==void 0&&(n.bottom=Number(t.b)/1e3),n},He=(e,t,n)=>{let r=[];n.left!==void 0&&r.push([`l`,String(Math.round(1e3*n.left))]),n.top!==void 0&&r.push([`t`,String(Math.round(1e3*n.top))]),n.right!==void 0&&r.push([`r`,String(Math.round(1e3*n.right))]),n.bottom!==void 0&&r.push([`b`,String(Math.round(1e3*n.bottom))]),e.open(I(t),r,!0)},Ue=t=>{switch(t.name){case`noFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.None}:void 0;case`grpFill`:return S(t).length===0&&T(t).length===0?{type:e.Type.Group}:void 0;case`solidFill`:{if(T(t).length>0)return;let n=Ie(t);return n===void 0?void 0:n===null?{type:e.Type.Solid}:{type:e.Type.Solid,color:n}}case`gradFill`:return(t=>{let n=L(t,[`rotWithShape`,`flip`]);if(!n)return;let r={type:e.Type.Gradient};if(n.rotWithShape!==void 0){let e=E(n.rotWithShape);if(e===null)return;r.isRotatedWithShape=e}n.flip!==void 0&&(r.flip=n.flip);for(let n of S(t))if(n.name===`gsLst`){let e=[];for(let t of S(n)){let n=t.name===`gs`?L(t,[`pos`]):null,r=n&&R.test(n.pos??``)?Ie(t):void 0;if(!r)return;e.push({offset:Number(n.pos)/1e5,color:r})}r.stops=e}else if(n.name===`lin`){let t=L(n,[`ang`,`scaled`]);if(!t||S(n).length>0)return;if(r.gradientType=e.GradientType.Linear,t.ang!==void 0){if(!R.test(t.ang))return;r.angle=(Number(t.ang)/6e4+90)%360}if(t.scaled!==void 0){let e=E(t.scaled);if(e===null)return;r.scaled=e}}else if(n.name===`path`){let t=L(n,[`path`]);if(!t)return;r.gradientType=t.path===`circle`?e.GradientType.Path:t.path;let i=S(n);if(i.length>1||i.length===1&&i[0].name!==`fillToRect`)return;if(i.length===1){let e=Ve(i[0]);if(!e)return;r.focus={left:(e.left??0)/100,top:(e.top??0)/100,right:1-(e.right??0)/100,bottom:1-(e.bottom??0)/100}}}else{if(n.name!==`tileRect`)return;{let e=Ve(n);if(!e)return;r.tileRect=e}}return r})(t);case`pattFill`:{let n=L(t,[`prst`]);if(!n)return;let r={type:e.Type.Pattern};n.prst!==void 0&&(r.patternType=n.prst);for(let e of S(t)){let t=e.name===`fgClr`||e.name===`bgClr`?Ie(e):void 0;if(!t)return;e.name===`fgClr`?r.foreground=t:r.background=t}return r}}},We=(t,n)=>{switch(n.type){case e.Type.None:t.open(I(`noFill`),null,!0);return;case e.Type.Group:t.open(I(`grpFill`),null,!0);return;case e.Type.Solid:ze(t,`solidFill`,n.color);return;case e.Type.Gradient:((t,n)=>{let r=[];if(n.flip!==void 0&&r.push([`flip`,n.flip]),n.isRotatedWithShape!==void 0&&r.push([`rotWithShape`,D(n.isRotatedWithShape)]),t.open(I(`gradFill`),r),n.stops){t.open(I(`gsLst`));for(let e of n.stops){let{offset:n,color:r}=typeof e==`string`?{offset:0,color:e}:e;ze(t,`gs`,r,[[`pos`,String(Math.round(1e5*(n??0)))]])}t.close(I(`gsLst`))}if(n.gradientType===e.GradientType.Linear){let e=[];n.angle!==void 0&&e.push([`ang`,String(Math.round((n.angle-90+360)%360*6e4))]),n.scaled!==void 0&&e.push([`scaled`,D(n.scaled)]),t.open(I(`lin`),e,!0)}else if(n.gradientType!==void 0){let r=n.gradientType===e.GradientType.Path?`circle`:n.gradientType;n.focus?(t.open(I(`path`),[[`path`,r]]),He(t,`fillToRect`,{left:100*n.focus.left,top:100*n.focus.top,right:100*(1-n.focus.right),bottom:100*(1-n.focus.bottom)}),t.close(I(`path`))):t.open(I(`path`),[[`path`,r]],!0)}n.tileRect&&He(t,`tileRect`,n.tileRect),t.close(I(`gradFill`))})(t,n);return;case e.Type.Pattern:{let e=n,r=e.patternType===void 0?[]:[[`prst`,e.patternType]];e.foreground===void 0&&e.background===void 0?t.open(I(`pattFill`),r,!0):(t.open(I(`pattFill`),r),e.foreground!==void 0&&ze(t,`fgClr`,e.foreground),e.background!==void 0&&ze(t,`bgClr`,e.background),t.close(I(`pattFill`)));return}}throw Error(`A chart cannot write a fill of type '${n.type}'.`)},Ge=e=>je({tags:Be,key:e,ns:`a`,read:e=>Ue(e),write:(e,t)=>We(e,t)}),Ke={tags:[`effectLst`],key:`effects`,ns:`a`,read:e=>S(e).length===0&&T(e).length===0?[]:void 0,write:(e,t)=>{if(t.length>0)throw Error(`A chart cannot write effects yet.`);e.open(I(`effectLst`),null,!0)}},qe={rnd:`round`,flat:`butt`,sq:`square`},Je=(e,t)=>({tags:[e],key:`${t}Type`,ns:`a`,read:e=>{let t=L(e,[`type`,`w`,`len`]);if(t&&!(S(e).length>0)&&Object.keys(t).length!==0)return t},write:(t,n)=>{let r=[];for(let e of[`type`,`w`,`len`])n[e]!==void 0&&r.push([e,n[e]]);t.open(I(e),r,!0)},get:e=>{let n={};return e[`${t}Type`]!==void 0&&(n.type=e[`${t}Type`]),e[`${t}Width`]!==void 0&&(n.w=e[`${t}Width`]),e[`${t}Length`]!==void 0&&(n.len=e[`${t}Length`]),Object.keys(n).length>0?n:void 0},set:(e,n)=>{n.type!==void 0&&(e[`${t}Type`]=n.type),n.w!==void 0&&(e[`${t}Width`]=n.w),n.len!==void 0&&(e[`${t}Length`]=n.len)}}),Ye={attributes:[F(`w`,`int`,`width`,12700),Ae(`cap`,`lineCap`,e=>qe[e],e=>Object.keys(qe).find(t=>qe[t]===e)),F(`cmpd`,`str`,`compound`),F(`algn`,`str`,`align`)],fields:[Ge(`fill`),{tags:[`prstDash`,`custDash`],key:`dash`,ns:`a`,read:e=>{if(e.name===`prstDash`){let t=L(e,[`val`]);return t?.val!==void 0&&S(e).length===0?t.val:void 0}if(T(e).length>0)return;let t=[];for(let n of S(e)){let e=n.name===`ds`?L(n,[`d`,`sp`]):null;if(!e||!R.test(e.d??``)||!R.test(e.sp??``))return;t.push(Number(e.d)/1e3,Number(e.sp)/1e3)}return t},write:(e,t)=>{if(typeof t!=`string`){e.open(I(`custDash`));for(let n=0;n<t.length;n+=2)e.open(I(`ds`),[[`d`,String(Math.round(1e3*t[n]))],[`sp`,String(Math.round(1e3*t[n+1]))]],!0);e.close(I(`custDash`))}else e.val(I(`prstDash`),t)}},{tags:[`round`,`bevel`,`miter`],key:`lineJoin`,ns:`a`,read:e=>{let t=L(e,e.name===`miter`?[`lim`]:[]);if(t&&!(S(e).length>0)&&(t.lim===void 0||R.test(t.lim)))return{join:e.name,limit:t.lim===void 0?void 0:Number(t.lim)/1e5}},write:(e,t)=>{e.open(I(t.join),t.limit===void 0?null:[[`lim`,String(Math.round(1e5*t.limit))]],!0)},get:e=>e.lineJoin?{join:e.lineJoin,limit:e.miterLimit}:void 0,set:(e,t)=>{e.lineJoin=t.join,t.limit!==void 0&&(e.miterLimit=t.limit)}},Je(`headEnd`,`head`),Je(`tailEnd`,`tail`)]},Xe=e=>je(P(`ln`,Ye,e,{ns:`a`})),Ze={fields:[Ge(`fill`),Xe(`stroke`),Ke]},Qe=(e,t,r)=>({tags:[e],key:t,ns:`a`,read:e=>{let t=L(e,[`typeface`]);if(!(t?.typeface===void 0||S(e).length>0))return r&&t.typeface===`+mn-${r}`?n.ThemeFamily.Body:r&&t.typeface===`+mj-${r}`?n.ThemeFamily.Heading:t.typeface},write:(t,i)=>{let a=r?i===n.ThemeFamily.Body?`+mn-${r}`:i===n.ThemeFamily.Heading?`+mj-${r}`:i:i;t.open(I(e),[[`typeface`,a]],!0)}}),$e=(e,t,n)=>{let r=Object.fromEntries(Object.entries(n).map(([e,t])=>[t,e]));return Ae(e,t,e=>r[e],e=>n[e]??e)},et={attributes:[F(`lang`,`str`,`language`),F(`altLang`,`str`,`alternateLanguage`),F(`sz`,`int`,`size`,100),Ae(`b`,`weight`,e=>{let t=E(e);return t===null?void 0:t?700:400},e=>D(e>=600)),Ae(`i`,`style`,e=>{let t=E(e);return t===null?void 0:t?`italic`:`normal`},e=>D(e===`italic`)),$e(`u`,`underline`,{none:`none`,words:`words`,single:`sng`,double:`dbl`,heavy:`heavy`,dotted:`dotted`,dottedHeavy:`dottedHeavy`,dash:`dash`,dashHeavy:`dashHeavy`,dashLong:`dashLong`,dashLongHeavy:`dashLongHeavy`,dotDash:`dotDash`,dotDashHeavy:`dotDashHeavy`,dotDotDash:`dotDotDash`,dotDotDashHeavy:`dotDotDashHeavy`,wavy:`wavy`,wavyHeavy:`wavyHeavy`,wavyDouble:`wavyDbl`}),$e(`strike`,`strike`,{none:`noStrike`,single:`sngStrike`,double:`dblStrike`}),F(`kern`,`int`,`kerning`,100),$e(`cap`,`capitals`,{none:`none`,small:`small`,all:`all`}),F(`spc`,`int`,`letterSpacing`,100),F(`normalizeH`,`bool`,`normalizeHeight`),F(`baseline`,`int`,`baseline`,1e3)],fields:[Xe(`outline`),Ge(`color`),Ke,Qe(`latin`,`latin`,`lt`),Qe(`ea`,`eastAsian`,`ea`),Qe(`cs`,`complexScript`,`cs`),Qe(`sym`,`symbol`)]},tt={attributes:[F(`algn`,`str`,`align`),F(`rtl`,`bool`,`rtl`)],fields:[P(`defRPr`,et,`defaultRun`,{ns:`a`})]},nt={fields:[P(`rPr`,et,`rPr`,{ns:`a`}),{tags:[`t`],key:`text`,ns:`a`,read:e=>{if(S(e).length>0)return;let t=!1;for(let[n,r]of T(e))if(n!==`xmlns`&&!n.startsWith(`xmlns:`)){if(n!==`xml:space`||r!==`preserve`)return;t=!0}return{text:C(e),preserve:t}},get:e=>e.text===void 0?void 0:{text:e.text,preserve:!0===e.preserveSpace},set:(e,t)=>{e.text=t.text,t.preserve&&(e.preserveSpace=!0)},write:(e,t)=>{let n=I(`t`),r=t.preserve?[[`xml:space`,`preserve`]]:null;t.text===``?e.open(n,r,!0):e.open(n,r).text(t.text).close(n)}}]},rt={attributes:[F(`id`,`str`,`id`),F(`type`,`str`,`type`)],fields:nt.fields},it={fields:[P(`rPr`,et,`rPr`,{ns:`a`})]},at={fields:[P(`pPr`,tt,`pPr`,{ns:`a`}),{tags:[`r`,`br`,`fld`],key:`runs`,ns:`a`,many:!0,read:(e,t,n)=>{if(e.name===`br`)return{...k(e,it,t,n),text:`
|
|
2
|
+
`,break:!0};if(e.name===`r`){let r=k(e,nt,t,n);return r.text===void 0?void 0:r}let{id:r,type:i,...a}=k(e,rt,t,n);return r===void 0?void 0:(a.text??=``,a.field=i===void 0?{id:r}:{id:r,type:i},a)},write:(e,t)=>{if(t.break){let{text:n,break:r,...i}=t;A(e,I(`br`),i,it)}else if(t.field){let{field:n,...r}=t;A(e,I(`fld`),{...r,id:n.id,type:n.type},rt)}else A(e,I(`r`),t,nt)}},P(`endParaRPr`,et,`endRun`,{ns:`a`})]},ot={fields:[P(`bodyPr`,{attributes:[F(`rot`,`int`,`rotation`,6e4),F(`spcFirstLastPara`,`bool`,`spcFirstLastPara`),F(`vertOverflow`,`str`,`vertOverflow`),F(`horzOverflow`,`str`,`horzOverflow`),F(`vert`,`str`,`vert`),F(`wrap`,`str`,`wrap`),F(`lIns`,`int`,`lIns`),F(`tIns`,`int`,`tIns`),F(`rIns`,`int`,`rIns`),F(`bIns`,`int`,`bIns`),F(`anchor`,`str`,`anchor`),F(`anchorCtr`,`bool`,`anchorCtr`)],fields:[]},`bodyPr`,{ns:`a`}),P(`lstStyle`,{fields:[]},`lstStyle`,{ns:`a`}),P(`p`,at,`paragraphs`,{ns:`a`,many:!0})]},z=()=>P(`spPr`,Ze),B=()=>P(`txPr`,ot),st={attributes:[F(`idx`,`int`),F(`formatCode`,`str`)],fields:[N(`v`)]},ct={fields:[N(`formatCode`),M(`ptCount`,`int`),P(`pt`,st,`points`,{many:!0})]},lt={fields:[M(`ptCount`,`int`),P(`pt`,st,`points`,{many:!0})]},ut={fields:[M(`ptCount`,`int`),P(`lvl`,{fields:[P(`pt`,st,`points`,{many:!0})]},`levels`,{many:!0})]},dt={fields:[N(`f`),P(`numCache`,ct,`cache`)]},ft={fields:[N(`f`),P(`strCache`,lt,`cache`)]},pt={fields:[N(`f`),P(`multiLvlStrCache`,ut,`cache`)]},mt=P(`datalabelsRange`,{fields:[N(`f`,`f`,`c15`),P(`dlblRangeCache`,lt,`cache`,{ns:`c15`})]},`datalabelsRange`,{ns:`c15`}),ht={...mt,read:(e,t,n)=>t[w.c15]===pe?mt.read(e,t,n):void 0},gt=M(`showDataLabelsRange`,`bool`,`showDataLabelsRange`,`c15`),_t={...gt,read:(e,t,n)=>t[w.c15]===pe?gt.read(e,t,n):void 0},vt={fields:[P(`ext`,{attributes:[F(`uri`,`str`)],fields:[ht,_t],declares:e=>e.datalabelsRange!==void 0||e.showDataLabelsRange!==void 0?[[`xmlns:${w.c15}`,pe]]:[]},`extensions`,{many:!0})]},yt={fields:[P(`multiLvlStrRef`,pt),P(`numRef`,dt),P(`numLit`,ct),P(`strRef`,ft),P(`strLit`,lt)]},bt={fields:[P(`strRef`,ft),N(`v`)]},xt={fields:[P(`strRef`,ft),P(`rich`,ot)]},St={attributes:[F(`formatCode`,`str`),F(`sourceLinked`,`bool`)],fields:[]},V={fields:[P(`manualLayout`,{fields:[M(`layoutTarget`,`str`),M(`xMode`,`str`),M(`yMode`,`str`),M(`wMode`,`str`),M(`hMode`,`str`),M(`x`,`num`),M(`y`,`num`),M(`w`,`num`),M(`h`,`num`)]})]},Ct={fields:[P(`tx`,xt),P(`layout`,V),M(`overlay`,`bool`),z(),B()]},wt={fields:[z()]},Tt={fields:[M(`symbol`,`str`),M(`size`,`int`),z()]},Et={fields:[M(`idx`,`int`),M(`invertIfNegative`,`bool`),P(`marker`,Tt),M(`bubble3D`,`bool`),M(`explosion`,`int`),z()]},Dt=()=>[P(`numFmt`,St),z(),B(),M(`dLblPos`,`str`),M(`showLegendKey`,`bool`),M(`showVal`,`bool`),M(`showCatName`,`bool`),M(`showSerName`,`bool`),M(`showPercent`,`bool`),M(`showBubbleSize`,`bool`),N(`separator`)],Ot={fields:[P(`dLbl`,{fields:[M(`idx`,`int`),M(`delete`,`bool`),P(`layout`,V),P(`tx`,xt),...Dt(),P(`extLst`,vt)]},`labels`,{many:!0}),M(`delete`,`bool`),...Dt(),M(`showLeaderLines`,`bool`),P(`leaderLines`,wt),P(`extLst`,vt)]},kt={fields:[P(`layout`,V),P(`tx`,xt),P(`numFmt`,St),z(),B()]},At={fields:[N(`name`),z(),M(`trendlineType`,`str`),M(`order`,`int`),M(`period`,`int`),M(`forward`,`num`),M(`backward`,`num`),M(`intercept`,`num`),M(`dispRSqr`,`bool`),M(`dispEq`,`bool`),P(`trendlineLbl`,kt)]},jt={fields:[M(`errDir`,`str`),M(`errBarType`,`str`),M(`errValType`,`str`),M(`noEndCap`,`bool`),P(`plus`,yt),P(`minus`,yt),M(`val`,`num`),z(),P(`extLst`,vt)]},Mt={fields:[M(`gapWidth`,`int`),P(`upBars`,wt),P(`downBars`,wt)]},H=()=>[M(`idx`,`int`),M(`order`,`int`),P(`tx`,bt),z()],U=()=>P(`dPt`,Et,`points`,{many:!0}),W=()=>P(`dLbls`,Ot),Nt=()=>P(`trendline`,At,`trendlines`,{many:!0}),Pt=()=>P(`errBars`,jt,`errBars`,{many:!0}),G=e=>P(e,yt),K=()=>P(`extLst`,vt),Ft={bar:{fields:[...H(),M(`invertIfNegative`,`bool`),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),M(`shape`,`str`),K()]},line:{fields:[...H(),P(`marker`,Tt),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),M(`smooth`,`bool`),K()]},area:{fields:[...H(),U(),W(),Nt(),Pt(),G(`cat`),G(`val`),K()]},pie:{fields:[...H(),M(`explosion`,`int`),U(),W(),G(`cat`),G(`val`),K()]},scatter:{fields:[...H(),P(`marker`,Tt),U(),W(),Nt(),Pt(),G(`xVal`),G(`yVal`),M(`smooth`,`bool`),K()]},bubble:{fields:[...H(),M(`invertIfNegative`,`bool`),U(),W(),Nt(),Pt(),G(`xVal`),G(`yVal`),G(`bubbleSize`),M(`bubble3D`,`bool`),K()]},radar:{fields:[...H(),P(`marker`,Tt),U(),W(),G(`cat`),G(`val`),K()]},surface:{fields:[...H(),G(`cat`),G(`val`),K()]}},q=e=>P(`ser`,Ft[e],`series`,{many:!0}),J=()=>({...M(`axId`,`int`,`axIds`),many:!0}),Y=(e,t)=>P(e,wt,e,{many:t}),It={tags:[`custSplit`],key:`custSplit`,ns:`c`,read:(e,t,n)=>{let r=k(e,{fields:[{...M(`secondPiePt`,`int`,`points`),many:!0}]},t,n);return r.unknown?void 0:r.points??[]},write:(e,t)=>{A(e,`c:custSplit`,{points:t},{fields:[{...M(`secondPiePt`,`int`,`points`),many:!0}]})}},Lt={fields:[M(`idx`,`int`),z()]},Rt={tags:[`bandFmts`],key:`bandFmts`,ns:`c`,read:(e,t,n)=>{let r=k(e,{fields:[P(`bandFmt`,Lt,`formats`,{many:!0})]},t,n);return r.unknown?void 0:r.formats??[]},write:(e,t)=>{A(e,`c:bandFmts`,{formats:t},{fields:[P(`bandFmt`,Lt,`formats`,{many:!0})]})}},zt={areaChart:{type:`area`,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`area`),W(),Y(`dropLines`),J()]}},area3DChart:{type:`area`,is3D:!0,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`area`),W(),Y(`dropLines`),M(`gapDepth`,`int`),J()]}},lineChart:{type:`line`,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`line`),W(),Y(`dropLines`),Y(`hiLowLines`),P(`upDownBars`,Mt),M(`marker`,`bool`),M(`smooth`,`bool`),J()]}},line3DChart:{type:`line`,is3D:!0,codec:{fields:[M(`grouping`,`str`),M(`varyColors`,`bool`),q(`line`),W(),Y(`dropLines`),M(`gapDepth`,`int`),J()]}},stockChart:{type:`stock`,codec:{fields:[q(`line`),W(),Y(`dropLines`),Y(`hiLowLines`),P(`upDownBars`,Mt),J()]}},radarChart:{type:`radar`,codec:{fields:[M(`radarStyle`,`str`),M(`varyColors`,`bool`),q(`radar`),W(),J()]}},scatterChart:{type:`scatter`,codec:{fields:[M(`scatterStyle`,`str`),M(`varyColors`,`bool`),q(`scatter`),W(),J()]}},pieChart:{type:`pie`,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W(),M(`firstSliceAng`,`int`)]}},pie3DChart:{type:`pie`,is3D:!0,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W()]}},doughnutChart:{type:`doughnut`,codec:{fields:[M(`varyColors`,`bool`),q(`pie`),W(),M(`firstSliceAng`,`int`),M(`holeSize`,`int`)]}},barChart:{type:`bar`,codec:{fields:[M(`barDir`,`str`),M(`grouping`,`str`),M(`varyColors`,`bool`),q(`bar`),W(),M(`gapWidth`,`int`),M(`overlap`,`int`),Y(`serLines`,!0),J()]}},bar3DChart:{type:`bar`,is3D:!0,codec:{fields:[M(`barDir`,`str`),M(`grouping`,`str`),M(`varyColors`,`bool`),q(`bar`),W(),M(`gapWidth`,`int`),M(`gapDepth`,`int`),M(`shape`,`str`),J()]}},ofPieChart:{type:`ofPie`,codec:{fields:[M(`ofPieType`,`str`),M(`varyColors`,`bool`),q(`pie`),W(),M(`gapWidth`,`int`),M(`splitType`,`str`),M(`splitPos`,`num`),It,M(`secondPieSize`,`int`),Y(`serLines`,!0)]}},surfaceChart:{type:`surface`,codec:{fields:[M(`wireframe`,`bool`),q(`surface`),Rt,J()]}},surface3DChart:{type:`surface`,is3D:!0,codec:{fields:[M(`wireframe`,`bool`),q(`surface`),Rt,J()]}},bubbleChart:{type:`bubble`,codec:{fields:[M(`varyColors`,`bool`),q(`bubble`),W(),M(`bubble3D`,`bool`),M(`bubbleScale`,`int`),M(`showNegBubbles`,`bool`),M(`sizeRepresents`,`str`),J()]}}},Bt={tags:Object.keys(zt),key:`groups`,ns:`c`,many:!0,read:(e,t,n)=>{let{type:r,is3D:i,codec:a}=zt[e.name],o=k(e,a,t,n);return o.series??=[],o.axIds??=[],i?{type:r,is3D:i,...o}:{type:r,...o}},write:(e,t)=>{let n=(e=>`${e.type}${e.is3D?`3D`:``}Chart`)(t),{type:r,is3D:i,...a}=Wt(t);A(e,`c:${n}`,a,zt[n].codec)}},Vt=[`ctr`,`l`,`r`,`t`,`b`],Ht=e=>{switch(e.type){case`bar`:return e.is3D?[]:e.grouping===`stacked`||e.grouping===`percentStacked`?[`ctr`,`inEnd`,`inBase`]:[`ctr`,`inEnd`,`inBase`,`outEnd`];case`line`:return e.is3D?[]:Vt;case`stock`:case`scatter`:case`bubble`:return Vt;case`pie`:case`ofPie`:return[`ctr`,`inEnd`,`outEnd`,`bestFit`];default:return[]}},Ut=(e,t)=>t?.dLblPos!==void 0&&!e.includes(t.dLblPos),Wt=e=>{let t=Ht(e),n=e=>{if(!Ut(t,e))return e;let{dLblPos:n,...r}=e;return r},r=e=>e.labels?{...n(e),labels:e.labels.map(n)}:n(e);return{...e,...e.dLbls?{dLbls:r(e.dLbls)}:{},series:e.series.map(e=>e.dLbls?{...e,dLbls:r(e.dLbls)}:e)}},Gt={fields:[M(`logBase`,`num`),M(`orientation`,`str`),M(`max`,`num`),M(`min`,`num`)]},Kt={fields:[P(`layout`,V),P(`tx`,xt),z(),B()]},qt={fields:[M(`custUnit`,`num`),M(`builtInUnit`,`str`),P(`dispUnitsLbl`,Kt)]},Jt=()=>[M(`axId`,`int`),P(`scaling`,Gt),M(`delete`,`bool`),M(`axPos`,`str`),Y(`majorGridlines`),Y(`minorGridlines`),P(`title`,Ct),P(`numFmt`,St),M(`majorTickMark`,`str`),M(`minorTickMark`,`str`),M(`tickLblPos`,`str`),z(),B(),M(`crossAx`,`int`),M(`crosses`,`str`),M(`crossesAt`,`num`)],Yt={valAx:{type:`val`,codec:{fields:[...Jt(),M(`crossBetween`,`str`),M(`majorUnit`,`num`),M(`minorUnit`,`num`),P(`dispUnits`,qt)]}},catAx:{type:`cat`,codec:{fields:[...Jt(),M(`auto`,`bool`),M(`lblAlgn`,`str`),M(`lblOffset`,`int`),M(`tickLblSkip`,`int`),M(`tickMarkSkip`,`int`),M(`noMultiLvlLbl`,`bool`)]}},dateAx:{type:`date`,codec:{fields:[...Jt(),M(`auto`,`bool`),M(`lblOffset`,`int`),M(`baseTimeUnit`,`str`),M(`majorUnit`,`num`),M(`majorTimeUnit`,`str`),M(`minorUnit`,`num`),M(`minorTimeUnit`,`str`)]}},serAx:{type:`ser`,codec:{fields:[...Jt(),M(`tickLblSkip`,`int`),M(`tickMarkSkip`,`int`)]}}},Xt={tags:Object.keys(Yt),key:`axes`,ns:`c`,many:!0,read:(e,t,n)=>({type:Yt[e.name].type,...k(e,Yt[e.name].codec,t,n)}),write:(e,t)=>{let{type:n,...r}=t,i=`${n}Ax`;A(e,`c:${i}`,r,Yt[i].codec)}},Zt={fields:[M(`showHorzBorder`,`bool`),M(`showVertBorder`,`bool`),M(`showOutline`,`bool`),M(`showKeys`,`bool`),z(),B()]},Qt={fields:[P(`layout`,V),Bt,Xt,P(`dTable`,Zt),z()],afterRead:e=>{e.groups??=[],e.axes??=[]}},$t={fields:[M(`rotX`,`int`),M(`hPercent`,`int`),M(`rotY`,`int`),M(`depthPercent`,`int`),M(`rAngAx`,`bool`),M(`perspective`,`int`)]},en={fields:[M(`thickness`,`int`),z()]},tn={fields:[M(`idx`,`int`),M(`delete`,`bool`),B()]},nn={fields:[M(`legendPos`,`str`),P(`legendEntry`,tn,`entries`,{many:!0}),P(`layout`,V),M(`overlay`,`bool`),z(),B()]},rn={fields:[P(`title`,Ct),M(`autoTitleDeleted`,`bool`),P(`view3D`,$t),P(`floor`,en),P(`sideWall`,en),P(`backWall`,en),P(`plotArea`,Qt),P(`legend`,nn),M(`plotVisOnly`,`bool`),M(`dispBlanksAs`,`str`),M(`showDLblsOverMax`,`bool`)]},an={fields:[N(`name`),M(`fmtId`,`int`)]},on={fields:[M(`date1904`,`bool`),M(`lang`,`str`),M(`roundedCorners`,`bool`),M(`style`,`int`),P(`pivotSource`,an),P(`chart`,rn),z(),B()]},sn=e=>{let t=x(e);if(!t||t.name!==`chartSpace`)return null;let n=xe(t,ye);if(!ge(Se(t,n)))return null;let r=new Oe(e,n);return{model:k(t,on,ye,r),kept:r.kept,reordered:r.reordered}},cn=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
|
|
3
|
+
`,ln=e=>{let t={...e.unknown?.attributes},n=(e,n)=>{t[`xmlns:${e}`]??=n};n(w.c,ce),n(w.a,ue),n(w.r,fe);let r=new Ce().raw(cn);return((e,t)=>{A(e,`c:chartSpace`,t,on)})(r,{...e,unknown:{...e.unknown,attributes:t}}),r.toString()},un=(e,t)=>{if(t&&(n=e,!(n.chart?.plotArea?.groups??[]).some(e=>{let t=Ht(e),n=e=>Ut(t,e)||!!e?.labels?.some(e=>Ut(t,e));return n(e.dLbls)||e.series.some(e=>n(e.dLbls))}))){let n=sn(t);if(n&&JSON.stringify(n.model)===JSON.stringify(e))return t}var n;return ln(e)},X=(e,t,n=e,r)=>P(e,t,n,{ns:`cx`,many:r}),Z=()=>X(`spPr`,Ze),Q=()=>X(`txPr`,ot),dn=()=>X(`numFmt`,St),fn=e=>({name:e,key:e,read:e=>{if(e===`auto`)return`auto`;let t=Number(e);return e.trim()!==``&&Number.isFinite(t)?t:void 0},write:e=>String(e)}),pn=e=>T(e).filter(([e])=>e!==`xmlns`&&!e.startsWith(`xmlns:`)),mn=e=>({tags:[e],key:e,ns:`cx`,read:e=>{if(S(e).length>0)return;let t={f:C(e)};for(let[n,r]of pn(e)){if(n!==`dir`||r!==`col`&&r!==`row`)return;t.dir=r}return t.f===``?void 0:t},write:(t,n)=>{let r=j(`cx`,e);t.open(r,n.dir?[[`dir`,n.dir]]:null).text(n.f).close(r)}}),hn={attributes:[F(`ptCount`,`int`),F(`formatCode`,`str`),F(`name`,`str`)],fields:[{tags:[`pt`],key:`points`,ns:`cx`,many:!0,read:e=>{if(S(e).length>0)return;let t=pn(e);if(t.length!==1||t[0][0]!==`idx`)return;let n=Number(t[0][1]);return Number.isInteger(n)&&O(String(n))===O(t[0][1])?{idx:n,v:C(e)}:void 0},write:(e,t)=>{let n=j(`cx`,`pt`);t.v===``?e.open(n,[[`idx`,String(t.idx)]],!0):e.open(n,[[`idx`,String(t.idx)]]).text(t.v).close(n)}}]},gn={attributes:[F(`type`,`str`)],fields:[mn(`f`),mn(`nf`),X(`lvl`,hn,`levels`,!0)]},_n=new Set([`val`,`x`,`y`,`size`,`colorVal`]),vn=new Set([`cat`,`colorStr`,`entityId`]),yn={fields:[X(`data`,{attributes:[F(`id`,`int`)],fields:[{tags:[`numDim`,`strDim`],key:`dimensions`,ns:`cx`,many:!0,read:(e,t,n)=>{let r=k(e,gn,t,n);return(e.name===`numDim`?_n:vn).has(r.type)?r:void 0},write:(e,t)=>{A(e,j(`cx`,_n.has(t.type)?`numDim`:`strDim`),t,gn)}}],afterRead:e=>{e.dimensions??=[]}},`data`,!0)],afterRead:e=>{e.data??=[]}},bn={fields:[X(`txData`,{fields:[mn(`f`),N(`v`,`v`,`cx`)]}),X(`rich`,ot)]},xn=()=>[F(`pos`,`str`),F(`align`,`str`),F(`overlay`,`bool`)],Sn={attributes:xn(),fields:[X(`tx`,bn),Z(),Q()]},Cn={attributes:xn(),fields:[Z(),Q()]},wn={attributes:[F(`seriesName`,`bool`),F(`categoryName`,`bool`),F(`value`,`bool`)],fields:[]},Tn=()=>[dn(),Z(),Q(),X(`visibility`,wn),N(`separator`,`separator`,`cx`)],En={attributes:[F(`idx`,`int`),F(`pos`,`str`)],fields:Tn()},Dn={attributes:[F(`idx`,`int`)],fields:[]},On={attributes:[F(`pos`,`str`)],fields:[...Tn(),X(`dataLabel`,En,`labels`,!0),X(`dataLabelHidden`,Dn,`hiddenLabels`,!0)]},kn={attributes:[F(`idx`,`int`)],fields:[Z()]},An={attributes:[`connectorLines`,`meanLine`,`meanMarker`,`nonoutliers`,`outliers`].map(e=>F(e,`bool`)),fields:[]},jn={attributes:[F(`intervalClosed`,`str`),fn(`underflow`),fn(`overflow`)],fields:[M(`binSize`,`num`,`binSize`,`cx`),M(`binCount`,`int`,`binCount`,`cx`)]},Mn={fields:[{...M(`idx`,`int`,`indexes`,`cx`),many:!0}]},Nn={fields:[M(`parentLabelLayout`,`str`,`parentLabelLayout`,`cx`),M(`regionLabelLayout`,`str`,`regionLabelLayout`,`cx`),X(`visibility`,An),X(`aggregation`,{fields:[]}),X(`binning`,jn),X(`statistics`,{attributes:[F(`quartileMethod`,`str`)],fields:[]}),{tags:[`subtotals`],key:`subtotals`,ns:`cx`,read:(e,t,n)=>{let r=k(e,Mn,t,n);return r.unknown?void 0:r.indexes??[]},write:(e,t)=>{A(e,j(`cx`,`subtotals`),{indexes:t},Mn)}}]},Pn={attributes:[F(`layoutId`,`str`),F(`hidden`,`bool`),F(`ownerIdx`,`int`),F(`uniqueId`,`str`),F(`formatIdx`,`int`)],fields:[X(`tx`,bn),Z(),X(`dataPt`,kn,`points`,!0),X(`dataLabels`,On),M(`dataId`,`int`,`dataId`,`cx`),X(`layoutPr`,Nn),{...M(`axisId`,`int`,`axisIds`,`cx`),many:!0}]},Fn={fields:[X(`plotSurface`,{fields:[Z()]}),X(`series`,Pn,`series`,!0)],afterRead:e=>{e.series??=[]}},In={fields:[X(`tx`,bn),Z(),Q()]},Ln={fields:[Z()]},Rn={attributes:[F(`type`,`str`)],fields:[]},zn={attributes:[F(`id`,`int`),F(`hidden`,`bool`)],fields:[X(`catScaling`,{attributes:[F(`gapWidth`,`num`)],fields:[]}),X(`valScaling`,{attributes:[`max`,`min`,`majorUnit`,`minorUnit`].map(e=>F(e,`num`)),fields:[]}),X(`title`,In),X(`units`,{attributes:[F(`unit`,`str`)],fields:[X(`unitsLabel`,In)]}),X(`majorGridlines`,Ln),X(`minorGridlines`,Ln),X(`majorTickMarks`,Rn),X(`minorTickMarks`,Rn),X(`tickLabels`,{fields:[]}),dn(),Z(),Q()]},Bn={fields:[X(`plotAreaRegion`,Fn),X(`axis`,zn,`axes`,!0),Z()],afterRead:e=>{e.axes??=[]}},Vn={fields:[X(`title`,Sn),X(`plotArea`,Bn),X(`legend`,Cn)]},Hn={fields:[X(`chartData`,yn),X(`chart`,Vn),Z(),Q()]},Un={waterfall:`waterfall`,clusteredColumn:`histogram`,boxWhisker:`boxWhisker`,treemap:`treemap`,sunburst:`sunburst`,funnel:`funnel`,regionMap:`regionMap`},Wn=Object.fromEntries(Object.entries(Un).map(([e,t])=>[t,e])),Gn=new Set(Object.values(Un)),Kn=`paretoLine`,qn={cat:`cat`,val:`val`,x:`xVal`,y:`yVal`,size:`bubbleSize`,colorVal:`color`,colorStr:`color`,entityId:`entityId`},Jn=new Set([`val`,`x`,`y`,`size`,`colorVal`]),Yn=[`cat`,`colorStr`,`entityId`,`x`,`y`,`val`,`size`,`colorVal`],$=e=>{for(let t of Object.keys(e))e[t]===void 0&&delete e[t];return e},Xn=e=>$({f:e.f,dir:e.dir}),Zn=e=>e&&$({strRef:e.txData?.f?Xn(e.txData.f):void 0,v:e.txData?.v,rich:e.rich,unknown:e.unknown}),Qn=e=>e&&$({tx:Zn(e.tx),overlay:e.overlay,spPr:e.spPr,txPr:e.txPr,pos:e.pos,align:e.align,unknown:e.unknown}),$n=e=>$({numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,dLblPos:e.pos,showSerName:e.visibility?.seriesName,showCatName:e.visibility?.categoryName,showVal:e.visibility?.value,separator:e.separator,unknown:e.unknown}),er=e=>{if(!e)return;let t=$n(e),n=[...(e.labels??[]).map(e=>({idx:e.idx,...$n(e)})),...(e.hiddenLabels??[]).map(e=>({idx:e.idx,delete:!0}))];return n.length>0&&(t.labels=n),t},tr=(e,t)=>{let n=(e??[]).map(e=>({...e}));for(let e of[...t??[]].sort((e,t)=>e-t)){let t=n.find(t=>t.idx===e);t?t.subtotal=!0:n.push({idx:e,subtotal:!0})}return n.length>0?n:void 0},nr=e=>{if(!e)return;let{subtotals:t,...n}=e;return Object.keys(n).length>0?n:void 0},rr=e=>$({ptCount:e.ptCount,formatCode:e.formatCode,name:e.name,points:(e.points??[]).map(e=>({idx:e.idx,v:e.v})),unknown:e.unknown}),ir=e=>{let t=Jn.has(e.type),n=e.levels?.map(rr),r={};return e.f?r[t?`numRef`:`strRef`]=$({...Xn(e.f),cache:n?{levels:n}:void 0}):r[t?`numLit`:`strLit`]=$({levels:n}),e.nf&&(r.nf=Xn(e.nf)),e.unknown&&(r.unknown=e.unknown),r},ar=(e,t)=>{let n=$({idx:e.formatIdx,hidden:e.hidden,uniqueId:e.uniqueId,tx:Zn(e.tx),spPr:e.spPr,points:tr(e.points,e.layoutPr?.subtotals),dLbls:er(e.dataLabels),layoutPr:nr(e.layoutPr),unknown:e.unknown});for(let e of t?.dimensions??[]){let t=qn[e.type];t&&!n[t]&&(n[t]=ir(e))}return n},or=e=>$({idx:e.formatIdx,hidden:e.hidden,uniqueId:e.uniqueId,tx:Zn(e.tx),spPr:e.spPr,points:tr(e.points,e.layoutPr?.subtotals),dLbls:er(e.dataLabels),layoutPr:nr(e.layoutPr),axIds:e.axisIds,unknown:e.unknown}),sr=(e,t)=>{let n=new Map(t.map(e=>[e.id,e])),r=[],i=[],a=null;for(let t of e?.series??[]){if(t.layoutId===Kn){let e=t.ownerIdx===void 0?null:i[t.ownerIdx];e&&!e.cumulativeLine&&(e.cumulativeLine=or(t)),i.push(null);continue}let e=Un[t.layoutId]??t.layoutId,o=t.axisIds??[];a&&a.type===e&&JSON.stringify(a.axIds)===JSON.stringify(o)||(a={type:e,series:[],axIds:o},r.push(a));let s=ar(t,t.dataId===void 0?void 0:n.get(t.dataId));a.series.push(s),i.push(s)}return r},cr=e=>{let t=e.catScaling??e.valScaling;return $({type:e.catScaling||!e.valScaling?`cat`:`val`,axId:e.id,scaling:$({max:e.valScaling?.max,min:e.valScaling?.min,gapWidth:e.catScaling?.gapWidth,unknown:t?.unknown}),delete:e.hidden,majorGridlines:e.majorGridlines,minorGridlines:e.minorGridlines,title:Qn(e.title),numFmt:e.numFmt,majorTickMark:e.majorTickMarks?.type,minorTickMark:e.minorTickMarks?.type,tickLblPos:e.tickLabels?void 0:`none`,spPr:e.spPr,txPr:e.txPr,majorUnit:e.valScaling?.majorUnit,minorUnit:e.valScaling?.minorUnit,dispUnits:e.units&&$({builtInUnit:e.units.unit,dispUnitsLbl:Qn(e.units.unitsLabel),unknown:e.units.unknown}),unknown:e.unknown})},lr=e=>e&&$({txData:e.strRef||e.v!==void 0?$({f:e.strRef?Xn(e.strRef):void 0,v:e.v}):void 0,rich:e.rich,unknown:e.unknown}),ur=e=>e&&$({tx:lr(e.tx),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown}),dr=e=>{let t=e.showSerName!==void 0||e.showCatName!==void 0||e.showVal!==void 0;return $({pos:e.dLblPos,numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,visibility:t?$({seriesName:e.showSerName,categoryName:e.showCatName,value:e.showVal}):void 0,separator:e.separator,unknown:e.unknown})},fr=e=>!0===e.delete&&Object.keys(e).every(e=>e===`idx`||e===`delete`),pr=e=>{if(!e)return;let t=dr(e),n=(e.labels??[]).filter(e=>!fr(e)).map(e=>({idx:e.idx,...dr(e)})),r=(e.labels??[]).filter(fr).map(e=>({idx:e.idx}));return n.length>0&&(t.labels=n),r.length>0&&(t.hiddenLabels=r),t},mr=e=>{let t=(e??[]).filter(e=>Object.keys(e).some(e=>e!==`idx`&&e!==`subtotal`)).map(({subtotal:e,...t})=>t);return t.length>0?t:void 0},hr=(e,t,n)=>{let r=(t??[]).filter(e=>e.subtotal).map(e=>e.idx).sort((e,t)=>e-t);return r.length!==0||n?{...e,subtotals:r}:e},gr=e=>$({ptCount:e.ptCount,formatCode:e.formatCode,name:e.name,points:e.points.length>0?e.points.map(e=>({idx:e.idx,v:e.v})):void 0,unknown:e.unknown}),_r=(e,t)=>e===`color`?t.strRef||t.strLit?`colorStr`:`colorVal`:Object.keys(qn).find(t=>qn[t]===e),vr=e=>{let t=[];for(let n of[`cat`,`val`,`xVal`,`yVal`,`bubbleSize`,`color`,`entityId`]){let r=e[n];if(!r)continue;let i=r.numRef??r.strRef,a=(i?i.cache:r.numLit??r.strLit)?.levels;t.push($({type:_r(n,r),f:i?Xn(i):void 0,nf:r.nf?Xn(r.nf):void 0,levels:a&&a.length>0?a.map(gr):void 0,unknown:r.unknown}))}return t.sort((e,t)=>Yn.indexOf(e.type)-Yn.indexOf(t.type))},yr=e=>{let t=e.scaling??{},n=e.type===`cat`||e.type===`date`;return $({id:e.axId,hidden:e.delete,catScaling:n?$({gapWidth:t.gapWidth,unknown:t.unknown}):void 0,valScaling:n?void 0:$({max:t.max,min:t.min,majorUnit:e.majorUnit,minorUnit:e.minorUnit,unknown:t.unknown}),title:ur(e.title),units:e.dispUnits&&$({unit:e.dispUnits.builtInUnit,unitsLabel:ur(e.dispUnits.dispUnitsLbl),unknown:e.dispUnits.unknown}),majorGridlines:e.majorGridlines,minorGridlines:e.minorGridlines,majorTickMarks:e.majorTickMark?{type:e.majorTickMark}:void 0,minorTickMarks:e.minorTickMark?{type:e.minorTickMark}:void 0,tickLabels:e.tickLblPos===`none`?void 0:{},numFmt:e.numFmt,spPr:e.spPr,txPr:e.txPr,unknown:e.unknown})},br=e=>{let t=e.chart,n=t?.plotArea,r=[],i=[],a=[];for(let e of n?.groups??[]){let t=Wn[e.type];if(t)for(let n of e.series){let o=vr(n),s;if(o.length>0){let e=JSON.stringify(o);s=a.indexOf(e),s===-1&&(s=i.length,i.push({id:s,dimensions:o}),a.push(e))}let c=r.length;r.push($({layoutId:t,hidden:n.hidden,uniqueId:n.uniqueId,formatIdx:n.idx,tx:lr(n.tx),spPr:n.spPr,points:mr(n.points),dataLabels:pr(n.dLbls),dataId:s,layoutPr:hr(n.layoutPr,n.points,e.type===`waterfall`),axisIds:e.axIds.length>0?e.axIds:void 0,unknown:n.unknown}));let l=n.cumulativeLine;l&&r.push($({layoutId:Kn,hidden:l.hidden,ownerIdx:c,uniqueId:l.uniqueId,formatIdx:l.idx,tx:lr(l.tx),spPr:l.spPr,points:mr(l.points),dataLabels:pr(l.dLbls),layoutPr:hr(l.layoutPr,l.points,!1),axisIds:l.axIds,unknown:l.unknown}))}}let o=t?.legend;return $({chartData:{data:i},chart:$({title:(s=t?.title,s&&$({pos:s.pos,align:s.align,overlay:s.overlay,tx:lr(s.tx),spPr:s.spPr,txPr:s.txPr,unknown:s.unknown})),plotArea:$({plotAreaRegion:$({plotSurface:n?.plotSurface,series:r}),axes:(n?.axes??[]).map(yr),spPr:n?.spPr,unknown:n?.unknown}),legend:o&&$({pos:o.legendPos===`tr`?`r`:o.legendPos,align:o.align,overlay:o.overlay,spPr:o.spPr,txPr:o.txPr,unknown:o.unknown}),unknown:t?.unknown}),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown});var s},xr=(e,t)=>{if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=e=>Object.keys(e).filter(t=>e[t]!==void 0),r=n(e),i=n(t);return r.length===i.length&&r.every(n=>xr(e[n],t[n]))},Sr=(e,t)=>xr(e,br(t)),Cr=e=>{let t=x(e);if(!t||t.name!==`chartSpace`)return null;let n=xe(t,ye);if(!ve(Se(t,n)))return null;let r=new Oe(e,n),i=k(t,Hn,ye,r),a=(e=>{let t=e.chart,n=t?.plotArea,r=t?.legend;return $({chart:$({title:Qn(t?.title),plotArea:$({groups:sr(n?.plotAreaRegion,e.chartData?.data??[]),axes:(n?.axes??[]).map(cr),spPr:n?.spPr,plotSurface:n?.plotAreaRegion?.plotSurface,unknown:n?.unknown}),legend:r&&$({legendPos:r.pos,align:r.align,overlay:r.overlay,spPr:r.spPr,txPr:r.txPr,unknown:r.unknown}),unknown:t?.unknown}),spPr:e.spPr,txPr:e.txPr,unknown:e.unknown})})(i);return{model:a,kept:r.kept,reordered:r.reordered,lossy:!Sr(i,a)}},wr=e=>{let t={...e.unknown?.attributes},n=(e,n)=>{t[`xmlns:${e}`]??=n};n(w.a,ue),n(w.r,fe),n(w.cx,me);let r=br(e),i=new Ce().raw(cn);return((e,t)=>{A(e,j(`cx`,`chartSpace`),t,Hn)})(i,{...r,unknown:{...r.unknown,attributes:t}}),i.toString()},Tr=(e,t)=>{if(t){let n=Cr(t);if(n&&JSON.stringify(n.model)===JSON.stringify(e))return t}return wr(e)},Er={chart:{relType:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart`,contentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`,path:`../charts/chart{n}.xml`,graphicUri:ce},chartEx:{relType:`http://schemas.microsoft.com/office/2014/relationships/chartEx`,contentType:`application/vnd.ms-office.chartex+xml`,path:`../charts/chartEx{n}.xml`,graphicUri:me}},Dr=new Set([`area`,`bar`,`line`,`pie`,`doughnut`,`ofPie`,`scatter`,`bubble`,`radar`,`stock`,`surface`]),Or=e=>e===Er.chartEx.relType?`chartEx`:e===Er.chart.relType?`chart`:null,kr=e=>Dr.has(e)?`chart`:Gn.has(e)?`chartEx`:null,Ar=e=>{let t=sn(e);if(t)return{model:t.model,family:`chart`,kept:t.kept,lossy:!1};let n=Cr(e);return n?{model:n.model,family:`chartEx`,kept:n.kept,lossy:n.lossy}:null},jr=e=>{if(Array.isArray(e))return e.map(jr);if(typeof e!=`object`||!e)return e;let t={};for(let[n,r]of Object.entries(e))n!==`unknown`&&(t[n]=jr(r));return t},Mr=(e,t)=>{let n=e.chart?.plotArea?.groups??[],r=n.map(e=>kr(e.type)).find(e=>e!==null)??t?.family??`chart`,i=n.filter(e=>kr(e.type)!==r).map(e=>e.type),a=e;if(i.length>0){let t={...e.chart.plotArea,groups:n.filter(e=>kr(e.type)===r)};a={...e,chart:{...e.chart,plotArea:t}}}let o=(t?.family??r)===r;o||(a=jr(a));let s=o?t?.xml:void 0;return{family:r,leftOut:i,xml:r===`chartEx`?Tr(a,s):un(a,s)}};export{c as a,l as c,Or as i,u as l,Er as n,g as o,Mr as r,h as s,Ar as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./
|
|
2
|
-
import{n as e}from"./CbXtAM7H-Jg_J0dk.js";import{i as t,t as n}from"./-cpi3yOZYn6GsYN4.js";import{t as r}from"./CXUO3vYip3JPSJ7A.js";import{t as i}from"./HclGiUj8dZXDFmoM.js";import{B as a,I as o}from"./ChSvXfVMLxZsP9zG.js";import{$ as s,d as c,i as ee,l,r as u}from"./
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DRncpwDkZZX8rL9S.js","./DKVB6ddRfDJatYid.js","./DuYb_otrRZZDq6-f.js","./HclGiUj8dZXDFmoM.js","./ChSvXfVMLxZsP9zG.js","./3Ls_kOvlQseMV8Q0.js","./nHThFXCAZFOM_npq.js","./BftXEPOuf5Uwxpud.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./CbXtAM7H-Jg_J0dk.js";import{i as t,t as n}from"./-cpi3yOZYn6GsYN4.js";import{t as r}from"./CXUO3vYip3JPSJ7A.js";import{t as i}from"./HclGiUj8dZXDFmoM.js";import{B as a,I as o}from"./ChSvXfVMLxZsP9zG.js";import{$ as s,d as c,i as ee,l,r as u}from"./CN8u05DjKwNHbUHN.js";var d=e(t(),1),f=n(),p={Mode:`themeMode`,DarkGrid:`enableDarkGrid`,DarkImages:`enableDarkImages`},m={[p.Mode]:null,[p.DarkGrid]:!1,[p.DarkImages]:!1},h=e=>{let[t]=c(p.Mode,m[p.Mode]),[n]=c(p.DarkGrid,m[p.DarkGrid]),{themeMode:r}=l({mode:e??t??void 0});return e||(r===`dark`&&n?`dark`:`light`)},g=()=>{let[e]=c(p.Mode,m[p.Mode]),{themeMode:t}=l({mode:e??void 0});return t},_=a(`chart:paint`,()=>i(()=>import(`./DRncpwDkZZX8rL9S.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),v=(e,t)=>{let n=e.getElementType();if(n===`point`){let n=e.getParent();return t===n||t?.getElementType()===`point`&&t.getParent()===n?e:n}if(n===`legendEntry`){let n=e.getParent();return t===n||t?.getElementType()===`legendEntry`?e:n}if(n===`dataLabel`){let n=e.getParent()?.getParent(),r=n?.getDataLabels();return r?t===r||t?.getElementType()===`dataLabel`&&t.getParent()?.getParent()===n?e:r:e}return e},y={boxes:[],handles:[]},b=(0,d.memo)((0,d.forwardRef)((e,t)=>{let{children:n,style:i,chart:a,onChartChange:c,zoom:l=1,width:p,height:m,selection:h=null,colorScheme:b,onElementPress:x,onPointerDown:S,...C}=e,[w,T]=(0,d.useState)(()=>o.isPromiseLike(a)?null:a),[E,te]=(0,d.useState)(null),D=(0,d.useRef)(c);D.current=c;let O=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=!0,t=(e,t)=>{te(t),T(e),O.current!==e&&(O.current=e,D.current?.(e))};if(o.isPromiseLike(a))return a.then(n=>{e&&t(n,null)},n=>{e&&t(null,n)}),()=>{e=!1};t(a,null)},[a]);let[ne,k]=ee(),A=typeof p==`number`?p:k.width,j=typeof m==`number`?m:k.height,M=A?Math.round(A/l):0,N=j?Math.round(j/l):0,P=(0,d.useRef)({width:M,height:N});P.current={width:M,height:N};let F=g(),I=(b??F)===`dark`,L=(0,d.useCallback)(async e=>{let t=P.current;if(!w||!t.width||!t.height)return null;let n=w.getLayout(t);return n?(await _.load()).renderChartToSVG(n,{darkMode:e?.darkMode??!1}):null},[w]),R=(0,d.useRef)(null),z=(0,d.useRef)(null),B=(0,d.useRef)(l);B.current=l;let V=(0,d.useCallback)((e,t)=>{let n=R.current;if(!n)return null;let r=n.getBoundingClientRect(),i=B.current||1;return{x:(e-r.left)/i,y:(t-r.top)/i}},[]),H=(0,d.useCallback)((e,t)=>{let n=z.current,r=V(e,t);return w&&n&&r?w.getElementAt(r,n):null},[w,V]),U=u(t,()=>({isChartElement:()=>!0,getChart:()=>w,toSVG:L,getElementAt:H}),[w,L,H]),W=r([U,ne,R]),G=(0,d.useRef)(null),K=(0,d.useRef)(null),[q,J]=(0,d.useState)(()=>_.peek()??null),[Y,X]=(0,d.useState)(null),[re,ie]=(0,d.useState)(0),[Z,ae]=(0,d.useState)(y);(0,d.useEffect)(()=>w?.addListeners({onLayoutChange:()=>ie(e=>e+1)}),[w]),s(!(Y||E||q&&w)),(0,d.useEffect)(()=>{if(q)return;let e=!0;return _.load().then(t=>{e&&J(t)},t=>{e&&X(t)}),()=>{e=!1}},[q]);let Q=(0,d.useCallback)(()=>{let e=z.current;ae(w&&e&&h&&!h.isEmpty()?((e,t,n)=>{let r=[],i=[];for(let a of n.getItems()){if(a.getChart()!==e)continue;let o=a.getElementType();if(o===`series`||o===`dataLabels`){let n=o===`series`?a:a.getParent(),i=o===`series`?n.getPoints():n.getPoints().map(e=>e.getDataLabel());for(let n of i){let i=e.getElementBounds(n,t);i&&r.push(i)}if(r.length>0)continue}let s=e.getElementBounds(a,t);if(s&&(r.push(s),n.getItems().length===1)){let e=[s.x,s.x+s.width/2,s.x+s.width],t=[s.y,s.y+s.height/2,s.y+s.height];for(let n of e)for(let r of t)n===e[1]&&r===t[1]||i.push({x:n,y:r})}}return{boxes:r,handles:i}})(w,e,h):y)},[w,h]);(0,d.useEffect)(()=>h?.addListeners({onChange:Q}),[h,Q]),(0,d.useLayoutEffect)(()=>{let e=G.current;if(!(q&&e&&w&&M&&N))return;let t=w.getLayout({width:M,height:N});if(z.current=t,!t)return K.current?.dispose(),K.current=null,e.style.backgroundColor=``,void Q();let n=t.chartArea.fill===void 0;e.style.backgroundColor=n?`var(--sxl-color-base-100, ${I?`#121212`:`#FFFFFF`})`:``,e.style.borderRadius=n?`${t.chartArea.cornerRadius}px`:``;let r={darkMode:I,background:`transparent`};K.current?K.current.update(t,r):K.current=q.mountChart(e,t,r),Q()},[q,w,M,N,re,I,Q]),(0,d.useEffect)(()=>()=>{K.current?.dispose(),K.current=null,z.current=null},[w]);let oe=(0,d.useCallback)(e=>{if(S?.(e),e.button!==0&&e.button!==2)return;let t=z.current,n=V(e.clientX,e.clientY);if(!w||!t||!n)return;let r=w.getElementAt(n,t);if(x?.({element:r,point:n,event:e}),!h)return;if(!r||r.getElementType()===`chartArea`)return void h.clear();let i=v(r,h.getActive());h.isSelected(i)&&h.getItems().length===1||h.select([i])},[w,h,x,S,V]);if(w?.isDeleted())return;let $=Y??E;return(0,f.jsxs)(`div`,{...C,onPointerDown:oe,style:{...p===void 0?{}:{width:p},...m===void 0?{}:{height:m},...i,overflow:`hidden`},ref:W,children:[$?(0,f.jsx)(`div`,{className:`chart-element-error`,style:{padding:`8px`,fontSize:`12px`,color:`var(--sxl-color-error, #b00020)`},children:$.message}):null,(0,f.jsx)(`div`,{className:`chart-element`,ref:G,style:{width:M||`100%`,height:N||`100%`,zoom:l,position:`relative`}}),Z.boxes.length>0?(0,f.jsxs)(`div`,{className:`chart-element-selection`,style:{position:`absolute`,left:0,top:0,width:M,height:N,zoom:l,pointerEvents:`none`},children:[Z.boxes.map((e,t)=>(0,f.jsx)(`div`,{style:{position:`absolute`,left:e.x-1,top:e.y-1,width:Math.max(0,e.width),height:Math.max(0,e.height),border:`1px solid var(--sxl-color-primary, #1a73e8)`,boxSizing:`content-box`}},`box-${t}`)),Z.handles.map((e,t)=>(0,f.jsx)(`div`,{style:{position:`absolute`,left:e.x-3,top:e.y-3,width:6,height:6,background:`var(--sxl-color-base-100, #fff)`,border:`1px solid var(--sxl-color-primary, #1a73e8)`,boxSizing:`border-box`}},`handle-${t}`))]}):null]})}));b.displayName=`ChartElement`;export{p as a,m as i,g as n,h as r,b as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D8s3sJnhFxbI3Dqn.js","./ChSvXfVMLxZsP9zG.js","./HclGiUj8dZXDFmoM.js","./DuYb_otrRZZDq6-f.js","./3Ls_kOvlQseMV8Q0.js","./nHThFXCAZFOM_npq.js","./BMf827t1Ul65MHd5.js","./Dn5PwRw7rrTKNnql.js","./DcrVJCyDwGKeil2U.js","./BQnELVV0uR4T4ItQ.js","./CnXLpFE_vFrJ5Jbf.js","./DtihumgXQ7ETaN0A.js","./D7biuwkvm3zAwsBa.js","./B8i4Sr2kMQAXp0rb.js","./B5GO9v4p9L70Xb9i.js","./DyiVrm8mEnEaoZHa.js","./J_xJVgE7YlmeU-ZO.js","./w3bV7wggRayUYTd-.js","./CHlWgOAlcRCjVuhg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./HclGiUj8dZXDFmoM.js";import{F as t,G as n,I as r,L as i,_ as a,m as o,u as s}from"./ChSvXfVMLxZsP9zG.js";import{D as c,Yt as l,ht as u,t as d}from"./DuYb_otrRZZDq6-f.js";import{c as f,i as p,r as m}from"./BMf827t1Ul65MHd5.js";import{J as h,Li as g,N as _,Nn as v,Sa as ee,ai as y,ei as te,lt as ne,na as b,u as x}from"./Dn5PwRw7rrTKNnql.js";import{f as re,l as S,o as C,u as ie}from"./B8i4Sr2kMQAXp0rb.js";import{r as w,t as ae}from"./B5GO9v4p9L70Xb9i.js";import{$ as T,C as oe,Cn as se,Ct as ce,D as le,F as ue,Ft as de,Hn as E,Ht as fe,I as pe,It as me,Jt as he,K as D,Kt as O,Lt as ge,M as k,Mn as A,Nr as j,O as M,On as N,Or as P,Q as _e,Qn as ve,Qt as ye,T as F,Tn as be,Tr as I,Tt as L,U as xe,Un as R,Ut as Se,V as Ce,Xt as z,Z as we,Zn as Te,_t as Ee,ar as De,br as Oe,ct as ke,d as Ae,dr as je,en as Me,f as Ne,fr as Pe,ft as Fe,gn as Ie,gr as Le,hn as Re,hr as ze,ht as B,i as Be,it as Ve,j as He,jr as V,kt as Ue,ln as H,mr as We,n as Ge,nr as U,nt as Ke,o as qe,or as W,ot as Je,pn as Ye,qn as Xe,sn as Ze,tn as Qe,u as $e,ur as et,ut as tt,vr as nt,vt as rt,w as it,wn as at,xt as ot,yn as st,yt as ct,zn as lt,zt as ut}from"./D7biuwkvm3zAwsBa.js";var dt={ascending:`ascending`,descending:`descending`,natural:`dataSource`};function ft(e,t){let n=e.sheets??[],r=new Map;for(let e=0;e<n.length;e++){let t=n[e],i=k(t)?.tables??[];for(let e=0;e<i.length;e++){let t=i[e],n=Array.isArray(t)?t[1]:t?.v;if(!n?.id)continue;let a=(n.columns??[]).map(e=>typeof e==`string`?{name:e}:e);r.set(String(n.id),{name:n.name??``,columns:a})}}let i=new Map;for(let e=0;e<n.length;e++){let t=n[e];t?.sheetId!==void 0&&t.name&&i.set(String(t.sheetId),t.name)}let a=function(e){let t=new Map,n=e.pivotCaches??[];for(let e=0;e<n.length;e++){let r=n[e].part?.xml,i=r?/<(?:\w+:)?pivotCacheDefinition\b[^>]*?\spivotCacheId="(\d+)"[^>]*\/?>\s*<\/(?:\w+:)?ext>/.exec(r)?.[1]:void 0;i!==void 0&&t.set(i,n[e].cacheId)}return t}(e),o=new Map;for(let e=0;e<n.length;e++){let t=k(n[e])?.pivotTables??[];for(let r=0;r<t.length;r++)o.set(`${n[e].name}\0${t[r].name}`,t[r])}let s=new Set((e.pivotCaches??[]).flatMap(e=>e.fields?[e.cacheId]:[])),c=new Set;for(let e=0;e<n.length;e++){let l=n[e],u=k(l);if(!u)continue;let d=u.slicers,f=u.movables;if(d&&f)for(let e=f.length-1;e>=0;e--){let n=f[e].content;if(n?.type!==`slicer`||n.json?.source)continue;let l=n.name??``,u=d[l];if(!u)continue;if(!u.tableId){if(u.pivotBody===void 0)continue;n.json=ht(u,n.json),n.json.pivot=mt(u,i,a,o,s),c.add(l),u.cachePath&&t.markAbsorbed(u.cachePath);continue}let p=r.get(String(u.tableId)),m=p?pt(p.columns,u.columnId):null;p&&m?(n.json=ht(u,n.json,y.structuredReference(p.name,m.name)),c.add(l),u.cachePath&&t.markAbsorbed(u.cachePath)):(t.warn(`A slicer names no table; it was not imported.`,`xlsx.slicer.cacheDefinition`),f.splice(e,1))}delete u.slicers}t.slicerParts.forEach((e,n)=>{let r=Object.keys(e);r.length>0&&r.every(e=>c.has(e))&&t.markAbsorbed(n)})}function pt(e,t){if(!t)return null;for(let n=0;n<e.length;n++)if(e[n].id!==void 0&&String(e[n].id)===t)return e[n];let n=Number(t);return Number.isInteger(n)&&n>=1&&n<=e.length?e[n-1]:null}function mt(e,t,n,r,i){let a=[],o=e.pivotTables??[];for(let e=0;e<o.length;e++){let n=t.get(o[e].tabId);n&&a.push({sheet:n,name:o[e].name})}let s={sourceName:e.sourceName??``,tables:a,body:e.pivotBody??``},c=e.pivotCacheId===void 0?void 0:n.get(e.pivotCacheId);if(e.tabular){let t=a.length>0?r.get(`${a[0].sheet}\0${a[0].name}`):void 0;c??=t?.cacheId,t?.fields&&c!==void 0&&i.has(c)?s.tabular=!1===e.showMissing?{hideMissing:!0}:{}:s.body=(e.pivotData??``)+s.body}return c!==void 0&&(s.cacheId=c),e.timelineAttributes&&(s.timeline={attributes:e.timelineAttributes,body:e.timelineBody??``}),s}function ht(e,t,n){let r={...t};if(n!==void 0&&(r.source=n),e.caption!==void 0&&e.caption!==e.sourceName&&(r.caption=e.caption),!1===e.showCaption&&(r.hiddenCaption=!0),e.columnCount!==void 0&&e.columnCount>1&&(r.columnCount=e.columnCount),e.rowHeight!==void 0){let t=Math.round(e.rowHeight/9525);t>0&&t!==27&&(r.rowHeight=t)}e.style&&e.style!==`SlicerStyleLight1`&&(r.style=e.style);let i=e.sortOrder?dt[e.sortOrder]:void 0;return i&&i!==`ascending`&&(r.sortOrder=i),e.crossFilter&&e.crossFilter!==`showItemsWithDataAtTop`&&(r.crossFilter=e.crossFilter),e.lockedPosition&&(r.lockedPosition=!0),!1===e.customListSort&&(r.disabledCustomListSort=!0),e.cacheName&&(r.cacheName=e.cacheName),e.startItem&&(r.startItem=e.startItem),e.level!==void 0&&(r.level=e.level),e.uid&&(r.uid=e.uid),r}var gt=`xl/richData/rdrichvaluestructure.xml`,_t=`xl/richData/rdrichvalue.xml`,vt=`xl/richData/rdarray.xml`,yt=`xl/richData/rdsupportingpropertybagstructure.xml`,bt=`xl/richData/rdsupportingpropertybag.xml`,xt=`xl/richData/rdRichValueTypes.xml`,St=`xl/richData/richStyles.xml`,G=(e,t)=>{let n=[],r=e?.childNodes,i=r?.length??0;for(let e=0;e<i;e++){let i=r.item(e);i.nodeType!==1||t&&i.localName!==t||n.push(i)}return n},Ct=e=>G(e,`k`).map(e=>[e.getAttribute(`n`)??``,e.getAttribute(`t`)||null]),wt=e=>G(e,`v`).map(e=>({t:e.getAttribute(`t`)||null,text:e.textContent??``})),Tt=e=>{let t=new Map;for(let n of G(e,`key`)){let e=new Map;for(let t of G(n,`flag`))e.set(t.getAttribute(`name`)??``,t.getAttribute(`value`)??``);t.set(n.getAttribute(`name`)??``,e)}return t},Et=new Uint8Array,K=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(t){let n=t instanceof Blob?Et:t instanceof Uint8Array?t:new Uint8Array(t),r=t instanceof Blob?new Re(t):new N(n),i=new L(r),a=new Map;for(let e of await i.getEntries())e.directory||a.set(e.filename,e);return new e(i,a,n)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(t){let n=e.normalize(t),r=this.buffers.get(n);if(r)return r;let i=this.entries.get(n);if(!i)return null;let a=await i.getData(new Me);return this.buffers.set(n,a),a}async prefetch(e){let t=[];for(let[n,r]of this.entries)!this.buffers.has(n)&&e(n,r)&&t.push(r.getData(new Me).then(e=>{this.buffers.set(n,e)}));await Promise.all(t)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted||n.crc32===void 0)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.crc32}}async close(){await this.zip.close()}},Dt=class{constructor(e){this._sink=e,this._samples=[],this._t0=Ot(),this._tPrev=this._t0,this._heapPrev=kt()}mark(e){let t=Ot(),n=kt(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:At()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:jt(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:jt(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:jt(e.rssBytes/1048576)}))}},Ot=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function kt(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function At(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function jt(e){return Math.round(10*e)/10}var Mt=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,Nt=`-${Mt}.0-9·̀-ͯ‿-⁀`,Pt=(RegExp(`^[${Mt}]$`,`u`),RegExp(`^[${Nt}]$`,`u`),RegExp(`^[${Mt}][${Nt}]*$`,`u`)),Ft=(RegExp(`^[${Nt}]+$`,`u`),[32,10,13,9]);function It(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var Lt=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,Rt=`-${Lt}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${Lt}]$`,`u`),RegExp(`^[${Rt}]$`,`u`),RegExp(`^[${Lt}][${Rt}]*$`,`u`),RegExp(`^[${Rt}]+$`,`u`);var zt=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,Bt=`-${zt}.0-9·̀-ͯ‿-⁀`,Vt=(RegExp(`^[${zt}]$`,`u`),RegExp(`^[${Bt}]$`,`u`),RegExp(`^[${zt}][${Bt}]*$`,`u`));function Ht(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var Ut=function(e){return e===32||e===10||e===13||e===9},Wt=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},Gt=It,Kt=function(e){return It(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},qt=Ft,Jt=Pt,Yt=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},Xt=Ht,Zt=function(e){return Ht(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},Qt=Vt,$t=`http://www.w3.org/XML/1998/namespace`,en=`http://www.w3.org/2000/xmlns/`,tn={__proto__:null,xml:$t,xmlns:en},nn={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},q=-1,rn=-2,J=13,an=33,on=10,sn=60,cn=61,Y=62,X=63,ln=93,un=e=>e===34||e===39,dn=[34,39],fn=[...dn,91,Y],pn=[...dn,sn,ln],mn=[cn,X,...qt],hn=[...qt,Y,38,sn];function gn(e,t,n){switch(t){case`xml`:n!==$t&&e.fail(`xml prefix must be bound to ${$t}.`);break;case`xmlns`:n!==en&&e.fail(`xmlns prefix must be bound to ${en}.`)}switch(n){case en:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${en}.`);break;case $t:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var _n,vn=e=>Qt.test(e),yn=e=>Jt.test(e),bn={xmldecl:`xmlDeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`},xn=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=Xt,this.nameCheck=Zt,this.isName=vn,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...tn};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))gn(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=Gt,this.nameCheck=Kt,this.isName=yn,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];let{fragmentOpt:e}=this;this.state=e?J:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(nn),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[bn[e]]=t}off(e){this[bn[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return q;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case on:return this.line++,this.column=0,this.positionAtNewLine=this.position,on;case 13:return e.charCodeAt(t+1)===on&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,rn;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return q;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case on:return this.line++,this.column=0,this.positionAtNewLine=this.position,on;case 13:{let n=e.charCodeAt(t+1);n!==on&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,rn;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===rn?on:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===rn,a=i?on:r;if(a===q||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case rn:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=on;break;case q:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===q)return this.name+=e.slice(t),q;if(!Kt(n))return this.name+=e.slice(t,this.prevI),n===rn?on:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===q||!Ut(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=Wt,this.getCode=this.getCode10):(this.isChar=Yt,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case sn:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case q:break;default:this.unGet(),this.state=J,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(fn);switch(e){case Y:this.doctypeHandler?.(this.text),this.text=``,this.state=J,this.doctype=!0;break;case q:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:un(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(pn);e!==q&&(this.text+=String.fromCodePoint(e),e===ln?this.state=2:e===sn?this.state=6:un(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Y?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===Y&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case rn:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI),i;this.state=n,r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),n===J&&this.textHandler===void 0||(this.text+=i);break t}case q:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(Gt(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=J,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang=``;break;case`--`:this.state=17,this.openWakaBang=``;break;case`DOCTYPE`:this.state=2,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===Y?this.state=J:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(ln)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===ln?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case Y:this.cdataHandler?.(this.text),this.text=``,this.state=J;break;case ln:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===X||Ut(e)?(this.fail(`processing instruction without a target.`),this.state=e===X?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===q)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===X;r||Ut(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?an:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===X?this.state=26:Ut(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===Y){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=J}else e===X?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===X?this.state=an:e!==q&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(mn);if(e===X)return this.state=an,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(Ut(e)||e===cn){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===cn?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===X)return this.state=an,void this.fail(`XML declaration is incomplete.`);Ut(e)||(e!==cn&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===X)return this.state=an,void this.fail(`XML declaration is incomplete.`);Ut(e)||(un(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,X]);if(e===X)return this.state=an,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===q)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===X?this.state=an:(Ut(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===Y?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=J):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===q)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case Y:this.openTag();break;case 47:this.state=35;break;default:Ut(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===Y?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==q&&(Gt(e)?(this.unGet(),this.state=37):e===Y?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===cn?this.state=39:Ut(e)?this.state=38:e===Y?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==q&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case q:return;case cn:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===Y?this.openTag():Gt(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();un(e)?(this.q=e,this.state=40):Ut(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case on:case rn:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case sn:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case q:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();Ut(e)?this.state=36:e===Y?this.openTag():e===47?this.state=35:Gt(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(hn);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case sn:this.fail(`disallowed character.`);break;case q:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===Y?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===Y?this.closeTag():Ut(e)?this.state=44:e!==q&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case Y:this.closeTag();break;case q:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case sn:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=J,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case ln:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case Y:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case rn:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case q:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case sn:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=J,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case rn:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case q:n!==void 0&&(this.text+=t.slice(e));break t;default:Ut(i)||(r=!0)}}r&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,gn(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,gn(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==J&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?en:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=J,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=J,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=J,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}},Sn=/&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g,Cn={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},wn=(e,t)=>{let n=Cn[t];if(n!==void 0)return n;let r=t.charCodeAt(1)===120?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r>0&&r<=1114111?String.fromCodePoint(r):e},Tn=e=>{let t=e;return t.indexOf(`\r`)!==-1&&(t=t.replace(/\r\n?/g,`
|
|
3
|
+
`)),t.indexOf(`&`)!==-1&&(t=t.replace(Sn,wn)),t},En=e=>{let t=e,n=t.length;for(let e=0;e<n;e++){let n=t.charCodeAt(e);if(n===9||n===10||n===13){t=t.replace(/\r\n|[\t\n\r]/g,` `);break}}return t.indexOf(`&`)!==-1&&(t=t.replace(Sn,wn)),t},Dn=e=>e===32||e===9||e===10||e===13,On=class e{constructor(){this._openTagHandler=void 0,this._closeTagHandler=void 0,this._textHandler=void 0,this._cdataHandler=void 0,this._errorHandler=void 0,this._endHandler=void 0,this._scanners=null,this._carry=``,this._text=``,this._tags=[],this._sawRoot=!1,this._closed=!1}static{this.NEED_MORE=-1}static{this.NOT_HANDLED=-2}static decodeText(e){return Tn(e)}on(e,t){switch(e){case`opentag`:this._openTagHandler=t;break;case`closetag`:this._closeTagHandler=t;break;case`text`:this._textHandler=t;break;case`cdata`:this._cdataHandler=t;break;case`error`:this._errorHandler=t;break;case`end`:this._endHandler=t}}setElementScanners(e){if(!e||e.length===0)return void(this._scanners=null);let t=Array(128);for(let n of e){let e=n.name.charCodeAt(0);if(!(e<128)||t[e]!==void 0)throw Error(`Element scanner '${n.name}' needs an ASCII first character no other scanner uses.`);t[e]=n}this._scanners=t}fail(e){let t=Error(e),n=this._errorHandler;if(n===void 0)throw t;n(t)}write(e){if(this._closed)return this.fail(`cannot write after close.`),this;let t=e;this._carry.length!==0&&(t=this._carry+e,this._carry=``);let n=t.length,r=0;for(;r<n;){let e=t.indexOf(`<`,r);if(e===-1)return this._text+=t.slice(r),this;e>r&&(this._text+=t.slice(r,e));let i=this._markup(t,e,n);if(i===-1)return this._carry=t.slice(e),this;r=i}return this}close(){this._carry.length!==0&&(this.fail(`unexpected end.`),this._carry=``),this._sawRoot||this.fail(`document must contain a root element.`);let e=this._tags;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}return this._flushText(),this._closed=!0,this._endHandler?.(),this}_flushText(){let e=this._text;if(e.length===0)return;this._text=``;let t=this._textHandler;t!==void 0&&this._tags.length!==0&&t(Tn(e))}_markup(t,n,r){if(n+1>=r)return-1;let i=t.charCodeAt(n+1);if(i===47){let e=t.indexOf(`>`,n+2);return e===-1?-1:(this._flushText(),this._closeTag(t.slice(n+2,e).trimEnd()),e+1)}if(i===63){let e=t.indexOf(`?>`,n+2);return e===-1?-1:e+2}if(i===33){if(n+4>r)return-1;if(t.charCodeAt(n+2)===45&&t.charCodeAt(n+3)===45){let e=t.indexOf(`-->`,n+4);return e===-1?-1:e+3}if(n+9>r)return-1;if(t.startsWith(`[CDATA[`,n+2)){let e=t.indexOf(`]]>`,n+9);return e===-1?-1:(this._flushText(),this._cdataHandler?.(t.slice(n+9,e)),e+3)}let e=t.indexOf(`[`,n+2),i=t.indexOf(`>`,n+2);if(i===-1)return-1;if(e!==-1&&e<i){let n=t.indexOf(`]>`,e);return n===-1?-1:n+2}return i+1}let a=this._scanners;if(a!==null){let o=i<128?a[i]:void 0;if(o!==void 0&&t.startsWith(o.name,n+1)){let i=n+1+o.name.length;if(i>=r)return-1;let a=t.charCodeAt(i);if(a===62||a===47||Dn(a)){this._flushText();let i=o.scan(t,n,r);if(i!==e.NOT_HANDLED){if(i!==e.NEED_MORE){this._sawRoot=!0;let e=o.openTag;e!==void 0&&this._tags.push(e)}return i}}}}return this._openTag(t,n,r)}_openTag(e,t,n){let r=t+1,i=0;for(;r<n&&(i=e.charCodeAt(r),i!==62&&i!==47&&!Dn(i));)r++;if(r>=n)return-1;let a=e.slice(t+1,r),o={},s=!1;for(;;){for(;r<n&&Dn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i===62){r++;break}if(i===47){if(r+1>=n)return-1;if(e.charCodeAt(r+1)!==62){this.fail(`forward-slash in opening tag not followed by >.`),r++;continue}s=!0,r+=2;break}let t=r;for(;r<n&&(i=e.charCodeAt(r),i!==61&&i!==62&&i!==47&&!Dn(i));)r++;if(r>=n)return-1;let a=e.slice(t,r);for(;r<n&&Dn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==61){this.fail(`attribute without value.`);continue}for(r++;r<n&&Dn(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==34&&i!==39){this.fail(`unquoted attribute value.`);continue}let c=e.indexOf(i===34?`"`:`'`,r+1);if(c===-1)return-1;a!==`__proto__`&&(o[a]=En(e.slice(r+1,c))),r=c+1}this._flushText(),this._sawRoot=!0;let c={name:a,attributes:o,isSelfClosing:s};return this._openTagHandler?.(c),s?this._closeTagHandler?.(c):this._tags.push(c),r}_closeTag(e){if(e===``)return void this.fail(`weird empty close tag.`);let t=this._tags,n=this._closeTagHandler,r=t.length;for(;r-->0;){let r=t.pop();if(n?.(r),r.name===e)return;this.fail(`unexpected close tag: ${e}.`)}this.fail(`unmatched closing tag: ${e}.`)}};(function(e){e.Events={XmlDecl:`xmldecl`,Text:`text`,ProcessingInstruction:`processinginstruction`,Doctype:`doctype`,Comment:`comment`,OpenTagStart:`opentagstart`,Attribute:`attribute`,OpenTag:`opentag`,CloseTag:`closetag`,CDdata:`cdata`,Error:`error`,End:`end`,Ready:`ready`},e.parseStream=async(e,t,n)=>{if(n?.lean)return(async(e,t)=>{let n=new On,r;t.elementScanners&&n.setElementScanners(t.elementScanners),t.onOpenTag&&n.on(`opentag`,t.onOpenTag),t.onCloseTag&&n.on(`closetag`,t.onCloseTag),t.onText&&n.on(`text`,t.onText),t.onError&&n.on(`error`,t.onError);let i=t.onEnd;for(i&&n.on(`end`,()=>{r=i()});;){let{value:t,done:r}=await e.read();if(r)break;n.write(t)}return n.close(),r})(e,t);let r=new xn({position:!1,...n}),i;t.onOpenTagStart&&r.on(_n.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&r.on(_n.Events.OpenTag,t.onOpenTag),t.onCloseTag&&r.on(_n.Events.CloseTag,t.onCloseTag),t.onAttribute&&r.on(_n.Events.Attribute,t.onAttribute),t.onText&&r.on(_n.Events.Text,t.onText),t.onError&&r.on(_n.Events.Error,t.onError);let a=t.onEnd;for(a&&r.on(_n.Events.End,()=>{i=a()});;){let{value:t,done:n}=await e.read();if(n)break;r.write(t)}return r.close(),i}})(_n||={});var Z=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Q=e=>{let t=parseInt(e);return isNaN(t)?null:t},kn=e=>{let t=parseFloat(e);return isNaN(t)?null:t},$=null,An=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),jn=e=>An(e).replace(/"/g,`"`),Mn=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=null,h=null,g=null,_=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},v={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>_(e,t)??null,hasAttribute:e=>v.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:_,getRawXml:()=>g,copyToObject:(e,t,n,r)=>{let i=_(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=_(n??e,t);r!==void 0&&(f.source[e]=r)},warn:(e,t)=>{n?n(e,void 0,t?.onceKey):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),m)return m.push((e=>{let t=e.attributes??{},n=`<${e.name}`;for(let e in t){let r=t[e];n+=` ${e}="${jn(typeof r==`string`?r:r?.value??``)}"`}return n+`>`})(e)),o={local:t,tag:e,destination:null},a.push(o),s=t,void(c=e);let g=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:g,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let _=!!g&&g.to===null;if(g&&!_&&g.scope){let e=g.scope(v);e===null?_=!0:e&&(i.push(e),o.pushedScope=!0)}g&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):_?(f=null,o.destination=null):g.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=_;let ee=l?.openTag?.(v);ee!==void 0&&(f.parent=ee),g?.raw&&!_&&(m=[],h=o)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);let _=!1;if(m){if(a[a.length-1]!==h)return m.push(`</${e.name}>`),a.pop(),o=a[a.length-1]??null,s=o?.local??null,void(c=o?.tag??null);g=m.join(``),m=null,h=null,_=!0}p||l?.closeTag?.(v),_&&(g=null);let ee=a.pop()??null;o=a[a.length-1]??null,ee?.pushedScope&&i.pop();let y=ee?.destination;if(y&&ee.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=ee.visitor;e&&e.to&&y.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(y.source):n?.(`Unable to parse array for ${e.from} at ${v.getPath()}`):y.key?f.source[y.key]=y.source:typeof e.to==`string`&&(f.source[e.to]=y.source))}else y||(f=u[u.length-1]??d);s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{m?m.push(An(e)):l?.text?.(e,v)},onEnd:t}}},Nn=`IFERROR(${De}(`,Pn=Nn.toUpperCase(),Fn=H.toUpperCase(),In={kind:`none`},Ln={kind:`spilled`},Rn=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},zn=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=Rn(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},Bn=class{constructor(e){this._restored=[],this._byColumn=new Map,this._isKnown=e}anchor(e,t,n){let r=this._byColumn.get(t);r&&e===r.rowEnd+1&&e>r.rowStart&&(r.closed=!0);let i=zn(n),a=!0;for(let e=0;e<i.length&&a;e++)a=this._isKnown(i[e]);let o={rowStart:e,colStart:t,rowEnd:e,colEnd:t,closed:!1,restored:a};return this._byColumn.set(t,o),a&&this._restored.push(o),a}placeholder(e,t){let n=this._byColumn.get(t);if(n&&!n.closed&&e>n.rowStart&&e<=n.rowEnd+1&&t>=n.colStart&&t<=n.colEnd)return n.rowEnd=e,n.restored;let r=this._byColumn.get(t-1);return!(!r||r.rowStart!==e||r.colEnd!==t-1)&&(r.colEnd=t,this._byColumn.set(t,r),r.restored)}getFormulaArray(){return this._restored.map(e=>[g.rangeToString(e),`dynamic`])}},Vn=/^\s*TABLE\s*\(([^()]*)\)\s*$/i,Hn=/^\s*(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})\s*$/,Un=e=>{let t=Hn.exec(e);if(!t)return null;let n=g.fastStringToCol(t[2]),r=parseInt(t[4],10)-1;return n<0||r<0?null:{row:r,col:n,colAbsolute:t[1]===`$`,rowAbsolute:t[3]===`$`}},Wn=e=>g.cellToString({rowIndex:e.row,colIndex:e.col}),Gn=(e,t)=>{let n=Vn.exec(e);if(!n)return null;let r=n[1].split(`,`);if(r.length!==3&&r.length!==5)return null;let i=[];for(let e=0;e<r.length;e++){let t=Un(r[e]);if(!t)return null;i.push(t)}let a=t.rowStart,o=t.colStart,s=e=>e.colAbsolute&&!e.rowAbsolute&&e.col===o-1&&e.row===a,c=e=>e.rowAbsolute&&!e.colAbsolute&&e.row===a-1&&e.col===o,l={rowStart:a,colStart:o,rowEnd:t.rowEnd,colEnd:t.colEnd},u=i[0];if(i.length===3){let[,e,t]=i;return s(t)&&c(u)?{ref:l,columnInput:Wn(e)}:c(t)&&s(u)?{ref:l,rowInput:Wn(e)}:null}if(!u.rowAbsolute||!u.colAbsolute||u.row!==a-1||u.col!==o-1)return null;let[,d,f,p,m]=i;return s(f)&&c(m)?{ref:l,rowInput:Wn(p),columnInput:Wn(d)}:c(f)&&s(m)?{ref:l,rowInput:Wn(d),columnInput:Wn(p)}:null},Kn=/^(?:(\d{4})-(\d{2})-(\d{2}))?T?(?:(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/,qn=/^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/,Jn=(e,t,n)=>{let r=Math.floor((14-t)/12),i=e+4800-r,a=t+12*r-3;return n+Math.floor((153*a+2)/5)+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)-32045},Yn=Jn(1899,12,30),Xn=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Zn=class{constructor(){this._runs=null,this._text=``,this._font=null,this._inRun=!1,this._inRPr=!1}reset(){this._runs=null,this._inRun=!1,this._inRPr=!1}onOpenTag(e,t){e===`r`?(this._inRun=!0,this._text=``,this._font=null,this._runs??=[]):e===`rPr`?this._inRun&&(this._inRPr=!0):this._inRPr&&function(e,t,n){switch(e){case`b`:n.weight=er(t)?700:400;break;case`i`:n.style=er(t)?c.Style.Italic:c.Style.Normal;break;case`strike`:n.strike=D(er(t));break;case`outline`:n.outline=er(t);break;case`shadow`:n.shadow=er(t);break;case`condense`:case`extend`:{let r=Ve(e,er(t));r!==void 0&&(n.letterSpacing=r);break}case`u`:n.underline=He(t.val);break;case`vertAlign`:{let e=qe(t.val);e!==void 0&&(n.baseline=e);break}case`sz`:{let e=parseFloat(t.val??``);isNaN(e)||(n.size=e);break}case`rFont`:{let e=t.val;e&&(n.family=e);break}case`family`:{let e=$n[t.val??``];e&&(n.fallbacks=[e]);break}case`charset`:{let e=parseInt(t.val??``,10);isNaN(e)||(n.charset=e);break}case`scheme`:T(n,t.val);break;case`color`:{let e=t.rgb;if(e&&t.theme===void 0){n.color=`#`+(e.length===8?e.substring(2):e).toUpperCase();break}let r=Oe(e=>t[e]);r&&(n.color=r);break}}}(e,t,this._font??={})}onText(e){this._inRun&&(this._text+=e)}onCloseTag(e){if(e===`rPr`)this._inRPr=!1,this._font??={};else if(e===`r`&&this._inRun){let e=ct(this._text),t=this._font;this._runs.push(t?{text:e,font:t}:{text:e}),this._inRun=!1}}take(){let e=this._runs;if(this.reset(),!e)return null;for(let t=0;t<e.length;t++)if(e[t].font)return e;return null}};function Qn(e,t){let n={family:`Calibri`,size:11,...t,weight:400,style:c.Style.Normal,underline:c.UnderlineStyle.None,strike:c.StrikeStyle.None,baseline:0},r=Array(e.length);for(let t=0;t<e.length;t++){let i=e[t];if(!i.font){r[t]=i;continue}let a={...n,...i.font};r[t]={text:i.text,font:a}}return r}var $n={1:`serif`,2:`sans-serif`,3:`monospace`,4:`cursive`,5:`fantasy`},er=e=>{let t=e.val;return t===void 0||t===`1`||t===`true`},tr=e=>{let t=t=>{if(e)return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1]},n=e=>{let t=parseInt(e??``,10);return isNaN(t)?0:t};return{c:n(t(`col`)),r:n(t(`row`)),x:E(t(`colOff`)??`0`)??0,y:E(t(`rowOff`)??`0`)??0}},nr=`formulaDialect`,rr=`isKnownFunction`,ir=`date1904`,ar=`richStrings`,or=`defaultFont`,sr=(e,t,n,r,i,a,o,s)=>{let c=new Mn,l=e=>{let t=e.getAttribute(`dxfId`,Q);return t===null?void 0:r?.get(t)||(a?.(`A color filter or sort names a format that does not exist (dxfId '${t}').`),{})},u=!1,d=s?.get(`parseInlineDxf`),p=s?.get(nr),m=e=>p&&e?p.readDetached(e):e,h=new ne.TransposedBuilder,_=null,ee=`topLeft`;c.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),n=g.fastStringToRange(t);e.getSource().r=n,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),c.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,Z);i!==null&&(r.pivot=i),e.setSource(r)}}),c.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,$),e.copyToObject(n,`priority`,Q),e.copyToObject(n,`stopIfTrue`,Z);let i=e.getAttribute(`dxfId`,Q);if(i!==null){let t=r?.get(i);t||=(a?.(`Unable to load conditional color. Invalid dxfI: '${i}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,Z),e.copyToObject(n,`equalAverage`,Z),e.copyToObject(n,`stdDev`,Q),e.copyToObject(n,`bottom`,Z),e.copyToObject(n,`percent`,Z),e.copyToObject(n,`rank`,Q),e.copyToObject(n,`operator`,$),e.copyToObject(n,`text`,$),e.copyToObject(n,`timePeriod`,$)},closeTag:e=>{let t=e.getParent();if(!t?.r)return;let n=t.conditionals[t.conditionals.length-1],r=n?.rule;if(!r)return;let i={},o=Ne(r,a);o&&(i.condition=o),r.style&&(i.style=r.style),r.scale&&(i.scale=r.scale),r.stopIfTrue&&(i.stopIfTrue=!0),r.pivot&&typeof r.priority==`number`&&(i.pivotKey=r.priority),n.v=i,n.priority=r.priority,r.x14Id&&(n.x14Id=r.x14Id),delete n.rule}});let y=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};c.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t.colors??[],r=y(t);for(let e=0;e<r.length;e++)r[e].color=n[e];e.getParent().scale={type:b.ScaleType.ColorScale,stops:r}}}),c.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Q),e.copyTo(`minLength`,Q),e.copyTo(`showValue`,Z)},closeTag:e=>{let t=e.getSource(),n={type:b.ScaleType.DataBar,stops:y(t)},r=t.colors?.[0];r&&(n.color=r),t.minLength!==void 0&&(n.minLength=t.minLength),t.maxLength!==void 0&&(n.maxLength=t.maxLength),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),c.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`reverse`,Z),e.copyTo(`showValue`,Z)},closeTag:e=>{let t=e.getSource(),n={type:b.ScaleType.IconSet,stops:y(t)};t.iconSet!==void 0&&(n.iconSet=t.iconSet),t.reverse!==void 0&&(n.reverse=t.reverse),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),c.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(m(e))}}),c.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();if(t.conditions.push(n),e.copyTo(`type`,$),n.type===b.ColorStopType.Formula){let t=e.getAttribute(`val`);t!=null&&(n.value=m(String(t)))}else e.copyTo(`value`,kn,`val`);!1===e.getAttribute(`gte`,Z)&&(n.exclusive=!0)}}),c.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let n=Oe(t=>e.getAttribute(t));t.colors.push(n)}}),c.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,Z)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,Z)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),c.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=v.BuiltInOperatorNames.Color,t.param=n,e.copyToObject(n,`cellColor`,Z);let r=l(e);r&&(n.style=r)}}),c.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=v.BuiltInOperatorNames.Icon,t.param=n,e.copyToObject(n,`iconId`,Q),e.copyToObject(n,`iconSet`,$)}}),c.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),n={};t.operator=v.BuiltInOperatorNames.TopN,t.param=n,e.copyToObject(n,`filterVal`,kn),e.copyToObject(n,`percent`,Z),e.copyToObject(n,`top`,Z),e.copyToObject(n,`limit`,kn,`val`)}}),c.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),n=O(e.getAttribute(`type`),e.getAttribute(`val`),e.getAttribute(`maxVal`));t.operator=n.operator,t.param=n.param}});let te={from:`filters`,to:{},openTag:e=>{let t=e.getParent(),n={};return t.selector=v.BuiltInSelectorNames.Display,t.operator=v.BuiltInOperatorNames.InSet,t.param=n,e.copyToObject(n,`blank`,Z),e.copyToObject(n,`calendarType`,$),n}};c.registerVisitor(te);let re={from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,$))}};c.registerVisitor(re);let S={from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,$,`dateTimeGrouping`),e.copyTo(`day`,Q),e.copyTo(`hour`,Q),e.copyTo(`minute`,Q),e.copyTo(`month`,Q),e.copyTo(`second`,Q),e.copyTo(`year`,Q)}};c.registerVisitor(S);let C=new Map;C.set(`filterColumn`,{from:`filterColumn`,transparent:!0}),C.set(`filters`,te),C.set(`filter`,re),C.set(`dateGroupItem`,S),c.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),n=e.getAttribute(`and`),r=n===`and`||n===`1`,i=[];return t.operator=r?v.BuiltInOperatorNames.And:v.BuiltInOperatorNames.Or,t.param=i,e.setSource(t),i},closeTag:e=>{let t=e.getSource(),n=t?.param;if(!t||!n)return;let r=n.length===1?n[0]:Pe(t);r!==t&&(t.operator=r.operator,t.param=r.param)}}),c.registerVisitor({from:`customFilter`,openTag:e=>{let t=e.getParent(),n;Array.isArray(t)?(n={},t.push(n)):n=t;let r=z({operator:e.getAttribute(`operator`),val:e.getAttribute(`val`)},t=>e.warn(t));r&&(n.operator=r.operator,n.param=r.param)}});let ie={},w=null;c.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r={};ie={};let i=e.getAttribute(`caseSensitive`,Z);i!=null&&(ie.collatorOptions=i?x.CaseSensitiveOptions:x.CaseInsensitiveOptions);let a=e.getAttribute(`sortMethod`);a!==`stroke`&&a!==`pinYin`||(ie.collatorOptions={...ie.collatorOptions,collation:a===`stroke`?`stroke`:`pinyin`}),e.getAttribute(`columnSort`,Z)&&(r.axis=f.Axis.Column);let o=e.getAttribute(`ref`),s=t.r;w=o&&s?g.fastStringToRange(o):null,w&&(r.extent={range:B(s,w)}),n.sort=r,e.setSource(t)}}),c.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r=n.sort;if(!r)return;let i=r.sorts;i||(i=[],r.sorts=i);let a=e.getAttribute(`ref`),o=0,s=null;if(a){let e=g.fastStringToRange(a,dr),n=e.colStart,r=t.r,i=r.colStart;o=r?n-i:n,r&&w&&(s=nt(r,w,e))}r.extent&&(r.extent.sorts??=[]).push(s);let c={...ie},u=Ae(e.getAttribute(`sortBy`));u&&(c.sortOn=u);let d=l(e);d&&(c.style=d),e.copyToObject(c,`iconSet`,$),e.copyToObject(c,`customList`,$),c.reverse=e.getAttribute(`descending`,Z)??!1;let f={index:o,criteria:c};i.push(f)}});let ae=e=>{_=e.getSource(),ee=`topLeft`,e.copyTo(`topLeft`,$,`topLeftCell`);let t=Qe(e.getAttribute(`defaultGridColor`)),n=e.getAttribute(`colorId`);n===null||t||(e.getSource().gridLineColor=`index`+parseFloat(n)),e.copyTo(`showZeros`,Z),e.copyTo(`showFormulas`,Z),e.copyTo(`zoomScale`,Q),e.copyTo(`viewMode`,$,`view`);let r={};for(let[t,n]of M){let i=e.getAttribute(n,Q);i&&(r[t]=Math.min(400,Math.max(10,i)))}Object.keys(r).length>0&&(e.getSource().zoomScales=r),e.copyTo(`showRuler`,Z),e.copyTo(`showWhitespace`,Z,`showWhiteSpace`),e.copyTo(`windowProtection`,Z),e.copyTo(`showRowHeaders`,Z,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,Z,`showRowColHeaders`),e.copyTo(`showRowGridlines`,Z,`showGridLines`),e.copyTo(`showColumnGridlines`,Z,`showGridLines`),e.copyTo(`rightToLeft`,Z),e.copyTo(`showOutlineSymbols`,Z)};c.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{ae(e)},closeTag:()=>{_=null}}),c.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{T=!0,ae(e)},closeTag:()=>{T=!1,_=null}}),c.registerVisitor({from:`selection`,to:null,openTag:e=>{if(!_)return;let t=e.getAttribute(`activeCell`)?.replace(/\$/g,``),n=e.getAttribute(`sqref`)?.replace(/\$/g,``),r=e.getAttribute(`pane`)??`topLeft`;if(r!==ee){let e=_.freezePanes;if(e&&t){let i={activeCell:t};n&&n!==t&&(i.sqref=n),(e.paneSelections??={})[r]=i}return}let i={};t&&(i.cell=t);let a=e.getAttribute(`activeCellId`,Q);a!==null&&(i.rangeIndex=a),n&&n!==t&&(i.ranges=n.trim().split(/\s+/)),_.selection=i}}),c.registerVisitor({from:`pane`,to:null,openTag:e=>{if(!_)return;ee=e.getAttribute(`activePane`)??`topLeft`;let t=e.getAttribute(`state`);if(t===`frozen`||t===`frozenSplit`){let t={};_.freezePanes=t,e.copyToObject(t,`topLeft`,$,`topLeftCell`);let n=(_.topLeft?g.fastStringToCell(_.topLeft):void 0)??{colIndex:0,rowIndex:0},r={colIndex:0,rowIndex:0};e.copyToObject(r,`colIndex`,Q,`xSplit`),e.copyToObject(r,`rowIndex`,Q,`ySplit`);let i={colIndex:n.colIndex+r.colIndex,rowIndex:n.rowIndex+r.rowIndex};t.coords=g.cellToString(i)}}}),c.registerVisitor({from:`sheetPr`,transparent:!0,openTag:t=>{let n=t.getAttribute(`codeName`);n&&(e.codeName=n),!1===t.getAttribute(`enableFormatConditionsCalculation`,Z)&&(e.conditionalFormatCalculation=!1),!0===t.getAttribute(`transitionEvaluation`,Z)&&(e.transitionFormulaEvaluation=!0),!0===t.getAttribute(`transitionEntry`,Z)&&(e.transitionFormulaEntry=!0),!1===t.getAttribute(`published`,Z)&&(e.excludeFromPublishing=!0);let r={};!0===t.getAttribute(`syncHorizontal`,Z)&&(r.horizontal=!0),!0===t.getAttribute(`syncVertical`,Z)&&(r.vertical=!0);let i=t.getAttribute(`syncRef`);i&&(r.anchor=i),Object.keys(r).length>0&&(e.syncScroll=r)}}),c.registerVisitor({from:`tabColor`,to:null,openTag:t=>{let n=Oe(e=>t.getAttribute(e));n&&(e.tabColor=n)}});let T=!1,oe=()=>e.pageLayout??={};c.registerVisitor({from:`pageSetUpPr`,to:null,openTag:e=>{!0===e.getAttribute(`fitToPage`,Z)&&(oe().fitToPage=!0),!1===e.getAttribute(`autoPageBreaks`,Z)&&(oe().hideAutoPageBreaks=!0)}}),c.registerVisitor({from:`outlinePr`,to:null,openTag:t=>{let n=e=>{let n=t.getAttribute(e);return n===`0`||n===`false`},r={};n(`summaryBelow`)&&(r.summaryRow=`up`),n(`summaryRight`)&&(r.summaryColumn=`left`),(e=>{let n=t.getAttribute(e);return n===`1`||n===`true`})(`applyStyles`)&&(r.automaticStyles=!0),Object.keys(r).length>0&&(e.outline=r)}}),c.registerVisitor({from:`pageMargins`,to:null,openTag:e=>{if(T)return;let t=(t,n)=>e.getAttribute(t,kn)??n,n={left:t(`left`,.7),right:t(`right`,.7),top:t(`top`,.75),bottom:t(`bottom`,.75),header:t(`header`,.3),footer:t(`footer`,.3)};n.left===.7&&n.right===.7&&n.top===.75&&n.bottom===.75&&n.header===.3&&n.footer===.3||(oe().margins=n)}}),c.registerVisitor({from:`pageSetup`,to:null,openTag:e=>{if(T)return;let n=oe(),r=t=>e.getAttribute(t,Q)??void 0,i=t=>e.getAttribute(t,Z),a=e.getAttribute(`orientation`);a!==`landscape`&&a!==`portrait`||(n.orientation=a);for(let e of[`paperSize`,`scale`,`fitToWidth`,`fitToHeight`,`firstPageNumber`,`horizontalDpi`,`verticalDpi`,`copies`]){let t=r(e);t!==void 0&&(n[e]=t)}let o=e.getAttribute(`paperHeight`);o&&(n.paperHeight=o);let s=e.getAttribute(`paperWidth`);s&&(n.paperWidth=s),e.getAttribute(`pageOrder`)===`overThenDown`&&(n.printOrder=`overThenDown`),!0===i(`blackAndWhite`)&&(n.blackAndWhite=!0),!0===i(`draft`)&&(n.draftMode=!0),!0===i(`useFirstPageNumber`)&&(n.useFirstPageNumber=!0),!1===i(`usePrinterDefaults`)&&(n.ignorePrinterDefaults=!0);let c=e.getAttribute(`cellComments`),l=ce.find(([e])=>e===c)?.[1];l&&(n.printComments=l);let u=e.getAttribute(`errors`),d=Ue.find(([e])=>e===u)?.[1];d&&(n.printErrors=d);let f=e.getAttribute(`r:id`),p=f?t(f,`part`):null;p&&(n.printerSettings=p)}}),c.registerVisitor({from:`printOptions`,to:null,openTag:e=>{if(T)return;let t=t=>!0===e.getAttribute(t,Z);t(`horizontalCentered`)&&(oe().centerHorizontally=!0),t(`verticalCentered`)&&(oe().centerVertically=!0),t(`gridLines`)&&(oe().printGridlines=!0),t(`headings`)&&(oe().printHeadings=!0)}}),c.registerVisitor({from:`headerFooter`,to:{},openTag:e=>{if(T)return;let t={},n=t=>e.getAttribute(t,Z);!0===n(`differentOddEven`)&&(t.differentOddEven=!0),!0===n(`differentFirst`)&&(t.differentFirst=!0),!1===n(`scaleWithDoc`)&&(t.ignoreSheetScale=!0),!1===n(`alignWithMargins`)&&(t.ignoreSheetMargins=!0),Object.keys(t).length>0&&(oe().headerFooter=t)}});for(let e of F)c.registerVisitor({from:e,to:{},text:(t,n)=>{if(T)return;let r=oe(),i=r.headerFooter??={};i[e]=(i[e]??``)+ct(t)}});let se=`rowBreaks`;for(let[e,t]of[[`rowBreaks`,`rowBreaks`],[`colBreaks`,`columnBreaks`]])c.registerVisitor({from:e,to:{},openTag:()=>{se=t}});c.registerVisitor({from:`brk`,to:null,openTag:e=>{if(T)return;let t=e.getAttribute(`id`,Q);if(t==null)return;let n={index:t},r=e.getAttribute(`min`,Q);r!=null&&(n.min=r);let i=e.getAttribute(`max`,Q);i!=null&&(n.max=i),!0!==e.getAttribute(`man`,Z)&&(n.automatic=!0),!0===e.getAttribute(`pt`,Z)&&(n.pivot=!0);let a=oe();(a[se]??=[]).push(n)}}),c.registerVisitor({from:`ignoredErrors`,transparent:!0}),c.registerVisitor({from:`ignoredError`,to:null,openTag:t=>{let n=t.getAttribute(`sqref`);if(!n)return;let r=[];for(let e of me)!0===t.getAttribute(e,Z)&&r.push(e);if(r.length!==0)for(let t of n.trim().split(/\s+/))(e.ignoredErrors??=[]).push({r:t,v:r})}}),c.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`dataValidations`,to:`validations`,openTag:t=>{t.setSource([]);let n={};!0===t.getAttribute(`disablePrompts`,Z)&&(n.disablePrompts=!0);let r=t.getAttribute(`xWindow`,Q);r!==null&&(n.windowX=r);let i=t.getAttribute(`yWindow`,Q);i!==null&&(n.windowY=i),Object.keys(n).length>0&&(e.validationSettings={...e.validationSettings,...n})}});let ue={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,Z)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,$,`error`),e.copyToObject(n,`alertTitle`,$,`errorTitle`),e.copyToObject(n,`showAlertMessage`,Z,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,Z,`showInputMessage`),e.setSource(r)},closeTag:e=>{let t=e.getSource();if(!t?.rule)return;let n=le(t.rule,a);n&&(e.getAttribute(`allowBlank`,Z)&&(n.includeBlanks=!0),t.v.condition=n),delete t.rule}};c.registerVisitor(ue),c.registerVisitor({from:`formula1`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula1=j(m(e),n.type))}}),c.registerVisitor({from:`formula2`,to:{},text:(e,t)=>{let n=t.getParent().rule;n?.type&&(n.formula2=j(m(e),n.type))}}),c.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.sheet.picture.noRel`});let r=t(n,`resource`);e.getSource().resId=r}});let de={from:`slicer`,to:{},openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A slicer names no cache; it was not imported.`,{onceKey:`xlsx.sheet.slicer.noRel`});let r=t(n)?.slicers,i=e.getParent();i.slicers||={};let a=Object.keys(r);for(let e of a)i.slicers[e]=r[e]}};c.registerVisitor(de);let E={from:`timelineRef`,to:{},openTag:e=>{let n=e.getAttribute(`r:id`),r=n?t(n)?.slicers:void 0;if(!r)return void e.warn(`A timeline names no part; it was not imported.`,{onceKey:`xlsx.sheet.timeline.noRel`});let i=e.getParent();i.slicers??={};for(let e of Object.keys(r))i.slicers[e]=r[e]}},fe=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),pe=new Map;pe.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),pe.set(`dataValidation`,{...ue,closeTag:e=>{ue.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let D=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});pe.set(`formula1`,D(`formula1`)),pe.set(`formula2`,D(`formula2`)),pe.set(`f`,fe(`f`,(e,t)=>{let n=t.getParent(),r=n?.rule;r&&(r[n.key]=j(m(e),r.type))})),pe.set(`sqref`,fe(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let ge=new Map,k=[],A=new Map;A.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),A.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?ge.set(r.id,r):k.push(r)}}}),A.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,$),e.copyTo(`type`,$),e.copyTo(`priority`,Q),e.copyTo(`stopIfTrue`,Z),e.copyTo(`operator`,$),e.copyTo(`text`,$),e.copyTo(`timePeriod`,$),e.copyTo(`aboveAverage`,Z),e.copyTo(`equalAverage`,Z),e.copyTo(`stdDev`,Q),e.copyTo(`bottom`,Z),e.copyTo(`percent`,Z),e.copyTo(`rank`,Q)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),A.set(`sqref`,fe(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),A.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Q),e.copyTo(`maxLength`,Q),e.copyTo(`gradient`,Z),e.copyTo(`border`,Z),e.copyTo(`direction`,$),e.copyTo(`axisPosition`,$),e.copyTo(`negativeBarColorSameAsPositive`,Z),e.copyTo(`negativeBarBorderColorSameAsPositive`,Z)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),A.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,$),e.copyTo(`custom`,Z),e.copyTo(`reverse`,Z),e.copyTo(`showValue`,Z)},closeTag:e=>{e.getParent().iconSet=e.getSource()}});let N=new Map;N.set(`f`,fe(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:m(e)})),A.set(`cfvo`,{from:`cfvo`,to:{},scope:()=>N,openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,$),!1===e.getAttribute(`gte`,Z)&&(n.exclusive=!0)}}),A.set(`f`,fe(`f`,(e,t)=>{let n=t.getParent();n&&(n.formulas??=[]).push(m(e))})),A.set(`dxf`,{from:`dxf`,to:{},raw:!0,closeTag:e=>{if(!d)return;let t=e.getParent();if(!t)return;let n=d(e.getRawXml()??``);n&&(t.style=n)}});let P=e=>({from:e,to:{},openTag:t=>{let n=Oe(e=>t.getAttribute(e));n&&(t.getParent()[e]=n)}});A.set(`borderColor`,P(`borderColor`)),A.set(`negativeFillColor`,P(`negativeFillColor`)),A.set(`negativeBorderColor`,P(`negativeBorderColor`)),A.set(`axisColor`,P(`axisColor`)),A.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Q);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let _e=new Map;_e.set(`id`,fe(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let ve=new Map;ve.set(`slicerList`,{from:`slicerList`,transparent:!0}),ve.set(`slicer`,de);let ye=new Map;ye.set(`timelineRefs`,{from:`timelineRefs`,transparent:!0}),ye.set(`timelineRef`,E);let be=new Map([[Xe(he),pe],[Xe(ke),A],[Xe(Be),A],[Xe(Ie),_e],[Xe(R),ve],[Xe(U),ve],[Xe(W),ye],[Xe(et),C]]),I=new Set;c.registerVisitor({from:`extLst`,transparent:!0}),c.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let t=e.getAttribute(`uri`),n=Xe(t),r=be.get(n);if(r)return r;if(!st.has(n)&&!I.has(n)){I.add(n);let r=Ye[n];e.warn(r?`Extension content '${r}' (${t}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${t}) is not read; it will be lost on resave.`)}return null}}),c.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),c.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let n=e.getAttribute(`r:id`),r=e.getAttribute(`ref`);if(!r)return void e.warn(`A hyperlink has no ref; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.noRef`});e.setKey(r);let i=n?t(n):``;if(typeof i!=`string`)return void e.warn(`A hyperlink has an invalid address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});i.endsWith(`\\`)&&(i=i.substring(0,i.length-1));let a=e.getAttribute(`location`);if(a&&(i+=`#`+a),!i)return void e.warn(`A hyperlink has no address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});let o,s=e.getAttribute(`tooltip`),c=e.getAttribute(`display`);s||c?(o={address:i},s&&(o.screenTip=s),c&&(o.display=c)):o=i,e.setSource({r,v:o})}}),c.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return;let r=t(n);r?e.setSource(r.movables):e.warn(`A drawing part is missing; its shapes were not imported.`,{onceKey:`xlsx.sheet.drawing.missing`})}}),c.registerVisitor({from:`legacyDrawing`,to:`legacyDrawing`,openTag:e=>{e.setSource(t(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}}),c.registerVisitor({from:`legacyDrawingHF`,to:`legacyDrawingHF`,openTag:e=>{e.setSource(t(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}});let L=null,xe=!1,Se=new Map,Ce={from:`Fallback`,to:null},we={from:`Choice`,transparent:!0};Se.set(`Fallback`,Ce),Se.set(`Choice`,we),Se.set(`control`,{from:`control`,transparent:!0,openTag:e=>{let n=e.getAttribute(`name`),r=e.getAttribute(`r:id`),i=r?t(r,`formControl`):null;if(!i)return e.warn(`The form control '${n??``}' has no properties and was not read.`,{onceKey:`xlsx.sheet.control.noProperties`}),void(L=null);let a=i.json,o=parseInt(e.getAttribute(`shapeId`)??``,10);isNaN(o)||(a.shapeId=o);let s={anchor:{tl:{c:0,r:0,x:0,y:0},br:{c:0,r:0,x:0,y:0}},content:{type:i.type,json:a}};n&&(s.content.name=n),L={movable:s,control:a}},closeTag:()=>{L&&=(e.movables||=[],e.movables.push(L.movable),null)}}),Se.set(`controlPr`,{from:`controlPr`,transparent:!0,raw:!0,openTag:e=>{if(!L)return;let t=e.getFrom().attributes??{},n={};for(let e in t){let r=t[e];n[e]=typeof r==`string`?r:r?.value??``}lt(n,L.control)},closeTag:e=>{if(!L)return;let t=(e=>{let t=/<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);if(!t)return null;let n=t[2],r=e=>RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1],i=t[1],a=/\bmoveWithCells="(?:1|true)"/.test(i),o=/\bsizeWithCells="(?:1|true)"/.test(i);return{anchor:{tl:tr(r(`from`)),br:tr(r(`to`))},anchorType:a?o?`twoCell`:`oneCell`:`absolute`,rest:(e.slice(0,t.index)+e.slice(t.index+t[0].length)).trim()}})(e.getRawXml()??``);t?(L.movable.anchor=t.anchor,t.anchorType!==`twoCell`&&(L.movable.anchorType=t.anchorType),t.rest&&(L.control.xml=t.rest)):xe||(xe=!0,e.warn(`A form control has no anchor; it is placed at the top left of the sheet.`))}});let Te={from:`controls`,transparent:!0,scope:()=>Se};c.registerVisitor(Te);let Ee=new Map([[`Choice`,we],[`Fallback`,Ce],[`controls`,Te]]);c.registerVisitor({from:`AlternateContent`,transparent:!0,scope:()=>Ee}),c.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let n=e.getAttribute(`r:id`);if(!n)return;let r=t(n);r?e.setSource(r):e.warn(`A table part is missing; the table was not imported.`,{onceKey:`xlsx.sheet.table.missing`})}});let De=(e,t)=>{t.conditions?.length&&(e.stops=y(t)),t.minLength!==void 0&&(e.minLength=t.minLength),t.maxLength!==void 0&&(e.maxLength=t.maxLength),(t.gradient??1)&&(e.gradient=!0),t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},je=(e,t)=>{t.conditions?.length&&(e.stops=y(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},Me=e=>{if(!e.sqref)return null;let t=e.sqref.split(/\s+/).join(`,`);if(e.type===`iconSet`){if(!e.iconSet)return null;let n={type:b.ScaleType.IconSet,stops:[]};return je(n,e.iconSet),{r:t,v:{scale:n},priority:e.priority}}let n=Ne(e,a);if(!n)return null;let r={condition:n};return e.style&&(r.style=e.style),e.stopIfTrue&&(r.stopIfTrue=!0),{r:t,v:r,priority:e.priority}};c.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t?.conditionals;if(n)for(let e=0;e<n.length;e++){let t=n[e],r=t.x14Id;if(!r)continue;delete t.x14Id;let i=ge.get(r);if(!i)continue;ge.delete(r);let a=t.v?.scale;i.dataBar&&a?.type===b.ScaleType.DataBar?De(a,i.dataBar):i.iconSet&&a?.type===b.ScaleType.IconSet&&je(a,i.iconSet)}let r=[...ge.values(),...k],i=new Set,o=0;for(let e=0;e<r.length;e++){let a=Me(r[e]);a?(n||(n=[],t.conditionals=n),n.push(a)):(i.add(r[e].type??`unknown`),o++)}if(o>0){let e=[...i].map(e=>`'${e}'`).join(`, `);a?.(o===1?`An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.`:`${o} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`)}if(n){n.length>1&&n.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<n.length;e++)delete n[e].priority}}}),c.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),c.registerVisitor({from:`customPr`,to:{},openTag:e=>{let n=e.getParent();e.copyTo(`name`);let r=e.getAttribute(`r:id`);if(!r)return void e.warn(`A custom property names no part; it was not imported.`,{onceKey:`xlsx.sheet.customProperty.noRel`});let i=t(r,`resource`),a=e.getSource();a.resId=i,n.push(a)}}),c.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let t=e.getSource();for(let n of Fe){let r=e.hasAttribute(n.attribute)?e.getAttribute(n.attribute):null;t[n.key]=$e(n,r)}if(t.sheet)return;let n={};e.copyToObject(n,`hash`,$,`hashValue`),e.copyToObject(n,`algorithm`,$,`algorithmName`),e.copyToObject(n,`salt`,$,`saltValue`),e.copyToObject(n,`spinCount`,Q),e.copyToObject(n,`legacyHash`,$,`password`),Object.keys(n).length>0&&(e.getSource().password=n)}}),c.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,$,`hashValue`),e.copyToObject(i,`algorithm`,$,`algorithmName`),e.copyToObject(i,`salt`,$,`saltValue`),e.copyToObject(i,`spinCount`,Q),e.copyToObject(i,`legacyHash`,$,`password`),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),c.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:t=>{t.copyToObject(e,`defaultColSize`,kn,`defaultColWidth`);let n=t.getAttribute(`customHeight`);n!==`1`&&n!==`true`||t.copyToObject(e,`defaultRowSize`,kn,`defaultRowHeight`);let r=t.getAttribute(`baseColWidth`,Q);r&&r!==8&&(e.baseColSize=r),u=!!t.getAttribute(`zeroHeight`,Z)}}),c.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),c.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),n=e.getAttribute(`min`),r=e.getAttribute(`max`),i=n===void 0?0:parseInt(n)-1,a=r===void 0?i:parseInt(r)-1;t.r=g.runToString(i,a,!0);let o={};t.v=o,e.copyToObject(o,`sz`,kn,`width`),e.copyToObject(o,`csz`,Z,`customWidth`),e.copyToObject(o,`h`,Z,`hidden`),e.copyToObject(o,`l`,Q,`outlineLevel`),e.copyToObject(o,`cl`,Z,`collapsed`),e.getAttribute(`bestFit`,Z)&&(o.bf=!0),e.copyToObject(o,`s`,Q,`style`)}}),c.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let Le=!1,Re=!1,ze=0,Ve=``,He=``,V=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},H=new Zn;return pr(h,e,c.createEventHandler(e,i,a),a,o,{onOpenTag:e=>{Le=!0;let t=V(e.name);t===`t`||t===`v`?ze===0&&(Re=!0):t===`rPh`||t===`phoneticPr`?ze++:ze===0&&H.onOpenTag(t,e.attributes)},onText:e=>{Re&&(Ve+=e,H.onText(e))},onCloseTag:e=>{let t=V(e.name);t===`t`||t===`v`?Re=!1:t===`rPh`||t===`phoneticPr`?ze>0&&ze--:H.onCloseTag(t)},onEnd:()=>{if(!Le)return;let e=H.take();Le=!1,Re=!1,ze=0;let t=ct(Ve);return Ve=``,He=t,e?{t:`r`,v:{type:`richText`,data:{runs:Qn(e,s?.get(or))}}}:n(t)},onError:e=>{}},s,n,()=>u,()=>He)},cr=class{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}},lr=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},ur=/^\s*TABLE\s*\(/i,dr={colStart:0,colEnd:0,rowStart:0,rowEnd:0},fr=e=>e===`1`||e===`true`,pr=(e,t,n,i,o,s,c,l,u,d)=>{let h=!1,_=[],v=c?.get(ar),ee=c?.get(or),y=new Map,ne=!1,b=[],x=!1,S=null,C=null,ie=null,w=null,ae=null,T=null,oe=c?.get(`richData`)??r.EmptyArray,ce=null,le=!1,ue=g.normalizeA1ToR1C1,de=a.createConflatingRanges(),E=new Map,fe=[],pe=[],me=!1,he=!1,D=null,O=e=>{let t=c?.get(`metadata`)?.values;if(!t)return;let n=parseInt(e,10);if(!Number.isFinite(n)||n<1)return;let r=t[n-1]?.get(`XLRICHVALUE`);return r?.richValueIndex===void 0?void 0:oe[r.richValueIndex]},ge=!1,k=a.createConflatingRanges(),A,j=!1,M=-1,N=-1,P=null,_e=null,ve=e=>({t:`r`,v:{type:`hyperlink`,data:{address:A,friendly:e}}}),ye=null,F=[],be=null,I=-2,L=0,xe=``,R=``,Se=``,Ce=``,z=``,Te=``,Ee=``,De=``,Oe=``,ke=``,Ae=``,je=``,Me=``,Ne=``,Pe=!0,Fe=null,Ie=!1,Le=!1,Re=!1,ze=null,B=0,Be=e=>{let r=e.name,i=r.indexOf(`:`);if(i!==-1&&(r=r.slice(i+1)),B++,B%196608==0&&o?.(B),_e){let t=e.attributes;switch(r){case`v`:ne=!0;break;case`f`:switch(x=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;C=t.ref,S=e;break;case`array`:C=t.ref,D=C;break;case`dataTable`:{let e=((e,t,n)=>{let r=e.r1,i=fr(e.del1);if(!r&&!i)return null;let a=e.ref??g.cellToString({rowIndex:t,colIndex:n}),o=g.fastStringToRange(a);if(!o)return null;let s={ref:{rowStart:o.rowStart,colStart:o.colStart,rowEnd:o.rowEnd,colEnd:o.colEnd}},c=fr(e.dt2D);if(c||fr(e.dtr)?(r&&(s.rowInput=r),i&&(s.rowInputDeleted=!0)):(r&&(s.columnInput=r),i&&(s.columnInputDeleted=!0)),c){let t=e.r2;t&&(s.columnInput=t),fr(e.del2)&&(s.columnInputDeleted=!0)}return s})(t,M,N);e&&(pe.push(e),fr(t.ca)&&k.append(M,N));return}}let e=t.ca;e!==void 0&&(ge=e===`1`);break;case`is`:j=!0;return}j&&!x&&s?.onOpenTag?.(e)}else if(h){if(r===`c`){_e=e,A=void 0;let t=e.attributes,n=t.r;N=n===void 0?N+1:g.fastStringToCol(n);let r=t.t;r===void 0?ye=null:(ye=r,ye===`str`&&(j=!0));let i=t.s;i===void 0&&(ze!==null||Re)&&(i=`0`),i!==void 0&&(i=parseInt(i),Fe&&Fe.value===i&&Fe.colEnd+1===N?Fe.colEnd=N:(Fe={colStart:N,rowStart:M,colEnd:N,rowEnd:M,value:i},b.push(Fe))),D=null,he=!1,le=!1;let a=t.cm;me=a!==void 0&&(e=>{let t=c?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(a);let o=t.vm;if(o!==void 0){let e=O(o);if(p.isError(e)){let t=e.getCode();P={t:`e`,v:t},me&&t===p.Code.Spill&&(he=!0)}}}}else{if(Le&&r===`row`){h=!0;let t=e.attributes.r;if(M=t===void 0?M+1:parseInt(t)-1,N=-1,u?.()){let e=_[_.length-1];e&&e.max+1===M?e.max=M:_.push({min:M,max:M})}if(L=0,R=e.attributes.customHeight,R!==void 0&&(L|=cr.CustomHeight),R!==Oe&&(Pe=!0,Oe=R),xe=e.attributes.ht,xe!==void 0&&(L|=cr.Ht),xe!==De&&(Pe=!0,De=xe),Se=e.attributes.hidden,Se!==void 0&&(L|=cr.Hidden),Se!==ke&&(Pe=!0,ke=Se),z=e.attributes.s,z!==void 0&&(L|=cr.S),z!==je&&(Pe=!0,je=z),Ce=e.attributes.customFormat,Ce!==void 0&&(L|=cr.CustomFormat),Ce!==Ae&&(Pe=!0,Ae=Ce),Te=e.attributes.outlineLevel,Te!==void 0&&(L|=cr.OutlineLevel),Te!==Me&&(Pe=!0,Me=Te),Ee=e.attributes.collapsed,Ee!==void 0&&(L|=cr.Collapsed),Ee!==Ne&&(Pe=!0,Ne=Ee),L!==0){if(I+1!==M||Pe){let e=R!==void 0&&(R===`1`||R===`true`),t=Ce!==void 0&&(Ce===`1`||Ce===`true`);ze=t&&z!==void 0?z:null,t&&ze===null&&(ze=`0`),be={min:M,max:M,value:{sz:xe===void 0?-1:parseFloat(xe),csz:e,h:Se!==void 0&&(Se===`1`||Se===`true`),s:ze===null?void 0:ze===`0`?0:parseInt(ze),l:Te===void 0||Te===`0`?0:parseInt(Te),cl:Ee!==void 0&&(Ee===`1`||Ee===`true`)}},F.push(be)}else be.max=M}I=M,Pe=!1;return}if(r===`sheetData`&&(Le=!0),!Ie&&r===`sheetData`){Ie=!0;let e=t.cols,n=e?e.length:0;for(let t=0;!Re&&t<n;t++)e[t].v.s&&(Re=!0)}n?.onOpenTag?.(e)}},Ve=t=>{let r=t.name;if(r===`sheetData`&&(Le=!1),!x||r!==`c`&&r!==`f`||(S&&(w=E.get(S)??null),w&&(A=(e=>{if(e.length<11||(32|e.charCodeAt(0))!=104||!/^HYPERLINK\(/i.test(e))return;let t=1,n=!1,r=10;for(;r<e.length&&t>0;r++){let i=e.charCodeAt(r);n?i===34&&(e.charCodeAt(r+1)===34?r++:n=!1):i===34?n=!0:i===40?t++:i===41&&t--}if(t!==0||e.slice(r).trim().length>0)return;let i=/^HYPERLINK\(\s*"((?:[^"]|"")*)"\s*[,)]/i.exec(e);return i?i[1].replace(/""/g,`"`):null})(w[2]),de.append(M,N,w),ge&&k.append(M,N)),D!==null&&fe.push([D,me?he?`error`:`dynamic`:`fixed`]),x=!1,w=null,S=null,C=null,ne=!1,ge=!1,D=null,me=!1,he=!1),_e){let n=r.indexOf(`:`);if(n!==-1&&(r=r.slice(n+1)),j){if(r===`is`||r===`v`){let t=s?.onEnd?.();t==null||le&&d?.()===``||e.pushAt(M,N,A!==void 0&&typeof t==`number`?ve(d?.()??``):typeof t==`number`?``+t:t)}else r!==`f`&&s?.onCloseTag?.(t)}ne&&=!1,r===`c`&&(_e=null,j=!1)}else{if(h)return h=!1,void(Fe=null);n?.onCloseTag?.(t)}},He=t=>{let r=t.trim();if(ne){switch(P=null,ye){case null:case`n`:P=m.flushSubnormal(parseFloat(r));break;case`b`:P=r===`1`||r===`true`;break;case`s`:{let e=parseInt(r,10),t=y.get(e);if(t===void 0){let n=v?.get(e);t=n?Qn(n,ee):null,y.set(e,t)}P=t?{t:`r`,v:{type:`richText`,data:{runs:t}}}:r;break}case`d`:{let e=((e,t=!1)=>{if(!e)return null;let n=qn.exec(e);if(n){let[,e,t,r]=n;return e===void 0&&t===void 0&&r===void 0?null:(3600*parseFloat(e??`0`)+60*parseFloat(t??`0`)+parseFloat(r??`0`))/86400}let r=Kn.exec(e);if(!r)return null;let[,i,a,o,s,c,l,u]=r;if(i===void 0&&s===void 0)return null;let d=0;if(i!==void 0){let e=parseInt(i,10),n=parseInt(a,10),r=parseInt(o,10);if(n<1||n>12||r<1||r>31)return null;let s=Jn(e,n,r)-Yn;if(d=s<=60?s-1:s,t&&(d-=1462),d<0)return null}return s!==void 0&&(d+=(3600*parseInt(s,10)+60*parseInt(c,10)+(l===void 0?0:parseInt(l,10))+(u===void 0?0:parseFloat(u)))/86400),d})(r,!0===c?.get(ir));e===null?l&&(i?.(`Date '${r}' in cell ${g.cellToString({colIndex:N,rowIndex:M})} is not a date this workbook can hold; kept as text.`,void 0,`xlsx.cell.isoDateText`),P=``+l(r)):P=e;break}case`e`:if(r===`#VALUE!`){let e=_e.attributes.vm;if(e!==void 0){let t=O(e);if(p.isError(t)){P={t:`e`,v:t.getCode()};break}if(te.isJSON(t)){P={t:`r`,v:t};break}}}let e=p.getBuiltInByLabel(r);e?P={t:`e`,v:e.getCode()}:(P=r,i?.(`Unknown formula error '${r}' in cell ${g.cellToString({colIndex:N,rowIndex:M})}`));break;case`str`:case`inlineStr`:j=!0}P!==null&&e.pushAt(M,N,A===void 0||typeof P!=`number`&&typeof P!=`boolean`?P:ve(P))}let a=S!==null;if(S){if(ae===S)w=T;else{if(w=E.get(S)??null,!w){let e=[];ie=ue(r,M,N,e),w=[ie,e,r],E.set(S,w)}ae=S,T=w}S=null}if(x){let e=r,t=a?void 0:c?.get(rr);if(t){let n=(e=>{if(e.length<Nn.length||e.slice(0,Nn.length).toUpperCase()!==Pn)return In;let t=Rn(e,Nn.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return In;let n=t.value;return n.toUpperCase()===Fn?Ln:n.length===0?In:{kind:`formula`,formula:n}})(r);n.kind!==`none`&&(ce??=new Bn(t),n.kind===`spilled`?le=ce.placeholder(M,N):ce.anchor(M,N,n.formula)&&(e=n.formula,ge||=(e=>zn(e).some(e=>we(e)||!0===re.get(e)?.getDeclaration().getReturnType()?.isVolatile()))(e)))}if(le)ge=!1;else{let t=[];ie=ue(e,M,N,t),w=[ie,t,e]}}j?s?.onText?.(t):h||n?.onText?.(r)},V={r:void 0,t:void 0,s:void 0,cm:void 0,vm:void 0},Ue={name:`c`,attributes:V,isSelfClosing:!1},H={t:void 0,si:void 0,ref:void 0,ca:void 0},We={name:`f`,attributes:H,isSelfClosing:!1},Ge={name:`v`,attributes:{},isSelfClosing:!1},U={r:void 0,s:void 0,ht:void 0,hidden:void 0,collapsed:void 0,customHeight:void 0,customFormat:void 0,outlineLevel:void 0},Ke={name:`row`,attributes:U,isSelfClosing:!1},qe=On.NEED_MORE,W=On.NOT_HANDLED,Je=On.decodeText,Ye=!1,Xe=(e,t,n,r)=>{for(;;){let i=0;for(;t<n&&((i=e.charCodeAt(t))===32||i===9||i===10||i===13);)t++;if(t>=n)return qe;if(i===62)return Ye=!1,t+1;if(i===47)return t+1>=n?qe:e.charCodeAt(t+1)===62?(Ye=!0,t+2):W;let a=t;for(;t<n&&(i=e.charCodeAt(t))!==61;){if(i===62||i===47||i===32||i===9||i===10||i===13)return W;t++}if(t+1>=n)return qe;let o=t-a,s=e.charCodeAt(t+1);if(s!==34&&s!==39)return W;let c=t+2,l=c;for(;l<n&&(i=e.charCodeAt(l))!==s;){if(i===38||i<32)return W;l++}if(l>=n)return qe;t=l+1;let u=e.charCodeAt(a);if(r===2)switch(o){case 1:u===114?U.r=e.slice(c,l):u===115&&(U.s=e.slice(c,l));break;case 2:e.startsWith(`ht`,a)&&(U.ht=e.slice(c,l));break;case 6:e.startsWith(`hidden`,a)&&(U.hidden=e.slice(c,l));break;case 9:e.startsWith(`collapsed`,a)&&(U.collapsed=e.slice(c,l));break;case 12:e.startsWith(`customHeight`,a)?U.customHeight=e.slice(c,l):e.startsWith(`customFormat`,a)?U.customFormat=e.slice(c,l):e.startsWith(`outlineLevel`,a)&&(U.outlineLevel=e.slice(c,l))}else if(r===0)o===1?u===114?V.r=e.slice(c,l):u===116?V.t=e.slice(c,l):u===115&&(V.s=e.slice(c,l)):o===2&&e.charCodeAt(a+1)===109&&(u===99?V.cm=e.slice(c,l):u===118&&(V.vm=e.slice(c,l)));else if(o===1)u===116&&(H.t=e.slice(c,l));else if(o===2){let t=e.charCodeAt(a+1);u===115&&t===105?H.si=e.slice(c,l):u===99&&t===97&&(H.ca=e.slice(c,l))}else o===3&&e.startsWith(`ref`,a)&&(H.ref=e.slice(c,l))}},Ze=(e,t,n)=>e.charCodeAt(t+1)===47&&e.charCodeAt(t+2)===n&&e.charCodeAt(t+3)===62;return{...n,onEnd:()=>{if(u?.()){let e=0,t=[],n=(e,t)=>({min:e,max:t,value:{sz:-1,csz:!1,h:!0,s:void 0,l:0,cl:!1}});for(let r of _)r.min>e&&t.push(n(e,r.min-1)),e=Math.max(e,r.max+1);e<=1048575&&t.push(n(e,1048575)),t.length>0&&(F.push(...t),F.sort((e,t)=>e.min-t.min))}F.length>0&&(t.rows=g.runsToRefs(F,!1));let r=de.done(lr);r=((e,t)=>{let n=null;for(let t=0;t<e.length;t++){let r=e[t];if(!ur.test(r.value[2]))continue;n??=new Map;let i=r.value[0],a=n.get(i);a?a.push(r):n.set(i,[r])}if(n===null)return e;let r=new Set;for(let e of n.values()){let n=e[0],i={rowStart:n.rowStart,colStart:n.colStart,rowEnd:n.rowEnd,colEnd:n.colEnd},a=0;for(let t=0;t<e.length;t++){let n=e[t];n.rowStart<i.rowStart&&(i.rowStart=n.rowStart),n.colStart<i.colStart&&(i.colStart=n.colStart),n.rowEnd>i.rowEnd&&(i.rowEnd=n.rowEnd),n.colEnd>i.colEnd&&(i.colEnd=n.colEnd),a+=(n.rowEnd-n.rowStart+1)*(n.colEnd-n.colStart+1)}if(a!==(i.rowEnd-i.rowStart+1)*(i.colEnd-i.colStart+1))continue;let o=Gn(g.resolveRelativeToA1(n.value[1],i.rowStart,i.colStart),i);if(o){t.push(o);for(let t=0;t<e.length;t++)r.add(e[t])}}return r.size===0?e:e.filter(e=>!r.has(e))})(r,pe);let i=r.length;if(i>0||pe.length>0){let e=Array(i);for(let t=0;t<i;t++){let n=r[t],i=g.rangeToString(n),a=n.value[1],o=g.resolveRelativeToA1(a,n.rowStart,n.colStart);e[t]=[i,o]}for(let t=0;t<pe.length;t++){let n=pe[t],r=n.ref;e.push([g.cellToString({rowIndex:r.rowStart,colIndex:r.colStart}),se(n)]),fe.push([g.rangeToString(r),`dynamic`])}t.formulas=e}let o=k.done(!0),s=o.length;if(s>0){let e=Array(s);for(let t=0;t<s;t++){let n=o[t],r=g.rangeToString(n);e[t]=r}t.volatile=e}ce&&fe.push(...ce.getFormulaArray()),fe.length>0&&(t.formulaArray=[...fe]);let c=b.length;if(c>0){b.sort(a.createRangeComparator(f.Axis.Column));let e=b[0],n=e.colStart,r=e.colEnd,i=e.rowEnd,o=e.value,s=[];s.push(e);let l=null;for(let t=1;t<c;t++)l=b[t],o!==l.value||n!==l.colStart||r!==l.colEnd||i+1!==l.rowEnd?(s.push(l),e=l,n=e.colStart,r=e.colEnd,i=e.rowEnd,o=e.value):(i=l.rowEnd,e.rowEnd=i);let u=s.length,d=Array(u);for(let e=0;e<u;e++){let t=s[e],n=g.rangeToString(t);d[e]=[n,t.value]}t.directStyles=d}let l=e.build();l&&(t.data=l.tuples),n?.onEnd?.()},onOpenTag:Be,onCloseTag:Ve,onText:He,elementScanners:[{name:`c`,scan:(e,t,n)=>{if(!h||_e!==null)return W;V.r=V.t=V.s=V.cm=V.vm=void 0;let r=Xe(e,t+2,n,0);if(r<0)return r;let i=V.t;if(V.r===void 0||i===`str`||i===`inlineStr`)return W;let a=!1,o=-1,s=-1,c=-1,l=-1,u=r;if(!Ye)for(H.t=H.si=H.ref=H.ca=void 0;;){let t=e.indexOf(`<`,r);if(t===-1||t+3>=n)return qe;for(let n=r;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9&&t!==10&&t!==13)return W}let i=e.charCodeAt(t+1),d=e.charCodeAt(t+2);if(i===47){if(!Ze(e,t,99))return W;u=t+4;break}if(i===102&&!a&&c===-1&&(d===32||d===62||d===47)){if(a=!0,r=Xe(e,t+2,n,1),r<0)return r;if(H.t===`dataTable`)return W;if(Ye)continue;let i=e.indexOf(`<`,r);if(i===-1||i+3>=n)return qe;if(!Ze(e,i,102))return W;o=r,s=i,r=i+4}else if(i===118&&d===62&&c===-1){let i=e.indexOf(`<`,t+3);if(i===-1||i+3>=n)return qe;if(!Ze(e,i,118))return W;c=t+3,l=i,r=i+4}else return W}return Be(Ue),a&&(Be(We),s>o&&He(Je(e.slice(o,s))),Ve(We)),c!==-1&&(Be(Ge),l>c&&He(Je(e.slice(c,l))),Ve(Ge)),Ve(Ue),u}},{name:`row`,openTag:Ke,scan:(e,t,n)=>{if(!Le||h||_e!==null)return W;U.r=U.s=U.ht=U.hidden=U.collapsed=U.customHeight=U.customFormat=U.outlineLevel=void 0;let r=Xe(e,t+4,n,2);return r<0?r:Ye||U.r===void 0?W:(Be(Ke),r)}}]}},mr=new Map([[`urn:schemas-microsoft-com:vml`,`v`],[`urn:schemas-microsoft-com:office:office`,`o`],[`urn:schemas-microsoft-com:office:excel`,`x`]]),hr=[...mr].map(([e,t])=>` xmlns:${t}="${e}"`).join(``),gr=/<(\/?)([A-Za-z_][\w.-]*(?::[\w.-]+)?)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g,_r=/(\s+)([A-Za-z_][\w.-]*(?::[\w.-]+)?)(\s*=\s*)("[^"]*"|'[^']*')/g,vr=/\sxmlns(?::([\w.-]+))?\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function yr(e){if(!e||!(e=>{let t;for(vr.lastIndex=0;(t=vr.exec(e))!==null;){let e=mr.get(t[2]??t[3]??``);if(e&&e!==(t[1]??``))return!0}return!1})(e))return e;let t=[],n=(e,n,r)=>{let i=e.indexOf(`:`);if(i===-1&&r)return null;let a=i===-1?``:e.substring(0,i);if(a===`xmlns`)return null;let o=((e,n)=>{let r=n?.get(e);if(r!==void 0)return r;for(let n=t.length-1;n>=0;n--){let r=t[n].bindings.get(e);if(r!==void 0)return r}})(a,n),s=o===void 0?void 0:mr.get(o);return s?`${s}:${i===-1?e:e.substring(i+1)}`:null},r=!1,i=!1,a=e.replace(gr,(e,a,o,s,c)=>{if(a){let r=t[t.length-1],i=n(o,null,!1);return r&&r.name===o&&(r.nested>0?r.nested--:t.pop()),i?`</${i}>`:e}let l=(e=>{let t,n=null;for(vr.lastIndex=0;(t=vr.exec(e))!==null;)(n??=new Map).set(t[1]??``,t[2]??t[3]??``);return n})(s);l?.forEach((e,t)=>{let n=[...mr].find(([,e])=>e===t)?.[0];n&&n!==e&&(r=!0)});let u=n(o,l,!1),d=s.replace(_r,(e,t,r,i,a)=>{if(r===`xmlns`||r.startsWith(`xmlns:`)){let t=a.slice(1,-1);return mr.has(t)?``:e}let o=n(r,l,!0);return o?`${t}${o}${i}${a}`:e});if(i||(i=!0,d=d.replace(/\s+$/,``)+hr),!c){let e=t[t.length-1];l?t.push({name:o,bindings:l,nested:0}):e&&e.name===o&&e.nested++}return`<${u??o}${d}${c}>`});return r?e:a}var br={creator:`author`,category:`category`,description:`comments`,contentStatus:`contentStatus`,created:`creationDate`,keywords:`keywords`,lastModifiedBy:`lastAuthor`,modified:`lastModifiedDate`,lastPrinted:`lastPrinted`,revision:`revisionNumber`,subject:`subject`,title:`title`},xr={Company:`company`,Manager:`manager`},Sr={lpwstr:C.Type.String,lpstr:C.Type.String,bstr:C.Type.String,i1:C.Type.Number,i2:C.Type.Number,i4:C.Type.Number,i8:C.Type.Number,int:C.Type.Number,ui1:C.Type.Number,ui2:C.Type.Number,ui4:C.Type.Number,ui8:C.Type.Number,uint:C.Type.Number,r4:C.Type.Float,r8:C.Type.Float,decimal:C.Type.Float,bool:C.Type.Boolean,filetime:C.Type.Date,date:C.Type.Date},Cr=e=>{let t=e.kind?Sr[e.kind]:void 0;if(!t)return null;let n=e.value.trim(),r;if(t===C.Type.String)r={key:e.key,type:t,value:e.value};else if(t===C.Type.Boolean){if(n!==`true`&&n!==`false`&&n!==`1`&&n!==`0`)return null;r={key:e.key,type:t,value:n===`true`||n===`1`}}else if(t===C.Type.Date){let i=new Date(n);if(!n||isNaN(i.getTime()))return null;r={key:e.key,type:t,value:i.toISOString()}}else{let i=Number(n);if(!n||!Number.isFinite(i))return null;let a=t===C.Type.Number&&i>=-2147483648&&i<=2147483647;r={key:e.key,type:a?t:C.Type.Float,value:i}}return e.linkTarget&&(r.linkTarget=e.linkTarget),r},wr=`hiddenXfs`,Tr=e=>(Array.isArray(e)?e[1]:e?.v)?.s,Er=e=>{if(!e||e.length===0)return!1;let t=g.refsToRuns(e,!0),n=0;for(let e of t){if(e.min>n||e.value?.s===void 0)return!1;n=Math.max(n,e.max+1)}return n>ue},Dr=(e,t)=>{e.protection={...e.protection,showFormulas:t}},Or=`pivotButtonXfs`,kr=(e,n)=>{let r=e.styles?.direct;if(!r||r.length===0)return;let i=null,a=new Map,o=new Map,s=(e,s,c,l)=>{let u=``;l&&(u=o.get(l)??t.JSONStableStringify(l),o.set(l,u));let d=`${e}|${s??``}|${c??``}|${u}`,f=a.get(d);if(f!==void 0)return f;let p=r[e],m=p?jr(p,s,c,l):null,h=n?.get(e);return f=m===p?e:m||h!==void 0?((e,a)=>{if(!i){i=new Map;for(let e=0;e<r.length;e++){let a=t.JSONStableStringify(r[e]),o=n?.get(e);o!==void 0&&(a+=`|${o}`),i.has(a)||i.set(a,e)}}let o=t.JSONStableStringify(e);a!==void 0&&(o+=`|${a}`);let s=i.get(o);return s===void 0&&(s=r.length,r.push(e),i.set(o,s),a!==void 0&&n.set(s,a)),s})(m??{},h):null,a.set(d,f),f},c=new Map((e.pivotCaches??[]).map(e=>[e.cacheId,e.fields]));for(let t of e.sheets??[]){let e=k(t),n=e?.pivotTables,r=e?.directStyles;if(!e||!n||n.length===0||!r||r.length===0)continue;let i=r,a=!1;for(let e of n){let t=Ar(e,c.get(e.cacheId));if(!t)continue;let n=[];for(let e of i){let r=g.fastStringToRange(e[0]),i=Rr(r,t.coords);if(!i){n.push(e);continue}a=!0;for(let t of zr(r,i))n.push([g.rangeToString(t),e[1]]);let{rowIndex:o,colIndex:c}=t.origin;for(let r=i.rowStart;r<=i.rowEnd;r++){let a=i.colStart,l=null,u=e=>{l!==null&&n.push([g.rangeToString({rowStart:r,rowEnd:r,colStart:a,colEnd:e}),l])};for(let n=i.colStart;n<=i.colEnd;n++){let{numberFormat:d,labelIndent:f,user:p}=t.formats.formatAt(r-o,n-c),m=s(e[1],d,f,p);n!==i.colStart&&m===l||(n!==i.colStart&&u(n-1),a=n,l=m)}u(i.colEnd)}}i=n}a&&(e.directStyles=i)}},Ar=(e,t)=>{let n=_(e,t);if(!n||!e.location)return null;let r=g.fastStringToRange(e.location),i={rowIndex:r.rowStart-n.top,colIndex:r.colStart};return i.rowIndex<0||r.rowEnd!==i.rowIndex+n.rows-1?null:{coords:{rowStart:i.rowIndex,colStart:i.colIndex,rowEnd:r.rowEnd,colEnd:i.colIndex+n.columns-1},origin:i,formats:n}},jr=(e,t,n,r)=>{let i=e,a=r?.numberFormat??t??0;if(e.numberFormat!==void 0&&Mr(e.numberFormat,a)){let{numberFormat:e,...t}=i;i=t}let o=i.alignment;if(n!==null&&o?.horizontal===u.HorizontalAlignment.Left&&(o.indent??0)===n){let{horizontal:e,indent:t,...n}=o,{alignment:r,...a}=i;i=Lr(n)?a:{...a,alignment:n}}if(r){let{numberFormat:e,...t}=r;if(i=Fr(i,t),i.alignment&&Lr(i.alignment)){let{alignment:e,...t}=i;i=t}}if(i===e)return e;for(let e of Object.keys(i))if(i[e]!==void 0&&(e!==`named`||i.named!==d.BuiltInName.Normal))return i;return null},Mr=(e,t)=>e===t||l.toBuiltInID(e)===l.toBuiltInID(t),Nr=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Pr=(e,n)=>!(!Nr(e)||!Nr(n))&&(e.patternType===`solid`&&n.patternType===`solid`?e.foreground===n.foreground:t.JSONStableStringify(e)===t.JSONStableStringify(n)),Fr=(e,t)=>{let n=null,r=(t,r)=>{n??={...e},r===void 0?delete n[t]:n[t]=r};for(let n of Object.keys(e)){let i=e[n],a=t[n];if(a!==void 0&&i!==void 0){if(n===`fill`)Pr(i,a)&&r(n);else if(Nr(i)&&Nr(a)){let e=Fr(i,a);e!==i&&r(n,Object.keys(e).some(t=>e[t]!==void 0)?e:void 0)}else i===a&&r(n)}}return n??e},Ir={vertical:u.VerticalAlignment.Bottom,relativeIndent:0,overflow:u.Overflow.Visible,rotation:0},Lr=e=>Object.keys(e).every(t=>e[t]===void 0||Ir[t]===e[t]),Rr=(e,t)=>{let n=Math.max(e.rowStart,t.rowStart),r=Math.min(e.rowEnd,t.rowEnd),i=Math.max(e.colStart,t.colStart),a=Math.min(e.colEnd,t.colEnd);return n<=r&&i<=a?{rowStart:n,rowEnd:r,colStart:i,colEnd:a}:null},zr=(e,t)=>{let n=[];return e.rowStart<t.rowStart&&n.push({...e,rowEnd:t.rowStart-1}),e.rowEnd>t.rowEnd&&n.push({...e,rowStart:t.rowEnd+1}),e.colStart<t.colStart&&n.push({rowStart:t.rowStart,rowEnd:t.rowEnd,colStart:e.colStart,colEnd:t.colStart-1}),e.colEnd>t.colEnd&&n.push({rowStart:t.rowStart,rowEnd:t.rowEnd,colStart:t.colEnd+1,colEnd:e.colEnd}),n},Br=`xfComplements`,Vr=(e,t)=>{if(typeof e==`string`)return void t.push(e);let n=Array.isArray(e)?e:[e];for(let e=0;e<n.length;e++){let r=g.rangeToString(n[e]);r&&t.push(r)}},Hr=e=>{let t=Array.isArray(e)?e[1]:e.v;if(!t||!(`s`in t))return;let n=t.s;return delete t.s,n},Ur=(e,t,n,r)=>{if(!e)return;let i=t?2:1,a=t?n.rowStart:n.colStart,o=t?n.rowEnd:n.colEnd,s,c=-1;for(let n of e){let e=g.refToRun(n,t),l=Hr(n);e&&l!==void 0?l!==c||(t?s.colEnd:s.rowEnd)+1!==e.min?(s={colStart:t?e.min:a,rowStart:t?a:e.min,colEnd:t?e.max:o,rowEnd:t?o:e.max,value:{kind:i,index:l}},c=l,r.push(s)):t?s.colEnd=e.max:s.rowEnd=e.max:c=-1}},Wr={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.ms-excel.template.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.ms-excel.intlmacrosheet+xml":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.featurepropertybag+xml":`featurePropertyBag`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Gr=w({readXLSX:()=>Xr}),Kr=e=>e.startsWith(`/`)?e.slice(1):e,qr=[208,207,17,224,161,177,26,225],Jr=/^xl\/worksheets\/[^/]+\.xml$/i,Yr=e=>typeof e==`string`?e:(e?.runs??[]).map(e=>e.text??``).join(``),Xr=async(a,c)=>{let{password:l,onVBA:u,profile:f,calcOnLoad:p=`auto`,createWorkbookOptions:m={},..._}=c??{};await y.load();let v=!!m.origin&&typeof m.origin!=`string`,te=f?new Dt(typeof f==`function`?f:void 0):null,ne=[],b=(e,t,n)=>{ne.push([e,t??``,n])},x={onWarning:b},C=c?.progress,w=C?.onProgress?C.onProgress.bind(C):void 0,T=a.byteLength,se=0,ce=0,le=w?e=>{if(se<=0)return;ce+=e;let t=Math.min(T,Math.round(ce/se*T));w(t,T)}:void 0,E=e(()=>import(`./D8s3sJnhFxbI3Dqn.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),me=null;try{me=new DOMParser}catch{}let he=null;try{he=new XMLSerializer}catch{}let D,O,j,M=null;me||(M=e(()=>import(`./J_xJVgE7YlmeU-ZO.js`).then(e=>ae(e.default,1)),__vite__mapDeps([16,14]),import.meta.url));try{let[e,t]=await Promise.all([M,E]);D=new t.DOMTransformer,O=me??new e.DOMParser,j=he??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let N=e=>j.serializeToString(e);if((e=>{if(e.byteLength<qr.length)return!1;let t=new Uint8Array(e,0,qr.length);return qr.every((e,n)=>t[n]===e)})(a))throw new s(`This is an Excel 97-2003 workbook (.xls), which cannot be read. Save it as '.xlsx' and try again.`);let F;try{F=await K.create(a)}catch(e){throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:e})}te?.mark(`zip-open`);try{if(!F.has(`[Content_Types].xml`))throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let a=e=>{let t=F.getEntry(e);return t?{content:t}:void 0},o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],featurePropertyBag:[],overrides:{},sst:``,style:``,defaults:{}};{let e=((e,t)=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;e.overrides[n.startsWith(`/`)?n.slice(1):n]=t;let i=Wr[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{t?.(`Error parsing content types: ${e?.message??e}`)}}))(o,e=>{ne.push([e,`[Content_Types].xml`])}),t=await F.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await _n.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}v&&await F.getBuffer(`[Content_Types].xml`)}te?.mark(`content-types`);let c=o.sst,l=new Set;for(let e of o.sheets)l.add(Kr(e));c&&l.add(Kr(c));for(let e of l)se+=F.uncompressedSize(e);if(await F.prefetch(e=>!l.has(e)&&!Jr.test(e)),te?.mark(`prefetch-side-parts`),o.workbooks.length===0){let e=Ze(`_rels/.rels`,a,O,D,x);if(e){for(let t of e.values())if(t.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&t.target){o.workbooks.push(t.target);break}}}if(o.workbooks.length===0)throw new s(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let _=m?.resources??new h,y=_.beginPersist(),ae={},ce=new Set,E=new Map;E.set(`parseInlineDxf`,e=>{if(!e)return;let t=O.parseFromString(`<dxf xmlns:x14="${fe}" xmlns:xm="${de}">${e}</dxf>`,`text/xml`)?.documentElement;if(!t)return;let n=D.parseDxf(t,``,x);return Object.keys(n).length>0?n:void 0});let me=I(`metadata`,o,a,O,D,x).entries().next()?.value?.[1]?.metadata;me&&E.set(`metadata`,me),E.set(nr,je());let he=new Map,j=[],M=new Set,L=e=>{M.add(Kr(e))},R=(e,t=he)=>{let n=e.lastIndexOf(`/`),r=e.substring(0,n+1)+`_rels/`+e.substring(n+1,e.length)+`.rels`,i=t.get(r);return i||(i=Ze(r,a,O,D,B),t.set(r,i)),i},z=(e,t,n,r=he)=>{let i=R(t,r).get(e),o=i?.target;if(!o)return null;if(i.targetMode===`External`){if(!n)return i.target;let e=_.add({source:{external:i.target}});return e.addReference(ae),ce.add(e),y.toResourceId(e)}let s=t.lastIndexOf(`/`),c=t.substring(0,s+1);o.startsWith(`/`)||(o=c+o),o=Ee(o);let l=D?.getVisitorParamsState().get(`dxfs`),u=r.get(o);if(!u){if(i.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let e={};u=e,j.push((async()=>{let t=sr(e,(e,t)=>t===`legacyDrawing`?Oe(e,o):t===`formControl`?ke(e,o):t===`part`?Ae(e,o):z(e,o,t===`resource`)??null,U,l,()=>{},(e,t,n)=>{b(e,t?`${t} (${o})`:o,n)},void 0,E),n=await F.getTextStream(o,le);if(n)try{await _n.parseStream(n,t,{xmlns:!1,lean:!0})}catch(e){throw Error(`Error parsing sheet: '${o}'`,{cause:e})}let i=R(o,r);if(i){De(e,o,i,r),ze(e),Ce(e);let t=[];i.forEach((e,n)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`)return;let r=Ae(n,o,e.type,e=>e!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`);if(!r?.xml)return;let i=/<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0]??``,a=parseInt(/\scacheId="(\d+)"/.exec(i)?.[1]??``,10);if(isNaN(a))return void ne.push([`Pivot table '${r.name}' names no cache and was dropped.`,o]);let s=/\sname="([^"]*)"/.exec(i)?.[1],c=Je(r.xml);if(!c)return void ne.push([`Pivot table '${r.name}' states no location and was dropped.`,o]);let l=D?.getVisitorParamsState(),u=Ge(l?.get(`numFmts`),l?.get(`dxfs`)),d=oe(r.xml,u),f=d?void 0:at(r.xml,u);t.push({...s?{name:ye(s)}:{},cacheId:a,location:c,part:r,...f?{partFormats:f}:{},...d})}),t.length>0&&(e.pivotTables=t)}})())}else if(i.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let e=V(o,a,O,D,B);if(e&&Object.keys(e).length!==0){let t=e,n=t.__bookRelId,i=t.__absoluteUrlRelId;delete t.__bookRelId,delete t.__absoluteUrlRelId;let a=[];R(o,r)?.forEach((e,t)=>{if(e.targetMode===`External`&&e.type&&e.target){let r={type:e.type,target:e.target};t===n?r.role=`book`:t===i&&(r.role=`absoluteUrl`),a.push(r)}}),a.sort((e,t)=>(e.role===`book`?0:1)-(t.role===`book`?0:1)),t.sources=a,L(o),u=t}else u=null}else u=n?We(o,a,(e,t)=>{let n=_.add({source:{buffer:e}});return n.addReference(ae),ce.add(n),y.toResourceId(n)},B):V(o,a,O,D,B)}return u},we=(e,t)=>{if(!e)return null;let n=R(t,he)?.get(e);if(!n?.target||n.targetMode===`External`)return null;let r=n.target;return r.startsWith(`/`)||(r=t.substring(0,t.lastIndexOf(`/`)+1)+r),Ee(r)},De=(e,t,n,i)=>{let a=[],o=new Map,s=[];n.forEach((e,n)=>{if(e.type!==`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`)return;let r=z(n,t,!1,i)?.comments;if(!r)return;for(let e=0;e<r.length;e++){let t=r[e];if(!t?.v?.id)continue;let{parentId:n,done:i,content:c,...l}=t.v,u={...l,content:Yr(c)};n?s.push({parentId:n,json:u}):(i&&(u.done=!0),o.set(u.id,u),a.push({r:t.r,v:u}))}let c=we(n,t);c&&L(c)});for(let e=0;e<s.length;e++){let{parentId:t,json:n}=s[e],r=o.get(t);r&&(r.replies??=[]).push(n)}let c=[];if(n.forEach((e,n)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`)return;let a=z(n,t,!1,i),s=a?.comments;if(!s)return;let l=a?.authors;for(let e=0;e<s.length;e++){let t=s[e];if(!t?.r)continue;let n=l&&t.v.authorId!==void 0?l[t.v.authorId]:void 0;if(n&&n.startsWith(`tc=`)){if(o.has(ot(n.substring(3))))continue;n=void 0}let i={id:r.uuidV4().toUpperCase(),asNote:!0,content:t.v.content??``},a=n?Re({displayName:n}):void 0;a&&(i.personId=a.id),c.push({r:t.r,v:i})}let u=we(n,t);u&&L(u)}),a.length===0&&c.length===0)return;let l=[...a,...c],u=e.legacyDrawing;if(u?.xml){let{rest:t,notes:n}=Ke(u.xml);if(n.length>0){let r=new Map;for(let e=0;e<n.length;e++){let t=n[e];r.set(g.cellToString({rowIndex:t.row,colIndex:t.col}),t)}for(let e=0;e<l.length;e++){let t=l[e],n=r.get(String(t.r).toUpperCase());if(!n||(r.delete(String(t.r).toUpperCase()),!t.v.asNote))continue;let i=it(n.xml),a={};if(i.anchor){let[e,t,r,o,s,c,l,u]=i.anchor;a.anchor={tl:{c:e-n.col,x:t,r:r-n.row,y:o},br:{c:s-n.col,x:c,r:l-n.row,y:u}}}else i.bounds&&(a.bounds=i.bounds);i.style.fill&&(a.fill=i.style.fill),i.style.stroke&&(a.stroke=i.style.stroke),i.xml&&(a.xml=i.xml),(a.anchor||a.bounds||a.fill||a.stroke||a.xml)&&(t.v.box=a),i.visible&&(t.v.shown=!0),i.alt&&(t.v.description=i.alt)}let i=[];r.forEach(e=>{i.push(e.xml)});let a=ut(t,i);a?u.xml=a:delete e.legacyDrawing}}e.comments=l},Oe=(e,t)=>{let n=we(e,t);if(!n)return null;let r=a(Kr(n));if(!r)return null;let i={xml:yr(new TextDecoder(`utf-8`).decode(r.content))},o=[];return R(n,he)?.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`)return;let r=z(t,n,!0);typeof r==`number`&&o.push({id:t,resId:r})}),o.length>0&&(i.images=o),L(n),i},ke=(e,t)=>{let n=we(e,t);if(!n)return null;let r=V(n,a,O,D,B)?.formControl??null;return r&&L(n),r},Ae=(e,t,n,r,i=new Set)=>{let s=we(e,t);if(!s||i.has(s))return null;let c=n??R(t,he)?.get(e)?.type;if(!c)return null;let l=a(Kr(s));if(!l)return null;i.add(s);let u=s.substring(s.lastIndexOf(`/`)+1),d=o.overrides[Kr(s)]??o.defaults[u.substring(u.lastIndexOf(`.`)+1).toLowerCase()],f={id:e,type:c,name:u};if(d&&(f.contentType=d),((e,t)=>e?e.endsWith(`+xml`)||e===`application/xml`:/\.(xml|rels|vml)$/i.test(t))(d,u))f.xml=new TextDecoder(`utf-8`).decode(l.content);else{let n=z(e,t,!0);if(typeof n!=`number`)return null;f.resId=n}let p=[];return R(s,he)?.forEach((e,t)=>{if(!e?.type||r&&!r(e.type))return;if(e.targetMode===`External`){let n=z(t,s,!0);typeof n==`number`&&p.push({id:t,type:e.type,resId:n});return}let n=Ae(t,s,e.type,r,i);n&&p.push(n)}),p.length>0&&(f.parts=p),L(s),f},Me=I(`coreprops`,o,a,O,D,x),Ne=I(`extprops`,o,a,O,D,x),Pe=I(`custprops`,o,a,O,D,x);Pe.forEach((e,t)=>{e?.custom&&L(t)});let Fe=new S,Ie=I(`people`,o,a,O,D,x);if(Ie.size>0){let[e,t]=Ie.entries().next().value;Fe.fromJSON(t?.persons),L(e)}let Re=e=>{if(e)return Fe.add(e).toJSON()},B={paramMap:E,getRefs:R,getRef:z,parsedRefs:he,readEmbeddedPart:(e,t)=>Ae(e,t),addPerson:Re,serializeElement:N,onWarning:b},Be=[],Ve=new Map;if(E.set(ar,Ve),c){let e=await F.getTextStream(c,le);if(e){let t=((e,t)=>{let n=!1,r=!1,i=0,a=``,o=new Zn;return{onOpenTag:e=>{let t=Xn(e.name);t===`t`?n&&i===0&&(r=!0):t===`si`?(n=!0,a=``,o.reset(),i=0):t===`rPh`||t===`phoneticPr`?i++:n&&i===0&&o.onOpenTag(t,e.attributes)},onText:e=>{r&&(a+=e,o.onText(e))},onCloseTag:t=>{let s=Xn(t.name);s===`t`?r=!1:s===`si`?(e(ct(a),o.take()??void 0),n=!1,a=``):s===`rPh`||s===`phoneticPr`?i>0&&i--:o.onCloseTag(s)},onError:e=>{t?.(`Error parsing shared strings: ${e?.message??e}`)}}})((e,t)=>{t&&Ve.set(Be.length,t),Be.push(e)},e=>{b(e,c)});try{await _n.parseStream(e,t,{xmlns:!1})}catch(e){throw Error(`Error parsing shared strings: '${c}'`,{cause:e})}}}te?.mark(`shared-strings`);let He=Be.length,Ue=new Map,H=He,U=e=>{let t=Ue.get(e);if(t!==void 0)return t;let n=H;return Ue.set(e,H++),Be.push(e),n},qe=[];o.slicersCache=qe;let W=F.getNames(),Ye=W.length;for(let e=0;e<Ye;e++){let t=W[e];t&&(t.startsWith(`xl/slicerCache`)||t.startsWith(`xl/timelineCaches/`)&&t.endsWith(`.xml`))&&qe.push(`/${t}`)}let Xe=I(`slicersCache`,o,a,O,D,B),Qe=new Map;Xe.forEach((e,t)=>{e?.cacheName&&(e.cachePath=t,Qe.set(e.cacheName,e))}),E.set(`slicerCaches`,Qe);let $e=[];o.slicers=$e;for(let e=0;e<Ye;e++){let t=W[e];t&&(t.startsWith(`xl/slicers/`)||t.startsWith(`xl/timelines/`))&&t.endsWith(`.xml`)&&$e.push(`/${t}`)}let et={getFile:a,domParser:O,getAddress:(e,t)=>{let n=z(t,e,!1);return typeof n==`string`?n:null},getBytes:(e,t)=>{let n=we(t,e),r=n?a(n.substring(1))?.content:void 0;return r?r.slice().buffer:null},addFetched:(e,t)=>{let n=_.add({source:{buffer:e},fetchedFrom:t});return n.addReference(ae),ce.add(n),y.toResourceId(n)},markAbsorbed:L},nt=new Map;for(let e of be.getAll())nt.set(e.structure,e.beginRead(et));let st=((e,t)=>{let n=n=>{let r=e(n);return r?t.parseFromString(new TextDecoder().decode(r.content),`text/xml`).documentElement??null:null},r=G(n(gt),`s`).map(e=>({t:e.getAttribute(`t`)??``,keys:Ct(e)})),i=G(n(_t),`rv`).map(e=>{let t=G(e,`fb`)[0];return{s:parseInt(e.getAttribute(`s`)??`-1`,10),values:G(e,`v`).map(e=>e.textContent??``),fb:t?t.textContent??``:null}}),a=G(n(vt),`a`).map(e=>{let t=wt(e),n=parseInt(e.getAttribute(`r`)??``,10),r=parseInt(e.getAttribute(`c`)??``,10),i=n>0?n:t.length;return{rows:i,columns:r>0?r:Math.max(1,Math.ceil(t.length/Math.max(1,i))),items:t}}),o=G(n(yt),`s`).map(Ct),s=n(bt),c=G(G(s,`spbArrays`)[0],`a`).map(wt),l=G(G(s,`spbData`)[0],`spb`).map(e=>({s:parseInt(e.getAttribute(`s`)??`-1`,10),values:G(e,`v`).map(e=>e.textContent??``)})),u=n(xt),d=Tt(G(G(u,`global`)[0],`keyFlags`)[0]),f=new Map;for(let e of G(G(u,`types`)[0],`type`))f.set(e.getAttribute(`name`)??``,Tt(G(e,`keyFlags`)[0]));let p=n(St),m=G(G(p,`dxfs`)[0],`dxf`).map(e=>G(e,`numFmt`)[0]?.getAttribute(`formatCode`)??null),h=G(G(p,`richProperties`)[0],`rPr`).map(e=>e.getAttribute(`n`)??``);return{structures:r,values:i,arrays:a,bagStructures:o,bagArrays:c,bags:l,globalKeyFlags:d,typeKeyFlags:f,richStyles:G(G(p,`richStyles`)[0],`rSty`).map(e=>{let t=new Map;for(let n of G(e,`rpv`)){let e=h[parseInt(n.getAttribute(`i`)??`-1`,10)];e&&t.set(e,n.textContent??``)}let n=parseInt(e.getAttribute(`dxfid`)??``,10);return{numberFormat:t.get(`NumberFormat`)??(n>=0?m[n]??null:null),isTitle:t.get(`IsTitleField`)===`1`,isHero:t.get(`IsHeroField`)===`1`}})}})(a,O),lt=ge(st,nt,e=>{b(e,`/xl/richData/rdrichvalue.xml`)});E.set(`richData`,st.values.map((e,t)=>lt.cellValue(t)));for(let e=0;e<Ye;e++){let t=W[e];t.startsWith(`xl/richData/`)&&!t.includes(`/_rels/`)&&L(t)}let dt=I(`themes`,o,a,O,D,B),pt=null;if(dt&&dt.entries){let e=dt.entries().next();e?.value?.[1]&&(pt=e.value[1])}let mt=new ee(pt),ht=I(`styles`,o,a,O,D,B).entries().next()?.value?.[1];ht&&=JSON.parse(t.JSONStableStringify(ht));let Et=I(`workbooks`,o,a,O,D,B);E.set(ir,!0===Et.entries().next().value?.[1]?.date1904),(m.calcOnLoad??p)!==`none`&&E.set(rr,((e,t)=>{let n=new Set;if(e)for(let t=0;t<e.length;t++)n.add(String(e[t]?.name).toUpperCase());if(t)for(let e=0;e<t.length;e++)try{let r=t[e](()=>{throw Error(`Not evaluating.`)},(e,t,r,i)=>{for(let e of Object.keys(i))n.add(e.toUpperCase())},new Map);for(let e of r.keys())n.add(e.toUpperCase())}catch{}return e=>n.has(e)||re.has(e)})(Et.entries().next().value?.[1]?.names,m.functions)),te?.mark(`side-parts-json`),await Promise.all(j);{let e=Et.entries().next().value?.[1],t=je(e?.names),n=e?.sheets??[];for(let e=0;e<n.length;e++){let r=n[e],i=xe(r);if(r?.kind===`macro`&&i?.part.xml){i.part.xml=ve(i.part.xml,Be);continue}let a=k(r);a&&P(a,t)}let r=e?.names;if(r)for(let e=0;e<r.length;e++){let n=r[e]?.ref;typeof n==`string`&&(r[e].ref=t.readDetached(n))}}w&&se>0&&(w(T,T),await new Promise(e=>setTimeout(e,0))),te?.mark(`sheets`);let K={...Et.entries().next().value?.[1],styles:ht,theme:mt.toJSON()},Dt=((e,t,n,r)=>{let i={},a=(e,t)=>{if(e)for(let{key:n,value:r}of e){let e=t[n];if(e&&r){if(e===`revisionNumber`){let e=parseInt(r,10);Number.isFinite(e)&&(i.revisionNumber=e)}else i[e]=r}}};if(a(e,br),a(t,xr),n){let e=[];for(let t of n){let n=Cr(t);n?e.push(n):r?.(`The custom document property '${t.key}' holds a value of a kind that is not read (${t.kind?`vt:`+t.kind:`none`}); it was dropped.`,`xlsx.docProps.custom.kind`)}e.length>0&&(i.custom=e)}return Object.keys(i).length>0?i:void 0})(Me.values().next().value?.properties,Ne.values().next().value?.properties,Pe.values().next().value?.custom,(e,t)=>{b(e,`docProps/custom.xml`,t)});Dt&&(K.properties=Dt),((e,t)=>{if(!t||t.size===0)return;let n=e.styles;if(!n)return;let r=new Set,i=new Set;for(let n of e.sheets??[]){let e=k(n);if(!e)continue;let a=new Set;Er(e.cols)||a.add(0);for(let t of e.directStyles??[])a.add(Array.isArray(t)?t[1]:t.v);for(let t of e.rows??[]){let e=Tr(t);e!==void 0&&a.add(e)}for(let t of e.cols??[]){let e=Tr(t);e!==void 0&&a.add(e)}let o=!1;for(let e of a)if(t.has(e)){o=!0;break}if(o){e.protection={...e.protection??{sheet:!0},showFormulas:!1};for(let e of a)(t.has(e)?i:r).add(e)}}if(r.size===0)return;let a=n.direct??=[];for(let e of r)e!==0&&Dr(a[e]??(a[e]={}),!0);for(let e of i)e!==0&&Dr(a[e]??(a[e]={}),!1);if(r.has(0)){let e=n.named??=[],t=d.BuiltInName.Normal.toLowerCase(),r=e.find(e=>e.name?.toLowerCase()===t);r||(r={name:d.BuiltInName.Normal,style:{}},e.push(r)),Dr(r.style,!0)}})(K,E.get(wr)),((e,t)=>{if(t&&t.size!==0)for(let n of e.sheets??[]){let e=k(n),r=e?.pivotTables;if(!e||!r||r.length===0)continue;let i=r.map(pe),a=r.map(()=>[]);for(let[n,r]of e.directStyles??[]){if(!t.has(r))continue;let e=g.fastStringToRange(n);for(let t=0;t<i.length;t++){let n=i[t];if(!n)continue;let r=Math.max(e.rowStart,n.rowStart),o=Math.min(e.rowEnd,n.rowEnd),s=Math.max(e.colStart,n.colStart),c=Math.min(e.colEnd,n.colEnd);if(r>o||s>c)continue;let l=g.rangeToString({rowStart:r-n.rowStart,rowEnd:o-n.rowStart,colStart:s-n.colStart,colEnd:c-n.colStart});l&&a[t].push(l)}}for(let e=0;e<r.length;e++)a[e].length>0&&(r[e].buttons=a[e])}})(K,E.get(Or));let Ot=E.get(Br);kr(K,Ot),(e=>{let t={colStart:0,rowStart:0,colEnd:ue,rowEnd:Te};for(let r of e.sheets??[]){let e=k(r);if(!e)continue;let a=[];if(Ur(e.cols,!0,t,a),Ur(e.rows,!1,t,a),a.length===0)continue;let o=[];for(let[t,n]of e.directStyles??[])o.push({...g.fastStringToRange(t),value:{kind:0,index:n}});o.push(...a);let s=[],c=new n.IteratorInstance(o,{axis:i.Column});for(let e=c.next();!e.done;e=c.next()){let n=e.value.overlaps,r;if(n.length===1){if(r=n[0].value,r.index===0)continue}else{let e,t,i;for(let r=0;!e&&r<n.length;r++){let a=n[r].value;a.kind===0?e=a:a.kind===1?t=a:i=a}r=e??t??i}s.push([g.rangeToString(e.value.range,t),r.index])}s.length>0?e.directStyles=s:delete e.directStyles}})(K),Ot&&((e,t,n)=>{if(!t||t.size===0||!n)return;let r=e=>{if(e===void 0||e===0)return null;let r=t.get(e);return r===void 0?null:n.controls[r]??null};for(let t of e.sheets??[]){let e=k(t);if(!e)continue;let n=new Map;for(let t of e.directStyles??[]){let e=Array.isArray(t)?t[0]:t.r,i=r(Array.isArray(t)?t[1]:t.v);if(!i)continue;let a=JSON.stringify(i),o=n.get(a);o||(o={control:i,addresses:[]},n.set(a,o)),Vr(e,o.addresses)}if(n.size===0)continue;let i=[...e.cellControls??[]];for(let{control:e,addresses:t}of n.values())i.push({r:t.join(`,`),v:e});e.cellControls=i}})(K,Ot,I(`featurePropertyBag`,o,a,O,D,B).values().next().value?.featurePropertyBag);{let e=new Map;I(`slicers`,o,a,O,D,B).forEach((t,n)=>{t?.slicers&&e.set(n,t.slicers)}),ft(K,{warn:(e,t)=>{b(e,`xl/slicers`,t)},markAbsorbed:L,slicerParts:e})}K.calc={...K.calc??{},legacyIntersect:!0},Be.length>0&&(K.strings=Be);let kt=Fe.toJSON();kt&&kt.length>0&&(K.people=kt);let At=F.getEntry(`xl/vbaProject.bin`);if(At)try{let{VBAProject:t}=await e(async()=>{let{VBAProject:e}=await import(`./w3bV7wggRayUYTd-.js`);return{VBAProject:e}},__vite__mapDeps([17,18]),import.meta.url),n=t.extract(At);if(n){let e=new Map;for(let t of K.sheets??[]){let n=k(t),r=n?.codeName;r&&e.set(r,n)}for(let r of n.modules){let n={language:`vba`},{header:i,body:a}=t.splitAttributes(r.code);a&&(n.source=a),i&&(n.sourceHeader=i);let o=r.type===`document`?e.get(r.name):void 0;o||r.type!==`document`||(n.scope=`workbook`);let s=o?o.modules??={}:K.modules??={};s[r.name]||(s[r.name]=n)}u?.(n)}else ne.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){ne.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}let jt=E.get(`calcId`),Mt=jt===void 0||!(Number(jt)>=191029),Nt=m.calcOnLoad??(p===`auto`&&Mt?`full`:p),Pt={...m,calcOnLoad:Nt,resources:_,json:K};if(Pt.disableLoadAutoFit===void 0){let e=E.get(Se);Pt.disableLoadAutoFit=!!e?.declared&&e.normalIsThemeFont&&await tt(e.faces)}te?.mark(`json-assembled`);let Ft=new ie(Pt);if(te?.mark(`workbook-constructed`),ce.forEach(e=>{e.deleteReference(ae)}),y.endPersist(),v){A(Ft);let e=new Map,t=0;for(let n of F.getNames()){let r=F.getEntry(n);if(!r)continue;let i=F.getRawEntry(n),a=i?{data:r,uncompressedSize:F.uncompressedSize(n),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:F.uncompressedSize(n)};e.set(n,a),t+=r.byteLength}if(t>67108864)ne.push([`Source package too large to retain (${t} bytes, limit ${Le}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let t=new rt(e,M);_e(Ft,t);let n=Ft.getWorksheets().getItems(),r=Ft.getTransactions().addListener({onCommitEnd:e=>{let n=e.getOperation()?.name;n!==`insertCells`&&n!==`deleteCells`||t.markStructuralChange()}}),i=Ft.addListeners({onSheetsChange:()=>{let e=Ft.getWorksheets().getItems();(e.length!==n.length||e.some((e,t)=>e!==n[t]))&&t.markStructuralChange(),n=e}});Ft.addListeners({onClose:()=>{r(),i(),A(Ft)}})}}if(ne.length&&C?.onWarning){let e=new Set;for(let t of ne){let[n,r,i]=t,a=i??n;e.has(a)||(e.add(a),C.onWarning(n,r))}}return te&&!0===f&&console.table(te.toTable()),await Ft.whenFontsReady(),Ft}catch(e){let t=`Unable to parse XLSX.`;throw e instanceof o&&(t=`Unable to open XLSX. There are too many rows or columns.`),Error(t,{cause:e})}finally{await F.close().catch(()=>{})}};export{Or as a,Xr as i,wr as n,or as o,Br as r,Gr as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{r as t}from"./C71ZZMVLfHdPl441.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{I as e,Z as t,_ as n,u as r,y as i}from"./ChSvXfVMLxZsP9zG.js";import{a}from"./DcrVJCyDwGKeil2U.js";import{I as o,Rt as s,T as c,w as l}from"./DuYb_otrRZZDq6-f.js";import{Er as u,It as d,Vn as f,_t as p,jt as m,qn as h,ti as g}from"./Dn5PwRw7rrTKNnql.js";var _=class extends p{constructor(e){super(e),this._optionsMember=e}getParent(){return this._optionsMovable.getParent()}getRange(e){return this.getParent().getRange(e)}getRanges(e){return this.getParent().getRanges(e)}isDeleted(){return!!super.isDeleted()||((this._optionsMovable?.getParent?.())?.isDeleted()??!1)}getAnchorType(){return d.Type.Absolute}setAnchorType(e){return this}_getLocalPlacement(){let e=this._getState(),t=e?.pixelBounds;return t?{bounds:t,rotation:e.rotation??0,flip:{horizontal:e.flipH??!1,vertical:e.flipV??!1}}:null}_getDrawnPlacement(){let e=this._getLocalPlacement();return e?this._optionsMember.place(e):null}getBounds(){return this._getDrawnPlacement()?.bounds??null}getRotation(){return this._getDrawnPlacement()?.rotation??0}getFlip(){return this._getDrawnPlacement()?.flip??{horizontal:!1,vertical:!1}}setRotation(e=0){let n=this._acceptRotation(e);if(n===null)return this;e=n;let r=this._getDrawnPlacement();if(!r||e===r.rotation)return this;let i=this._optionsMember.unplace({...r,rotation:e});if(!i)return this;let a=t(`op.setMovableRotation`),o=this._beginCommit(a);try{this._updateState({rotation:i.rotation,pixelBounds:i.bounds},{description:a},[`onBoundsChange`]),this._optionsMember.onMemberPlacementChange?.(),this._notifyPlacementChange(),o.commit()}catch(e){throw o.rollback(),e}return this}setFlip(e,n){let r=this._getDrawnPlacement();if(!r)return this;let i=this._acceptFlip({horizontal:e.horizontal??r.flip.horizontal,vertical:e.vertical??r.flip.vertical});if(!i)return this;let{horizontal:a,vertical:o}=i;if(a===r.flip.horizontal&&o===r.flip.vertical)return this;let s=this._optionsMember.unplace({...r,flip:{horizontal:a,vertical:o}});if(!s)return this;let c=n?.description??t(`op.setMovableFlip`),l=this._beginCommit(c);try{this._updateState({flipH:s.flip.horizontal,flipV:s.flip.vertical},{description:c}),this._notifyPlacementChange(),l.commit()}catch(e){throw l.rollback(),e}return this}_getAnchorBounds(){let e=this._getDrawnPlacement();return e?l(e.bounds,e.rotation):null}_setAnchorBounds(e){let n=this._getDrawnPlacement();if(!n)return;let r=this._optionsMember.unplace({...n,bounds:l(e,n.rotation)});if(!r)return;let i=this._getLocalPlacement();i&&s.isSameBounds(i.bounds,r.bounds)||(this._updateState({pixelBounds:r.bounds},{description:t(`op.updateMovableBounds`)},[`onBoundsChange`]),this._optionsMember.onMemberPlacementChange?.())}_processContainerLayout(){this._getEmitter().notify(`onBoundsChange`),this._forwardLayout()}_fromJSON(n){let r=n.anchor?.tl??e.EmptyObject,i=n.anchor?.br??e.EmptyObject;this._updateState({offsets:{tl:{x:0,y:0},br:{x:0,y:0}},hidden:n.hidden??!1,rotation:n.rotation??0,flipH:n.flipH??!1,flipV:n.flipV??!1,lockAspectRatio:n.lockAspect??null,locks:n.locks??null,anchorType:d.Type.Absolute,pixelBounds:{x:r.x??0,y:r.y??0,width:i.x??0,height:i.y??0}},{description:t(`op.loadMovable`)})}_getAnchorJSON(){let t=this._getState()?.pixelBounds??{x:0,y:0,width:0,height:0},n=t=>e.roundAccurately(t,2);return{tl:{x:n(t.x),y:n(t.y)},br:{x:n(t.width),y:n(t.height)}}}toJSON(e){let t=super.toJSON(e);return delete t.anchorType,t}},v=class extends f{constructor(e,t){super(t),this._group=e}_getItems(e){let t=this._group._getMembers(),n=e?.type,r=n===void 0?null:Array.isArray(n)?n:[n],i=[];for(let n of t){if(e?.ignoreHidden&&n.isHidden())continue;r&&!r.includes(n.getContent().getType())||i.push(n);let t=e?.deep?n.getMovables():null;t&&i.push(...t.getItems(e))}return i}getCount(){return this._group._getMembers().length}add(e){if(!e)throw new r(`No movable options provided`);return this._group._addMember(e)}_prepare(e){if(!e)throw new r(`No movable options provided`);return this._group._prepareMember(e)}_preparePicture(e,n){let i=this._group.getMovable();if(!i)throw new r(`The group is not placed.`);let a=i.getRange().getWorksheet().getResources().add(e);return this._group._prepareMember({description:t(`op.insertImage`),...n,type:`picture`,json:{...n?.json,resId:0},fromResourceId:()=>a})}_insertNow(e){return this._group._insertMember(e)}async addPicture(e,t){return this._insertNow(await this._preparePicture(e,t))}group(e,t){return this._group._groupMembers(e,t)}updateSelected(e,n){let r=this._group._getMembers().filter(e=>e.isSelected());r.length!==0&&this._group.doBatch(()=>{for(let t of r)e(t)},{description:n??t(`op.updateMovables`)})}_notifyChange(){this._notifyCollectionChange()}get isIMovableCollection(){return!0}},y=e=>e,b=e=>e,x=Object.freeze([]),S=class extends a{constructor(e){super(e),this._memberCallbacks=new WeakMap,this._toldOrder=C,this._createOptions=e,this._members=new v(this,e.transactions);let{members:t,name:n,...r}=e.json??{},i=[];for(let n of t??[])try{i.push(this._createMember(n,e.fromResourceId))}catch(e){console.warn(`Unable to load a group member`,n,e)}this._updateState({data:r,members:i}),this._toldOrder=i}getType(){return`group`}getTypeDescription(){return`Group`}getMovables(){return this._members}_childBounds(){let e=this._getState()?.data?.childBounds;if(e)return e;let t=this.getMovable()?.getBounds();return{x:0,y:0,width:t?.width??0,height:t?.height??0}}_rebound(){let e=this.getMovable(),t=this._drawnPlacement();if(!e||!t)return;let n=[];for(let e of this._members_()){let t=e._getLocalPlacement();t&&n.push(l(t.bounds,t.rotation))}let r=s.unionBounds(n);if(!r)return;let i=this._childBounds();if(s.isSameBounds(r,i))return;let a=i.width>0?t.bounds.width/i.width:1,o=i.height>0?t.bounds.height/i.height:1,c=s.placeInParent(t,i,s.flatPlacement({x:r.x+r.width/2,y:r.y+r.height/2,width:0,height:0})).bounds,u=r.width*a,d=r.height*o,f=this._getState();this._updateState({data:{...f.data,childBounds:r}}),e.setBounds({x:c.x-u/2,y:c.y-d/2,width:u,height:d})}_drawnPlacement(){let e=this.getMovable();return e?s.placementOf(e):null}getFill(){return this._getState()?.data?.fill??null}getTextFrame(){let e=this._getMembers(),t=!1,n=[];for(let r of e){let e=r.getContent().getTextFrame?.()??null;if(!e)continue;t=!0;let i=e.getText();i!==``&&n.push(i)}if(!t)return null;let r=n.join(`
|
|
2
|
+
`);return Object.freeze({getText:()=>r})}get acceptRotation(){return this._isEveryMember(`acceptRotation`)?y:void 0}get acceptFlip(){return this._isEveryMember(`acceptFlip`)?b:void 0}_isEveryMember(e){let t=this._members_();for(let n=0;n<t.length;n++)if(!t[n].getContent()[e])return!1;return!0}async ungroup(e){let n=this.getMovable();if(!n||this.isDeleted())return[];let r=e?.description??t(`op.ungroupDrawings`);this._protectionCheck(r);let i=n.getRange().getWorksheet(),a=u(i.getView().getMovableSelection());return await this.doBatch(()=>{let t=this._free(this._members_(),r);this.delete(e);let n=this._transactions.getPendingTransaction();return n&&h(n,i,t,{autoSelect:e?.autoSelect??!0,autoSelectRestore:e?.autoSelectRestore},a),t},{description:r})}_free(e,t){let n=this.getMovable(),r=n.getParent()?.getMovables()??n.getRange().getWorksheet().getMovables(),i=n.getZIndex(),a=this._createOptions.beginPersistResource();try{return e.map((e,n)=>{let o=e.toJSON(a.toResourceId.bind(a)),c=s.placementOf(e),l=r._insertNow({type:o.content.type,json:o.content.json,name:o.content.name,altText:o.content.description,bounds:c.bounds,rotation:c.rotation,fromResourceId:a.fromResourceId.bind(a),autoSelect:!1,description:t,zIndex:i+n});return(c.flip.horizontal||c.flip.vertical)&&l.setFlip(c.flip),e.isHidden()&&l.setHidden(!0),o.lockAspect!==void 0&&l.setLockAspectRatio(o.lockAspect),l})}finally{a.endPersist()}}getConnections(){return x}toJSON(e){let t={...this._getState()?.data??{}},n=this._members_();return n.length>0&&(t.members=n.map(t=>t.toJSON(e))),t}_getDrawnRect(e,t,n){let r=this._members_();if(r.length===0)return null;let i=s.flatPlacement({x:0,y:0,width:e,height:t}),a=this._childBounds(),l=1/0,u=1/0,d=-1/0,f=-1/0,p=!1;for(let e of r){if(e.isHidden())continue;let t=e._getLocalPlacement();if(!t)continue;let r=s.placeInParent(i,a,t),m=e.getContent(),h=c(m)?m._getDrawnRect(r.bounds.width,r.bounds.height,n):null,g=o(r.bounds,h,r.rotation,r.flip);l=Math.min(l,g.x),u=Math.min(u,g.y),d=Math.max(d,g.x+g.width),f=Math.max(f,g.y+g.height),p=!0}return p?{l,t:u,r:d,b:f}:null}_getMembers(){return this._members_()}_members_(){return this._getState()?.members??C}async _addMember(e){return this._insertMember(await this._prepareMember(e))}async _prepareMember(e){if(!e?.type)throw new r(`A member needs a type.`);return this._protectionCheck(t(`op.insertDrawing`)),await m({type:e.type,json:e.json}),e}_insertMember(e){if(!e?.type)throw new r(`A member needs a type.`);this._protectionCheck(t(`op.insertDrawing`));let n=this._drawnPlacement(),i={...n?.bounds??this._childBounds(),...e.bounds},a=n?s.placeInChild(n,this._childBounds(),{bounds:i,rotation:e.rotation??0,flip:{horizontal:!1,vertical:!1}}):{bounds:i,rotation:e.rotation??0,flip:{horizontal:!1,vertical:!1}},o={anchor:{tl:{x:a.bounds.x,y:a.bounds.y},br:{x:a.bounds.width,y:a.bounds.height}},content:{type:e.type,json:e.json}};e.name&&(o.content.name=e.name);let c=e.altText;c&&(o.content.description=c),a.rotation&&(o.rotation=a.rotation),a.flip.horizontal&&(o.flipH=!0),a.flip.vertical&&(o.flipV=!0);let l=this._beginCommit(e.description??t(`op.insertDrawing`));try{let t=this._createMember(o,e.fromResourceId),n=this._members_().slice();return n.splice(Math.max(0,Math.min(n.length,e.zIndex??n.length)),0,t),this._updateState({members:n}),this._rebound(),l.commit(),this._members._notifyChange(),t}catch(e){throw l.rollback(),e}}async _groupMembers(e,n){let a=n?.description??t(`op.groupDrawings`);if(this._protectionCheck(a),!e||e.length<2)throw new r(i(`error.movable.groupTooFew`));let o=this._members_();for(let t of e)if(!o.includes(t))throw new r(i(`error.movable.groupNotSameGroup`));let c=o.filter(t=>e.includes(t));if(c.length===o.length)throw new r(i(`error.movable.groupWholeGroup`));let d=this.getMovable();if(!d)throw new r(`The group is not placed.`);let f=d.getRange().getWorksheet(),p=u(f.getView().getMovableSelection()),m=s.unionBounds(c.map(e=>{let t=e._getLocalPlacement();return l(t.bounds,t.rotation)})),g=this._createOptions.beginPersistResource();try{let e={anchor:{tl:{x:m.x,y:m.y},br:{x:m.width,y:m.height}},content:{type:`group`,json:{childBounds:{...m},members:c.map(e=>e.toJSON(g.toResourceId.bind(g)))}}};n?.name&&(e.content.name=n.name);let t=this._beginCommit(a);try{for(let e of c)e.unselect();let r=this._createMember(e,g.fromResourceId.bind(g)),i=c[c.length-1],a=[];for(let e of o)e===i?a.push(r):c.includes(e)||a.push(e);this._updateState({members:a});for(let e of c)e.getContent().delete();return this._rebound(),h(t,f,[r],{autoSelect:n?.autoSelect??!0,autoSelectRestore:n?.autoSelectRestore},p),t.commit(),this._members._notifyChange(),r}catch(e){throw t.rollback(),e}}finally{g.endPersist()}}_removeMember(e,n){let r=this._members_();if(!r.includes(e))return;e.unselect();let i=this._beginCommit(n?.description??t(`op.deleteDrawing`));try{let a=r.filter(t=>t!==e);if(this._updateState({members:a}),a.length===1&&this.getMovable()){let e=a[0],r=e.isSelected(),[o]=this._free(a,n?.description??t(`op.deleteDrawing`));this.delete(n),r&&h(i,o.getRange().getWorksheet(),[o],{autoSelect:!0},[e])}else a.length===0?this.delete(n):this._rebound();i.commit(),this._members._notifyChange()}catch(e){throw i.rollback(),e}}_moveMember(e,t,n){let r=this._members_(),i=r.indexOf(e);if(i===-1||(t=Math.max(0,Math.min(r.length-1,t)))===i)return;this._protectionCheck(n);let a=r.slice();a.splice(i,1),a.splice(t,0,e),this._updateState({members:a},{description:n}),this._members._notifyChange()}_createMember(e,r){let i=this,a=e.content?.type??`custom`,o=this._createOptions,c,l={type:a,transactions:o.transactions,beginPersistResource:o.beginPersistResource,fromResourceId:r,json:e.content?.json,name:e.content?.name??null,description:e.content?.description??null,isReadOnly:()=>i.isReadOnly(),deleteFromContainer:()=>{c?._deleteFromContent()},getMovable:()=>c,getStyles:o.getStyles,getRange:o.getRange,addWatch:o.addWatch},u=g(a,l,{getMovable:()=>c,amend:e=>i._amend(e),isClosed:()=>i._closed}),d=()=>i.getMovable(),f=()=>i._members_().indexOf(c),p;return c=new _({content:u,json:e,transactions:o.transactions,beginPersistResource:o.beginPersistResource,fromResourceId:r,getParent:d,onMemberPlacementChange:()=>i._rebound(),place:e=>{let t=i._drawnPlacement();return t?s.placeInParent(t,i._childBounds(),e):null},unplace:e=>{let t=i._drawnPlacement();return t?s.placeInChild(t,i._childBounds(),e):null},coords:n.EmptyRange,getRanges:e=>d().getRanges(),getContainerIndex:f,getZIndex:f,getBoundsAtCoords:()=>({x:0,y:0,width:0,height:0}),getCoordsAtBounds:()=>n.EmptyRange,isProtected:()=>i.isReadOnly(),moveToBackOnContainer:()=>i._moveMember(c,0,t(`op.moveToBack`)),moveBackwardOnContainer:()=>i._moveMember(c,f()-1,t(`op.moveBackwards`)),moveForwardOnContainer:()=>i._moveMember(c,f()+1,t(`op.moveForward`)),moveToFrontOnContainer:()=>i._moveMember(c,i._members_().length-1,t(`op.moveToFront`)),deleteFromContainer:e=>i._removeMember(c,e),setContainerCallbacks:e=>{e&&(p={...p,...e}),c&&p&&i._memberCallbacks.set(c,p)},invalidate:()=>{i._members._notifyChange()}}),p&&this._memberCallbacks.set(c,p),c}_tellZIndex(){let e=this._members_(),t=this._toldOrder;if(e!==t){this._toldOrder=e;for(let n=0;n<e.length;n++){let r=e[n];t[n]!==r&&this._memberCallbacks.get(r)?.processZIndex?.()}}}_amend(e){let t=this._transactions;return t.amend(t.getCurrentCommit(!1).getId(),()=>e())}_processAfterStateChange(e,t){super._processAfterStateChange(e,t),this._tellZIndex(),this._emitter.notify(`onAnyChange`),this._members?._notifyChange(),this.getMovable()?._forwardLayout()}get isIGroup(){return!0}get[Symbol.toStringTag](){return`[Group]`}toString(){return this.getTypeDescription()}},C=Object.freeze([]);export{S as Group};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={ADDRESS:{s:`Creates a cell reference as text, given specified row and column numbers.`,p:{rowNum:{d:`is the row number to use in the cell reference: Row_number = 1 for row 1.`},columnNum:{d:`is the column number to use in the cell reference. For example, Column_number = 4 for column D.`},absNum:{d:`specifies the reference type: absolute = 1; absolute row/relative column = 2; relative row/absolute column = 3; relative = 4.`},a1:{d:`is a logical value that specifies the reference style: A1 style = 1 or TRUE; R1C1 style = 0 or FALSE.`},sheetText:{d:`is text specifying the name of the worksheet to be used as the external reference.`}}},AREAS:{s:`Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell.`,p:{references:{d:`is a reference to a cell or range of cells and can refer to multiple areas.`}}},ARRAY_CONSTRAIN:{s:`Constrains an array result to a specified size.`,c:`Sheets`,p:{inputRange:{d:`The range to constrain.`},numRows:{d:`The number of rows the result should contain.`},numCols:{d:`The number of columns the result should contain.`}}},ARRAYFORMULA:{s:`Enables the display of values returned from an array formula into multiple rows and/or columns.`,c:`Sheets`,p:{arrayFormula:{d:`A range, a mathematical expression over ranges of the same size, or a function that returns a result of more than one cell.`}}},CHOOSE:{s:`Chooses a value or action to perform from a list of values, based on an index number.`,p:{indexNum:{d:`specifies which value argument is selected. Index_num must be between 1 and 254, or a formula or a reference to a number between 1 and 254.`},value:{d:`are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects.`}}},CHOOSECOLS:{s:`Returns columns from an array or reference.`,p:{array:{d:`The array or reference from which to choose columns.`},colNum:{d:`The number of the column to be returned.`}}},CHOOSEROWS:{s:`Returns rows from an array or reference.`,p:{array:{d:`The array or reference from which to choose rows.`},rowNum:{d:`The number of the row to be returned.`}}},COLUMN:{s:`Returns the column number of a reference.`,p:{reference:{d:`is the cell or range of contiguous cells for which you want the column number. If omitted, the cell containing the COLUMN function is used.`}}},COLUMNS:{s:`Returns the number of columns in an array or reference.`,p:{array:{d:`is an array or array formula, or a reference to a range of cells for which you want the number of columns.`}}},DROP:{s:`Drops rows or columns from array start or end.`,p:{array:{d:`The array from which to drop rows or columns.`},row:{d:`The number of rows to drop. A negative value drops from the end of the array.`},columns:{d:`The number of columns to drop. A negative value drops from the end of the array.`}}},EXPAND:{p:{array:{},row:{},columns:{},padWith:{}}},FIELDVALUE:{s:`Extracts a value from a field of a given record.`,p:{value:{d:`The record from which you want to extract the field.`},fieldName:{d:`The names of the field or fields that you want to extract.`}}},FILTER:{s:`Filter a range or array.`,p:{array:{d:`the range or array to filter.`},include:{d:`an array of booleans where TRUE represents a row or column to retain.`},ifEmpty:{d:`return if no items are retained.`}}},FORMULATEXT:{s:`Returns a formula as a string.`,p:{reference:{d:`is a reference to a formula.`}}},GETPIVOTDATA:{s:`Extracts data stored in a PivotTable.`,p:{dataField:{d:`is the name of the data field to extract data from.`},pivotTable:{d:`is a reference to a cell or range of cells in the PivotTable that contains the data you want to retrieve.`},fieldItem:{d:`the field/item pairs to refer to.`},"fieldItem.field":{d:`field to refer to.`},"fieldItem.item":{d:`field item to refer to.`}}},HLOOKUP:{s:`Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify.`,p:{lookupValue:{d:`is the value to be found in the first row of the table and can be a value, a reference, or a text string.`},tableArray:{d:`is a table of text, numbers, or logical values in which data is looked up. tableArray can be a reference to a range or a range name.`},rowIndexNum:{d:`is the row number in tableArray from which the matching value should be returned. The first row of values in the table is row 1.`},rangeLookup:{d:`is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE; find an exact match = FALSE.`}}},HSTACK:{s:`Horizontally stacks arrays into one array.`,p:{array:{d:`An array or reference to be stacked.`}}},HYPERLINK:{s:`Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet.`,p:{linkLocation:{d:`is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path.`},friendlyName:{d:`is text or a number that is displayed in the cell. If omitted, the cell displays the linkLocation text.`}}},IMAGE:{s:`Returns an image from a given source.`,p:{source:{d:`The path of the source that points to the image.`},alternateText:{d:`The alternative text that describes the image for accessibility.`},sizing:{d:`The setting that determines the dimensions in which the image will be rendered in the cell.`},height:{d:`The custom height of the image in pixels.`},width:{d:`The custom width of the image in pixels.`}}},INDEX:{s:`Returns a value or reference of the cell at the intersection of a particular row and column, in a given range.`,p:{array:{d:`is a range of cells or an array constant.`},rowNum:{d:`selects the row in Array or Reference from which to return a value. If omitted, colNum is required.`},colNum:{d:`selects the column in Array or Reference from which to return a value. If omitted, rowNum is required.`},areaNum:{d:`selects the area in Array or Reference from which to return a value. If omitted, the first area is used.`}}},INDIRECT:{s:`Returns the reference specified by a text string.`,p:{refText:{d:`is a reference to a cell that contains an A1- or R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string.`},a1:{d:`is a logical value that specifies the type of reference in refText: R1C1-style = FALSE; A1-style = TRUE.`}}},LOOKUP:{s:`Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility.`,p:{lookupValue:{d:`is a value that LOOKUP searches for in lookupVector and can be a number, text, a logical value, or a name or reference to a value.`},lookupVector:{d:`is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order.`},resultVector:{d:`is a range that contains only one row or column, the same size as lookupVector.`}}},MATCH:{s:`Returns the relative position of an item in an array that matches a specified value in a specified order.`,p:{lookupValue:{d:`is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these.`},lookupArray:{d:`is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array.`},matchType:{d:`is a number 1, 0, or -1 indicating which value to return.`}}},OFFSET:{s:`Returns a reference to a range that is a given number of rows and columns from a given reference.`,p:{reference:{d:`is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells.`},rows:{d:`is the number of rows, up or down, that you want the upper-left cell of the result to refer to.`},cols:{d:`is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to.`},height:{d:`is the height, in number of rows, that you want the result to be, the same height as Reference if omitted.`},width:{d:`is the width, in number of columns, that you want the result to be, the same width as Reference if omitted.`}}},ROW:{s:`Returns the row number of a reference.`,p:{reference:{d:`is the cell or a single range of cells for which you want the row number; if omitted, returns the cell containing the ROW function.`}}},ROWS:{s:`Returns the number of rows in a reference or array.`,p:{array:{d:`is an array, an array formula, or a reference to a range of cells for which you want the number of rows.`}}},RTD:{s:`Retrieves the real-time data (RTD) from a program that supports COM automation.`,p:{progId:{d:`is the programmatic identifier (ProgID) of a registered COM automation add-in. Enclose the id in quotation marks.`},server:{d:`is the name of the server that provides the real-time data. If running locally us an empty string.`},topic:{d:`are 1 to 38 parameters that specify a piece of data.`}},h:`Unimplemented Connectivity`},SORT:{s:`Sorts a range or array.`,p:{array:{d:`the range or array to sort.`},sortIndex:{d:`a number indicating the row or column to sort by.`},sortOrder:{d:`a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.`},byCol:{d:`a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column.`}}},SORTBY:{s:`Sorts a range or array based on the values in a corresponding range or array.`,p:{array:{d:`the range or array to sort.`},by:{d:`the ranges to sort on and the direction for each.`},"by.byArray":{d:`the range or array to sort on.`},"by.sortOrder":{d:`a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.`}}},TAKE:{s:`Returns rows or columns from array start or end.`,p:{array:{d:`The array from which to take rows or columns.`},rows:{d:`The number of rows to take. A negative value takes from the end of the array.`},columns:{d:`The number of columns to take. A negative value takes from the end of the array.`}}},TOCOL:{s:`Returns the array as one column.`,p:{array:{d:`The array or reference to return as a column.`},ignore:{d:`Whether to ignore certain types of values. By default, no values are ignored.`},scanByColumn:{d:`Scan the array by column. By default, the array is scanned by row.`}}},TOROW:{s:`Returns the array as one row.`,p:{array:{d:`The array or reference to return as a row.`},ignore:{d:`Whether to ignore certain types of values. By default, no values are ignored.`},scanByColumn:{d:`Scan the array by column. By default, the array is scanned by row.`}}},TRANSPOSE:{s:`Converts a vertical range of cells to a horizontal range, or vice versa.`,p:{array:{d:`is a range of cells on a worksheet or an array of values that you want to transpose.`}}},TRIMRANGE:{s:`Trims a range to the last used cell in any direction.`,p:{range:{d:`The range to be trimmed.`},rowTrimMode:{d:`Row trim direction. 0 - none, 1 - leading, 2 - trailing, 3 - both.`},colTrimMode:{d:`Column trim direction. 0 - none. 1 - leading, 2 - trailing, 3 - both.`}}},UNIQUE:{s:`Returns the unique values from a range or array.`,p:{array:{d:`the range or array from which to return unique rows or columns.`},byCol:{d:`is a logical value: compare rows against each other and return the unique rows = FALSE; compare columns against each other and return the unique columns = TRUE.`},exactlyOnce:{d:`is a logical value: return rows or columns that occur exactly once from the array = TRUE; return all distinct rows or columns from the array = FALSE.`}}},VLOOKUP:{s:`Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order.`,p:{lookupValue:{d:`is the value to be found in the first column of the table, and can be a value, a reference, or a text string.`},tableArray:{d:`is a table of text, numbers, or logical values, in which data is retrieved. tableArray can be a reference to a range or a range name.`},colIndexNum:{d:`is the column number in tableArray from which the matching value should be returned. The first column of values in the table is column 1.`},rangeLookup:{d:`is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE; find an exact match = FALSE.`}}},VSTACK:{s:`Vertically stacks arrays into one array.`,p:{array:{d:`An array or reference to be stacked.`}}},WRAPCOLS:{s:`Wraps a row or column vector after a specified number of values.`,p:{vector:{d:`The vector or reference to wrap.`},wrapCount:{d:`The maximum number of values per column.`},padWith:{d:`The value with which to pad. The default is #N/A.`}}},WRAPROWS:{s:`Wraps a row or column vector after a specified number of values.`,p:{vector:{d:`The vector or reference to wrap.`},wrapCount:{d:`The maximum number of values per row.`},padWith:{d:`The value with which to pad. The default is #N/A.`}}},XLOOKUP:{s:`Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used.`,p:{lookupValue:{d:`is the value to search for.`},lookupArray:{d:`is the array or range to search.`},returnArray:{d:`is the array or range to return.`},ifNotFound:{d:`returned if no match is found.`},matchMode:{d:`0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard`},searchMode:{d:`1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc`}}},XMATCH:{s:`Returns the relative position of an item in an array. By default, an exact match is required.`,p:{lookupValue:{d:`is the value to search for.`},lookupArray:{d:`is the array or range to search.`},matchMode:{d:`0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard`},searchMode:{d:`1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc`}}}},t={ImageSizing:{s:`How IMAGE sizes the picture in its cell.`,m:{"Fit to cell":{d:`Fits the picture in the cell, keeping its aspect ratio.`},"Fill cell":{d:`Fills the cell, ignoring the picture's aspect ratio.`},"Original size":{d:`Keeps the picture's own size, which may overflow the cell.`},"Custom size":{d:`Uses the height and width given.`}}},MatchType:{s:`How MATCH compares the lookup value with the values in the array.`,m:{"Less than":{d:`The largest value that is less than or equal to the lookup value. The array must be sorted in ascending order.`},"Exact match":{d:`The first value that is exactly equal to the lookup value. The array can be in any order.`},"Greater than":{d:`The smallest value that is greater than or equal to the lookup value. The array must be sorted in descending order.`}}},SortOrder:{s:`The direction SORT and SORTBY sort a key in.`,m:{Ascending:{d:`Smallest to largest.`},Descending:{d:`Largest to smallest.`}}},IgnoreValues:{s:`Which values to leave out.`,m:{"Keep all values":{d:`Keep every value, blanks and errors included.`},"Ignore blanks":{d:`Leave out blank cells.`},"Ignore errors":{d:`Leave out error values.`},"Ignore blanks and errors":{d:`Leave out blank cells and error values.`}}},MatchMode:{s:`How XLOOKUP and XMATCH match the lookup value.`,m:{"Exact match":{d:`Only an item equal to the lookup value.`},"Exact match or next smaller item":{d:`An item equal to the lookup value, or else the next smaller item.`},"Exact match or next larger item":{d:`An item equal to the lookup value, or else the next larger item.`},"Wildcard character match":{d:`The lookup value may use *, ? and ~ as wildcards.`}}},SearchMode:{s:`The order in which XLOOKUP and XMATCH search.`,m:{"Search first-to-last":{d:`Search from the first item to the last.`},"Search last-to-first":{d:`Search from the last item to the first.`},"Binary search (sorted ascending order)":{d:`A binary search of items sorted in ascending order.`},"Binary search (sorted descending order)":{d:`A binary search of items sorted in descending order.`}}}};export{e as default,t as enums};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as e}from"./ChSvXfVMLxZsP9zG.js";import{i as t}from"./BMf827t1Ul65MHd5.js";import{Rr as n,Rt as r,kr as i}from"./Dn5PwRw7rrTKNnql.js";import{A as a,D as o,E as s,O as c,_ as l,a as u,b as d,c as f,i as p,l as m,n as h,o as g,p as _,v,w as y,x as b}from"./D2IHCJ1QWDKwmhge.js";import{i as x,n as S,r as C}from"./DDkL9PZPXAggW2Yr.js";var w=class{constructor(e){e={...e},this._editing=e.profile===`editing`,this._parser=new C(e)}compile(e,n,i,p,C,w,E,D,O){if(p.length===0){let n=new t.Parse(x);return this._compileUnparsed(e,C,p,{input:p,cause:n,causes:[n]})}if(p.length>r.MAX_EXPRESSION_LENGTH){let n=new t.Parse(S(p.length,r.MAX_EXPRESSION_LENGTH));return this._compileUnparsed(e,C,p,{input:p,cause:n,causes:[n]})}let k,A,j=[];try{let e=this._parser.parse(n,i,p);k=e.root,j=e.errors,D&&k&&j.length===0&&(k.legacyIntersect=!0)}catch(e){A=t.isError(e,t.Code.Parse)?e:new t.Parse(e.message,e)}let M=[];for(let e of j)M.push(c(e));if(k){let e=h(k,w??null);typeof e==`string`?M.push(new t.Parse(e)):k=e,a(k,w??null)&&M.push(new t.Parse(`The implicit intersection operator ' ' requires a cell or range on both sides`)),v(k,w??null)&&M.push(new t.Parse(`The spill anchor operator '#' requires a cell or range`)),d(k,w??null)&&M.push(new t.Parse(`Expected a reference; a value cannot be converted to one.`));let n=b(k,w??null);n&&M.push(new t.Parse(n));let r=y(k,w??null);r&&M.push(new t.Parse(r));let i=l(k,w??null);i&&M.push(new t.Parse(i));let o=s(k);o&&M.push(new t.Parse(o))}M.length>0&&!A&&(A=M[0]);let N=null;if(A&&(N={input:p,cause:A,causes:M.length>0?M:[A]}),!k){if(this._editing){let t=this._recoverCompiled(e,n,i,p,C,N,E);if(t)return t}return this._compileUnparsed(e,C,p,N,this._editing,()=>T(C,E,n,i))}if(k=_(k,w??null),k=g(k,w??null),C){let e=this._editing?O:{mint:!O?.book,...O};k=f(k,C,E,e,{rowIndex:n,colIndex:i});let r=m(k,C);if(r){let e=new t.Parse(r);M.push(e),N={input:p,cause:N?.cause??e,causes:N?[...N.causes,e]:[e]}}}let P=o(e,C,k,this._editing,N,w??null);return this._editing&&N&&u(P.getTokens(),C)!==p?this._recoverCompiled(e,n,i,p,C,N,E)||this._compileUnparsed(e,C,p,N,!0):P}autoCorrect(e){let t=function(e){let t=0,n=null;for(let r=0;r<e.length;r++){let i=e[r];n?i===n&&(n=null):t>0?i===`'`?r++:i===`[`?t++:i===`]`&&t--:i===`"`||i===`'`?n=i:i===`[`&&t++}return n?0:t}(e),n=e+`]`.repeat(t),r;try{let e=this._parser.getLexer().tokenize(n,!1);if(e.errors.length>0)return null;r=e.tokens}catch{return null}let i=[];for(let e of r){let t=e.tokenType?.name;if(t===`OpenParen`)i.push(`)`);else if(t===`OpenCurlyParen`)i.push(`}`);else if((t===`CloseParen`||t===`CloseCurlyParen`)&&i.pop()!==(t===`CloseParen`?`)`:`}`))return null}return i.length===0&&t===0?null:n+i.reverse().join(``)}_compileUnparsed(t,n,r,a,o=!1,s){let c={runtime:t,symbols:n,getFunction:null,ast:null,evaluations:e.EmptyArray,executions:e.EmptyArray,bindings:e.EmptyArray,referencesAbsolute:e.EmptyArray,referencesExecute:e.EmptyArray,referencesRelative:e.EmptyArray,referencesRoot:e.EmptyArray,referenceIndices:e.EmptyArray,formatReferenceIndices:e.EmptyArray,getTokens:()=>{let e=[];return o&&k(e,r,void 0,s)?e:[{type:i.Unparsed,value:r,text:r}]},namedIds:e.EmptyArray,symbolIds:e.EmptyArray,hasTotals:!1,hasPivotData:!1,hasDataTable:!1,hasVolatile:!1,isBlankCacheable:!1,isBlankCacheableArray:!1,isReferenceOnly:!1,error:a,transform:()=>c};return c}_recoverCompiled(e,t,n,r,a,s,c){let l,d=r.length;try{let e=this._parser.getLexer().tokenize(r,!1);l=e.tokens,e.errors.length>0&&(d=Math.min(d,e.errors[0].offset))}catch{return null}let p=[];for(let e=l.length-1;e>=0&&p.length<24;e--){let t=(l[e].endOffset??-1)+1;t>0&&t<r.length&&t<=d&&p.push(t)}for(let l of p){let d=r.slice(0,l),p,m;try{p=this._parser.parse(t,n,d).root}catch{continue}if(!p||p.type===i.Unparsed)continue;try{let r=g(p,null),i=a?f(r,a,c,void 0,{rowIndex:t,colIndex:n}):r;m=o(e,a,i,!0,s)}catch{continue}if(u(m.getTokens(),a)!==d)continue;let h=r.slice(l);if(h.length===0)return m;let _,v={...m,getTokens:()=>(_||(_=[...m.getTokens()],this._appendUnparsedTail(_,h,()=>T(a,c,t,n))),_),transform:()=>v};return v}return null}_appendUnparsedTail(e,t,n){let r=[];for(let t of e){if(t.type===i.Whitespace)continue;let e=t.type===i.Paren||t.type===i.Type?t.text:void 0,n=r.length>0?r[r.length-1]:void 0;if(t.type===i.Separator&&n){let e=n.declared[n.declared.length-1];n.ctx?.type===`let`&&n.ctx.argIndex===-1&&n.lambda?.argTokens===n.argTokens&&e?.argIndex===n.argIndex-1&&(e.params=n.lambda.params),n.argIndex++,n.argTokens=0,n.lambda=void 0}else if(n&&n.argTokens++,e===`(`||e===`[`||e===`{`)r.push({ctx:t.context,argIndex:0,declared:[],argTokens:0,leadsArg:n?.argTokens===2});else if(e===`)`||e===`]`||e===`}`){let e=r.pop(),t=r.length>0?r[r.length-1]:void 0;t&&e?.leadsArg&&e.ctx?.type===`lambda`&&e.ctx.argIndex===-1&&(t.lambda={params:e.declared.map(({name:e,optional:t})=>t?{name:e,optional:t}:{name:e}),argTokens:t.argTokens})}else if(t.type===i.Parameter&&n&&t.value?.declaration){let e=t.value;n.declared.push(e.optional?{name:e.name,argIndex:n.argIndex,optional:!0}:{name:e.name,argIndex:n.argIndex})}}let a=r.length>0?r[r.length-1]:void 0,o=a?.ctx?{...a.ctx,argIndex:a.ctx.argIndex===-1?a.argIndex:a.ctx.argIndex}:void 0;if(o&&a.ctx.argIndex===-1&&(o.type===`let`||o.type===`lambda`)){let e=o.type===`let`?2:1,t=o.bound;for(let n of a.declared){if(o.argIndex<n.argIndex+e)continue;let{name:r,params:i}=n;t=p(t,i?{name:r,params:i}:{name:r})}t&&(o.bound=t)}let s=(t,n)=>{let r=n?{type:i.Named,value:{name:t},text:t}:{type:i.Unparsed,value:t,text:t};o&&(r.context=o),e.push(r)};if(k(e,t,o,n))return;let c=/[A-Za-z_][A-Za-z0-9_]*$/.exec(t),l=c?c.index:-1,u=l>0?t[l-1]:``;for(let t=e.length-1;l===0&&t>=0&&!u;t--)u=e[t].text?.at(-1)??``;l>=0&&!/[A-Za-z0-9_.]/.test(u)?(l>0&&s(t.slice(0,l)),s(t.slice(l),!0)):s(t)}};function T(e,t,r,i){if(!e||!t)return;let a=e.bind(n.Table,``,{at:{scope:t,rowIndex:r,colIndex:i}});return a?e.resolve(n.Table,a)?.toString():void 0}var E=/[A-Za-z_\\\u007F-\uFFFF][A-Za-z0-9_.\u007F-\uFFFF]*$/,D=/[A-Za-z0-9_.)\]}"'!#\u007F-\uFFFF]/;function O(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t!==`'`){if(t===`]`)return n+1;if(t===`[`)return null}else n++}return-1}function k(e,t,n,r){let a=0,o=-1;for(let e=0;e<t.length;e++){let n=t[e];a>0&&n===`'`?e++:n===`[`?(a===0&&(o=e),a++):n===`]`&&a>0&&a--}if(a===0)return!1;let s=t.slice(0,o);if((s.split(`"`).length-1)%2==1)return!1;let c=e.length>0?e[e.length-1]:void 0,l=``,u=!1,d=E.exec(s);if(d){let e=d.index>0?s[d.index-1]:c?.text?.at(-1)??``;if(/[A-Za-z0-9_.]/.test(e))return!1;l=d[0],s=s.slice(0,d.index)}else s.length===0&&c?.text&&E.exec(c.text)?.index===0&&(c.type===i.Named&&!c.value?.scope||c.type===i.TableReference)&&(l=c.text,u=!0);if(!u){let e=s.length>0?s[s.length-1]:c?.text?.at(-1)??``;if(e&&D.test(e))return!1}let f=l||(r?.()??``),p=[],m=(e,t,n)=>{p.push({type:e,value:t,text:t,context:{name:f,argIndex:n,type:`table`}})},h=(e,t,n,r)=>{let a=e.startsWith(`#`),o=n?r?`column`:a?`specifier`:e?`column`:`any`:void 0,s=o?{table:f,name:e,partial:o}:{table:f,name:e};p.push({type:a?i.TableSpecifier:i.TableColumn,value:s,text:e,context:{name:f,argIndex:t,type:`table`}})},g=(e,t,n,r)=>{m(i.Paren,`[`,n),h(e.slice(1,t?-1:void 0),n,!t,r),t&&m(i.Paren,`]`,n)};m(i.Paren,`[`,-1);let _=t.slice(o+1);if(_.startsWith(`[`)){let e=0,t=!1,n=0;for(;n<_.length;){let r=_[n];if(r===`[`){let r=O(_,n);if(r===null)return!1;let i=r!==-1;if(g(_.slice(n,i?r:_.length),i,e,t),t=!1,!i)break;n=r}else if(r===`,`)m(i.Separator,`,`,e++),n++;else if(r===`:`)m(i.Infix,`:`,e),n++;else if(r===`@`)m(i.Prefix,`@`,e),t=!0,n++;else{if(r!==` `)return!1;{let t=n;for(;_[t]===` `;)t++;m(i.Whitespace,_.slice(n,t),e),n=t}}}}else{let e=_,t=e.startsWith(`@`);if(t&&(m(i.Prefix,`@`,0),e=e.slice(1)),e.startsWith(`[`)){if(O(e,0)!==-1)return!1;g(e,!1,0,t)}else{if(/(^|[^'])[[\]]/.test(e)||e.startsWith(`#`)&&e.includes(`,`))return!1;h(e,0,!0,t)}}if(s){let t={type:i.Unparsed,value:s,text:s};n&&(t.context=n),e.push(t)}if(u){let t={...c,type:i.TableReference,value:l,text:l};delete t.referenceIndex,e[e.length-1]=t}else if(l){let t={type:i.TableReference,value:l,text:l};n&&(t.context=n),e.push(t)}for(let t of p)e.push(t);return!0}export{w as FormulaCompiler,k as appendPartialStructuredReference};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./BMf827t1Ul65MHd5.js";import{Oi as t,fa as n,ur as r}from"./Dn5PwRw7rrTKNnql.js";var i=r.Type,a={SUM:0,COUNT:1,COUNTA:2,AVERAGE:3,MIN:4,MAX:5,PRODUCT:6,"VAR.S":7,VAR:7,"VAR.P":8,VARP:8,"STDEV.S":9,STDEV:9,"STDEV.P":10,STDEVP:10},o=class{constructor(){this._next=1,this._numbers=new Map,this._keys=new Map,this._strings=new Map,this.values=[null]}of(e){if(e==null)return 0;if(typeof e==`number`)return this._number(e);let n=t(e),r=this._keys.get(n);return r===void 0&&(r=this._next++,this._keys.set(n,r),this.values[r]=e),r}fill(e,t){if(e instanceof n&&e._visitColumnRuns((e,n,r,i)=>this._run(t,e,n,r,i)))return;let r=t.length;for(let n of e.entries()){let e=n.coords.rowIndex;e<r&&(t[e]=this.of(n.value))}}_number(e){let t=this._numbers.get(e);return t===void 0&&(t=this._next++,this._numbers.set(e,t),this.values[t]=e),t}_run(e,t,n,a,o){if(!(n instanceof r&&n.codec)){for(let r=a,i=t;r<=o;r++,i++)e[i]=this.of(n.at(r));return}let s=n.codec,c=this._strings.get(s);c||this._strings.set(s,c=new Map);let{types:l,defaultType:u,ints:d,doubles:f,intShift:p,intOffset:m}=n.getViews();for(let r=a,h=t;r<=o;r++,h++){let t=l?l[r]:u;if(t===i.Int32)e[h]=this._number(d[(r<<p)+m]);else if(t===i.Float64)e[h]=this._number(f[r]);else if(t===i.String){let t=d[(r<<p)+m],n=c.get(t);n===void 0&&c.set(t,n=this.of(s.decodeString(t))),e[h]=n}else t===i.Blank?e[h]=0:e[h]=this.of(n.at(r))}}},s=class{constructor(){this.table=[e.BuiltIn.Div0],this._codes=new Map}codeOf(e){let t=this._codes.get(e);return t===void 0&&(t=this.table.length,this.table.push(e),this._codes.set(e,t)),t}},c=(e,t,a)=>{let o=t.types.length,s={ok:!0,numeric:!0},c=(e,n)=>l(t,e,n,a,s);if(!(e instanceof n&&e._visitColumnRuns((e,n,a,o)=>{if(!(n instanceof r&&n.codec)){for(let t=a,r=e;t<=o;t++,r++)c(r,n.at(t));return}let{types:s,defaultType:l,ints:u,doubles:d,intShift:f,intOffset:p}=n.getViews();if(!s&&l===i.Float64)return t.doubles.set(d.subarray(a,o+1),e),void t.types.fill(i.Float64,e,e+o-a+1);for(let r=a,m=e;r<=o;r++,m++){let e=s?s[r]:l;e===i.Int32?(t.ints[m<<1]=u[(r<<f)+p],t.types[m]=i.Int32):e===i.Float64?(t.doubles[m]=d[r],t.types[m]=i.Float64):e!==i.Blank&&c(m,n.at(r))}})))for(let t of e.entries()){let e=t.coords.rowIndex;e<o&&c(e,t.value)}return s},l=(t,n,r,a,o)=>{if(r!=null){switch(typeof r){case`number`:t.doubles[n]=r,t.types[n]=i.Float64;return;case`string`:t.types[n]=i.String,o.numeric=!1;return;case`boolean`:t.types[n]=r?i.True:i.False,o.numeric=!1;return}if(e.isError(r))return t.ints[n<<1]=a.codeOf(r),void(t.types[n]=i.Error);o.ok=!1}},u=(t,n,a)=>{let o=a.table,s=new r(((e,t,n,r)=>{let a=!!(r&r-1),o=1<<i.Blank|1<<i.False|1<<i.True;return{buffer:e,byteOffset:t,length:n,width:r&1<<i.Float64?8:4,defaultType:a?i.Blank:31-Math.clz32(r),typeMask:r,hasTypes:a,hasSlots:(r&~o)!==0}})(t,n.ptr(),n.length(),n.type_mask()),{isError:()=>!1,encodeString:()=>0,decodeString:()=>null,encodeError:()=>0,decodeError:e=>o[e]??null});return t=>{let n=s.at(t)??null;return typeof n!=`number`||Number.isFinite(n)?n:e.BuiltIn.Num}},d=(e,t)=>`${e}|${t.join(`,`)}`,f=class{constructor(e,t){this._json=e,this._values=new Map(e.values),this._mode=t}getDataFields(){return this._json.dataFields}getFields(){return this._json.fields}getValue(t,n){let r=this._json.fields,i=[];for(let e=0;e<r.length;e++){let t=r[e].page,a=n.get(e);if(t===void 0)i.push(a??-1);else if(a!==void 0&&a!==t)return}let a=d(t,i);return this._mode===`blocked`?a===this._json.block?.first?e.BuiltIn.Spill:void 0:this._mode===`wanted`?void 0:this._values.get(a)}isComputed(){return!1!==this._json.computed}},p={placed:new WeakMap,blocked:new WeakMap,wanted:new WeakMap},m=(e,t=`placed`)=>{let n=p[t],r=n.get(e);return r||(r=new f(e,t),n.set(e,r)),r};export{c as a,l as c,m as i,u as n,a as o,d as r,o as s,s as t};
|