@sheetxl/studio-mui 0.3.0 → 0.3.1
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 +11 -11
- package/README.md +24 -24
- package/browser/cjs/1YEg8ptbpW_zo0_c.cjs +12 -0
- package/browser/cjs/{CwsoT9PB20BPWI94.cjs → 3mnCV1wkKu4YCs7n.cjs} +1 -1
- package/browser/cjs/{DYpWMegNKhcIz5Xx.cjs → B1CCk3o0Nv4mJ1Ff.cjs} +2 -2
- package/browser/cjs/{CE5a4FdaHLhTxjMI.cjs → B1WSHW4lt2L5wJO3.cjs} +3 -3
- package/browser/cjs/{CADYkszzYeb1okev.cjs → B6QgPFUbEVsL1O-L.cjs} +1 -12
- package/browser/cjs/B79CHYVWaVXMRmoE.cjs +6 -0
- package/browser/cjs/{Co4jRh5Lu0sSmXGC.cjs → BEt_uFICH24FzpOe.cjs} +2 -2
- package/browser/cjs/BEzNZIQy5IlW0iAl.cjs +238 -0
- package/browser/cjs/{BJPmztbd5VBK5mm9.cjs → BHq8j-aNWkuYkURM.cjs} +1 -1
- package/browser/cjs/{BfIfeQXC56VMrPqG.cjs → BKo9DTgY_3d6nE0E.cjs} +1 -1
- package/browser/cjs/{DxscJXvrkziYQcFs.cjs → BNA6r4S5nm_CzUm6.cjs} +1 -1
- package/browser/cjs/BNpz92-BEgkxWvh6.cjs +11 -0
- package/browser/cjs/{BZDyAbB3lej5Jex6.cjs → BQeCI5I748X8pDto.cjs} +1 -1
- package/browser/cjs/BR4KYl8frdYrZXhN.cjs +13 -0
- package/browser/cjs/{DoP_dQD568y-PdQR.cjs → BSnfy-ivJTWdlK3A.cjs} +2 -2
- package/browser/cjs/{iloxo818N9ISo1kb.cjs → BVB95JnDB-sUQttP.cjs} +1 -1
- package/browser/cjs/{DeDq_kDsb_3oXYP3.cjs → BbzI8ABw0DHCij-A.cjs} +1 -1
- package/browser/cjs/{DJPvDosur15jRed6.cjs → BcQkD2UP3Iqsf8Fi.cjs} +2 -46
- package/browser/cjs/{u8HVgr27hT-2GVfY.cjs → BdV3cCQa36ZCkL4H.cjs} +1 -1
- package/browser/cjs/{C8QBQtkkjvMqMVxZ.cjs → Bh2zzNItZd-6FD_Z.cjs} +2 -2
- package/browser/cjs/{4WTvahGneDLqs8nK.cjs → By_cIz-TMire5bw7.cjs} +9 -24
- package/browser/cjs/C-_njVetl9K8CJri.cjs +15 -0
- package/browser/cjs/{s023hbvdZPtE0ZgU.cjs → C5yXi0ZLdk8cegEV.cjs} +4 -4
- package/browser/cjs/{CHkQq93Benc1vCpr.cjs → CD9-AAL5QOuUXpGa.cjs} +2 -2
- package/browser/cjs/{DbOphBQCPCGOjcMB.cjs → CFyRrZrtTj0szEBJ.cjs} +20 -25
- package/browser/cjs/{DyBAl2cYUIbkoWsa.cjs → CFz-gPnOVecGhXAQ.cjs} +1 -1
- package/browser/cjs/{D57lYhefqT866UE1.cjs → CIDji1QOkywtvqEU.cjs} +1 -1
- package/browser/cjs/{fSTkOlUIbVZ0w-Q2.cjs → CMZ7PzY_xBaB01Wa.cjs} +1 -1
- package/browser/cjs/{C_Wcg7JI6v6vkBD-.cjs → CP8909XpM31di_I4.cjs} +1 -1
- package/browser/cjs/CS3l6TIh0gU3sA2R.cjs +6 -0
- package/browser/cjs/{DbtwYi7JAHoFLILb.cjs → Cb7Ywgxnsg32GtZC.cjs} +4 -19
- package/browser/cjs/{BQLQEJgX-sM2Sdn6.cjs → CdlodVmE_U6kq13A.cjs} +2 -2
- package/browser/cjs/{Dj7OrKe2zahSy4rW.cjs → ChDhTJyaQVGQ_AAW.cjs} +2 -7
- package/browser/cjs/{30P2pzSg1uZ4m4Zw.cjs → CoAUFW3rE-ZU04sj.cjs} +1 -1
- package/browser/cjs/{CFRl9gT7qj3ENMiA.cjs → CoGNjOqAsq3v4dNU.cjs} +1 -1
- package/browser/cjs/{DqYbR5LZ21mHAb4i.cjs → CqwNicmb3Ve75UKg.cjs} +1 -1
- package/browser/cjs/CsjmqYMv0yUjJuEa.cjs +7 -0
- package/browser/cjs/{BBBGyVg88HFyp_Ew.cjs → CthhJsNSsNw003nz.cjs} +1 -1
- package/browser/cjs/{DvBmxW9WFXe5nTOj.cjs → CtuayTMsg15Ek7N2.cjs} +1 -1
- package/browser/cjs/{CEyf06HL4OpZLe_9.cjs → D0KbXmifGL9COnTn.cjs} +2 -2
- package/browser/cjs/{_GQMxgpoD4XQiStU.cjs → D1z2rxTd4juxWblf.cjs} +1 -1
- package/browser/cjs/D4zF1Hhc3mBlNNoX.cjs +6 -0
- package/browser/cjs/{vavqGfGZgq5i7n4B.cjs → D8eS_vce5B9menV5.cjs} +2 -2
- package/browser/cjs/{B4ne8Qu3ISmBz2I_.cjs → DVU4idIDTTz9Pu5P.cjs} +1 -1
- package/browser/cjs/DW9WwmeG2vVMGbYU.cjs +15 -0
- package/browser/cjs/{D0u9_xtziw7PDcl8.cjs → DrJyN_0T5kyWuuIh.cjs} +1 -1
- package/browser/cjs/{CIZNaSq0_vaZNZu9.cjs → DxACtr3WZnBFuXpu.cjs} +2 -2
- package/browser/cjs/{yNZPaSNiBbCzS-ZR.cjs → K4bhbGLflu3pYFHS.cjs} +3 -8
- package/browser/cjs/{tXdOaeSBJX_Dwtfs.cjs → PdwwTxM_DHCgQrxv.cjs} +2 -2
- package/browser/cjs/Q-_8LHrKWcpj3r7F.cjs +6 -0
- package/browser/cjs/{DcE7grNkk9CxPlz7.cjs → RrCz-1Q4Q9suB7j_.cjs} +1 -1
- package/browser/cjs/index.cjs +3 -3
- package/browser/cjs/{UZJaTSqgj_1vwBPD.cjs → kB-8OyiedI6iKdlv.cjs} +1 -1
- package/browser/cjs/{DHmGfW6PcfPhM8oL.cjs → nKP8-E-UOOscXlg2.cjs} +1 -1
- package/browser/cjs/{DrfhSPGoBxXa2zrq.cjs → nMYwRU0M-HXpWQ6C.cjs} +1 -1
- package/browser/cjs/q0y6NDefblRQrS_O.cjs +6 -0
- package/browser/cjs/{WvFOw7IRc6nN3Ktw.cjs → qvN5BhYwdxsmB52p.cjs} +1 -1
- package/browser/cjs/{Dkjsd1qc-X40cksg.cjs → tavAzhljteQQ_ct2.cjs} +1 -1
- package/browser/esm/{B9OOPVMmJt7VFL6P.mjs → 0lX_9VGN9S6inxKd.mjs} +1 -13
- package/browser/esm/{Cluz9cocEiEkoBqC.mjs → 18HMxDJcGi3erlU-.mjs} +28 -28
- package/browser/esm/{9xTBsz6sONUyOHUW.mjs → AZqmGzpPMrJbgV2W.mjs} +1 -7
- package/browser/esm/{LwaL-xJmA9EnZcqb.mjs → B3EG6jjfR2LEnrAU.mjs} +2 -8
- package/browser/esm/{BPvaz6hF_IcJuJOV.mjs → B64E2zQmL6hLVfZj.mjs} +1 -7
- package/browser/esm/{B3tAu8z_m4SfpweK.mjs → B6ELdf71jSY39vY1.mjs} +1 -1
- package/browser/esm/{CnInDMsKLsntQ4ZW.mjs → B7scZi_VczEUXidh.mjs} +1 -7
- package/browser/esm/{wefMW1XHosAljDkr.mjs → BDch4FvLXEr0f6ZQ.mjs} +2 -2
- package/browser/esm/{B4KRBO609RwNjzvi.mjs → BGEuFRd7CprH18Ux.mjs} +1 -7
- package/browser/esm/{B3zRuS9CUBbywRyw.mjs → BHTWupqElPJQagv4.mjs} +1 -7
- package/{node/esm/s1BEJnCqBOb8JJDU.mjs → browser/esm/BOL63BcaR86vXxt8.mjs} +1 -7
- package/browser/esm/{BFDuLEYykYS1BDn_.mjs → BPZsd5vtzGJ4PtJr.mjs} +4 -22
- package/browser/esm/{5ZeTyyMjwTBT3EsV.mjs → B_eHwwd9-PXWYLMA.mjs} +1 -7
- package/browser/esm/{DwSOLCKwPflQ8oiF.mjs → BbloSfJTNz8-g7pa.mjs} +4 -4
- package/browser/esm/{gNrO89j_4tRIGEtM.mjs → BhfMnNKVTfBV03lK.mjs} +3 -9
- package/browser/esm/{C6k-LrteLTacKvUJ.mjs → BkY6jPvgDNSHVjm1.mjs} +6 -6
- package/browser/esm/{0C6QuzGc8rTp95Os.mjs → BmOgysv2Oa-vQXE0.mjs} +2 -2
- package/browser/esm/{4JoQwaWGy7X9v7Fv.mjs → BpTfL8wDDLWCFbUW.mjs} +1 -7
- package/browser/esm/{BFcMJeN-Jx_QyCvg.mjs → Bsirmjdfj8W9sVx5.mjs} +2 -2
- package/browser/esm/{CpSUrjPU9wYc3Jhg.mjs → BslEgsLB-o1nc3NJ.mjs} +1 -7
- package/browser/esm/{DgAkhv_thUOpWlnL.mjs → BvJx_QZ4eKWrufFK.mjs} +9167 -9247
- package/browser/esm/{QzCoqfRysNMoTzb1.mjs → Bwbk5CiNsPh4oG-e.mjs} +1 -7
- package/browser/esm/{Cl0T7a1Q_gErBp0a.mjs → C-I7rCun0hGkuQ6J.mjs} +1 -7
- package/browser/esm/{Bl6YU6FumgUvr0UG.mjs → CF7ede_gzDlyTqfP.mjs} +1 -7
- package/browser/esm/{5NrbFIuL4ezvklhf.mjs → CXVZIbnDZdhdPDsS.mjs} +2 -2
- package/browser/esm/{rrGPhfv9KHmWuZ1O.mjs → CcSG0PBy9Xc99VMv.mjs} +1 -7
- package/{node/esm/BbEfqkC8wcfMDYW7.mjs → browser/esm/CcSdpe6QFrIBEfxa.mjs} +1 -7
- package/browser/esm/{BBN8odKP7v-WcPD2.mjs → CdCJMJxXOSz6lxOy.mjs} +1 -7
- package/browser/esm/CjHkOkuQRYMpUxe5.mjs +21 -0
- package/browser/esm/{C7nYvIDkdvZ1Dj4m.mjs → Cldrd9EWLvrv7OmM.mjs} +3 -21
- package/browser/esm/{CPpDKazrNC3936LC.mjs → CnEgkW6Z3qXNMA3o.mjs} +1 -7
- package/browser/esm/{cAw1gvsUyweC9j3E.mjs → DKyHs94FV1bG9frs.mjs} +1 -7
- package/browser/esm/{Cx2I29WhfKMYwydX.mjs → DSy9HoHQkEeO33eC.mjs} +1 -7
- package/browser/esm/{H8PuG54lnnKpLJ9K.mjs → DTuQMORnquJOYPd_.mjs} +2 -2
- package/browser/esm/DYfYa5shdr1OHSo9.mjs +24 -0
- package/browser/esm/{DQA0GopfVCQr8XAy.mjs → DbaMa7xh1JERqjfu.mjs} +1 -7
- package/browser/esm/{C55fwXLJyCRvXnox.mjs → DdvoohT27nSi_3cd.mjs} +1 -7
- package/browser/esm/{BNXkhPhojFj2qVzy.mjs → DfomV5Es6zAn4RZi.mjs} +96 -102
- package/browser/esm/{CtY7bZRPP4_KRNmt.mjs → Dr9yLItWEDzTQl2s.mjs} +2 -2
- package/{node/esm/BRaRGYJwIxUVeGqc.mjs → browser/esm/DskzH7zTkxNR4kmu.mjs} +1 -7
- package/browser/esm/{BAe4Amd0bcUlcPDo.mjs → DyJFrpwrf2hOoMB8.mjs} +1 -7
- package/browser/esm/{BoyMSFQmu3xbxOlA.mjs → E57nRNXAFyQlfQcA.mjs} +4 -10
- package/{node/esm/CpoyQrYrPV0-9RPc.mjs → browser/esm/LyNZuqChCFhEwsot.mjs} +1 -7
- package/browser/esm/{DB1-J0MOAeH11ZyJ.mjs → OA194vapZVgAyYfI.mjs} +1 -7
- package/browser/esm/{CCk3fUZpSsFCIy8K.mjs → OAJjLDFVSai0yCAH.mjs} +2 -14
- package/browser/esm/{DsWvUVuInbcvxqIu.mjs → YWavBpnhyEFk5GMG.mjs} +8 -25
- package/browser/esm/{DgnVRt8VYgaSZGHj.mjs → aApOir3D3mXBHnvi.mjs} +12 -10
- package/browser/esm/{Dwss46fwkNYFDw8t.mjs → bKlq3J1NJoYG9nEK.mjs} +7 -71
- package/browser/esm/{BCMVtS3Laq-Xh8Di.mjs → i5M3BzX6_TbbFlH5.mjs} +1 -9
- package/browser/esm/index.mjs +10 -10
- package/browser/esm/{DAO7AruN1dqHKCzx.mjs → j8ncnjiLyFIkRpRY.mjs} +37 -57
- package/browser/esm/{CJ0O6bKXr7qeO25m.mjs → oISMsYlGCPZ7-0lX.mjs} +2 -8
- package/browser/esm/{DxDjGuX7dIrp2S15.mjs → oPlD2dUf3YmsFkON.mjs} +2 -14
- package/{node/esm/BfEdsxDq6MOecVqq.mjs → browser/esm/orOLzbRzqosIA5-M.mjs} +1 -7
- package/browser/esm/{wy5pKj7t63p_up1j.mjs → sBOX_jXfdNOE_89x.mjs} +134 -134
- package/browser/esm/{CgUrlFh28m1acaYQ.mjs → siOdsSC0nSzvcV6e.mjs} +1 -7
- package/browser/esm/{DsZx_Zkhn1I5H_1J.mjs → v7U7eI9QzTNkm3Bw.mjs} +2 -2
- package/browser/esm/{BBSvNtWZn99G2Sel.mjs → xLRSe1qHuVdyTRam.mjs} +1 -14
- package/licenses/dependencies.txt +77 -77
- package/node/assets/style.css +1 -1
- package/node/esm/{hpjhhcXZ4ox1ttj9.mjs → 2LRTxgV_lBAeZ-P_.mjs} +3 -9
- package/node/esm/{9xTBsz6sONUyOHUW.mjs → AZqmGzpPMrJbgV2W.mjs} +1 -7
- package/node/esm/{D-5hudKxKNcxHDv4.mjs → B200JUCQCqtoXtze.mjs} +11 -29
- package/node/esm/{CipoP939zaH4fcOy.mjs → B4FapexYISkwv2PP.mjs} +1 -7
- package/node/esm/{BPvaz6hF_IcJuJOV.mjs → B64E2zQmL6hLVfZj.mjs} +1 -7
- package/node/esm/{C6u3GsSp4e2cvW9r.mjs → B6wRJIobYG51nE8k.mjs} +1 -1
- package/node/esm/{qiZgtOByq0ONnESS.mjs → BD9x8fkvhcvJ7xjU.mjs} +1 -8
- package/node/esm/{B4KRBO609RwNjzvi.mjs → BGEuFRd7CprH18Ux.mjs} +1 -7
- package/node/esm/{wqbe04B4sEFndP3V.mjs → BI5BlWbeESiI0CbN.mjs} +4 -10
- package/node/esm/{C8STZ7Zt6L0KzqIE.mjs → BLdoPiUZ3PSw_Jx4.mjs} +2 -2
- package/{browser/esm/s1BEJnCqBOb8JJDU.mjs → node/esm/BOL63BcaR86vXxt8.mjs} +1 -7
- package/node/esm/{B_G7O_zb-jF1PwUW.mjs → BV8QMkxYffe5YuKF.mjs} +8 -8
- package/node/esm/{CGpy_JYlJvSqi2bv.mjs → BXtDB7WZJlFEKr8M.mjs} +1 -3
- package/node/esm/{C0BuhFhvary0MrNX.mjs → BkyuOVy2KETQMFCO.mjs} +1 -7
- package/node/esm/{4JoQwaWGy7X9v7Fv.mjs → BpTfL8wDDLWCFbUW.mjs} +1 -7
- package/node/esm/{DCuXbif8mI95HsNT.mjs → BqgsCpsX8xl4a-gQ.mjs} +1 -7
- package/node/esm/{C5U11rfhUvotCiwk.mjs → Bqi23kQTBoGLm5F8.mjs} +7 -71
- package/node/esm/{QzCoqfRysNMoTzb1.mjs → Bwbk5CiNsPh4oG-e.mjs} +1 -7
- package/node/esm/{BBdLL4LjdF1xMJM1.mjs → Bzn7iPRWVFns38as.mjs} +1 -7
- package/node/esm/{CMqERd7Psx-3Wfm9.mjs → C5AyRET8yEW8AHCx.mjs} +6 -26
- package/node/esm/{Bl6YU6FumgUvr0UG.mjs → CF7ede_gzDlyTqfP.mjs} +1 -7
- package/node/esm/{DdzeWAW2GHn9AEEc.mjs → CHa8zqxxqN37UAbT.mjs} +1 -7
- package/node/esm/{hNQ44J3MKLhqWqDQ.mjs → CJZtnupg7aYCcfKR.mjs} +2 -2
- package/node/esm/CaTPeRd3yej1D44o.mjs +80 -0
- package/node/esm/{rrGPhfv9KHmWuZ1O.mjs → CcSG0PBy9Xc99VMv.mjs} +1 -7
- package/{browser/esm/BbEfqkC8wcfMDYW7.mjs → node/esm/CcSdpe6QFrIBEfxa.mjs} +1 -7
- package/node/esm/{CPpDKazrNC3936LC.mjs → CnEgkW6Z3qXNMA3o.mjs} +1 -7
- package/node/esm/{Bav2rRIN-77VagCp.mjs → CsyP8mzSIyH_j_gx.mjs} +2 -14
- package/node/esm/CtwI3UxESNeLVKz4.mjs +14 -0
- package/node/esm/{z4aHdT3kX8QkA5WB.mjs → Cz3i5M3BNm_sU7VM.mjs} +1 -7
- package/node/esm/D0I-t4XarGx9tL2X.mjs +16 -0
- package/node/esm/{TF4SxbxBSD3Gf9rn.mjs → D9FIPE6c82obo0bd.mjs} +1 -7
- package/node/esm/{v_xWzWUNiVGQNBoT.mjs → DCnTdfW-zrlDozHu.mjs} +1 -1
- package/node/esm/{Bl4s1iMUrCbnLTK6.mjs → DDMv9FFsdYN-wjV1.mjs} +4 -22
- package/node/esm/{CQza81LSbdfj4dh8.mjs → DMYhiPgHOvCK0e6G.mjs} +1 -7
- package/node/esm/{Dzi6IQ6mIY4GUhhn.mjs → DSRKBM2nh9iYul8L.mjs} +1 -7
- package/node/esm/{Cx2I29WhfKMYwydX.mjs → DSy9HoHQkEeO33eC.mjs} +1 -7
- package/node/esm/{B6zpbEevMTArgNIt.mjs → DToXdyBIJDYd1rr4.mjs} +38 -38
- package/node/esm/{C55fwXLJyCRvXnox.mjs → DdvoohT27nSi_3cd.mjs} +1 -7
- package/node/esm/{ByM8BXRmy_WcnL53.mjs → Dht5yjzp4Y9-leiH.mjs} +5 -5
- package/node/esm/{CF8Iw2U0KmkBM7e_.mjs → DqyrRbgk1-rYiye4.mjs} +12 -10
- package/{browser/esm/BRaRGYJwIxUVeGqc.mjs → node/esm/DskzH7zTkxNR4kmu.mjs} +1 -7
- package/node/esm/{oOVkOZ3Xk1oEBGVF.mjs → IoNOHrmO_TsKnDiU.mjs} +13 -13
- package/node/esm/{C-OobshDolEf_YMF.mjs → KDwQLyg7m49Cqgq7.mjs} +1 -1
- package/{browser/esm/CpoyQrYrPV0-9RPc.mjs → node/esm/LyNZuqChCFhEwsot.mjs} +1 -7
- package/node/esm/{9XZv6YbZGzXJWLjj.mjs → MIFyb4jWS5pgkDzZ.mjs} +1 -7
- package/node/esm/{CAMB3sLeYaDmVbRg.mjs → Q7QGn0xIiDXbz-EN.mjs} +1 -1
- package/node/esm/{Bt9tHh7hpw6l03MX.mjs → Roo316g8NJiFWbdh.mjs} +2 -8
- package/node/esm/{CgnJOwb7XTGd8SHn.mjs → W7ETXZ0lNEjio8UF.mjs} +1 -1
- package/node/esm/{BG0B7kW0XUOAZkPr.mjs → a5F0VHG5l1_KNuMk.mjs} +2 -2
- package/node/esm/{Dfiyl6Mp0BhjlSy1.mjs → egkfJ6xKy_CP5Yv6.mjs} +2 -2
- package/node/esm/index.mjs +20168 -20203
- package/node/esm/{BCHHa-dErcBIC_0y.mjs → j5PgCeWLt7VlfOPK.mjs} +7 -7
- package/{browser/esm/BfEdsxDq6MOecVqq.mjs → node/esm/orOLzbRzqosIA5-M.mjs} +1 -7
- package/node/esm/{CgUrlFh28m1acaYQ.mjs → siOdsSC0nSzvcV6e.mjs} +1 -7
- package/package.json +8 -8
- package/browser/cjs/BC2yD5lEOXzHeG1Y.cjs +0 -17
- package/browser/cjs/BmsLHCvcZOJnxYBm.cjs +0 -16
- package/browser/cjs/C_WGJtEWeSBOjCod.cjs +0 -25
- package/browser/cjs/CmHRyEKd83UyYJp5.cjs +0 -11
- package/browser/cjs/CxgPiyb5-hVRdhnd.cjs +0 -6
- package/browser/cjs/D2MFDC-oSzPf1srP.cjs +0 -314
- package/browser/cjs/DDJTjqunlP762qFN.cjs +0 -28
- package/browser/cjs/Ds4qQWfBUFy1VFRh.cjs +0 -12
- package/browser/cjs/DthoHYaMTKWkpydK.cjs +0 -11
- package/browser/cjs/WTQe6nG-0TQIsU2N.cjs +0 -16
- package/browser/cjs/cjzXoPH_hX0J64QW.cjs +0 -28
- package/browser/cjs/iZCwzTljD4cWi5hR.cjs +0 -20
- package/browser/esm/BKe9StZYGtgSF78N.mjs +0 -36
- package/browser/esm/DX5wv2h7KsKxTYo5.mjs +0 -34
- package/node/esm/BOSoESJcI0P9vUHU.mjs +0 -92
- package/node/esm/BSra_FfM7URLW976.mjs +0 -26
- package/node/esm/Dmuc2_ZKAEnSFQ4-.mjs +0 -28
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.0
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./D2MFDC-oSzPf1srP.cjs"),Ke=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",ys=new RegExp(`^[${Ke}][-${Ke}.0-9·̀-ͯ‿-⁀]*$`,"u");/**
|
|
7
|
-
* @license @sheetxl/io - IO - Import/Export Libraries for SheetXL. - v0.3.0
|
|
8
|
-
*
|
|
9
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
10
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
11
|
-
*//**
|
|
12
|
-
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
13
|
-
*
|
|
14
|
-
* @author Louis-Dominique Dubeau
|
|
15
|
-
* @license MIT
|
|
16
|
-
* @copyright Louis-Dominique Dubeau
|
|
17
|
-
*/function os(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}/**
|
|
18
|
-
* Character class utilities for XML NS 1.0 edition 3.
|
|
19
|
-
*
|
|
20
|
-
* @author Louis-Dominique Dubeau
|
|
21
|
-
* @license MIT
|
|
22
|
-
* @copyright Louis-Dominique Dubeau
|
|
23
|
-
*/const Ye="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const z=function(i){return i===32||i===10||i===13||i===9},xs=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=os,ts=function(i){return os(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ns=[32,10,13,9],ws=ys,vs=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Ss=rs,Cs=function(i){return rs(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},ks=bs,ge="http://www.w3.org/XML/1998/namespace",Zt="http://www.w3.org/2000/xmlns/",As={__proto__:null,xml:ge,xmlns:Zt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,q=13,jt=33,ot=10,St=60,Gt=61,F=62,X=63,Jt=93,pe=i=>i===34||i===39,as=[34,39],Ps=[...as,91,F],Es=[...as,St,Jt],Vs=[Gt,X,...ns],Os=[...ns,F,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Zt&&i.fail(`xmlns prefix must be bound to ${Zt}.`)}switch(s){case Zt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Zt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Is=i=>ks.test(i),Rs=i=>ws.test(i),es={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Ls{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Ss,this.nameCheck=Cs,this.isName=Is,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...As};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=ts,this.isName=Rs,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?q:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[es[t]]=s}off(t){this[es[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
|
|
24
|
-
`,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
|
|
25
|
-
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!ts(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!z(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=xs,this.getCode=this.getCode10):(this.isChar=vs,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=q,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case F:this.doctypeHandler?.(this.text),this.text="",this.state=q,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Es);t!==O&&(this.text+=String.fromCodePoint(t),t===Jt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===F?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===F&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
|
|
26
|
-
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===q&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=q,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==F?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=q}sCData(){this.captureToChar(Jt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Jt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case F:this.cdataHandler?.(this.text),this.text="",this.state=q;break;case Jt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||z(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||z(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:z(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===F){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=q}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Vs);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(z(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");z(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");z(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(z(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===F?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=q):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case F:this.openTag();break;case 47:this.state=35;break;default:z(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===F?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===F?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:z(t)?this.state=38:t===F?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===F?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):z(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();z(t)?this.state=36:t===F?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Os);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===F?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===F?this.closeTag():z(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case F:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=q,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Jt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case F:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
|
|
27
|
-
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=q,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
|
|
28
|
-
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:z(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Ls({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,D=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class Ns{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],P={key:null,source:t};let b=null,d=!1;const E=(y,m)=>{let I=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(I==null||(I=m[H](I),I==null))return}else if(I==null||(I=m(I),I==null))return}return I},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>E(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:E,copyToObject:(y,m,I,H)=>{const W=E(H??m,I);W!==void 0&&(y[m]=W)},copyTo:(y,m,I)=>{const H=E(I??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const I=m.indexOf(":");I!==-1&&(m=m.slice(I+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?P:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const I=m.indexOf(":");if(I!==-1&&(m=m.slice(I+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??P;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const ss=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},De=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),P=o.convert(w,i,n);return n?.parsedRefs?.set(i,P),P}catch(x){console.warn(x)}return null},Ut=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const P=De(w,b=>t.files[b],s,o,n);a.set(w,P)}return a},$s=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],Pe=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=$s[c]);let T=i("tint");if(T&&(s+=` ${u.T$1.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},ls=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),cs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},is={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Fs=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./yNZPaSNiBbCzS-ZR.cjs")),T=Promise.resolve().then(()=>require("./CmHRyEKd83UyYJp5.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./C_Wcg7JI6v6vkBD-.cjs")).then(d=>d.i));let w=null,P=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],P=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const E=new P.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.rf,m=y.beginPersist(),I={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Ee=[],ne=V=>d.files[V],fe=(V,U)=>{const Y=V.lastIndexOf("/"),ut=V.substring(0,Y+1)+"_rels/"+V.substring(Y+1,V.length)+".rels";let dt=U.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=De($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,E,yt),U.set(ut,dt)),dt},ae=(V,U,Y,ut=ht)=>{let dt=fe(U,ut).get(V),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=U.lastIndexOf("/"),xe=U.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=E?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((R,G,Qt,_,J,Z,wt)=>{const h=new Ns,Q=new u.De.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",D),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",D);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",D),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",D),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",D),e.copyTo("minLength",D),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=Pe(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",D,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",D,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Icon,e.copyTo("iconId",D),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",D),e.copyTo("hour",D),e.copyTo("minute",D),e.copyTo("month",D),e.copyTo("second",D),e.copyTo("year",D)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.Rd.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.Vr.fastStringToRange(p,is).colStart,pt=u.Vr.fastStringToRange(r.ref,is),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=cs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",D),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",D,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.Vr.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",D,"xSplit"),e.copyToObject(p,"rowIndex",D,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.Vr.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=Pe(l=>e.getAttribute(l));r&&(R.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",D),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",D),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(R,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(R,"outlineLevelCol",D,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(R,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(R,"outlineLevelRow",D,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",D,"outlineLevel"),e.copyTo("s",D,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const ms={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Dt=null,Yt=null,de=null,nt=null,$e=null,Me=null;const Ts=pt?.get("richData")??[],Fe=u.Vr.normalizeA1ToR1C1,je=u.D.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.D.createConflatingRanges();let ee,Pt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,zt="",Et="",Vt="",Ot="",It="",Rt="",Lt="",qe="",We="",_e="",ze="",Ue="",Ge="",Je="",mt=!0,Nt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const M=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.Vr.rangeToString(at),Mt=at.value[1],ie=u.Vr.resolveRelativeToA1(Mt,at.rowStart,at.colStart);M[L]=[$t,ie]}r.formulas=M}const st=Xe.done(!0),N=st.length;if(N>0){const M=new Array(N);for(let L=0;L<N;L++){const at=st[L],$t=u.Vr.rangeToString(at);M[L]=$t}r.volatile=M}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.D.createRangeComparator(u.k.Orientation.Column));const M=[];let L=null,at=-1,$t=-1,Mt=-1,ie=-1,vt=null;const Ze=Wt.length;Ze>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Mt=L.rowEnd,ie=L.value,M.push(L));for(let Ft=1;Ft<Ze;Ft++)vt=Wt[Ft],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Mt+1!==vt.rowEnd?(M.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Mt=L.rowEnd,ie=L.value):(Mt=vt.rowEnd,L.rowEnd=Mt);let Qe=[];for(let Ft=0;Ft<M.length;Ft++){const oe=M[Ft];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const M=it.tuples;r.data=M}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const N=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(N.t??null){case null:case"normal":_t=!0;break;case"shared":const it=N.si;Yt=N.ref,Dt=it;break;case"array":_t=!0,Yt=N.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=N.ref,_t=!0}N.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Pt=!0)}return void(Pt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const N=g.attributes.r;K=u.Vr.fastStringToCol(N);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Pt=!0));let M=g.attributes.s;M!==void 0&&(M=parseInt(M),Nt&&Nt.value===M&&Nt.colEnd+1===K?Nt.colEnd=K:(Nt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:M},Wt.push(Nt)))}}else{if(k==="row"){rt=!0;const N=g.attributes.r;if(B=parseInt(N)-1,ft=0,Et=g.attributes.customHeight,Et!==void 0&&(ft|=Ht.CustomHeight),Et!==We&&(mt=!0,We=Et),zt=g.attributes.ht,zt!==void 0&&(ft|=Ht.Ht),zt!==qe&&(mt=!0,qe=zt),Vt=g.attributes.hidden,Vt!==void 0&&(ft|=Ht.Hidden),Vt!==_e&&(mt=!0,_e=Vt),It=g.attributes.s,It!==void 0&&(ft|=Ht.S),It!==Ue&&(mt=!0,Ue=It),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==ze&&(mt=!0,ze=Ot),Rt=g.attributes.outlineLevel,Rt!==void 0&&(ft|=Ht.OutlineLevel),Rt!==Ge&&(mt=!0,Ge=Rt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Je&&(mt=!0,Je=Lt),ft!==0)if(Be+1!==B||mt){const it=Et!==void 0&&(Et==="1"||Et==="true"),M=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&zt!==void 0?parseFloat(zt):-1,csz:it,h:Vt!==void 0&&(Vt==="1"||Vt==="true"),s:it&&It!==void 0&&It!=="0"?parseInt(It):0,cs:M,l:Rt===void 0||Rt==="0"?0:parseInt(Rt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Pt)if(k==="is"||k==="v"){const N=C?.onEnd();N!==null&&e.addValue(B,K,""+N)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Pt=!1))}if(rt)return rt=!1,void(Nt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const N=Ts[parseInt(st)-1];if(N&&N.isFormulaError){gt={t:u.J.Error,v:N.getCode()};break}}}const k=u.Y.getBuiltInByLabel(g);k?gt={t:u.J.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.Vr.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Pt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Dt)if($e===Dt)nt=Me;else{if(nt=He.get(Dt),!nt){const k=[];de=Fe(g,B,K,k),nt=[de,k,g],He.set(Dt,nt)}$e=Dt,Me=nt}if(_t){const k=[];de=Fe(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Dt=null,void(Yt=null);Pt?C?.onText(g):rt||l?.onText(g)}}})(Q,R,h.createEventHandler(R,()=>{},Z),Z,ms,wt)})(tt,(R,G=!1)=>ae(R,$,G)??null,us,we,0,R=>{o&&(R=$+": "+R,o?.(R))},W),Bt=ss($,ne),xt=await(async(R,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./CADYkszzYeb1okev.cjs"));global.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=R instanceof Uint8Array?R:new Uint8Array(R);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(R){throw console.warn(`Error parsing sheet: '${$}'`,R),new Error(`Error parsing sheet: '${$}'`,{cause:R})}const qt=fe($,ut);let kt,Ne=new Map;if(qt){const R="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,J)=>{_.type===R&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Ne.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=ls(Q.substring(3)),Ne.has(Q)))continue;let j=ce.get(Q);j||(j=Ie.get(Q)),j||(j={id:u.F.uuidV4(),displayName:Q},Ie.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.F.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Ee.push(et())}else Xt=Y?ss($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(I),H.add(et),m.toResourceId(et)},yt):De($,ne,f,E,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:V=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const hs=d.Strings??[];for(let V=0;V<me;V++)le.push(hs[V]?.t??"");const Ve=new Map;let Oe=me;const us=V=>{const U=Ve.get(V);if(U!==void 0)return U;const Y=Oe;return Ve.set(V,Oe++),le.push(V),Y},ce=(Ut("richstructure",d,f,E,yt),Ut("richdata",d,f,E,yt),new Map),Ie=new Map,Re=Ut("people",d,f,E);let Ct=null;if(Re.size>0&&(Ct=Re.entries().next()?.value?.[1]?.persons,Ct)){const V=Ct.length;for(let U=0;U<V;U++){const Y=Ct[U];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=Ut("themes",d,f,E,yt);let Le=null;if(Te&&Te.entries){let V=Te.entries().next();V?.value?.[1]&&(Le=V.value[1])}const ds=new u.Fl(Le);let he=Ut("styles",d,f,E,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.Zi(he)));const ps=Ut("workbooks",d,f,E,yt);await Promise.all(Ee);const ye={...ps.entries().next().value[1],styles:he,theme:ds.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const gs={...n,resources:y,json:ye},fs=new u.Ky(gs);return H.forEach(V=>{V.deleteReference(I)}),m.endPersist(),fs}catch(d){let E="Unable to parse XLSX.";throw d instanceof u.Pe&&(E="Unable to open XLSX. There are too many rows or columns."),new Error(E,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./yNZPaSNiBbCzS-ZR.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((P,b)=>{const d={t:"z"},E=b.getCell().getStyle();if(!E.isNormal()){let f=E.getNumberFormat();f!==u.Ft.Type.General&&(f===u.Ft.Type.ShortDate?f="m/d/yyyy":f===u.Ft.Type.MediumDate?f="d-mmm-yy":f===u.Ft.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.Ft.Type.ShortTime?f="h:mm":f===u.Ft.Type.MediumTime?f="h:mm AM/PM":f===u.Ft.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(P!==null)switch(b.getType()){case u.J.Number:d.t="n",d.v=P;break;case u.J.String:d.t="s",d.v=P;break;case u.J.Boolean:d.t="b",d.v=P;break;case u.J.Error:d.t="e",d.v=P.toString();case u.J.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const P=[];T["!merges"]=P;for(let b=0;b<S.merges.length;b++)P.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const P=[];T["!cols"]=P;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let E=0;E<b.length;E++){const f=b[E];for(let m=P.length;m<=f.min-1;m++)P.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)P.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=cs,exports.c=i=>i?u.Yt$1.roundAccurately(parseFloat(i)/9525,1):null,exports.d=Pe,exports.i=Fs,exports.p=i=>parseFloat(i)/6e4,exports.r=ls,exports.t=i=>i?u.Yt$1.roundAccurately(parseFloat(i)/12700,4):null;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.0
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ct,pt={exports:{}};/* @license
|
|
7
|
-
Papa Parse
|
|
8
|
-
v5.5.3
|
|
9
|
-
https://github.com/mholt/PapaParse
|
|
10
|
-
License: MIT
|
|
11
|
-
*/const _t=function(Y,Q){for(var k=0;k<Q.length;k++){const P=Q[k];if(typeof P!="string"&&!Array.isArray(P)){for(const B in P)if(B!=="default"&&!(B in Y)){const J=Object.getOwnPropertyDescriptor(P,B);J&&Object.defineProperty(Y,B,J.get?J:{enumerable:!0,get:()=>P[B]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}({__proto__:null},[(ct||(ct=1,pt.exports=function Y(){var Q,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,B=k.IS_PAPA_WORKER||!1,J={},gt=0,a={};function K(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let l=this._config.newline;l||(r=this._config.quoteChar||'"',l=this._handle.guessLineEndings(e,r)),e=[...e.split(l).slice(n)].join(l)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,B)k.postMessage({results:r,workerId:a.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):B&&this._config.error&&k.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=a.RemoteChunkSize),K.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(l){this._chunkError(l.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){var i;e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=((i=(i=e).getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=a.LocalChunkSize),K.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,l=(this._config.chunkSize&&(l=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,l)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:l}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;K.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){K.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){K.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){K.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=$(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(l){this._streamError(l)}},this),this._streamError=$(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=$(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,l=Math.pow(2,53),v=-l,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,w=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,m=this,T=0,o=0,j=!1,u=!1,p=[],s={data:[],errors:[],meta:{}};function C(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function R(){if(s&&n&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(f){return!C(f)})),L()){let f=function(O,A){_(t.transformHeader)&&(O=t.transformHeader(O,A)),p.push(O)};if(s)if(Array.isArray(s.data[0])){for(var h=0;L()&&h<s.data.length;h++)s.data[h].forEach(f);s.data.splice(0,1)}else s.data.forEach(f)}function c(f,O){for(var A=t.header?{}:[],b=0;b<f.length;b++){var y=b,g=f[b];g=((U,d)=>{return S=U,t.dynamicTypingFunction&&t.dynamicTyping[S]===void 0&&(t.dynamicTyping[S]=t.dynamicTypingFunction(S)),(t.dynamicTyping[S]||t.dynamicTyping)===!0?d==="true"||d==="TRUE"||d!=="false"&&d!=="FALSE"&&((I=>{if(M.test(I)&&(I=parseFloat(I),v<I&&I<l))return 1})(d)?parseFloat(d):w.test(d)?new Date(d):d===""?null:d):d;var S})(y=t.header?b>=p.length?"__parsed_extra":p[b]:y,g=t.transform?t.transform(g,y):g),y==="__parsed_extra"?(A[y]=A[y]||[],A[y].push(g)):A[y]=g}return t.header&&(b>p.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+b,o+O):b<p.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+b,o+O)),A}var E;s&&(t.header||t.dynamicTyping||t.transform)&&(E=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(c),E=s.data.length):s.data=c(s.data,0),t.header&&s.meta&&(s.meta.fields=p),o+=E)}function L(){return t.header&&p.length===0}function z(h,c,E,f){h={type:h,code:c,message:E},f!==void 0&&(h.row=f),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,L()?R():(R(),s.data.length!==0&&(T+=h.data.length,t.preview&&T>t.preview?i.abort():(s.data=s.data[0],r(s,m))))}),this.parse=function(h,c,E){var f=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,f)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((f=((O,A,b,y,g)=>{var U,d,S,I;g=g||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Z=0;Z<g.length;Z++){for(var W,tt=g[Z],F=0,q=0,x=0,D=(S=void 0,new st({comments:y,delimiter:tt,newline:A,preview:10}).parse(O)),H=0;H<D.data.length;H++)b&&C(D.data[H])?x++:(q+=W=D.data[H].length,S===void 0?S=W:0<W&&(F+=Math.abs(W-S),S=W));0<D.data.length&&(q/=D.data.length-x),(d===void 0||F<=d)&&(I===void 0||I<q)&&1.99<q&&(d=F,U=tt,I=q)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=f.bestDelimiter:(n=!0,t.delimiter=a.DefaultDelimiter),s.meta.delimiter=t.delimiter),f=at(t),t.preview&&t.header&&f.preview++,e=h,i=new st(f),s=i.parse(e,c,E),R(),j?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){m.streamer._halted?(j=!1,m.streamer.parseChunk(e,!0)):setTimeout(m.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,c){h=h.substring(0,1048576),c=new RegExp(V(c)+"([^]*?)"+V(c),"gm");var E=(h=h.replace(c,"")).split("\r");if(h=1<(c=h.split(`
|
|
12
|
-
`)).length&&c[0].length<E[0].length,E.length===1||h)return`
|
|
13
|
-
`;for(var f=0,O=0;O<E.length;O++)E[O][0]===`
|
|
14
|
-
`&&f++;return f>=E.length/2?`\r
|
|
15
|
-
`:"\r"}}function V(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(t){var e=(t=t||{}).delimiter,i=t.newline,n=t.comments,r=t.step,l=t.preview,v=t.fastMode,M=null,w=!1,m=t.quoteChar==null?'"':t.quoteChar,T=m;if(t.escapeChar!==void 0&&(T=t.escapeChar),(typeof e!="string"||-1<a.BAD_DELIMITERS.indexOf(e))&&(e=","),n===e)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),i!==`
|
|
16
|
-
`&&i!=="\r"&&i!==`\r
|
|
17
|
-
`&&(i=`
|
|
18
|
-
`);var o=0,j=!1;this.parse=function(u,p,s){if(typeof u!="string")throw new Error("Input must be a string");var C=u.length,R=e.length,L=i.length,z=n.length,h=_(r),c=[],E=[],f=[],O=o=0;if(!u)return F();if(v||v!==!1&&u.indexOf(m)===-1){for(var A=u.split(i),b=0;b<A.length;b++){if(f=A[b],o+=f.length,b!==A.length-1)o+=i.length;else if(s)return F();if(!n||f.substring(0,z)!==n){if(h){if(c=[],I(f.split(e)),q(),j)return F()}else I(f.split(e));if(l&&l<=b)return c=c.slice(0,l),F(!0)}}return F()}for(var y=u.indexOf(e,o),g=u.indexOf(i,o),U=new RegExp(V(T)+V(m),"g"),d=u.indexOf(m,o);;)if(u[o]===m)for(d=o,o++;;){if((d=u.indexOf(m,d+1))===-1)return s||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:o}),W();if(d===C-1)return W(u.substring(o,d).replace(U,m));if(m===T&&u[d+1]===T)d++;else if(m===T||d===0||u[d-1]!==T){y!==-1&&y<d+1&&(y=u.indexOf(e,d+1));var S=Z((g=g!==-1&&g<d+1?u.indexOf(i,d+1):g)===-1?y:Math.min(y,g));if(u.substr(d+1+S,R)===e){f.push(u.substring(o,d).replace(U,m)),u[o=d+1+S+R]!==m&&(d=u.indexOf(m,o)),y=u.indexOf(e,o),g=u.indexOf(i,o);break}if(S=Z(g),u.substring(d+1+S,d+1+S+L)===i){if(f.push(u.substring(o,d).replace(U,m)),tt(d+1+S+L),y=u.indexOf(e,o),d=u.indexOf(m,o),h&&(q(),j))return F();if(l&&c.length>=l)return F(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:o}),d++}}else if(n&&f.length===0&&u.substring(o,o+z)===n){if(g===-1)return F();o=g+L,g=u.indexOf(i,o),y=u.indexOf(e,o)}else if(y!==-1&&(y<g||g===-1))f.push(u.substring(o,y)),o=y+R,y=u.indexOf(e,o);else{if(g===-1)break;if(f.push(u.substring(o,g)),tt(g+L),h&&(q(),j))return F();if(l&&c.length>=l)return F(!0)}return W();function I(x){c.push(x),O=o}function Z(x){return x!==-1&&(x=u.substring(d+1,x))&&x.trim()===""?x.length:0}function W(x){return s||(x===void 0&&(x=u.substring(o)),f.push(x),o=C,I(f),h&&q()),F()}function tt(x){o=x,I(f),f=[],g=u.indexOf(i,o)}function F(x){if(t.header&&!p&&c.length&&!w){var D=c[0],H=Object.create(null),ot=new Set(D);let ft=!1;for(let G=0;G<D.length;G++){let N=D[G];if(H[N=_(t.transformHeader)?t.transformHeader(N,G):N]){let et,lt=H[N];for(;et=N+"_"+lt,lt++,ot.has(et););ot.add(et),D[G]=et,H[N]++,ft=!0,(M=M===null?{}:M)[et]=N}else H[N]=1,D[G]=N;ot.add(N)}ft&&console.warn("Duplicate headers found and renamed."),w=!0}return{data:c,errors:E,meta:{delimiter:e,linebreak:i,aborted:j,truncated:!!x,cursor:O+(p||0),renamedHeaders:M}}}function q(){r(F()),c=[],E=[]}},this.abort=function(){j=!0},this.getCharIndex=function(){return o}}function mt(t){var e=t.data,i=J[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){n=!0,ut(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:dt,resume:dt};if(_(i.userStep)){for(var l=0;l<e.results.data.length&&(i.userStep({data:e.results.data[l],errors:e.results.errors,meta:e.results.meta},r),!n);l++);delete e.results}else _(i.userChunk)&&(i.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!n&&ut(e.workerId,e.results)}function ut(t,e){var i=J[t];_(i.userComplete)&&i.userComplete(e),i.terminate(),delete J[t]}function dt(){throw new Error("Not implemented.")}function at(t){if(typeof t!="object"||t===null)return t;var e,i=Array.isArray(t)?[]:{};for(e in t)i[e]=at(t[e]);return i}function $(t,e){return function(){t.apply(e,arguments)}}function _(t){return typeof t=="function"}return a.parse=function(t,e){var i,n=(e=e||{}).dynamicTyping||!1;if(_(n)&&(e.dynamicTypingFunction=n,n={}),e.dynamicTyping=n,e.transform=!!_(e.transform)&&e.transform,!e.worker||!a.WORKERS_SUPPORTED)return n=null,a.NODE_STREAM_INPUT,typeof t=="string"?(t=(i=t).charCodeAt(0)!==65279?i:i.slice(1),n=new(e.download?it:X)(e)):t.readable===!0&&_(t.read)&&_(t.on)?n=new nt(e):(k.File&&t instanceof File||t instanceof Object)&&(n=new rt(e)),n.stream(t);(n=(()=>{var r,l,v;return!!a.WORKERS_SUPPORTED&&(l=k.URL||k.webkitURL||null,v=Y.toString(),r=a.BLOB_URL||(a.BLOB_URL=l.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",v,")();"],{type:"text/javascript"}))),(r=new k.Worker(r)).onmessage=mt,r.id=gt++,J[r.id]=r)})()).userStep=e.step,n.userChunk=e.chunk,n.userComplete=e.complete,n.userError=e.error,e.step=_(e.step),e.chunk=_(e.chunk),e.complete=_(e.complete),e.error=_(e.error),delete e.worker,n.postMessage({input:t,config:e,workerId:n.id})},a.unparse=function(t,e){var i=!1,n=!0,r=",",l=`\r
|
|
19
|
-
`,v='"',M=v+v,w=!1,m=null,T=!1,o=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||a.BAD_DELIMITERS.filter(function(p){return e.delimiter.indexOf(p)!==-1}).length||(r=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(i=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(w=e.skipEmptyLines),typeof e.newline=="string"&&(l=e.newline),typeof e.quoteChar=="string"&&(v=e.quoteChar),typeof e.header=="boolean"&&(n=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");m=e.columns}e.escapeChar!==void 0&&(M=e.escapeChar+v),e.escapeFormulae instanceof RegExp?T=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(T=/^[=+\-@\t\r].*$/)}})(),new RegExp(V(v),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return j(null,t,w);if(typeof t[0]=="object")return j(m||Object.keys(t[0]),t,w)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||m),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),j(t.fields||[],t.data||[],w);throw new Error("Unable to serialize unrecognized input");function j(p,s,C){var R="",L=(typeof p=="string"&&(p=JSON.parse(p)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(p)&&0<p.length),z=!Array.isArray(s[0]);if(L&&n){for(var h=0;h<p.length;h++)0<h&&(R+=r),R+=u(p[h],h);0<s.length&&(R+=l)}for(var c=0;c<s.length;c++){var E=(L?p:s[c]).length,f=!1,O=L?Object.keys(s[c]).length===0:s[c].length===0;if(C&&!L&&(f=C==="greedy"?s[c].join("").trim()==="":s[c].length===1&&s[c][0].length===0),C==="greedy"&&L){for(var A=[],b=0;b<E;b++){var y=z?p[b]:b;A.push(s[c][y])}f=A.join("").trim()===""}if(!f){for(var g=0;g<E;g++){0<g&&!O&&(R+=r);var U=L&&z?p[g]:g;R+=u(s[c][U],g)}c<s.length-1&&(!C||0<E&&!O)&&(R+=l)}}return R}function u(p,s){var C,R;return p==null?"":p.constructor===Date?JSON.stringify(p).slice(1,25):(R=!1,T&&typeof p=="string"&&T.test(p)&&(p="'"+p,R=!0),C=p.toString().replace(o,M),(R=R||i===!0||typeof i=="function"&&i(p,s)||Array.isArray(i)&&i[s]||((L,z)=>{for(var h=0;h<z.length;h++)if(-1<L.indexOf(z[h]))return!0;return!1})(C,a.BAD_DELIMITERS)||-1<C.indexOf(r)||C.charAt(0)===" "||C.charAt(C.length-1)===" ")?v+C+v:C)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
|
|
20
|
-
`,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!P&&!!k.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=st,a.ParserHandle=ht,a.NetworkStreamer=it,a.FileStreamer=rt,a.StringStreamer=X,a.ReadableStreamStreamer=nt,k.jQuery&&((Q=k.jQuery).fn.parse=function(t){var e=t.config||{},i=[];return this.each(function(l){if(Q(this).prop("tagName").toUpperCase()!=="INPUT"||Q(this).attr("type").toLowerCase()!=="file"||!k.FileReader||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)i.push({file:this.files[v],inputElem:this,instanceConfig:Q.extend({},e)})}),n(),this;function n(){if(i.length===0)_(t.complete)&&t.complete();else{var l,v,M,w=i[0];if(_(t.before)){var m=t.before(w.file,w.inputElem);if(typeof m=="object"){if(m.action==="abort")return l=w.file,v=w.inputElem,M=m.reason,void(_(t.error)&&t.error({name:"AbortError"},l,v,M));if(m.action==="skip")return void r();typeof m.config=="object"&&(w.instanceConfig=Q.extend(w.instanceConfig,m.config))}else if(m==="skip")return void r()}var T=w.instanceConfig.complete;w.instanceConfig.complete=function(o){_(T)&&T(o,w.file,w.inputElem),r()},a.parse(w.file,w.instanceConfig)}}function r(){i.splice(0,1),n()}}),B&&(k.onmessage=function(t){t=t.data,a.WORKER_ID===void 0&&t&&(a.WORKER_ID=t.workerId),typeof t.input=="string"?k.postMessage({workerId:a.WORKER_ID,results:a.parse(t.input,t.config),finished:!0}):(k.File&&t.input instanceof File||t.input instanceof Object)&&(t=a.parse(t.input,t.config))&&k.postMessage({workerId:a.WORKER_ID,results:t,finished:!0})}),(it.prototype=Object.create(K.prototype)).constructor=it,(rt.prototype=Object.create(K.prototype)).constructor=rt,(X.prototype=Object.create(X.prototype)).constructor=X,(nt.prototype=Object.create(K.prototype)).constructor=nt,a}()),pt.exports)]);exports.p=_t;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.0
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.0
|
|
9
|
-
*
|
|
10
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
|
|
15
|
-
*
|
|
16
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
17
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
18
|
-
*/
|
|
19
|
-
let e = null;
|
|
20
|
-
async function r() {
|
|
21
|
-
return e || (e = new Promise(async (o, l) => {
|
|
22
|
-
try {
|
|
23
|
-
const i = "0.20.2", n = `https://esm.sh/esbuild-wasm@${i}`, s = `https://esm.sh/esbuild-wasm@${i}/esbuild.wasm`;
|
|
24
|
-
console.log("🔄 Initializing esbuild...", s);
|
|
25
|
-
const a = await import(n);
|
|
26
|
-
console.log("🔄 Got esm...", s);
|
|
27
|
-
const t = a.default;
|
|
28
|
-
await t.initialize({ wasmURL: s, worker: !1 }), console.log("🔄 Initialized esm...", s), o(t);
|
|
29
|
-
} catch (i) {
|
|
30
|
-
console.error("Error initializing esbuild:", i), l(i);
|
|
31
|
-
}
|
|
32
|
-
}), e);
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
r as initialize
|
|
36
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.0
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.0
|
|
9
|
-
*
|
|
10
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
|
|
15
|
-
*
|
|
16
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
17
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
18
|
-
*/
|
|
19
|
-
let e = null;
|
|
20
|
-
async function n() {
|
|
21
|
-
return e || (e = new Promise(async (r, o) => {
|
|
22
|
-
console.log("🔄 Initializing Browser TypeScript module...");
|
|
23
|
-
let i = null;
|
|
24
|
-
try {
|
|
25
|
-
i = await import("https://esm.sh/typescript@5.7.2");
|
|
26
|
-
} catch (l) {
|
|
27
|
-
console.error("Error initializing Browser TypeScript module:", l);
|
|
28
|
-
}
|
|
29
|
-
i || console.log("use script fallback"), r(i);
|
|
30
|
-
}), e);
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
n as initialize
|
|
34
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.0
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.3.0
|
|
9
|
-
*
|
|
10
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.3.0
|
|
15
|
-
*
|
|
16
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
17
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
18
|
-
*/
|
|
19
|
-
let n = class {
|
|
20
|
-
constructor(n2) {
|
|
21
|
-
this._worker = null, this._nextId = 1, this._pendingRequests = /* @__PURE__ */ new Map(), this._workerFactory = n2;
|
|
22
|
-
}
|
|
23
|
-
start() {
|
|
24
|
-
if (typeof Worker > "u") throw new Error("Web Workers are not supported in this environment.");
|
|
25
|
-
return this._worker || (this._worker = this._workerFactory(), this._worker.onmessage = (n2) => {
|
|
26
|
-
const { id: e2, result: t2, error: r2 } = n2.data, o2 = this._pendingRequests.get(e2);
|
|
27
|
-
if (o2) if (this._pendingRequests.delete(e2), r2) {
|
|
28
|
-
const n3 = new Error(r2.message);
|
|
29
|
-
n3.stack = r2.stack, r2.cause && (n3.cause = r2.cause), o2.reject(n3);
|
|
30
|
-
} else o2.resolve(t2);
|
|
31
|
-
}, this._worker.onerror = (n2) => {
|
|
32
|
-
console.error("Worker error:", n2), this._pendingRequests.forEach((e2) => {
|
|
33
|
-
e2.reject(new Error(`Worker failed: ${n2.message}`));
|
|
34
|
-
}), this._pendingRequests.clear(), this._worker = null;
|
|
35
|
-
}), Promise.resolve();
|
|
36
|
-
}
|
|
37
|
-
execute(n2) {
|
|
38
|
-
if (!this._worker) throw new Error("Worker is not initialized. Call start() first.");
|
|
39
|
-
const e2 = this._nextId++;
|
|
40
|
-
return new Promise((t2, r2) => {
|
|
41
|
-
this._pendingRequests.set(e2, { resolve: t2, reject: r2 }), this._worker.postMessage({ id: e2, params: n2 });
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
terminate() {
|
|
45
|
-
this._worker && (this._worker.terminate(), this._worker = null);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
class e {
|
|
49
|
-
constructor(n2) {
|
|
50
|
-
this._onExecute = n2;
|
|
51
|
-
}
|
|
52
|
-
execute(n2) {
|
|
53
|
-
return this._onExecute(n2);
|
|
54
|
-
}
|
|
55
|
-
start() {
|
|
56
|
-
return Promise.resolve();
|
|
57
|
-
}
|
|
58
|
-
terminate() {
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const t = '/**\n * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.3.0\n *\n * (C) 2025-present SheetXL Inc. & Michael T. Ford\n * License: The license can be found at https://www.sheetxl.com/license.\n */\nconst W = { Number: "n", String: "s", Boolean: "b", Error: "e", Null: "z" };\nvar Re, ae, d;\n(ae = Re || (Re = {})).Orientation = { Column: "column", Row: "row" }, ae.Orientations = { ...ae.Orientation, Both: "both" }, ae.Direction = { Up: "up", Down: "down", Left: "left", Right: "right" }, ((e) => {\n e.Code = { Parse: 0, Null: 1, Div0: 2, Value: 3, Ref: 4, Name: 5, Num: 6, NA: 7, GettingData: 8, Spill: 9, Connect: 10, Blocked: 11, Unknown: 12, Field: 13, Calc: 14, Busy: 16, Python: 19, Timeout: 20 }, e.Label = { Parse: "#PARSE!", Null: "#NULL!", Div0: "#DIV/0!", Value: "#VALUE!", Ref: "#REF!", Name: "#NAME?", Num: "#NUM!", NA: "#N/A", GettingData: "#GETTING_DATA", Spill: "#SPILL!", Connect: "#CONNECT!", Blocked: "#BLOCKED!", Unknown: "#UNKNOWN!", Field: "#FIELD!", Calc: "#CALC!", Busy: "#BUSY!", Python: "#PYTHON!", Timeout: "#TIMEOUT!" };\n class t extends Error {\n constructor(c, m, fe, B) {\n super(fe, B), this._label = m, this._code = c, this.details = B;\n }\n static {\n this.code = e.Code.Unknown;\n }\n get isFormulaError() {\n return !0;\n }\n getLabel() {\n return this._label;\n }\n getCode() {\n return this._code;\n }\n equals(c) {\n return !!c && (this._code === c._code || this._code === c.code);\n }\n get [Symbol.toStringTag]() {\n return "[FormulaError]";\n }\n toString() {\n return this.message || this._label;\n }\n }\n e.Known = t;\n class r extends t {\n constructor(c, m) {\n super(e.Code.Parse, e.Label.Parse, c, m);\n }\n static {\n this.code = e.Code.Parse;\n }\n getDetails() {\n const c = this.details;\n return { line: c?.line ?? 1, column: c?.column ?? 1, offset: c?.offset ?? 0, length: c?.length ?? 0 };\n }\n }\n e.Parse = r;\n class n extends t {\n constructor(c, m) {\n super(e.Code.Null, e.Label.Null, c, m);\n }\n static {\n this.code = e.Code.Null;\n }\n }\n e.Null = n;\n class o extends t {\n constructor(c, m) {\n super(e.Code.Div0, e.Label.Div0, c, m);\n }\n static {\n this.code = e.Code.Div0;\n }\n }\n e.Div0 = o;\n class i extends t {\n constructor(c, m) {\n super(e.Code.Value, e.Label.Value, c, m);\n }\n static {\n this.code = e.Code.Value;\n }\n }\n e.Value = i;\n class a extends t {\n constructor(c, m) {\n super(e.Code.Ref, e.Label.Ref, c, m);\n }\n static {\n this.code = e.Code.Ref;\n }\n }\n e.Ref = a;\n class l extends t {\n constructor(c, m) {\n super(e.Code.Name, e.Label.Name, c, m);\n }\n static {\n this.code = e.Code.Name;\n }\n }\n e.Name = l;\n class u extends t {\n constructor(c, m) {\n super(e.Code.Num, e.Label.Num, c, m);\n }\n static {\n this.code = e.Code.Num;\n }\n }\n e.Num = u;\n class f extends t {\n constructor(c, m) {\n super(e.Code.NA, e.Label.NA, c, m);\n }\n static {\n this.code = e.Code.NA;\n }\n }\n e.NA = f;\n class h extends t {\n constructor(c, m) {\n super(e.Code.GettingData, e.Label.GettingData, c, m);\n }\n static {\n this.code = e.Code.GettingData;\n }\n }\n e.GettingData = h;\n class g extends t {\n constructor(c, m) {\n super(e.Code.Spill, e.Label.Spill, c, m);\n }\n static {\n this.code = e.Code.Spill;\n }\n }\n e.Spill = g;\n class p extends t {\n constructor(c, m) {\n super(e.Code.Connect, e.Label.Connect, c, m);\n }\n static {\n this.code = e.Code.Connect;\n }\n }\n e.Connect = p;\n class y extends t {\n constructor(c, m) {\n super(e.Code.Blocked, e.Label.Blocked, c, m);\n }\n static {\n this.code = e.Code.Blocked;\n }\n }\n e.Blocked = y;\n class T extends t {\n constructor(c, m) {\n super(e.Code.Unknown, e.Label.Unknown, c, m);\n }\n static {\n this.code = e.Code.Unknown;\n }\n }\n e.Unknown = T;\n class A extends t {\n constructor(c, m) {\n super(e.Code.Field, e.Label.Field, c, m);\n }\n static {\n this.code = e.Code.Field;\n }\n }\n e.Field = A;\n class D extends t {\n constructor(c, m) {\n super(e.Code.Calc, e.Label.Calc, c, m);\n }\n static {\n this.code = e.Code.Calc;\n }\n }\n e.Calc = D;\n class U extends t {\n constructor(c, m) {\n super(e.Code.Busy, e.Label.Busy, c, m);\n }\n static {\n this.code = e.Code.Busy;\n }\n }\n e.Busy = U;\n class I extends t {\n constructor(c, m) {\n super(e.Code.Python, e.Label.Python, c, m);\n }\n static {\n this.code = e.Code.Python;\n }\n }\n e.Python = I;\n class J extends t {\n constructor(c, m) {\n super(e.Code.Timeout, e.Label.Timeout, c, m);\n }\n static {\n this.code = e.Code.Timeout;\n }\n }\n e.Timeout = J;\n})(d || (d = {}));\nconst _ = {};\n_[d.Code.Parse] = d.Parse, _[d.Code.Null] = d.Null, _[d.Code.Div0] = d.Div0, _[d.Code.Value] = d.Value, _[d.Code.Ref] = d.Ref, _[d.Code.Name] = d.Name, _[d.Code.Num] = d.Num, _[d.Code.NA] = d.NA, _[d.Code.GettingData] = d.GettingData, _[d.Code.Spill] = d.Spill, _[d.Code.Connect] = d.Connect, _[d.Code.Blocked] = d.Blocked, _[d.Code.Unknown] = d.Unknown, _[d.Code.Field] = d.Field, _[d.Code.Calc] = d.Calc, _[d.Code.Busy] = d.Busy, _[d.Code.Python] = d.Python, _[d.Code.Timeout] = d.Timeout;\nconst et = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), ke = Object.keys(_);\nfor (let e = 0; e < ke.length; e++) {\n const t = ke[e], r = _[t];\n tt.set(d.Label[t], r), rt.set(d.Code[t], r);\n const n = new r();\n et.set(n.getLabel(), n), Te.set(n.getCode(), n);\n}\nconst Et = Te.get(d.Code.Unknown);\nvar v;\n(v = d || (d = {})).BuiltIn = { Parse: new v.Parse(), Null: new v.Null(), Div0: new v.Div0(), Value: new v.Value(), Ref: new v.Ref(), Name: new v.Name(), Num: new v.Num(), NA: new v.NA(), GettingData: new v.GettingData(), Spill: new v.Spill(), Connect: new v.Connect(), Blocked: new v.Blocked(), Unknown: new v.Unknown(), Field: new v.Field(), Calc: new v.Calc(), Busy: new v.Busy(), Python: new v.Python(), Timeout: new v.Timeout() }, v.getBuiltInByLabel = (e) => et.get(e), v.newTypedError = (e, t, r) => {\n let n;\n return n = typeof e == "string" ? tt.get(e) : rt.get(e), n || (n = v.Unknown), new n(t, r);\n}, v.getBuiltInById = (e) => Te.get(e) || Et;\n/**\n * @license @sheetxl/utils - Utils - Utilities used by most SheetXL components. - v0.3.0\n *\n * (C) 2025-present SheetXL Inc. & Michael T. Ford\n * License: The license can be found at https://www.sheetxl.com/license.\n */\nconst S = { html: "text/html", plain: "text/plain", png: "image/png" }, St = Object.freeze({ left: 0, top: 0 }), xt = Object.freeze({ left: 0, top: 0, bottom: 0, right: 0 }), Ct = Object.freeze({ x: 0, y: 0, width: 0, height: 0 });\nObject.freeze(Object.defineProperty({ __proto__: null, EmptyBounds: Ct, EmptyRect: xt, EmptyTopLeft: St }, Symbol.toStringTag, { value: "Module" }));\nconst j = { Column: "column", Row: "row" }, vt = Object.freeze({ colIndex: 0, rowIndex: 0 }), Tt = Object.freeze({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }), nt = (e, t) => e.colStart === t.colStart ? e.rowStart - t.rowStart : e.colStart - t.colStart, ot = (e, t) => e.rowStart === t.rowStart ? e.colStart - t.colStart : e.rowStart - t.rowStart, _t = (e, t) => e.rowEnd === t.rowEnd ? t.colEnd - e.colEnd : t.rowEnd - e.rowEnd, Ot = (e, t) => e.colEnd === t.colEnd ? t.rowEnd - e.rowEnd : t.colEnd - e.colEnd, Le = (e, t) => e.colIndex === t.colIndex ? e.rowIndex - t.rowIndex : e.colIndex - t.colIndex, Ae = (e, t) => e.rowIndex === t.rowIndex ? e.colIndex - t.colIndex : e.rowIndex - t.rowIndex, it = (e = j.Row, t = !1) => t ? e !== j.Column ? _t : Ot : e !== j.Column ? ot : nt, Me = (e, t) => e === t || !(!e || !t) && e.rowIndex === t.rowIndex && e.colIndex === t.colIndex, Se = (e, t) => e === t || !(!e || !t) && e.rowStart === t.rowStart && e.rowEnd === t.rowEnd && e.colStart === t.colStart && e.colEnd === t.colEnd, xe = (e, t) => !(!e || !t) && !(e.colStart > t.colEnd || t.colStart > e.colEnd) && !(e.rowStart > t.rowEnd || t.rowStart > e.rowEnd), je = (e, t) => {\n if (e === t) return !0;\n if (!e || !t || e.length !== t.length) return !1;\n for (let r = 0; r < e.length; r++) if (!Se(e[r], t[r])) return !1;\n return !0;\n}, he = (e, t, r) => {\n if (!e && !t) return null;\n if (!e) return r ? t : { ...t };\n if (!t) return r ? e : { ...e };\n const n = Math.min(e.colStart, t.colStart), o = Math.min(e.rowStart, t.rowStart), i = Math.max(e.colEnd, t.colEnd), a = Math.max(e.rowEnd, t.rowEnd);\n let l = r;\n return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;\n}, Pe = (e, t) => {\n if (!t || t.length === 0) return e;\n const r = { ...e };\n for (let n = 0; n < t.length; n++) {\n const o = t[n];\n xe(r, o) && (r.rowStart = Math.min(r.rowStart, o.rowStart), r.colStart = Math.min(r.colStart, o.colStart), r.rowEnd = Math.max(r.rowEnd, o.rowEnd), r.colEnd = Math.max(r.colEnd, o.colEnd));\n }\n return r;\n}, It = [null, null], Nt = (e, t, r) => {\n if (e[0].value === e[1].value) return t;\n};\nfunction Fe(e, t = 2, r, n = j.Row, o) {\n let i = [...e];\n if (t <= 0 || e.length <= 1) return i;\n let a = n === j.Column, l = 0, u = !1;\n do {\n const f = i.sort(it(a ? j.Row : j.Column));\n i = [], i.push(f[0]);\n const h = f.length;\n let g = 0, p = f[0], y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n for (let U = 1; U < h; U++) {\n const I = f[U];\n let J = !1;\n if (J = a ? p && T === I.rowStart && D === I.rowEnd && A + 1 === I.colStart : p && y === I.colStart && A === I.colEnd && D + 1 === I.rowStart, J) {\n let E = { colStart: y, rowStart: T, colEnd: a ? I.colEnd : A, rowEnd: a ? D : I.rowEnd };\n if (p.value !== void 0 && (E.value = p.value), r) {\n const c = o ?? [null, null];\n c[0] = p, c[1] = I, E = r(c, E, n);\n }\n if (E) {\n i[g] = E, u = !0, p = E, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n continue;\n }\n }\n i[++g] = I, p = I, y = p.colStart, T = p.rowStart, A = p.colEnd, D = p.rowEnd;\n }\n l++, a = !a, l === 1 && (u = !0);\n } while (l < t && u && i.length > 1);\n return i;\n}\nObject.freeze(Object.defineProperty({ __proto__: null, EmptyCell: vt, EmptyRange: Tt, cellToRange: (e, t) => {\n if (!e) return null;\n let r = t;\n return r || (r = { ...e }, delete r.colIndex, delete r.rowIndex), r.colStart = e.colIndex ?? 0, r.rowStart = e.rowIndex ?? 0, r.colEnd = e.colIndex ?? 0, r.rowEnd = e.rowIndex ?? 0, r;\n}, columnFirstCellComparator: Le, columnFirstRangeComparator: nt, createCellComparator: (e = j.Row, t = !1) => t ? e !== j.Column ? (r, n) => r.rowIndex === n.rowIndex ? n.colIndex - r.colIndex : n.rowIndex - r.rowIndex : (r, n) => r.colIndex === n.colIndex ? n.rowIndex - r.rowIndex : n.colIndex - r.colIndex : e !== j.Column ? Ae : Le, createConflatingRanges: (e, t = !1) => {\n const r = [];\n let n, o, i = Number.MIN_SAFE_INTEGER, a = Number.MIN_SAFE_INTEGER;\n return { append: (l, u, f) => {\n let h = !0;\n const g = f !== void 0;\n if (g) {\n const T = e ? e(o, f, t) : o === f ? f : void 0;\n T === void 0 ? h = !1 : f = T;\n }\n if (h && u === a + 1 && l === i) return t ? n.rowEnd = u : n.colEnd = u, a = u, void (o = f);\n n && r.push(n);\n const p = t ? l : u, y = t ? u : l;\n n = { colStart: p, rowStart: y, colEnd: p, rowEnd: y }, g && (n.value = f), i = l, a = u, o = f;\n }, done: (l) => (n && (r.push(n), n = null), l ? Fe(r, 3, l === !0 ? Nt : l, t ? j.Column : j.Row, It) : r) };\n}, createRangeComparator: it, defaultRange: (e, t, r) => e ? r ? (r.colStart = e.colStart ?? t.colStart, r.rowStart = e.rowStart ?? t.rowStart, r.colEnd = e.colEnd ?? t.colEnd, r.rowEnd = e.rowEnd ?? t.rowEnd, r) : { colStart: e.colStart ?? t.colStart, rowStart: e.rowStart ?? t.rowStart, colEnd: e.colEnd ?? t.colEnd, rowEnd: e.rowEnd ?? t.rowEnd } : t, extendRangeToIntersectingRanges: Pe, extendRangeToUnionRanges: (e, t) => {\n if (!t || t.length === 0) return e;\n let r = e, n = null;\n for (; !Se(r, n); ) n = r, r = Pe(n, t);\n return r;\n}, indexOfCoords: (e, t) => {\n const r = { colStart: e.colIndex, rowStart: e.rowIndex, colEnd: e.colIndex, rowEnd: e.rowIndex };\n for (let n = t.length - 1; n >= 0; n--) if (xe(r, t[n])) return n;\n return -1;\n}, intersectRanges: (e, t, r) => {\n if (!e) return r ? t : { ...t };\n if (!t) return r ? e : { ...e };\n if (!e && !t || e.rowStart > t.rowEnd || e.rowEnd < t.rowStart || e.colStart > t.colEnd || e.colEnd < t.colStart) return null;\n const n = Math.max(e.colStart, t.colStart), o = Math.max(e.rowStart, t.rowStart), i = Math.min(e.colEnd, t.colEnd), a = Math.min(e.rowEnd, t.rowEnd);\n let l = r;\n return l ? (l.colStart = n, l.rowStart = o, l.colEnd = i, l.rowEnd = a) : l = { colStart: n, rowStart: o, colEnd: i, rowEnd: a }, l;\n}, isCellWithinRange: (e, t) => !(!e || !t) && !(e.rowIndex < t.rowStart || e.rowIndex > t.rowEnd) && !(e.colIndex < t.colStart || e.colIndex > t.colEnd), isEqualCells: Me, isEqualRanges: Se, isEqualRangesArrays: je, isEqualSelectionCoords: (e, t) => e === t || !(!e || !t) && e.rangeIndex === t.rangeIndex && !!Me(e.cell, t.cell) && je(e.ranges, t.ranges), isRangeWithinRange: (e, t) => !(e.rowStart < t.rowStart || e.rowEnd > t.rowEnd) && !(e.colStart < t.colStart || e.colEnd > t.colEnd), isRangesIntersect: xe, isSingleCell: (e) => !!e && e.rowEnd === e.rowStart && e.colStart === e.colEnd, isValidRange: (e) => !!e && !(typeof e.colStart != "number" || e.colStart < 0) && !(typeof e.colEnd != "number" || e.colEnd < e.colStart) && !(typeof e.rowStart != "number" || e.rowStart < 0) && !(typeof e.rowEnd != "number" || e.rowEnd < e.rowStart), mergeRangedValues: Fe, rowFirstCellComparator: Ae, rowFirstRangeComparator: ot, sanitizeRange: (e) => e ? { colStart: e.colIndex ?? e.colStart ?? 0, rowStart: e.rowIndex ?? e.rowStart ?? 0, colEnd: e.colIndex ?? e.colEnd ?? 0, rowEnd: e.rowIndex ?? e.rowEnd ?? 0 } : null, translateRange: (e, t = -e.rowStart, r = -e.colStart, n) => n ? (n.colStart = e.colStart + r, n.rowStart = e.rowStart + t, n.colEnd = e.colEnd + r, n.rowEnd = e.rowEnd + t, n) : { colStart: e.colStart + r, rowStart: e.rowStart + t, colEnd: e.colEnd + r, rowEnd: e.rowEnd + t }, unionRanges: he, unionRangesArrays: (e, t, r) => {\n if (!e || e.length === 0) return null;\n if (e.length === 1 && !t) return e[0];\n let n = e[0];\n for (let o = 1; o < e.length; o++) n = he(n, e[o], r);\n return t && (n = he(n, t, r)), n;\n} }, Symbol.toStringTag, { value: "Module" }));\nfunction Rt(e) {\n const t = Object.prototype.toString.call(e);\n return t === "[object RegExp]" || t === "[object Date]" || function(r) {\n return r.$$typeof === kt;\n }(e);\n}\nconst kt = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.element") : 60103;\nfunction Lt(e) {\n return /* @__PURE__ */ function(t) {\n return !!t && typeof t == "object";\n }(e) && !Rt(e);\n}\nfunction ne(e, t) {\n return t.clone !== !1 && t.isMergeableObject(e) ? Y((r = e, Array.isArray(r) ? [] : {}), e, t) : e;\n var r;\n}\nfunction At(e, t, r) {\n return e.concat(t).map(function(n) {\n return ne(n, r);\n });\n}\nfunction De(e) {\n return Object.keys(e).concat(function(t) {\n return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(r) {\n return Object.propertyIsEnumerable.call(t, r);\n }) : [];\n }(e));\n}\nfunction Ue(e, t) {\n try {\n return t in e;\n } catch {\n return !1;\n }\n}\nfunction Mt(e, t, r) {\n const n = {};\n return r.isMergeableObject(e) && De(e).forEach(function(o) {\n n[o] = ne(e[o], r);\n }), De(t).forEach(function(o) {\n (function(i, a) {\n return Ue(i, a) && !(Object.hasOwnProperty.call(i, a) && Object.propertyIsEnumerable.call(i, a));\n })(e, o) || (Ue(e, o) && r.isMergeableObject(t[o]) ? n[o] = function(i, a) {\n if (!a.customMerge) return Y;\n const l = a.customMerge(i);\n return typeof l == "function" ? l : Y;\n }(o, r)(e[o], t[o], r) : n[o] = ne(t[o], r));\n }), n;\n}\nfunction Y(e, t, r) {\n (r = r || {}).arrayMerge = r.arrayMerge || At, r.isMergeableObject = r.isMergeableObject || Lt, r.cloneUnlessOtherwiseSpecified = ne;\n const n = Array.isArray(t);\n return n === Array.isArray(e) ? n ? r.arrayMerge(e, t, r) : Mt(e, t, r) : ne(t, r);\n}\nY.all = function(e, t) {\n if (!Array.isArray(e)) throw new Error("first argument should be an array");\n return e.reduce(function(r, n) {\n return Y(r, n, t);\n }, {});\n};\nconst jt = Object.freeze([]), Pt = Object.freeze({}), Be = (e) => e, de = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {\n let t = 16 * Math.random() | 0;\n return (e === "x" ? t : 3 & t | 8).toString(16);\n}), Ft = (e) => 1 * e, at = (e, t) => e === t || !(!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length) && e.every((r, n) => r === t[n]), re = (e) => typeof e == "object" && !Array.isArray(e) && e !== null, lt = (e) => typeof e != "object" || Array.isArray(e) || e === null ? e : (Object.keys(e).forEach(function(t) {\n e[t] && typeof e[t] == "object" ? lt(e[t]) : e[t] !== null && e[t] !== void 0 || delete e[t], typeof e[t] == "object" && Object.keys(e[t]).length === 0 && delete e[t];\n}), Object.keys(e).length === 0 ? null : e), Dt = (e, t) => !(e !== t && !at(e, t)) || !!e.isEqual?.(t), st = (e, t, r = Dt) => {\n if (e == null || e === t) return null;\n if (!e || typeof e != "object" || Array.isArray(e) || e.isImmutable?.()) return r(e, t) ? null : e;\n const n = Object.keys(e);\n if (n.length === 0) return null;\n let o = !1;\n for (let i = 0; i < n.length; i++) {\n const a = n[i];\n st(e[a], t?.[a], r) === null && (o = !0, delete e[a]);\n }\n return o && Object.keys(e).length === 0 ? null : void 0;\n}, $e = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now(), ze = (e) => e == null, Ke = (e, t) => !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top), Ve = !(typeof window > "u" || !window.document || !window.document.createElement), k = { Windows: "windows", MacOS: "macos", IOS: "ios", Linux: "linux", Android: "android", Safari: "safari", Firefox: "firefox", Node: "node", Unknown: "unknown" }, oe = () => {\n if (ct()) return k.Node;\n const e = globalThis.navigator !== void 0 && globalThis.navigator.userAgent ? globalThis.navigator.userAgent.toLowerCase() : "";\n return e ? /(win32|win64|windows|wince)/i.test(e) ? k.Windows : /(macintosh|macintel|macppc|mac68k|macos)/i.test(e) ? k.MacOS : /(iphone|ipad|ipod)/i.test(e) ? k.IOS : /android/.test(e) ? k.Android : /linux/.test(e) ? k.Linux : /^((?!chrome|android|).)*safari/i.test(e) ? k.Safari : /^((?!chrome|android|Seamonkey).)*firefox/i.test(e) ? k.Firefox : k.Unknown : k.Unknown;\n};\nfunction ct() {\n return typeof process < "u" && process.release?.name === "node" || (typeof process < "u" && process.browser, !1);\n}\nconst qe = (e, t = !1) => (document.hasFocus() || t) && (e === document.activeElement || e?.contains(document.activeElement)), Ut = Object.freeze(Object.defineProperty({ __proto__: null, EmptyArray: jt, EmptyObject: Pt, OSType: k, arrayMove: function(e, t, r) {\n const n = e.slice();\n return n.splice(r < 0 ? n.length + r : r, 0, n.splice(t, 1)[0]), n;\n}, asNumber: (e) => {\n const t = Ft(e);\n return Number.isFinite(t) ? t : 0;\n}, camelToPrettyCase: (e) => e.length === 1 ? e.toUpperCase() : e.replace(/([A-Z])/g, " $1").replace(/^./, function(t) {\n return t.toUpperCase();\n}).trim(), canUseDOM: Ve, cancelTimeout: (e) => {\n cancelAnimationFrame(e.id);\n}, castToString: (e) => e == null || e === void 0 ? "" : typeof e != "string" ? "" + e : e, cloneObject: (e) => ze(e) ? e : JSON.parse(JSON.stringify(e)), consoleWithNoSource: (...e) => new Promise((t) => {\n setTimeout(() => {\n Function("console.log.apply(console, arguments)").apply(null, e), t();\n });\n}), debounce: function(e, t = 300, r = !1) {\n let n, o, i, a, l = 0;\n function u() {\n let h = Date.now() - l;\n h < t && h >= 0 ? n = setTimeout(u, t - h) : (n = null, r || (a = e.apply(i, o), i = o = null));\n }\n t == null && (t = 100);\n const f = function() {\n i = globalThis, o = arguments, l = Date.now();\n var h = r && !n;\n return n || (n = setTimeout(u, t)), h && (a = e.apply(i, o), i = o = null), a;\n };\n return f.clear = function() {\n n && (clearTimeout(n), n = null);\n }, f.flush = function() {\n n && (a = e.apply(i, o), i = o = null, clearTimeout(n), n = null);\n }, f;\n}, deepEqual: function e(t, r) {\n if (t === r) return !0;\n if (t && r && typeof t == "object" && typeof r == "object") {\n if (t.constructor !== r.constructor) return !1;\n let n, o, i;\n if (Array.isArray(t)) {\n if (n = t.length, n != r.length) return !1;\n for (o = n; o-- !== 0; ) if (!e(t[o], r[o])) return !1;\n return !0;\n }\n if (t instanceof Map && r instanceof Map) {\n if (t.size !== r.size) return !1;\n for (o of t.entries()) if (!r.has(o[0])) return !1;\n for (o of t.entries()) if (!e(o[1], r.get(o[0]))) return !1;\n return !0;\n }\n if (t instanceof Set && r instanceof Set) {\n if (t.size !== r.size) return !1;\n for (o of t.entries()) if (!r.has(o[0])) return !1;\n return !0;\n }\n if (ArrayBuffer.isView(t) && ArrayBuffer.isView(r)) {\n if (n = t.length, n != r.length) return !1;\n for (o = n; o-- !== 0; ) if (t[o] !== r[o]) return !1;\n return !0;\n }\n if (t.constructor === RegExp) return t.source === r.source && t.flags === r.flags;\n if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === r.valueOf();\n if (t.toString !== Object.prototype.toString) return t.toString() === r.toString();\n if (i = Object.keys(t), n = i.length, n !== Object.keys(r).length) return !1;\n for (o = n; o-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(r, i[o])) return !1;\n for (o = n; o-- !== 0; ) {\n let a = i[o];\n if ((a !== "_owner" || !t.$$typeof) && !e(t[a], r[a])) return !1;\n }\n return !0;\n }\n return t != t && r != r;\n}, deepFreeze: function e(t) {\n return Object.freeze(t), Object.keys(t).forEach((r) => {\n typeof t[r] != "object" || t[r] === null || Object.isFrozen(t[r]) || e(t[r]);\n }), t;\n}, deepMerge: Y, diffValues: (e, t) => {\n const r = {}, n = Object.keys(t), o = n.length;\n for (let i = 0; i < o; i++) {\n const a = n[i];\n e[a] !== t[a] && (e[a] === void 0 ? r[a] = t[a] : r[a] = e[a]);\n }\n return Object.keys(r).length === 0 ? null : r;\n}, findEqualOrGreater: function(e, t, r = Be) {\n let n = 0, o = e.length - 1;\n for (; n <= o; ) {\n let i = Math.floor((n + o) / 2), a = r(e[i]);\n if (a === t) return i;\n a < t ? n = i + 1 : o = i - 1;\n }\n return n;\n}, findEqualOrLesser: function(e, t, r = Be) {\n let n = e.length - 1, o = 0;\n for (; n >= o; ) {\n let i = Math.floor((n + o) / 2), a = r(e[i]);\n if (a === t) return i;\n a > t ? n = i - 1 : o = i + 1;\n }\n return n;\n}, findNextStep: (e, t = !0, r = 15, n = 10, o = 400) => {\n const i = Math.max(e - n, 0) + (t ? 1 : -1);\n return Math.min(o, Math[t ? "ceil" : "floor"](i / r) * r + n);\n}, getBuildEnv: () => "browser2-build", getDPI: () => {\n let e = 1;\n return typeof window == "object" && (e = window.devicePixelRatio || 1), e;\n}, getFromPath: (e, t) => {\n const r = t.split(".");\n let n = e;\n for (let o = 0; o < r.length; o++) {\n const i = r[o];\n if (!n) return null;\n let a = n[i];\n if (typeof a == "function" && (a = a.bind(n)()), !a || !re(a)) return a;\n n = a;\n }\n return n ?? null;\n}, getOS: oe, hasFocus: qe, isDefined: (e) => e != null, isEmpty: (e) => e == null || e === "", isEqualArrays: at, isEqualBounds: (e, t) => e === t || !(e && !t || t && !e) && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height, isEqualObjectKeys: (e, t) => {\n if (e === t) return !0;\n if (e && !t || t && !e) return !1;\n const r = Object.keys(e);\n if (r.length !== Object.keys(t).length) return !1;\n for (let n = 0; n < r.length; n++) if (e[r[n]] !== t[r[n]]) return !1;\n return !0;\n}, isNode: ct, isNullOrUndefined: ze, isNumeric: (e) => {\n const t = 1 * e;\n return Number.isFinite(t) && typeof t == "number";\n}, isObject: re, isPromiseLike: (e) => !!e && typeof e.then == "function", isRectInsideRect: (e, t) => e.top >= t.top && e.bottom <= t.bottom && e.left >= t.left && e.right <= t.right, isRectIntersect: Ke, mergeContentful: (...e) => {\n const t = e.length;\n if (t > 0 && e[t - 1] !== void 0 && !re(e[t - 1])) return e[t - 1];\n let r = e[0] || {};\n for (let n = 1; n < t; n++) r = Y(r, e[n] || {}, { arrayMerge: (o, i) => [...i] });\n return r;\n}, nextTick: (e) => {\n typeof window < "u" && typeof window.requestAnimationFrame == "function" ? window.requestAnimationFrame(() => {\n e();\n }) : (typeof setImmediate == "function" ? setImmediate : setTimeout)(() => {\n e();\n });\n}, openFileDialog: (e = "*.*") => new Promise((t, r) => {\n if (!Ve) return void r("Unable to open dialog with no dom.");\n const n = document.createElement("input");\n n.type = "file", n.accept = e;\n let o = null, i = !1;\n globalThis.addEventListener?.("focus", () => {\n setTimeout(() => {\n o || i || (i = !0, t(null));\n }, 1e3);\n }, { once: !0, passive: !0 }), n.onchange = () => {\n if (o = n.files[0], o) {\n if (i) return void console.warn("File open detected after faux cancel.", o);\n t(o);\n }\n }, n.autofocus = !0, n.click();\n}), rafThrottle: (e) => {\n let t, r = !1, n = function() {\n r = !1, e(t);\n };\n return function(o) {\n t = o, t && t.persist && t.persist(), r || (r = !0, requestAnimationFrame(n));\n };\n}, removeEmptyProperties: lt, removeEqualValues: st, removeListenerAll: (e) => {\n if (!e) return [];\n for (let t = 0; t < e.length; t++) e[t] && e[t]();\n return [];\n}, requestTimeout: (e, t) => {\n const r = $e(), n = { id: requestAnimationFrame(function o() {\n $e() - r >= t ? e.call(null) : n.id = requestAnimationFrame(o);\n }) };\n return n;\n}, roundAccurately: (e, t = 0) => {\n if (e == null || !isFinite(e)) return null;\n const r = 10 ** t;\n return Number(Math.round(e * r) / r);\n}, setToPath: (e, t, r) => {\n const n = t.split(".");\n let o = e;\n if (!o) throw new Error("Can not set path to a null path.");\n for (let i = 0; o && i < n.length - 1; i++) {\n const a = n[i];\n let l = o[a];\n if (l == null && (l = {}, o[a] = l), !re(l)) throw new Error("Can not set path to a non object path.");\n o = l;\n }\n if (typeof r != "number" && typeof r != "boolean" && typeof r != "string" && !re(r)) throw new Error(`Can not set path to ${r} that is not a a supported primitive.`);\n return o[n[n.length - 1]] = r, e;\n}, splitNumber: (e) => {\n let t = Math.abs(e);\n if (isNaN(t) || !isFinite(e)) return null;\n let r = 0 | t, n = t - r, o = 0, i = 0, a = 1;\n if (n > 5e-8) for (; i < 8 && Math.abs(o / a - n) > 5e-8; ) i++, a *= 10, o = Math.round(n * a);\n return { ip: Math.trunc(e), fp: o, ipLength: Math.ceil(Math.log10(r + 1)), fpLength: i };\n}, subtractRect: (e, t, r = !1) => {\n if (!t) return [e];\n if (!Ke(e, t)) return [];\n const n = [];\n let o = e;\n const i = () => {\n t.top > o.top && t.top < o.bottom && (n.push({ ...o, bottom: t.top }), o = { ...o, top: t.top });\n }, a = () => {\n t.bottom > o.top && t.bottom < o.bottom && (n.push({ ...o, top: t.bottom }), o = { ...o, bottom: t.bottom });\n }, l = () => {\n t.right > o.left && t.right < o.right && (n.push({ ...o, left: t.right }), o = { ...o, right: t.right });\n }, u = () => {\n t.left > o.left && t.left < o.right && (n.push({ ...o, right: t.left }), o = { ...o, left: t.left });\n };\n return r ? (u(), l(), i(), a()) : (i(), a(), l(), u()), n;\n}, textToKey: (e) => e.replace(/[^a-zA-Z0-9]/g, "").toLowerCase(), throttle: function(e, t) {\n let r = null;\n return (...n) => {\n const o = Date.now();\n (!r || o - r >= t) && (r = o, e(...n));\n };\n}, toSafeJSON: function e(t) {\n if (t === null || typeof t != "object") return t;\n if (typeof t.toJSON == "function") return t.toJSON();\n if (Array.isArray(t)) return t.map((n) => e(n));\n if (typeof t.toString == "function" && t.toString !== Object.prototype.toString) return t.toString();\n const r = {};\n for (const n in t) t.hasOwnProperty(n) && (r[n] = e(t[n]));\n return r;\n}, transpose: (e) => {\n if (!e) return e;\n const t = e.length, r = e[0].length, n = [];\n for (let o = 0; o < r; o++) n[o] = Array(t);\n for (let o = 0; o < t; o++) for (let i = 0; i < r; i++) n[i][o] = e[o][i];\n return n;\n}, uuidV4: de, validEnumValue: (e, t) => {\n if (!Object.values(e).includes(t)) throw new Error(`Invalid type: ${t ?? "null"}. Must be one of: ${Object.values(t).join(", ")}.`);\n}, whenFocus: async (e, t = !1) => new Promise((r) => {\n qe(e, t) ? r(!0) : e.addEventListener("focusin", () => {\n r(!0);\n }, { once: !0 }), e.focus();\n}) }, Symbol.toStringTag, { value: "Module" }));\nObject.freeze(Object.defineProperty({ __proto__: null, MESSAGE_ERROR_INVALID_ARG: (e) => `Invalid argument: \'${e}\'.` }, Symbol.toStringTag, { value: "Module" }));\nconst ut = (e) => {\n const t = new Uint8Array(e), r = t.byteLength;\n let n = "";\n for (let o = 0; o < r; o++) n += String.fromCharCode(t[o]);\n if (typeof window < "u" && typeof globalThis.btoa == "function") return globalThis.btoa(n);\n if (typeof Buffer < "u") return Buffer.from(n, "binary").toString("base64");\n throw new Error("Unsupported environment");\n}, Ce = (e) => new Promise((t, r) => {\n if (e) if (typeof FileReader < "u") {\n const n = new FileReader();\n n.onload = () => {\n t(n.result);\n }, n.onerror = () => {\n r(n.error);\n }, n.readAsText(e);\n } else if (typeof Buffer < "u") {\n const n = (o) => Buffer.from(o).toString("utf-8");\n e.arrayBuffer().then((o) => {\n t(n(o));\n }).catch((o) => {\n r(o);\n });\n } else r(new Error("Unsupported environment"));\n else t("");\n});\nObject.freeze(Object.defineProperty({ __proto__: null, DEFAULT_MIME_TYPE: "*/*", arrayBufferToBase64: ut, base64ToArrayBuffer: (e) => {\n const t = typeof window < "u" && typeof globalThis.atob == "function" ? globalThis.atob(e) : Buffer.from(e, "base64").toString("binary"), r = t.length, n = new Uint8Array(r);\n for (let o = 0; o < r; o++) n[o] = t.charCodeAt(o);\n return n.buffer;\n}, blobToString: Ce }, Symbol.toStringTag, { value: "Module" }));\nconst dt = "data:image/png;base64,", ft = "Unable to resolve image.", Ge = (e) => new Promise(async (t, r) => {\n let n = null;\n try {\n n = new Image(), n.src = e, n.addEventListener("load", function() {\n t({ width: n.naturalWidth, height: n.naturalHeight });\n }, { once: !0 }), n.addEventListener("error", function() {\n URL.revokeObjectURL(e), r("Invalid Image");\n }, { once: !0 }), await n.decode("sync");\n } catch {\n n?.src && URL.revokeObjectURL(n.src);\n }\n n || r(ft);\n}), we = "image/svg+xml";\nObject.freeze(Object.defineProperty({ __proto__: null, DATA_URL_PNG_PREFIX: dt, getImageDataUrl: (e, t = 1) => new Promise(async (r, n) => {\n let o = null;\n try {\n o = new Image(), o.src = e, o.addEventListener("load", function() {\n try {\n const i = document.createElement("canvas");\n i.width = o.naturalWidth, i.height = o.naturalHeight, i.getContext("2d").drawImage(o, 0, 0);\n const a = i.toDataURL("image/png", t);\n r({ elemImg: o, dataUrl: a });\n } catch (i) {\n URL.revokeObjectURL(e), n(i);\n }\n }, { once: !0 }), o.addEventListener("error", function() {\n URL.revokeObjectURL(e), n("Invalid Image");\n }, { once: !0 }), await o.decode("sync");\n } catch {\n o?.src && URL.revokeObjectURL(o.src);\n }\n o || n(ft);\n}), loadImageDetails: async (e, t = null) => {\n let r = null;\n const n = async () => {\n try {\n const i = t ?? "image/*", a = URL.createObjectURL(new Blob([e], { type: i })), l = await Ge(a);\n r = { mimeType: i, naturalDimensions: l, asUrl: a };\n } catch {\n }\n }, o = async () => {\n try {\n const i = new TextDecoder().decode(e), a = URL.createObjectURL(new Blob([i], { type: we })), l = await Ge(a);\n r = { mimeType: t ?? we, naturalDimensions: l, asUrl: a, asSVGText: i };\n } catch {\n }\n };\n if (t === we ? await o() : t.startsWith("image/") ? await n() : (await n(), r || await o()), !r) throw new Error("Failed to load image");\n return r;\n} }, Symbol.toStringTag, { value: "Module" }));\nvar We, Ye;\n(Ye = We || (We = {})).resolveTypedUpdates = (e, t, r, n) => {\n if (e === null) return e;\n if (e === void 0) return n;\n let o = e;\n if (t?.shorthand) {\n const u = t?.shorthand(e, r);\n u !== void 0 && (o = u);\n }\n if (o !== null && t?.getSubType) {\n const u = t.getSubType(o);\n u && (t = u);\n }\n const i = t?.properties, a = t?.arrayType ?? !1;\n let l = o;\n if (t && t.merge && l && n) l = t.merge(l, n, r);\n else if (!a && i) {\n const u = Object.keys({ ...o, ...n });\n l = null;\n for (let f = 0; f < u.length; f++) {\n const h = u[f];\n let g, p = o[h];\n if (p !== void 0) {\n const y = i[h];\n g = y ? (0, Ye.resolveTypedUpdates)(p, y, r, n?.[h]) : p;\n } else g = n?.[h];\n g != null && (l = l ?? {}, l[h] = g);\n }\n }\n return l;\n};\nconst Je = `The Safari browser does not support advanced copy and paste.\nCopy and paste will be limited to within the browser tab.\n\nPlease use Chrome or Edge if external copy and paste is required.`, ye = `You do not have permissions to access the clipboard.\nAll copy and paste operations will be limited to the browser tab.`, pt = { Safari: `The Safari browser does not support advanced copy and paste.\nCopy and paste will be limited to within the browser tab.\n\nPlease use Chrome or Edge if external copy and paste is required.`, Perms: ye, PermsWrite: oe() === k.Safari ? Je : ye, PermsRead: oe() === k.Safari ? Je : ye }, ge = async () => new Promise((e) => {\n document.hasFocus() ? e() : globalThis.addEventListener?.("focus", () => {\n e();\n }, { once: !0 }), document.activeElement.focus?.();\n}), be = async (e, t, r) => {\n if (oe() === k.Safari) return await r(new Error(pt.Safari));\n try {\n const n = async (a) => {\n try {\n return await a();\n } catch (l) {\n if (l.message?.includes("Document is not focused")) return !1;\n throw l;\n }\n }, o = await globalThis?.navigator?.permissions?.query({ name: e, allowWithoutGesture: !0, allowWithoutSanitization: !0 });\n let i = !1;\n if (o.state === "prompt" && (i = await n(t)), i || o.state !== "granted" || (i = await t()), !i) return await r(new Error(o.state));\n } catch (n) {\n return n.message === "No valid data on clipboard" || n.name === "DataError" ? void 0 : await r(n);\n }\n}, mt = async (e) => {\n try {\n return await e.read({ unsanitized: [S.html] });\n } catch {\n }\n return await e.read();\n}, Bt = async (e, t) => {\n if (!e) return null;\n const r = await mt(e);\n let n = !1;\n for (let o = 0; !n && r && o < r.length; o++) if (n = r[o].types.includes(t), n)\n return await r[o].getType(t);\n return n ? void 0 : null;\n};\nif (!globalThis.ClipboardItem) {\n const e = (r, n) => new Blob([n], { type: r });\n class t {\n constructor(n, o) {\n this._items = {}, this._types = Object.keys(n);\n const i = {}, a = Object.keys(n);\n for (let l = 0; l < a.length; l++) {\n const u = a[l];\n let f = n[u];\n i[u] = typeof f == "string" ? e(u, f) : f;\n }\n this._items = i, this._presentationStyle = o?.presentationStyle ?? "unspecified";\n }\n get types() {\n return this._types;\n }\n getType(n) {\n return Promise.resolve(this._items[n]);\n }\n supports(n) {\n return !0;\n }\n }\n globalThis.ClipboardItem = t;\n}\nconst ve = async (e, t = S.html) => new Promise(async (r, n) => {\n try {\n const o = await Bt(e, t);\n if (o) {\n const i = new FileReader();\n i.onload = () => {\n r(i.result);\n }, i.onerror = () => {\n r("");\n }, i.readAsText(o);\n } else r("");\n } catch (o) {\n n(o);\n }\n}), He = async (e, t = S.html) => {\n const r = await ve(e, t);\n if (!r) return null;\n let n = null;\n try {\n n = new DOMParser().parseFromString(r, S.html);\n } catch {\n console.warn("Can\'t parse html from clipboard.");\n }\n return n;\n}, $t = async (e) => {\n e && await e.writeText("");\n}, ie = "clipboard-uuid", Q = "web text/uuid", Xe = (e) => `<div style="display:none" ${ie}="${e}"/>`, zt = (e, t) => {\n let r = null;\n try {\n const n = new DOMParser().parseFromString(t, S.html);\n n.body.firstElementChild.setAttribute(ie, e), r = n.getElementsByTagName("body")[0].innerHTML;\n } catch (n) {\n console.warn("Can\'t embed uuid.", n);\n }\n return r;\n}, Ze = (e, t) => {\n if (!t || !e) return !1;\n try {\n const r = t.querySelectorAll(`[${ie}="${e}"]`);\n if (r && r.length === 1) return !0;\n if (t.querySelector("parsererror")) throw new Error("We are unable to parse node");\n return !1;\n } catch {\n return !1;\n }\n};\nclass Qe {\n constructor(t) {\n if (t?.nativeClipboard === void 0 || t?.nativeClipboard === !0) try {\n this._nativeClipboard = globalThis?.navigator.clipboard;\n } catch {\n t?.nativeClipboard === !0 && console.warn("NativeClipboard option set to true but no native clipboard available.");\n }\n else this._nativeClipboard = t?.nativeClipboard === !1 ? null : t?.nativeClipboard;\n this._disableCheckOnFocus = t?.disableCheckOnFocus ?? !1, this._init();\n }\n async _checkForChanges() {\n this._nativeClipboard && this._state && !this._disableCheckOnFocus && await be("clipboard-read", async () => {\n await ge();\n const t = await ve(this._nativeClipboard, Q);\n if (!this._state || t && t === this._state.uuid) return !0;\n const r = await He(this._nativeClipboard, S.html);\n return !this._state || (Ze(this._state.uuid, r) || this.clear(), !0);\n }, async (t) => {\n t?.message === "denied" || t.message?.includes("Document is not focused") || oe() === k.Safari || console.warn("Unable to detect clipboard changes: ", t);\n });\n }\n _init() {\n const t = this;\n this._listeners = /* @__PURE__ */ new Map(), this._listenersCapture = /* @__PURE__ */ new Map(), this._state = null, this._nativeClipboard && (this._onFocus = () => {\n t._checkForChanges();\n }, this._onBlur = () => {\n globalThis.addEventListener?.("focus", t._onFocus, { once: !0 });\n }, globalThis.addEventListener?.("blur", this._onBlur), this._nativeClipboard.addEventListener("clipboardchange", (r) => {\n t._checkForChanges();\n }));\n }\n async read() {\n if (!this._nativeClipboard) return this._state?.items ?? null;\n const t = this;\n return await be("clipboard-read", async () => {\n if (await ge(), this._state?.uuid) {\n const r = await ve(this._nativeClipboard, Q);\n if (r && r === t._state.uuid) return !0;\n const n = await He(this._nativeClipboard, S.html);\n if (Ze(t._state?.uuid, n)) return !0;\n }\n return t._state = { items: await mt(this._nativeClipboard), uuid: null, ref: null }, this.dispatchEvent(new Event("clipboardread")), !0;\n }, async (r) => {\n this.dispatchEvent(new Event("clipboarderrorread"));\n }), this._state?.items ?? [];\n }\n async write(t) {\n return this._write({ uuid: de(), items: t, ref: null });\n }\n async _write(t) {\n if (!this._nativeClipboard) return this._state = t, this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")), null;\n const r = this, n = [], o = t.uuid;\n let i = t.items ?? [];\n const a = () => {\n r._state = { uuid: o, ref: t.ref, items: n }, r.dispatchEvent(new Event("clipboardwrite")), r.dispatchEvent(new Event("clipboardchange"));\n };\n await be("clipboard-write", async () => {\n await ge(), o && i.length === 0 && (i.push(new ClipboardItem({ [Q]: new Blob([o], { type: Q }) })), i.push(new ClipboardItem({ [S.html]: new Blob([Xe(o)], { type: S.html }) })));\n for (let l = 0; l < Math.min(1, i.length); l++) {\n const u = i[l];\n let f = u.types.indexOf(S.html), h = null;\n if (f !== -1) {\n const y = await u.getType(S.html);\n h = await Ce(y), h && (h = zt(o, h));\n }\n if (!h && u.types.includes(S.plain)) {\n const y = await u.getType(S.plain);\n if (y) {\n let T = null;\n typeof y == "string" ? (console.warn("text as string", y), T = y) : T = await Ce(y), T && (h = `<div ${ie}="${o}">${T}</div>`);\n }\n }\n if (!h && u.types.includes(S.png)) {\n const y = await u.getType(S.png), T = ut(await y.arrayBuffer());\n h = `<div ${ie}="${o}"><img src="${dt + T}"/></div>`;\n }\n !h && o && (h = Xe(o));\n const g = new Blob([h ?? ""], { type: S.html }), p = {};\n for (let y = 0; y < u.types.length; y++) {\n const T = u.types[y];\n p[T] = y === f ? g : u.getType(T);\n }\n h && f === -1 && (p[S.html] = g), o && (p[Q] = new Blob([o], { type: Q })), n.push(new ClipboardItem(p));\n }\n try {\n n && n.length !== 0 ? await this._nativeClipboard.write(n) : await $t(this._nativeClipboard);\n } catch (l) {\n l.message?.includes("Document is not focused") || console.warn("Unable to write to native clipboard: ", l);\n }\n return a(), !0;\n }, async (l) => {\n this.dispatchEvent(new Event("clipboarderrorwrite")), a();\n });\n }\n async writeReference(t) {\n if (!t) return void this.clear();\n let r = null;\n const n = {};\n try {\n const i = await t.toText?.() ?? null;\n i && (n[S.plain] = new Blob([i ?? ""], { type: S.plain }));\n } catch (i) {\n r = i;\n }\n try {\n const i = await t.toHtml?.() ?? null;\n i && (n[S.html] = new Blob([i], { type: S.html }));\n } catch (i) {\n r = i, console.warn("export to html", i);\n }\n try {\n const i = await t.toImage?.() ?? null;\n i && (n[S.png] = i);\n } catch (i) {\n r = i, console.warn("export to png", i);\n }\n const o = this._write({ uuid: de(), ref: t, items: Object.keys(n).length > 0 ? [new ClipboardItem(n)] : null });\n if (r) throw r;\n return o;\n }\n clear(t = !1) {\n this._state && (this._state = null, t && this._write({ uuid: null, ref: null, items: null }), this.dispatchEvent(new Event("clipboardwrite")), this.dispatchEvent(new Event("clipboardchange")));\n }\n async readReference() {\n return await this.read(), this._state?.ref ?? null;\n }\n readText() {\n return new Promise(async (t, r) => {\n const n = await this.read();\n let o = null;\n for (let a = 0; !o && n && a < n.length; a++) n[a].types.includes(S.plain) && (o = await n[a].getType(S.plain));\n if (!o) return void t("");\n const i = new FileReader();\n i.onload = () => {\n t(i.result);\n }, i.readAsText(o), i.onerror = (a) => {\n r(a);\n };\n });\n }\n async writeText(t) {\n const r = [new ClipboardItem({ [S.plain]: new Blob([t], { type: S.plain }) })];\n return this._write({ uuid: de(), items: r, ref: null });\n }\n addEventListener(t, r, n = {}) {\n const o = n?.capture ? this._listenersCapture : this._listeners;\n let i = o.get(t);\n i || (i = /* @__PURE__ */ new Map(), o.set(t, i)), i.set(r, typeof n == "boolean" ? {} : n);\n }\n dispatchEvent(t) {\n if (!t) return;\n const r = (n) => {\n const o = n.get(t.type);\n o && o.forEach((i, a) => {\n try {\n typeof a == "function" ? a(t) : a.handleEvent && a.handleEvent(t), i.once && o.delete(a);\n } catch (l) {\n console.warn(l);\n }\n });\n };\n return r(this._listenersCapture), r(this._listeners), !0;\n }\n removeEventListener(t, r, n) {\n const o = n?.capture ? this._listenersCapture : this._listeners, i = o.get(t);\n i && (i.delete(r), i.size === 0 && o.delete(t));\n }\n close() {\n globalThis.removeEventListener?.("focus", this._onFocus), globalThis.removeEventListener?.("blur", this._onBlur);\n }\n}\nvar Ee;\n(Ee = Qe || (Qe = {})).ErrorMessages = pt, Ee.Global = new Ee();\nconst Kt = "__SHEETXL";\nlet ee = null, le = null;\nasync function Vt() {\n if (ee)\n return ee;\n if (le) {\n if (await le, !ee)\n throw new Error("ESBuild initialization promise resolved, but instance is not available.");\n return ee;\n }\n let e, t;\n le = new Promise((r, n) => {\n e = r, t = n;\n });\n try {\n const { initialize: r } = await Promise.resolve().then(function() {\n return rr;\n });\n return ee = await r(), e(), ee;\n } catch (r) {\n throw console.error("Failed to import or initialize esbuild:", r), le = null, t(r), r;\n }\n}\nconst qt = {\n // ESBuild.TsconfigRaw =\n compilerOptions: {\n target: "esnext"\n }\n};\nasync function Gt(e, t, r = "/script.js", n = Kt) {\n try {\n const o = await Vt(), i = "@sheetxl/primitives", a = `\n export const FormulaContext = globalThis.${n}?.FormulaContext;\n export const ScalarType = globalThis.${n}?.ScalarType;\n export const Observable = globalThis.${n}?.Observable;\n export const IRange = globalThis.${n}?.IRange;\n export const FormulaError = globalThis.${n}?.FormulaError;\n // Add more exports as needed\n `, l = {\n // ESBuild.Plugin = {\n name: "sheetxl-esbuild-in-memory",\n setup(f) {\n const h = "sheetxl-" + (/* @__PURE__ */ new Date()).getTime();\n f.onResolve({ filter: new RegExp(`^(${r.replace("/", "\\\\/")}|${i})$`) }, (g) => ({\n path: g.path,\n namespace: h\n })), f.onResolve({ filter: /.*/ }, (g) => {\n if (g.namespace !== h)\n return console.warn(`esbuild: Treating import "${g.path}" as external.`), { path: g.path, external: !0 };\n }), f.onLoad({ filter: /.*/, namespace: h }, (g) => {\n let p;\n if (g.path === r)\n p = t;\n else if (g.path === i)\n p = a;\n else\n return {\n errors: [{ text: `Cannot load unknown path in ${h}: ${g.path}` }]\n };\n return {\n contents: p,\n loader: "ts"\n // leave this as \'ts\' so esbuild generates proper sourcemaps\n };\n });\n }\n }, u = await o.build({\n entryPoints: [r],\n // Use the virtual entry point\n bundle: !0,\n // IMPORTANT: Enable bundling\n write: !1,\n // IMPORTANT: Return result in memory\n format: "esm",\n // Output format\n plugins: [l],\n // TODO - later change to external and prepend when executing from ui\n sourcemap: "inline",\n // Generate separate source map string\n tsconfigRaw: qt,\n // Pass the mapped options\n minify: !0,\n // sourcemap: \'external\', // Generate separate source map string\n // Or use \'inline\' if you prefer data URLs embedded in the code\n // To suppress warnings about dynamic import() if esbuild complains:\n // supported: { \'dynamic-import\': true },\n platform: "neutral"\n // not really needed\n });\n if (u.outputFiles && u.outputFiles.length > 0)\n return u.outputFiles[0].text;\n throw u.errors && u.errors.length > 0 ? new Error(`esbuild bundling failed: ${u.errors.map((f) => f.text).join(`\n`)}`) : new Error("esbuild did not produce an output file.");\n } catch (o) {\n throw console.error("esbuild bundling process failed:", o), o;\n }\n}\nconst Wt = `\n/**\n * Represents the completion of an asynchronous operation\n */\ninterface Promise<T> {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise<T>;\n}\n`, Yt = `\n interface FirstTest {\n isTrue?: boolean;\n }\n`, Jt = async () => Yt, ht = /* @__PURE__ */ new Map([\n ["IReferenceRange", "r"],\n ["IRange", "l"]\n]), wt = /* @__PURE__ */ new Map([\n ["IWorkbook", "workbook"],\n ["ISheet", "sheet"],\n ["ICellRanges", "ranges"],\n ["ICellRange", "range"],\n ["IFormulaContext", "context"]\n]), _e = (e, t) => {\n Array.from(t.keys()).forEach((n) => {\n const o = t.get(n);\n t.set(`${e}.${n}`, o);\n });\n}, Ht = /* @__PURE__ */ new Map([\n ["Scalar", "*"],\n ["FormulaError.Known", W.Error],\n ["Date", "Date"],\n ["JSON", "JSON"]\n]), Xt = /* @__PURE__ */ new Map([\n // Repeating\n]), Oe = "SheetXL";\n_e(Oe, ht);\n_e(Oe, wt);\n_e(Oe, Xt);\nconst Zt = /* @__PURE__ */ new Map([\n ["Promise", () => ({ async: !0 })],\n // [\'PromiseLike\', (): Partial<IFunction.ReturnTypeJSON> => {\n // return { async: true };\n // }],\n ["Observable", () => ({ stream: !0 })]\n]);\nlet se = null;\nasync function Qt() {\n if (se)\n return se;\n try {\n return await (await Promise.resolve().then(function() {\n return or;\n })).initialize();\n } catch (e) {\n throw se = null, e;\n } finally {\n se = null;\n }\n}\nasync function er(e) {\n const t = e?.source ?? null;\n if (!t) return null;\n const r = (e.disableBundle || e.declarationsOnly) ?? !1, n = [\n Jt(),\n //import(\'typescript\'), // when bundled, but node check causes issues. We could bundle replace isNode but felt hacky\n Qt()\n ], o = await Promise.all(n), i = o[0], a = o[1];\n let l = "", u = null;\n const f = [], h = {\n allowJs: !0,\n declaration: !1,\n sourceMap: !1,\n // was true but now bundler will do this\n inlineSourceMap: !1,\n inlineSources: !1,\n isolatedModules: !0,\n preserveConstEnums: !1,\n // types: [\'WebWorker\'],\n module: 99,\n //"esNext",\n noResolve: !0,\n emitDeclarationOnly: !1,\n target: a.ScriptTarget.ES2020\n // lib: [\'webworker\', \'es2020\', \'esnext.asynciterable\'], // Use the webworker lib instead of dom\n }, g = "script", p = `${g}.ts`, y = "lib.d.ts", T = "global.d.ts", A = {\n [p]: t,\n [y]: Wt,\n [T]: i\n }, D = {\n getSourceFile: (s, w, L, P) => a.createSourceFile(s, A[s], a.ScriptTarget.Latest, !0),\n fileExists: (s) => A[s] !== void 0,\n readFile: (s) => A[s],\n writeFile: (s, w) => {\n A[s] = w;\n },\n // not used\n getCurrentDirectory: () => "./",\n getCanonicalFileName: (s) => s,\n useCaseSensitiveFileNames: () => !0,\n getDefaultLibFileName: (s) => y,\n getNewLine: () => `\n`\n }, U = a.createProgram([p, T], h, D), I = U.getTypeChecker(), J = U.getSourceFile(p), E = U.emit();\n E.diagnostics.length > 0 && console.warn(E.diagnostics), l = A[`${g}.js`];\n const c = (s, w, L, P) => {\n if (!s) {\n $(s, new Error(`Type is not defined for \'${w?.name ?? "return"}\'.`));\n return;\n }\n if (s.kind === a.SyntaxKind.NumberKeyword)\n w.scalar = W.Number;\n else if (s.kind === a.SyntaxKind.StringKeyword)\n w.scalar = W.String;\n else if (s.kind === a.SyntaxKind.BooleanKeyword)\n w.scalar = W.Boolean;\n else if (s.kind === a.SyntaxKind.UndefinedKeyword || s.kind === a.SyntaxKind.NullKeyword || s.kind === a.SyntaxKind.VoidKeyword) {\n if (P) {\n $(s, new Error(`\'undefined\' is not a valid type for input: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w.scalar = W.Null;\n } else if (s.kind === a.SyntaxKind.BigIntKeyword)\n w.scalar = W.Number;\n else if (s.kind === a.SyntaxKind.AnyKeyword)\n w.scalar = W.Null;\n else if (s.kind === a.SyntaxKind.ArrayType) {\n const M = s.elementType;\n if (!M) {\n $(s, new Error(`\'Array\' must be typed: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w.arrayDepth = (w.arrayDepth ?? 0) + 1, c(M, w, L, P);\n } else if (s.kind !== a.SyntaxKind.TupleType) {\n if (s.kind === a.SyntaxKind.TypeReference) {\n const M = s.typeName?.getText?.() ?? null, K = ht.get(M);\n let V = !1;\n K && (w.range = K, V = !0);\n const q = Ht.get(M);\n if (q && (w.scalar = q), q !== void 0 && (V = !0), P) {\n const R = wt.get(M);\n if (R)\n return R;\n } else {\n const R = Zt.get(M);\n if (R) {\n const b = { ...w, ...R() };\n let N = 0;\n if (b.async && N++, b.stream && N++, N > 1) {\n $(s, new Error(`\'${M}\' cannot have multiple modifiers: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n w = b, V = !0;\n }\n }\n if (!V) {\n $("node", new Error(`\'${M}\' is not a valid type: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n const H = s.typeArguments;\n if (H) {\n if (H.length !== 1) {\n $(s, new Error(`\'${M}\' must be typed with exactly 1 type: \'${s?.parent?.name?.escapedText}\'.`));\n return;\n }\n c(H[0], w, L, P);\n }\n }\n }\n }, m = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Export) !== 0, fe = (s) => (a.getCombinedModifierFlags(s) & a.ModifierFlags.Default) !== 0, B = [], $ = (s, w) => {\n B.push(w);\n };\n if (a.forEachChild(J, (s) => {\n if (m(s) && a.isFunctionDeclaration(s)) {\n const w = {}, L = {\n parameters: {}\n }, P = s?.name?.getText();\n try {\n w.name = P;\n const K = I.getSymbolAtLocation(s.name).getDocumentationComment(I);\n if (K && K.length > 0 && K[0].text) {\n let R = K[0].text;\n R = R.replace(/[\\r\\n]+/g, "\\\\n").trim(), L.summary = R;\n }\n const V = {};\n c(s.type, V, w, !1), w.returnType = V;\n const q = {};\n fe(s) && (q.default = !0, u = P), Object.keys(q).length > 0 && (w.behavior = q), w.parameters = [];\n const H = /* @__PURE__ */ new Map();\n for (let R = 0; R < s.parameters.length; R++) {\n const b = s.parameters[R], N = {};\n N.name = b.name?.getText();\n const X = c(b.type, N, w, !0);\n if (X) {\n if (w.parameters.length !== 0) {\n const F = s?.parent?.name?.getText();\n $(s, new Error(`\'${w.name}\' contexts must be the first parameter: \'${F}\'.`));\n return;\n }\n w.context = X;\n continue;\n }\n const z = !((b.initializer === void 0 || b.initializer === null) && (b.questionToken === void 0 || b.questionToken === null));\n let C;\n if (z && (N.optional = !0, b.initializer))\n try {\n b.initializer.kind === a.SyntaxKind.StringLiteral ? C = b.initializer.text : b.initializer.kind === a.SyntaxKind.NumericLiteral ? C = parseFloat(b.initializer.text) : b.initializer.kind === a.SyntaxKind.TrueKeyword || b.initializer.kind === a.SyntaxKind.FalseKeyword ? C = b.initializer.kind === a.SyntaxKind.TrueKeyword : b.initializer.kind === a.SyntaxKind.NullKeyword ? C = null : b.initializer.kind === a.SyntaxKind.ObjectLiteralExpression || b.initializer.kind === a.SyntaxKind.ArrayLiteralExpression ? C = b.initializer.getText() : C = b.initializer.getText?.();\n } catch (O) {\n console.warn(`Couldn\'t extract default value for parameter \'${N.name}\'`, O);\n }\n b.dotDotDotToken && (N.rest = !0), w.parameters.push(N);\n const x = { description: "" };\n L.parameters[N.name] = x;\n const G = I.getSymbolAtLocation(b.name).getDocumentationComment(I);\n G && G.length > 0 && G[0].text && (x.description = G[0].text), C !== void 0 && (x.defaultValue = C), H.set(N.name, N);\n }\n if (s.jsDoc && s.jsDoc.length > 0) {\n const R = s.jsDoc;\n for (let b = 0; b < R.length; b++) {\n const N = R[b]?.tags;\n if (N)\n for (let X = 0; X < N.length; X++) {\n const z = N[X];\n let C = z?.tagName?.text;\n if (!C) continue;\n C = C.toLowerCase();\n let x = z.comment;\n const G = C === "hidden";\n if (!(typeof x != "string" && !G) && (typeof x == "string" && (x = x.replace(/[\\r\\n]+/g, "\\\\n").trim()), !(!G && x && (x = x.split(/\\\\n/)[0], !x || x.length === 0)))) {\n if (x && typeof x == "string") {\n const O = /\\{@link(code|plain)?\\s+([^}|]+)(?:\\s*\\|\\s*([^}]+))?\\}/g;\n let F, Z = x, te = [];\n for (; (F = O.exec(x)) !== null; ) {\n const [pe, me, gt, Ne] = F, bt = [gt.trim()];\n Ne && bt.push(Ne.trim());\n }\n x = Z, te.length > 0 && C === "see" && (L.links || (L.links = []), L.links.push(...te));\n }\n if (C === "name") {\n const O = x;\n O !== P && (L.name = O);\n } else if (C === "description") {\n const O = x;\n } else if (C === "summary") {\n const O = x;\n O && (L.summary = O);\n } else if (C === "param") {\n const O = z.name?.text, F = H.get(O);\n if (!F) {\n B.push(new Error(`Parameter \'${O}\' not found in function \'${P}\'.`));\n continue;\n }\n if (z.typeExpression && z.typeExpression.type)\n try {\n const Z = z.typeExpression.type;\n if (Z.kind === a.SyntaxKind.UnionType) {\n const te = [];\n F.enums = te, Z.types.forEach((pe) => {\n if (pe.kind === a.SyntaxKind.LiteralType) {\n const me = pe.literal.text;\n me && te.push(me);\n }\n });\n }\n } catch (Z) {\n console.warn("Error parsing JSDoc type expression:", Z);\n }\n } else if (C === "returns" || C === "return")\n w.returnType.description = x;\n else if (C === "category")\n L.category = x;\n else if (C === "hidden") {\n let O = !0;\n const F = x?.toLowerCase();\n F === "false" ? O = !1 : F !== "true" && (O = x), O !== !1 && (L.hidden = O ?? !0);\n }\n }\n }\n }\n }\n Object.keys(w.returnType).length === 0 && delete w.returnType, f.push([w, L]);\n } catch (M) {\n $(s, new Error(`\'${P}\': ${M.message}`));\n }\n }\n }), B.length > 0)\n throw console.warn(B), new Error("There were compilation errors.", { cause: B });\n if (f.length === 0)\n throw new Error("No exported functions.");\n const yt = `${Ut.uuidV4()}-script`;\n try {\n !r && B.length === 0 && (l = await Gt(a, l, g));\n } catch {\n console.warn("Error bundling script");\n }\n const Ie = {\n functions: f,\n commitId: yt,\n source: t,\n name: "Script",\n language: "typescript",\n // default\n compiled: l\n };\n return u && (Ie.autoRun = u), Ie;\n}\nself.addEventListener("message", async (e) => {\n const { id: t, params: r } = e.data;\n try {\n const n = await er(r);\n self.postMessage({ id: t, result: n, error: null });\n } catch (n) {\n self.postMessage({\n id: t,\n result: null,\n error: {\n message: n.message,\n stack: n.stack,\n cause: n.cause\n }\n });\n }\n});\nlet ce = null;\nasync function tr() {\n return ce || (ce = new Promise(async (e, t) => {\n try {\n const r = "0.20.2", n = `https://esm.sh/esbuild-wasm@${r}`, o = `https://esm.sh/esbuild-wasm@${r}/esbuild.wasm`;\n console.log("🔄 Initializing esbuild...", o);\n const i = await import(\n /* webpackIgnore: true */\n /* @vite-ignore */\n n\n );\n console.log("🔄 Got esm...", o);\n const a = i.default;\n await a.initialize({\n wasmURL: o,\n // Provide the specific WASM URL\n worker: !1\n // Keep processing on the current thread\n }), console.log("🔄 Initialized esm...", o), e(a);\n } catch (r) {\n console.error("Error initializing esbuild:", r), t(r);\n }\n }), ce);\n}\nvar rr = /* @__PURE__ */ Object.freeze({\n __proto__: null,\n initialize: tr\n});\nlet ue = null;\nasync function nr() {\n return ue || (ue = new Promise(async (e, t) => {\n console.log("🔄 Initializing Browser TypeScript module...");\n let r = null;\n try {\n r = await import("https://esm.sh/typescript@5.7.2");\n } catch (n) {\n console.error("Error initializing Browser TypeScript module:", n);\n }\n r || console.log("use script fallback"), e(r);\n }), ue);\n}\nvar or = /* @__PURE__ */ Object.freeze({\n __proto__: null,\n initialize: nr\n});\n', r = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", t], { type: "text/javascript;charset=utf-8" });
|
|
62
|
-
function o(n2) {
|
|
63
|
-
let e2;
|
|
64
|
-
try {
|
|
65
|
-
if (e2 = r && (self.URL || self.webkitURL).createObjectURL(r), !e2) throw "";
|
|
66
|
-
const t2 = new Worker(e2, { type: "module", name: n2?.name });
|
|
67
|
-
return t2.addEventListener("error", () => {
|
|
68
|
-
(self.URL || self.webkitURL).revokeObjectURL(e2);
|
|
69
|
-
}), t2;
|
|
70
|
-
} catch {
|
|
71
|
-
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(t), { type: "module", name: n2?.name });
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async function i() {
|
|
75
|
-
if (typeof process < "u" && process.versions?.node && typeof Worker > "u") return await a();
|
|
76
|
-
if (typeof Worker < "u") {
|
|
77
|
-
const e2 = new n(() => new o());
|
|
78
|
-
try {
|
|
79
|
-
return await e2.start(), e2;
|
|
80
|
-
} catch (n2) {
|
|
81
|
-
console.error("Failed to start TypescriptCompiler worker reverting to fallback:", n2);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return await a();
|
|
85
|
-
}
|
|
86
|
-
const a = async () => {
|
|
87
|
-
const { compileModule: n2 } = await import("./Bl4s1iMUrCbnLTK6.mjs"), t2 = new e((e2) => n2(e2));
|
|
88
|
-
return await t2.start(), t2;
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
i as createCompilerWorker
|
|
92
|
-
};
|