@sheetxl/studio-vanilla 0.7.28-beta.4 → 0.8.0-beta.2
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/browser/cjs/{C0hGnOYkvrwxaGrw.cjs → 3a3qEmdJWFXfGW0q.cjs} +1 -1
- package/browser/cjs/9rXsWW4SnEpudhfh.cjs +1 -0
- package/browser/cjs/{J7LQgueGGNUE9emR.cjs → 9vk-L6rRvx20jeQj.cjs} +1 -1
- package/browser/cjs/{C9L-xibuJ434Mqqq2.cjs → B0FCH1gFfg2bQiPi2.cjs} +1 -1
- package/browser/cjs/B3WkiDqFBfA_xxJL2.cjs +1 -0
- package/browser/cjs/B4ANcw0mAmhe2Aeb2.cjs +1 -0
- package/browser/cjs/B6IXpae7f0J8Ocq62.cjs +1 -0
- package/browser/cjs/B6vy56yEA1I3B74O2.cjs +1 -0
- package/browser/cjs/B7QDcu7uACQA1y3h.cjs +1 -0
- package/browser/cjs/BF8ZxFWyAAnbe4mz.cjs +5 -0
- package/browser/cjs/BLAG3kDSthU0SH-E.cjs +2 -0
- package/browser/cjs/BPWKnUtyoTrtW567.cjs +1 -0
- package/browser/cjs/BQWmn92gYmxC8eWt.cjs +1 -0
- package/browser/cjs/BcROQ4pvVajDQ1em.cjs +1 -0
- package/browser/cjs/BdJvn1vLXMZvE-8h.cjs +4 -0
- package/browser/cjs/BhcbKFKbSWEavYJm.cjs +7 -0
- package/browser/cjs/Bncc0oXhFMdj_HuR2.cjs +1 -0
- package/browser/cjs/Bo7EQ8niKmwtAwo_2.cjs +1 -0
- package/browser/cjs/Bqup1MCJFqTZbLDd2.cjs +1 -0
- package/browser/cjs/BsJHSGeWLskirGXg.cjs +14 -0
- package/browser/cjs/Bsl_clm06l5cwpML.cjs +32 -0
- package/browser/cjs/BvVzIzXLyLxpBcia2.cjs +3 -0
- package/browser/cjs/BylqpwnwQYDHIWjX.cjs +5 -0
- package/browser/cjs/C-xC6h1TOBr5ZDSe2.cjs +1 -0
- package/browser/cjs/{CRx1WvmgBjT8WVyB2.cjs → C0g87ndP2zMUbX6f.cjs} +1 -1
- package/browser/cjs/{n4ZQ0-3uSrEsInbg.cjs → C19UoK2TTtKU_faS.cjs} +1 -1
- package/browser/cjs/C1tOH7BEpO_ANMsa.cjs +1 -0
- package/browser/cjs/C4cZxb9nRtzTCA40.cjs +1 -0
- package/browser/cjs/C9q3zr8iCIoYDrdA.cjs +1 -0
- package/browser/cjs/CA_ZsYjkTHSpGK0j.cjs +41 -0
- package/browser/cjs/{lEQC21-Sk4lwHy2r2.cjs → CFxueP0tbpmvY1Ip2.cjs} +1 -1
- package/browser/cjs/CH7BUjrXIKDIE7XE.cjs +93 -0
- package/browser/cjs/CKEselBM-qmMpQBW2.cjs +2 -0
- package/browser/cjs/CRcv32tHTbGSGtkh2.cjs +1 -0
- package/browser/cjs/{M19oMY91yZxf2WAR.cjs → CTDN-AYeejrfopDC.cjs} +1 -1
- package/browser/cjs/CVHc_cJddJk7J3Zt2.cjs +1 -0
- package/browser/cjs/CX7VUEYca9dtWS0N.cjs +1 -0
- package/browser/cjs/{BEJFcqVMDMKOvs11.cjs → C_T-ehCAzjaVRmTk.cjs} +1 -1
- package/browser/cjs/CaJGoNwTL6pAJ6a42.cjs +1 -0
- package/browser/cjs/CfXcRa4RlFmqU0Op2.cjs +1 -0
- package/browser/cjs/ClVLjLIRgWqX3Q-F.cjs +1 -0
- package/browser/cjs/Co31kjvOPAAYbeF-.cjs +1 -0
- package/browser/cjs/CoCKYtBIVeDXxSIq2.cjs +1 -0
- package/browser/cjs/CqPb6CbrHTRnbSKa2.cjs +8 -0
- package/browser/cjs/CtsduUtTrkcWM02v.cjs +3747 -0
- package/browser/cjs/D-N5oLosHPjoj-oG.cjs +1 -0
- package/browser/cjs/D2ZPx3v4EVejvhR2.cjs +54 -0
- package/browser/cjs/D5Gp16-G3pjMtypl2.cjs +1 -0
- package/browser/cjs/D8tkBbkGH5cZzIJP2.cjs +1 -0
- package/browser/cjs/DA0nGLC0bEkOhh7G2.cjs +1 -0
- package/browser/cjs/DCRe7NqRclU-Jr7p.cjs +1 -0
- package/browser/cjs/{EeOVMRq7TuptFKTc2.cjs → DF4l8xrxkcLkgExp2.cjs} +1 -1
- package/browser/cjs/{DtaFdoK4CppKRF6F2.cjs → DHL7SVvz96-5zSWE2.cjs} +2 -2
- package/browser/cjs/DHMQnssVXWjGBSs-.cjs +3 -0
- package/browser/cjs/{DQTBgNqDHInvxrwS.cjs → DIdPQwECld6gubdK2.cjs} +1 -1
- package/browser/cjs/DLtFM988NCD-jeBV.cjs +8 -0
- package/browser/cjs/DNnMGL1ff8hutxSd.cjs +1 -0
- package/browser/cjs/DP1pufP3NJFoDa-g.cjs +3 -0
- package/browser/cjs/{CnZfa45XxA-9Jhmp.cjs → DRmo6uoGoqtiVff82.cjs} +1 -1
- package/browser/cjs/DSXLVieENYN9qXYl2.cjs +1 -0
- package/browser/cjs/DTZiRVEB3kVK7eK-2.cjs +1 -0
- package/browser/cjs/DU2HMmI1EeHBTvuG.cjs +1 -0
- package/browser/cjs/DWzkpizTIJkaqf4J2.cjs +1 -0
- package/browser/cjs/DZBKNR9xUMTHWS_D.cjs +1 -0
- package/browser/cjs/{X1LnR885SNQaK5HZ.cjs → D_IilnLuy_hDaBmI.cjs} +1 -1
- package/browser/cjs/Dg3GaW0QWwnlqetX2.cjs +1 -0
- package/browser/cjs/Dg5fR9uTvYHyxOX62.cjs +22 -0
- package/browser/cjs/{jIxFDc3EQDDXisAC2.cjs → Dk1WS0vM-LQJx_EO2.cjs} +1 -1
- package/browser/cjs/DpFg69dDCPoOK2BY2.cjs +1 -0
- package/browser/cjs/{zEytED4Eleo5DVvS.cjs → DsqHxG-lGZxL1XgQ.cjs} +1 -1
- package/browser/cjs/DtlC63s51_88j6AY2.cjs +1 -0
- package/browser/cjs/{Du4jBiFxRIF1OjD42.cjs → Dtxj9JR14A-uliu5.cjs} +1 -1
- package/browser/cjs/{CpJJh4UnFl1_qFui.cjs → Dx7GQ4ALtNG3kshu.cjs} +1 -1
- package/browser/cjs/{DG-AY_xO8RKHtEBE.cjs → Dy50BSaRMmRISD2Y.cjs} +1 -2
- package/browser/cjs/GPlG4lbMP89VDHYJ.cjs +126 -0
- package/browser/cjs/LD1P-jAXleebK12X.cjs +7 -0
- package/browser/cjs/PmwvZPFhqmL4DO582.cjs +1 -0
- package/browser/cjs/SATfdSwNygvlOSKC2.cjs +1 -0
- package/browser/cjs/TZQc-szdIVnHDH6F.cjs +11 -0
- package/browser/cjs/{BKXFdLiztqEHIjQ_2.cjs → VgwyOcXDHhEp_NvH2.cjs} +1 -1
- package/browser/cjs/XRCcogT-Iqd3Wv6R2.cjs +1 -0
- package/browser/cjs/a4xpA8d_d22-GKos.cjs +1 -0
- package/browser/cjs/aBulzIf4cHnL7sbw.cjs +1 -0
- package/browser/cjs/cexWxRluo6g-NG_u.cjs +1 -0
- package/browser/cjs/iYn00uzmSLl2T0oN2.cjs +1 -0
- package/browser/cjs/ibvsavYh4kU-xxL8.cjs +1 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{DIbdDzNf_3S2RYZN.cjs → p3PYFz7cN2z4XQoU.cjs} +1 -1
- package/browser/cjs/{CEpXnHhrczUmIwMa2.cjs → xTT7lHV4HUjeNdMs2.cjs} +1 -1
- package/browser/esm/{CFVzVz9BCRBowBea.mjs → 04mVsW7CTmUlxnOa.mjs} +3 -3
- package/browser/esm/0YKBRd7eLIUmcKns.mjs +35 -0
- package/browser/esm/13CH9sjvoEqt6nbt2.mjs +37 -0
- package/browser/esm/7lIMFL11BRZrMXdc2.mjs +19 -0
- package/browser/esm/9CP_UyAqmAHE7-mv.mjs +267 -0
- package/browser/esm/{ByJMrAYRARLc7uZQ2.mjs → AAHsV9V95k39t9SD.mjs} +27 -29
- package/browser/esm/{D8zyGG6yt4CsyA8K.mjs → B-Zf8W3s_WXgYxhN.mjs} +12 -12
- package/browser/esm/{hsy1zALC1oNNm5Sf.mjs → B0FNPu0uhX_WW-aJ.mjs} +1 -1
- package/browser/esm/{DmqS0kz7jvlOw3qr.mjs → B0aCnXuYD0ZopZdA.mjs} +28 -13
- package/browser/esm/B2nEJHcip8raAhdc.mjs +3342 -0
- package/browser/esm/B2vjec5TDs2ZJ1eI2.mjs +33 -0
- package/{cdn/assets/C7xBBqvPqat9oEft2.js → browser/esm/B50P0gSziuG68Umu.mjs} +95 -53
- package/browser/esm/BA6JMESdvw_1-mFg2.mjs +238 -0
- package/{cdn/assets/BGWyNjrM55ce-D1o.js → browser/esm/BBaNqp1ZjuO25FQg2.mjs} +2 -2
- package/browser/esm/BBzzLAeBBFbVvgph2.mjs +8 -0
- package/browser/esm/{pFBVGSvmImMMDMuJ.mjs → BCQgeu38866r56Dh.mjs} +97 -54
- package/{cdn/assets/DOsKUeLPwFIdzQv32.js → browser/esm/BDZAVKSYpcOp9Dve2.mjs} +1 -1
- package/browser/esm/BEWsOD2JQ8dwQCEm2.mjs +427 -0
- package/{cdn/assets/BRBHACVjnV1_6VLQ.js → browser/esm/BEYY8z4FusH7S5K-.mjs} +1 -1
- package/browser/esm/{DM4g0nYgYXgI44dL2.mjs → BF842ZtkvebA1LgR.mjs} +1 -1
- package/{cdn/assets/BF9yh58xfvR0KbSo.js → browser/esm/BG_hG8jUkf0aMzGK.mjs} +2 -2
- package/{cdn/assets/D-tQc4bi3FzGVnFg.js → browser/esm/BG_hG8jUkf0aMzGK2.mjs} +2 -2
- package/browser/esm/{5LJ1sC7IPn109Ien.mjs → BIab7njjwaSXjSEP2.mjs} +2 -2
- package/browser/esm/BJJBFdJaP2dMlug92.mjs +280 -0
- package/browser/esm/{Bc2Dp6W4U_22cv7c.mjs → BM343UBJqjbDokO62.mjs} +1 -1
- package/browser/esm/{B4fSPDN923nqCDVE2.mjs → BOhfbmK18Xj1P7-i.mjs} +2 -2
- package/browser/esm/{BgwHVPZp494SgQ0d2.mjs → BPt7dDNLBsKrZgzO2.mjs} +22 -22
- package/browser/esm/{BsP1iPcd49wYIIoP.mjs → BTNqElWtYkKW47Vg.mjs} +3 -3
- package/{cdn/assets/BO2NRW9sjHGE9tg-2.js → browser/esm/BVOTzF7NFvB20R7D.mjs} +2 -2
- package/browser/esm/BVtQCzVeMOJZq64r2.mjs +394 -0
- package/browser/esm/BZZ2IOkVKppFWNLE.mjs +27 -0
- package/browser/esm/{Cd8G1nX1dKzp-mho2.mjs → B_49GiUSgx96vBvq2.mjs} +2 -2
- package/{cdn/assets/Bfd3T36ocASPZddR.js → browser/esm/BauR0SATr44ggHRU.mjs} +1714 -939
- package/browser/esm/Bc8-re9biUn57kdl.mjs +87777 -0
- package/browser/esm/{CJ-lOo2cXlcYrg2P.mjs → BcHN_VMA7bLNKKMO.mjs} +1682 -1600
- package/{cdn/assets/DJSXXWTUJGbXqLLx.js → browser/esm/Bcjus_Q6f72kE1MK.mjs} +1 -1
- package/browser/esm/{DENx9Ts-f8adXw3Y2.mjs → Be2-C5U5LlfLTmyo2.mjs} +1 -1
- package/browser/esm/Be7--zCnU6JvLkK1.mjs +637 -0
- package/browser/esm/{Ykh10IaXTKA2XWot.mjs → Bfq8Gdqf3I7y_Hju.mjs} +1 -1
- package/browser/esm/BhGgNWNVYntkJYgU.mjs +155 -0
- package/browser/esm/{CHmSnCPoww1StSta.mjs → BiArrlzwKsOlSm00.mjs} +4 -4
- package/{cdn/assets/CJGlwQusOCSy9ZAb.js → browser/esm/Bl5xLu1ou-9zMIBZ2.mjs} +5 -5
- package/browser/esm/{6A8iYjFWJzx5PaTP2.mjs → BnFriW2cIcOJkXU42.mjs} +16 -16
- package/browser/esm/{CXDtDYyREwoFwtMJ2.mjs → Bokc-Wu4XBPWKmdt.mjs} +1 -1
- package/browser/esm/BuSBBEiK_3KnBr632.mjs +514 -0
- package/{cdn/assets/Bh4hZt6639QZusIG.js → browser/esm/Bvy9LWN5UHwJXV9i2.mjs} +2 -2
- package/{cdn/assets/DnMUizHKSRwWpO_72.js → browser/esm/C04uI3XsvTc6Cc7w2.mjs} +37 -3
- package/{cdn/assets/Bj8bWbLg1IY965tK.js → browser/esm/C1EvC_qPiGiVMrkF.mjs} +963 -946
- package/browser/esm/{BxecIrskOMQZB-Xc.mjs → C1doaJjkCzQlB_3u2.mjs} +3 -3
- package/browser/esm/{DGfzktq0BrIwcb8j.mjs → C3M_lKSZ_Fq1SQOn.mjs} +2 -2
- package/browser/esm/C3qSUuVA-FII3rMU2.mjs +298 -0
- package/{cdn/assets/BzktrYJH7SQ9GyUI2.js → browser/esm/C6X4CmElTpPxrad6.mjs} +1 -1
- package/{cdn/assets/CIgn8uIPaadIJP4a2.js → browser/esm/CA4eJpge9meoO0rj2.mjs} +17 -18
- package/browser/esm/CAVONPXgoytyiNK-.mjs +25 -0
- package/{cdn/assets/BPAEbeXV75XIAS4n.js → browser/esm/CPgOplnn6NuHwsZ_.mjs} +1 -1
- package/browser/esm/{DLArQtAbWAarI8od2.mjs → CQBSLdAdR53c7BVh2.mjs} +1 -1
- package/browser/esm/{BjYIAiuzZbD-dk822.mjs → CThP3jXwDzLlUOeI.mjs} +1 -1
- package/browser/esm/CTzKk6VuZTohsOIF2.mjs +58 -0
- package/{cdn/assets/CmYCYFWjq9KP6xw7.js → browser/esm/CU1_-PzBC9cDsm5t2.mjs} +6 -6
- package/{cdn/assets/FVJ1akngxeMiYwPa.js → browser/esm/CULlzRLL3s2Dikjg.mjs} +1 -1
- package/browser/esm/CUMu_1tXFa0LPKGV.mjs +3324 -0
- package/browser/esm/{DjS4iUli-T3uuUfK.mjs → CUYBRp4sHMdGwkLT.mjs} +1 -1
- package/browser/esm/CYU_-DiQXjh1SEU1.mjs +3343 -0
- package/browser/esm/{DxxlSejA2S6YUPWD.mjs → CaTmLXIsIxaOrLcZ.mjs} +446 -347
- package/browser/esm/CcK4ACF7d5ogFpAS.mjs +91 -0
- package/{cdn/assets/Bce8ZTUCpXr5Y_zl2.js → browser/esm/CjFOk9mcZqAngWD2.mjs} +48 -2
- package/browser/esm/{DrKUGkrCTKZHu8XC.mjs → CmSATmXaMlqwTjAe2.mjs} +1 -1
- package/browser/esm/{C4vqrW3EmJDy1otX.mjs → CnvlkxK0pS02Z3gZ.mjs} +7 -6
- package/browser/esm/{CXlA71yGA1Hqvp_S.mjs → Cvw3poNlUmn3qAh0.mjs} +6 -6
- package/{cdn/assets/CBC_MJL6Bwk7bzQz2.js → browser/esm/CwDjNuGkKnVtfJo-.mjs} +1 -1
- package/browser/esm/{L6LjzOx1G9Idjtxa2.mjs → D-egzesxukW7Z_e3.mjs} +2 -2
- package/{cdn/assets/g8dDbkwbYjhKWJM2.js → browser/esm/D13sLQRMMKrDHepu.mjs} +2 -2
- package/{cdn/assets/CsKCqLuggHhYC93k.js → browser/esm/D1bACCJy4F8kANLy.mjs} +1 -1
- package/{cdn/assets/MHuhAgQAA8zcnWkd2.js → browser/esm/D5Pa9lfPfAcCGj_N.mjs} +1 -1
- package/browser/esm/{DSWdYe7SDB5cYWo5.mjs → DBTB0moKfwOu0F47.mjs} +241 -241
- package/browser/esm/{Bz3-FDGVU67Izdnv2.mjs → DHzdEqMCGL_JPh9w2.mjs} +19 -27
- package/browser/esm/{-9NsA_4pZqcEQBX7.mjs → DMMtONCySdMHoaMU.mjs} +15 -15
- package/{cdn/assets/BGAXiHOiX_PZ1ww1.js → browser/esm/DTfDzhFtORWkuoRv.mjs} +1 -1
- package/{cdn/assets/Dgt8kua8CYlMRfdw.js → browser/esm/DYyxB53T5uaoyInL2.mjs} +2 -2
- package/browser/esm/DZLyXICwEHYRnCuO.mjs +758 -0
- package/browser/esm/{Bjx-9lUaScF5-Hki2.mjs → DbVSG7Uf7YDQbmc32.mjs} +2 -5
- package/browser/esm/Dd80tsdITZsotoCX2.mjs +47 -0
- package/browser/esm/{s4trFf5sOSGNEzr3.mjs → DeSDYBzD8e5XXnvq.mjs} +40 -40
- package/browser/esm/DeeFxCkhXDF0p1nl.mjs +87 -0
- package/{cdn/assets/D4aK0uTRJQpM63922.js → browser/esm/DgH-AoqKDdIWg0J8.mjs} +1 -1
- package/browser/esm/{CTwLETvNO4KeXbkK2.mjs → DjNR_ZGCbg-xia152.mjs} +5 -5
- package/browser/esm/DkuK8fY8vrl7aZpf2.mjs +115 -0
- package/browser/esm/{BzktrYJH7SQ9GyUI.mjs → DmPq6SwNcX1qXKct.mjs} +1 -1
- package/{cdn/assets/DtkqR-Hu7K4agnCs2.js → browser/esm/Dn8Z0WK2Hwi8MRnQ.mjs} +1 -1
- package/browser/esm/{BZkd8LNLgEd5WQXO2.mjs → DoCYcvHzw3S0MDCW.mjs} +69 -4
- package/{cdn/assets/DRAYZ0SGlbCLkftR.js → browser/esm/DtQu3vHaJfA5KM2H2.mjs} +1 -1
- package/{cdn/assets/DjfBSoaKM-vtbeqT.js → browser/esm/DtqMTXq5u5DmS5S1.mjs} +2 -2
- package/browser/esm/{BetL7yI63lEdQ0gM.mjs → DuijhgjRhgWB9sCY.mjs} +504 -331
- package/browser/esm/{C3dXBjR3SrDCdJlm.mjs → DyPe20tPiPVm1PLe.mjs} +6 -6
- package/{cdn/assets/BZXvEddjoz4C8y4w.js → browser/esm/Dz713G5R9JayR5v1.mjs} +16 -11
- package/browser/esm/{CY4ANhbzXqZMJPnL2.mjs → GDYIOITizuJ9xSUf2.mjs} +15 -15
- package/{cdn/assets/D5BuXc-kVnr6Xiae2.js → browser/esm/LfHB39-nf7mi9XC72.mjs} +1 -1
- package/browser/esm/{CRsnKeHAnKrWvuG52.mjs → LgoljOEffsYkpZZJ2.mjs} +2462 -2971
- package/browser/esm/QNvOHujamKYSXWWA2.mjs +32 -0
- package/browser/esm/{DER7-kADXFnTmK-32.mjs → R2c8rUTz1GjCQEp-2.mjs} +121 -94
- package/browser/esm/S2_pz0y2RTJFpXkS.mjs +15 -0
- package/browser/esm/{PzCXbVRf1jOHVOAw.mjs → V-oO_EfTyth0iptZ2.mjs} +1 -1
- package/browser/esm/XB269tVMhdRHj10G.mjs +674 -0
- package/browser/esm/{BJQfvwvEke-uN0_02.mjs → YC83lJ3yRZP57lBl2.mjs} +42 -4
- package/{cdn/assets/CY7qR8ENX314HrrD.js → browser/esm/ZJ32DJlBpN_9fAph.mjs} +3 -3
- package/browser/esm/{DdtDlBp6KJZjL28o.mjs → apjOZ6N9KbmyErGz.mjs} +1867 -1407
- package/browser/esm/b49cTAZ6BWPQgfYu.mjs +159 -0
- package/browser/esm/{D_8B8jIlshd3eTIO2.mjs → bvuPDJZmI2O5oihy2.mjs} +139 -137
- package/browser/esm/{BrUe0MnOhxzeOngn2.mjs → eTXmezPFvAwM_L-D2.mjs} +1 -1
- package/{cdn/assets/BaIe3fLfPLw3FbYP2.js → browser/esm/ep-IjWXOPg2b-REP2.mjs} +1 -1
- package/browser/esm/{B3tC7wY_kUGXf5sb2.mjs → f9r0yTaD2YChFtEg2.mjs} +1 -1
- package/browser/esm/fJ0eqh3Ja3O0z1QL.mjs +149 -0
- package/browser/esm/{Dwko6HB2zePBBeBu2.mjs → gAriGKwELet15RCY2.mjs} +13 -13
- package/browser/esm/gCeoOjDjiVaX8dtF2.mjs +119 -0
- package/browser/esm/iYNN3Px9AekrMEfu2.mjs +117 -0
- package/browser/esm/index.mjs +6 -6
- package/browser/esm/{Duo6t8_BzIiBDrFm.mjs → j-9DpYsIlTN1mwql.mjs} +16159 -16463
- package/{cdn/assets/esX6dx06TUUL-cRt.js → browser/esm/jQ5c7MGwQOZq4s5w.mjs} +1 -1
- package/browser/esm/kcfC6hY47HklE6Om.mjs +225 -0
- package/browser/esm/{DJk14sSSnSHiEXZ72.mjs → lHpMVBxqkkCYD6d12.mjs} +51 -11
- package/browser/esm/{B_U_UpQXdbjNRthb.mjs → nBZATD4yR1W5D4Fi.mjs} +1 -1
- package/browser/esm/{BZSAb1WGbwagUKGv2.mjs → rxlYDHBsenoxRx-K2.mjs} +6 -6
- package/browser/esm/sfOREE_huDAOcfYs.mjs +15495 -0
- package/{cdn/assets/D2Ls6urWeByV5W-B.js → browser/esm/txVgXcuMeWVNWHnZ.mjs} +1 -1
- package/{cdn/assets/CgsQuAbp76UOAPHm2.js → browser/esm/xzoxSwyGoZdH-ysh.mjs} +196 -175
- package/browser/esm/{B9t9fF8FNCLomgK_.mjs → yFldtlfN_ASKyMll.mjs} +563 -534
- package/browser/esm/yVLsr0rcaOFel2nS2.mjs +32 -0
- package/cdn/assets/13CH9sjvoEqt6nbt.js +37 -0
- package/cdn/assets/{BIPjogMyMmLRly43.js → 2QsTDWiE6SMelbNU2.js} +7 -7
- package/cdn/assets/588lLflWQypQVzce.js +27 -0
- package/cdn/assets/7lIMFL11BRZrMXdc.js +19 -0
- package/cdn/assets/{ByJMrAYRARLc7uZQ.js → AAHsV9V95k39t9SD.js} +27 -29
- package/cdn/assets/{hsy1zALC1oNNm5Sf.js → B0FNPu0uhX_WW-aJ2.js} +1 -1
- package/cdn/assets/B2vjec5TDs2ZJ1eI.js +33 -0
- package/{browser/esm/C7xBBqvPqat9oEft.mjs → cdn/assets/B50P0gSziuG68Umu2.js} +95 -53
- package/cdn/assets/{DP9sLYfGGWMDI7hL2.js → B66--qmqjDI4V95v2.js} +8 -8
- package/cdn/assets/{DGWhm91XZlY1GWHe2.js → B9hBziUoXFzKPWF02.js} +7 -7
- package/cdn/assets/{B4492m5zRjz4JWIo2.js → B9oLwnLz9m-TWSPJ2.js} +1867 -1407
- package/cdn/assets/{DpNYiOK112bFC3KK2.js → BB6k7f_6TCVysy8a.js} +41 -3
- package/{browser/esm/BGWyNjrM55ce-D1o2.mjs → cdn/assets/BBaNqp1ZjuO25FQg.js} +2 -2
- package/{browser/esm/DOsKUeLPwFIdzQv32.mjs → cdn/assets/BDZAVKSYpcOp9Dve.js} +1 -1
- package/{browser/esm/BRBHACVjnV1_6VLQ2.mjs → cdn/assets/BEYY8z4FusH7S5K-2.js} +1 -1
- package/cdn/assets/{DM4g0nYgYXgI44dL.js → BF842ZtkvebA1LgR2.js} +1 -1
- package/cdn/assets/{5LJ1sC7IPn109Ien.js → BIab7njjwaSXjSEP.js} +2 -2
- package/cdn/assets/BKouftCLbhExXXXU.js +264 -0
- package/cdn/assets/{Bc2Dp6W4U_22cv7c2.js → BM343UBJqjbDokO6.js} +1 -1
- package/cdn/assets/{Dy5Z2XIqS7-0tdjc2.js → BNm-ZCOBoBRceGXA2.js} +65 -65
- package/cdn/assets/{B4fSPDN923nqCDVE.js → BOhfbmK18Xj1P7-i2.js} +2 -2
- package/{browser/esm/DHQcJqD-EtJ0Efug2.mjs → cdn/assets/BPOi08RtEmQdlbtS2.js} +27 -26
- package/cdn/assets/{DQhvG3cP0HPB6giA2.js → BSixIKI7PxSqiUGB2.js} +5 -5
- package/{browser/esm/BQt5lpPjssz4Lvhs.mjs → cdn/assets/BT3KOuPzJsNUvy4B.js} +2 -2
- package/cdn/assets/BTB79KyzSZf-h-lm2.js +226 -0
- package/cdn/assets/{DEFEOS3OuA23llF92.js → BWtyERLPrUmI8Qbi2.js} +140 -138
- package/cdn/assets/{Cd8G1nX1dKzp-mho.js → B_49GiUSgx96vBvq.js} +2 -2
- package/cdn/assets/B_UEqzmXZIhHAEyS.js +280 -0
- package/cdn/assets/B_sKE05xgjFFafjm.js +15496 -0
- package/{browser/esm/O982fBwJ80FSdhad.mjs → cdn/assets/BaEH7HZAJkFGHtNj2.js} +203 -180
- package/{browser/esm/DJSXXWTUJGbXqLLx.mjs → cdn/assets/Bcjus_Q6f72kE1MK.js} +1 -1
- package/{browser/esm/BmTSjuGI87QqMA-a.mjs → cdn/assets/BdCn57ENgiC2kOsF.js} +2 -2
- package/cdn/assets/{DENx9Ts-f8adXw3Y.js → Be2-C5U5LlfLTmyo.js} +1 -1
- package/cdn/assets/Be_TDLQucHiVwNvT.js +268 -0
- package/cdn/assets/{Ykh10IaXTKA2XWot2.js → Bfq8Gdqf3I7y_Hju2.js} +1 -1
- package/cdn/assets/Bi9IWSBo7DDXROTC.js +8 -0
- package/{browser/esm/CJGlwQusOCSy9ZAb2.mjs → cdn/assets/Bl5xLu1ou-9zMIBZ.js} +5 -5
- package/cdn/assets/{CXDtDYyREwoFwtMJ.js → Bokc-Wu4XBPWKmdt.js} +1 -1
- package/cdn/assets/{Wb48SedqaKMZnxym.js → Bqe5WbSIlCRYLcqT.js} +4 -4
- package/cdn/assets/{DiKc6jzGM1isrN02.js → BsGz_0JrhSfOZ24Q.js} +3 -3
- package/cdn/assets/BsHFBjNwTzc_CKLq2.js +87777 -0
- package/{browser/esm/DuJ_gK9f35IbKDd6.mjs → cdn/assets/BuyRy9BcgPYo8l8W.js} +1714 -939
- package/cdn/assets/{B2BvBxjz3Kfii_Gn2.js → ByHzW_x0qXsBJMwv2.js} +2386 -2895
- package/{browser/esm/DnMUizHKSRwWpO_7.mjs → cdn/assets/C04uI3XsvTc6Cc7w.js} +37 -3
- package/cdn/assets/{BxecIrskOMQZB-Xc.js → C1doaJjkCzQlB_3u.js} +3 -3
- package/cdn/assets/C2JMpa_lWCs9k2ZI.js +3324 -0
- package/cdn/assets/{BOTU30yJHbaNehFS.js → C2X9NooB33IkSomz.js} +13 -13
- package/cdn/assets/{B0N6rTGGJN2DZPaf.js → C3KIo0iwLXhIIMG8.js} +2 -2
- package/{browser/esm/BBhB25AlKEzdoI0V.mjs → cdn/assets/C6X4CmElTpPxrad6.js} +1 -1
- package/cdn/assets/C6X4CmElTpPxrad62.js +24 -0
- package/cdn/assets/{6L6HfOFw1xzxXtf22.js → C7ZHXwoL2A_nxZjl.js} +436 -337
- package/cdn/assets/CA9oxppuFcYDyylE.js +149 -0
- package/{browser/esm/CBuulf8RrSItPZJi.mjs → cdn/assets/CAOPlenSF-pjVfqt2.js} +2 -2
- package/cdn/assets/CAVONPXgoytyiNK-.js +25 -0
- package/cdn/assets/{DY9zG4TdF0FAs_QP2.js → CBQrIDBtf5Ibwi96.js} +28 -13
- package/cdn/assets/{BdhFhDEa7Xed6dFE.js → CCTYceFrydwG3Vyt2.js} +23600 -23903
- package/cdn/assets/CDijenaMI_dBIGU-.js +3344 -0
- package/cdn/assets/{CDqMmEdh_CPaFCCi2.js → COk-0FZl3cv__3yY2.js} +566 -537
- package/cdn/assets/{DaX0_AkJxkaUnNT7.js → CP0M0z_IaCwCMGNS.js} +16 -16
- package/{browser/esm/BPAEbeXV75XIAS4n2.mjs → cdn/assets/CPgOplnn6NuHwsZ_2.js} +1 -1
- package/cdn/assets/{hClmI7sWeaBbHo3W2.js → CPjsJ0CY-AurDJgm2.js} +14 -14
- package/cdn/assets/{DLArQtAbWAarI8od.js → CQBSLdAdR53c7BVh.js} +1 -1
- package/cdn/assets/{BjYIAiuzZbD-dk82.js → CThP3jXwDzLlUOeI2.js} +1 -1
- package/cdn/assets/CTzKk6VuZTohsOIF.js +58 -0
- package/{browser/esm/CmYCYFWjq9KP6xw72.mjs → cdn/assets/CU1_-PzBC9cDsm5t.js} +6 -6
- package/{browser/esm/FVJ1akngxeMiYwPa.mjs → cdn/assets/CULlzRLL3s2Dikjg.js} +1 -1
- package/cdn/assets/{CnfGgjuCEyX-PYs_2.js → CUTnOs5iWyc3J2cN2.js} +17 -17
- package/cdn/assets/CUYBRp4sHMdGwkLT2.js +24 -0
- package/cdn/assets/CUrzB9ponX7LAYXR.js +35 -0
- package/{browser/esm/XBb7Mxqf0beXaSJt.mjs → cdn/assets/CWOPhBfYI6R0kz-p.js} +965 -944
- package/cdn/assets/CZ3JFujrzd0iX0zL2.js +428 -0
- package/cdn/assets/{xMskoOI2CK9-AmBF2.js → CheDxDxt7x0CPz9P.js} +11 -9
- package/{browser/esm/Bce8ZTUCpXr5Y_zl.mjs → cdn/assets/CjFOk9mcZqAngWD22.js} +48 -2
- package/cdn/assets/{DrKUGkrCTKZHu8XC.js → CmSATmXaMlqwTjAe.js} +1 -1
- package/cdn/assets/{C4vqrW3EmJDy1otX.js → CnvlkxK0pS02Z3gZ.js} +7 -6
- package/cdn/assets/{KJzdwvEWwCwAXuo4.js → CqI09iUEId8rHfJ9.js} +242 -242
- package/{browser/esm/CBC_MJL6Bwk7bzQz.mjs → cdn/assets/CwDjNuGkKnVtfJo-2.js} +1 -1
- package/cdn/assets/CzEHYpK2SYTRpxDm2.js +239 -0
- package/cdn/assets/{L6LjzOx1G9Idjtxa.js → D-egzesxukW7Z_e32.js} +2 -2
- package/{browser/esm/g8dDbkwbYjhKWJM22.mjs → cdn/assets/D13sLQRMMKrDHepu2.js} +2 -2
- package/{browser/esm/CsKCqLuggHhYC93k2.mjs → cdn/assets/D1bACCJy4F8kANLy2.js} +1 -1
- package/{browser/esm/MHuhAgQAA8zcnWkd.mjs → cdn/assets/D5Pa9lfPfAcCGj_N2.js} +1 -1
- package/{browser/esm/PAu9erpoOTNzgNbN.mjs → cdn/assets/D6Uwvg4vo1g0pWZa.js} +16 -11
- package/cdn/assets/{DlLXCXDokJ72EW-E.js → DI4QTfUQPCjSn0kl.js} +41 -41
- package/cdn/assets/DIlrvTRlRll76TiE2.js +496 -0
- package/cdn/assets/DJBTmv-rddT91Z-N2.js +156 -0
- package/cdn/assets/{llvXNxZaCMnYqvSm.js → DPN0a43QHMUmHgo5.js} +3 -3
- package/{browser/esm/BGAXiHOiX_PZ1ww12.mjs → cdn/assets/DTfDzhFtORWkuoRv2.js} +1 -1
- package/cdn/assets/DYCh_5thAx4qo1ns2.js +3342 -0
- package/cdn/assets/{Bjx-9lUaScF5-Hki.js → DbVSG7Uf7YDQbmc3.js} +2 -5
- package/cdn/assets/Dd80tsdITZsotoCX.js +47 -0
- package/cdn/assets/Dg26zVdGlO10MX0h2.js +159 -0
- package/{browser/esm/D4aK0uTRJQpM6392.mjs → cdn/assets/DgH-AoqKDdIWg0J8.js} +1 -1
- package/cdn/assets/{CTwLETvNO4KeXbkK.js → DjNR_ZGCbg-xia15.js} +5 -5
- package/cdn/assets/{Dr1U0I01_KIa9vgR2.js → Dlq2nAMNpWkqjt9Y.js} +16 -16
- package/cdn/assets/DmQ4uKOlhrcJfgk82.js +118 -0
- package/{browser/esm/DOIVDuyf7YyJZjcD.mjs → cdn/assets/DmRqcUu6qCPcOxgW.js} +2 -2
- package/{browser/esm/DtkqR-Hu7K4agnCs.mjs → cdn/assets/Dn8Z0WK2Hwi8MRnQ2.js} +1 -1
- package/cdn/assets/{BynqRVXFRplO7XgC.js → DoBxkE57H5PfH7Or.js} +2 -2
- package/cdn/assets/{BZkd8LNLgEd5WQXO.js → DoCYcvHzw3S0MDCW.js} +69 -4
- package/{browser/esm/DRAYZ0SGlbCLkftR2.mjs → cdn/assets/DtQu3vHaJfA5KM2H.js} +1 -1
- package/cdn/assets/{BetL7yI63lEdQ0gM2.js → DuijhgjRhgWB9sCY2.js} +504 -331
- package/cdn/assets/DvfekR32WVFv_WrS.js +394 -0
- package/cdn/assets/Dz0_oXqVesISvhbJ.js +87 -0
- package/cdn/assets/{DeFts-aGqB-RDuV1.js → I2Cn0c2NkX845WIx.js} +7 -7
- package/cdn/assets/Ifw8W-tqHjQnCWZO2.js +299 -0
- package/{browser/esm/D5BuXc-kVnr6Xiae.mjs → cdn/assets/LfHB39-nf7mi9XC7.js} +1 -1
- package/{browser/esm/BOMct7uvqiNJIS63.mjs → cdn/assets/N5PCgig3g9yqotn9.js} +2 -2
- package/cdn/assets/QNvOHujamKYSXWWA.js +32 -0
- package/cdn/assets/{DEyeWdXLwDRo2yYf2.js → QT-5i27zeGPhkyui2.js} +20 -28
- package/cdn/assets/S2_pz0y2RTJFpXkS2.js +15 -0
- package/cdn/assets/{DW2yQm-sEcHogX7E.js → UNtnFd2ssTtnrqRp.js} +1685 -1603
- package/cdn/assets/{PzCXbVRf1jOHVOAw.js → V-oO_EfTyth0iptZ.js} +1 -1
- package/cdn/assets/VEJV_bhNDNNyZAIA2.js +116 -0
- package/cdn/assets/WFkg-W8MQ-V6F1Fu.js +758 -0
- package/cdn/assets/{DJHOKENCVOJMx3aE2.js → XFQGB8ADW__0ZBoF2.js} +3 -3
- package/{browser/esm/Eszk9OugmYOhaS2s.mjs → cdn/assets/_gPnIgVx33slqynA.js} +2 -2
- package/cdn/assets/b-o8RUlQpF1RaDgI.js +675 -0
- package/cdn/assets/{BrUe0MnOhxzeOngn.js → eTXmezPFvAwM_L-D.js} +1 -1
- package/{browser/esm/BaIe3fLfPLw3FbYP2.mjs → cdn/assets/ep-IjWXOPg2b-REP2.js} +1 -1
- package/{browser/esm/Ca6NSkWoi9DvRJjQ.mjs → cdn/assets/erwt6xEgCY7lDQWp.js} +3 -3
- package/cdn/assets/f1iQWnLWVpKZ34XR2.js +91 -0
- package/cdn/assets/{B3tC7wY_kUGXf5sb.js → f9r0yTaD2YChFtEg.js} +1 -1
- package/cdn/assets/gCeoOjDjiVaX8dtF.js +119 -0
- package/cdn/assets/{CuIUyLNDoHvYMJaQ2.js → gJT4n5za0DqWXFK12.js} +75 -48
- package/{browser/esm/esX6dx06TUUL-cRt.mjs → cdn/assets/jQ5c7MGwQOZq4s5w2.js} +1 -1
- package/cdn/assets/{DJk14sSSnSHiEXZ7.js → lHpMVBxqkkCYD6d1.js} +51 -11
- package/cdn/assets/{B_U_UpQXdbjNRthb.js → nBZATD4yR1W5D4Fi.js} +1 -1
- package/{browser/esm/D2Ls6urWeByV5W-B2.mjs → cdn/assets/txVgXcuMeWVNWHnZ.js} +1 -1
- package/cdn/assets/yVLsr0rcaOFel2nS.js +32 -0
- package/cdn/index.js +2 -2
- package/package.json +3 -3
- package/browser/cjs/49_x589Na12sizKK2.cjs +0 -1
- package/browser/cjs/B4JJfKSI4ppwU8552.cjs +0 -1
- package/browser/cjs/BClFnd-voK5qaz1I.cjs +0 -88
- package/browser/cjs/BF-38Z7Z0FZOPl192.cjs +0 -1
- package/browser/cjs/BF14ZEAnaqxXroSj.cjs +0 -1
- package/browser/cjs/BFdq8CHyR6FQvmQA2.cjs +0 -1
- package/browser/cjs/BVN0uo1XwTCtE2mh.cjs +0 -7
- package/browser/cjs/BbEwESVyRYXzMlW7.cjs +0 -5
- package/browser/cjs/BjgiE9MBDkKiRL6q.cjs +0 -3
- package/browser/cjs/BnccBYHCCq9TGFx4.cjs +0 -8
- package/browser/cjs/BwLx9ix5Sq7suAYP2.cjs +0 -1
- package/browser/cjs/Byl4bQWpLnjthChn2.cjs +0 -7
- package/browser/cjs/BzsAbsb35hYT3xUc.cjs +0 -5
- package/browser/cjs/C7GpcB_YgM-RLa2P.cjs +0 -1
- package/browser/cjs/C8GZf3UAOhfisYCs.cjs +0 -1
- package/browser/cjs/C9C-pr-T_ThweQX9.cjs +0 -1
- package/browser/cjs/CEXs4eRDOv4EjbSw2.cjs +0 -1
- package/browser/cjs/CLXzYSmhCHV5LQh7.cjs +0 -1
- package/browser/cjs/CN-dCAHVcxuMSyFz.cjs +0 -1
- package/browser/cjs/CZfNBCd62H_Jpkhl.cjs +0 -12
- package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +0 -1
- package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +0 -1
- package/browser/cjs/CeF0DZ-k4DB8M47I.cjs +0 -1
- package/browser/cjs/Ck7Tc5npWk73wrF3.cjs +0 -57
- package/browser/cjs/Clu7XiAsCB48GDXN.cjs +0 -1
- package/browser/cjs/CnjaTz8HJXStwuH8.cjs +0 -1
- package/browser/cjs/CoiPEZabJyiXxLta.cjs +0 -1
- package/browser/cjs/Cty5pi0fwToP1GWe.cjs +0 -7
- package/browser/cjs/Cu0UCwSpRK4OnCuP.cjs +0 -1
- package/browser/cjs/CxWeFfNAUvhHe9F-.cjs +0 -21
- package/browser/cjs/D-o-mlG9tYSuZrvy2.cjs +0 -1
- package/browser/cjs/DAA0zpvkrMOLDPxr.cjs +0 -1
- package/browser/cjs/DAXgAEDtRrsWAePT.cjs +0 -1
- package/browser/cjs/DCIlWcGDrp-5PDoA2.cjs +0 -1
- package/browser/cjs/DDPxHIqx8aIbqTRE.cjs +0 -1
- package/browser/cjs/DMp9wql2kbZKAbGe.cjs +0 -3
- package/browser/cjs/DNCC-QNp2I7saV-I.cjs +0 -1
- package/browser/cjs/DcHxh5QxfVitzdhv.cjs +0 -1
- package/browser/cjs/DgGGzl7jq3i7Cqfi.cjs +0 -1
- package/browser/cjs/Dkgu60euhL6wPoYa2.cjs +0 -1
- package/browser/cjs/DsFZgtSQpC75d1M02.cjs +0 -1
- package/browser/cjs/DsgqbxMOVQmAFSDy2.cjs +0 -1
- package/browser/cjs/Dtc_8P-koQRmNT2s.cjs +0 -33
- package/browser/cjs/FUM_3mQlC-6WPjkT.cjs +0 -4
- package/browser/cjs/IbciPMJP2Pam3ERm.cjs +0 -1
- package/browser/cjs/Kvn916ebqGc4t6hv2.cjs +0 -1
- package/browser/cjs/NzAMMcPT7SETmqPg.cjs +0 -2
- package/browser/cjs/QK9BfdSZPLmyRpGi2.cjs +0 -1
- package/browser/cjs/Y78-VwYSNffwXRVz2.cjs +0 -2
- package/browser/cjs/bpcQTcfzGVBK-rfT2.cjs +0 -1
- package/browser/cjs/fqTQ_p3ehzUvc1tF2.cjs +0 -1
- package/browser/cjs/h3dw1jAp2J5Pu4p32.cjs +0 -1
- package/browser/cjs/iyvcAhhnDFxkR8tW.cjs +0 -1
- package/browser/cjs/jev6VGWTdgEgm4Yk2.cjs +0 -1
- package/browser/cjs/kqP-W5qRIy-d-ChZ.cjs +0 -1
- package/browser/cjs/mXzhcays1ok40iiU.cjs +0 -1
- package/browser/cjs/ppSJKdLn646BZOzg.cjs +0 -1
- package/browser/cjs/sFD2bsTPq558FCMx.cjs +0 -126
- package/browser/cjs/stXrcKZOIHl0fq5U2.cjs +0 -2
- package/browser/esm/B-dSKzg5shPDd733.mjs +0 -25
- package/browser/esm/B6bX01HNxwBooBTX2.mjs +0 -514
- package/browser/esm/BPwpFe7c1-F62aAU.mjs +0 -518
- package/browser/esm/BT2mYkpZGrhWovkv2.mjs +0 -238
- package/browser/esm/BUKNpzG26V0YaAzW.mjs +0 -219
- package/browser/esm/BgNWvKfVoVgVVDB4.mjs +0 -134
- package/browser/esm/Bj3gyDL2ZJUDcxt72.mjs +0 -82
- package/browser/esm/BkBT2LB95lonIiBu.mjs +0 -152
- package/browser/esm/BqMvXD8dX4ksYjnj.mjs +0 -53
- package/browser/esm/CElACTFuqPAnCAMJ.mjs +0 -99
- package/browser/esm/CFtsbobCiLpZIzCh.mjs +0 -34
- package/browser/esm/CbJ_xQftC08KrH3E2.mjs +0 -20
- package/browser/esm/CfjG7gHJ4oN60Clj.mjs +0 -4423
- package/browser/esm/CpEgh9EOkeMvwAuj.mjs +0 -304
- package/browser/esm/CxKAnYBWCYMkUpnr.mjs +0 -824
- package/browser/esm/Cye91DfKIFwRdDpF.mjs +0 -224
- package/browser/esm/DFQGftDcmDwUGxV8.mjs +0 -27
- package/browser/esm/DdaO25i-WWFSh1W0.mjs +0 -3188
- package/browser/esm/DhW7Cqyuxk7D6zsW.mjs +0 -509
- package/browser/esm/DhgwMDb052opCiAA.mjs +0 -11273
- package/browser/esm/DimkHq0_x-d4uNdV.mjs +0 -50758
- package/browser/esm/DnCkPg9-xb3RvxD-.mjs +0 -44
- package/browser/esm/DygUxASTETZM60uN2.mjs +0 -47
- package/browser/esm/FAHIw2t7_M_rvRio.mjs +0 -149
- package/browser/esm/HFqcMD9nTL0jdLxT.mjs +0 -15
- package/browser/esm/N-koparnupMSl92y.mjs +0 -2687
- package/browser/esm/evPbHV86yom22yGf2.mjs +0 -16301
- package/browser/esm/ohVj-y1gCC9PEHJI.mjs +0 -87
- package/cdn/assets/B-dSKzg5shPDd733.js +0 -25
- package/cdn/assets/B3ZyfwskutLZMYfl2.js +0 -44
- package/cdn/assets/B6Y_HasaiihQLVYz2.js +0 -3188
- package/cdn/assets/B8ok93z6wOu1Mo5H.js +0 -27
- package/cdn/assets/BdmCBWTVHb7KuHxO2.js +0 -2687
- package/cdn/assets/BjN8kU7URKZwGlmk2.js +0 -4423
- package/cdn/assets/BouCHi6QnBrUDYkx.js +0 -16301
- package/cdn/assets/CLhSKL0Xdm8miSTy.js +0 -34
- package/cdn/assets/CSkSOhGT8E29E2Nh2.js +0 -99
- package/cdn/assets/CXrcgTVB77CopjOJ.js +0 -518
- package/cdn/assets/Cb71rZAQvCk3wnfp.js +0 -220
- package/cdn/assets/CbJ_xQftC08KrH3E.js +0 -20
- package/cdn/assets/CblzazoiTtSuaAkj.js +0 -225
- package/cdn/assets/CdPxVRKpCOqCDHI8.js +0 -824
- package/cdn/assets/CimYGZTVXcjbjrBU2.js +0 -83
- package/cdn/assets/CpEgh9EOkeMvwAuj.js +0 -304
- package/cdn/assets/D57KcDfTbBzf_NGr.js +0 -150
- package/cdn/assets/Dhq9e6LCpmlIkFod.js +0 -220
- package/cdn/assets/DjS4iUli-T3uuUfK.js +0 -24
- package/cdn/assets/DjS4iUli-T3uuUfK2.js +0 -24
- package/cdn/assets/DoJfPxuL3zziG4p62.js +0 -134
- package/cdn/assets/Dq7WxMef5CTJ47QI2.js +0 -48
- package/cdn/assets/HFqcMD9nTL0jdLxT2.js +0 -15
- package/cdn/assets/HeznPoDlSj26Q4lq.js +0 -11274
- package/cdn/assets/JL1xk8XqkuTOA_as2.js +0 -239
- package/cdn/assets/NZO3-fDBtqhmCsbB2.js +0 -50758
- package/cdn/assets/Wsgx1I_j1chJ6hwn.js +0 -152
- package/cdn/assets/XSUr59k0gaFIS1Qf2.js +0 -53
- package/cdn/assets/omgRvCRxe7suvog8.js +0 -510
- package/cdn/assets/zrS_ERBQML_OXJ4J.js +0 -87
- /package/browser/cjs/{1XrWGMP3GmsQOMIX.cjs → 1XrWGMP3GmsQOMIX2.cjs} +0 -0
- /package/browser/cjs/{507hQYooKKjnRzsZ2.cjs → 507hQYooKKjnRzsZ.cjs} +0 -0
- /package/browser/cjs/{BAxVLKkxFgI6cXnR2.cjs → BAxVLKkxFgI6cXnR.cjs} +0 -0
- /package/browser/cjs/{BWDfauDHqB6U_2ka2.cjs → BWDfauDHqB6U_2ka.cjs} +0 -0
- /package/browser/cjs/{Btc0Nzu40VYOpzLX2.cjs → Btc0Nzu40VYOpzLX.cjs} +0 -0
- /package/browser/cjs/{C2uDl8VIJqh58YF_2.cjs → C2uDl8VIJqh58YF_.cjs} +0 -0
- /package/browser/cjs/{CW-b31_-r-_raT8Y.cjs → CW-b31_-r-_raT8Y2.cjs} +0 -0
- /package/browser/cjs/{CXlzsh_WHCOsErJ12.cjs → CXlzsh_WHCOsErJ1.cjs} +0 -0
- /package/browser/cjs/{DM7-R_ltoLbA9jde2.cjs → DM7-R_ltoLbA9jde.cjs} +0 -0
- /package/browser/cjs/{DNKyaSruDogoBd2H.cjs → DNKyaSruDogoBd2H2.cjs} +0 -0
- /package/browser/cjs/{Dx79LP1-YCQg8B87.cjs → Dx79LP1-YCQg8B872.cjs} +0 -0
- /package/browser/cjs/{CbLXP9WY38wTcGn5.cjs → NcNz8RfT5V889CMT2.cjs} +0 -0
- /package/browser/cjs/{aONv0Ys3C8xmnaR8.cjs → aONv0Ys3C8xmnaR82.cjs} +0 -0
- /package/browser/cjs/{z_rZE1OHFPpdGBh42.cjs → z_rZE1OHFPpdGBh4.cjs} +0 -0
|
@@ -0,0 +1,3324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.8.0-beta.2
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { K as e, R as t, f as n, t as r, y as i } from "./DuijhgjRhgWB9sCY2.js";
|
|
8
|
+
import { t as a } from "./C6X4CmElTpPxrad62.js";
|
|
9
|
+
import { i as o, l as s } from "./B50P0gSziuG68Umu2.js";
|
|
10
|
+
import { Gt as c, It as l, it as u, j as d, nt as f, ot as p } from "./BsHFBjNwTzc_CKLq2.js";
|
|
11
|
+
import { g as m } from "./DYCh_5thAx4qo1ns2.js";
|
|
12
|
+
import { A as h, C as g, E as _, F as v, H as y, I as b, L as ee, M as x, N as te, O as ne, P as re, Q as ie, R as ae, T as oe, V as se, W as ce, Z as le, _ as ue, c as de, et as S, it as C, k as w, l as fe, m as pe, n as me, nt as he, o as T, ot as E, p as D, q as O, st as k, u as A, x as j } from "./B9oLwnLz9m-TWSPJ2.js";
|
|
13
|
+
import { a as ge, c as _e, d as M, h as ve, i as ye, l as be, n as xe, p as Se, s as Ce, t as we, u as Te } from "./Dg26zVdGlO10MX0h2.js";
|
|
14
|
+
var Ee = /* @__PURE__ */ new Uint8Array(), N = class e {
|
|
15
|
+
constructor(e, t, n) {
|
|
16
|
+
this.buffers = /* @__PURE__ */ new Map(), this.zip = e, this.entries = t, this.rawBuffer = n;
|
|
17
|
+
}
|
|
18
|
+
static normalize(e) {
|
|
19
|
+
return e.startsWith("/") ? e.slice(1) : e;
|
|
20
|
+
}
|
|
21
|
+
static async create(t) {
|
|
22
|
+
let n = t instanceof Blob ? Ee : t instanceof Uint8Array ? t : new Uint8Array(t), r = new T(t instanceof Blob ? new _(t) : new w(n)), i = /* @__PURE__ */ new Map();
|
|
23
|
+
for (let e of await r.getEntries()) e.directory || i.set(e.filename, e);
|
|
24
|
+
return new e(r, i, n);
|
|
25
|
+
}
|
|
26
|
+
getNames() {
|
|
27
|
+
return [...this.entries.keys()];
|
|
28
|
+
}
|
|
29
|
+
has(t) {
|
|
30
|
+
return this.entries.has(e.normalize(t));
|
|
31
|
+
}
|
|
32
|
+
uncompressedSize(t) {
|
|
33
|
+
return this.entries.get(e.normalize(t))?.uncompressedSize ?? 0;
|
|
34
|
+
}
|
|
35
|
+
async getBuffer(t) {
|
|
36
|
+
let n = e.normalize(t), r = this.buffers.get(n);
|
|
37
|
+
if (r) return r;
|
|
38
|
+
let i = this.entries.get(n);
|
|
39
|
+
if (!i) return null;
|
|
40
|
+
let a = await i.getData(new x());
|
|
41
|
+
return this.buffers.set(n, a), a;
|
|
42
|
+
}
|
|
43
|
+
async prefetch(e) {
|
|
44
|
+
let t = [];
|
|
45
|
+
for (let [n, r] of this.entries) !this.buffers.has(n) && e(n, r) && t.push(r.getData(new x()).then((e) => {
|
|
46
|
+
this.buffers.set(n, e);
|
|
47
|
+
}));
|
|
48
|
+
await Promise.all(t);
|
|
49
|
+
}
|
|
50
|
+
getEntry(t) {
|
|
51
|
+
return this.buffers.get(e.normalize(t)) ?? null;
|
|
52
|
+
}
|
|
53
|
+
async getTextStream(t, n) {
|
|
54
|
+
let r = this.entries.get(e.normalize(t));
|
|
55
|
+
if (!r) return null;
|
|
56
|
+
let i = new TransformStream();
|
|
57
|
+
r.getData(i.writable).catch(() => {});
|
|
58
|
+
let a = i.readable.getReader(), o = new TextDecoder("utf-8");
|
|
59
|
+
return new ReadableStream({ async pull(e) {
|
|
60
|
+
let { value: t, done: r } = await a.read();
|
|
61
|
+
if (r) {
|
|
62
|
+
let t = o.decode();
|
|
63
|
+
t && e.enqueue(t), e.close();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
n?.(t.byteLength);
|
|
67
|
+
let i = o.decode(t, { stream: !0 });
|
|
68
|
+
i && e.enqueue(i);
|
|
69
|
+
} }).getReader();
|
|
70
|
+
}
|
|
71
|
+
getRawEntry(t) {
|
|
72
|
+
let n = this.entries.get(e.normalize(t));
|
|
73
|
+
if (!n || n.encrypted) return null;
|
|
74
|
+
let r = n.offset;
|
|
75
|
+
if (r + 30 > this.rawBuffer.byteLength) return null;
|
|
76
|
+
let i = new DataView(this.rawBuffer.buffer, this.rawBuffer.byteOffset + r, 30);
|
|
77
|
+
if (i.getUint32(0, !0) !== 67324752) return null;
|
|
78
|
+
let a = r + 30 + i.getUint16(26, !0) + i.getUint16(28, !0), o = a + n.compressedSize;
|
|
79
|
+
return o > this.rawBuffer.byteLength ? null : {
|
|
80
|
+
data: this.rawBuffer.subarray(a, o),
|
|
81
|
+
compressionMethod: n.compressionMethod,
|
|
82
|
+
signature: n.signature
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
async close() {
|
|
86
|
+
await this.zip.close();
|
|
87
|
+
}
|
|
88
|
+
}, De = class {
|
|
89
|
+
constructor(e) {
|
|
90
|
+
this._sink = e, this._samples = [], this._t0 = P(), this._tPrev = this._t0, this._heapPrev = Oe();
|
|
91
|
+
}
|
|
92
|
+
mark(e) {
|
|
93
|
+
let t = P(), n = Oe(), r = {
|
|
94
|
+
label: e,
|
|
95
|
+
tMs: t - this._t0,
|
|
96
|
+
dtMs: t - this._tPrev,
|
|
97
|
+
heapBytes: n,
|
|
98
|
+
dHeapBytes: n !== void 0 && this._heapPrev !== void 0 ? n - this._heapPrev : void 0,
|
|
99
|
+
rssBytes: ke()
|
|
100
|
+
};
|
|
101
|
+
this._tPrev = t, this._heapPrev = n, this._samples.push(r), this._sink?.(r);
|
|
102
|
+
}
|
|
103
|
+
samples() {
|
|
104
|
+
return this._samples;
|
|
105
|
+
}
|
|
106
|
+
toTable() {
|
|
107
|
+
return this._samples.map((e) => ({
|
|
108
|
+
phase: e.label,
|
|
109
|
+
tMs: Math.round(e.tMs),
|
|
110
|
+
dtMs: Math.round(e.dtMs),
|
|
111
|
+
heapMB: e.heapBytes === void 0 ? "—" : F(e.heapBytes / 1048576),
|
|
112
|
+
dHeapMB: e.dHeapBytes === void 0 ? "—" : F(e.dHeapBytes / 1048576),
|
|
113
|
+
rssMB: e.rssBytes === void 0 ? "—" : F(e.rssBytes / 1048576)
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
}, P = typeof performance == "object" && typeof performance.now == "function" ? () => performance.now() : () => Date.now();
|
|
117
|
+
function Oe() {
|
|
118
|
+
let e = typeof performance == "object" ? performance.memory : void 0;
|
|
119
|
+
if (e && typeof e.usedJSHeapSize == "number") return e.usedJSHeapSize;
|
|
120
|
+
let t = globalThis.process;
|
|
121
|
+
return typeof t == "object" && typeof t.memoryUsage == "function" ? t.memoryUsage().heapUsed : void 0;
|
|
122
|
+
}
|
|
123
|
+
function ke() {
|
|
124
|
+
let e = globalThis.process;
|
|
125
|
+
if (typeof e == "object" && typeof e.memoryUsage == "function") return e.memoryUsage().rss;
|
|
126
|
+
}
|
|
127
|
+
function F(e) {
|
|
128
|
+
return Math.round(10 * e) / 10;
|
|
129
|
+
}
|
|
130
|
+
var I = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", L = `-${I}.0-9·̀-ͯ‿-⁀`, Ae = (RegExp(`^[${I}]$`, "u"), RegExp(`^[${L}]$`, "u"), RegExp(`^[${I}][${L}]*$`, "u")), R = (RegExp(`^[${L}]+$`, "u"), [
|
|
131
|
+
32,
|
|
132
|
+
10,
|
|
133
|
+
13,
|
|
134
|
+
9
|
|
135
|
+
]);
|
|
136
|
+
function je(e) {
|
|
137
|
+
return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e === 58 || e === 95 || e === 8204 || e === 8205 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
138
|
+
}
|
|
139
|
+
var z = ":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", B = `-${z}.0-9·̀-ͯ‿-⁀`;
|
|
140
|
+
RegExp(`^[${z}]$`, "u"), RegExp(`^[${B}]$`, "u"), RegExp(`^[${z}][${B}]*$`, "u"), RegExp(`^[${B}]+$`, "u");
|
|
141
|
+
var Me = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ne = `-${Me}.0-9·̀-ͯ‿-⁀`, V = (RegExp(`^[${Me}]$`, "u"), RegExp(`^[${Ne}]$`, "u"), RegExp(`^[${Me}][${Ne}]*$`, "u"));
|
|
142
|
+
function Pe(e) {
|
|
143
|
+
return e >= 65 && e <= 90 || e === 95 || e >= 97 && e <= 122 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 767 || e >= 880 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
144
|
+
}
|
|
145
|
+
var H, U = function(e) {
|
|
146
|
+
return e === 32 || e === 10 || e === 13 || e === 9;
|
|
147
|
+
}, Fe = function(e) {
|
|
148
|
+
return e >= 32 && e <= 55295 || e === 10 || e === 13 || e === 9 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
149
|
+
}, Ie = je, Le = function(e) {
|
|
150
|
+
return je(e) || e >= 48 && e <= 57 || e === 45 || e === 46 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
151
|
+
}, Re = R, ze = Ae, Be = function(e) {
|
|
152
|
+
return e >= 1 && e <= 55295 || e >= 57344 && e <= 65533 || e >= 65536 && e <= 1114111;
|
|
153
|
+
}, Ve = Pe, He = function(e) {
|
|
154
|
+
return Pe(e) || e === 45 || e === 46 || e >= 48 && e <= 57 || e === 183 || e >= 768 && e <= 879 || e >= 8255 && e <= 8256;
|
|
155
|
+
}, Ue = V, W = "http://www.w3.org/XML/1998/namespace", We = "http://www.w3.org/2000/xmlns/", Ge = {
|
|
156
|
+
__proto__: null,
|
|
157
|
+
xml: W,
|
|
158
|
+
xmlns: We
|
|
159
|
+
}, Ke = {
|
|
160
|
+
__proto__: null,
|
|
161
|
+
amp: "&",
|
|
162
|
+
gt: ">",
|
|
163
|
+
lt: "<",
|
|
164
|
+
quot: "\"",
|
|
165
|
+
apos: "'"
|
|
166
|
+
}, G = -1, K = -2, q = 13, qe = 33, Je = 10, Ye = 60, Xe = 61, J = 62, Y = 63, Ze = 93, Qe = (e) => e === 34 || e === 39, $e = [34, 39], et = [
|
|
167
|
+
...$e,
|
|
168
|
+
91,
|
|
169
|
+
J
|
|
170
|
+
], tt = [
|
|
171
|
+
...$e,
|
|
172
|
+
Ye,
|
|
173
|
+
Ze
|
|
174
|
+
], nt = [
|
|
175
|
+
Xe,
|
|
176
|
+
Y,
|
|
177
|
+
...Re
|
|
178
|
+
], rt = [
|
|
179
|
+
...Re,
|
|
180
|
+
J,
|
|
181
|
+
38,
|
|
182
|
+
Ye
|
|
183
|
+
];
|
|
184
|
+
function it(e, t, n) {
|
|
185
|
+
switch (t) {
|
|
186
|
+
case "xml":
|
|
187
|
+
n !== W && e.fail(`xml prefix must be bound to ${W}.`);
|
|
188
|
+
break;
|
|
189
|
+
case "xmlns": n !== We && e.fail(`xmlns prefix must be bound to ${We}.`);
|
|
190
|
+
}
|
|
191
|
+
switch (n) {
|
|
192
|
+
case We:
|
|
193
|
+
e.fail(t === "" ? `the default namespace may not be set to ${n}.` : `may not assign a prefix (even "xmlns") to the URI ${We}.`);
|
|
194
|
+
break;
|
|
195
|
+
case W: switch (t) {
|
|
196
|
+
case "xml": break;
|
|
197
|
+
case "":
|
|
198
|
+
e.fail(`the default namespace may not be set to ${n}.`);
|
|
199
|
+
break;
|
|
200
|
+
default: e.fail("may not assign the xml namespace to another prefix.");
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
var at, ot = (e) => Ue.test(e), st = (e) => ze.test(e), ct = {
|
|
205
|
+
xmldecl: "xmlDeclHandler",
|
|
206
|
+
text: "textHandler",
|
|
207
|
+
processinginstruction: "piHandler",
|
|
208
|
+
doctype: "doctypeHandler",
|
|
209
|
+
comment: "commentHandler",
|
|
210
|
+
opentagstart: "openTagStartHandler",
|
|
211
|
+
attribute: "attributeHandler",
|
|
212
|
+
opentag: "openTagHandler",
|
|
213
|
+
closetag: "closeTagHandler",
|
|
214
|
+
cdata: "cdataHandler",
|
|
215
|
+
error: "errorHandler",
|
|
216
|
+
end: "endHandler",
|
|
217
|
+
ready: "readyHandler"
|
|
218
|
+
}, lt = class {
|
|
219
|
+
get closed() {
|
|
220
|
+
return this._closed;
|
|
221
|
+
}
|
|
222
|
+
constructor(e) {
|
|
223
|
+
this.i = 0, this.prevI = 0, this.opt = e ?? {}, this.fragmentOpt = !!this.opt.fragment;
|
|
224
|
+
let t = this.xmlnsOpt = !!this.opt.xmlns;
|
|
225
|
+
if (this.trackPosition = !1 !== this.opt.position, this.fileName = this.opt.fileName, t) {
|
|
226
|
+
this.nameStartCheck = Ve, this.nameCheck = He, this.isName = ot, this.processAttribs = this.processAttribsNS, this.pushAttrib = this.pushAttribNS, this.ns = {
|
|
227
|
+
__proto__: null,
|
|
228
|
+
...Ge
|
|
229
|
+
};
|
|
230
|
+
let e = this.opt.additionalNamespaces;
|
|
231
|
+
e != null && (function(e, t) {
|
|
232
|
+
for (let n of Object.keys(t)) it(e, n, t[n]);
|
|
233
|
+
}(this, e), Object.assign(this.ns, e));
|
|
234
|
+
} else this.nameStartCheck = Ie, this.nameCheck = Le, this.isName = st, this.processAttribs = this.processAttribsPlain, this.pushAttrib = this.pushAttribPlain;
|
|
235
|
+
this.stateTable = [
|
|
236
|
+
this.sBegin,
|
|
237
|
+
this.sBeginWhitespace,
|
|
238
|
+
this.sDoctype,
|
|
239
|
+
this.sDoctypeQuote,
|
|
240
|
+
this.sDTD,
|
|
241
|
+
this.sDTDQuoted,
|
|
242
|
+
this.sDTDOpenWaka,
|
|
243
|
+
this.sDTDOpenWakaBang,
|
|
244
|
+
this.sDTDComment,
|
|
245
|
+
this.sDTDCommentEnding,
|
|
246
|
+
this.sDTDCommentEnded,
|
|
247
|
+
this.sDTDPI,
|
|
248
|
+
this.sDTDPIEnding,
|
|
249
|
+
this.sText,
|
|
250
|
+
this.sEntity,
|
|
251
|
+
this.sOpenWaka,
|
|
252
|
+
this.sOpenWakaBang,
|
|
253
|
+
this.sComment,
|
|
254
|
+
this.sCommentEnding,
|
|
255
|
+
this.sCommentEnded,
|
|
256
|
+
this.sCData,
|
|
257
|
+
this.sCDataEnding,
|
|
258
|
+
this.sCDataEnding2,
|
|
259
|
+
this.sPIFirstChar,
|
|
260
|
+
this.sPIRest,
|
|
261
|
+
this.sPIBody,
|
|
262
|
+
this.sPIEnding,
|
|
263
|
+
this.sXMLDeclNameStart,
|
|
264
|
+
this.sXMLDeclName,
|
|
265
|
+
this.sXMLDeclEq,
|
|
266
|
+
this.sXMLDeclValueStart,
|
|
267
|
+
this.sXMLDeclValue,
|
|
268
|
+
this.sXMLDeclSeparator,
|
|
269
|
+
this.sXMLDeclEnding,
|
|
270
|
+
this.sOpenTag,
|
|
271
|
+
this.sOpenTagSlash,
|
|
272
|
+
this.sAttrib,
|
|
273
|
+
this.sAttribName,
|
|
274
|
+
this.sAttribNameSawWhite,
|
|
275
|
+
this.sAttribValue,
|
|
276
|
+
this.sAttribValueQuoted,
|
|
277
|
+
this.sAttribValueClosed,
|
|
278
|
+
this.sAttribValueUnquoted,
|
|
279
|
+
this.sCloseTag,
|
|
280
|
+
this.sCloseTagSawWhite
|
|
281
|
+
], this._init();
|
|
282
|
+
}
|
|
283
|
+
_init() {
|
|
284
|
+
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 = [];
|
|
285
|
+
let { fragmentOpt: e } = this;
|
|
286
|
+
this.state = e ? q : 0, this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = e, this.xmlDeclPossible = !e, this.xmlDeclExpects = ["version"], this.entityReturnState = void 0;
|
|
287
|
+
let { defaultXMLVersion: t } = this.opt;
|
|
288
|
+
if (t === void 0) {
|
|
289
|
+
if (!0 === this.opt.forceXMLVersion) throw Error("forceXMLVersion set but defaultXMLVersion is not set");
|
|
290
|
+
t = "1.0";
|
|
291
|
+
}
|
|
292
|
+
this.setXMLVersion(t), this.positionAtNewLine = 0, this.doctype = !1, this._closed = !1, this.xmlDecl = {
|
|
293
|
+
version: void 0,
|
|
294
|
+
encoding: void 0,
|
|
295
|
+
standalone: void 0
|
|
296
|
+
}, this.line = 1, this.column = 0, this.ENTITIES = Object.create(Ke), this.readyHandler?.();
|
|
297
|
+
}
|
|
298
|
+
get position() {
|
|
299
|
+
return this.chunkPosition + this.i;
|
|
300
|
+
}
|
|
301
|
+
get columnIndex() {
|
|
302
|
+
return this.position - this.positionAtNewLine;
|
|
303
|
+
}
|
|
304
|
+
on(e, t) {
|
|
305
|
+
this[ct[e]] = t;
|
|
306
|
+
}
|
|
307
|
+
off(e) {
|
|
308
|
+
this[ct[e]] = void 0;
|
|
309
|
+
}
|
|
310
|
+
makeError(e) {
|
|
311
|
+
let t = this.fileName ?? "";
|
|
312
|
+
return this.trackPosition && (t.length > 0 && (t += ":"), t += `${this.line}:${this.column}`), t.length > 0 && (t += ": "), Error(t + e);
|
|
313
|
+
}
|
|
314
|
+
fail(e) {
|
|
315
|
+
let t = this.makeError(e), n = this.errorHandler;
|
|
316
|
+
if (n === void 0) throw t;
|
|
317
|
+
return n(t), this;
|
|
318
|
+
}
|
|
319
|
+
write(e) {
|
|
320
|
+
if (this.closed) return this.fail("cannot write after close.");
|
|
321
|
+
let t = !1;
|
|
322
|
+
e === null ? (t = !0, e = "") : typeof e == "object" && (e = e.toString()), this.carriedFromPrevious !== void 0 && (e = `${this.carriedFromPrevious}${e}`, this.carriedFromPrevious = void 0);
|
|
323
|
+
let n = e.length, r = e.charCodeAt(n - 1);
|
|
324
|
+
!t && (r === 13 || r >= 55296 && r <= 56319) && (this.carriedFromPrevious = e[n - 1], n--, e = e.slice(0, n));
|
|
325
|
+
let { stateTable: i } = this;
|
|
326
|
+
for (this.chunk = e, this.i = 0; this.i < n;) i[this.state].call(this);
|
|
327
|
+
return this.chunkPosition += n, t ? this.end() : this;
|
|
328
|
+
}
|
|
329
|
+
close() {
|
|
330
|
+
return this.write(null);
|
|
331
|
+
}
|
|
332
|
+
getCode10() {
|
|
333
|
+
let e = this.chunk, t = this.i;
|
|
334
|
+
if (this.prevI = t, this.i++, t >= e.length) return G;
|
|
335
|
+
let n = e.charCodeAt(t);
|
|
336
|
+
if (this.column++, n < 55296) {
|
|
337
|
+
if (n >= 32 || n === 9) return n;
|
|
338
|
+
switch (n) {
|
|
339
|
+
case Je: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Je;
|
|
340
|
+
case 13: return e.charCodeAt(t + 1) === Je && (this.i = t + 2), this.line++, this.column = 0, this.positionAtNewLine = this.position, K;
|
|
341
|
+
default: return this.fail("disallowed character."), n;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (n > 56319) return n >= 57344 && n <= 65533 || this.fail("disallowed character."), n;
|
|
345
|
+
let r = 65536 + 1024 * (n - 55296) + (e.charCodeAt(t + 1) - 56320);
|
|
346
|
+
return this.i = t + 2, r > 1114111 && this.fail("disallowed character."), r;
|
|
347
|
+
}
|
|
348
|
+
getCode11() {
|
|
349
|
+
let { chunk: e, i: t } = this;
|
|
350
|
+
if (this.prevI = t, this.i = t + 1, t >= e.length) return G;
|
|
351
|
+
let n = e.charCodeAt(t);
|
|
352
|
+
if (this.column++, n < 55296) {
|
|
353
|
+
if (n > 31 && n < 127 || n > 159 && n !== 8232 || n === 9) return n;
|
|
354
|
+
switch (n) {
|
|
355
|
+
case Je: return this.line++, this.column = 0, this.positionAtNewLine = this.position, Je;
|
|
356
|
+
case 13: {
|
|
357
|
+
let n = e.charCodeAt(t + 1);
|
|
358
|
+
n !== Je && n !== 133 || (this.i = t + 2);
|
|
359
|
+
}
|
|
360
|
+
case 133:
|
|
361
|
+
case 8232: return this.line++, this.column = 0, this.positionAtNewLine = this.position, K;
|
|
362
|
+
default: return this.fail("disallowed character."), n;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (n > 56319) return n >= 57344 && n <= 65533 || this.fail("disallowed character."), n;
|
|
366
|
+
let r = 65536 + 1024 * (n - 55296) + (e.charCodeAt(t + 1) - 56320);
|
|
367
|
+
return this.i = t + 2, r > 1114111 && this.fail("disallowed character."), r;
|
|
368
|
+
}
|
|
369
|
+
getCodeNorm() {
|
|
370
|
+
let e = this.getCode();
|
|
371
|
+
return e === K ? Je : e;
|
|
372
|
+
}
|
|
373
|
+
unGet() {
|
|
374
|
+
this.i = this.prevI, this.column--;
|
|
375
|
+
}
|
|
376
|
+
captureTo(e) {
|
|
377
|
+
let { i: t } = this, { chunk: n } = this;
|
|
378
|
+
for (;;) {
|
|
379
|
+
let r = this.getCode(), i = r === K, a = i ? Je : r;
|
|
380
|
+
if (a === G || e.includes(a)) return this.text += n.slice(t, this.prevI), a;
|
|
381
|
+
i && (this.text += `${n.slice(t, this.prevI)}\n`, t = this.i);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
captureToChar(e) {
|
|
385
|
+
let { i: t } = this, { chunk: n } = this;
|
|
386
|
+
for (;;) {
|
|
387
|
+
let r = this.getCode();
|
|
388
|
+
switch (r) {
|
|
389
|
+
case K:
|
|
390
|
+
this.text += `${n.slice(t, this.prevI)}\n`, t = this.i, r = Je;
|
|
391
|
+
break;
|
|
392
|
+
case G: return this.text += n.slice(t), !1;
|
|
393
|
+
}
|
|
394
|
+
if (r === e) return this.text += n.slice(t, this.prevI), !0;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
captureNameChars() {
|
|
398
|
+
let { chunk: e, i: t } = this;
|
|
399
|
+
for (;;) {
|
|
400
|
+
let n = this.getCode();
|
|
401
|
+
if (n === G) return this.name += e.slice(t), G;
|
|
402
|
+
if (!Le(n)) return this.name += e.slice(t, this.prevI), n === K ? Je : n;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
skipSpaces() {
|
|
406
|
+
for (;;) {
|
|
407
|
+
let e = this.getCodeNorm();
|
|
408
|
+
if (e === G || !U(e)) return e;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
setXMLVersion(e) {
|
|
412
|
+
this.currentXMLVersion = e, e === "1.0" ? (this.isChar = Fe, this.getCode = this.getCode10) : (this.isChar = Be, this.getCode = this.getCode11);
|
|
413
|
+
}
|
|
414
|
+
sBegin() {
|
|
415
|
+
this.chunk.charCodeAt(0) === 65279 && (this.i++, this.column++), this.state = 1;
|
|
416
|
+
}
|
|
417
|
+
sBeginWhitespace() {
|
|
418
|
+
let e = this.i, t = this.skipSpaces();
|
|
419
|
+
switch (this.prevI !== e && (this.xmlDeclPossible = !1), t) {
|
|
420
|
+
case Ye:
|
|
421
|
+
if (this.state = 15, this.text.length !== 0) throw Error("no-empty text at start");
|
|
422
|
+
break;
|
|
423
|
+
case G: break;
|
|
424
|
+
default: this.unGet(), this.state = q, this.xmlDeclPossible = !1;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
sDoctype() {
|
|
428
|
+
let e = this.captureTo(et);
|
|
429
|
+
switch (e) {
|
|
430
|
+
case J:
|
|
431
|
+
this.doctypeHandler?.(this.text), this.text = "", this.state = q, this.doctype = !0;
|
|
432
|
+
break;
|
|
433
|
+
case G: break;
|
|
434
|
+
default: this.text += String.fromCodePoint(e), e === 91 ? this.state = 4 : Qe(e) && (this.state = 3, this.q = e);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
sDoctypeQuote() {
|
|
438
|
+
let e = this.q;
|
|
439
|
+
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.q = null, this.state = 2);
|
|
440
|
+
}
|
|
441
|
+
sDTD() {
|
|
442
|
+
let e = this.captureTo(tt);
|
|
443
|
+
e !== G && (this.text += String.fromCodePoint(e), e === Ze ? this.state = 2 : e === Ye ? this.state = 6 : Qe(e) && (this.state = 5, this.q = e));
|
|
444
|
+
}
|
|
445
|
+
sDTDQuoted() {
|
|
446
|
+
let e = this.q;
|
|
447
|
+
this.captureToChar(e) && (this.text += String.fromCodePoint(e), this.state = 4, this.q = null);
|
|
448
|
+
}
|
|
449
|
+
sDTDOpenWaka() {
|
|
450
|
+
let e = this.getCodeNorm();
|
|
451
|
+
switch (this.text += String.fromCodePoint(e), e) {
|
|
452
|
+
case 33:
|
|
453
|
+
this.state = 7, this.openWakaBang = "";
|
|
454
|
+
break;
|
|
455
|
+
case Y:
|
|
456
|
+
this.state = 11;
|
|
457
|
+
break;
|
|
458
|
+
default: this.state = 4;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
sDTDOpenWakaBang() {
|
|
462
|
+
let e = String.fromCodePoint(this.getCodeNorm()), t = this.openWakaBang += e;
|
|
463
|
+
this.text += e, t !== "-" && (this.state = t === "--" ? 8 : 4, this.openWakaBang = "");
|
|
464
|
+
}
|
|
465
|
+
sDTDComment() {
|
|
466
|
+
this.captureToChar(45) && (this.text += "-", this.state = 9);
|
|
467
|
+
}
|
|
468
|
+
sDTDCommentEnding() {
|
|
469
|
+
let e = this.getCodeNorm();
|
|
470
|
+
this.text += String.fromCodePoint(e), this.state = e === 45 ? 10 : 8;
|
|
471
|
+
}
|
|
472
|
+
sDTDCommentEnded() {
|
|
473
|
+
let e = this.getCodeNorm();
|
|
474
|
+
this.text += String.fromCodePoint(e), e === J ? this.state = 4 : (this.fail("malformed comment."), this.state = 8);
|
|
475
|
+
}
|
|
476
|
+
sDTDPI() {
|
|
477
|
+
this.captureToChar(Y) && (this.text += "?", this.state = 12);
|
|
478
|
+
}
|
|
479
|
+
sDTDPIEnding() {
|
|
480
|
+
let e = this.getCodeNorm();
|
|
481
|
+
this.text += String.fromCodePoint(e), e === J && (this.state = 4);
|
|
482
|
+
}
|
|
483
|
+
sText() {
|
|
484
|
+
this.tags.length === 0 ? this.handleTextOutsideRoot() : this.handleTextInRoot();
|
|
485
|
+
}
|
|
486
|
+
sEntity() {
|
|
487
|
+
let { i: e } = this, { chunk: t } = this;
|
|
488
|
+
t: for (;;) switch (this.getCode()) {
|
|
489
|
+
case K:
|
|
490
|
+
this.entity += `${t.slice(e, this.prevI)}\n`, e = this.i;
|
|
491
|
+
break;
|
|
492
|
+
case 59: {
|
|
493
|
+
let n, { entityReturnState: r } = this, i = this.entity + t.slice(e, this.prevI);
|
|
494
|
+
this.state = r, i === "" ? (this.fail("empty entity name."), n = "&;") : (n = this.parseEntity(i), this.entity = ""), r === q && this.textHandler === void 0 || (this.text += n);
|
|
495
|
+
break t;
|
|
496
|
+
}
|
|
497
|
+
case G:
|
|
498
|
+
this.entity += t.slice(e);
|
|
499
|
+
break t;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
sOpenWaka() {
|
|
503
|
+
let e = this.getCode();
|
|
504
|
+
if (Ie(e)) this.state = 34, this.unGet(), this.xmlDeclPossible = !1;
|
|
505
|
+
else switch (e) {
|
|
506
|
+
case 47:
|
|
507
|
+
this.state = 43, this.xmlDeclPossible = !1;
|
|
508
|
+
break;
|
|
509
|
+
case 33:
|
|
510
|
+
this.state = 16, this.openWakaBang = "", this.xmlDeclPossible = !1;
|
|
511
|
+
break;
|
|
512
|
+
case Y:
|
|
513
|
+
this.state = 23;
|
|
514
|
+
break;
|
|
515
|
+
default: this.fail("disallowed character in tag name"), this.state = q, this.xmlDeclPossible = !1;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
sOpenWakaBang() {
|
|
519
|
+
switch (this.openWakaBang += String.fromCodePoint(this.getCodeNorm()), this.openWakaBang) {
|
|
520
|
+
case "[CDATA[":
|
|
521
|
+
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 = "";
|
|
522
|
+
break;
|
|
523
|
+
case "--":
|
|
524
|
+
this.state = 17, this.openWakaBang = "";
|
|
525
|
+
break;
|
|
526
|
+
case "DOCTYPE":
|
|
527
|
+
this.state = 2, (this.doctype || this.sawRoot) && this.fail("inappropriately located doctype declaration."), this.openWakaBang = "";
|
|
528
|
+
break;
|
|
529
|
+
default: this.openWakaBang.length >= 7 && this.fail("incorrect syntax.");
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
sComment() {
|
|
533
|
+
this.captureToChar(45) && (this.state = 18);
|
|
534
|
+
}
|
|
535
|
+
sCommentEnding() {
|
|
536
|
+
let e = this.getCodeNorm();
|
|
537
|
+
e === 45 ? (this.state = 19, this.commentHandler?.(this.text), this.text = "") : (this.text += `-${String.fromCodePoint(e)}`, this.state = 17);
|
|
538
|
+
}
|
|
539
|
+
sCommentEnded() {
|
|
540
|
+
let e = this.getCodeNorm();
|
|
541
|
+
e === J ? this.state = q : (this.fail("malformed comment."), this.text += `--${String.fromCodePoint(e)}`, this.state = 17);
|
|
542
|
+
}
|
|
543
|
+
sCData() {
|
|
544
|
+
this.captureToChar(Ze) && (this.state = 21);
|
|
545
|
+
}
|
|
546
|
+
sCDataEnding() {
|
|
547
|
+
let e = this.getCodeNorm();
|
|
548
|
+
e === Ze ? this.state = 22 : (this.text += `]${String.fromCodePoint(e)}`, this.state = 20);
|
|
549
|
+
}
|
|
550
|
+
sCDataEnding2() {
|
|
551
|
+
let e = this.getCodeNorm();
|
|
552
|
+
switch (e) {
|
|
553
|
+
case J:
|
|
554
|
+
this.cdataHandler?.(this.text), this.text = "", this.state = q;
|
|
555
|
+
break;
|
|
556
|
+
case Ze:
|
|
557
|
+
this.text += "]";
|
|
558
|
+
break;
|
|
559
|
+
default: this.text += `]]${String.fromCodePoint(e)}`, this.state = 20;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
sPIFirstChar() {
|
|
563
|
+
let e = this.getCodeNorm();
|
|
564
|
+
this.nameStartCheck(e) ? (this.piTarget += String.fromCodePoint(e), this.state = 24) : e === Y || U(e) ? (this.fail("processing instruction without a target."), this.state = e === Y ? 26 : 25) : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(e), this.state = 24);
|
|
565
|
+
}
|
|
566
|
+
sPIRest() {
|
|
567
|
+
let { chunk: e, i: t } = this;
|
|
568
|
+
for (;;) {
|
|
569
|
+
let n = this.getCodeNorm();
|
|
570
|
+
if (n === G) return void (this.piTarget += e.slice(t));
|
|
571
|
+
if (!this.nameCheck(n)) {
|
|
572
|
+
this.piTarget += e.slice(t, this.prevI);
|
|
573
|
+
let r = n === Y;
|
|
574
|
+
r || U(n) ? this.piTarget === "xml" ? (this.xmlDeclPossible || this.fail("an XML declaration must be at the start of the document."), this.state = r ? qe : 27) : this.state = r ? 26 : 25 : (this.fail("disallowed character in processing instruction name."), this.piTarget += String.fromCodePoint(n));
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
sPIBody() {
|
|
580
|
+
if (this.text.length === 0) {
|
|
581
|
+
let e = this.getCodeNorm();
|
|
582
|
+
e === Y ? this.state = 26 : U(e) || (this.text = String.fromCodePoint(e));
|
|
583
|
+
} else this.captureToChar(Y) && (this.state = 26);
|
|
584
|
+
}
|
|
585
|
+
sPIEnding() {
|
|
586
|
+
let e = this.getCodeNorm();
|
|
587
|
+
if (e === J) {
|
|
588
|
+
let { piTarget: e } = this;
|
|
589
|
+
e.toLowerCase() === "xml" && this.fail("the XML declaration must appear at the start of the document."), this.piHandler?.({
|
|
590
|
+
target: e,
|
|
591
|
+
body: this.text
|
|
592
|
+
}), this.piTarget = this.text = "", this.state = q;
|
|
593
|
+
} else e === Y ? this.text += "?" : (this.text += `?${String.fromCodePoint(e)}`, this.state = 25);
|
|
594
|
+
this.xmlDeclPossible = !1;
|
|
595
|
+
}
|
|
596
|
+
sXMLDeclNameStart() {
|
|
597
|
+
let e = this.skipSpaces();
|
|
598
|
+
e === Y ? this.state = qe : e !== G && (this.state = 28, this.name = String.fromCodePoint(e));
|
|
599
|
+
}
|
|
600
|
+
sXMLDeclName() {
|
|
601
|
+
let e = this.captureTo(nt);
|
|
602
|
+
if (e === Y) return this.state = qe, this.name += this.text, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
603
|
+
if (U(e) || e === Xe) {
|
|
604
|
+
if (this.name += this.text, this.text = "", !this.xmlDeclExpects.includes(this.name)) switch (this.name.length) {
|
|
605
|
+
case 0:
|
|
606
|
+
this.fail("did not expect any more name/value pairs.");
|
|
607
|
+
break;
|
|
608
|
+
case 1:
|
|
609
|
+
this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);
|
|
610
|
+
break;
|
|
611
|
+
default: this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`);
|
|
612
|
+
}
|
|
613
|
+
this.state = e === Xe ? 30 : 29;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
sXMLDeclEq() {
|
|
617
|
+
let e = this.getCodeNorm();
|
|
618
|
+
if (e === Y) return this.state = qe, void this.fail("XML declaration is incomplete.");
|
|
619
|
+
U(e) || (e !== Xe && this.fail("value required."), this.state = 30);
|
|
620
|
+
}
|
|
621
|
+
sXMLDeclValueStart() {
|
|
622
|
+
let e = this.getCodeNorm();
|
|
623
|
+
if (e === Y) return this.state = qe, void this.fail("XML declaration is incomplete.");
|
|
624
|
+
U(e) || (Qe(e) ? this.q = e : (this.fail("value must be quoted."), this.q = 32), this.state = 31);
|
|
625
|
+
}
|
|
626
|
+
sXMLDeclValue() {
|
|
627
|
+
let e = this.captureTo([this.q, Y]);
|
|
628
|
+
if (e === Y) return this.state = qe, this.text = "", void this.fail("XML declaration is incomplete.");
|
|
629
|
+
if (e === G) return;
|
|
630
|
+
let t = this.text;
|
|
631
|
+
switch (this.text = "", this.name) {
|
|
632
|
+
case "version": {
|
|
633
|
+
this.xmlDeclExpects = ["encoding", "standalone"];
|
|
634
|
+
let e = t;
|
|
635
|
+
this.xmlDecl.version = e, /^1\.[0-9]+$/.test(e) ? this.opt.forceXMLVersion || this.setXMLVersion(e) : this.fail("version number must match /^1\\.[0-9]+$/.");
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
case "encoding":
|
|
639
|
+
/^[A-Za-z][A-Za-z0-9._-]*$/.test(t) || this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."), this.xmlDeclExpects = ["standalone"], this.xmlDecl.encoding = t;
|
|
640
|
+
break;
|
|
641
|
+
case "standalone": t !== "yes" && t !== "no" && this.fail("standalone value must match \"yes\" or \"no\"."), this.xmlDeclExpects = [], this.xmlDecl.standalone = t;
|
|
642
|
+
}
|
|
643
|
+
this.name = "", this.state = 32;
|
|
644
|
+
}
|
|
645
|
+
sXMLDeclSeparator() {
|
|
646
|
+
let e = this.getCodeNorm();
|
|
647
|
+
e === Y ? this.state = qe : (U(e) || (this.fail("whitespace required."), this.unGet()), this.state = 27);
|
|
648
|
+
}
|
|
649
|
+
sXMLDeclEnding() {
|
|
650
|
+
this.getCodeNorm() === J ? (this.piTarget === "xml" ? this.name !== "version" && this.xmlDeclExpects.includes("version") && this.fail("XML declaration must contain a version.") : this.fail("processing instructions are not allowed before root."), this.xmlDeclHandler?.(this.xmlDecl), this.name = "", this.piTarget = this.text = "", this.state = q) : this.fail("The character ? is disallowed anywhere in XML declarations."), this.xmlDeclPossible = !1;
|
|
651
|
+
}
|
|
652
|
+
sOpenTag() {
|
|
653
|
+
let e = this.captureNameChars();
|
|
654
|
+
if (e === G) return;
|
|
655
|
+
let t = this.tag = {
|
|
656
|
+
name: this.name,
|
|
657
|
+
attributes: Object.create(null)
|
|
658
|
+
};
|
|
659
|
+
switch (this.name = "", this.xmlnsOpt && (this.topNS = t.ns = Object.create(null)), this.openTagStartHandler?.(t), this.sawRoot = !0, !this.fragmentOpt && this.closedRoot && this.fail("documents may contain only one root."), e) {
|
|
660
|
+
case J:
|
|
661
|
+
this.openTag();
|
|
662
|
+
break;
|
|
663
|
+
case 47:
|
|
664
|
+
this.state = 35;
|
|
665
|
+
break;
|
|
666
|
+
default: U(e) || this.fail("disallowed character in tag name."), this.state = 36;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
sOpenTagSlash() {
|
|
670
|
+
this.getCode() === J ? this.openSelfClosingTag() : (this.fail("forward-slash in opening tag not followed by >."), this.state = 36);
|
|
671
|
+
}
|
|
672
|
+
sAttrib() {
|
|
673
|
+
let e = this.skipSpaces();
|
|
674
|
+
e !== G && (Ie(e) ? (this.unGet(), this.state = 37) : e === J ? this.openTag() : e === 47 ? this.state = 35 : this.fail("disallowed character in attribute name."));
|
|
675
|
+
}
|
|
676
|
+
sAttribName() {
|
|
677
|
+
let e = this.captureNameChars();
|
|
678
|
+
e === Xe ? this.state = 39 : U(e) ? this.state = 38 : e === J ? (this.fail("attribute without value."), this.pushAttrib(this.name, this.name), this.name = this.text = "", this.openTag()) : e !== G && this.fail("disallowed character in attribute name.");
|
|
679
|
+
}
|
|
680
|
+
sAttribNameSawWhite() {
|
|
681
|
+
let e = this.skipSpaces();
|
|
682
|
+
switch (e) {
|
|
683
|
+
case G: return;
|
|
684
|
+
case Xe:
|
|
685
|
+
this.state = 39;
|
|
686
|
+
break;
|
|
687
|
+
default: this.fail("attribute without value."), this.text = "", this.name = "", e === J ? this.openTag() : Ie(e) ? (this.unGet(), this.state = 37) : (this.fail("disallowed character in attribute name."), this.state = 36);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
sAttribValue() {
|
|
691
|
+
let e = this.getCodeNorm();
|
|
692
|
+
Qe(e) ? (this.q = e, this.state = 40) : U(e) || (this.fail("unquoted attribute value."), this.state = 42, this.unGet());
|
|
693
|
+
}
|
|
694
|
+
sAttribValueQuoted() {
|
|
695
|
+
let { q: e, chunk: t } = this, { i: n } = this;
|
|
696
|
+
for (;;) switch (this.getCode()) {
|
|
697
|
+
case e:
|
|
698
|
+
this.pushAttrib(this.name, this.text + t.slice(n, this.prevI)), this.name = this.text = "", this.q = null, this.state = 41;
|
|
699
|
+
return;
|
|
700
|
+
case 38:
|
|
701
|
+
this.text += t.slice(n, this.prevI), this.state = 14, this.entityReturnState = 40;
|
|
702
|
+
return;
|
|
703
|
+
case Je:
|
|
704
|
+
case K:
|
|
705
|
+
case 9:
|
|
706
|
+
this.text += `${t.slice(n, this.prevI)} `, n = this.i;
|
|
707
|
+
break;
|
|
708
|
+
case Ye:
|
|
709
|
+
this.text += t.slice(n, this.prevI), this.fail("disallowed character.");
|
|
710
|
+
return;
|
|
711
|
+
case G:
|
|
712
|
+
this.text += t.slice(n);
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
sAttribValueClosed() {
|
|
717
|
+
let e = this.getCodeNorm();
|
|
718
|
+
U(e) ? this.state = 36 : e === J ? this.openTag() : e === 47 ? this.state = 35 : Ie(e) ? (this.fail("no whitespace between attributes."), this.unGet(), this.state = 37) : this.fail("disallowed character in attribute name.");
|
|
719
|
+
}
|
|
720
|
+
sAttribValueUnquoted() {
|
|
721
|
+
let e = this.captureTo(rt);
|
|
722
|
+
switch (e) {
|
|
723
|
+
case 38:
|
|
724
|
+
this.state = 14, this.entityReturnState = 42;
|
|
725
|
+
break;
|
|
726
|
+
case Ye:
|
|
727
|
+
this.fail("disallowed character.");
|
|
728
|
+
break;
|
|
729
|
+
case G: break;
|
|
730
|
+
default: this.text.includes("]]>") && this.fail("the string \"]]>\" is disallowed in char data."), this.pushAttrib(this.name, this.text), this.name = this.text = "", e === J ? this.openTag() : this.state = 36;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
sCloseTag() {
|
|
734
|
+
let e = this.captureNameChars();
|
|
735
|
+
e === J ? this.closeTag() : U(e) ? this.state = 44 : e !== G && this.fail("disallowed character in closing tag.");
|
|
736
|
+
}
|
|
737
|
+
sCloseTagSawWhite() {
|
|
738
|
+
switch (this.skipSpaces()) {
|
|
739
|
+
case J:
|
|
740
|
+
this.closeTag();
|
|
741
|
+
break;
|
|
742
|
+
case G: break;
|
|
743
|
+
default: this.fail("disallowed character in closing tag.");
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
handleTextInRoot() {
|
|
747
|
+
let { i: e, forbiddenState: t } = this, { chunk: n, textHandler: r } = this;
|
|
748
|
+
t: for (;;) switch (this.getCode()) {
|
|
749
|
+
case Ye:
|
|
750
|
+
if (this.state = 15, r !== void 0) {
|
|
751
|
+
let { text: t } = this, i = n.slice(e, this.prevI);
|
|
752
|
+
t.length === 0 ? i.length !== 0 && r(i) : (r(t + i), this.text = "");
|
|
753
|
+
}
|
|
754
|
+
t = 0;
|
|
755
|
+
break t;
|
|
756
|
+
case 38:
|
|
757
|
+
this.state = 14, this.entityReturnState = q, r !== void 0 && (this.text += n.slice(e, this.prevI)), t = 0;
|
|
758
|
+
break t;
|
|
759
|
+
case Ze:
|
|
760
|
+
switch (t) {
|
|
761
|
+
case 0:
|
|
762
|
+
t = 1;
|
|
763
|
+
break;
|
|
764
|
+
case 1:
|
|
765
|
+
t = 2;
|
|
766
|
+
break;
|
|
767
|
+
case 2: break;
|
|
768
|
+
default: throw Error("impossible state");
|
|
769
|
+
}
|
|
770
|
+
break;
|
|
771
|
+
case J:
|
|
772
|
+
t === 2 && this.fail("the string \"]]>\" is disallowed in char data."), t = 0;
|
|
773
|
+
break;
|
|
774
|
+
case K:
|
|
775
|
+
r !== void 0 && (this.text += `${n.slice(e, this.prevI)}\n`), e = this.i, t = 0;
|
|
776
|
+
break;
|
|
777
|
+
case G:
|
|
778
|
+
r !== void 0 && (this.text += n.slice(e));
|
|
779
|
+
break t;
|
|
780
|
+
default: t = 0;
|
|
781
|
+
}
|
|
782
|
+
this.forbiddenState = t;
|
|
783
|
+
}
|
|
784
|
+
handleTextOutsideRoot() {
|
|
785
|
+
let { i: e } = this, { chunk: t, textHandler: n } = this, r = !1;
|
|
786
|
+
t: for (;;) {
|
|
787
|
+
let i = this.getCode();
|
|
788
|
+
switch (i) {
|
|
789
|
+
case Ye:
|
|
790
|
+
if (this.state = 15, n !== void 0) {
|
|
791
|
+
let { text: r } = this, i = t.slice(e, this.prevI);
|
|
792
|
+
r.length === 0 ? i.length !== 0 && n(i) : (n(r + i), this.text = "");
|
|
793
|
+
}
|
|
794
|
+
break t;
|
|
795
|
+
case 38:
|
|
796
|
+
this.state = 14, this.entityReturnState = q, n !== void 0 && (this.text += t.slice(e, this.prevI)), r = !0;
|
|
797
|
+
break t;
|
|
798
|
+
case K:
|
|
799
|
+
n !== void 0 && (this.text += `${t.slice(e, this.prevI)}\n`), e = this.i;
|
|
800
|
+
break;
|
|
801
|
+
case G:
|
|
802
|
+
n !== void 0 && (this.text += t.slice(e));
|
|
803
|
+
break t;
|
|
804
|
+
default: U(i) || (r = !0);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
r && (this.sawRoot || this.reportedTextBeforeRoot || (this.fail("text data outside of root node."), this.reportedTextBeforeRoot = !0), this.closedRoot && !this.reportedTextAfterRoot && (this.fail("text data outside of root node."), this.reportedTextAfterRoot = !0));
|
|
808
|
+
}
|
|
809
|
+
pushAttribNS(e, t) {
|
|
810
|
+
let { prefix: n, local: r } = this.qName(e), i = {
|
|
811
|
+
name: e,
|
|
812
|
+
prefix: n,
|
|
813
|
+
local: r,
|
|
814
|
+
value: t
|
|
815
|
+
};
|
|
816
|
+
if (this.attribList.push(i), this.attributeHandler?.(i), n === "xmlns") {
|
|
817
|
+
let e = t.trim();
|
|
818
|
+
this.currentXMLVersion === "1.0" && e === "" && this.fail("invalid attempt to undefine prefix in XML 1.0"), this.topNS[r] = e, it(this, r, e);
|
|
819
|
+
} else if (e === "xmlns") {
|
|
820
|
+
let e = t.trim();
|
|
821
|
+
this.topNS[""] = e, it(this, "", e);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
pushAttribPlain(e, t) {
|
|
825
|
+
let n = {
|
|
826
|
+
name: e,
|
|
827
|
+
value: t
|
|
828
|
+
};
|
|
829
|
+
this.attribList.push(n), this.attributeHandler?.(n);
|
|
830
|
+
}
|
|
831
|
+
end() {
|
|
832
|
+
this.sawRoot || this.fail("document must contain a root element.");
|
|
833
|
+
let { tags: e } = this;
|
|
834
|
+
for (; e.length > 0;) {
|
|
835
|
+
let t = e.pop();
|
|
836
|
+
this.fail(`unclosed tag: ${t.name}`);
|
|
837
|
+
}
|
|
838
|
+
this.state !== 0 && this.state !== q && this.fail("unexpected end.");
|
|
839
|
+
let { text: t } = this;
|
|
840
|
+
return t.length !== 0 && (this.textHandler?.(t), this.text = ""), this._closed = !0, this.endHandler?.(), this._init(), this;
|
|
841
|
+
}
|
|
842
|
+
resolve(e) {
|
|
843
|
+
let t = this.topNS[e];
|
|
844
|
+
if (t !== void 0) return t;
|
|
845
|
+
let { tags: n } = this;
|
|
846
|
+
for (let r = n.length - 1; r >= 0; r--) if (t = n[r].ns[e], t !== void 0) return t;
|
|
847
|
+
return t = this.ns[e], t === void 0 ? this.opt.resolvePrefix?.(e) : t;
|
|
848
|
+
}
|
|
849
|
+
qName(e) {
|
|
850
|
+
let t = e.indexOf(":");
|
|
851
|
+
if (t === -1) return {
|
|
852
|
+
prefix: "",
|
|
853
|
+
local: e
|
|
854
|
+
};
|
|
855
|
+
let n = e.slice(t + 1), r = e.slice(0, t);
|
|
856
|
+
return (r === "" || n === "" || n.includes(":")) && this.fail(`malformed name: ${e}.`), {
|
|
857
|
+
prefix: r,
|
|
858
|
+
local: n
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
processAttribsNS() {
|
|
862
|
+
let { attribList: e } = this, t = this.tag;
|
|
863
|
+
{
|
|
864
|
+
let { prefix: e, local: n } = this.qName(t.name);
|
|
865
|
+
t.prefix = e, t.local = n;
|
|
866
|
+
let r = t.uri = this.resolve(e) ?? "";
|
|
867
|
+
e !== "" && (e === "xmlns" && this.fail("tags may not have \"xmlns\" as prefix."), r === "" && (this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`), t.uri = e));
|
|
868
|
+
}
|
|
869
|
+
if (e.length === 0) return;
|
|
870
|
+
let { attributes: n } = t, r = /* @__PURE__ */ new Set();
|
|
871
|
+
for (let t of e) {
|
|
872
|
+
let e, i, { name: a, prefix: o, local: s } = t;
|
|
873
|
+
o === "" ? (e = a === "xmlns" ? We : "", i = a) : (e = this.resolve(o), e === void 0 && (this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`), e = o), i = `{${e}}${s}`), r.has(i) && this.fail(`duplicate attribute: ${i}.`), r.add(i), t.uri = e, n[a] = t;
|
|
874
|
+
}
|
|
875
|
+
this.attribList = [];
|
|
876
|
+
}
|
|
877
|
+
processAttribsPlain() {
|
|
878
|
+
let { attribList: e } = this, t = this.tag.attributes;
|
|
879
|
+
for (let { name: n, value: r } of e) t[n] !== void 0 && this.fail(`duplicate attribute: ${n}.`), t[n] = r;
|
|
880
|
+
this.attribList = [];
|
|
881
|
+
}
|
|
882
|
+
openTag() {
|
|
883
|
+
this.processAttribs();
|
|
884
|
+
let { tags: e } = this, t = this.tag;
|
|
885
|
+
t.isSelfClosing = !1, this.openTagHandler?.(t), e.push(t), this.state = q, this.name = "";
|
|
886
|
+
}
|
|
887
|
+
openSelfClosingTag() {
|
|
888
|
+
this.processAttribs();
|
|
889
|
+
let { tags: e } = this, t = this.tag;
|
|
890
|
+
t.isSelfClosing = !0, this.openTagHandler?.(t), this.closeTagHandler?.(t), (this.tag = e[e.length - 1] ?? null) === null && (this.closedRoot = !0), this.state = q, this.name = "";
|
|
891
|
+
}
|
|
892
|
+
closeTag() {
|
|
893
|
+
let { tags: e, name: t } = this;
|
|
894
|
+
if (this.state = q, this.name = "", t === "") return this.fail("weird empty close tag."), void (this.text += "</>");
|
|
895
|
+
let n = this.closeTagHandler, r = e.length;
|
|
896
|
+
for (; r-- > 0;) {
|
|
897
|
+
let r = this.tag = e.pop();
|
|
898
|
+
if (this.topNS = r.ns, n?.(r), r.name === t) break;
|
|
899
|
+
this.fail(`unexpected close tag: ${t}.`);
|
|
900
|
+
}
|
|
901
|
+
r === 0 ? this.closedRoot = !0 : r < 0 && (this.fail(`unmatched closing tag: ${t}.`), this.text += `</${t}>`);
|
|
902
|
+
}
|
|
903
|
+
parseEntity(e) {
|
|
904
|
+
if (e[0] !== "#") {
|
|
905
|
+
let t = this.ENTITIES[e];
|
|
906
|
+
return t === void 0 ? (this.fail(this.isName(e) ? "undefined entity." : "disallowed character in entity name."), `&${e};`) : t;
|
|
907
|
+
}
|
|
908
|
+
let t = NaN;
|
|
909
|
+
return e[1] === "x" && /^#x[0-9a-f]+$/i.test(e) ? t = parseInt(e.slice(2), 16) : /^#[0-9]+$/.test(e) && (t = parseInt(e.slice(1), 10)), this.isChar(t) ? String.fromCodePoint(t) : (this.fail("malformed character entity."), `&${e};`);
|
|
910
|
+
}
|
|
911
|
+
}, ut = /&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g, dt = {
|
|
912
|
+
amp: "&",
|
|
913
|
+
lt: "<",
|
|
914
|
+
gt: ">",
|
|
915
|
+
quot: "\"",
|
|
916
|
+
apos: "'"
|
|
917
|
+
}, ft = (e, t) => {
|
|
918
|
+
let n = dt[t];
|
|
919
|
+
if (n !== void 0) return n;
|
|
920
|
+
let r = t.charCodeAt(1) === 120 ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
921
|
+
return r > 0 && r <= 1114111 ? String.fromCodePoint(r) : e;
|
|
922
|
+
}, pt = (e) => {
|
|
923
|
+
let t = e;
|
|
924
|
+
return t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, "\n")), t.indexOf("&") !== -1 && (t = t.replace(ut, ft)), t;
|
|
925
|
+
}, mt = (e) => {
|
|
926
|
+
let t = e, n = t.length;
|
|
927
|
+
for (let e = 0; e < n; e++) {
|
|
928
|
+
let n = t.charCodeAt(e);
|
|
929
|
+
if (n === 9 || n === 10 || n === 13) {
|
|
930
|
+
t = t.replace(/\r\n|[\t\n\r]/g, " ");
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
return t.indexOf("&") !== -1 && (t = t.replace(ut, ft)), t;
|
|
935
|
+
}, ht = (e) => e === 32 || e === 9 || e === 10 || e === 13, gt = class e {
|
|
936
|
+
constructor() {
|
|
937
|
+
this._openTagHandler = void 0, this._closeTagHandler = void 0, this._textHandler = void 0, this._cdataHandler = void 0, this._errorHandler = void 0, this._endHandler = void 0, this._scanners = null, this._carry = "", this._text = "", this._tags = [], this._sawRoot = !1, this._closed = !1;
|
|
938
|
+
}
|
|
939
|
+
static {
|
|
940
|
+
this.NEED_MORE = -1;
|
|
941
|
+
}
|
|
942
|
+
static {
|
|
943
|
+
this.NOT_HANDLED = -2;
|
|
944
|
+
}
|
|
945
|
+
static decodeText(e) {
|
|
946
|
+
return pt(e);
|
|
947
|
+
}
|
|
948
|
+
on(e, t) {
|
|
949
|
+
switch (e) {
|
|
950
|
+
case "opentag":
|
|
951
|
+
this._openTagHandler = t;
|
|
952
|
+
break;
|
|
953
|
+
case "closetag":
|
|
954
|
+
this._closeTagHandler = t;
|
|
955
|
+
break;
|
|
956
|
+
case "text":
|
|
957
|
+
this._textHandler = t;
|
|
958
|
+
break;
|
|
959
|
+
case "cdata":
|
|
960
|
+
this._cdataHandler = t;
|
|
961
|
+
break;
|
|
962
|
+
case "error":
|
|
963
|
+
this._errorHandler = t;
|
|
964
|
+
break;
|
|
965
|
+
case "end": this._endHandler = t;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
setElementScanners(e) {
|
|
969
|
+
if (!e || e.length === 0) return void (this._scanners = null);
|
|
970
|
+
let t = Array(128);
|
|
971
|
+
for (let n of e) {
|
|
972
|
+
let e = n.name.charCodeAt(0);
|
|
973
|
+
if (!(e < 128) || t[e] !== void 0) throw Error(`Element scanner '${n.name}' needs an ASCII first character no other scanner uses.`);
|
|
974
|
+
t[e] = n;
|
|
975
|
+
}
|
|
976
|
+
this._scanners = t;
|
|
977
|
+
}
|
|
978
|
+
fail(e) {
|
|
979
|
+
let t = Error(e), n = this._errorHandler;
|
|
980
|
+
if (n === void 0) throw t;
|
|
981
|
+
n(t);
|
|
982
|
+
}
|
|
983
|
+
write(e) {
|
|
984
|
+
if (this._closed) return this.fail("cannot write after close."), this;
|
|
985
|
+
let t = e;
|
|
986
|
+
this._carry.length !== 0 && (t = this._carry + e, this._carry = "");
|
|
987
|
+
let n = t.length, r = 0;
|
|
988
|
+
for (; r < n;) {
|
|
989
|
+
let e = t.indexOf("<", r);
|
|
990
|
+
if (e === -1) return this._text += t.slice(r), this;
|
|
991
|
+
e > r && (this._text += t.slice(r, e));
|
|
992
|
+
let i = this._markup(t, e, n);
|
|
993
|
+
if (i === -1) return this._carry = t.slice(e), this;
|
|
994
|
+
r = i;
|
|
995
|
+
}
|
|
996
|
+
return this;
|
|
997
|
+
}
|
|
998
|
+
close() {
|
|
999
|
+
this._carry.length !== 0 && (this.fail("unexpected end."), this._carry = ""), this._sawRoot || this.fail("document must contain a root element.");
|
|
1000
|
+
let e = this._tags;
|
|
1001
|
+
for (; e.length > 0;) {
|
|
1002
|
+
let t = e.pop();
|
|
1003
|
+
this.fail(`unclosed tag: ${t.name}`);
|
|
1004
|
+
}
|
|
1005
|
+
return this._flushText(), this._closed = !0, this._endHandler?.(), this;
|
|
1006
|
+
}
|
|
1007
|
+
_flushText() {
|
|
1008
|
+
let e = this._text;
|
|
1009
|
+
if (e.length === 0) return;
|
|
1010
|
+
this._text = "";
|
|
1011
|
+
let t = this._textHandler;
|
|
1012
|
+
t !== void 0 && this._tags.length !== 0 && t(pt(e));
|
|
1013
|
+
}
|
|
1014
|
+
_markup(t, n, r) {
|
|
1015
|
+
if (n + 1 >= r) return -1;
|
|
1016
|
+
let i = t.charCodeAt(n + 1);
|
|
1017
|
+
if (i === 47) {
|
|
1018
|
+
let e = t.indexOf(">", n + 2);
|
|
1019
|
+
return e === -1 ? -1 : (this._flushText(), this._closeTag(t.slice(n + 2, e).trimEnd()), e + 1);
|
|
1020
|
+
}
|
|
1021
|
+
if (i === 63) {
|
|
1022
|
+
let e = t.indexOf("?>", n + 2);
|
|
1023
|
+
return e === -1 ? -1 : e + 2;
|
|
1024
|
+
}
|
|
1025
|
+
if (i === 33) {
|
|
1026
|
+
if (n + 4 > r) return -1;
|
|
1027
|
+
if (t.charCodeAt(n + 2) === 45 && t.charCodeAt(n + 3) === 45) {
|
|
1028
|
+
let e = t.indexOf("-->", n + 4);
|
|
1029
|
+
return e === -1 ? -1 : e + 3;
|
|
1030
|
+
}
|
|
1031
|
+
if (n + 9 > r) return -1;
|
|
1032
|
+
if (t.startsWith("[CDATA[", n + 2)) {
|
|
1033
|
+
let e = t.indexOf("]]>", n + 9);
|
|
1034
|
+
return e === -1 ? -1 : (this._flushText(), this._cdataHandler?.(t.slice(n + 9, e)), e + 3);
|
|
1035
|
+
}
|
|
1036
|
+
let e = t.indexOf("[", n + 2), i = t.indexOf(">", n + 2);
|
|
1037
|
+
if (i === -1) return -1;
|
|
1038
|
+
if (e !== -1 && e < i) {
|
|
1039
|
+
let n = t.indexOf("]>", e);
|
|
1040
|
+
return n === -1 ? -1 : n + 2;
|
|
1041
|
+
}
|
|
1042
|
+
return i + 1;
|
|
1043
|
+
}
|
|
1044
|
+
let a = this._scanners;
|
|
1045
|
+
if (a !== null) {
|
|
1046
|
+
let o = i < 128 ? a[i] : void 0;
|
|
1047
|
+
if (o !== void 0 && t.startsWith(o.name, n + 1)) {
|
|
1048
|
+
let i = n + 1 + o.name.length;
|
|
1049
|
+
if (i >= r) return -1;
|
|
1050
|
+
let a = t.charCodeAt(i);
|
|
1051
|
+
if (a === 62 || a === 47 || ht(a)) {
|
|
1052
|
+
this._flushText();
|
|
1053
|
+
let i = o.scan(t, n, r);
|
|
1054
|
+
if (i !== e.NOT_HANDLED) {
|
|
1055
|
+
if (i !== e.NEED_MORE) {
|
|
1056
|
+
this._sawRoot = !0;
|
|
1057
|
+
let e = o.openTag;
|
|
1058
|
+
e !== void 0 && this._tags.push(e);
|
|
1059
|
+
}
|
|
1060
|
+
return i;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
return this._openTag(t, n, r);
|
|
1066
|
+
}
|
|
1067
|
+
_openTag(e, t, n) {
|
|
1068
|
+
let r = t + 1, i = 0;
|
|
1069
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 62 && i !== 47 && !ht(i));) r++;
|
|
1070
|
+
if (r >= n) return -1;
|
|
1071
|
+
let a = e.slice(t + 1, r), o = {}, s = !1;
|
|
1072
|
+
for (;;) {
|
|
1073
|
+
for (; r < n && ht(i = e.charCodeAt(r));) r++;
|
|
1074
|
+
if (r >= n) return -1;
|
|
1075
|
+
if (i === 62) {
|
|
1076
|
+
r++;
|
|
1077
|
+
break;
|
|
1078
|
+
}
|
|
1079
|
+
if (i === 47) {
|
|
1080
|
+
if (r + 1 >= n) return -1;
|
|
1081
|
+
if (e.charCodeAt(r + 1) !== 62) {
|
|
1082
|
+
this.fail("forward-slash in opening tag not followed by >."), r++;
|
|
1083
|
+
continue;
|
|
1084
|
+
}
|
|
1085
|
+
s = !0, r += 2;
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
let t = r;
|
|
1089
|
+
for (; r < n && (i = e.charCodeAt(r), i !== 61 && i !== 62 && i !== 47 && !ht(i));) r++;
|
|
1090
|
+
if (r >= n) return -1;
|
|
1091
|
+
let a = e.slice(t, r);
|
|
1092
|
+
for (; r < n && ht(i = e.charCodeAt(r));) r++;
|
|
1093
|
+
if (r >= n) return -1;
|
|
1094
|
+
if (i !== 61) {
|
|
1095
|
+
this.fail("attribute without value.");
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
for (r++; r < n && ht(i = e.charCodeAt(r));) r++;
|
|
1099
|
+
if (r >= n) return -1;
|
|
1100
|
+
if (i !== 34 && i !== 39) {
|
|
1101
|
+
this.fail("unquoted attribute value.");
|
|
1102
|
+
continue;
|
|
1103
|
+
}
|
|
1104
|
+
let c = e.indexOf(i === 34 ? "\"" : "'", r + 1);
|
|
1105
|
+
if (c === -1) return -1;
|
|
1106
|
+
a !== "__proto__" && (o[a] = mt(e.slice(r + 1, c))), r = c + 1;
|
|
1107
|
+
}
|
|
1108
|
+
this._flushText(), this._sawRoot = !0;
|
|
1109
|
+
let c = {
|
|
1110
|
+
name: a,
|
|
1111
|
+
attributes: o,
|
|
1112
|
+
isSelfClosing: s
|
|
1113
|
+
};
|
|
1114
|
+
return this._openTagHandler?.(c), s ? this._closeTagHandler?.(c) : this._tags.push(c), r;
|
|
1115
|
+
}
|
|
1116
|
+
_closeTag(e) {
|
|
1117
|
+
if (e === "") return void this.fail("weird empty close tag.");
|
|
1118
|
+
let t = this._tags, n = this._closeTagHandler, r = t.length;
|
|
1119
|
+
for (; r-- > 0;) {
|
|
1120
|
+
let r = t.pop();
|
|
1121
|
+
if (n?.(r), r.name === e) return;
|
|
1122
|
+
this.fail(`unexpected close tag: ${e}.`);
|
|
1123
|
+
}
|
|
1124
|
+
this.fail(`unmatched closing tag: ${e}.`);
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
(at = H ||= {}).Events = {
|
|
1128
|
+
XmlDecl: "xmldecl",
|
|
1129
|
+
Text: "text",
|
|
1130
|
+
ProcessingInstruction: "processinginstruction",
|
|
1131
|
+
Doctype: "doctype",
|
|
1132
|
+
Comment: "comment",
|
|
1133
|
+
OpenTagStart: "opentagstart",
|
|
1134
|
+
Attribute: "attribute",
|
|
1135
|
+
OpenTag: "opentag",
|
|
1136
|
+
CloseTag: "closetag",
|
|
1137
|
+
CDdata: "cdata",
|
|
1138
|
+
Error: "error",
|
|
1139
|
+
End: "end",
|
|
1140
|
+
Ready: "ready"
|
|
1141
|
+
}, at.parseStream = async (e, t, n) => {
|
|
1142
|
+
if (n?.lean) return (async (e, t) => {
|
|
1143
|
+
let n, r = new gt();
|
|
1144
|
+
t.elementScanners && r.setElementScanners(t.elementScanners), t.onOpenTag && r.on("opentag", t.onOpenTag), t.onCloseTag && r.on("closetag", t.onCloseTag), t.onText && r.on("text", t.onText), t.onError && r.on("error", t.onError);
|
|
1145
|
+
let i = t.onEnd;
|
|
1146
|
+
for (i && r.on("end", () => {
|
|
1147
|
+
n = i();
|
|
1148
|
+
});;) {
|
|
1149
|
+
let { value: t, done: n } = await e.read();
|
|
1150
|
+
if (n) break;
|
|
1151
|
+
r.write(t);
|
|
1152
|
+
}
|
|
1153
|
+
return r.close(), n;
|
|
1154
|
+
})(e, t);
|
|
1155
|
+
let r, i = new lt({
|
|
1156
|
+
position: !1,
|
|
1157
|
+
...n
|
|
1158
|
+
});
|
|
1159
|
+
t.onOpenTagStart && i.on(H.Events.OpenTagStart, t.onOpenTagStart), t.onOpenTag && i.on(H.Events.OpenTag, t.onOpenTag), t.onCloseTag && i.on(H.Events.CloseTag, t.onCloseTag), t.onAttribute && i.on(H.Events.Attribute, t.onAttribute), t.onText && i.on(H.Events.Text, t.onText), t.onError && i.on(H.Events.Error, t.onError);
|
|
1160
|
+
let a = t.onEnd;
|
|
1161
|
+
for (a && i.on(H.Events.End, () => {
|
|
1162
|
+
r = a();
|
|
1163
|
+
});;) {
|
|
1164
|
+
let { value: t, done: n } = await e.read();
|
|
1165
|
+
if (n) break;
|
|
1166
|
+
i.write(t);
|
|
1167
|
+
}
|
|
1168
|
+
return i.close(), r;
|
|
1169
|
+
};
|
|
1170
|
+
var X = (e) => !0 === e || e === "1" || e === "on" || e === "true" || !1 !== e && e !== "0" && e !== "off" && e !== "false" && null, Z = (e) => {
|
|
1171
|
+
let t = parseInt(e);
|
|
1172
|
+
return isNaN(t) ? null : t;
|
|
1173
|
+
}, Q = (e) => {
|
|
1174
|
+
let t = parseFloat(e);
|
|
1175
|
+
return isNaN(t) ? null : t;
|
|
1176
|
+
}, $ = null, _t = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), vt = (e) => _t(e).replace(/"/g, """), yt = class {
|
|
1177
|
+
constructor() {
|
|
1178
|
+
this._registeredVisitors = /* @__PURE__ */ new Map();
|
|
1179
|
+
}
|
|
1180
|
+
registerVisitor(e) {
|
|
1181
|
+
this._registeredVisitors.set(e.from, e);
|
|
1182
|
+
}
|
|
1183
|
+
createEventHandler(e, t, n) {
|
|
1184
|
+
let r = this._registeredVisitors, i = [], a = [], o = null, s = null, c = null, l = null, u = [], d = {
|
|
1185
|
+
key: null,
|
|
1186
|
+
source: e,
|
|
1187
|
+
parent: null
|
|
1188
|
+
}, f = null, p = !1, m = null, h = null, g = null, _ = (e, t) => {
|
|
1189
|
+
let n = c.attributes[e];
|
|
1190
|
+
if (t) {
|
|
1191
|
+
if (Array.isArray(t)) {
|
|
1192
|
+
let e = t.length;
|
|
1193
|
+
for (let r = 0; r < e; r++) if (n == null || (n = t[r](n), n == null)) return;
|
|
1194
|
+
} else if (n == null || (n = t(n), n == null)) return;
|
|
1195
|
+
}
|
|
1196
|
+
return n;
|
|
1197
|
+
}, v = {
|
|
1198
|
+
getSource: () => f?.source ?? null,
|
|
1199
|
+
setSource: (e) => {
|
|
1200
|
+
f.source = e;
|
|
1201
|
+
},
|
|
1202
|
+
setKey: (e) => {
|
|
1203
|
+
f.key = e;
|
|
1204
|
+
},
|
|
1205
|
+
getFrom: () => c,
|
|
1206
|
+
getAttribute: (e, t) => _(e, t) ?? null,
|
|
1207
|
+
hasAttribute: (e) => v.getAttribute(e) !== null,
|
|
1208
|
+
getParent: () => {
|
|
1209
|
+
let e = u[u.length - 2];
|
|
1210
|
+
return e.parent ?? e.source;
|
|
1211
|
+
},
|
|
1212
|
+
getPath: () => {
|
|
1213
|
+
let e = [], t = a.length;
|
|
1214
|
+
for (let n = 0; n < t; n++) e.push(a[n].local);
|
|
1215
|
+
return e.join("\\");
|
|
1216
|
+
},
|
|
1217
|
+
parseAttribute: _,
|
|
1218
|
+
getRawXml: () => g,
|
|
1219
|
+
copyToObject: (e, t, n, r) => {
|
|
1220
|
+
let i = _(r ?? t, n);
|
|
1221
|
+
i !== void 0 && (e[t] = i);
|
|
1222
|
+
},
|
|
1223
|
+
copyTo: (e, t, n) => {
|
|
1224
|
+
let r = _(n ?? e, t);
|
|
1225
|
+
r !== void 0 && (f.source[e] = r);
|
|
1226
|
+
},
|
|
1227
|
+
warn: (e, t) => {
|
|
1228
|
+
n ? n(e, void 0, t?.onceKey) : console.warn(e);
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
1231
|
+
return {
|
|
1232
|
+
onOpenTag: (e) => {
|
|
1233
|
+
let t = e.name, n = t.indexOf(":");
|
|
1234
|
+
if (n !== -1 && (t = t.slice(n + 1)), m) return m.push(((e) => {
|
|
1235
|
+
let t = e.attributes ?? {}, n = `<${e.name}`;
|
|
1236
|
+
for (let e in t) {
|
|
1237
|
+
let r = t[e];
|
|
1238
|
+
n += ` ${e}="${vt(typeof r == "string" ? r : r?.value ?? "")}"`;
|
|
1239
|
+
}
|
|
1240
|
+
return n + ">";
|
|
1241
|
+
})(e)), o = {
|
|
1242
|
+
local: t,
|
|
1243
|
+
tag: e,
|
|
1244
|
+
destination: null
|
|
1245
|
+
}, a.push(o), s = t, void (c = e);
|
|
1246
|
+
let g = (i.length > 0 ? i[i.length - 1] : r).get(t);
|
|
1247
|
+
if (o = {
|
|
1248
|
+
local: t,
|
|
1249
|
+
visitor: g,
|
|
1250
|
+
tag: e,
|
|
1251
|
+
destination: null
|
|
1252
|
+
}, p) return a.push(o), s = t, void (c = e);
|
|
1253
|
+
l = o?.visitor ?? null, s = t, c = e;
|
|
1254
|
+
let _ = !!g && g.to === null;
|
|
1255
|
+
if (g && !_ && g.scope) {
|
|
1256
|
+
let e = g.scope(v);
|
|
1257
|
+
e === null ? _ = !0 : e && (i.push(e), o.pushedScope = !0);
|
|
1258
|
+
}
|
|
1259
|
+
g && (a.length === 0 ? (f = d, o.destination = f, o.pushedDestination = !0, u.push(f)) : _ ? (f = null, o.destination = null) : g.transparent ? o.destination = f : (f = {
|
|
1260
|
+
key: null,
|
|
1261
|
+
source: {},
|
|
1262
|
+
parent: null
|
|
1263
|
+
}, o.destination = f, o.pushedDestination = !0, u.push(f))), a.push(o), p = _;
|
|
1264
|
+
let y = l?.openTag?.(v);
|
|
1265
|
+
y !== void 0 && (f.parent = y), g?.raw && !_ && (m = [], h = o);
|
|
1266
|
+
},
|
|
1267
|
+
onCloseTag: (e) => {
|
|
1268
|
+
let t = e.name, r = t.indexOf(":");
|
|
1269
|
+
if (r !== -1 && (t = t.slice(r + 1)), t !== s) throw Error(`mismatch open/close tag: '${t}'/'${s}'`);
|
|
1270
|
+
let _ = !1;
|
|
1271
|
+
if (m) {
|
|
1272
|
+
if (a[a.length - 1] !== h) return m.push(`</${e.name}>`), a.pop(), o = a[a.length - 1] ?? null, s = o?.local ?? null, void (c = o?.tag ?? null);
|
|
1273
|
+
g = m.join(""), m = null, h = null, _ = !0;
|
|
1274
|
+
}
|
|
1275
|
+
p || l?.closeTag?.(v), _ && (g = null);
|
|
1276
|
+
let y = a.pop() ?? null;
|
|
1277
|
+
o = a[a.length - 1] ?? null, y?.pushedScope && i.pop();
|
|
1278
|
+
let b = y?.destination;
|
|
1279
|
+
if (b && y.pushedDestination) {
|
|
1280
|
+
u.pop(), f = u[u.length - 1] ?? d;
|
|
1281
|
+
let e = y.visitor;
|
|
1282
|
+
e && e.to && b.source !== void 0 && (Array.isArray(e.to) ? f.source.push ? f.source.push(b.source) : n?.(`Unable to parse array for ${e.from} at ${v.getPath()}`) : b.key ? f.source[b.key] = b.source : typeof e.to == "string" && (f.source[e.to] = b.source));
|
|
1283
|
+
} else b || (f = u[u.length - 1] ?? d);
|
|
1284
|
+
s = o?.local ?? null, c = o?.tag ?? null, l = o?.visitor ?? null, p = !o?.destination;
|
|
1285
|
+
},
|
|
1286
|
+
onText: (e) => {
|
|
1287
|
+
m ? m.push(_t(e)) : l?.text?.(e, v);
|
|
1288
|
+
},
|
|
1289
|
+
onEnd: t
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
}, bt = `IFERROR(${C}(`, xt = bt.toUpperCase(), St = E.toUpperCase(), Ct = { kind: "none" }, wt = { kind: "spilled" }, Tt = (e, t) => {
|
|
1293
|
+
if (e.charCodeAt(t) !== 34) return null;
|
|
1294
|
+
let n = "", r = t + 1;
|
|
1295
|
+
for (; r < e.length;) if (e.charCodeAt(r) === 34) {
|
|
1296
|
+
if (e.charCodeAt(r + 1) !== 34) return {
|
|
1297
|
+
value: n,
|
|
1298
|
+
end: r + 1
|
|
1299
|
+
};
|
|
1300
|
+
n += "\"", r += 2;
|
|
1301
|
+
} else n += e[r], r++;
|
|
1302
|
+
return null;
|
|
1303
|
+
}, Et = (e) => {
|
|
1304
|
+
let t = [], n = 0;
|
|
1305
|
+
for (; n < e.length;) {
|
|
1306
|
+
let r = e.charCodeAt(n);
|
|
1307
|
+
if (r === 34) {
|
|
1308
|
+
let t = Tt(e, n);
|
|
1309
|
+
if (t === null) break;
|
|
1310
|
+
n = t.end;
|
|
1311
|
+
continue;
|
|
1312
|
+
}
|
|
1313
|
+
if (!(r >= 65 && r <= 90 || r >= 97 && r <= 122 || r === 95)) {
|
|
1314
|
+
n++;
|
|
1315
|
+
continue;
|
|
1316
|
+
}
|
|
1317
|
+
let i = n + 1;
|
|
1318
|
+
for (; i < e.length;) {
|
|
1319
|
+
let t = e.charCodeAt(i);
|
|
1320
|
+
if (!(t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 48 && t <= 57 || t === 95 || t === 46)) break;
|
|
1321
|
+
i++;
|
|
1322
|
+
}
|
|
1323
|
+
e.charCodeAt(i) === 40 && t.push(e.slice(n, i).toUpperCase().replace(/^_XLFN\./, "").replace(/^_XLWS\./, "")), n = i;
|
|
1324
|
+
}
|
|
1325
|
+
return t;
|
|
1326
|
+
}, Dt = (e) => {
|
|
1327
|
+
let t = (t) => {
|
|
1328
|
+
if (e) return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1];
|
|
1329
|
+
}, n = (e) => {
|
|
1330
|
+
let t = parseInt(e ?? "", 10);
|
|
1331
|
+
return isNaN(t) ? 0 : t;
|
|
1332
|
+
};
|
|
1333
|
+
return {
|
|
1334
|
+
c: n(t("col")),
|
|
1335
|
+
r: n(t("row")),
|
|
1336
|
+
x: ve(t("colOff") ?? "0") ?? 0,
|
|
1337
|
+
y: ve(t("rowOff") ?? "0") ?? 0
|
|
1338
|
+
};
|
|
1339
|
+
}, Ot = "formulaDialect", kt = (e, t, n, r, i, a, o, s) => {
|
|
1340
|
+
let c = new yt(), d = s?.get("parseInlineDxf"), m = s?.get(Ot), g = (e) => m && e ? m.readDetached(e) : e, _ = new u.TransposedBuilder(), v = null;
|
|
1341
|
+
c.registerVisitor({
|
|
1342
|
+
from: "autoFilter",
|
|
1343
|
+
to: "autoTable",
|
|
1344
|
+
openTag: (e) => {
|
|
1345
|
+
let t = e.getAttribute("ref"), n = f.fastStringToRange(t);
|
|
1346
|
+
e.getSource().r = n, e.getSource().v = {};
|
|
1347
|
+
},
|
|
1348
|
+
closeTag: (e) => {
|
|
1349
|
+
let t = e.getSource(), n = t.v, r = n.hiddenButtons;
|
|
1350
|
+
if (Array.isArray(r)) {
|
|
1351
|
+
let e = r.length, i = t.r, a = i.colEnd - i.colStart + 1;
|
|
1352
|
+
e === 0 ? n.hiddenButtons = !1 : e === a && (n.hiddenButtons = !0);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}), c.registerVisitor({
|
|
1356
|
+
from: "conditionalFormatting",
|
|
1357
|
+
to: {},
|
|
1358
|
+
openTag: (e) => {
|
|
1359
|
+
let t = e.getParent();
|
|
1360
|
+
t.conditionals ||= [];
|
|
1361
|
+
let n = e.getAttribute("sqref");
|
|
1362
|
+
n &&= n.trim().split(/\s+/).join(",");
|
|
1363
|
+
let r = {
|
|
1364
|
+
r: n,
|
|
1365
|
+
conditionals: t.conditionals
|
|
1366
|
+
}, i = e.getAttribute("pivot", X);
|
|
1367
|
+
i !== null && (r.pivot = i), e.setSource(r);
|
|
1368
|
+
}
|
|
1369
|
+
}), c.registerVisitor({
|
|
1370
|
+
from: "cfRule",
|
|
1371
|
+
to: {},
|
|
1372
|
+
openTag: (e) => {
|
|
1373
|
+
let t = e.getParent();
|
|
1374
|
+
if (!t?.r) return;
|
|
1375
|
+
let n = e.getSource() ?? {};
|
|
1376
|
+
t.pivot !== void 0 && (n.pivot = t.pivot), t.conditionals.push({
|
|
1377
|
+
r: t.r,
|
|
1378
|
+
v: null,
|
|
1379
|
+
rule: n
|
|
1380
|
+
}), e.copyToObject(n, "type", $), e.copyToObject(n, "priority", Z), e.copyToObject(n, "stopIfTrue", X);
|
|
1381
|
+
let i = e.getAttribute("dxfId", Z);
|
|
1382
|
+
if (i !== null) {
|
|
1383
|
+
let t = r?.get(i);
|
|
1384
|
+
t ||= (a?.(`Unable to load conditional color. Invalid dxfI: '${i}' at '${e.getPath()}'.`), {}), n.style = t;
|
|
1385
|
+
}
|
|
1386
|
+
e.copyToObject(n, "aboveAverage", X), e.copyToObject(n, "equalAverage", X), e.copyToObject(n, "stdDev", Z), e.copyToObject(n, "bottom", X), e.copyToObject(n, "percent", X), e.copyToObject(n, "rank", Z), e.copyToObject(n, "operator", $), e.copyToObject(n, "text", $), e.copyToObject(n, "timePeriod", $);
|
|
1387
|
+
},
|
|
1388
|
+
closeTag: (e) => {
|
|
1389
|
+
let t = e.getParent();
|
|
1390
|
+
if (!t?.r) return;
|
|
1391
|
+
let n = t.conditionals[t.conditionals.length - 1], r = n?.rule;
|
|
1392
|
+
if (!r) return;
|
|
1393
|
+
let i = {}, o = ie(r, a);
|
|
1394
|
+
o && (i.condition = o), r.style && (i.style = r.style), r.scale && (i.scale = r.scale), r.stopIfTrue && (i.stopIfTrue = !0), r.pivot && (i.pivot = !0), n.v = i, n.priority = r.priority, r.x14Id && (n.x14Id = r.x14Id), delete n.rule;
|
|
1395
|
+
}
|
|
1396
|
+
});
|
|
1397
|
+
let y = (e) => {
|
|
1398
|
+
let t = e.conditions ?? [], n = [];
|
|
1399
|
+
for (let e = 0; e < t.length; e++) {
|
|
1400
|
+
let r = t[e], i = {};
|
|
1401
|
+
r.type && (i.type = r.type), r.value !== void 0 && (i.value = r.value), r.exclusive && (i.exclusive = !0), n.push(i);
|
|
1402
|
+
}
|
|
1403
|
+
return n;
|
|
1404
|
+
};
|
|
1405
|
+
c.registerVisitor({
|
|
1406
|
+
from: "colorScale",
|
|
1407
|
+
to: {},
|
|
1408
|
+
openTag: (e) => {},
|
|
1409
|
+
closeTag: (e) => {
|
|
1410
|
+
let t = e.getSource(), n = t.colors ?? [], r = y(t);
|
|
1411
|
+
for (let e = 0; e < r.length; e++) r[e].color = n[e];
|
|
1412
|
+
e.getParent().scale = {
|
|
1413
|
+
type: l.ScaleType.ColorScale,
|
|
1414
|
+
stops: r
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
}), c.registerVisitor({
|
|
1418
|
+
from: "dataBar",
|
|
1419
|
+
to: {},
|
|
1420
|
+
openTag: (e) => {
|
|
1421
|
+
e.copyTo("maxLength", Z), e.copyTo("minLength", Z), e.copyTo("showValue", X);
|
|
1422
|
+
},
|
|
1423
|
+
closeTag: (e) => {
|
|
1424
|
+
let t = e.getSource(), n = {
|
|
1425
|
+
type: l.ScaleType.DataBar,
|
|
1426
|
+
stops: y(t)
|
|
1427
|
+
}, r = t.colors?.[0];
|
|
1428
|
+
r && (n.color = r), t.minLength !== void 0 && (n.minLength = t.minLength), t.maxLength !== void 0 && (n.maxLength = t.maxLength), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1429
|
+
}
|
|
1430
|
+
}), c.registerVisitor({
|
|
1431
|
+
from: "iconSet",
|
|
1432
|
+
to: {},
|
|
1433
|
+
openTag: (e) => {
|
|
1434
|
+
e.copyTo("iconSet", $), e.copyTo("reverse", X), e.copyTo("showValue", X);
|
|
1435
|
+
},
|
|
1436
|
+
closeTag: (e) => {
|
|
1437
|
+
let t = e.getSource(), n = {
|
|
1438
|
+
type: l.ScaleType.IconSet,
|
|
1439
|
+
stops: y(t)
|
|
1440
|
+
};
|
|
1441
|
+
t.iconSet !== void 0 && (n.iconSet = t.iconSet), t.reverse !== void 0 && (n.reverse = t.reverse), t.showValue !== void 0 && (n.showValue = t.showValue), e.getParent().scale = n;
|
|
1442
|
+
}
|
|
1443
|
+
}), c.registerVisitor({
|
|
1444
|
+
from: "formula",
|
|
1445
|
+
to: {},
|
|
1446
|
+
text: (e, t) => {
|
|
1447
|
+
let n = t.getParent(), r = n.formulas;
|
|
1448
|
+
r || (r = [], n.formulas = r), r.push(g(e));
|
|
1449
|
+
}
|
|
1450
|
+
}), c.registerVisitor({
|
|
1451
|
+
from: "cfvo",
|
|
1452
|
+
to: {},
|
|
1453
|
+
openTag: (e) => {
|
|
1454
|
+
let t = e.getParent();
|
|
1455
|
+
t.conditions ||= [];
|
|
1456
|
+
let n = e.getSource();
|
|
1457
|
+
if (t.conditions.push(n), e.copyTo("type", $), n.type === l.ColorStopType.Formula) {
|
|
1458
|
+
let t = e.getAttribute("val");
|
|
1459
|
+
t != null && (n.value = g(String(t)));
|
|
1460
|
+
} else e.copyTo("value", Q, "val");
|
|
1461
|
+
!1 === e.getAttribute("gte", X) && (n.exclusive = !0);
|
|
1462
|
+
}
|
|
1463
|
+
}), c.registerVisitor({
|
|
1464
|
+
from: "color",
|
|
1465
|
+
to: {},
|
|
1466
|
+
openTag: (e) => {
|
|
1467
|
+
let t = e.getParent();
|
|
1468
|
+
t.colors ||= [];
|
|
1469
|
+
let n = be((t) => e.getAttribute(t));
|
|
1470
|
+
t.colors.push(n);
|
|
1471
|
+
}
|
|
1472
|
+
}), c.registerVisitor({
|
|
1473
|
+
from: "filterColumn",
|
|
1474
|
+
to: {},
|
|
1475
|
+
openTag: (e) => {
|
|
1476
|
+
let t = e.getParent().v, n = parseInt(e.getAttribute("colId")), r = e.getSource();
|
|
1477
|
+
r.index = n;
|
|
1478
|
+
let i = t.filter;
|
|
1479
|
+
i || (i = { conditions: [] }, t.filter = i);
|
|
1480
|
+
let a = i.conditions;
|
|
1481
|
+
if (a || (a = [], i.conditions = a), a.push(r), e.getAttribute("hiddenButton", X) && t) {
|
|
1482
|
+
let e = t.hiddenButtons;
|
|
1483
|
+
e || (e = [], t.hiddenButtons = e), e.push(n);
|
|
1484
|
+
}
|
|
1485
|
+
if (e.getAttribute("showButton", X) && t) {
|
|
1486
|
+
let e = t.showButtons;
|
|
1487
|
+
e || (e = [], t.showButtons = e), e.push(n);
|
|
1488
|
+
}
|
|
1489
|
+
return r;
|
|
1490
|
+
}
|
|
1491
|
+
}), c.registerVisitor({
|
|
1492
|
+
from: "colorFilter",
|
|
1493
|
+
openTag: (e) => {
|
|
1494
|
+
let t = e.getParent(), n = {};
|
|
1495
|
+
t.operator = p.BuiltInOperatorNames.Color, t.param = n, e.copyToObject(n, "cellColor"), e.copyToObject(n, "styleId", Z, "dxfId");
|
|
1496
|
+
}
|
|
1497
|
+
}), c.registerVisitor({
|
|
1498
|
+
from: "iconFilter",
|
|
1499
|
+
openTag: (e) => {
|
|
1500
|
+
let t = e.getParent(), n = {};
|
|
1501
|
+
t.operator = p.BuiltInOperatorNames.Icon, t.param = n, e.copyToObject(n, "iconId", Z), e.copyToObject(n, "iconSet", $);
|
|
1502
|
+
}
|
|
1503
|
+
}), c.registerVisitor({
|
|
1504
|
+
from: "top10",
|
|
1505
|
+
openTag: (e) => {
|
|
1506
|
+
let t = e.getParent(), n = {};
|
|
1507
|
+
t.operator = p.BuiltInOperatorNames.TopN, t.param = n, e.copyToObject(n, "filterVal", Q), e.copyToObject(n, "percent", X), e.copyToObject(n, "top", X), e.copyToObject(n, "limit", Q, "val");
|
|
1508
|
+
}
|
|
1509
|
+
}), c.registerVisitor({
|
|
1510
|
+
from: "dynamicFilter",
|
|
1511
|
+
openTag: (e) => {
|
|
1512
|
+
let t = e.getParent(), n = {};
|
|
1513
|
+
t.operator = p.BuiltInOperatorNames.TimePeriod, t.param = n;
|
|
1514
|
+
let r = e.getAttribute("type");
|
|
1515
|
+
Object.values(p.AverageType).includes(r) ? (t.operator = p.BuiltInOperatorNames.Average, e.copyToObject(n, "stdDevs", Z, "val")) : e.copyToObject(n, "anchorDate", Z, "val"), e.copyToObject(n, "operator", $, "type"), e.copyToObject(n, "maxVal", Q, "maxVal");
|
|
1516
|
+
}
|
|
1517
|
+
}), c.registerVisitor({
|
|
1518
|
+
from: "filters",
|
|
1519
|
+
to: {},
|
|
1520
|
+
openTag: (e) => {
|
|
1521
|
+
let t = e.getParent(), n = {};
|
|
1522
|
+
return t.operator = p.BuiltInOperatorNames.InSet, t.param = n, e.copyToObject(n, "blank", X), e.copyToObject(n, "calendarType", $), n;
|
|
1523
|
+
}
|
|
1524
|
+
}), c.registerVisitor({
|
|
1525
|
+
from: "filter",
|
|
1526
|
+
openTag: (e) => {
|
|
1527
|
+
let t = e.getParent(), n = t.items;
|
|
1528
|
+
n || (n = [], t.items = n), n.push(e.getAttribute("val", $));
|
|
1529
|
+
}
|
|
1530
|
+
}), c.registerVisitor({
|
|
1531
|
+
from: "dateGroupItem",
|
|
1532
|
+
to: {},
|
|
1533
|
+
openTag: (e) => {
|
|
1534
|
+
let t = e.getParent(), n = t.dateGroups;
|
|
1535
|
+
n || (n = [], t.dateGroups = n), n.push(e.getSource()), e.copyTo("group", $, "dateTimeGrouping"), e.copyTo("day", Z), e.copyTo("hour", Z), e.copyTo("minute", Z), e.copyTo("month", Z), e.copyTo("second", Z), e.copyTo("year", Z);
|
|
1536
|
+
}
|
|
1537
|
+
}), c.registerVisitor({
|
|
1538
|
+
from: "customFilters",
|
|
1539
|
+
openTag: (e) => {
|
|
1540
|
+
let t = e.getParent(), n = e.getAttribute("and"), r = n === "and" || n === "1", i = [];
|
|
1541
|
+
return t.operator = r ? p.BuiltInOperatorNames.And : p.BuiltInOperatorNames.Or, t.param = i, e.setSource(t), i;
|
|
1542
|
+
},
|
|
1543
|
+
closeTag: (e) => {
|
|
1544
|
+
let t = e.getSource(), n = t?.param;
|
|
1545
|
+
if (n?.length !== 1) return;
|
|
1546
|
+
let r = n[0];
|
|
1547
|
+
t.operator = r.operator, t.param = r.param;
|
|
1548
|
+
}
|
|
1549
|
+
}), c.registerVisitor({
|
|
1550
|
+
from: "customFilter",
|
|
1551
|
+
openTag: (e) => {
|
|
1552
|
+
let t, n = e.getParent();
|
|
1553
|
+
Array.isArray(n) ? (t = {}, n.push(t)) : t = n;
|
|
1554
|
+
let r = k({
|
|
1555
|
+
operator: e.getAttribute("operator"),
|
|
1556
|
+
val: e.getAttribute("val")
|
|
1557
|
+
});
|
|
1558
|
+
r && (t.operator = r.operator, t.param = r.param);
|
|
1559
|
+
}
|
|
1560
|
+
}), c.registerVisitor({
|
|
1561
|
+
from: "sortState",
|
|
1562
|
+
to: {},
|
|
1563
|
+
openTag: (e) => {
|
|
1564
|
+
let t = e.getParent(), n = t.v;
|
|
1565
|
+
n && (n.sort = {}, e.setSource(t));
|
|
1566
|
+
}
|
|
1567
|
+
}), c.registerVisitor({
|
|
1568
|
+
from: "sortCondition",
|
|
1569
|
+
to: {},
|
|
1570
|
+
openTag: (e) => {
|
|
1571
|
+
let t = e.getParent(), n = t.v;
|
|
1572
|
+
if (!n) return;
|
|
1573
|
+
let r = n.sort;
|
|
1574
|
+
if (!r) return;
|
|
1575
|
+
let i = r.sorts;
|
|
1576
|
+
i || (i = [], r.sorts = i);
|
|
1577
|
+
let a = e.getAttribute("ref"), o = 0;
|
|
1578
|
+
if (a) {
|
|
1579
|
+
let e = f.fastStringToRange(a, Mt).colStart, n = t.r, r = n.colStart;
|
|
1580
|
+
o = n ? e - r : e;
|
|
1581
|
+
}
|
|
1582
|
+
let s = {};
|
|
1583
|
+
e.copyToObject(s, "sortOn", $, "sortBy"), e.copyToObject(s, "dxfId", $, "sortBy"), e.copyToObject(s, "iconSet", $), e.copyToObject(s, "customList", $), s.reverse = e.getAttribute("descending", X) ?? !1;
|
|
1584
|
+
let c = {
|
|
1585
|
+
index: o,
|
|
1586
|
+
criteria: s
|
|
1587
|
+
};
|
|
1588
|
+
i.push(c);
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
let ee = (e) => {
|
|
1592
|
+
v = e.getSource(), e.copyTo("topLeft", $, "topLeftCell");
|
|
1593
|
+
let t = we(e.getAttribute("defaultGridColor")), n = e.getAttribute("colorId");
|
|
1594
|
+
n === null || t || (e.getSource().gridLineColor = "index" + parseFloat(n)), e.copyTo("showZeros", X), e.copyTo("showFormulas", X), e.copyTo("zoomScale", Z), e.copyTo("showRowHeaders", X, "showRowColHeaders"), e.copyTo("showColumnHeaders", X, "showRowColHeaders"), e.copyTo("showRowGridlines", X, "showGridLines"), e.copyTo("showColumnGridlines", X, "showGridLines"), e.copyTo("rightToLeft", X);
|
|
1595
|
+
};
|
|
1596
|
+
c.registerVisitor({
|
|
1597
|
+
from: "sheetView",
|
|
1598
|
+
to: "view",
|
|
1599
|
+
openTag: (e) => {
|
|
1600
|
+
ee(e);
|
|
1601
|
+
},
|
|
1602
|
+
closeTag: () => {
|
|
1603
|
+
v = null;
|
|
1604
|
+
}
|
|
1605
|
+
}), c.registerVisitor({
|
|
1606
|
+
from: "customSheetViews",
|
|
1607
|
+
to: "customSheetViews",
|
|
1608
|
+
openTag: (e) => {
|
|
1609
|
+
e.setSource([]);
|
|
1610
|
+
}
|
|
1611
|
+
}), c.registerVisitor({
|
|
1612
|
+
from: "customSheetView",
|
|
1613
|
+
to: [],
|
|
1614
|
+
openTag: (e) => {
|
|
1615
|
+
ee(e);
|
|
1616
|
+
},
|
|
1617
|
+
closeTag: () => {
|
|
1618
|
+
v = null;
|
|
1619
|
+
}
|
|
1620
|
+
}), c.registerVisitor({
|
|
1621
|
+
from: "selection",
|
|
1622
|
+
to: "selection",
|
|
1623
|
+
openTag: (e) => {
|
|
1624
|
+
if (!v) return;
|
|
1625
|
+
e.copyTo("cell", $, "activeCell"), e.copyTo("rangeIndex", Z, "activeCellId");
|
|
1626
|
+
let t = e.getAttribute("activeCell"), n = e.getAttribute("sqref");
|
|
1627
|
+
n && n !== t && (e.getSource().ranges = n.trim().split(/\s+/));
|
|
1628
|
+
}
|
|
1629
|
+
}), c.registerVisitor({
|
|
1630
|
+
from: "pane",
|
|
1631
|
+
to: null,
|
|
1632
|
+
openTag: (e) => {
|
|
1633
|
+
if (v && e.getAttribute("state") === "frozen") {
|
|
1634
|
+
let t = {};
|
|
1635
|
+
v.freezePanes = t, e.copyToObject(t, "topLeft", $, "topLeftCell");
|
|
1636
|
+
let n = (v.topLeft ? f.fastStringToCell(v.topLeft) : void 0) ?? {
|
|
1637
|
+
colIndex: 0,
|
|
1638
|
+
rowIndex: 0
|
|
1639
|
+
}, r = {
|
|
1640
|
+
colIndex: 0,
|
|
1641
|
+
rowIndex: 0
|
|
1642
|
+
};
|
|
1643
|
+
e.copyToObject(r, "colIndex", Z, "xSplit"), e.copyToObject(r, "rowIndex", Z, "ySplit");
|
|
1644
|
+
let i = {
|
|
1645
|
+
colIndex: n.colIndex + r.colIndex,
|
|
1646
|
+
rowIndex: n.rowIndex + r.rowIndex
|
|
1647
|
+
};
|
|
1648
|
+
t.coords = f.cellToString(i);
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}), c.registerVisitor({
|
|
1652
|
+
from: "sheetPr",
|
|
1653
|
+
transparent: !0,
|
|
1654
|
+
openTag: (t) => {
|
|
1655
|
+
let n = t.getAttribute("codeName");
|
|
1656
|
+
n && (e.codeName = n), !1 === t.getAttribute("enableFormatConditionsCalculation", X) && (e.conditionalFormatCalculation = !1);
|
|
1657
|
+
}
|
|
1658
|
+
}), c.registerVisitor({
|
|
1659
|
+
from: "tabColor",
|
|
1660
|
+
to: null,
|
|
1661
|
+
openTag: (t) => {
|
|
1662
|
+
let n = be((e) => t.getAttribute(e));
|
|
1663
|
+
n && (e.tabColor = n);
|
|
1664
|
+
}
|
|
1665
|
+
}), c.registerVisitor({
|
|
1666
|
+
from: "pageSetUpPr",
|
|
1667
|
+
to: "pageSetUpPr",
|
|
1668
|
+
openTag: (e) => {}
|
|
1669
|
+
}), c.registerVisitor({
|
|
1670
|
+
from: "outlinePr",
|
|
1671
|
+
to: null,
|
|
1672
|
+
openTag: (t) => {
|
|
1673
|
+
let n = {};
|
|
1674
|
+
t.copyToObject(n, "summaryBelow", X), t.copyToObject(n, "summaryRight", X), t.copyToObject(n, "showOutlineSymbols", X), t.copyToObject(n, "applyStyles", X), Object.keys(n).length > 0 && (e.outline = n);
|
|
1675
|
+
}
|
|
1676
|
+
}), c.registerVisitor({
|
|
1677
|
+
from: "pageMargins",
|
|
1678
|
+
to: "pageMargins",
|
|
1679
|
+
openTag: (e) => {
|
|
1680
|
+
e.copyTo("bottom", Q), e.copyTo("footer", Q), e.copyTo("header", Q), e.copyTo("left", Q), e.copyTo("right", Q), e.copyTo("top", Q), e.copyTo("bottom", Q);
|
|
1681
|
+
}
|
|
1682
|
+
}), c.registerVisitor({
|
|
1683
|
+
from: "pageSetup",
|
|
1684
|
+
to: "pageSetup",
|
|
1685
|
+
openTag: (e) => {
|
|
1686
|
+
e.copyTo("blackAndWhite", X), e.copyTo("cellComments"), e.copyTo("copies", Z), e.copyTo("draft", X), e.copyTo("errors"), e.copyTo("firstPageNumber", Z), e.copyTo("fitToHeight", Z), e.copyTo("fitToWidth", Z), e.copyTo("horizontalDpi", Z), e.copyTo("orientation"), e.copyTo("pageOrder"), e.copyTo("paperSize", Z), e.copyTo("scale", Z), e.copyTo("useFirstPageNumber", X), e.copyTo("usePrinterDefaults", X), e.copyTo("verticalDpi", Z);
|
|
1687
|
+
}
|
|
1688
|
+
}), c.registerVisitor({
|
|
1689
|
+
from: "printOptions",
|
|
1690
|
+
to: "printOptions",
|
|
1691
|
+
openTag: (e) => {
|
|
1692
|
+
e.copyTo("gridLines", X), e.copyTo("gridLinesSet", X), e.copyTo("headings", X), e.copyTo("horizontalCentered", X), e.copyTo("verticalCentered", X);
|
|
1693
|
+
}
|
|
1694
|
+
}), c.registerVisitor({
|
|
1695
|
+
from: "headerFoot",
|
|
1696
|
+
to: "headerFoot",
|
|
1697
|
+
openTag: (e) => {}
|
|
1698
|
+
}), c.registerVisitor({
|
|
1699
|
+
from: "mergeCells",
|
|
1700
|
+
to: "merges",
|
|
1701
|
+
openTag: (e) => {
|
|
1702
|
+
e.setSource([]);
|
|
1703
|
+
}
|
|
1704
|
+
}), c.registerVisitor({
|
|
1705
|
+
from: "dataValidations",
|
|
1706
|
+
to: "validations",
|
|
1707
|
+
openTag: (e) => {
|
|
1708
|
+
e.setSource([]);
|
|
1709
|
+
}
|
|
1710
|
+
});
|
|
1711
|
+
let x = {
|
|
1712
|
+
from: "dataValidation",
|
|
1713
|
+
to: [],
|
|
1714
|
+
openTag: (e) => {
|
|
1715
|
+
let t = e.getAttribute("sqref");
|
|
1716
|
+
t &&= t.trim().split(/\s+/).join(",");
|
|
1717
|
+
let n = {}, r = {
|
|
1718
|
+
r: t,
|
|
1719
|
+
v: n,
|
|
1720
|
+
rule: {
|
|
1721
|
+
type: e.getAttribute("type") ?? void 0,
|
|
1722
|
+
operator: e.getAttribute("operator") ?? void 0
|
|
1723
|
+
}
|
|
1724
|
+
};
|
|
1725
|
+
!0 === e.getAttribute("showDropDown", X) && (n.hideDropdown = !0), e.copyToObject(n, "alert", $, "error"), e.copyToObject(n, "alertTitle", $, "errorTitle"), e.copyToObject(n, "showAlertMessage", X, "showErrorMessage"), n.alertStyle = e.getAttribute("errorStyle") ?? "stop", e.copyToObject(n, "imeMode"), e.copyToObject(n, "prompt"), e.copyToObject(n, "promptTitle"), e.copyToObject(n, "showPromptMessage", X, "showInputMessage"), e.setSource(r);
|
|
1726
|
+
},
|
|
1727
|
+
closeTag: (e) => {
|
|
1728
|
+
let t = e.getSource();
|
|
1729
|
+
if (!t?.rule) return;
|
|
1730
|
+
let n = fe(t.rule, a);
|
|
1731
|
+
n && (e.getAttribute("allowBlank", X) && (n.includeBlanks = !0), t.v.condition = n), delete t.rule;
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
c.registerVisitor(x), c.registerVisitor({
|
|
1735
|
+
from: "formula1",
|
|
1736
|
+
to: {},
|
|
1737
|
+
text: (e, t) => {
|
|
1738
|
+
let n = t.getParent().rule;
|
|
1739
|
+
n?.type && (n.formula1 = D(g(e), n.type));
|
|
1740
|
+
}
|
|
1741
|
+
}), c.registerVisitor({
|
|
1742
|
+
from: "formula2",
|
|
1743
|
+
to: {},
|
|
1744
|
+
text: (e, t) => {
|
|
1745
|
+
let n = t.getParent().rule;
|
|
1746
|
+
n?.type && (n.formula2 = D(g(e), n.type));
|
|
1747
|
+
}
|
|
1748
|
+
}), c.registerVisitor({
|
|
1749
|
+
from: "picture",
|
|
1750
|
+
to: "picture",
|
|
1751
|
+
openTag: (e) => {
|
|
1752
|
+
let n = e.getAttribute("r:id");
|
|
1753
|
+
if (!n) return void e.warn("A picture names no image; it was not imported.", { onceKey: "xlsx.sheet.picture.noRel" });
|
|
1754
|
+
let r = t(n, "resource");
|
|
1755
|
+
e.getSource().resId = r;
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
let te = {
|
|
1759
|
+
from: "slicer",
|
|
1760
|
+
to: {},
|
|
1761
|
+
openTag: (e) => {
|
|
1762
|
+
let n = e.getAttribute("r:id");
|
|
1763
|
+
if (!n) return void e.warn("A slicer names no cache; it was not imported.", { onceKey: "xlsx.sheet.slicer.noRel" });
|
|
1764
|
+
let r = t(n)?.slicers, i = e.getParent();
|
|
1765
|
+
i.slicers ||= {};
|
|
1766
|
+
let a = Object.keys(r);
|
|
1767
|
+
for (let e of a) i.slicers[e] = r[e];
|
|
1768
|
+
}
|
|
1769
|
+
};
|
|
1770
|
+
c.registerVisitor(te);
|
|
1771
|
+
let ae = (e, t) => ({
|
|
1772
|
+
from: e,
|
|
1773
|
+
to: {},
|
|
1774
|
+
openTag: (e) => {
|
|
1775
|
+
e.setSource("");
|
|
1776
|
+
},
|
|
1777
|
+
text: (e, t) => {
|
|
1778
|
+
t.setSource((t.getSource() ?? "") + e);
|
|
1779
|
+
},
|
|
1780
|
+
closeTag: (e) => {
|
|
1781
|
+
t(String(e.getSource() ?? ""), e);
|
|
1782
|
+
}
|
|
1783
|
+
}), oe = /* @__PURE__ */ new Map();
|
|
1784
|
+
oe.set("dataValidations", {
|
|
1785
|
+
from: "dataValidations",
|
|
1786
|
+
to: "validations",
|
|
1787
|
+
openTag: (e) => {
|
|
1788
|
+
let t = e.getParent();
|
|
1789
|
+
e.setSource(t.validations ?? []);
|
|
1790
|
+
},
|
|
1791
|
+
closeTag: (e) => {
|
|
1792
|
+
(e.getSource()?.length ?? 0) === 0 && e.setSource(void 0);
|
|
1793
|
+
}
|
|
1794
|
+
}), oe.set("dataValidation", {
|
|
1795
|
+
...x,
|
|
1796
|
+
closeTag: (e) => {
|
|
1797
|
+
x.closeTag(e);
|
|
1798
|
+
let t = e.getSource();
|
|
1799
|
+
t && !t.r && (e.warn("x14 dataValidation with no xm:sqref was dropped."), e.setSource(void 0));
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
let le = (e) => ({
|
|
1803
|
+
from: e,
|
|
1804
|
+
to: {},
|
|
1805
|
+
openTag: (t) => {
|
|
1806
|
+
t.setSource({
|
|
1807
|
+
rule: t.getParent()?.rule,
|
|
1808
|
+
key: e
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1812
|
+
oe.set("formula1", le("formula1")), oe.set("formula2", le("formula2")), oe.set("f", ae("f", (e, t) => {
|
|
1813
|
+
let n = t.getParent(), r = n?.rule;
|
|
1814
|
+
r && (r[n.key] = D(g(e), r.type));
|
|
1815
|
+
})), oe.set("sqref", ae("sqref", (e, t) => {
|
|
1816
|
+
let n = t.getParent(), r = e.trim();
|
|
1817
|
+
n && r && (n.r = r.split(/\s+/).join(","));
|
|
1818
|
+
}));
|
|
1819
|
+
let de = /* @__PURE__ */ new Map(), C = [], w = /* @__PURE__ */ new Map();
|
|
1820
|
+
w.set("conditionalFormattings", {
|
|
1821
|
+
from: "conditionalFormattings",
|
|
1822
|
+
transparent: !0
|
|
1823
|
+
}), w.set("conditionalFormatting", {
|
|
1824
|
+
from: "conditionalFormatting",
|
|
1825
|
+
to: {},
|
|
1826
|
+
openTag: (e) => {
|
|
1827
|
+
e.setSource({ rules: [] });
|
|
1828
|
+
},
|
|
1829
|
+
closeTag: (e) => {
|
|
1830
|
+
let t = e.getSource(), n = t?.rules ?? [];
|
|
1831
|
+
for (let e = 0; e < n.length; e++) {
|
|
1832
|
+
let r = n[e];
|
|
1833
|
+
r.sqref = t.sqref, r.id ? de.set(r.id, r) : C.push(r);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
}), w.set("cfRule", {
|
|
1837
|
+
from: "cfRule",
|
|
1838
|
+
to: {},
|
|
1839
|
+
openTag: (e) => {
|
|
1840
|
+
e.copyTo("id", $), e.copyTo("type", $), e.copyTo("priority", Z), e.copyTo("stopIfTrue", X), e.copyTo("operator", $), e.copyTo("text", $), e.copyTo("timePeriod", $), e.copyTo("aboveAverage", X), e.copyTo("equalAverage", X), e.copyTo("stdDev", Z), e.copyTo("bottom", X), e.copyTo("percent", X), e.copyTo("rank", Z);
|
|
1841
|
+
},
|
|
1842
|
+
closeTag: (e) => {
|
|
1843
|
+
let t = e.getSource();
|
|
1844
|
+
t && e.getParent()?.rules?.push(t);
|
|
1845
|
+
}
|
|
1846
|
+
}), w.set("sqref", ae("sqref", (e, t) => {
|
|
1847
|
+
let n = t.getParent(), r = e.trim();
|
|
1848
|
+
n && r && (n.sqref = r);
|
|
1849
|
+
})), w.set("dataBar", {
|
|
1850
|
+
from: "dataBar",
|
|
1851
|
+
to: {},
|
|
1852
|
+
openTag: (e) => {
|
|
1853
|
+
e.copyTo("minLength", Z), e.copyTo("maxLength", Z), e.copyTo("gradient", X), e.copyTo("border", X), e.copyTo("direction", $), e.copyTo("axisPosition", $), e.copyTo("negativeBarColorSameAsPositive", X), e.copyTo("negativeBarBorderColorSameAsPositive", X);
|
|
1854
|
+
},
|
|
1855
|
+
closeTag: (e) => {
|
|
1856
|
+
e.getParent().dataBar = e.getSource();
|
|
1857
|
+
}
|
|
1858
|
+
}), w.set("iconSet", {
|
|
1859
|
+
from: "iconSet",
|
|
1860
|
+
to: {},
|
|
1861
|
+
openTag: (e) => {
|
|
1862
|
+
e.copyTo("iconSet", $), e.copyTo("custom", X), e.copyTo("reverse", X), e.copyTo("showValue", X);
|
|
1863
|
+
},
|
|
1864
|
+
closeTag: (e) => {
|
|
1865
|
+
e.getParent().iconSet = e.getSource();
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
let pe = /* @__PURE__ */ new Map();
|
|
1869
|
+
pe.set("f", ae("f", (e, t) => {
|
|
1870
|
+
let n = t.getParent();
|
|
1871
|
+
if (!n) return;
|
|
1872
|
+
let r = e.trim(), i = Number(r);
|
|
1873
|
+
n.value = r.length > 0 && Number.isFinite(i) ? i : g(e);
|
|
1874
|
+
})), w.set("cfvo", {
|
|
1875
|
+
from: "cfvo",
|
|
1876
|
+
to: {},
|
|
1877
|
+
scope: () => pe,
|
|
1878
|
+
openTag: (e) => {
|
|
1879
|
+
let t = e.getParent();
|
|
1880
|
+
t.conditions ||= [];
|
|
1881
|
+
let n = e.getSource();
|
|
1882
|
+
t.conditions.push(n), e.copyTo("type", $), !1 === e.getAttribute("gte", X) && (n.exclusive = !0);
|
|
1883
|
+
}
|
|
1884
|
+
}), w.set("f", ae("f", (e, t) => {
|
|
1885
|
+
let n = t.getParent();
|
|
1886
|
+
n && (n.formulas ??= []).push(g(e));
|
|
1887
|
+
})), w.set("dxf", {
|
|
1888
|
+
from: "dxf",
|
|
1889
|
+
to: {},
|
|
1890
|
+
raw: !0,
|
|
1891
|
+
closeTag: (e) => {
|
|
1892
|
+
if (!d) return;
|
|
1893
|
+
let t = e.getParent();
|
|
1894
|
+
if (!t) return;
|
|
1895
|
+
let n = d(e.getRawXml() ?? "");
|
|
1896
|
+
n && (t.style = n);
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
let he = (e) => ({
|
|
1900
|
+
from: e,
|
|
1901
|
+
to: {},
|
|
1902
|
+
openTag: (t) => {
|
|
1903
|
+
let n = be((e) => t.getAttribute(e));
|
|
1904
|
+
n && (t.getParent()[e] = n);
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
w.set("borderColor", he("borderColor")), w.set("negativeFillColor", he("negativeFillColor")), w.set("negativeBorderColor", he("negativeBorderColor")), w.set("axisColor", he("axisColor")), w.set("cfIcon", {
|
|
1908
|
+
from: "cfIcon",
|
|
1909
|
+
to: {},
|
|
1910
|
+
openTag: (e) => {
|
|
1911
|
+
let t = e.getAttribute("iconSet"), n = e.getAttribute("iconId", Z);
|
|
1912
|
+
if (t === null || n === null) return;
|
|
1913
|
+
let r = e.getParent();
|
|
1914
|
+
r.icons ||= [], r.icons.push({
|
|
1915
|
+
set: t,
|
|
1916
|
+
id: n
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
});
|
|
1920
|
+
let T = /* @__PURE__ */ new Map();
|
|
1921
|
+
T.set("id", ae("id", (e, t) => {
|
|
1922
|
+
let n = t.getParent(), r = e.trim();
|
|
1923
|
+
n && r && (n.x14Id = r);
|
|
1924
|
+
}));
|
|
1925
|
+
let E = /* @__PURE__ */ new Map();
|
|
1926
|
+
E.set("slicerList", {
|
|
1927
|
+
from: "slicerList",
|
|
1928
|
+
transparent: !0
|
|
1929
|
+
}), E.set("slicer", te);
|
|
1930
|
+
let ge = /* @__PURE__ */ new Map([
|
|
1931
|
+
[j(se), oe],
|
|
1932
|
+
[j(S), w],
|
|
1933
|
+
[j(ne), w],
|
|
1934
|
+
[j(h), T],
|
|
1935
|
+
[j(O), E],
|
|
1936
|
+
[j(ce), E]
|
|
1937
|
+
]), _e = /* @__PURE__ */ new Set();
|
|
1938
|
+
c.registerVisitor({
|
|
1939
|
+
from: "extLst",
|
|
1940
|
+
transparent: !0
|
|
1941
|
+
}), c.registerVisitor({
|
|
1942
|
+
from: "ext",
|
|
1943
|
+
transparent: !0,
|
|
1944
|
+
scope: (e) => {
|
|
1945
|
+
let t = e.getAttribute("uri"), n = j(t), r = ge.get(n);
|
|
1946
|
+
if (r) return r;
|
|
1947
|
+
if (!re.has(n) && !_e.has(n)) {
|
|
1948
|
+
_e.add(n);
|
|
1949
|
+
let r = b[n];
|
|
1950
|
+
e.warn(r ? `Extension content '${r}' (${t}) is not read; it will be lost on resave.` : `Unknown extension content (uri ${t}) is not read; it will be lost on resave.`);
|
|
1951
|
+
}
|
|
1952
|
+
return null;
|
|
1953
|
+
}
|
|
1954
|
+
}), c.registerVisitor({
|
|
1955
|
+
from: "mergeCell",
|
|
1956
|
+
to: [],
|
|
1957
|
+
openTag: (e) => {
|
|
1958
|
+
let t = e.getAttribute("ref");
|
|
1959
|
+
e.setSource(t);
|
|
1960
|
+
}
|
|
1961
|
+
}), c.registerVisitor({
|
|
1962
|
+
from: "hyperlinks",
|
|
1963
|
+
to: "hyperlinks",
|
|
1964
|
+
openTag: (e) => {
|
|
1965
|
+
e.setSource([]);
|
|
1966
|
+
}
|
|
1967
|
+
}), c.registerVisitor({
|
|
1968
|
+
from: "hyperlink",
|
|
1969
|
+
to: [],
|
|
1970
|
+
openTag: (e) => {
|
|
1971
|
+
let n = e.getAttribute("r:id"), r = e.getAttribute("ref");
|
|
1972
|
+
if (!r) return void e.warn("A hyperlink has no ref; it was dropped.", { onceKey: "xlsx.sheet.hyperlink.noRef" });
|
|
1973
|
+
e.setKey(r);
|
|
1974
|
+
let i = n ? t(n) : "";
|
|
1975
|
+
if (typeof i != "string") return void e.warn("A hyperlink has an invalid address; it was dropped.", { onceKey: "xlsx.sheet.hyperlink.address" });
|
|
1976
|
+
i.endsWith("\\") && (i = i.substring(0, i.length - 1));
|
|
1977
|
+
let a = e.getAttribute("location");
|
|
1978
|
+
if (a && (i += "#" + a), !i) return void e.warn("A hyperlink has no address; it was dropped.", { onceKey: "xlsx.sheet.hyperlink.address" });
|
|
1979
|
+
let o, s = e.getAttribute("tooltip");
|
|
1980
|
+
o = s ? {
|
|
1981
|
+
address: i,
|
|
1982
|
+
screenTip: s
|
|
1983
|
+
} : i, e.setSource({
|
|
1984
|
+
r,
|
|
1985
|
+
v: o
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
}), c.registerVisitor({
|
|
1989
|
+
from: "drawing",
|
|
1990
|
+
to: "movables",
|
|
1991
|
+
openTag: (e) => {
|
|
1992
|
+
let n = e.getAttribute("r:id");
|
|
1993
|
+
if (!n) return;
|
|
1994
|
+
let r = t(n);
|
|
1995
|
+
r ? e.setSource(r.movables) : e.warn("A drawing part is missing; its shapes were not imported.", { onceKey: "xlsx.sheet.drawing.missing" });
|
|
1996
|
+
}
|
|
1997
|
+
}), c.registerVisitor({
|
|
1998
|
+
from: "legacyDrawing",
|
|
1999
|
+
to: "legacyDrawing",
|
|
2000
|
+
openTag: (e) => {
|
|
2001
|
+
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2002
|
+
}
|
|
2003
|
+
}), c.registerVisitor({
|
|
2004
|
+
from: "legacyDrawingHF",
|
|
2005
|
+
to: "legacyDrawingHF",
|
|
2006
|
+
openTag: (e) => {
|
|
2007
|
+
e.setSource(t(e.getAttribute("r:id"), "legacyDrawing") ?? void 0);
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
let M = null, ve = !1, ye = /* @__PURE__ */ new Map(), xe = {
|
|
2011
|
+
from: "Fallback",
|
|
2012
|
+
to: null
|
|
2013
|
+
}, Se = {
|
|
2014
|
+
from: "Choice",
|
|
2015
|
+
transparent: !0
|
|
2016
|
+
};
|
|
2017
|
+
ye.set("Fallback", xe), ye.set("Choice", Se), ye.set("control", {
|
|
2018
|
+
from: "control",
|
|
2019
|
+
transparent: !0,
|
|
2020
|
+
openTag: (e) => {
|
|
2021
|
+
let n = {}, r = parseInt(e.getAttribute("shapeId") ?? "", 10);
|
|
2022
|
+
isNaN(r) || (n.shapeId = r);
|
|
2023
|
+
let i = e.getAttribute("r:id"), a = i ? t(i, "part") : null;
|
|
2024
|
+
a && (n.part = a);
|
|
2025
|
+
let o = e.getAttribute("name"), s = {
|
|
2026
|
+
anchor: {
|
|
2027
|
+
tl: {
|
|
2028
|
+
c: 0,
|
|
2029
|
+
r: 0,
|
|
2030
|
+
x: 0,
|
|
2031
|
+
y: 0
|
|
2032
|
+
},
|
|
2033
|
+
br: {
|
|
2034
|
+
c: 0,
|
|
2035
|
+
r: 0,
|
|
2036
|
+
x: 0,
|
|
2037
|
+
y: 0
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
content: {
|
|
2041
|
+
type: "control",
|
|
2042
|
+
json: n
|
|
2043
|
+
}
|
|
2044
|
+
};
|
|
2045
|
+
o && (s.name = o), M = {
|
|
2046
|
+
movable: s,
|
|
2047
|
+
control: n
|
|
2048
|
+
};
|
|
2049
|
+
},
|
|
2050
|
+
closeTag: () => {
|
|
2051
|
+
M &&= (e.movables ||= [], e.movables.push(M.movable), null);
|
|
2052
|
+
}
|
|
2053
|
+
}), ye.set("controlPr", {
|
|
2054
|
+
from: "controlPr",
|
|
2055
|
+
transparent: !0,
|
|
2056
|
+
raw: !0,
|
|
2057
|
+
openTag: (e) => {
|
|
2058
|
+
if (!M) return;
|
|
2059
|
+
let t = e.getFrom().attributes ?? {}, n = {};
|
|
2060
|
+
for (let e in t) {
|
|
2061
|
+
let r = t[e];
|
|
2062
|
+
n[e] = typeof r == "string" ? r : r?.value ?? "";
|
|
2063
|
+
}
|
|
2064
|
+
Object.keys(n).length > 0 && (M.control.props = n);
|
|
2065
|
+
},
|
|
2066
|
+
closeTag: (e) => {
|
|
2067
|
+
if (!M) return;
|
|
2068
|
+
let t = ((e) => {
|
|
2069
|
+
let t = /<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);
|
|
2070
|
+
if (!t) return null;
|
|
2071
|
+
let n = t[2], r = (e) => RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1], i = t[1], a = /\bmoveWithCells="(?:1|true)"/.test(i), o = /\bsizeWithCells="(?:1|true)"/.test(i);
|
|
2072
|
+
return {
|
|
2073
|
+
anchor: {
|
|
2074
|
+
tl: Dt(r("from")),
|
|
2075
|
+
br: Dt(r("to"))
|
|
2076
|
+
},
|
|
2077
|
+
anchorType: a ? o ? "twoCell" : "oneCell" : "absolute",
|
|
2078
|
+
rest: (e.slice(0, t.index) + e.slice(t.index + t[0].length)).trim()
|
|
2079
|
+
};
|
|
2080
|
+
})(e.getRawXml() ?? "");
|
|
2081
|
+
t ? (M.movable.anchor = t.anchor, t.anchorType !== "twoCell" && (M.movable.anchorType = t.anchorType), t.rest && (M.control.xml = t.rest)) : ve || (ve = !0, e.warn("A form control has no anchor; it is placed at the top left of the sheet."));
|
|
2082
|
+
}
|
|
2083
|
+
});
|
|
2084
|
+
let Ce = {
|
|
2085
|
+
from: "controls",
|
|
2086
|
+
transparent: !0,
|
|
2087
|
+
scope: () => ye
|
|
2088
|
+
};
|
|
2089
|
+
c.registerVisitor(Ce);
|
|
2090
|
+
let Te = /* @__PURE__ */ new Map([
|
|
2091
|
+
["Choice", Se],
|
|
2092
|
+
["Fallback", xe],
|
|
2093
|
+
["controls", Ce]
|
|
2094
|
+
]);
|
|
2095
|
+
c.registerVisitor({
|
|
2096
|
+
from: "AlternateContent",
|
|
2097
|
+
transparent: !0,
|
|
2098
|
+
scope: () => Te
|
|
2099
|
+
}), c.registerVisitor({
|
|
2100
|
+
from: "tableParts",
|
|
2101
|
+
to: "tables",
|
|
2102
|
+
openTag: (e) => {
|
|
2103
|
+
e.setSource([]);
|
|
2104
|
+
}
|
|
2105
|
+
}), c.registerVisitor({
|
|
2106
|
+
from: "tablePart",
|
|
2107
|
+
to: [],
|
|
2108
|
+
openTag: (e) => {
|
|
2109
|
+
let n = e.getAttribute("r:id");
|
|
2110
|
+
if (!n) return;
|
|
2111
|
+
let r = t(n);
|
|
2112
|
+
r ? e.setSource(r) : e.warn("A table part is missing; the table was not imported.", { onceKey: "xlsx.sheet.table.missing" });
|
|
2113
|
+
}
|
|
2114
|
+
});
|
|
2115
|
+
let Ee = (e, t) => {
|
|
2116
|
+
t.conditions?.length && (e.stops = y(t)), t.minLength !== void 0 && (e.minLength = t.minLength), t.maxLength !== void 0 && (e.maxLength = t.maxLength), (t.gradient ?? 1) && (e.gradient = !0), t.border && t.borderColor && (e.borderColor = t.borderColor), !t.negativeBarColorSameAsPositive && t.negativeFillColor && (e.negativeFillColor = t.negativeFillColor), !(t.negativeBarBorderColorSameAsPositive ?? 1) && t.negativeBorderColor && (e.negativeBorderColor = t.negativeBorderColor), t.axisColor && (e.axisColor = t.axisColor), t.axisPosition !== "middle" && t.axisPosition !== "none" || (e.axisPosition = t.axisPosition), t.direction !== "leftToRight" && t.direction !== "rightToLeft" || (e.direction = t.direction);
|
|
2117
|
+
}, N = (e, t) => {
|
|
2118
|
+
t.conditions?.length && (e.stops = y(t)), t.iconSet && t.iconSet !== e.iconSet && (e.iconSet = t.iconSet), t.icons?.length && (e.icon = t.icons), t.reverse !== void 0 && (e.reverse = t.reverse), t.showValue !== void 0 && (e.showValue = t.showValue);
|
|
2119
|
+
}, De = (e) => {
|
|
2120
|
+
if (!e.sqref) return null;
|
|
2121
|
+
let t = e.sqref.split(/\s+/).join(",");
|
|
2122
|
+
if (e.type === "iconSet") {
|
|
2123
|
+
if (!e.iconSet) return null;
|
|
2124
|
+
let n = {
|
|
2125
|
+
type: l.ScaleType.IconSet,
|
|
2126
|
+
stops: []
|
|
2127
|
+
};
|
|
2128
|
+
return N(n, e.iconSet), {
|
|
2129
|
+
r: t,
|
|
2130
|
+
v: { scale: n },
|
|
2131
|
+
priority: e.priority
|
|
2132
|
+
};
|
|
2133
|
+
}
|
|
2134
|
+
let n = ie(e, a);
|
|
2135
|
+
if (!n) return null;
|
|
2136
|
+
let r = { condition: n };
|
|
2137
|
+
return e.style && (r.style = e.style), e.stopIfTrue && (r.stopIfTrue = !0), {
|
|
2138
|
+
r: t,
|
|
2139
|
+
v: r,
|
|
2140
|
+
priority: e.priority
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
c.registerVisitor({
|
|
2144
|
+
from: "worksheet",
|
|
2145
|
+
to: {},
|
|
2146
|
+
openTag: (e) => {},
|
|
2147
|
+
closeTag: (e) => {
|
|
2148
|
+
let t = e.getSource(), n = t?.conditionals;
|
|
2149
|
+
if (n) for (let e = 0; e < n.length; e++) {
|
|
2150
|
+
let t = n[e], r = t.x14Id;
|
|
2151
|
+
if (!r) continue;
|
|
2152
|
+
delete t.x14Id;
|
|
2153
|
+
let i = de.get(r);
|
|
2154
|
+
if (!i) continue;
|
|
2155
|
+
de.delete(r);
|
|
2156
|
+
let a = t.v?.scale;
|
|
2157
|
+
i.dataBar && a?.type === l.ScaleType.DataBar ? Ee(a, i.dataBar) : i.iconSet && a?.type === l.ScaleType.IconSet && N(a, i.iconSet);
|
|
2158
|
+
}
|
|
2159
|
+
let r = [...de.values(), ...C], i = /* @__PURE__ */ new Set(), o = 0;
|
|
2160
|
+
for (let e = 0; e < r.length; e++) {
|
|
2161
|
+
let a = De(r[e]);
|
|
2162
|
+
a ? (n || (n = [], t.conditionals = n), n.push(a)) : (i.add(r[e].type ?? "unknown"), o++);
|
|
2163
|
+
}
|
|
2164
|
+
if (o > 0) {
|
|
2165
|
+
let e = [...i].map((e) => `'${e}'`).join(", ");
|
|
2166
|
+
a?.(o === 1 ? `An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.` : `${o} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`);
|
|
2167
|
+
}
|
|
2168
|
+
if (n) {
|
|
2169
|
+
n.length > 1 && n.sort((e, t) => (e.priority ?? Infinity) - (t.priority ?? Infinity));
|
|
2170
|
+
for (let e = 0; e < n.length; e++) delete n[e].priority;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
}), c.registerVisitor({
|
|
2174
|
+
from: "customProperties",
|
|
2175
|
+
to: "customProperties",
|
|
2176
|
+
openTag: (e) => {
|
|
2177
|
+
e.setSource([]);
|
|
2178
|
+
},
|
|
2179
|
+
closeTag: (e) => {
|
|
2180
|
+
let t = e.getSource();
|
|
2181
|
+
t.length > 0 && (e.getParent().customProperties = t);
|
|
2182
|
+
}
|
|
2183
|
+
}), c.registerVisitor({
|
|
2184
|
+
from: "customPr",
|
|
2185
|
+
to: {},
|
|
2186
|
+
openTag: (e) => {
|
|
2187
|
+
let n = e.getParent();
|
|
2188
|
+
e.copyTo("name");
|
|
2189
|
+
let r = e.getAttribute("r:id");
|
|
2190
|
+
if (!r) return void e.warn("A custom property names no part; it was not imported.", { onceKey: "xlsx.sheet.customProperty.noRel" });
|
|
2191
|
+
let i = t(r, "resource"), a = e.getSource();
|
|
2192
|
+
a.resId = i, n.push(a);
|
|
2193
|
+
}
|
|
2194
|
+
}), c.registerVisitor({
|
|
2195
|
+
from: "sheetProtection",
|
|
2196
|
+
to: "protection",
|
|
2197
|
+
openTag: (e) => {
|
|
2198
|
+
let t = e.getSource();
|
|
2199
|
+
for (let n of me) {
|
|
2200
|
+
let r = e.hasAttribute(n.attribute) ? e.getAttribute(n.attribute) : null;
|
|
2201
|
+
t[n.key] = A(n, r);
|
|
2202
|
+
}
|
|
2203
|
+
if (t.sheet) return;
|
|
2204
|
+
let n = {};
|
|
2205
|
+
e.copyToObject(n, "hash", $, "hashValue"), e.copyToObject(n, "algorithm", $, "algorithmName"), e.copyToObject(n, "salt", $, "saltValue"), e.copyToObject(n, "spinCount", Z), Object.keys(n).length > 0 && (e.getSource().password = n);
|
|
2206
|
+
}
|
|
2207
|
+
}), c.registerVisitor({
|
|
2208
|
+
from: "protectedRanges",
|
|
2209
|
+
to: "protectedRanges",
|
|
2210
|
+
openTag: (e) => {
|
|
2211
|
+
e.setSource([]);
|
|
2212
|
+
}
|
|
2213
|
+
}), c.registerVisitor({
|
|
2214
|
+
from: "protectedRange",
|
|
2215
|
+
to: [],
|
|
2216
|
+
openTag: (e) => {
|
|
2217
|
+
let t = e.getAttribute("sqref");
|
|
2218
|
+
t &&= t.trim().split(/\s+/).join(",");
|
|
2219
|
+
let n = {}, r = {
|
|
2220
|
+
r: t,
|
|
2221
|
+
v: n
|
|
2222
|
+
};
|
|
2223
|
+
e.copyToObject(n, "name"), e.copyToObject(n, "securityDescriptor");
|
|
2224
|
+
let i = {};
|
|
2225
|
+
e.copyToObject(i, "hash", $, "hashValue"), e.copyToObject(i, "algorithm", $, "algorithmName"), e.copyToObject(i, "salt", $, "saltValue"), e.copyToObject(i, "spinCount", Z), Object.keys(i).length > 0 && (n.password = i), e.setSource(r);
|
|
2226
|
+
},
|
|
2227
|
+
closeTag: (e) => {
|
|
2228
|
+
let t = e.getSource();
|
|
2229
|
+
t?.r && t.v.name || e.setSource(void 0);
|
|
2230
|
+
}
|
|
2231
|
+
}), c.registerVisitor({
|
|
2232
|
+
from: "sheetFormatPr",
|
|
2233
|
+
to: "sheetFormatPr",
|
|
2234
|
+
openTag: (t) => {
|
|
2235
|
+
t.copyToObject(e, "defaultColSize", Q, "defaultColWidth"), t.copyToObject(e, "outlineLevelCol", Z, "outlineLevelCol");
|
|
2236
|
+
let n = t.getAttribute("customHeight");
|
|
2237
|
+
n !== "1" && n !== "true" || t.copyToObject(e, "defaultRowSize", Q, "defaultRowHeight"), t.copyToObject(e, "outlineLevelRow", Z, "outlineLevelRow");
|
|
2238
|
+
}
|
|
2239
|
+
}), c.registerVisitor({
|
|
2240
|
+
from: "cols",
|
|
2241
|
+
to: "cols",
|
|
2242
|
+
openTag: (e) => {
|
|
2243
|
+
e.setSource([]);
|
|
2244
|
+
}
|
|
2245
|
+
}), c.registerVisitor({
|
|
2246
|
+
from: "col",
|
|
2247
|
+
to: [],
|
|
2248
|
+
openTag: (e) => {
|
|
2249
|
+
let t = e.getSource(), n = e.getAttribute("min"), r = e.getAttribute("max"), i = n === void 0 ? 0 : parseInt(n) - 1, a = r === void 0 ? i : parseInt(r) - 1;
|
|
2250
|
+
t.r = f.runToString(i, a, !0);
|
|
2251
|
+
let o = {};
|
|
2252
|
+
t.v = o, e.copyToObject(o, "sz", Q, "width"), e.copyToObject(o, "csz", X, "customWidth"), e.copyToObject(o, "h", X, "hidden"), e.copyToObject(o, "l", Z, "outlineLevel"), e.copyToObject(o, "s", Z, "style");
|
|
2253
|
+
}
|
|
2254
|
+
}), c.registerVisitor({
|
|
2255
|
+
from: "oleObjects",
|
|
2256
|
+
to: null,
|
|
2257
|
+
openTag: (e) => {
|
|
2258
|
+
e.warn("'OLE Objects' are not supported.");
|
|
2259
|
+
}
|
|
2260
|
+
});
|
|
2261
|
+
let P = !1, Oe = !1, ke = 0, F = "", I = (e) => {
|
|
2262
|
+
let t = e.indexOf(":");
|
|
2263
|
+
return t === -1 ? e : e.slice(t + 1);
|
|
2264
|
+
};
|
|
2265
|
+
return Nt(_, e, c.createEventHandler(e, i, a), a, o, {
|
|
2266
|
+
onOpenTag: (e) => {
|
|
2267
|
+
P = !0;
|
|
2268
|
+
let t = I(e.name);
|
|
2269
|
+
t === "t" || t === "v" ? ke === 0 && (Oe = !0) : t !== "rPh" && t !== "phoneticPr" || ke++;
|
|
2270
|
+
},
|
|
2271
|
+
onText: (e) => {
|
|
2272
|
+
Oe && (F += e);
|
|
2273
|
+
},
|
|
2274
|
+
onCloseTag: (e) => {
|
|
2275
|
+
let t = I(e.name);
|
|
2276
|
+
t === "t" || t === "v" ? Oe = !1 : t !== "rPh" && t !== "phoneticPr" || ke > 0 && ke--;
|
|
2277
|
+
},
|
|
2278
|
+
onEnd: () => {
|
|
2279
|
+
if (!P) return;
|
|
2280
|
+
let e = n(ue(F));
|
|
2281
|
+
return P = !1, Oe = !1, ke = 0, F = "", e;
|
|
2282
|
+
},
|
|
2283
|
+
onError: (e) => {}
|
|
2284
|
+
}, s);
|
|
2285
|
+
}, At = class {
|
|
2286
|
+
static {
|
|
2287
|
+
this.Collapsed = 1;
|
|
2288
|
+
}
|
|
2289
|
+
static {
|
|
2290
|
+
this.CustomFormat = 2;
|
|
2291
|
+
}
|
|
2292
|
+
static {
|
|
2293
|
+
this.CustomHeight = 4;
|
|
2294
|
+
}
|
|
2295
|
+
static {
|
|
2296
|
+
this.Hidden = 8;
|
|
2297
|
+
}
|
|
2298
|
+
static {
|
|
2299
|
+
this.Ht = 16;
|
|
2300
|
+
}
|
|
2301
|
+
static {
|
|
2302
|
+
this.OutlineLevel = 32;
|
|
2303
|
+
}
|
|
2304
|
+
static {
|
|
2305
|
+
this.Ph = 64;
|
|
2306
|
+
}
|
|
2307
|
+
static {
|
|
2308
|
+
this.R = 128;
|
|
2309
|
+
}
|
|
2310
|
+
static {
|
|
2311
|
+
this.S = 256;
|
|
2312
|
+
}
|
|
2313
|
+
static {
|
|
2314
|
+
this.Spans = 512;
|
|
2315
|
+
}
|
|
2316
|
+
static {
|
|
2317
|
+
this.ThickBot = 1024;
|
|
2318
|
+
}
|
|
2319
|
+
static {
|
|
2320
|
+
this.ThickTop = 2048;
|
|
2321
|
+
}
|
|
2322
|
+
}, jt = (e, t, n) => {
|
|
2323
|
+
if (e[0].value[0] === e[1].value[0]) return t;
|
|
2324
|
+
}, Mt = {
|
|
2325
|
+
colStart: 0,
|
|
2326
|
+
colEnd: 0,
|
|
2327
|
+
rowStart: 0,
|
|
2328
|
+
rowEnd: 0
|
|
2329
|
+
}, Nt = (e, r, i, a, c, l, u) => {
|
|
2330
|
+
let d = !1, p = !1, m = [], h = !1, g = null, _ = null, v = null, y = null, b = null, ee = null, x = u?.get("richData") ?? t.EmptyArray, te = u?.get("dummyWrapped") ?? null, ne = f.normalizeA1ToR1C1, re = n.createConflatingRanges(), ie = /* @__PURE__ */ new Map(), ae = [], oe = !1, se = !1, ce = null, le = !1, ue = n.createConflatingRanges(), de = !1, S = -1, C = -1, w = null, fe = null, pe = null, me = [], he = null, T = -2, E = 0, D = "", O = "", k = "", A = "", j = "", ge = "", _e = "", M = "", ve = "", ye = "", be = "", xe = "", Se = "", Ce = "", we = !0, Te = null, Ee = !1, N = !1, De = !1, P = null, Oe = 0, ke = (e) => {
|
|
2331
|
+
let t = e.name, n = t.indexOf(":");
|
|
2332
|
+
if (n !== -1 && (t = t.slice(n + 1)), Oe++, Oe % 196608 == 0 && c?.(Oe), fe) {
|
|
2333
|
+
let n = e.attributes;
|
|
2334
|
+
switch (t) {
|
|
2335
|
+
case "v":
|
|
2336
|
+
p = !0;
|
|
2337
|
+
break;
|
|
2338
|
+
case "f":
|
|
2339
|
+
switch (h = !0, n.t ?? null) {
|
|
2340
|
+
case null:
|
|
2341
|
+
case "normal": break;
|
|
2342
|
+
case "shared":
|
|
2343
|
+
let e = n.si;
|
|
2344
|
+
_ = n.ref, g = e;
|
|
2345
|
+
break;
|
|
2346
|
+
case "array":
|
|
2347
|
+
_ = n.ref, ce = _;
|
|
2348
|
+
break;
|
|
2349
|
+
case "datatable": _ = n.ref, h = !0;
|
|
2350
|
+
}
|
|
2351
|
+
let e = n.ca;
|
|
2352
|
+
e !== void 0 && (le = e === "1");
|
|
2353
|
+
break;
|
|
2354
|
+
case "is":
|
|
2355
|
+
de = !0;
|
|
2356
|
+
return;
|
|
2357
|
+
}
|
|
2358
|
+
de && !h && l?.onOpenTag?.(e);
|
|
2359
|
+
return;
|
|
2360
|
+
}
|
|
2361
|
+
if (d) {
|
|
2362
|
+
if (t === "c") {
|
|
2363
|
+
fe = e;
|
|
2364
|
+
let t = e.attributes, n = t.r;
|
|
2365
|
+
C = f.fastStringToCol(n);
|
|
2366
|
+
let r = t.t;
|
|
2367
|
+
r === void 0 ? pe = null : (pe = r, pe === "str" && (de = !0));
|
|
2368
|
+
let i = t.s;
|
|
2369
|
+
i === void 0 && (P !== null || De) && (i = "0"), i !== void 0 && (i = parseInt(i), Te && Te.value === i && Te.colEnd + 1 === C ? Te.colEnd = C : (Te = {
|
|
2370
|
+
colStart: C,
|
|
2371
|
+
rowStart: S,
|
|
2372
|
+
colEnd: C,
|
|
2373
|
+
rowEnd: S,
|
|
2374
|
+
value: i
|
|
2375
|
+
}, m.push(Te))), ce = null, se = !1;
|
|
2376
|
+
let a = t.cm;
|
|
2377
|
+
oe = a !== void 0 && ((e) => {
|
|
2378
|
+
let t = u?.get("metadata")?.cells;
|
|
2379
|
+
if (!t) return !1;
|
|
2380
|
+
let n = parseInt(e, 10);
|
|
2381
|
+
return !(!Number.isFinite(n) || n < 1) && !0 === t[n - 1]?.get("XLDAPR")?.fDynamic;
|
|
2382
|
+
})(a);
|
|
2383
|
+
let s = t.vm;
|
|
2384
|
+
if (s !== void 0) {
|
|
2385
|
+
let e = x[parseInt(s) - 1];
|
|
2386
|
+
if (o.isError(e)) {
|
|
2387
|
+
let t = e.getCode();
|
|
2388
|
+
w = {
|
|
2389
|
+
t: "e",
|
|
2390
|
+
v: t
|
|
2391
|
+
}, oe && t === o.Code.Spill && (se = !0);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
} else {
|
|
2396
|
+
if (N && t === "row") {
|
|
2397
|
+
d = !0;
|
|
2398
|
+
let t = e.attributes.r;
|
|
2399
|
+
if (S = parseInt(t) - 1, E = 0, O = e.attributes.customHeight, O !== void 0 && (E |= At.CustomHeight), O !== ve && (we = !0, ve = O), D = e.attributes.ht, D !== void 0 && (E |= At.Ht), D !== M && (we = !0, M = D), k = e.attributes.hidden, k !== void 0 && (E |= At.Hidden), k !== ye && (we = !0, ye = k), j = e.attributes.s, j !== void 0 && (E |= At.S), j !== xe && (we = !0, xe = j), A = e.attributes.customFormat, A !== void 0 && (E |= At.CustomFormat), A !== be && (we = !0, be = A), ge = e.attributes.outlineLevel, ge !== void 0 && (E |= At.OutlineLevel), ge !== Se && (we = !0, Se = ge), _e = e.attributes.collapsed, _e !== void 0 && (E |= At.Collapsed), _e !== Ce && (we = !0, Ce = _e), E !== 0) if (T + 1 !== S || we) {
|
|
2400
|
+
let e = O !== void 0 && (O === "1" || O === "true"), t = A !== void 0 && (A === "1" || A === "true");
|
|
2401
|
+
P = t && j !== void 0 ? j : null, t && P === null && (P = "0"), he = {
|
|
2402
|
+
min: S,
|
|
2403
|
+
max: S,
|
|
2404
|
+
value: {
|
|
2405
|
+
sz: D === void 0 ? -1 : parseFloat(D),
|
|
2406
|
+
csz: e,
|
|
2407
|
+
h: k !== void 0 && (k === "1" || k === "true"),
|
|
2408
|
+
s: P === null ? void 0 : P === "0" ? 0 : parseInt(P),
|
|
2409
|
+
l: ge === void 0 || ge === "0" ? 0 : parseInt(ge),
|
|
2410
|
+
cl: _e !== void 0 && (_e === "1" || _e === "true")
|
|
2411
|
+
}
|
|
2412
|
+
}, me.push(he);
|
|
2413
|
+
} else he.max = S;
|
|
2414
|
+
T = S, we = !1;
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
if (t === "sheetData" && (N = !0), !Ee && t === "sheetData") {
|
|
2418
|
+
Ee = !0;
|
|
2419
|
+
let e = r.cols, t = e ? e.length : 0;
|
|
2420
|
+
for (let n = 0; !De && n < t; n++) e[n].v.s && (De = !0);
|
|
2421
|
+
}
|
|
2422
|
+
i?.onOpenTag?.(e);
|
|
2423
|
+
}
|
|
2424
|
+
}, F = (t) => {
|
|
2425
|
+
let n = t.name;
|
|
2426
|
+
if (n === "sheetData" && (N = !1), !h || n !== "c" && n !== "f" || (g && (y = ie.get(g) ?? null), y && (re.append(S, C, y), le && ue.append(S, C)), ce !== null && ae.push([ce, oe ? se ? "error" : "dynamic" : "fixed"]), h = !1, y = null, g = null, _ = null, p = !1, le = !1, ce = null, oe = !1, se = !1), fe) {
|
|
2427
|
+
let r = n.indexOf(":");
|
|
2428
|
+
if (r !== -1 && (n = n.slice(r + 1)), de) if (n === "is" || n === "v") {
|
|
2429
|
+
let t = l?.onEnd?.();
|
|
2430
|
+
t != null && e.pushAt(S, C, "" + t);
|
|
2431
|
+
} else n !== "f" && l?.onCloseTag?.(t);
|
|
2432
|
+
p &&= !1, n === "c" && (fe = null, de = !1);
|
|
2433
|
+
return;
|
|
2434
|
+
}
|
|
2435
|
+
if (d) return d = !1, void (Te = null);
|
|
2436
|
+
i?.onCloseTag?.(t);
|
|
2437
|
+
}, I = (t) => {
|
|
2438
|
+
let n = t.trim();
|
|
2439
|
+
if (p) {
|
|
2440
|
+
switch (w = null, pe) {
|
|
2441
|
+
case null:
|
|
2442
|
+
case "n":
|
|
2443
|
+
w = parseFloat(n);
|
|
2444
|
+
break;
|
|
2445
|
+
case "b":
|
|
2446
|
+
w = n === "1" || n === "true";
|
|
2447
|
+
break;
|
|
2448
|
+
case "s":
|
|
2449
|
+
w = n;
|
|
2450
|
+
break;
|
|
2451
|
+
case "e":
|
|
2452
|
+
if (n === "#VALUE!") {
|
|
2453
|
+
let e = fe.attributes.vm;
|
|
2454
|
+
if (e !== void 0) {
|
|
2455
|
+
let t = x[parseInt(e) - 1];
|
|
2456
|
+
if (o.isError(t)) {
|
|
2457
|
+
w = {
|
|
2458
|
+
t: "e",
|
|
2459
|
+
v: t.getCode()
|
|
2460
|
+
};
|
|
2461
|
+
break;
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
let e = o.getBuiltInByLabel(n);
|
|
2466
|
+
e ? w = {
|
|
2467
|
+
t: "e",
|
|
2468
|
+
v: e.getCode()
|
|
2469
|
+
} : (w = n, a?.(`Unknown formula error '${n}' in cell ${f.cellToString({
|
|
2470
|
+
colIndex: C,
|
|
2471
|
+
rowIndex: S
|
|
2472
|
+
})}`));
|
|
2473
|
+
break;
|
|
2474
|
+
case "str":
|
|
2475
|
+
case "inlineStr": de = !0;
|
|
2476
|
+
}
|
|
2477
|
+
w !== null && e.pushAt(S, C, w);
|
|
2478
|
+
}
|
|
2479
|
+
if (g) {
|
|
2480
|
+
if (b === g) y = ee;
|
|
2481
|
+
else {
|
|
2482
|
+
if (y = ie.get(g) ?? null, !y) {
|
|
2483
|
+
let e = [];
|
|
2484
|
+
v = ne(n, S, C, e), y = [
|
|
2485
|
+
v,
|
|
2486
|
+
e,
|
|
2487
|
+
n
|
|
2488
|
+
], ie.set(g, y);
|
|
2489
|
+
}
|
|
2490
|
+
b = g, ee = y;
|
|
2491
|
+
}
|
|
2492
|
+
g = null;
|
|
2493
|
+
}
|
|
2494
|
+
if (h) {
|
|
2495
|
+
if (te !== null) {
|
|
2496
|
+
let e = ((e) => {
|
|
2497
|
+
if (e.length < bt.length || e.slice(0, bt.length).toUpperCase() !== xt) return Ct;
|
|
2498
|
+
let t = Tt(e, bt.length);
|
|
2499
|
+
if (t === null || e.charCodeAt(t.end) !== 41 || e.charCodeAt(t.end + 1) !== 44 || e.charCodeAt(e.length - 1) !== 41) return Ct;
|
|
2500
|
+
let n = t.value;
|
|
2501
|
+
return n.toUpperCase() === St ? wt : n.length === 0 ? Ct : {
|
|
2502
|
+
kind: "formula",
|
|
2503
|
+
formula: n
|
|
2504
|
+
};
|
|
2505
|
+
})(n);
|
|
2506
|
+
e.kind !== "none" && te.push({
|
|
2507
|
+
sheet: r,
|
|
2508
|
+
rowIndex: S,
|
|
2509
|
+
colIndex: C,
|
|
2510
|
+
formula: e.kind === "formula" ? e.formula : null
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
let e = [];
|
|
2514
|
+
v = ne(n, S, C, e), y = [
|
|
2515
|
+
v,
|
|
2516
|
+
e,
|
|
2517
|
+
n
|
|
2518
|
+
];
|
|
2519
|
+
}
|
|
2520
|
+
de ? l?.onText?.(t) : d || i?.onText?.(n);
|
|
2521
|
+
}, L = {
|
|
2522
|
+
r: void 0,
|
|
2523
|
+
t: void 0,
|
|
2524
|
+
s: void 0,
|
|
2525
|
+
cm: void 0,
|
|
2526
|
+
vm: void 0
|
|
2527
|
+
}, Ae = {
|
|
2528
|
+
name: "c",
|
|
2529
|
+
attributes: L,
|
|
2530
|
+
isSelfClosing: !1
|
|
2531
|
+
}, R = {
|
|
2532
|
+
t: void 0,
|
|
2533
|
+
si: void 0,
|
|
2534
|
+
ref: void 0,
|
|
2535
|
+
ca: void 0
|
|
2536
|
+
}, je = {
|
|
2537
|
+
name: "f",
|
|
2538
|
+
attributes: R,
|
|
2539
|
+
isSelfClosing: !1
|
|
2540
|
+
}, z = {
|
|
2541
|
+
name: "v",
|
|
2542
|
+
attributes: {},
|
|
2543
|
+
isSelfClosing: !1
|
|
2544
|
+
}, B = {
|
|
2545
|
+
r: void 0,
|
|
2546
|
+
s: void 0,
|
|
2547
|
+
ht: void 0,
|
|
2548
|
+
hidden: void 0,
|
|
2549
|
+
collapsed: void 0,
|
|
2550
|
+
customHeight: void 0,
|
|
2551
|
+
customFormat: void 0,
|
|
2552
|
+
outlineLevel: void 0
|
|
2553
|
+
}, Me = {
|
|
2554
|
+
name: "row",
|
|
2555
|
+
attributes: B,
|
|
2556
|
+
isSelfClosing: !1
|
|
2557
|
+
}, Ne = gt.NEED_MORE, V = gt.NOT_HANDLED, Pe = gt.decodeText, H = !1, U = (e, t, n, r) => {
|
|
2558
|
+
for (;;) {
|
|
2559
|
+
let i = 0;
|
|
2560
|
+
for (; t < n && ((i = e.charCodeAt(t)) === 32 || i === 9 || i === 10 || i === 13);) t++;
|
|
2561
|
+
if (t >= n) return Ne;
|
|
2562
|
+
if (i === 62) return H = !1, t + 1;
|
|
2563
|
+
if (i === 47) return t + 1 >= n ? Ne : e.charCodeAt(t + 1) === 62 ? (H = !0, t + 2) : V;
|
|
2564
|
+
let a = t;
|
|
2565
|
+
for (; t < n && (i = e.charCodeAt(t)) !== 61;) {
|
|
2566
|
+
if (i === 62 || i === 47 || i === 32 || i === 9 || i === 10 || i === 13) return V;
|
|
2567
|
+
t++;
|
|
2568
|
+
}
|
|
2569
|
+
if (t + 1 >= n) return Ne;
|
|
2570
|
+
let o = t - a, s = e.charCodeAt(t + 1);
|
|
2571
|
+
if (s !== 34 && s !== 39) return V;
|
|
2572
|
+
let c = t + 2, l = c;
|
|
2573
|
+
for (; l < n && (i = e.charCodeAt(l)) !== s;) {
|
|
2574
|
+
if (i === 38 || i < 32) return V;
|
|
2575
|
+
l++;
|
|
2576
|
+
}
|
|
2577
|
+
if (l >= n) return Ne;
|
|
2578
|
+
t = l + 1;
|
|
2579
|
+
let u = e.charCodeAt(a);
|
|
2580
|
+
if (r === 2) switch (o) {
|
|
2581
|
+
case 1:
|
|
2582
|
+
u === 114 ? B.r = e.slice(c, l) : u === 115 && (B.s = e.slice(c, l));
|
|
2583
|
+
break;
|
|
2584
|
+
case 2:
|
|
2585
|
+
e.startsWith("ht", a) && (B.ht = e.slice(c, l));
|
|
2586
|
+
break;
|
|
2587
|
+
case 6:
|
|
2588
|
+
e.startsWith("hidden", a) && (B.hidden = e.slice(c, l));
|
|
2589
|
+
break;
|
|
2590
|
+
case 9:
|
|
2591
|
+
e.startsWith("collapsed", a) && (B.collapsed = e.slice(c, l));
|
|
2592
|
+
break;
|
|
2593
|
+
case 12: e.startsWith("customHeight", a) ? B.customHeight = e.slice(c, l) : e.startsWith("customFormat", a) ? B.customFormat = e.slice(c, l) : e.startsWith("outlineLevel", a) && (B.outlineLevel = e.slice(c, l));
|
|
2594
|
+
}
|
|
2595
|
+
else if (r === 0) o === 1 ? u === 114 ? L.r = e.slice(c, l) : u === 116 ? L.t = e.slice(c, l) : u === 115 && (L.s = e.slice(c, l)) : o === 2 && e.charCodeAt(a + 1) === 109 && (u === 99 ? L.cm = e.slice(c, l) : u === 118 && (L.vm = e.slice(c, l)));
|
|
2596
|
+
else if (o === 1) u === 116 && (R.t = e.slice(c, l));
|
|
2597
|
+
else if (o === 2) {
|
|
2598
|
+
let t = e.charCodeAt(a + 1);
|
|
2599
|
+
u === 115 && t === 105 ? R.si = e.slice(c, l) : u === 99 && t === 97 && (R.ca = e.slice(c, l));
|
|
2600
|
+
} else o === 3 && e.startsWith("ref", a) && (R.ref = e.slice(c, l));
|
|
2601
|
+
}
|
|
2602
|
+
}, Fe = (e, t, n) => e.charCodeAt(t + 1) === 47 && e.charCodeAt(t + 2) === n && e.charCodeAt(t + 3) === 62;
|
|
2603
|
+
return {
|
|
2604
|
+
...i,
|
|
2605
|
+
onEnd: () => {
|
|
2606
|
+
me.length > 0 && (r.rows = f.runsToRefs(me, !1));
|
|
2607
|
+
let t = re.done(jt), a = t.length;
|
|
2608
|
+
if (a > 0) {
|
|
2609
|
+
let e = Array(a);
|
|
2610
|
+
for (let n = 0; n < a; n++) {
|
|
2611
|
+
let r = t[n], i = f.rangeToString(r), a = r.value[1];
|
|
2612
|
+
e[n] = [i, f.resolveRelativeToA1(a, r.rowStart, r.colStart)];
|
|
2613
|
+
}
|
|
2614
|
+
r.formulas = e;
|
|
2615
|
+
}
|
|
2616
|
+
let o = ue.done(!0), c = o.length;
|
|
2617
|
+
if (c > 0) {
|
|
2618
|
+
let e = Array(c);
|
|
2619
|
+
for (let t = 0; t < c; t++) {
|
|
2620
|
+
let n = o[t];
|
|
2621
|
+
e[t] = f.rangeToString(n);
|
|
2622
|
+
}
|
|
2623
|
+
r.volatile = e;
|
|
2624
|
+
}
|
|
2625
|
+
ae.length > 0 && (r.formulaArray = [...ae]);
|
|
2626
|
+
let l = m.length;
|
|
2627
|
+
if (l > 0) {
|
|
2628
|
+
m.sort(n.createRangeComparator(s.Axis.Column));
|
|
2629
|
+
let e = m[0], t = e.colStart, i = e.colEnd, a = e.rowEnd, o = e.value, c = [];
|
|
2630
|
+
c.push(e);
|
|
2631
|
+
let u = null;
|
|
2632
|
+
for (let n = 1; n < l; n++) u = m[n], o !== u.value || t !== u.colStart || i !== u.colEnd || a + 1 !== u.rowEnd ? (c.push(u), e = u, t = e.colStart, i = e.colEnd, a = e.rowEnd, o = e.value) : (a = u.rowEnd, e.rowEnd = a);
|
|
2633
|
+
let d = c.length, p = Array(d);
|
|
2634
|
+
for (let e = 0; e < d; e++) {
|
|
2635
|
+
let t = c[e];
|
|
2636
|
+
p[e] = [f.rangeToString(t), t.value];
|
|
2637
|
+
}
|
|
2638
|
+
r.directStyles = p;
|
|
2639
|
+
}
|
|
2640
|
+
let u = e.build();
|
|
2641
|
+
u && (r.data = u.tuples), i?.onEnd?.();
|
|
2642
|
+
},
|
|
2643
|
+
onOpenTag: ke,
|
|
2644
|
+
onCloseTag: F,
|
|
2645
|
+
onText: I,
|
|
2646
|
+
elementScanners: [{
|
|
2647
|
+
name: "c",
|
|
2648
|
+
scan: (e, t, n) => {
|
|
2649
|
+
if (!d || fe !== null) return V;
|
|
2650
|
+
L.r = L.t = L.s = L.cm = L.vm = void 0;
|
|
2651
|
+
let r = U(e, t + 2, n, 0);
|
|
2652
|
+
if (r < 0) return r;
|
|
2653
|
+
let i = L.t;
|
|
2654
|
+
if (L.r === void 0 || i === "str" || i === "inlineStr") return V;
|
|
2655
|
+
let a = !1, o = -1, s = -1, c = -1, l = -1, u = r;
|
|
2656
|
+
if (!H) for (R.t = R.si = R.ref = R.ca = void 0;;) {
|
|
2657
|
+
let t = e.indexOf("<", r);
|
|
2658
|
+
if (t === -1 || t + 3 >= n) return Ne;
|
|
2659
|
+
for (let n = r; n < t; n++) {
|
|
2660
|
+
let t = e.charCodeAt(n);
|
|
2661
|
+
if (t !== 32 && t !== 9 && t !== 10 && t !== 13) return V;
|
|
2662
|
+
}
|
|
2663
|
+
let i = e.charCodeAt(t + 1), d = e.charCodeAt(t + 2);
|
|
2664
|
+
if (i === 47) {
|
|
2665
|
+
if (!Fe(e, t, 99)) return V;
|
|
2666
|
+
u = t + 4;
|
|
2667
|
+
break;
|
|
2668
|
+
}
|
|
2669
|
+
if (i === 102 && !a && c === -1 && (d === 32 || d === 62 || d === 47)) {
|
|
2670
|
+
if (a = !0, r = U(e, t + 2, n, 1), r < 0) return r;
|
|
2671
|
+
if (H) continue;
|
|
2672
|
+
let i = e.indexOf("<", r);
|
|
2673
|
+
if (i === -1 || i + 3 >= n) return Ne;
|
|
2674
|
+
if (!Fe(e, i, 102)) return V;
|
|
2675
|
+
o = r, s = i, r = i + 4;
|
|
2676
|
+
continue;
|
|
2677
|
+
}
|
|
2678
|
+
if (i === 118 && d === 62 && c === -1) {
|
|
2679
|
+
let i = e.indexOf("<", t + 3);
|
|
2680
|
+
if (i === -1 || i + 3 >= n) return Ne;
|
|
2681
|
+
if (!Fe(e, i, 118)) return V;
|
|
2682
|
+
c = t + 3, l = i, r = i + 4;
|
|
2683
|
+
continue;
|
|
2684
|
+
}
|
|
2685
|
+
return V;
|
|
2686
|
+
}
|
|
2687
|
+
return ke(Ae), a && (ke(je), s > o && I(Pe(e.slice(o, s))), F(je)), c !== -1 && (ke(z), l > c && I(Pe(e.slice(c, l))), F(z)), F(Ae), u;
|
|
2688
|
+
}
|
|
2689
|
+
}, {
|
|
2690
|
+
name: "row",
|
|
2691
|
+
openTag: Me,
|
|
2692
|
+
scan: (e, t, n) => {
|
|
2693
|
+
if (!N || d || fe !== null) return V;
|
|
2694
|
+
B.r = B.s = B.ht = B.hidden = B.collapsed = B.customHeight = B.customFormat = B.outlineLevel = void 0;
|
|
2695
|
+
let r = U(e, t + 4, n, 2);
|
|
2696
|
+
return r < 0 ? r : H || B.r === void 0 ? V : (ke(Me), r);
|
|
2697
|
+
}
|
|
2698
|
+
}]
|
|
2699
|
+
};
|
|
2700
|
+
}, Pt = (e) => {
|
|
2701
|
+
let t = e.indexOf(":");
|
|
2702
|
+
return t === -1 ? e : e.slice(t + 1);
|
|
2703
|
+
}, Ft = {
|
|
2704
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": "workbooks",
|
|
2705
|
+
"application/vnd.ms-excel.sheet.macroEnabled.main+xml": "workbooks",
|
|
2706
|
+
"application/vnd.ms-excel.sheet.binary.macroEnabled.main": "workbooks",
|
|
2707
|
+
"application/vnd.ms-excel.addin.macroEnabled.main+xml": "workbooks",
|
|
2708
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": "workbooks",
|
|
2709
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": "sheets",
|
|
2710
|
+
"application/vnd.ms-excel.worksheet": "sheets",
|
|
2711
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": "charts",
|
|
2712
|
+
"application/vnd.ms-excel.chartsheet": "charts",
|
|
2713
|
+
"application/vnd.ms-excel.macrosheet+xml": "macros",
|
|
2714
|
+
"application/vnd.ms-excel.macrosheet": "macros",
|
|
2715
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": "dialogs",
|
|
2716
|
+
"application/vnd.ms-excel.dialogsheet": "dialogs",
|
|
2717
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml": "strs",
|
|
2718
|
+
"application/vnd.ms-excel.sharedStrings": "strs",
|
|
2719
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": "styles",
|
|
2720
|
+
"application/vnd.ms-excel.styles": "styles",
|
|
2721
|
+
"application/vnd.openxmlformats-package.core-properties+xml": "coreprops",
|
|
2722
|
+
"application/vnd.openxmlformats-officedocument.custom-properties+xml": "custprops",
|
|
2723
|
+
"application/vnd.openxmlformats-officedocument.extended-properties+xml": "extprops",
|
|
2724
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": "comments",
|
|
2725
|
+
"application/vnd.ms-excel.comments": "comments",
|
|
2726
|
+
"application/vnd.ms-excel.threadedcomments+xml": "threadedcomments",
|
|
2727
|
+
"application/vnd.ms-excel.person+xml": "people",
|
|
2728
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml": "metadata",
|
|
2729
|
+
"application/vnd.ms-excel.sheetMetadata": "metadata",
|
|
2730
|
+
"application/vnd.ms-excel.externalLink": "links",
|
|
2731
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml": "links",
|
|
2732
|
+
"application/vnd.openxmlformats-officedocument.theme+xml": "themes"
|
|
2733
|
+
}, It = (e) => e.startsWith("/") ? e.slice(1) : e, Lt = /^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i, Rt = (e) => typeof e == "string" ? e : (e?.runs ?? []).map((e) => e.text ?? "").join(""), zt = async (n, o) => {
|
|
2734
|
+
let { password: s, onVBA: l, profile: u, calcOnLoad: p = "auto", createWorkbookOptions: h = {}, ..._ } = o ?? {}, b = !!h.origin && typeof h.origin != "string", x = u ? new De(typeof u == "function" ? u : void 0) : null, ne = [], re = (e, t, n) => {
|
|
2735
|
+
ne.push([
|
|
2736
|
+
e,
|
|
2737
|
+
t ?? "",
|
|
2738
|
+
n
|
|
2739
|
+
]);
|
|
2740
|
+
}, ie = { onWarning: re }, se = o?.progress, ce = se?.onProgress ? se.onProgress.bind(se) : void 0, S = n.byteLength, C = 0, w = 0, fe = ce ? (e) => {
|
|
2741
|
+
if (C <= 0) return;
|
|
2742
|
+
w += e;
|
|
2743
|
+
let t = Math.min(S, Math.round(w / C * S));
|
|
2744
|
+
ce(t, S);
|
|
2745
|
+
} : void 0, me = import("./C7ZHXwoL2A_nxZjl.js"), T = null;
|
|
2746
|
+
try {
|
|
2747
|
+
T = new DOMParser();
|
|
2748
|
+
} catch {}
|
|
2749
|
+
let E = null;
|
|
2750
|
+
try {
|
|
2751
|
+
E = new XMLSerializer();
|
|
2752
|
+
} catch {}
|
|
2753
|
+
let D, O, k, A = null;
|
|
2754
|
+
T || (A = import("./BT3KOuPzJsNUvy4B.js").then((e) => a(e.default, 1)));
|
|
2755
|
+
try {
|
|
2756
|
+
let [e, t] = await Promise.all([A, me]);
|
|
2757
|
+
D = new t.DOMTransformer(), O = T ?? new e.DOMParser(), k = E ?? new e.XMLSerializer();
|
|
2758
|
+
} catch (e) {
|
|
2759
|
+
throw Error("Unable to load XLSX parser.", { cause: e });
|
|
2760
|
+
}
|
|
2761
|
+
let j, ve = (e) => k.serializeToString(e);
|
|
2762
|
+
try {
|
|
2763
|
+
j = await N.create(n);
|
|
2764
|
+
} catch (e) {
|
|
2765
|
+
throw new i("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.", { cause: e });
|
|
2766
|
+
}
|
|
2767
|
+
x?.mark("zip-open");
|
|
2768
|
+
try {
|
|
2769
|
+
if (!j.has("[Content_Types].xml")) throw new i("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
2770
|
+
let e = (e) => {
|
|
2771
|
+
let t = j.getEntry(e);
|
|
2772
|
+
return t ? { content: t } : void 0;
|
|
2773
|
+
}, n = {
|
|
2774
|
+
workbooks: [],
|
|
2775
|
+
sheets: [],
|
|
2776
|
+
charts: [],
|
|
2777
|
+
dialogs: [],
|
|
2778
|
+
macros: [],
|
|
2779
|
+
strs: [],
|
|
2780
|
+
comments: [],
|
|
2781
|
+
threadedcomments: [],
|
|
2782
|
+
links: [],
|
|
2783
|
+
coreprops: [],
|
|
2784
|
+
extprops: [],
|
|
2785
|
+
custprops: [],
|
|
2786
|
+
themes: [],
|
|
2787
|
+
styles: [],
|
|
2788
|
+
metadata: [],
|
|
2789
|
+
people: [],
|
|
2790
|
+
overrides: {},
|
|
2791
|
+
sst: "",
|
|
2792
|
+
style: "",
|
|
2793
|
+
defaults: {}
|
|
2794
|
+
};
|
|
2795
|
+
{
|
|
2796
|
+
let e = ((e) => ({
|
|
2797
|
+
onOpenTag: (t) => {
|
|
2798
|
+
let n = ((e) => {
|
|
2799
|
+
let t = e.indexOf(":");
|
|
2800
|
+
return t === -1 ? e : e.slice(t + 1);
|
|
2801
|
+
})(t.name), r = t.attributes;
|
|
2802
|
+
if (n === "Override") {
|
|
2803
|
+
let t = r.ContentType, n = r.PartName;
|
|
2804
|
+
if (!t || !n) return;
|
|
2805
|
+
e.overrides[n.startsWith("/") ? n.slice(1) : n] = t;
|
|
2806
|
+
let i = Ft[t], a = i ? e[i] : void 0;
|
|
2807
|
+
Array.isArray(a) && a.push(n);
|
|
2808
|
+
} else if (n === "Default") {
|
|
2809
|
+
let t = r.Extension, n = r.ContentType;
|
|
2810
|
+
t && (e.defaults[t.toLowerCase()] = n);
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
onEnd: () => {
|
|
2814
|
+
e.sst = e.strs.length > 0 ? e.strs[0] : "", e.style = e.styles.length > 0 ? e.styles[0] : "";
|
|
2815
|
+
},
|
|
2816
|
+
onError: (e) => {
|
|
2817
|
+
((e) => {
|
|
2818
|
+
ne.push([e, "[Content_Types].xml"]);
|
|
2819
|
+
})(`Error parsing content types: ${e?.message ?? e}`);
|
|
2820
|
+
}
|
|
2821
|
+
}))(n), t = await j.getTextStream("[Content_Types].xml");
|
|
2822
|
+
if (!t) throw Error("Error parsing content types: '[Content_Types].xml'");
|
|
2823
|
+
try {
|
|
2824
|
+
await H.parseStream(t, e, { xmlns: !1 });
|
|
2825
|
+
} catch (e) {
|
|
2826
|
+
throw Error("Error parsing content types: '[Content_Types].xml'", { cause: e });
|
|
2827
|
+
}
|
|
2828
|
+
b && await j.getBuffer("[Content_Types].xml");
|
|
2829
|
+
}
|
|
2830
|
+
x?.mark("content-types");
|
|
2831
|
+
let a = n.sst, o = /* @__PURE__ */ new Set();
|
|
2832
|
+
for (let e of n.sheets) o.add(It(e));
|
|
2833
|
+
a && o.add(It(a));
|
|
2834
|
+
for (let e of o) C += j.uncompressedSize(e);
|
|
2835
|
+
if (await j.prefetch((e) => !o.has(e) && !Lt.test(e)), x?.mark("prefetch-side-parts"), n.workbooks.length === 0) {
|
|
2836
|
+
let t = Ce("_rels/.rels", e, O, D, ie);
|
|
2837
|
+
if (t) {
|
|
2838
|
+
for (let e of t.values()) if (e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" && e.target) {
|
|
2839
|
+
n.workbooks.push(e.target);
|
|
2840
|
+
break;
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
if (n.workbooks.length === 0) throw new i("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");
|
|
2845
|
+
n.richstructure = ["/xl/richData/rdrichvaluestructure.xml"], n.richdata = ["/xl/richData/rdrichvalue.xml"];
|
|
2846
|
+
let s = h?.resources ?? new d(), _ = s.beginPersist(), w = {}, me = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map();
|
|
2847
|
+
T.set("richTypes", []), T.set("parseInlineDxf", (e) => {
|
|
2848
|
+
if (!e) return;
|
|
2849
|
+
let t = O.parseFromString(`<dxf xmlns:x14="${le}" xmlns:xm="${oe}">${e}</dxf>`, "text/xml")?.documentElement;
|
|
2850
|
+
if (!t) return;
|
|
2851
|
+
let n = D.parseDxf(t, "", ie);
|
|
2852
|
+
return Object.keys(n).length > 0 ? n : void 0;
|
|
2853
|
+
});
|
|
2854
|
+
let E = [];
|
|
2855
|
+
T.set("dummyWrapped", E);
|
|
2856
|
+
let k = M("metadata", n, e, O, D, ie).entries().next()?.value?.[1]?.metadata;
|
|
2857
|
+
k && T.set("metadata", k), T.set(Ot, ae());
|
|
2858
|
+
let A = /* @__PURE__ */ new Map(), be = [], we = /* @__PURE__ */ new Set(), Ee = (e) => {
|
|
2859
|
+
we.add(It(e));
|
|
2860
|
+
}, N = (t, n = A) => {
|
|
2861
|
+
let r = t.lastIndexOf("/"), i = t.substring(0, r + 1) + "_rels/" + t.substring(r + 1, t.length) + ".rels", a = n.get(i);
|
|
2862
|
+
return a || (a = Ce(i, e, O, D, z), n.set(i, a)), a;
|
|
2863
|
+
}, De = (t, n, r, i = A) => {
|
|
2864
|
+
let a = N(n, i).get(t), o = a?.target;
|
|
2865
|
+
if (!o) return null;
|
|
2866
|
+
if (a.targetMode === "External") {
|
|
2867
|
+
if (!r) return a.target;
|
|
2868
|
+
let e = s.add({ source: { external: a.target } });
|
|
2869
|
+
return e.addReference(w), me.add(e), _.toResourceId(e);
|
|
2870
|
+
}
|
|
2871
|
+
let c = n.lastIndexOf("/"), l = n.substring(0, c + 1);
|
|
2872
|
+
o.startsWith("/") || (o = l + o), o = ge(o);
|
|
2873
|
+
let u = D?.getVisitorParamsState().get("dxfs"), d = i.get(o);
|
|
2874
|
+
if (!d) if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") {
|
|
2875
|
+
let e = {};
|
|
2876
|
+
d = e, be.push((async () => {
|
|
2877
|
+
let t = kt(e, (e, t) => t === "legacyDrawing" ? ke(e, o) : t === "part" ? F(e, o) : De(e, o, t === "resource") ?? null, Pe, u, () => {}, (e, t, n) => {
|
|
2878
|
+
re(e, t ? `${t} (${o})` : o, n);
|
|
2879
|
+
}, void 0, T), n = await j.getTextStream(o, fe);
|
|
2880
|
+
if (n) try {
|
|
2881
|
+
await H.parseStream(n, t, {
|
|
2882
|
+
xmlns: !1,
|
|
2883
|
+
lean: !0
|
|
2884
|
+
});
|
|
2885
|
+
} catch (e) {
|
|
2886
|
+
throw Error(`Error parsing sheet: '${o}'`, { cause: e });
|
|
2887
|
+
}
|
|
2888
|
+
let r = N(o, i);
|
|
2889
|
+
if (r) {
|
|
2890
|
+
Oe(e, o, r, i);
|
|
2891
|
+
let t = [];
|
|
2892
|
+
r.forEach((e, n) => {
|
|
2893
|
+
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable") return;
|
|
2894
|
+
let r = F(n, o, e.type, (e) => e !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition");
|
|
2895
|
+
if (!r?.xml) return;
|
|
2896
|
+
let i = /<pivotTableDefinition\b[^>]*>/.exec(r.xml)?.[0] ?? "", a = parseInt(/\scacheId="(\d+)"/.exec(i)?.[1] ?? "", 10);
|
|
2897
|
+
if (isNaN(a)) return void ne.push([`Pivot table '${r.name}' names no cache and was dropped.`, o]);
|
|
2898
|
+
let s = /\sname="([^"]*)"/.exec(i)?.[1];
|
|
2899
|
+
t.push({
|
|
2900
|
+
...s ? { name: y(s) } : {},
|
|
2901
|
+
cacheId: a,
|
|
2902
|
+
part: r
|
|
2903
|
+
});
|
|
2904
|
+
}), t.length > 0 && (e.pivotTables = t);
|
|
2905
|
+
}
|
|
2906
|
+
})());
|
|
2907
|
+
} else if (a.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink") {
|
|
2908
|
+
let t = ye(o, e, O, D, z);
|
|
2909
|
+
if (t && Object.keys(t).length !== 0) {
|
|
2910
|
+
let e = t, n = e.__bookRelId, r = e.__absoluteUrlRelId;
|
|
2911
|
+
delete e.__bookRelId, delete e.__absoluteUrlRelId;
|
|
2912
|
+
let a = [];
|
|
2913
|
+
N(o, i)?.forEach((e, t) => {
|
|
2914
|
+
if (e.targetMode === "External" && e.type && e.target) {
|
|
2915
|
+
let i = {
|
|
2916
|
+
type: e.type,
|
|
2917
|
+
target: e.target
|
|
2918
|
+
};
|
|
2919
|
+
t === n ? i.role = "book" : t === r && (i.role = "absoluteUrl"), a.push(i);
|
|
2920
|
+
}
|
|
2921
|
+
}), a.sort((e, t) => (e.role === "book" ? 0 : 1) - (t.role === "book" ? 0 : 1)), e.sources = a, Ee(o), d = e;
|
|
2922
|
+
} else d = null;
|
|
2923
|
+
} else d = r ? Te(o, e, (e, t) => {
|
|
2924
|
+
let n = s.add({ source: { buffer: e } });
|
|
2925
|
+
return n.addReference(w), me.add(n), _.toResourceId(n);
|
|
2926
|
+
}, z) : ye(o, e, O, D, z);
|
|
2927
|
+
return d;
|
|
2928
|
+
}, P = (e, t) => {
|
|
2929
|
+
if (!e) return null;
|
|
2930
|
+
let n = N(t, A)?.get(e);
|
|
2931
|
+
if (!n?.target || n.targetMode === "External") return null;
|
|
2932
|
+
let r = n.target;
|
|
2933
|
+
return r.startsWith("/") || (r = t.substring(0, t.lastIndexOf("/") + 1) + r), ge(r);
|
|
2934
|
+
}, Oe = (e, n, r, i) => {
|
|
2935
|
+
let a = [], o = /* @__PURE__ */ new Map(), s = [];
|
|
2936
|
+
r.forEach((e, t) => {
|
|
2937
|
+
if (e.type !== "http://schemas.microsoft.com/office/2017/10/relationships/threadedComment") return;
|
|
2938
|
+
let r = De(t, n, !1, i)?.comments;
|
|
2939
|
+
if (!r) return;
|
|
2940
|
+
for (let e = 0; e < r.length; e++) {
|
|
2941
|
+
let t = r[e];
|
|
2942
|
+
if (!t?.v?.id) continue;
|
|
2943
|
+
let { parentId: n, done: i, content: c, ...l } = t.v, u = {
|
|
2944
|
+
...l,
|
|
2945
|
+
content: Rt(c)
|
|
2946
|
+
};
|
|
2947
|
+
n ? s.push({
|
|
2948
|
+
parentId: n,
|
|
2949
|
+
json: u
|
|
2950
|
+
}) : (i && (u.done = !0), o.set(u.id, u), a.push({
|
|
2951
|
+
r: t.r,
|
|
2952
|
+
v: u
|
|
2953
|
+
}));
|
|
2954
|
+
}
|
|
2955
|
+
let c = P(t, n);
|
|
2956
|
+
c && Ee(c);
|
|
2957
|
+
});
|
|
2958
|
+
for (let e = 0; e < s.length; e++) {
|
|
2959
|
+
let { parentId: t, json: n } = s[e], r = o.get(t);
|
|
2960
|
+
r && (r.replies ??= []).push(n);
|
|
2961
|
+
}
|
|
2962
|
+
let c = [];
|
|
2963
|
+
if (r.forEach((e, r) => {
|
|
2964
|
+
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") return;
|
|
2965
|
+
let a = De(r, n, !1, i), s = a?.comments;
|
|
2966
|
+
if (!s) return;
|
|
2967
|
+
let l = a?.authors;
|
|
2968
|
+
for (let e = 0; e < s.length; e++) {
|
|
2969
|
+
let n = s[e];
|
|
2970
|
+
if (!n?.r) continue;
|
|
2971
|
+
let r = l && n.v.authorId !== void 0 ? l[n.v.authorId] : void 0;
|
|
2972
|
+
if (r && r.startsWith("tc=")) {
|
|
2973
|
+
if (o.has(_e(r.substring(3)))) continue;
|
|
2974
|
+
r = void 0;
|
|
2975
|
+
}
|
|
2976
|
+
let i = {
|
|
2977
|
+
id: t.uuidV4().toUpperCase(),
|
|
2978
|
+
asNote: !0,
|
|
2979
|
+
content: n.v.content ?? ""
|
|
2980
|
+
}, a = r ? je({ displayName: r }) : void 0;
|
|
2981
|
+
a && (i.personId = a.id), c.push({
|
|
2982
|
+
r: n.r,
|
|
2983
|
+
v: i
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
let u = P(r, n);
|
|
2987
|
+
u && Ee(u);
|
|
2988
|
+
}), a.length === 0 && c.length === 0) return;
|
|
2989
|
+
let l = [...a, ...c], u = e.legacyDrawing;
|
|
2990
|
+
if (u?.xml) {
|
|
2991
|
+
let { rest: t, notes: n } = de(u.xml);
|
|
2992
|
+
if (n.length > 0) {
|
|
2993
|
+
let r = /* @__PURE__ */ new Map();
|
|
2994
|
+
for (let e = 0; e < n.length; e++) {
|
|
2995
|
+
let t = n[e];
|
|
2996
|
+
r.set(f.cellToString({
|
|
2997
|
+
rowIndex: t.row,
|
|
2998
|
+
colIndex: t.col
|
|
2999
|
+
}), t);
|
|
3000
|
+
}
|
|
3001
|
+
for (let e = 0; e < l.length; e++) {
|
|
3002
|
+
let t = l[e], n = r.get(String(t.r).toUpperCase());
|
|
3003
|
+
n && (t.v.box = { xml: n.xml }, r.delete(String(t.r).toUpperCase()));
|
|
3004
|
+
}
|
|
3005
|
+
let i = [];
|
|
3006
|
+
r.forEach((e) => {
|
|
3007
|
+
i.push(e.xml);
|
|
3008
|
+
});
|
|
3009
|
+
let a = pe(t, i);
|
|
3010
|
+
a ? u.xml = a : delete e.legacyDrawing;
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
e.comments = l;
|
|
3014
|
+
}, ke = (t, n) => {
|
|
3015
|
+
let r = P(t, n);
|
|
3016
|
+
if (!r) return null;
|
|
3017
|
+
let i = e(It(r));
|
|
3018
|
+
if (!i) return null;
|
|
3019
|
+
let a = { xml: new TextDecoder("utf-8").decode(i.content) }, o = [];
|
|
3020
|
+
return N(r, A)?.forEach((e, t) => {
|
|
3021
|
+
if (e.type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") return;
|
|
3022
|
+
let n = De(t, r, !0);
|
|
3023
|
+
typeof n == "number" && o.push({
|
|
3024
|
+
id: t,
|
|
3025
|
+
resId: n
|
|
3026
|
+
});
|
|
3027
|
+
}), o.length > 0 && (a.images = o), Ee(r), a;
|
|
3028
|
+
}, F = (t, r, i, a, o = /* @__PURE__ */ new Set()) => {
|
|
3029
|
+
let s = P(t, r);
|
|
3030
|
+
if (!s || o.has(s)) return null;
|
|
3031
|
+
let c = i ?? N(r, A)?.get(t)?.type;
|
|
3032
|
+
if (!c) return null;
|
|
3033
|
+
let l = e(It(s));
|
|
3034
|
+
if (!l) return null;
|
|
3035
|
+
o.add(s);
|
|
3036
|
+
let u = s.substring(s.lastIndexOf("/") + 1), d = n.overrides[It(s)] ?? n.defaults[u.substring(u.lastIndexOf(".") + 1).toLowerCase()], f = {
|
|
3037
|
+
id: t,
|
|
3038
|
+
type: c,
|
|
3039
|
+
name: u
|
|
3040
|
+
};
|
|
3041
|
+
if (d && (f.contentType = d), ((e, t) => e ? e.endsWith("+xml") || e === "application/xml" : /\.(xml|rels|vml)$/i.test(t))(d, u)) f.xml = new TextDecoder("utf-8").decode(l.content);
|
|
3042
|
+
else {
|
|
3043
|
+
let e = De(t, r, !0);
|
|
3044
|
+
if (typeof e != "number") return null;
|
|
3045
|
+
f.resId = e;
|
|
3046
|
+
}
|
|
3047
|
+
let p = [];
|
|
3048
|
+
return N(s, A)?.forEach((e, t) => {
|
|
3049
|
+
if (!e?.type || a && !a(e.type)) return;
|
|
3050
|
+
if (e.targetMode === "External") {
|
|
3051
|
+
let n = De(t, s, !0);
|
|
3052
|
+
typeof n == "number" && p.push({
|
|
3053
|
+
id: t,
|
|
3054
|
+
type: e.type,
|
|
3055
|
+
resId: n
|
|
3056
|
+
});
|
|
3057
|
+
return;
|
|
3058
|
+
}
|
|
3059
|
+
let n = F(t, s, e.type, a, o);
|
|
3060
|
+
n && p.push(n);
|
|
3061
|
+
}), p.length > 0 && (f.parts = p), Ee(s), f;
|
|
3062
|
+
};
|
|
3063
|
+
M("coreprops", n, e, O, D, ie), M("extprops", n, e, O, D, ie);
|
|
3064
|
+
let I = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), Ae = M("people", n, e, O, D, ie), R = null;
|
|
3065
|
+
if (Ae.size > 0) {
|
|
3066
|
+
let [e, t] = Ae.entries().next().value;
|
|
3067
|
+
if (R = t?.persons, Ee(e), R) {
|
|
3068
|
+
let e = R.length;
|
|
3069
|
+
for (let t = 0; t < e; t++) {
|
|
3070
|
+
let e = R[t];
|
|
3071
|
+
I.set(e.id, e), e.displayName !== void 0 && L.set(e.displayName, e);
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
let je = (e) => {
|
|
3076
|
+
if (!e) return;
|
|
3077
|
+
if (e.id && I.has(e.id)) return I.get(e.id);
|
|
3078
|
+
let n = e.displayName;
|
|
3079
|
+
if (!e.id) {
|
|
3080
|
+
if (n) {
|
|
3081
|
+
let e = L.get(n);
|
|
3082
|
+
if (e) return e;
|
|
3083
|
+
}
|
|
3084
|
+
e.id = t.uuidV4();
|
|
3085
|
+
}
|
|
3086
|
+
let r = I.get(e.id);
|
|
3087
|
+
if (r) return r;
|
|
3088
|
+
let i = e;
|
|
3089
|
+
return I.set(e.id, i), n && L.set(n, i), R ||= [], R.push(i), i;
|
|
3090
|
+
}, z = {
|
|
3091
|
+
paramMap: T,
|
|
3092
|
+
getRefs: N,
|
|
3093
|
+
getRef: De,
|
|
3094
|
+
parsedRefs: A,
|
|
3095
|
+
readEmbeddedPart: (e, t) => F(e, t),
|
|
3096
|
+
addPerson: je,
|
|
3097
|
+
serializeElement: ve,
|
|
3098
|
+
onWarning: re
|
|
3099
|
+
}, B = [];
|
|
3100
|
+
if (a) {
|
|
3101
|
+
let e = await j.getTextStream(a, fe);
|
|
3102
|
+
if (e) {
|
|
3103
|
+
let t = ((e, t) => {
|
|
3104
|
+
let n = !1, r = !1, i = 0, a = "";
|
|
3105
|
+
return {
|
|
3106
|
+
onOpenTag: (e) => {
|
|
3107
|
+
let t = Pt(e.name);
|
|
3108
|
+
t === "t" ? n && i === 0 && (r = !0) : t === "si" ? (n = !0, a = "", i = 0) : t !== "rPh" && t !== "phoneticPr" || i++;
|
|
3109
|
+
},
|
|
3110
|
+
onText: (e) => {
|
|
3111
|
+
r && (a += e);
|
|
3112
|
+
},
|
|
3113
|
+
onCloseTag: (e) => {
|
|
3114
|
+
let t = Pt(e.name);
|
|
3115
|
+
t === "t" ? r = !1 : t === "si" ? (((e) => {
|
|
3116
|
+
B.push(e);
|
|
3117
|
+
})(ue(a)), n = !1, a = "") : t !== "rPh" && t !== "phoneticPr" || i > 0 && i--;
|
|
3118
|
+
},
|
|
3119
|
+
onError: (e) => {
|
|
3120
|
+
t?.(`Error parsing shared strings: ${e?.message ?? e}`);
|
|
3121
|
+
}
|
|
3122
|
+
};
|
|
3123
|
+
})(0, (e) => {
|
|
3124
|
+
re(e, a);
|
|
3125
|
+
});
|
|
3126
|
+
try {
|
|
3127
|
+
await H.parseStream(e, t, { xmlns: !1 });
|
|
3128
|
+
} catch (e) {
|
|
3129
|
+
throw Error(`Error parsing shared strings: '${a}'`, { cause: e });
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
x?.mark("shared-strings");
|
|
3134
|
+
let Me = B.length, Ne = /* @__PURE__ */ new Map(), V = Me, Pe = (e) => {
|
|
3135
|
+
let t = Ne.get(e);
|
|
3136
|
+
if (t !== void 0) return t;
|
|
3137
|
+
let n = V;
|
|
3138
|
+
return Ne.set(e, V++), B.push(e), n;
|
|
3139
|
+
}, U = [];
|
|
3140
|
+
n.slicersCache = U;
|
|
3141
|
+
let Fe = j.getNames(), Ie = Fe.length;
|
|
3142
|
+
for (let e = 0; e < Ie; e++) {
|
|
3143
|
+
let t = Fe[e];
|
|
3144
|
+
t && t.startsWith("xl/slicerCache") && U.push(`/${t}`);
|
|
3145
|
+
}
|
|
3146
|
+
let Le = M("slicersCache", n, e, O, D, z), Re = /* @__PURE__ */ new Map();
|
|
3147
|
+
Le.forEach((e) => {
|
|
3148
|
+
let t = e.name;
|
|
3149
|
+
delete e.name, Re.set(t, e);
|
|
3150
|
+
}), T.set("slicerCaches", Re), M("richstructure", n, e, O, D, z), M("richdata", n, e, O, D, z);
|
|
3151
|
+
let ze = M("themes", n, e, O, D, z), Be = null;
|
|
3152
|
+
if (ze && ze.entries) {
|
|
3153
|
+
let e = ze.entries().next();
|
|
3154
|
+
e?.value?.[1] && (Be = e.value[1]);
|
|
3155
|
+
}
|
|
3156
|
+
let Ve = new c(Be), He = M("styles", n, e, O, D, z).entries().next()?.value?.[1];
|
|
3157
|
+
He &&= JSON.parse(r.JSONStableStringify(He));
|
|
3158
|
+
let Ue = M("workbooks", n, e, O, D, z);
|
|
3159
|
+
x?.mark("side-parts-json"), await Promise.all(be);
|
|
3160
|
+
{
|
|
3161
|
+
let e = Ue.entries().next().value?.[1], t = ae(e?.names), n = e?.sheets ?? [];
|
|
3162
|
+
for (let e = 0; e < n.length; e++) {
|
|
3163
|
+
let r = n[e]?.sheet;
|
|
3164
|
+
r && g(r, t);
|
|
3165
|
+
}
|
|
3166
|
+
let r = e?.names;
|
|
3167
|
+
if (r) for (let e = 0; e < r.length; e++) {
|
|
3168
|
+
let n = r[e]?.ref;
|
|
3169
|
+
typeof n == "string" && (r[e].ref = t.readDetached(n));
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
ce && C > 0 && (ce(S, S), await new Promise((e) => setTimeout(e, 0))), x?.mark("sheets");
|
|
3173
|
+
let W = {
|
|
3174
|
+
...Ue.entries().next().value?.[1],
|
|
3175
|
+
styles: He,
|
|
3176
|
+
theme: Ve.toJSON()
|
|
3177
|
+
};
|
|
3178
|
+
xe(W, T.get(Se)), W.calc = {
|
|
3179
|
+
...W.calc ?? {},
|
|
3180
|
+
legacyIntersect: !0
|
|
3181
|
+
}, B.length > 0 && (W.strings = B), R && R.length > 0 && (W.people = R);
|
|
3182
|
+
let We = j.getEntry("xl/vbaProject.bin");
|
|
3183
|
+
if (We) try {
|
|
3184
|
+
let { VBAProject: e } = await import("./CBQrIDBtf5Ibwi96.js"), t = e.extract(We);
|
|
3185
|
+
if (t) {
|
|
3186
|
+
let n = /* @__PURE__ */ new Map();
|
|
3187
|
+
for (let e of W.sheets ?? []) {
|
|
3188
|
+
let t = e?.sheet?.codeName;
|
|
3189
|
+
t && n.set(t, e.sheet);
|
|
3190
|
+
}
|
|
3191
|
+
for (let r of t.modules) {
|
|
3192
|
+
let t = { language: "vba" }, { header: i, body: a } = e.splitAttributes(r.code);
|
|
3193
|
+
a && (t.source = a), i && (t.sourceHeader = i);
|
|
3194
|
+
let o = r.type === "document" ? n.get(r.name) : void 0;
|
|
3195
|
+
o || r.type !== "document" || (t.scope = "workbook");
|
|
3196
|
+
let s = o ? o.modules ??= {} : W.modules ??= {};
|
|
3197
|
+
s[r.name] || (s[r.name] = t);
|
|
3198
|
+
}
|
|
3199
|
+
l?.(t);
|
|
3200
|
+
} else ne.push(["Unable to parse VBA project.", "xl/vbaProject.bin"]);
|
|
3201
|
+
} catch (e) {
|
|
3202
|
+
ne.push([`Error extracting VBA: ${e?.message ?? e}`, "xl/vbaProject.bin"]);
|
|
3203
|
+
}
|
|
3204
|
+
let Ge = T.get("calcId"), Ke = Ge === void 0 || !(Number(Ge) >= 191029), G = h.calcOnLoad ?? (p === "auto" && Ke ? "full" : p), K = {
|
|
3205
|
+
...h,
|
|
3206
|
+
calcOnLoad: G,
|
|
3207
|
+
resources: s,
|
|
3208
|
+
json: W
|
|
3209
|
+
};
|
|
3210
|
+
K.disableLoadAutoFit === void 0 && (K.disableLoadAutoFit = !1), x?.mark("json-assembled");
|
|
3211
|
+
let q = new m(K);
|
|
3212
|
+
if (x?.mark("workbook-constructed"), E.length > 0 && G !== "none") {
|
|
3213
|
+
await q.whenCalculationReady();
|
|
3214
|
+
let e = /* @__PURE__ */ new Map(), t = W.sheets ?? [], n = q.getSheets().getItems();
|
|
3215
|
+
for (let r = 0; r < t.length; r++) {
|
|
3216
|
+
let i = t[r]?.sheet, a = n[r];
|
|
3217
|
+
i && a && e.set(i, a);
|
|
3218
|
+
}
|
|
3219
|
+
((e, t, n) => {
|
|
3220
|
+
if (t.length === 0) return;
|
|
3221
|
+
let r = e.getCalculation().getFunctions(), i = /* @__PURE__ */ new Map(), a = (e) => {
|
|
3222
|
+
let t = i.get(e);
|
|
3223
|
+
return t === void 0 && (t = r.getByName(e) !== null, i.set(e, t)), t;
|
|
3224
|
+
}, o = /* @__PURE__ */ new Map();
|
|
3225
|
+
for (let e of t) {
|
|
3226
|
+
let t = o.get(e.sheet);
|
|
3227
|
+
t || (t = [], o.set(e.sheet, t)), t.push(e);
|
|
3228
|
+
}
|
|
3229
|
+
for (let [e, t] of o) {
|
|
3230
|
+
let r = n.get(e);
|
|
3231
|
+
if (!r) continue;
|
|
3232
|
+
let i = (e, t) => `${e},${t}`, o = /* @__PURE__ */ new Set();
|
|
3233
|
+
for (let e of t) e.formula === null && o.add(i(e.rowIndex, e.colIndex));
|
|
3234
|
+
for (let e of t) {
|
|
3235
|
+
if (e.formula === null) continue;
|
|
3236
|
+
let t = Et(e.formula), n = !0;
|
|
3237
|
+
for (let e of t) if (!a(e)) {
|
|
3238
|
+
n = !1;
|
|
3239
|
+
break;
|
|
3240
|
+
}
|
|
3241
|
+
if (!n) continue;
|
|
3242
|
+
let s = [], c = [[e.rowIndex, e.colIndex]], l = /* @__PURE__ */ new Set([i(e.rowIndex, e.colIndex)]);
|
|
3243
|
+
for (; c.length > 0;) {
|
|
3244
|
+
let [e, t] = c.pop(), n = [
|
|
3245
|
+
[e + 1, t],
|
|
3246
|
+
[e - 1, t],
|
|
3247
|
+
[e, t + 1],
|
|
3248
|
+
[e, t - 1]
|
|
3249
|
+
];
|
|
3250
|
+
for (let [e, t] of n) {
|
|
3251
|
+
let n = i(e, t);
|
|
3252
|
+
!l.has(n) && o.has(n) && (l.add(n), s.push([e, t]), c.push([e, t]));
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
for (let [e, t] of s) o.delete(i(e, t)), r.getRange({
|
|
3256
|
+
rowStart: e,
|
|
3257
|
+
colStart: t,
|
|
3258
|
+
rowEnd: e,
|
|
3259
|
+
colEnd: t
|
|
3260
|
+
}).clear();
|
|
3261
|
+
r.getRange({
|
|
3262
|
+
rowStart: e.rowIndex,
|
|
3263
|
+
colStart: e.colIndex,
|
|
3264
|
+
rowEnd: e.rowIndex,
|
|
3265
|
+
colEnd: e.colIndex
|
|
3266
|
+
}).setValue("=" + e.formula);
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
})(q, E, e);
|
|
3270
|
+
}
|
|
3271
|
+
if (me.forEach((e) => {
|
|
3272
|
+
e.deleteReference(w);
|
|
3273
|
+
}), _.endPersist(), b) {
|
|
3274
|
+
v(q);
|
|
3275
|
+
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
3276
|
+
for (let n of j.getNames()) {
|
|
3277
|
+
let r = j.getEntry(n);
|
|
3278
|
+
if (!r) continue;
|
|
3279
|
+
let i = j.getRawEntry(n), a = i ? {
|
|
3280
|
+
data: r,
|
|
3281
|
+
uncompressedSize: j.uncompressedSize(n),
|
|
3282
|
+
raw: {
|
|
3283
|
+
compressedData: i.data,
|
|
3284
|
+
compressionMethod: i.compressionMethod,
|
|
3285
|
+
signature: i.signature
|
|
3286
|
+
}
|
|
3287
|
+
} : {
|
|
3288
|
+
data: r,
|
|
3289
|
+
uncompressedSize: j.uncompressedSize(n)
|
|
3290
|
+
};
|
|
3291
|
+
e.set(n, a), t += r.byteLength;
|
|
3292
|
+
}
|
|
3293
|
+
if (t > 67108864) ne.push([`Source package too large to retain (${t} bytes, limit ${he}); unmodeled parts will be dropped on save.`, "SourcePackage"]);
|
|
3294
|
+
else if (e.size > 0) {
|
|
3295
|
+
let t = new te(e, we);
|
|
3296
|
+
ee(q, t);
|
|
3297
|
+
let n = q.getSheets().getItems(), r = q.getTransactions().addListener({ onCommitEnd: (e) => {
|
|
3298
|
+
let n = e.getOperation()?.name;
|
|
3299
|
+
n !== "insertCells" && n !== "deleteCells" || t.markStructuralChange();
|
|
3300
|
+
} }), i = q.addListeners({ onSheetsChange: () => {
|
|
3301
|
+
let e = q.getSheets().getItems();
|
|
3302
|
+
(e.length !== n.length || e.some((e, t) => e !== n[t])) && t.markStructuralChange(), n = e;
|
|
3303
|
+
} });
|
|
3304
|
+
q.addListeners({ onClose: () => {
|
|
3305
|
+
r(), i(), v(q);
|
|
3306
|
+
} });
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
if (ne.length && se?.onWarning) {
|
|
3310
|
+
let e = /* @__PURE__ */ new Set();
|
|
3311
|
+
for (let t of ne) {
|
|
3312
|
+
let [n, r, i] = t, a = i ?? n;
|
|
3313
|
+
e.has(a) || (e.add(a), se.onWarning(n, r));
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
return x && !0 === u && console.table(x.toTable()), q;
|
|
3317
|
+
} catch (t) {
|
|
3318
|
+
let n = "Unable to parse XLSX.";
|
|
3319
|
+
throw t instanceof e && (n = "Unable to open XLSX. There are too many rows or columns."), Error(n, { cause: t });
|
|
3320
|
+
} finally {
|
|
3321
|
+
await j.close().catch(() => {});
|
|
3322
|
+
}
|
|
3323
|
+
};
|
|
3324
|
+
export { zt as readXLSX };
|