@sheetxl/mcp 0.8.0-beta.22 → 0.8.0-beta.24
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/assets/{BHsqPfJZrdKTbPLP.js → 2YT_wstXIH6UIigi.js} +1 -1
- package/assets/{DtvJg63vbDd6B7sD.js → 3VycPrqi6qgLOgGY.js} +6 -6
- package/assets/{DoScYrfTJOHXe-Ko.js → 6CBUVbF01Bedq0e2.js} +66 -66
- package/assets/{D-MsUF59BhikcNZt.js → 76dPHG5RYA7MUV_g.js} +3 -3
- package/assets/{DgVCjvTw9Df1DV1x.js → 7IzItpr7MkdnaAwh.js} +167 -167
- package/assets/{DevKDvFONeJ9euEq.js → 7vPlH3_rhJxmmBvG.js} +1 -1
- package/assets/{BV49J63s68Mj6lgF.js → 9GnbVPKozgrJpeLW.js} +1 -1
- package/assets/{VSbzBtGH0cA8VBsM.js → B-5mBXpY9i6-eCrZ.js} +39 -39
- package/assets/{4zyHb1mmcFfqwpjO.js → B-t1q2NS61c2B8E4.js} +1 -1
- package/assets/{BSdRn3B8QeJFflY6.js → B16G2473LTkZP6Mq.js} +157 -137
- package/assets/{DrLUi6vduqDLmQjl.js → B4uS01J0mrSJSftQ.js} +89 -89
- package/assets/{BzFIkeB_lheiTR7z.js → B6caaQsfOpFEgYQ4.js} +1 -1
- package/assets/{b-xk3WtCPBkC4E-Z.js → B7lATTNffVTrDsKE.js} +2 -2
- package/assets/{hhpAcu3tINDLk7Ov.js → B8bEJ65vQRqsfBlS.js} +5 -5
- package/assets/{ryaMyh_8KvmXVSJd.js → BAVltO4Xf7lC0Xr6.js} +1 -1
- package/assets/{3N6hsbh2WLceyO6T.js → BH7ctzMzOYVTGxzA.js} +1 -1
- package/assets/{HVwvDMZh0ZGR-hRT.js → BJqo8c5bFKjnq69G.js} +11 -11
- package/assets/{DEOkcuqKBFyRnY18.js → BJwiwzwx4Bl5L4Vq.js} +1 -1
- package/assets/{CT99WREgkKGpcDTO.js → BPNLZ07Bu_B8Yhf1.js} +1 -1
- package/assets/{CSKjFDYwiwn5XNnH.js → BWLavTnANLUerdS0.js} +2 -2
- package/assets/{Dvsld01DkmiNLjfP.js → BXWGS09xFG81nnIT.js} +1 -1
- package/assets/{C4-0s3Udk3v4ytSn.js → BaYk1vO2hP2S3_1w.js} +2 -2
- package/assets/{CHqnRMWNpLKcAWWn.js → BifwlrCmEVtjh_1U.js} +1 -1
- package/assets/{CYCqMEoWsry6_hrc.js → BjyXkr-CzV8mVx0t.js} +1 -1
- package/assets/{Ds5pLAwSN4lSbao6.js → BkHeIMSE7-LehRCs.js} +1 -1
- package/assets/{CwNKcoA7na7Ess3a.js → BkekCZ17YTtd07_C.js} +2 -2
- package/assets/{0jPw8-AyT6VbPuGO.js → BnNB_ejvNaLu6B3o.js} +1 -1
- package/assets/{BPZWfwUvFCLQInXN.js → BrJd9jVVv9SQzZol.js} +400 -400
- package/assets/{BRVEVVhj-8ZPrNyQ.js → BrYc6PLonux_gI6b.js} +223 -223
- package/assets/{Cu4VAHfmjXWfTMPu.js → BxwB3iTNSE1TgHkb.js} +1 -1
- package/assets/{DgYcOz0M0pmZf9x_.js → By1QPrSxtnRiJu0R.js} +2 -2
- package/assets/{B5VTjL9m0R-Icfaz.js → ByYJTTTUuu67hDF-.js} +4 -4
- package/assets/{CXk5vwFfosghrTKo.js → C-nA4SXN5hWHaxV6.js} +535 -535
- package/assets/{BnGNMsqG5CzUzmX7.js → C0uu0vLKQh0S508B.js} +23 -23
- package/assets/{BDq4iVyBh5lwX8pE.js → C6PNMev7cs5JLgwy.js} +1 -1
- package/assets/{C1PTfp7kVu3DqqZh.js → C9iFJ52KwQTePQ81.js} +8944 -8935
- package/assets/{xDx1vaNa2aCMs4_e.js → CCF6CwJ6cbeLRl23.js} +1 -1
- package/assets/{CAgQJrDxGEfoa7jn.js → CEk658HeLJk2cAjM.js} +3 -3
- package/assets/{Bf7Irm8Ua4s1T4xH.js → CFNtPYPfDPH-3BXK.js} +1 -1
- package/assets/{CHG9Q0uLAZdLXYVz.js → CFT_tDogP98gTbh7.js} +101 -101
- package/assets/{ze6Q8BiEw9RClBzZ.js → CFWwwr74qRKOBrg9.js} +1 -1
- package/assets/{Bi65BKwwiZYYZprq.js → CIY_RiLu1_FmRLAA.js} +1 -1
- package/assets/{D9ja7F9irHf9Iovx.js → CIw6ZC3K9x-ccacl.js} +1 -1
- package/assets/{1dUPpOVZSeeylKHv.js → CJ2hV-9ipqOEkLSG.js} +1 -1
- package/assets/{vazKaFOkHRriv7tX.js → CKD460cQOgwF6uSV.js} +1 -1
- package/assets/{zJoBN2CJdxEV7vdh.js → CM-q_J5aF6YXmjeu.js} +3 -3
- package/assets/{9AosCdy_xtdhLjN1.js → CR1aLf7CWEfPTO9a.js} +1 -1
- package/assets/{E9mta1q4VtVUusy5.js → CSXmTA6w6Pnbtqvb.js} +1 -1
- package/assets/{BI5L_Ysr8s0TQxdg.js → CT4czEKWIj1GeQN8.js} +1 -1
- package/assets/{D8dNiNpu9_L0NjGP.js → CUYQlZz5zWsUdmRy.js} +1 -1
- package/assets/{CGB4xgirbgEIN3tg.js → CbJWbjmv4bz4ppIZ.js} +356 -354
- package/assets/{Bx592y6pyOwTS2x7.js → Cf0zmfQYfJ7zM0Ya.js} +1 -1
- package/assets/{8csqJ8aGOdnKlrLl.js → Ch9w7xFxVMrvGuC_.js} +1 -1
- package/assets/{GGcMgq3ScY7Tv0PE.js → CmkgQ5-IG0BSCM3R.js} +3 -3
- package/assets/{BkqENH8xJ3_NQnD5.js → CmwNIrRssYuLN2fn.js} +422 -422
- package/assets/{sYakw2x8dcnpUlsX.js → CnI4Nli8vtWdFKvf.js} +3 -3
- package/assets/{DRd8gdwcr3EqtGkb.js → CnKX5SPVE2iuSK42.js} +1 -1
- package/assets/{BvKzhnweVF6GhjXh.js → CpvJUGg9ckuCIpIS.js} +1 -1
- package/assets/{DFQLoYLUO4TgDZPK.js → Cxzowsi6ASdZtzeI.js} +1 -1
- package/assets/{tIoHMgrZeRHWyxos.js → CzRvg04_TIbwBH5C.js} +3 -3
- package/assets/{BygXDW3XTdtR38aA.js → D-vo2bQyAmStQmD9.js} +1 -1
- package/assets/{DxNK3HVEzFdUou54.js → D6d1DKL15m52ZCuC.js} +1 -1
- package/assets/{Z5tQQ6IW5YBjblWX.js → D8k9de_hen-KqBWe.js} +1 -1
- package/assets/{91BKH9obG4IfBzhy.js → DE7G34oYbvrfXbJ7.js} +383 -378
- package/assets/{BrfsWImwRtf54LUU.js → DFVQIZ2zZyAphhCF.js} +1 -1
- package/assets/{D1tShC5iBlUoT2V2.js → DGI_8HyNF0eAv0P5.js} +1 -1
- package/assets/{C1yAmXrOu3iHV2cu.js → DGOgx3-IyO8bjF_t.js} +83 -83
- package/assets/{BXean6K6oDUxkzyd.js → DIgPlkEabQdKNUQn.js} +1 -1
- package/assets/{DmVQgN-N_HhYvakk.js → DJGYlGr2Zj7SkYqc.js} +1 -1
- package/assets/{DzGpZ2CQ1St9BF0y.js → DJfpKncnYnrr28G0.js} +1 -1
- package/assets/{CHnaSM8aMnQ2_VWW.js → DL8pez0eKo8arYPj.js} +3 -3
- package/assets/{tPa3RpqYRqCCCYf1.js → DM-yGHahbfA_uarn.js} +1 -1
- package/assets/{DHHYGjNwlLvja3dS.js → DMDTS0LH9Ke9t-3z.js} +1 -1
- package/assets/{D89TE5n8VKre9Gmp.js → DNSWaXblwhTtI3w7.js} +1 -1
- package/assets/{UgDy0WNXuV1sEnFW.js → DOSWSyKkK4eSi4PD.js} +2 -2
- package/assets/{CHpBOpoM9bCvQyn0.js → DPLTGglaPovTg9e5.js} +1 -1
- package/assets/{CpYgsvYMxV5SbRp3.js → DPYFRLJbHGlrcrJq.js} +2 -2
- package/assets/{DLbzfP7OOWhafkTq.js → DRq6lQLndj73WT35.js} +1 -1
- package/assets/{BUGEQS5WdiLcI_0X.js → DRzZ4bEyLRGVOLzV.js} +1 -1
- package/assets/{BUIjRIGTum7VuRFk.js → DUbIxDAzW1dzrtdI.js} +1 -1
- package/assets/{OfjHqYH31KqC5gVM.js → DXCTHw-ZutNIuo_2.js} +1 -1
- package/assets/{OtMeAlbq6tyW5Hnc.js → D_tdoUtUe7cApQJn.js} +4 -4
- package/assets/{DawLBAaNAAmo_P3Y.js → DaF9L7No8h8a-cqb.js} +2 -2
- package/assets/{DdDKDqtpIkzd-mXi.js → DaHD9SY75O8wDy3p.js} +2 -2
- package/assets/{CXqqaFgNeUVRGvEb.js → Daaro0HbHkKXkBP-.js} +2 -2
- package/assets/{BiC09_YKQPmlUklQ.js → DczQhB3mRSUw6GCf.js} +1 -1
- package/assets/Dfv_T_PQVL0O3lu5.js +14 -0
- package/assets/{B6pXiayrnDoDbQt1.js → Dhy6iU_09lrQnOAV.js} +47 -47
- package/assets/{Dbh-XVDw294AVLtl.js → Dk9zYXO3VoBhTdex.js} +1 -1
- package/assets/{DQIQR1t3IkC9wshP.js → DkQ4kxEKhKYQgfjK.js} +1 -1
- package/assets/{CSGN4rAf7CYnBDEa.js → Dlqk7XqKnAZ8Pcj3.js} +83 -83
- package/assets/{BaaVzb7xXROiWUhT.js → DqSBb1HmgeU7eg_i.js} +84 -84
- package/assets/{BgwCdHyXKQYFAl1M.js → Ds4TB1hn56-RK6_f.js} +1 -1
- package/assets/{VWEaItb0XvCoRiCT.js → DtVSjxL6N_7WyM8Z.js} +1 -1
- package/assets/{C9wlvcFyjQA59G-_.js → DuEtCJEnG_GnJzTX.js} +1 -1
- package/assets/{DdnALoxd3b8TLNla.js → DwNcvKM47ZHfvQM6.js} +1 -1
- package/assets/{CdtVv8YQ8PTmS4dz.js → DyiH3LlinD-38bG7.js} +1 -1
- package/assets/{hAVtdK6u2tlLI2cB.js → Jy-_0a72nn5Iv1NK.js} +1 -1
- package/assets/{Bzp3UtK_6fqEVlV8.js → KMzONx2Ps841nJHj.js} +8 -8
- package/assets/{CV729JV1mNyYCmrq.js → LM2rVDHdB0jVUFcT.js} +1 -1
- package/assets/{do_DTptu6c_xHJoZ.js → MosMza0-rXD8uHX_.js} +2 -2
- package/assets/{COVhUB0EotytQDHg.js → NAWWzA_hk4wYtsPP.js} +2 -2
- package/assets/{CufFcGwo5x95LSb7.js → P6V3JAiRpC3BWceC.js} +1 -1
- package/assets/{1U3DwsqHnOBwiGWn.js → TZnuVwhVjkOBax9F.js} +2 -2
- package/assets/{nSzQt54CIADky_tF.js → TdDTOcC1TYhk6UuR.js} +1 -1
- package/assets/{CGxhgXj5qKj_Ubcp.js → Xccc6oxtlSvJUDsC.js} +1 -1
- package/assets/{DAqaOCEQLmZRjcdR.js → a2e_g9YI3J-lUD7-.js} +1 -1
- package/assets/{D-N87jCOShDKTFDh.js → b8yACuWy67eIj_j2.js} +1 -1
- package/assets/{BlxrCp7d-SeM-2DW.js → bv3fZLUPzd14I58C.js} +631 -621
- package/assets/{CKhbbbjQ-_auMp3n.js → doqBmhonQlHp-1Ud.js} +1 -1
- package/assets/{BZxJKqVEO7B23XwE.js → fEfisM0E2fUYKIyU.js} +5 -5
- package/assets/{v5XZSqLd9ZV3kqcA.js → flby0g5gyZ9P2Wu2.js} +1 -1
- package/assets/{coTH4ab6CTEzw87b.js → g2Nu44uuSJFMzxEV.js} +2 -2
- package/assets/{Cahhn5OLNqRYy-n8.js → mZt9BTEejCJZ4YK4.js} +1 -1
- package/assets/{BnK6HEqT4rf1RoOG.js → qc7rA-Z3a4rkVQPx.js} +217 -217
- package/assets/{DsBXjYAgTUXAAWZZ.js → sJVPCrgeh0U6LbAK.js} +1 -1
- package/assets/{wWgI0JPoe_Wv0ceW.js → suLYEZBtGUhSYeB7.js} +1 -1
- package/assets/{WSiEiaP-NUEr9UaB.js → tWO-mE87mAuj1qih.js} +2 -2
- package/assets/{DdXp_iPwTOHAOvlL.js → xD41vsQY6h60lCqz.js} +1168 -1170
- package/assets/{C7zManFR1LEJXiwb.js → yz2PTfYm_8EGJPM5.js} +1 -1
- package/index.js +117 -117
- package/lib.js +1 -1
- package/licenses/dependencies.txt +12 -12
- package/package.json +4 -4
- package/screenshot-page/assets/{CFl15-2FAF9f3V7L.js → 0UZBKpOOsp7P-DkP.js} +2 -2
- package/screenshot-page/assets/{DfT1DMR1b5kiyYiV.js → B-0-chiwq4MIUQy9.js} +1 -1
- package/screenshot-page/assets/B7pXfEVkcbaMBMhc.js +1 -0
- package/screenshot-page/assets/BDRMUi2BsnBqytIq.js +2 -0
- package/screenshot-page/assets/BEjJHVSbtlsNtoq7.js +3 -0
- package/screenshot-page/assets/{BnZX0sxceYpvtg3I.js → BIuMiduMHSsTGacU.js} +2 -2
- package/screenshot-page/assets/BKwDvElKinpn1IK0.js +1 -0
- package/screenshot-page/assets/BPMQ22uISGOm3ymr.js +1 -0
- package/screenshot-page/assets/{adhmz3N2Kgq5eW66.js → BTJ1NNUzHotNDiDe.js} +2 -2
- package/screenshot-page/assets/BbT5KRhoeAKLzy54.js +2 -0
- package/screenshot-page/assets/{Dwv5Z_c2XS-hm-5y.js → BcZPWw18bdj_ZvA9.js} +1 -1
- package/screenshot-page/assets/{BEwl-ucV9Jfr0RoC.js → Bdb0azxGoCh6NBDk.js} +1 -1
- package/screenshot-page/assets/{CcOIj8c4N9KaWnD7.js → Bfq6-treWd_rRiWl.js} +1 -1
- package/screenshot-page/assets/{BGh5K-hHzy8mSVDr.js → Bg9UyX4yrB2mSdJt.js} +12 -12
- package/screenshot-page/assets/Bxq4FCQhyPbVhhaR.js +2 -0
- package/screenshot-page/assets/{zFbb8ESzwR_bE7IQ.js → CBP4y6KFPu24xhDT.js} +1 -1
- package/screenshot-page/assets/CI3Z1f4amZ9G2rPD.js +5 -0
- package/screenshot-page/assets/{COpZTXe_J1mSpeYD.js → CNB6WmYfGVZjlCKV.js} +1 -1
- package/screenshot-page/assets/{CXGgKVbVXjWzE0p6.js → CQ-33-es3XJ56pR4.js} +1 -1
- package/screenshot-page/assets/CSFFMEKyxEFaykqL.js +1 -0
- package/screenshot-page/assets/CXeJV1BW2CVemhPE.js +1 -0
- package/screenshot-page/assets/{Cmv8bpHaTWZ7Lmbt.js → C_YKEkTsGB_5gFNg.js} +2 -2
- package/screenshot-page/assets/CkxmJxdtjBIxYoMq.js +1 -0
- package/screenshot-page/assets/CtiTwHzd_ZSzd3W2.js +1 -0
- package/screenshot-page/assets/CwCu_r0BW41uLt3P.js +2 -0
- package/screenshot-page/assets/{DdusmeEPaU7CWT6e.js → Cx9eq2x1gIXGki3Q.js} +1 -1
- package/screenshot-page/assets/D43IayseD2Cy8OZo.js +4 -0
- package/screenshot-page/assets/{BftXEPOuf5Uwxpud.js → D6Ciix7JAZtdKqmj.js} +1 -1
- package/screenshot-page/assets/D6EXAYU-ZH8hjx_7.js +2 -0
- package/screenshot-page/assets/D7Yt7xmUlA6-Lq0Q.js +48 -0
- package/screenshot-page/assets/D8KyhLvfyjLZW92H.js +39 -0
- package/screenshot-page/assets/DACSL7FA_J91Z_H7.js +2 -0
- package/screenshot-page/assets/DBxAatsD6aWk7Zb6.js +586 -0
- package/screenshot-page/assets/DGkaCFHx4PsOJkFu.js +1 -0
- package/screenshot-page/assets/DM6hr-bvWV50-Oex.js +2 -0
- package/screenshot-page/assets/DOVt9zHz7FQ2KUQM.js +1 -0
- package/screenshot-page/assets/DR-og7vslxlOZd8j.js +1 -0
- package/screenshot-page/assets/DSTlKGmqncM7XHeW.js +1 -0
- package/screenshot-page/assets/Dh14XQinAphjZOKC.js +1 -0
- package/screenshot-page/assets/Dkf51CnZh2zPEGMd.js +1 -0
- package/screenshot-page/assets/{nM1r2xslndIMKlI2.js → DmDFKv_3APEWI-IY.js} +2 -2
- package/screenshot-page/assets/Dt8JxbBBr2TeDflQ.js +1 -0
- package/screenshot-page/assets/Dxi-bXNjS-CpC5Qr.js +1 -0
- package/screenshot-page/assets/{Bm9-R9keVK5Sx-8o.js → DynKB5GH-vfFMJEy.js} +1 -1
- package/screenshot-page/assets/{CZq2dMHs2MHHyyBl.js → FcTM4SB17cEX1M3X.js} +1 -1
- package/screenshot-page/assets/{B668_VaGrdcWRbkC.js → FqdZRM336KMEcsbU.js} +1 -1
- package/screenshot-page/assets/Oay0yGsGYgJDzy8r.js +1 -0
- package/screenshot-page/assets/Pt9ne0xkE2icD3Ih.js +1 -0
- package/screenshot-page/assets/QZg76Jflu3Q808W3.js +1 -0
- package/screenshot-page/assets/{BRemww1df2HKLd_k.js → WTrYzPnMQhYDILMR.js} +1 -1
- package/screenshot-page/assets/{CXUO3vYip3JPSJ7A.js → YH1wNXzhQbkuWxeS.js} +1 -1
- package/screenshot-page/assets/{CQ9C0-FcDZxrgC3T.js → a3fvt1Klg1uGE7p6.js} +7 -7
- package/screenshot-page/assets/{D8-mayyvvVE1a4JB.js → clrFU8i-0wNkmbs7.js} +1 -1
- package/screenshot-page/assets/{-cpi3yOZYn6GsYN4.js → gU2zeJaXoNh7QI_e.js} +2 -2
- package/screenshot-page/assets/r2HZG9_SMzF3__ID.js +13 -0
- package/screenshot-page/index.html +16 -16
- package/types/scripting-api.json +5747 -5744
- package/types/scripting.d.ts +27 -3
- package/assets/r-pk3RNq_HjMQFqr.js +0 -14
- package/screenshot-page/assets/0buGanYjZDNd9qAK.js +0 -39
- package/screenshot-page/assets/B2oadmu_j6WfNbZ1.js +0 -1
- package/screenshot-page/assets/BGWgIYge30MP6Xhz.js +0 -48
- package/screenshot-page/assets/BIQ7KK-buzeddVA9.js +0 -1
- package/screenshot-page/assets/BPRDGSNh0kvXRFUY.js +0 -1
- package/screenshot-page/assets/Bv2MgCMkg3EIQ6iE.js +0 -13
- package/screenshot-page/assets/BvaiwYJ5zZ0d5NRP.js +0 -1
- package/screenshot-page/assets/CAlTfQ_Gh-dURmUc.js +0 -1
- package/screenshot-page/assets/CCFxspvs5VzbYCfl.js +0 -1
- package/screenshot-page/assets/CCqTTfzZokVHIzs2.js +0 -1
- package/screenshot-page/assets/CPs_ARK8JCyz-yZg.js +0 -1
- package/screenshot-page/assets/CUeMb48Ucrm5dK5u.js +0 -1
- package/screenshot-page/assets/CjrHeIdacavAT_Ud.js +0 -3
- package/screenshot-page/assets/CqccUqSMYlwlf2ZU.js +0 -2
- package/screenshot-page/assets/CvmImq-Kbg9srxNr.js +0 -4
- package/screenshot-page/assets/D-3wYBqe4SWdE6bx.js +0 -2
- package/screenshot-page/assets/D-FWnGDbZ9BRDzPR.js +0 -1
- package/screenshot-page/assets/D717DArr-KKL0U6R.js +0 -1
- package/screenshot-page/assets/DM27mE98BNk1T18I.js +0 -1
- package/screenshot-page/assets/DN-T1DyRMKvxEJSK.js +0 -1
- package/screenshot-page/assets/DRdL1GN4SP7P8lSP.js +0 -2
- package/screenshot-page/assets/DcnhaY93LQd7kVdH.js +0 -2
- package/screenshot-page/assets/DigI6jhjHePzLgg1.js +0 -1
- package/screenshot-page/assets/DrDLCC0R2IV5VJd7.js +0 -1
- package/screenshot-page/assets/DuYb_otrRZZDq6-f.js +0 -2
- package/screenshot-page/assets/Dx0pUf3G4Oa3dGOk.js +0 -1
- package/screenshot-page/assets/JcgNMFaj_uqHSFxr.js +0 -1
- package/screenshot-page/assets/U_8_wApwfA7KmIG3.js +0 -586
- package/screenshot-page/assets/WZprjN2sb7HlraOb.js +0 -2
- package/screenshot-page/assets/qjoaeEBxfKWCHmqK.js +0 -2
- package/screenshot-page/assets/zALFdtoGJBN6m2Bn.js +0 -1
- package/screenshot-page/assets/zd1Z2E1NjFp2EWC7.js +0 -5
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.24
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { p as e, tt as t } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { u as a } from "./
|
|
10
|
-
import { $ as l, $
|
|
11
|
-
import { a as
|
|
12
|
-
var
|
|
7
|
+
import { p as e, tt as t } from "./DMDTS0LH9Ke9t-3z.js";
|
|
8
|
+
import { Qt as n, _ as s, v as r, vt as o } from "./B16G2473LTkZP6Mq.js";
|
|
9
|
+
import { u as a } from "./DRzZ4bEyLRGVOLzV.js";
|
|
10
|
+
import { $ as l, $i as i, Ai as d, Hr as u, I as c, In as f, It as m, Mn as p, Na as h, O as g, Pi as w, Qi as v, Ra as F, S as b, Sa as y, Sn as I, Tt as x, Un as A, Va as C, Vr as E, Za as S, _a as P, aa as k, br as M, fi as T, fr as R, ga as O, gi as N, mn as $, mt as _, p as L, qi as D, st as V, ti as U, u as H, ut as z, wa as B, ya as j, z as q, zr as G } from "./C9iFJ52KwQTePQ81.js";
|
|
11
|
+
import { a as Q, i as K, n as J, o as W, r as Z } from "./CnI4Nli8vtWdFKvf.js";
|
|
12
|
+
var X = [
|
|
13
13
|
"Jan",
|
|
14
14
|
"Feb",
|
|
15
15
|
"Mar",
|
|
@@ -22,7 +22,7 @@ var Y = [
|
|
|
22
22
|
"Oct",
|
|
23
23
|
"Nov",
|
|
24
24
|
"Dec"
|
|
25
|
-
],
|
|
25
|
+
], Y = [
|
|
26
26
|
31,
|
|
27
27
|
29,
|
|
28
28
|
31,
|
|
@@ -52,7 +52,7 @@ var Y = [
|
|
|
52
52
|
case "months": return a.month;
|
|
53
53
|
case "days": {
|
|
54
54
|
let e = a.day;
|
|
55
|
-
for (let t = 0; t < a.month - 1; t++) e +=
|
|
55
|
+
for (let t = 0; t < a.month - 1; t++) e += Y[t];
|
|
56
56
|
return e;
|
|
57
57
|
}
|
|
58
58
|
case "hours": return a.hour + 1;
|
|
@@ -61,15 +61,15 @@ var Y = [
|
|
|
61
61
|
default: return null;
|
|
62
62
|
}
|
|
63
63
|
}, te = (e, t) => {
|
|
64
|
-
const n = e.fields ?? [], s =
|
|
65
|
-
if (!n.some(
|
|
66
|
-
const r =
|
|
64
|
+
const n = e.fields ?? [], s = i(e.records, n.length);
|
|
65
|
+
if (!n.some(j)) return s;
|
|
66
|
+
const r = i(e.items, n.length), o = e.recordCount ?? 0, a = s.slice();
|
|
67
67
|
for (let e = 0; e < n.length; e++) {
|
|
68
68
|
const l = n[e];
|
|
69
|
-
if (!
|
|
69
|
+
if (!j(l)) continue;
|
|
70
70
|
const i = l.group, d = s[i.base] ?? [], u = r[i.base] ?? [], c = new Int32Array(u.length);
|
|
71
71
|
for (let e = 0; e < u.length; e++) {
|
|
72
|
-
const n = i.range ? ee(i.range, i.items.length,
|
|
72
|
+
const n = i.range ? ee(i.range, i.items.length, g(u[e]), t) : i.discrete?.[e] ?? null;
|
|
73
73
|
c[e] = n ?? -1;
|
|
74
74
|
}
|
|
75
75
|
const f = new Array(o);
|
|
@@ -110,8 +110,8 @@ var Y = [
|
|
|
110
110
|
case "days":
|
|
111
111
|
if (1 === o) {
|
|
112
112
|
const e = [];
|
|
113
|
-
return
|
|
114
|
-
for (let s = 1; s <= t; s++) e.push(`${s}-${
|
|
113
|
+
return Y.forEach((t, n) => {
|
|
114
|
+
for (let s = 1; s <= t; s++) e.push(`${s}-${X[n]}`);
|
|
115
115
|
}), {
|
|
116
116
|
inner: e,
|
|
117
117
|
endText: a
|
|
@@ -125,7 +125,7 @@ var Y = [
|
|
|
125
125
|
endText: a
|
|
126
126
|
};
|
|
127
127
|
case "months": return {
|
|
128
|
-
inner:
|
|
128
|
+
inner: X.slice(),
|
|
129
129
|
endText: a
|
|
130
130
|
};
|
|
131
131
|
case "quarters": return {
|
|
@@ -231,10 +231,10 @@ var Y = [
|
|
|
231
231
|
if (t.includes(e)) return !1;
|
|
232
232
|
const i = [];
|
|
233
233
|
oe(n[e].formula, (e) => {
|
|
234
|
-
const t = n.findIndex((t) =>
|
|
234
|
+
const t = n.findIndex((t) => S(t.name, e));
|
|
235
235
|
return t >= 0 && i.push(t), t >= 0 ? "" : null;
|
|
236
236
|
});
|
|
237
|
-
for (const r of i) if (
|
|
237
|
+
for (const r of i) if (w(n[r])) {
|
|
238
238
|
if (!l(r, [...t, e])) return !1;
|
|
239
239
|
} else s.includes(r) || s.push(r);
|
|
240
240
|
return o.set(e, r.length), a.set(e, n[e].formula), r.push({
|
|
@@ -242,21 +242,21 @@ var Y = [
|
|
|
242
242
|
expression: ""
|
|
243
243
|
}), !0;
|
|
244
244
|
}, i = [];
|
|
245
|
-
for (const [t, s] of (e.dataFields ?? []).entries()) if (
|
|
245
|
+
for (const [t, s] of (e.dataFields ?? []).entries()) if (w(n[s.field])) {
|
|
246
246
|
if (!l(s.field, [])) return null;
|
|
247
247
|
i.push({
|
|
248
248
|
data: t,
|
|
249
249
|
formula: o.get(s.field)
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
const
|
|
252
|
+
const d = (e, t) => {
|
|
253
253
|
if (null !== t) return null;
|
|
254
|
-
const r = n.findIndex((t) =>
|
|
255
|
-
return r >= 0 ? ae(
|
|
254
|
+
const r = n.findIndex((t) => S(t.name, e));
|
|
255
|
+
return r >= 0 ? ae(w(n[a = r]) ? s.length + o.get(a) : s.indexOf(a)) : null;
|
|
256
256
|
var a;
|
|
257
257
|
};
|
|
258
258
|
for (const e of r) {
|
|
259
|
-
const t = oe(a.get(e.field),
|
|
259
|
+
const t = oe(a.get(e.field), d);
|
|
260
260
|
if (null === t) return null;
|
|
261
261
|
e.expression = t;
|
|
262
262
|
}
|
|
@@ -343,41 +343,41 @@ var Y = [
|
|
|
343
343
|
percent: 13,
|
|
344
344
|
percentDiff: 14
|
|
345
345
|
}, Ie = (e, t, n, s) => {
|
|
346
|
-
const r =
|
|
346
|
+
const r = p.peek(), o = e.fields, a = t.fields;
|
|
347
347
|
if (!r || !o || !a || o.length !== a.length) return null;
|
|
348
|
-
if (
|
|
348
|
+
if (A(e)) return {
|
|
349
349
|
cells: [],
|
|
350
|
-
...
|
|
350
|
+
...V,
|
|
351
351
|
rowPageCount: 0,
|
|
352
352
|
columnPageCount: 0,
|
|
353
|
-
header:
|
|
353
|
+
header: O(e),
|
|
354
354
|
rowLines: [],
|
|
355
355
|
columnLines: [],
|
|
356
356
|
viewValues: [],
|
|
357
357
|
firstKey: null,
|
|
358
358
|
...s?.roles ? { roles: /* @__PURE__ */ new Map() } : {}
|
|
359
359
|
};
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
360
|
+
const l = L(e, a), i = l ? s?.filters : null;
|
|
361
|
+
if (l && !i) return null;
|
|
362
362
|
const u = o.some((e) => e.items?.some((e) => e.calculated));
|
|
363
|
-
if (u && !
|
|
363
|
+
if (u && !i?.calculatedRecords) return null;
|
|
364
364
|
const c = de(e, t);
|
|
365
|
-
if (!c || c.measures.length > 0 && !
|
|
365
|
+
if (!c || c.measures.length > 0 && !i?.fieldValues) return null;
|
|
366
366
|
if ((e.dataFields ?? []).some((e) => void 0 === ye[e.showDataAs ?? "normal"] || void 0 === pe[e.subtotal ?? "sum"])) return null;
|
|
367
|
-
const
|
|
368
|
-
if (!
|
|
369
|
-
const { items:
|
|
367
|
+
const f = xe(e, t, n, i?.calculatedRecords, c.operands);
|
|
368
|
+
if (!f) return null;
|
|
369
|
+
const { items: m, records: h, values: g, n: w } = f, v = (e) => !!e && (!e.noRecords || j(e)), F = e.form ?? "compact", b = (e) => {
|
|
370
370
|
const t = [];
|
|
371
371
|
for (const n of e ?? []) {
|
|
372
372
|
if (n === ce) {
|
|
373
373
|
t.push({
|
|
374
374
|
field: n,
|
|
375
|
-
form:
|
|
375
|
+
form: F
|
|
376
376
|
});
|
|
377
377
|
continue;
|
|
378
378
|
}
|
|
379
379
|
const e = o[n], s = e?.subtotals;
|
|
380
|
-
if (!e || !
|
|
380
|
+
if (!e || !v(a[n])) return null;
|
|
381
381
|
if (u && s && s.some((e) => "default" !== e)) return null;
|
|
382
382
|
t.push({
|
|
383
383
|
field: n,
|
|
@@ -385,33 +385,33 @@ var Y = [
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
return t;
|
|
388
|
-
},
|
|
389
|
-
if (!
|
|
390
|
-
const
|
|
391
|
-
return
|
|
388
|
+
}, y = b(e.rowFields), I = b(e.columnFields), x = e.pageFields ?? [];
|
|
389
|
+
if (!y || !I || x.some((e) => !v(a[e.field]))) return null;
|
|
390
|
+
const C = d(e, s?.slicerFields);
|
|
391
|
+
return C.pageFields?.some((e) => !v(a[e.field])) ? null : Te(e, t, m, y, I, Se(r, C, m, h, g, y, I, w, i?.keep, i?.records, c.operands.length, i?.fieldValues, !0), n, !0 === s?.roles, "columns" === s?.cellOrder);
|
|
392
392
|
}, xe = (e, t, n, s, r = []) => {
|
|
393
|
-
const o = t.fields?.length ?? 0, a =
|
|
393
|
+
const o = t.fields?.length ?? 0, a = u(t);
|
|
394
394
|
if (!t.records) return null;
|
|
395
395
|
const l = te(t, n.isDate1904());
|
|
396
396
|
if (!l) return null;
|
|
397
|
-
const
|
|
398
|
-
const s = !t.fields?.[e]?.noRecords, r = s ?
|
|
399
|
-
for (let e = 0; e <
|
|
400
|
-
for (let e = 0; e <
|
|
397
|
+
const d = !0 === t.fields?.some(j), c = d ? i(t.items, o) : a, f = d ? i(t.records, o) : l, m = t.recordCount ?? 0, p = s?.count ?? 0, h = m + p, w = (e, n) => {
|
|
398
|
+
const s = !t.fields?.[e]?.noRecords, r = s ? f[e] : l[e] ?? [], o = s ? c[e] : a[e], i = new Array(h);
|
|
399
|
+
for (let e = 0; e < m; e++) i[e] = g(o[r[e]]);
|
|
400
|
+
for (let e = 0; e < p; e++) i[m + e] = n?.[e] ?? null;
|
|
401
401
|
return i;
|
|
402
|
-
},
|
|
402
|
+
}, v = [...(e.dataFields ?? []).map((e, t) => w(e.field, s?.values[t])), ...r.map((e) => w(e))];
|
|
403
403
|
return {
|
|
404
404
|
items: a,
|
|
405
405
|
records: s ? l.map((e, t) => e.concat(s.ids[t] ?? [])) : l,
|
|
406
|
-
values:
|
|
407
|
-
n:
|
|
406
|
+
values: v,
|
|
407
|
+
n: h
|
|
408
408
|
};
|
|
409
|
-
}, Ae = async (e, t, n, s, r, o, a,
|
|
410
|
-
const
|
|
411
|
-
if (!
|
|
412
|
-
const
|
|
413
|
-
if (!
|
|
414
|
-
const h =
|
|
409
|
+
}, Ae = async (e, t, n, s, r, o, a, l, i) => {
|
|
410
|
+
const d = p.peek(), u = e.dataFields?.[r];
|
|
411
|
+
if (!d || !e.fields || !u || void 0 === pe[u.subtotal ?? "sum"]) return null;
|
|
412
|
+
const c = [e.rowFields, e.columnFields].map((e) => (e ?? []).filter((e) => e !== ce)), f = c.findIndex((e) => e.includes(s)), m = c[f];
|
|
413
|
+
if (!m) return null;
|
|
414
|
+
const h = m.slice(0, m.indexOf(s)), g = e.fields.map((e) => {
|
|
415
415
|
const { blankRowAfter: t, showItemsWithNoData: n, sort: s, ...r } = e;
|
|
416
416
|
return {
|
|
417
417
|
...r,
|
|
@@ -421,18 +421,18 @@ var Y = [
|
|
|
421
421
|
return n;
|
|
422
422
|
})
|
|
423
423
|
};
|
|
424
|
-
}), { columnGrandTotals: w, ...v } = e, { showDataAs: F, ...b } =
|
|
424
|
+
}), { columnGrandTotals: w, ...v } = e, { showDataAs: F, ...b } = u, y = {
|
|
425
425
|
...v,
|
|
426
426
|
fields: g,
|
|
427
427
|
rowFields: [...h, s],
|
|
428
428
|
columnFields: [],
|
|
429
429
|
dataFields: [b],
|
|
430
430
|
rowGrandTotals: !1
|
|
431
|
-
}, I =
|
|
432
|
-
...
|
|
433
|
-
values: [
|
|
434
|
-
} :
|
|
435
|
-
if (!x || x.measures.length > 0 && !
|
|
431
|
+
}, I = l ? {
|
|
432
|
+
...l,
|
|
433
|
+
values: [l.values[r] ?? []]
|
|
434
|
+
} : l, x = de(y, t);
|
|
435
|
+
if (!x || x.measures.length > 0 && !i) return null;
|
|
436
436
|
const A = xe(y, t, n, I, x.operands);
|
|
437
437
|
if (!A) return null;
|
|
438
438
|
const { items: C, records: E, values: S, n: P } = A, k = y.rowFields.map((e) => ({
|
|
@@ -441,14 +441,14 @@ var Y = [
|
|
|
441
441
|
}));
|
|
442
442
|
let M;
|
|
443
443
|
if (a) {
|
|
444
|
-
const e = 0 ===
|
|
444
|
+
const e = 0 === f ? 1 : 2;
|
|
445
445
|
M = new Uint8Array(P);
|
|
446
446
|
for (let t = 0; t < P; t++) {
|
|
447
447
|
const n = a[t];
|
|
448
448
|
M[t] = (n & e ? 1 : 0) | (3 === n ? 2 : 0);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
const T = x.measures.length > 0 ? await Ee(
|
|
451
|
+
const T = x.measures.length > 0 ? await Ee(d, x, y, C, E, S, k, [], P, o, M, i) : void 0, R = Se(d, y, C, E, S, k, [], P, o, M, x.operands.length, T), O = (t, n) => e.fields[t].items?.[n]?.item ?? n, N = /* @__PURE__ */ new Map(), $ = R.columns.length;
|
|
452
452
|
return R.rows.forEach((e, t) => {
|
|
453
453
|
if (0 !== e.kind || e.path.length !== h.length + 1) return;
|
|
454
454
|
const n = h.map((t, n) => O(t, e.path[n])).join(",");
|
|
@@ -485,7 +485,7 @@ var Y = [
|
|
|
485
485
|
t.operands.forEach((t, n) => {
|
|
486
486
|
const o = s.values(r + n);
|
|
487
487
|
try {
|
|
488
|
-
const t =
|
|
488
|
+
const t = K(e.wasm_memory().buffer, o, p), n = new Array(h);
|
|
489
489
|
for (let e = 0; e < h; e++) n[e] = t(e);
|
|
490
490
|
g.push(n);
|
|
491
491
|
} finally {
|
|
@@ -522,7 +522,7 @@ var Y = [
|
|
|
522
522
|
try {
|
|
523
523
|
const n = ke(v.row_lines(), v.row_stride()), s = ke(v.column_lines(), v.column_stride()), r = v.states(), a = v.values();
|
|
524
524
|
try {
|
|
525
|
-
const i =
|
|
525
|
+
const i = K(e.wasm_memory().buffer, a, h), d = new Array(r.length);
|
|
526
526
|
for (let e = 0; e < r.length; e++) d[e] = 0 === r[e] ? i(e) : null;
|
|
527
527
|
return {
|
|
528
528
|
rows: n,
|
|
@@ -608,7 +608,7 @@ var Y = [
|
|
|
608
608
|
ok: !0,
|
|
609
609
|
numeric: !0
|
|
610
610
|
}, o = r[t];
|
|
611
|
-
for (let e = 0; e < l; e++)
|
|
611
|
+
for (let e = 0; e < l; e++) Z(n, e, o[e], A, s);
|
|
612
612
|
});
|
|
613
613
|
for (const { column: e, ptr: t } of y) {
|
|
614
614
|
const n = e.length, s = {
|
|
@@ -619,7 +619,7 @@ var Y = [
|
|
|
619
619
|
ok: !0,
|
|
620
620
|
numeric: !0
|
|
621
621
|
};
|
|
622
|
-
for (let t = 0; t < n; t++)
|
|
622
|
+
for (let t = 0; t < n; t++) Z(s, t, e[t], A, r);
|
|
623
623
|
}
|
|
624
624
|
return {
|
|
625
625
|
request: p,
|
|
@@ -649,87 +649,87 @@ var Y = [
|
|
|
649
649
|
} else s.type = 1 === e.kind ? null !== e.function ? t[e.function] : "default" : 2 === e.kind ? "grand" : "blank", s.items = 2 === e.kind ? [0] : e.path.slice();
|
|
650
650
|
return null !== e.data && e.data > 0 && (s.dataField = e.data), s;
|
|
651
651
|
});
|
|
652
|
-
}, Te = (e, t,
|
|
653
|
-
const
|
|
654
|
-
if (e === ce) return
|
|
655
|
-
const
|
|
656
|
-
if (void 0 !==
|
|
657
|
-
const r =
|
|
658
|
-
return null === r ?
|
|
652
|
+
}, Te = (e, t, s, r, o, l, i, d, u) => {
|
|
653
|
+
const c = e.fields, f = t.fields, m = e.dataFields ?? [], p = (t) => t === ce ? e.valuesCaption ?? "Values" : c[t].name ?? f[t].name, h = (e, t) => {
|
|
654
|
+
if (e === ce) return m[t]?.name ?? "";
|
|
655
|
+
const n = c[e].items?.[t];
|
|
656
|
+
if (void 0 !== n?.name) return n.name;
|
|
657
|
+
const r = g(s[e][n?.item ?? t]);
|
|
658
|
+
return null === r ? D : r;
|
|
659
659
|
}, w = (e, t) => {
|
|
660
|
-
const
|
|
661
|
-
if ("number" == typeof
|
|
662
|
-
const o =
|
|
663
|
-
return
|
|
660
|
+
const s = h(e, t);
|
|
661
|
+
if ("number" == typeof s) {
|
|
662
|
+
const o = c[e].items?.[t]?.item ?? t, a = void 0 === (c[e].numberFormat ?? f[e].numberFormat) && C(f[e], o);
|
|
663
|
+
return n(i, a ? F(T(f[e], o), i) : F(c[r = e].numberFormat ?? f[r].numberFormat, i), s);
|
|
664
664
|
}
|
|
665
665
|
var r;
|
|
666
|
-
return a.isError(
|
|
667
|
-
},
|
|
668
|
-
if (void 0 !== e.item) return
|
|
669
|
-
const t =
|
|
666
|
+
return a.isError(s) ? s.getLabel() : "boolean" == typeof s ? s ? "TRUE" : "FALSE" : String(s);
|
|
667
|
+
}, b = (e) => {
|
|
668
|
+
if (void 0 !== e.item) return h(e.field, e.item);
|
|
669
|
+
const t = c[e.field].items ?? [];
|
|
670
670
|
if (!t.some((e) => e.hidden)) return "(All)";
|
|
671
|
-
const n = t.flatMap((e, t) =>
|
|
672
|
-
return 1 === n.length ?
|
|
673
|
-
},
|
|
671
|
+
const n = t.flatMap((e, t) => I(e) && !e.hidden ? [t] : []);
|
|
672
|
+
return 1 === n.length ? h(e.field, n[0]) : "(Multiple Items)";
|
|
673
|
+
}, x = e.grandTotalCaption ?? "Grand Total", A = d ? /* @__PURE__ */ new Map() : null, E = (e, t) => e === ce ? {
|
|
674
674
|
kind: "dataCaption",
|
|
675
675
|
data: t
|
|
676
676
|
} : {
|
|
677
677
|
kind: "item",
|
|
678
678
|
field: e,
|
|
679
679
|
rank: t
|
|
680
|
-
},
|
|
680
|
+
}, S = (e) => e === ce ? null : {
|
|
681
681
|
kind: "fieldCaption",
|
|
682
682
|
field: e
|
|
683
|
-
}, P = (e, t) => 2 === e.kind && t ===
|
|
683
|
+
}, P = (e, t) => 2 === e.kind && t === x ? { kind: "grandTotal" } : null, k = 0 === r.length && 0 === o.length && 0 === m.length, M = k ? {
|
|
684
684
|
firstHeaderRow: 0,
|
|
685
685
|
firstDataRow: 0,
|
|
686
686
|
firstDataCol: 0
|
|
687
|
-
} :
|
|
687
|
+
} : O(e), N = k ? [] : Me(l.rows, l.functions), $ = k ? [] : Me(l.columns, l.functions), _ = y({
|
|
688
688
|
...e,
|
|
689
|
-
header:
|
|
690
|
-
rowLines:
|
|
691
|
-
columnLines:
|
|
692
|
-
}), L = l.columns.length,
|
|
689
|
+
header: M,
|
|
690
|
+
rowLines: N,
|
|
691
|
+
columnLines: $
|
|
692
|
+
}), L = l.columns.length, V = (e) => "row" === e ? r : o, U = (t) => {
|
|
693
693
|
switch (t.kind) {
|
|
694
694
|
case "pageCaption": {
|
|
695
695
|
const n = e.pageFields[t.page].field;
|
|
696
|
-
return [
|
|
696
|
+
return [p(n), {
|
|
697
697
|
kind: "fieldCaption",
|
|
698
698
|
field: n
|
|
699
699
|
}];
|
|
700
700
|
}
|
|
701
701
|
case "pageItem": {
|
|
702
702
|
const n = e.pageFields[t.page];
|
|
703
|
-
return [
|
|
703
|
+
return [b(n), {
|
|
704
704
|
kind: "pageItem",
|
|
705
705
|
page: t.page
|
|
706
706
|
}];
|
|
707
707
|
}
|
|
708
|
-
case "dataCaption": return [
|
|
708
|
+
case "dataCaption": return [m[t.data]?.name ?? null, {
|
|
709
709
|
kind: "dataCaption",
|
|
710
710
|
data: t.data
|
|
711
711
|
}];
|
|
712
712
|
case "rowHeader": return [r.every((e) => e.field === ce) ? e.valuesCaption ?? "Values" : e.rowHeaderCaption ?? "Row Labels", { kind: "rowHeader" }];
|
|
713
713
|
case "columnHeader": return [e.columnHeaderCaption ?? "Column Labels", { kind: "columnHeader" }];
|
|
714
714
|
case "fieldCaption": {
|
|
715
|
-
const e =
|
|
716
|
-
return [
|
|
715
|
+
const e = V(t.axis)[t.level].field;
|
|
716
|
+
return [p(e), S(e)];
|
|
717
717
|
}
|
|
718
718
|
case "label": {
|
|
719
|
-
const e =
|
|
720
|
-
return [
|
|
719
|
+
const e = V(t.axis)[t.level].field, n = t.line.path[t.level];
|
|
720
|
+
return [h(e, n), E(e, n)];
|
|
721
721
|
}
|
|
722
722
|
case "total": {
|
|
723
723
|
const e = ("row" === t.axis ? l.rows : l.columns)[t.line.index], n = ((e, t) => {
|
|
724
|
-
const n = e.findIndex((e) => e.field === ce) >= t.path.length && null !== t.data, s = n ?
|
|
725
|
-
if (2 === t.kind) return n ? `Total ${s}` :
|
|
724
|
+
const n = e.findIndex((e) => e.field === ce) >= t.path.length && null !== t.data, s = n ? m[t.data]?.name ?? "" : "";
|
|
725
|
+
if (2 === t.kind) return n ? `Total ${s}` : x;
|
|
726
726
|
const r = t.path.length - 1, o = e[r].field, a = w(o, t.path[r]);
|
|
727
727
|
if (null !== t.function) {
|
|
728
728
|
const e = we[l.functions[t.function]];
|
|
729
|
-
return (n || t.across) && null !== t.data ? `${a} ${e} of ${
|
|
729
|
+
return (n || t.across) && null !== t.data ? `${a} ${e} of ${p(m[t.data].field)}` : `${a} ${e}`;
|
|
730
730
|
}
|
|
731
|
-
return
|
|
732
|
-
})(
|
|
731
|
+
return c[o]?.subtotalCaption ?? (n ? `${a} ${s}` : `${a} Total`);
|
|
732
|
+
})(V(t.axis), e);
|
|
733
733
|
return [n, P(e, n)];
|
|
734
734
|
}
|
|
735
735
|
case "value": {
|
|
@@ -744,200 +744,200 @@ var Y = [
|
|
|
744
744
|
})(e.emptyCaption)), [r, null];
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
},
|
|
748
|
-
const n =
|
|
747
|
+
}, H = new v.Builder(), z = _.top, B = _.pages.reduce((e, t) => Math.max(e, t.column + 2), 0), j = (e, t) => {
|
|
748
|
+
const n = G(_, e, t);
|
|
749
749
|
if (!n) return;
|
|
750
|
-
const [s, r] =
|
|
750
|
+
const [s, r] = U(n);
|
|
751
751
|
((e, t, n) => {
|
|
752
|
-
|
|
753
|
-
})(e -
|
|
752
|
+
A && n && A.set(e + "," + t, n);
|
|
753
|
+
})(e - z, t, r), null !== s && (u ? H.pushAt(t, e - z, s) : H.pushAt(e - z, t, s));
|
|
754
754
|
};
|
|
755
|
-
if (
|
|
756
|
-
const e = Math.max(
|
|
757
|
-
for (let t = 0; t < e; t++) for (let e = 0; e <
|
|
758
|
-
} else for (let e = 0; e <
|
|
759
|
-
const t = e <
|
|
760
|
-
for (let n = 0; n < t; n++)
|
|
755
|
+
if (u) {
|
|
756
|
+
const e = Math.max(B, _.columns.length);
|
|
757
|
+
for (let t = 0; t < e; t++) for (let e = 0; e < _.rows.length; e++) t < (e < z ? B : _.columns.length) && j(e, t);
|
|
758
|
+
} else for (let e = 0; e < _.rows.length; e++) {
|
|
759
|
+
const t = e < z ? B : _.columns.length;
|
|
760
|
+
for (let n = 0; n < t; n++) j(e, n);
|
|
761
761
|
}
|
|
762
762
|
if (k) {
|
|
763
|
-
const t =
|
|
763
|
+
const t = R(e);
|
|
764
764
|
return {
|
|
765
|
-
cells:
|
|
765
|
+
cells: H.build()?.tuples ?? [],
|
|
766
766
|
rows: 1,
|
|
767
767
|
columns: 1,
|
|
768
768
|
rowPageCount: t.rows,
|
|
769
769
|
columnPageCount: t.columns,
|
|
770
|
-
header:
|
|
770
|
+
header: M,
|
|
771
771
|
rowLines: [],
|
|
772
772
|
columnLines: [],
|
|
773
773
|
viewValues: [],
|
|
774
774
|
firstKey: null,
|
|
775
|
-
...
|
|
775
|
+
...A ? { roles: A } : {}
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
|
-
const
|
|
778
|
+
const q = (e, t) => {
|
|
779
779
|
const n = [];
|
|
780
780
|
return e.forEach((e, s) => {
|
|
781
781
|
e.field !== ce && n.push(s < t.path.length ? t.path[s] : -1);
|
|
782
782
|
}), n;
|
|
783
|
-
},
|
|
783
|
+
}, K = (e, t) => Q(e.data ?? t.data ?? 0, [...q(r, e), ...q(o, t)]), [J] = l.rows, [W] = l.columns, Z = J && W && 3 !== J.kind && 3 !== W.kind ? K(J, W) : null, X = [], Y = (e) => 1 === e.kind && null !== e.function;
|
|
784
784
|
l.rows.forEach((t, n) => {
|
|
785
|
-
3 === t.kind ||
|
|
785
|
+
3 === t.kind || Y(t) || (q(r, t), l.columns.forEach((s, r) => {
|
|
786
786
|
const o = l.states[n * L + r];
|
|
787
|
-
if (3 === s.kind ||
|
|
787
|
+
if (3 === s.kind || Y(s) || 0 !== o && 1 !== o) return;
|
|
788
788
|
let i = 0 === o ? l.values[n * L + r] : 0;
|
|
789
|
-
e.showError && a.isError(i) && (i = e.errorCaption || 0),
|
|
789
|
+
e.showError && a.isError(i) && (i = e.errorCaption || 0), X.push([K(t, s), i]);
|
|
790
790
|
}));
|
|
791
791
|
});
|
|
792
|
-
const ee =
|
|
792
|
+
const ee = R(e);
|
|
793
793
|
return {
|
|
794
|
-
cells:
|
|
795
|
-
rows:
|
|
796
|
-
columns:
|
|
794
|
+
cells: H.build()?.tuples ?? [],
|
|
795
|
+
rows: _.rows.length - z,
|
|
796
|
+
columns: _.columns.length,
|
|
797
797
|
rowPageCount: ee.rows,
|
|
798
798
|
columnPageCount: ee.columns,
|
|
799
|
-
header:
|
|
800
|
-
rowLines:
|
|
801
|
-
columnLines:
|
|
802
|
-
viewValues:
|
|
803
|
-
firstKey:
|
|
804
|
-
...
|
|
799
|
+
header: M,
|
|
800
|
+
rowLines: N,
|
|
801
|
+
columnLines: $,
|
|
802
|
+
viewValues: X,
|
|
803
|
+
firstKey: Z,
|
|
804
|
+
...A ? { roles: A } : {}
|
|
805
805
|
};
|
|
806
|
-
}, Re = (e, t,
|
|
807
|
-
const
|
|
806
|
+
}, Re = (e, t, s, r, o = !1, l, i) => {
|
|
807
|
+
const d = Ie(e, t, r, {
|
|
808
808
|
filters: l,
|
|
809
|
-
slicerFields:
|
|
809
|
+
slicerFields: i
|
|
810
810
|
});
|
|
811
|
-
if (!
|
|
812
|
-
const c =
|
|
811
|
+
if (!d) return null;
|
|
812
|
+
const c = d.rowPageCount > 0 ? d.rowPageCount + 1 : 0, f = d.rowPageCount > 0 ? 3 * d.columnPageCount - 1 : 0, { rowStart: m, colStart: p } = s;
|
|
813
813
|
if (m - c < 0) return null;
|
|
814
814
|
const h = {
|
|
815
815
|
rowStart: m - c,
|
|
816
816
|
colStart: p,
|
|
817
|
-
rowEnd: m +
|
|
818
|
-
colEnd: p + Math.max(
|
|
819
|
-
},
|
|
820
|
-
const
|
|
821
|
-
const
|
|
822
|
-
var
|
|
823
|
-
const
|
|
817
|
+
rowEnd: m + d.rows - 1,
|
|
818
|
+
colEnd: p + Math.max(d.columns, f) - 1
|
|
819
|
+
}, w = e.fields, v = t.fields, b = u(t), y = (e, t) => {
|
|
820
|
+
const s = w[e], o = s.numberFormat ?? v[e].numberFormat, l = F(o, r), i = j(v[e]), d = b[e], u = (s.items ?? []).filter((e) => void 0 !== e.item && void 0 === e.type), c = u.length > 0 ? u : d.map((e, t) => ({ item: t })), f = c.map((t) => {
|
|
821
|
+
const s = g(d[t.item]), u = C(v[e], t.item), c = null === s ? "(blank)" : "number" == typeof s ? n(r, u ? (f = t.item, void 0 === o ? F(T(v[e], f), r) : l) : l, s) : a.isError(s) ? s.getLabel() : "boolean" == typeof s ? s ? "TRUE" : "FALSE" : String(s);
|
|
822
|
+
var f;
|
|
823
|
+
const m = i && u ? c : s;
|
|
824
824
|
return void 0 !== t.name ? {
|
|
825
|
-
value:
|
|
826
|
-
text:
|
|
825
|
+
value: m,
|
|
826
|
+
text: c,
|
|
827
827
|
name: t.name
|
|
828
828
|
} : {
|
|
829
|
-
value:
|
|
830
|
-
text:
|
|
829
|
+
value: m,
|
|
830
|
+
text: c
|
|
831
831
|
};
|
|
832
|
-
}),
|
|
833
|
-
name:
|
|
834
|
-
items:
|
|
832
|
+
}), m = {
|
|
833
|
+
name: s.name ?? v[e].name,
|
|
834
|
+
items: f
|
|
835
835
|
};
|
|
836
836
|
if (t) {
|
|
837
|
-
const e = void 0 !== t.item ? (
|
|
838
|
-
|
|
837
|
+
const e = void 0 !== t.item ? (s.items ?? [])[t.item]?.item : void 0;
|
|
838
|
+
m.page = void 0 !== e ? c.findIndex((t) => t.item === e) : -1;
|
|
839
839
|
}
|
|
840
|
-
return
|
|
841
|
-
},
|
|
840
|
+
return m;
|
|
841
|
+
}, I = (e) => (e ?? []).filter((e) => -2 !== e);
|
|
842
842
|
return {
|
|
843
843
|
view: {
|
|
844
844
|
range: h,
|
|
845
845
|
dataFields: (e.dataFields ?? []).map((e) => ({
|
|
846
846
|
name: e.name,
|
|
847
|
-
sourceName:
|
|
847
|
+
sourceName: v[e.field].name
|
|
848
848
|
})),
|
|
849
849
|
fields: [
|
|
850
|
-
...
|
|
851
|
-
...
|
|
852
|
-
...(e.pageFields ?? []).map((e) =>
|
|
850
|
+
...I(e.rowFields).map((e) => y(e)),
|
|
851
|
+
...I(e.columnFields).map((e) => y(e)),
|
|
852
|
+
...(e.pageFields ?? []).map((e) => y(e.field, e))
|
|
853
853
|
],
|
|
854
|
-
values:
|
|
854
|
+
values: d.viewValues,
|
|
855
855
|
block: {
|
|
856
856
|
anchor: {
|
|
857
857
|
row: m,
|
|
858
858
|
column: p
|
|
859
859
|
},
|
|
860
860
|
...o ? { blocked: !0 } : {},
|
|
861
|
-
...null !==
|
|
861
|
+
...null !== d.firstKey ? { first: d.firstKey } : {}
|
|
862
862
|
}
|
|
863
863
|
},
|
|
864
864
|
size: {
|
|
865
|
-
rows:
|
|
866
|
-
columns:
|
|
865
|
+
rows: d.rows,
|
|
866
|
+
columns: d.columns
|
|
867
867
|
}
|
|
868
868
|
};
|
|
869
|
-
}, Oe = async (e, t,
|
|
870
|
-
const o = /* @__PURE__ */ new Map(),
|
|
871
|
-
if (0 ===
|
|
872
|
-
const
|
|
873
|
-
for (const
|
|
874
|
-
const a =
|
|
869
|
+
}, Oe = async (e, t, s, r) => {
|
|
870
|
+
const o = /* @__PURE__ */ new Map(), l = (e.filters ?? []).filter((t) => k(t) || e.rowFields?.includes(t.field) || e.columnFields?.includes(t.field)), i = e.fields?.some((e) => e.items?.some((e) => e.calculated)), d = e.dataFields?.some((e) => w(t.fields?.[e.field]));
|
|
871
|
+
if (0 === l.length && !i && !d) return { keep: o };
|
|
872
|
+
const c = u(t);
|
|
873
|
+
for (const n of l.filter(k)) {
|
|
874
|
+
const a = n.field, l = c[a];
|
|
875
875
|
if (!l) continue;
|
|
876
|
-
const i =
|
|
877
|
-
for (let e = 0; e < l.length; e++) d[e] = i ? i[e] :
|
|
878
|
-
const u = await $e(
|
|
879
|
-
if (
|
|
876
|
+
const i = P(n.condition) ? _e(e, t, l, a, s) : null, d = new Array(l.length);
|
|
877
|
+
for (let e = 0; e < l.length; e++) d[e] = i ? i[e] : g(l[e]);
|
|
878
|
+
const u = await $e(n.condition, d, s, r), f = o.get(a);
|
|
879
|
+
if (f) for (let e = 0; e < u.length; e++) f[e] &= u[e];
|
|
880
880
|
else o.set(a, u);
|
|
881
881
|
}
|
|
882
|
-
const
|
|
883
|
-
const l = t.fields ?? [],
|
|
884
|
-
if (1 !==
|
|
885
|
-
const
|
|
886
|
-
if (!
|
|
887
|
-
const
|
|
882
|
+
const f = i && r ? await (async (e, t, s, r, o) => {
|
|
883
|
+
const l = t.fields ?? [], i = e.fields ?? [], d = l.flatMap((e, t) => e.calculatedItems?.length ? [t] : []), c = e.dataFields ?? [];
|
|
884
|
+
if (1 !== d.length || c.some((e) => w(l[e.field]) || !ue.has(e.subtotal ?? "sum"))) return null;
|
|
885
|
+
const f = d[0], m = l[f].calculatedItems, p = te(t, s.isDate1904());
|
|
886
|
+
if (!p) return null;
|
|
887
|
+
const h = u(t), v = u({
|
|
888
888
|
...t,
|
|
889
889
|
fields: l.map(({ group: e, ...t }) => t)
|
|
890
|
-
}),
|
|
891
|
-
if (!
|
|
892
|
-
const
|
|
893
|
-
const n =
|
|
890
|
+
}), b = (e.rowFields ?? []).filter((e) => e >= 0), y = (e.columnFields ?? []).filter((e) => e >= 0), I = b.includes(f) ? b : y.includes(f) ? y : null;
|
|
891
|
+
if (!I) return null;
|
|
892
|
+
const x = I.slice(0, I.indexOf(f)), A = [...I.slice(I.indexOf(f) + 1), ...I === b ? y : b], E = [...x, ...A], P = t.recordCount ?? 0, k = (e, t) => {
|
|
893
|
+
const n = i[e]?.items, s = n?.find((e) => e.item === t && void 0 === e.type);
|
|
894
894
|
return !(n && (!s || s.hidden) || o?.get(e) && 0 === o.get(e)[t]);
|
|
895
|
-
},
|
|
896
|
-
const n =
|
|
895
|
+
}, M = (e, t) => {
|
|
896
|
+
const n = i[e.field]?.items;
|
|
897
897
|
if (void 0 !== e.item) return n?.[e.item]?.item === t;
|
|
898
898
|
const s = n?.find((e) => e.item === t && void 0 === e.type);
|
|
899
899
|
return !n || !!s && !s.hidden;
|
|
900
|
-
},
|
|
901
|
-
const o =
|
|
902
|
-
return "number" == typeof o && (l[
|
|
903
|
-
}),
|
|
904
|
-
let t =
|
|
905
|
-
return void 0 === t &&
|
|
900
|
+
}, T = e.pageFields ?? [], R = F(l[f].numberFormat ?? 14, s), O = (e) => h[f].findIndex((t, r) => {
|
|
901
|
+
const o = g(t);
|
|
902
|
+
return "number" == typeof o && (l[f].dates || C(l[f], r)) ? S(n(s, R, o), e) : S(null === o ? D : U(o), e);
|
|
903
|
+
}), N = /* @__PURE__ */ new Map(), $ = new Map(m.map((e) => [e.item, e.formula])), _ = (e) => {
|
|
904
|
+
let t = N.get(e);
|
|
905
|
+
return void 0 === t && N.set(e, t = N.size), t;
|
|
906
906
|
};
|
|
907
|
-
for (const e of
|
|
908
|
-
if (null === t || !
|
|
909
|
-
const n =
|
|
910
|
-
return n < 0 ? null : (
|
|
907
|
+
for (const e of m) if (null === oe(e.formula, (e, t) => {
|
|
908
|
+
if (null === t || !S(l[f].name, e)) return null;
|
|
909
|
+
const n = O(t);
|
|
910
|
+
return n < 0 ? null : ($.has(n) || _(n), "");
|
|
911
911
|
})) return null;
|
|
912
|
-
const
|
|
913
|
-
column:
|
|
914
|
-
values:
|
|
912
|
+
const L = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Map(), H = c.map((e) => ({
|
|
913
|
+
column: p[e.field],
|
|
914
|
+
values: v[e.field],
|
|
915
915
|
fold: e.subtotal ?? "sum"
|
|
916
|
-
})),
|
|
917
|
-
for (let e = 0; e <
|
|
918
|
-
if (!
|
|
919
|
-
if (!
|
|
916
|
+
})), z = N.size;
|
|
917
|
+
for (let e = 0; e < P; e++) {
|
|
918
|
+
if (!T.every((t) => M(t, p[t.field][e]))) continue;
|
|
919
|
+
if (!E.every((t) => k(t, p[t][e]))) continue;
|
|
920
920
|
let t = "";
|
|
921
|
-
for (const n of
|
|
921
|
+
for (const n of x) t += p[n][e] + ",";
|
|
922
922
|
V.has(t) || V.set(t, e);
|
|
923
|
-
const n =
|
|
923
|
+
const n = N.get(p[f][e]);
|
|
924
924
|
if (void 0 === n) continue;
|
|
925
925
|
let s = t;
|
|
926
|
-
for (const t of A) s +=
|
|
927
|
-
let r =
|
|
926
|
+
for (const t of A) s += p[t][e] + ",";
|
|
927
|
+
let r = L.get(s);
|
|
928
928
|
r || (r = {
|
|
929
|
-
sums:
|
|
930
|
-
errors:
|
|
931
|
-
},
|
|
929
|
+
sums: c.map(() => new Array(z).fill(0)),
|
|
930
|
+
errors: c.map(() => new Array(z).fill(void 0))
|
|
931
|
+
}, L.set(s, r));
|
|
932
932
|
const { sums: o, errors: l } = r;
|
|
933
|
-
|
|
934
|
-
const d =
|
|
933
|
+
H.forEach(({ column: t, values: s, fold: r }, i) => {
|
|
934
|
+
const d = g(s[t[e]]);
|
|
935
935
|
"sum" === r ? "number" == typeof d ? o[i][n] += d : a.isError(d) && (l[i][n] ??= d) : ("countNums" === r ? "number" == typeof d : null !== d) && (o[i][n] += 1);
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
const B = A.map((e) => {
|
|
939
|
-
const t =
|
|
940
|
-
return t ? t.flatMap((t) => void 0 !== t.item && void 0 === t.type && !t.missing &&
|
|
939
|
+
const t = i[e]?.items;
|
|
940
|
+
return t ? t.flatMap((t) => void 0 !== t.item && void 0 === t.type && !t.missing && k(e, t.item) ? [t.item] : []) : h[e].map((e, t) => t);
|
|
941
941
|
});
|
|
942
942
|
if (B.reduce((e, t) => e * t.length, V.size) > 5e5) return null;
|
|
943
943
|
const j = [];
|
|
@@ -952,103 +952,103 @@ var Y = [
|
|
|
952
952
|
};
|
|
953
953
|
n(0, [], e);
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
if (0 ===
|
|
955
|
+
const q = j.length;
|
|
956
|
+
if (0 === q) return {
|
|
957
957
|
count: 0,
|
|
958
958
|
ids: l.map(() => []),
|
|
959
|
-
values:
|
|
959
|
+
values: c.map(() => [])
|
|
960
960
|
};
|
|
961
|
-
const G =
|
|
962
|
-
for (let e = 0; e <
|
|
963
|
-
const s =
|
|
961
|
+
const G = c.length * z, Q = (e, t) => e * z + t, K = (e, t) => G + e * m.length + t, J = [];
|
|
962
|
+
for (let e = 0; e < c.length; e++) for (let t = 0; t < z; t++) J.push(j.map(({ key: n }) => {
|
|
963
|
+
const s = L.get(n);
|
|
964
964
|
return s ? s.errors[e][t] ?? s.sums[e][t] : 0;
|
|
965
965
|
}));
|
|
966
966
|
const W = [];
|
|
967
|
-
for (let e = 0; e <
|
|
968
|
-
const n = oe(
|
|
967
|
+
for (let e = 0; e < c.length; e++) for (let t = 0; t < m.length; t++) {
|
|
968
|
+
const n = oe(m[t].formula, (t, n) => {
|
|
969
969
|
if (null === n) return null;
|
|
970
|
-
const s =
|
|
971
|
-
return ae(r >= 0 ?
|
|
970
|
+
const s = O(n), r = m.findIndex((e) => e.item === s);
|
|
971
|
+
return ae(r >= 0 ? K(e, r) : Q(e, N.get(s)));
|
|
972
972
|
});
|
|
973
973
|
if (null === n) return null;
|
|
974
974
|
W.push({
|
|
975
975
|
expression: n,
|
|
976
|
-
coords: le(
|
|
976
|
+
coords: le(K(e, t), q)
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
|
-
const
|
|
980
|
-
values: ie(J,
|
|
979
|
+
const Z = await r.evaluateBatch({
|
|
980
|
+
values: ie(J, q),
|
|
981
981
|
formulas: W
|
|
982
|
-
}),
|
|
983
|
-
|
|
982
|
+
}), X = l.map(() => []), Y = c.map(() => []), ee = (e, t, n, s) => {
|
|
983
|
+
p.forEach((n, s) => {
|
|
984
984
|
const r = A.indexOf(s);
|
|
985
|
-
|
|
986
|
-
}),
|
|
985
|
+
X[s].push(s === f ? t : r >= 0 ? e.path[r] : n[e.exemplar] ?? 0);
|
|
986
|
+
}), Y.forEach((e, t) => {
|
|
987
987
|
e.push(t === n ? s : null);
|
|
988
988
|
});
|
|
989
989
|
};
|
|
990
990
|
return j.forEach((e, t) => {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
const a =
|
|
991
|
+
m.forEach(({ item: n }, s) => {
|
|
992
|
+
c.forEach((r, o) => {
|
|
993
|
+
const a = Z[o * m.length + s].getValueAt(t, 0) ?? 0;
|
|
994
994
|
if ("sum" !== (r.subtotal ?? "sum") && "number" == typeof a) for (let t = 0; t < Math.round(a); t++) ee(e, n, o, 1);
|
|
995
995
|
else ee(e, n, o, a);
|
|
996
996
|
});
|
|
997
997
|
});
|
|
998
998
|
}), {
|
|
999
|
-
count:
|
|
1000
|
-
ids:
|
|
1001
|
-
values:
|
|
999
|
+
count: X[0]?.length ?? 0,
|
|
1000
|
+
ids: X,
|
|
1001
|
+
values: Y
|
|
1002
1002
|
};
|
|
1003
|
-
})(e, t,
|
|
1003
|
+
})(e, t, s, r, o) : void 0, m = l.filter((e) => !k(e)).map((e, t) => ({
|
|
1004
1004
|
filter: e,
|
|
1005
1005
|
index: t
|
|
1006
|
-
})).sort((e, t) => (e.filter.evalOrder ?? -1) - (t.filter.evalOrder ?? -1) || e.index - t.index),
|
|
1007
|
-
let
|
|
1008
|
-
const
|
|
1009
|
-
for (const { filter:
|
|
1010
|
-
const a = await Ae(e, t,
|
|
1006
|
+
})).sort((e, t) => (e.filter.evalOrder ?? -1) - (t.filter.evalOrder ?? -1) || e.index - t.index), h = (t.recordCount ?? 0) + (f?.count ?? 0);
|
|
1007
|
+
let v;
|
|
1008
|
+
const b = e.rowFields ?? [];
|
|
1009
|
+
for (const { filter: n } of m) {
|
|
1010
|
+
const a = await Ae(e, t, s, n.field, n.dataField, o, v, f, r);
|
|
1011
1011
|
if (!a) continue;
|
|
1012
1012
|
const l = /* @__PURE__ */ new Set();
|
|
1013
1013
|
for (const [e, t] of a.groups) {
|
|
1014
|
-
const o = await $e(
|
|
1014
|
+
const o = await $e(n.condition, t.totals, s, r);
|
|
1015
1015
|
t.ids.forEach((t, n) => {
|
|
1016
1016
|
o[n] || l.add(`${e}|${t}`);
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
1019
|
if (0 === l.size) continue;
|
|
1020
|
-
|
|
1021
|
-
const i = a.outer.map((e) => a.records[e]), d = a.records[
|
|
1022
|
-
for (let e = 0; e <
|
|
1023
|
-
if (!(
|
|
1020
|
+
v ??= new Uint8Array(h).fill(3);
|
|
1021
|
+
const i = a.outer.map((e) => a.records[e]), d = a.records[n.field], u = b.includes(n.field) ? 1 : 2;
|
|
1022
|
+
for (let e = 0; e < h; e++) {
|
|
1023
|
+
if (!(v[e] & u)) continue;
|
|
1024
1024
|
let t = "";
|
|
1025
1025
|
for (let n = 0; n < i.length; n++) t += (n > 0 ? "," : "") + i[n][e];
|
|
1026
|
-
l.has(`${t}|${d[e]}`) && (
|
|
1026
|
+
l.has(`${t}|${d[e]}`) && (v[e] &= ~u);
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1030
|
-
const
|
|
1031
|
-
if (!
|
|
1032
|
-
const
|
|
1033
|
-
if (!
|
|
1034
|
-
const
|
|
1029
|
+
const y = d && r ? await (async (e, t, n, s, r, o, a) => {
|
|
1030
|
+
const l = p.peek(), i = de(e, t);
|
|
1031
|
+
if (!l || !i) return null;
|
|
1032
|
+
const d = xe(e, t, n, a, i.operands);
|
|
1033
|
+
if (!d) return null;
|
|
1034
|
+
const u = (t) => (t ?? []).map((t) => ({
|
|
1035
1035
|
field: t,
|
|
1036
1036
|
form: t === ce ? e.form ?? "compact" : e.fields?.[t]?.form ?? "compact"
|
|
1037
1037
|
}));
|
|
1038
|
-
return Ee(
|
|
1039
|
-
})(e, t,
|
|
1038
|
+
return Ee(l, i, e, d.items, d.records, d.values, u(e.rowFields), u(e.columnFields), d.n, r, o, s);
|
|
1039
|
+
})(e, t, s, r, o, v, f) : void 0;
|
|
1040
1040
|
return {
|
|
1041
1041
|
keep: o,
|
|
1042
|
-
...
|
|
1043
|
-
...
|
|
1044
|
-
...
|
|
1042
|
+
...v ? { records: v } : {},
|
|
1043
|
+
...f ? { calculatedRecords: f } : {},
|
|
1044
|
+
...y ? { fieldValues: y } : {}
|
|
1045
1045
|
};
|
|
1046
1046
|
}, Ne = (e, t) => {
|
|
1047
1047
|
const n = e.filters;
|
|
1048
1048
|
if (!n) return e;
|
|
1049
1049
|
let s = !1;
|
|
1050
1050
|
const r = n.map((e) => {
|
|
1051
|
-
const n = e.condition &&
|
|
1051
|
+
const n = e.condition && H(e.condition, t);
|
|
1052
1052
|
return n === e.condition ? e : (s = !0, {
|
|
1053
1053
|
...e,
|
|
1054
1054
|
condition: n
|
|
@@ -1061,10 +1061,10 @@ var Y = [
|
|
|
1061
1061
|
}, $e = async (e, t, n, s) => {
|
|
1062
1062
|
const r = t.length, o = new Uint8Array(r);
|
|
1063
1063
|
if (0 === r) return o;
|
|
1064
|
-
const a = new
|
|
1064
|
+
const a = new z();
|
|
1065
1065
|
for (let e = 0; e < r; e++) null !== t[e] && a.setValueAt(e, 0, t[e]);
|
|
1066
1066
|
let l = !1;
|
|
1067
|
-
return await
|
|
1067
|
+
return await E({
|
|
1068
1068
|
conditions: [e],
|
|
1069
1069
|
runtime: n,
|
|
1070
1070
|
calculation: s ?? null,
|
|
@@ -1086,21 +1086,21 @@ var Y = [
|
|
|
1086
1086
|
for (let n = 0; n < r; n++) null === t[n] && e(n, 0) && (o[n] = 1);
|
|
1087
1087
|
}
|
|
1088
1088
|
}), l || o.fill(1), o;
|
|
1089
|
-
},
|
|
1090
|
-
const l = e.fields?.[r],
|
|
1091
|
-
for (const e of l?.items ?? []) void 0 !== e.item && void 0 === e.type && void 0 !== e.name &&
|
|
1092
|
-
const
|
|
1093
|
-
for (let e = 0; e <
|
|
1094
|
-
const l =
|
|
1089
|
+
}, _e = (e, t, s, r, o) => {
|
|
1090
|
+
const l = e.fields?.[r], i = /* @__PURE__ */ new Map();
|
|
1091
|
+
for (const e of l?.items ?? []) void 0 !== e.item && void 0 === e.type && void 0 !== e.name && i.set(e.item, e.name);
|
|
1092
|
+
const d = l?.numberFormat ?? t.fields?.[r]?.numberFormat, u = F(d, o), c = (e) => void 0 === d ? F(T(t.fields?.[r], e), o) : u, f = new Array(s.length);
|
|
1093
|
+
for (let e = 0; e < s.length; e++) {
|
|
1094
|
+
const l = i.get(e);
|
|
1095
1095
|
if (void 0 !== l) {
|
|
1096
|
-
|
|
1096
|
+
f[e] = l;
|
|
1097
1097
|
continue;
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1100
|
-
null ===
|
|
1099
|
+
const d = g(s[e]);
|
|
1100
|
+
null === d ? f[e] = D : "number" == typeof d ? f[e] = n(o, C(t.fields?.[r], e) ? c(e) : u, d) : "boolean" == typeof d ? f[e] = d ? "TRUE" : "FALSE" : a.isError(d) ? f[e] = d.getLabel() : f[e] = String(d);
|
|
1101
1101
|
}
|
|
1102
|
-
return
|
|
1103
|
-
},
|
|
1102
|
+
return f;
|
|
1103
|
+
}, Le = (e) => {
|
|
1104
1104
|
const t = e.getCoords(), n = t.colEnd - t.colStart + 1, s = t.rowEnd - t.rowStart, r = e.getWorksheet(), o = r.getRange({
|
|
1105
1105
|
rowStart: t.rowStart,
|
|
1106
1106
|
rowEnd: t.rowStart,
|
|
@@ -1179,14 +1179,14 @@ var Y = [
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
return !1;
|
|
1182
|
-
},
|
|
1182
|
+
}, ze = (e) => null == e ? {
|
|
1183
1183
|
t: "z",
|
|
1184
1184
|
v: 0
|
|
1185
1185
|
} : a.isError(e) ? {
|
|
1186
1186
|
t: "e",
|
|
1187
1187
|
v: e.getCode()
|
|
1188
|
-
} : e,
|
|
1189
|
-
const r = e.fields ?? [], o =
|
|
1188
|
+
} : e, Be = (e, t) => (t && "number" == typeof e ? "date:" : "") + c(g(e)), je = (e, t, n, s = !1) => {
|
|
1189
|
+
const r = e.fields ?? [], o = i(e.items, r.length), a = /\smissingItemsLimit="0"/.test(e.rest ?? ""), l = ((e) => {
|
|
1190
1190
|
const t = /* @__PURE__ */ new Set();
|
|
1191
1191
|
return e.map((e, n) => {
|
|
1192
1192
|
const s = "" === e ? `Field${n + 1}` : e;
|
|
@@ -1199,8 +1199,8 @@ var Y = [
|
|
|
1199
1199
|
const n = e.name.toLocaleLowerCase();
|
|
1200
1200
|
e.noRecords || d.has(n) || d.set(n, t);
|
|
1201
1201
|
});
|
|
1202
|
-
const u = t.recordCount, c = r.map(() => -1), f = r.map((e, t) => o[t].map(() => -1)), m = [], p = [], h = [],
|
|
1203
|
-
|
|
1202
|
+
const u = t.recordCount, c = r.map(() => -1), f = r.map((e, t) => o[t].map(() => -1)), m = [], p = [], h = [], v = [], F = [], b = [], y = [], I = (e, t, n) => {
|
|
1203
|
+
v[t] = n.items, b[t] = n.items.length, y[t] = !0, f[e] = ((e, t) => {
|
|
1204
1204
|
const n = /* @__PURE__ */ new Map();
|
|
1205
1205
|
return t.forEach((e, t) => {
|
|
1206
1206
|
n.set(e, t);
|
|
@@ -1210,67 +1210,67 @@ var Y = [
|
|
|
1210
1210
|
t.columns.forEach((e, t) => {
|
|
1211
1211
|
const n = d.get(l[t].toLocaleLowerCase());
|
|
1212
1212
|
void 0 !== n && (d.delete(l[t].toLocaleLowerCase()), c[n] = t);
|
|
1213
|
-
const
|
|
1213
|
+
const i = new Int32Array(e.values.length).fill(-1), w = [], x = [], A = new Array(u);
|
|
1214
1214
|
for (let t = 0; t < u; t++) {
|
|
1215
1215
|
const n = e.ids[t];
|
|
1216
|
-
let s =
|
|
1217
|
-
s < 0 && (s =
|
|
1216
|
+
let s = i[n];
|
|
1217
|
+
s < 0 && (s = i[n] = w.length, w.push(ze(e.values[n])), x.push(e.dates || !!e.dateIds?.has(n))), A[t] = s;
|
|
1218
1218
|
}
|
|
1219
|
-
const
|
|
1220
|
-
if (void 0 !== n &&
|
|
1219
|
+
const E = (e) => void 0 !== n && (!!r[n].dates || C(r[n], e)), S = w.length, P = void 0 !== n ? !0 === r[n].inline : w.every((e) => "number" == typeof e || "object" == typeof e && "z" === e?.t), k = [];
|
|
1220
|
+
if (void 0 !== n && P) {
|
|
1221
1221
|
const e = /* @__PURE__ */ new Map();
|
|
1222
|
-
for (let t = 0; t <
|
|
1222
|
+
for (let t = 0; t < S; t++) e.set(Be(w[t], x[t]), t);
|
|
1223
1223
|
o[n].forEach((t, s) => {
|
|
1224
|
-
f[n][s] = e.get(
|
|
1224
|
+
f[n][s] = e.get(Be(t, E(s))) ?? -1;
|
|
1225
1225
|
});
|
|
1226
1226
|
} else if (void 0 !== n) {
|
|
1227
1227
|
const e = /* @__PURE__ */ new Map();
|
|
1228
|
-
for (let t = 0; t <
|
|
1228
|
+
for (let t = 0; t < S; t++) e.set(Be(w[t], x[t]), t);
|
|
1229
1229
|
const t = new Set(r[n].calculatedItems?.map((e) => e.item));
|
|
1230
1230
|
o[n].forEach((s, r) => {
|
|
1231
1231
|
if (t.has(r)) return;
|
|
1232
|
-
const o =
|
|
1232
|
+
const o = Be(s, E(r));
|
|
1233
1233
|
let l = e.get(o);
|
|
1234
|
-
void 0 !== l || a ||
|
|
1234
|
+
void 0 !== l || a || E(r) || (l = w.length, w.push(s), x.push(E(r)), k.push(l), e.set(o, l)), f[n][r] = l ?? -1;
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
1237
|
const M = { name: l[t] };
|
|
1238
|
-
|
|
1238
|
+
P && (M.inline = !0), void 0 !== e.numberFormat && (M.numberFormat = e.numberFormat);
|
|
1239
1239
|
const T = [];
|
|
1240
1240
|
let R = !1;
|
|
1241
|
-
|
|
1241
|
+
w.forEach((e, t) => {
|
|
1242
1242
|
"number" == typeof e && (x[t] ? T.push(t) : R = !0);
|
|
1243
|
-
}), T.length > 0 && !R ? M.dates = !0 : T.length > 0 && (M.dateItems = T),
|
|
1243
|
+
}), T.length > 0 && !R ? M.dates = !0 : T.length > 0 && (M.dateItems = T), F[t] = M.dateItems ? new Set(M.dateItems) : void 0, k.length > 0 && (M.unused = k);
|
|
1244
1244
|
const O = void 0 !== n ? r[n].rest : void 0;
|
|
1245
1245
|
O && (M.rest = O);
|
|
1246
1246
|
const N = void 0 !== n ? r[n].calculatedItems : void 0;
|
|
1247
1247
|
N?.length && (M.calculatedItems = N.map(({ item: e, formula: t }) => {
|
|
1248
|
-
const s =
|
|
1249
|
-
return
|
|
1248
|
+
const s = w.length;
|
|
1249
|
+
return w.push(o[n][e]), f[n][e] = s, {
|
|
1250
1250
|
item: s,
|
|
1251
1251
|
formula: t
|
|
1252
1252
|
};
|
|
1253
|
-
})), m.push(M), p.push([t, [[0,
|
|
1253
|
+
})), m.push(M), p.push([t, [[0, w]]]), h.push([t, [[0, A]]]), v.push(w), b.push(S), y.push(!1);
|
|
1254
1254
|
const $ = void 0 !== n ? r[n].group : void 0;
|
|
1255
1255
|
if ($?.range && $.base === n) {
|
|
1256
|
-
const e = re($,
|
|
1256
|
+
const e = re($, w.slice(0, S).map(g), s);
|
|
1257
1257
|
e ? (M.group = {
|
|
1258
1258
|
...e,
|
|
1259
1259
|
base: t
|
|
1260
|
-
},
|
|
1261
|
-
} else $ && !
|
|
1260
|
+
}, I(n, t, e)) : f[n] = o[n].map(() => -1);
|
|
1261
|
+
} else $ && !j(r[n]) && (M.group = $);
|
|
1262
1262
|
}), r.forEach((e, t) => {
|
|
1263
1263
|
if (!e.noRecords) return;
|
|
1264
|
-
if (
|
|
1264
|
+
if (w(e)) return c[t] = m.length, m.push(e), v.push([]), b.push(0), void y.push(!1);
|
|
1265
1265
|
const n = e.group;
|
|
1266
1266
|
if (!n) return;
|
|
1267
1267
|
const r = c[n.base];
|
|
1268
1268
|
if (void 0 === r || r < 0) return;
|
|
1269
|
-
const o =
|
|
1269
|
+
const o = v[r];
|
|
1270
1270
|
let a, l = [];
|
|
1271
|
-
if (n.range) a = re(n, o.slice(0,
|
|
1271
|
+
if (n.range) a = re(n, o.slice(0, b[r]).map(g), s);
|
|
1272
1272
|
else {
|
|
1273
|
-
const e =
|
|
1273
|
+
const e = qe(n, f[n.base], o, m[r]);
|
|
1274
1274
|
a = e.group, l = e.itemMap;
|
|
1275
1275
|
}
|
|
1276
1276
|
if (!a) return;
|
|
@@ -1281,7 +1281,7 @@ var Y = [
|
|
|
1281
1281
|
...a,
|
|
1282
1282
|
base: r
|
|
1283
1283
|
}
|
|
1284
|
-
}),
|
|
1284
|
+
}), v.push(a.items), F[i] = a.dateItems ? new Set(a.dateItems) : void 0, b.push(a.items.length), y.push(!1), n.range ? I(t, i, a) : f[t] = l;
|
|
1285
1285
|
}), m.forEach((e, t) => {
|
|
1286
1286
|
const n = e.group;
|
|
1287
1287
|
if (void 0 === n?.parent) return;
|
|
@@ -1289,12 +1289,12 @@ var Y = [
|
|
|
1289
1289
|
void 0 !== s && s >= 0 ? e.group = {
|
|
1290
1290
|
...n,
|
|
1291
1291
|
parent: s
|
|
1292
|
-
} :
|
|
1292
|
+
} : j(e) ? e.group = o : delete e.group, e.group && !j(e) && (e.group = {
|
|
1293
1293
|
...e.group,
|
|
1294
1294
|
base: t
|
|
1295
1295
|
});
|
|
1296
1296
|
});
|
|
1297
|
-
const { cacheId:
|
|
1297
|
+
const { cacheId: x, part: A, partFormats: E, fields: S, items: P, records: k, ...M } = e;
|
|
1298
1298
|
return {
|
|
1299
1299
|
model: {
|
|
1300
1300
|
...M,
|
|
@@ -1307,32 +1307,32 @@ var Y = [
|
|
|
1307
1307
|
remap: {
|
|
1308
1308
|
fields: c,
|
|
1309
1309
|
items: f,
|
|
1310
|
-
newItems:
|
|
1311
|
-
usedCounts:
|
|
1312
|
-
inItemOrder:
|
|
1313
|
-
dateItems:
|
|
1310
|
+
newItems: v,
|
|
1311
|
+
usedCounts: b,
|
|
1312
|
+
inItemOrder: y,
|
|
1313
|
+
dateItems: F
|
|
1314
1314
|
}
|
|
1315
1315
|
};
|
|
1316
|
-
},
|
|
1316
|
+
}, qe = (e, t, n, s) => {
|
|
1317
1317
|
const r = /* @__PURE__ */ new Set(), o = new Array(n.length).fill(-1);
|
|
1318
1318
|
(e.discrete ?? []).forEach((e, n) => {
|
|
1319
1319
|
const s = t?.[n] ?? -1;
|
|
1320
1320
|
s < 0 || (o[s] = e, r.add(e));
|
|
1321
1321
|
});
|
|
1322
|
-
const a = [], l = [],
|
|
1322
|
+
const a = [], l = [], i = new Set(e.dateItems), d = e.items.map((e, t) => r.has(t) ? (i.has(t) && l.push(a.length), a.push(e), a.length - 1) : -1), u = o.map((e, t) => e >= 0 ? d[e] : ((s.dates || C(s, t)) && l.push(a.length), a.push(n[t]), a.length - 1)), { dateItems: c, ...f } = e;
|
|
1323
1323
|
return {
|
|
1324
1324
|
group: {
|
|
1325
|
-
...
|
|
1325
|
+
...f,
|
|
1326
1326
|
items: a,
|
|
1327
|
-
discrete:
|
|
1327
|
+
discrete: u,
|
|
1328
1328
|
...l.length > 0 ? { dateItems: l } : {}
|
|
1329
1329
|
},
|
|
1330
|
-
itemMap:
|
|
1330
|
+
itemMap: d
|
|
1331
1331
|
};
|
|
1332
|
-
},
|
|
1332
|
+
}, Ge = (e, t, n = !1, s = !1) => {
|
|
1333
1333
|
const r = (e, t) => null === e ? 5 : "number" == typeof e ? t ? 3 : 0 : "string" == typeof e ? 1 : "boolean" == typeof e ? 2 : 4, o = r(e, n), a = r(t, s);
|
|
1334
1334
|
return o !== a ? o - a : 0 === o || 3 === o ? e - t : 1 === o ? e.localeCompare(t, void 0, { sensitivity: "base" }) : 2 === o ? Number(e) - Number(t) : 4 === o ? e.getCode() - t.getCode() : 0;
|
|
1335
|
-
},
|
|
1335
|
+
}, Qe = (e, t) => {
|
|
1336
1336
|
const n = e.fields ?? [], s = t.newItems.length, r = (e) => e < 0 ? e : t.fields[e] ?? -1, o = (e) => e < 0 || r(e) >= 0, a = e.dataFields ?? [], l = [], i = [];
|
|
1337
1337
|
a.forEach((e) => {
|
|
1338
1338
|
if (!o(e.field)) return void l.push(-1);
|
|
@@ -1384,7 +1384,7 @@ var Y = [
|
|
|
1384
1384
|
...e,
|
|
1385
1385
|
fields: u
|
|
1386
1386
|
};
|
|
1387
|
-
|
|
1387
|
+
Ke(f, "rowFields", c(e.rowFields)), Ke(f, "columnFields", c(e.columnFields)), Ke(f, "dataFields", i.length > 0 ? i : void 0), a.forEach((e, t) => {
|
|
1388
1388
|
const n = l[t];
|
|
1389
1389
|
if (n < 0 || void 0 === e.baseField || "number" != typeof e.baseItem) return;
|
|
1390
1390
|
const s = d[e.baseField]?.[e.baseItem];
|
|
@@ -1394,12 +1394,12 @@ var Y = [
|
|
|
1394
1394
|
if (!o(e.field)) return [];
|
|
1395
1395
|
const t = { field: r(e.field) };
|
|
1396
1396
|
if (void 0 !== e.item) {
|
|
1397
|
-
const n =
|
|
1397
|
+
const n = Ze(u[t.field].items ?? [], d[e.field]?.[e.item] ?? -1);
|
|
1398
1398
|
void 0 !== n && (t.item = n);
|
|
1399
1399
|
}
|
|
1400
1400
|
return [t];
|
|
1401
1401
|
});
|
|
1402
|
-
|
|
1402
|
+
Ke(f, "pageFields", m.length > 0 ? m : void 0);
|
|
1403
1403
|
const p = (e.filters ?? []).flatMap((e) => {
|
|
1404
1404
|
if (!o(e.field)) return [];
|
|
1405
1405
|
const t = {
|
|
@@ -1413,15 +1413,15 @@ var Y = [
|
|
|
1413
1413
|
}
|
|
1414
1414
|
return [t];
|
|
1415
1415
|
});
|
|
1416
|
-
|
|
1417
|
-
const h = (e) =>
|
|
1416
|
+
Ke(f, "filters", p.length > 0 ? p : void 0);
|
|
1417
|
+
const h = (e) => Xe(e, r, o, d, l), g = (e.formats ?? []).flatMap((e) => {
|
|
1418
1418
|
const t = h(e.area);
|
|
1419
1419
|
return t ? [{
|
|
1420
1420
|
...e,
|
|
1421
1421
|
area: t
|
|
1422
1422
|
}] : [];
|
|
1423
1423
|
});
|
|
1424
|
-
|
|
1424
|
+
Ke(f, "formats", g.length > 0 ? g : void 0);
|
|
1425
1425
|
const w = (e.conditionalFormats ?? []).flatMap((e) => {
|
|
1426
1426
|
const t = e.areas.flatMap((e) => {
|
|
1427
1427
|
const t = h(e);
|
|
@@ -1432,13 +1432,13 @@ var Y = [
|
|
|
1432
1432
|
areas: t
|
|
1433
1433
|
}] : [];
|
|
1434
1434
|
});
|
|
1435
|
-
return
|
|
1436
|
-
},
|
|
1435
|
+
return Ke(f, "conditionalFormats", w.length > 0 ? w : void 0), f;
|
|
1436
|
+
}, Ke = (e, t, n) => {
|
|
1437
1437
|
void 0 === n ? delete e[t] : e[t] = n;
|
|
1438
1438
|
}, Je = (e, t, n, s, r = !1, o) => {
|
|
1439
1439
|
const a = e.items ?? [], l = [], i = [], d = /* @__PURE__ */ new Set();
|
|
1440
1440
|
for (const e of a) {
|
|
1441
|
-
if (!
|
|
1441
|
+
if (!I(e)) {
|
|
1442
1442
|
i.push(l.length), l.push(e);
|
|
1443
1443
|
continue;
|
|
1444
1444
|
}
|
|
@@ -1460,7 +1460,7 @@ var Y = [
|
|
|
1460
1460
|
const t = void 0 === e.sort?.dataField && "descending" === e.sort?.order, n = !e.includeNewItemsInFilter && a.some((e) => e.hidden), s = l.map((e, t) => ({
|
|
1461
1461
|
item: e,
|
|
1462
1462
|
at: t
|
|
1463
|
-
})), r = s.filter((e) => !
|
|
1463
|
+
})), r = s.filter((e) => !I(e.item)), o = [...[...s.filter((e) => I(e.item)), ...u.map((e) => ({
|
|
1464
1464
|
item: n ? {
|
|
1465
1465
|
item: e,
|
|
1466
1466
|
hidden: !0
|
|
@@ -1481,10 +1481,10 @@ var Y = [
|
|
|
1481
1481
|
hidden: !0
|
|
1482
1482
|
} : { item: e };
|
|
1483
1483
|
if (e.sort && void 0 === e.sort.dataField) {
|
|
1484
|
-
const t = "descending" === e.sort.order, s = (e, t) =>
|
|
1484
|
+
const t = "descending" === e.sort.order, s = (e, t) => Ge(b(e, n), g(n[t]), void 0 === e.name && o?.has(e.item), o?.has(t));
|
|
1485
1485
|
for (const e of u) {
|
|
1486
1486
|
const n = f(e);
|
|
1487
|
-
let r = l.findIndex((n) =>
|
|
1487
|
+
let r = l.findIndex((n) => I(n) && (t ? s(n, e) < 0 : s(n, e) > 0));
|
|
1488
1488
|
r < 0 && (r = We(l)), l.splice(r, 0, n);
|
|
1489
1489
|
for (let e = 0; e < i.length; e++) i[e] >= r && i[e]++;
|
|
1490
1490
|
}
|
|
@@ -1498,14 +1498,14 @@ var Y = [
|
|
|
1498
1498
|
positions: i
|
|
1499
1499
|
};
|
|
1500
1500
|
}, We = (e) => {
|
|
1501
|
-
const t = e.findIndex((e) => !
|
|
1501
|
+
const t = e.findIndex((e) => !I(e));
|
|
1502
1502
|
return t < 0 ? e.length : t;
|
|
1503
|
-
},
|
|
1503
|
+
}, Ze = (e, t) => {
|
|
1504
1504
|
if (!(t < 0)) for (let n = 0; n < e.length; n++) {
|
|
1505
1505
|
const s = (t + n) % e.length, r = e[s];
|
|
1506
|
-
if (
|
|
1506
|
+
if (I(r) && !r.missing) return s;
|
|
1507
1507
|
}
|
|
1508
|
-
},
|
|
1508
|
+
}, Xe = (e, t, n, s, r) => {
|
|
1509
1509
|
const o = { ...e };
|
|
1510
1510
|
if (void 0 !== e.field) {
|
|
1511
1511
|
if (!n(e.field)) return null;
|
|
@@ -1532,7 +1532,7 @@ var Y = [
|
|
|
1532
1532
|
o.references = a;
|
|
1533
1533
|
}
|
|
1534
1534
|
return o;
|
|
1535
|
-
},
|
|
1535
|
+
}, Ye = (e, t, n) => {
|
|
1536
1536
|
const s = e.fields ?? [], r = s[t]?.items ?? [], o = new Array(r.length);
|
|
1537
1537
|
n.forEach((e, t) => {
|
|
1538
1538
|
o[e] = t;
|
|
@@ -1569,7 +1569,7 @@ var Y = [
|
|
|
1569
1569
|
...e,
|
|
1570
1570
|
baseItem: o[e.baseItem] ?? e.baseItem
|
|
1571
1571
|
} : e));
|
|
1572
|
-
const l = s.map((e, n) => n === t ? o : null), i = (e.dataFields ?? []).map((e, t) => t), d = (e) =>
|
|
1572
|
+
const l = s.map((e, n) => n === t ? o : null), i = (e.dataFields ?? []).map((e, t) => t), d = (e) => Xe(e, (e) => e, () => !0, l, i) ?? e;
|
|
1573
1573
|
return e.formats && (a.formats = e.formats.map((e) => ({
|
|
1574
1574
|
...e,
|
|
1575
1575
|
area: d(e.area)
|
|
@@ -1578,13 +1578,13 @@ var Y = [
|
|
|
1578
1578
|
areas: e.areas.map(d)
|
|
1579
1579
|
}))), a;
|
|
1580
1580
|
}, et = (e, t, n, s) => {
|
|
1581
|
-
const r = (e.fields ?? [])[n]?.items ?? [], o =
|
|
1581
|
+
const r = (e.fields ?? [])[n]?.items ?? [], o = u(t)[n] ?? [], a = t.fields?.[n], l = void 0 !== a?.group?.range, i = (e) => void 0 === e.name && C(a, e.item), d = r.map((e, t) => ({
|
|
1582
1582
|
item: e,
|
|
1583
1583
|
at: t
|
|
1584
|
-
})), c =
|
|
1585
|
-
c.sort((e, t) => l ? e.item.item - t.item.item :
|
|
1584
|
+
})), c = d.filter((e) => I(e.item));
|
|
1585
|
+
c.sort((e, t) => l ? e.item.item - t.item.item : Ge(b(e.item, o), b(t.item, o), i(e.item), i(t.item))), "descending" === s && c.reverse();
|
|
1586
1586
|
let f = 0;
|
|
1587
|
-
const m =
|
|
1587
|
+
const m = Ye(e, n, d.map((e) => I(e.item) ? c[f++] : e).map((e) => e.at));
|
|
1588
1588
|
return {
|
|
1589
1589
|
...m,
|
|
1590
1590
|
fields: m.fields.map((e, t) => t === n ? {
|
|
@@ -1594,14 +1594,14 @@ var Y = [
|
|
|
1594
1594
|
};
|
|
1595
1595
|
}, tt = (n, s, r) => {
|
|
1596
1596
|
const o = n.fields?.[s]?.items?.[r];
|
|
1597
|
-
if (!o || !
|
|
1597
|
+
if (!o || !I(o)) throw new t(e("error.pivotTable.changePart"));
|
|
1598
1598
|
return o;
|
|
1599
1599
|
}, nt = (n, s, r, o, a) => {
|
|
1600
|
-
const l = tt(n, r, o), i = n.fields[r].items,
|
|
1601
|
-
const t =
|
|
1602
|
-
return null === t ?
|
|
1600
|
+
const l = tt(n, r, o), i = n.fields[r].items, d = u(s)[r] ?? [], c = (e) => {
|
|
1601
|
+
const t = g(d[e.item]);
|
|
1602
|
+
return null === t ? D : U(t);
|
|
1603
1603
|
};
|
|
1604
|
-
if (i.some((e, t) => t !== o &&
|
|
1604
|
+
if (i.some((e, t) => t !== o && I(e) && S(e.name ?? c(e), a))) throw new t(e("error.pivotTable.itemNameExists", { name: a }));
|
|
1605
1605
|
const { name: f, ...m } = l, p = a === c(l) ? m : {
|
|
1606
1606
|
...l,
|
|
1607
1607
|
name: a
|
|
@@ -1613,15 +1613,15 @@ var Y = [
|
|
|
1613
1613
|
...e,
|
|
1614
1614
|
items: i.map((e, t) => t === o ? p : e)
|
|
1615
1615
|
} : e)
|
|
1616
|
-
},
|
|
1617
|
-
return
|
|
1616
|
+
}, w = n.fields[r].sort;
|
|
1617
|
+
return w && void 0 === w.dataField ? et(h, s, r, w.order) : h;
|
|
1618
1618
|
}, st = (e, t, n, s) => {
|
|
1619
1619
|
tt(e, t, n);
|
|
1620
1620
|
const r = e.fields[t].items.map((e, t) => t).filter((e) => e !== n);
|
|
1621
1621
|
r.splice(s, 0, n);
|
|
1622
1622
|
const o = e.fields[t].sort;
|
|
1623
1623
|
if (!o && r.every((e, t) => e === t)) return e;
|
|
1624
|
-
const a =
|
|
1624
|
+
const a = Ye(e, t, r);
|
|
1625
1625
|
return o ? {
|
|
1626
1626
|
...a,
|
|
1627
1627
|
fields: a.fields.map((e, n) => {
|
|
@@ -1631,11 +1631,11 @@ var Y = [
|
|
|
1631
1631
|
})
|
|
1632
1632
|
} : a;
|
|
1633
1633
|
}, rt = (n, s, r, o) => {
|
|
1634
|
-
const a =
|
|
1634
|
+
const a = U(o), l = n.fields, i = s.fields, d = n.dataFields ?? [], c = u(s), m = (e, t) => {
|
|
1635
1635
|
if (void 0 !== t.name) return t.name;
|
|
1636
|
-
const n =
|
|
1637
|
-
return null === n ?
|
|
1638
|
-
},
|
|
1636
|
+
const n = g(c[e][t.item]);
|
|
1637
|
+
return null === n ? D : U(n);
|
|
1638
|
+
}, p = (r) => {
|
|
1639
1639
|
if (void 0 !== r.field && a === (l[r.field].name ?? i[r.field].name)) return;
|
|
1640
1640
|
const o = void 0 === r.field ? n : {
|
|
1641
1641
|
...n,
|
|
@@ -1644,18 +1644,18 @@ var Y = [
|
|
|
1644
1644
|
name: "\0"
|
|
1645
1645
|
} : e)
|
|
1646
1646
|
};
|
|
1647
|
-
if (
|
|
1647
|
+
if (f(o, s, a, r.data) !== a) throw new t(e("error.pivotTable.fieldNameExists"));
|
|
1648
1648
|
};
|
|
1649
1649
|
switch (r.kind) {
|
|
1650
1650
|
case "item": {
|
|
1651
1651
|
const { field: e, rank: t } = r;
|
|
1652
1652
|
tt(n, e, t);
|
|
1653
|
-
const o = l[e].items.findIndex((n, s) => s !== t &&
|
|
1653
|
+
const o = l[e].items.findIndex((n, s) => s !== t && I(n) && S(m(e, n), a));
|
|
1654
1654
|
return o >= 0 ? st(n, e, o, t) : nt(n, s, e, t, a);
|
|
1655
1655
|
}
|
|
1656
1656
|
case "fieldCaption": {
|
|
1657
1657
|
const { field: e } = r;
|
|
1658
|
-
return
|
|
1658
|
+
return p({ field: e }), ((e, t) => ({
|
|
1659
1659
|
...n,
|
|
1660
1660
|
fields: l.map((n, s) => s === e ? t(n) : n)
|
|
1661
1661
|
}))(e, (t) => {
|
|
@@ -1668,9 +1668,9 @@ var Y = [
|
|
|
1668
1668
|
}
|
|
1669
1669
|
case "dataCaption": {
|
|
1670
1670
|
const { data: e } = r;
|
|
1671
|
-
return
|
|
1671
|
+
return p({ data: e }), {
|
|
1672
1672
|
...n,
|
|
1673
|
-
dataFields:
|
|
1673
|
+
dataFields: d.map((t, n) => n === e ? {
|
|
1674
1674
|
...t,
|
|
1675
1675
|
name: a
|
|
1676
1676
|
} : t)
|
|
@@ -1691,18 +1691,18 @@ var Y = [
|
|
|
1691
1691
|
case "pageItem": {
|
|
1692
1692
|
const s = n.pageFields, o = s[r.page];
|
|
1693
1693
|
let i;
|
|
1694
|
-
if (!
|
|
1695
|
-
const { item:
|
|
1694
|
+
if (!S(a, "(All)") && (i = (l[o.field].items ?? []).findIndex((e) => I(e) && S(m(o.field, e), a)), i < 0)) throw new t(e("error.pivotTable.notAnItem", { name: a }));
|
|
1695
|
+
const { item: d, ...u } = o, c = void 0 === i ? u : {
|
|
1696
1696
|
...o,
|
|
1697
1697
|
item: i
|
|
1698
1698
|
};
|
|
1699
1699
|
return {
|
|
1700
1700
|
...n,
|
|
1701
|
-
pageFields: s.map((e, t) => t === r.page ?
|
|
1701
|
+
pageFields: s.map((e, t) => t === r.page ? c : e)
|
|
1702
1702
|
};
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
}, ot = (e, t, n) =>
|
|
1705
|
+
}, ot = (e, t, n) => je({
|
|
1706
1706
|
cacheId: 0,
|
|
1707
1707
|
fields: []
|
|
1708
1708
|
}, e, t, n).model, at = (e, t) => t.some((t) => e.fields?.[t]?.inline) ? {
|
|
@@ -1717,32 +1717,32 @@ var Y = [
|
|
|
1717
1717
|
...e.columnFields ?? [],
|
|
1718
1718
|
...(e.pageFields ?? []).map((e) => e.field)
|
|
1719
1719
|
].filter((e) => e >= 0), it = (e, t) => {
|
|
1720
|
-
const n = e.fields[t], s =
|
|
1721
|
-
|
|
1720
|
+
const n = e.fields[t], s = u(e)[t], r = s.map((e, t) => t);
|
|
1721
|
+
j(n) || r.sort((e, t) => Ge(g(s[e]), g(s[t]), C(n, e), C(n, t)));
|
|
1722
1722
|
const o = new Set(n.calculatedItems?.map((e) => e.item)), a = new Set(n.unused);
|
|
1723
1723
|
return [...r.map((e) => ({
|
|
1724
1724
|
item: e,
|
|
1725
1725
|
...o.has(e) ? { calculated: !0 } : {},
|
|
1726
1726
|
...a.has(e) ? { missing: !0 } : {}
|
|
1727
1727
|
})), { type: "default" }];
|
|
1728
|
-
}, dt = (
|
|
1729
|
-
if (!("number" == typeof
|
|
1728
|
+
}, dt = (n) => {
|
|
1729
|
+
if (!("number" == typeof n ? void 0 !== o(n) : "" !== n && s.isValidFormat(n))) throw new t(e("error.pivotTable.notANumberFormat", { name: String(n) }));
|
|
1730
1730
|
}, ut = (n, s, r, o) => {
|
|
1731
|
-
const a = o?.function ?? ((e, t) => "number" ===
|
|
1732
|
-
if (!
|
|
1733
|
-
let
|
|
1734
|
-
if (void 0 ===
|
|
1735
|
-
else if (
|
|
1736
|
-
const
|
|
1737
|
-
name:
|
|
1731
|
+
const a = o?.function ?? ((e, t) => "number" === _(e, t) ? "sum" : "count")(s.fields[r], u(s)[r]), i = l[a];
|
|
1732
|
+
if (!i) throw new t(e("error.pivotTable.notAFunction", { name: a }));
|
|
1733
|
+
let d = o?.name;
|
|
1734
|
+
if (void 0 === d) d = f(n, s, `${i} of ${M(n, s, r)}`);
|
|
1735
|
+
else if (f(n, s, d) !== d) throw new t(e("error.pivotTable.fieldNameExists"));
|
|
1736
|
+
const c = {
|
|
1737
|
+
name: d,
|
|
1738
1738
|
field: r,
|
|
1739
1739
|
baseField: 0,
|
|
1740
1740
|
baseItem: 0
|
|
1741
1741
|
};
|
|
1742
|
-
return "sum" !== a && (
|
|
1742
|
+
return "sum" !== a && (c.subtotal = a), void 0 !== o?.numberFormat && (dt(o.numberFormat), c.numberFormat = o.numberFormat), c;
|
|
1743
1743
|
}, ct = (n, s) => {
|
|
1744
1744
|
const r = n.fields ?? [], o = (n) => {
|
|
1745
|
-
const s = r.findIndex((e) =>
|
|
1745
|
+
const s = r.findIndex((e) => S(e.name, n));
|
|
1746
1746
|
if (s < 0) throw new t(e("error.pivotTable.notAField", { name: n }));
|
|
1747
1747
|
return s;
|
|
1748
1748
|
}, a = /* @__PURE__ */ new Map(), l = (e, t) => {
|
|
@@ -1752,18 +1752,18 @@ var Y = [
|
|
|
1752
1752
|
}
|
|
1753
1753
|
};
|
|
1754
1754
|
l(s?.rows, "row"), l(s?.columns, "column"), l(s?.pages, "page");
|
|
1755
|
-
const i = (e) => [...a].filter(([, t]) => t === e).map(([e]) => e),
|
|
1755
|
+
const i = (e) => [...a].filter(([, t]) => t === e).map(([e]) => e), d = [];
|
|
1756
1756
|
for (const e of s?.values ?? []) {
|
|
1757
1757
|
const { field: t, ...s } = "string" == typeof e ? { field: e } : e;
|
|
1758
|
-
|
|
1758
|
+
d.push(ut({ dataFields: d }, n, o(t), s));
|
|
1759
1759
|
}
|
|
1760
|
-
const
|
|
1760
|
+
const u = new Set(d.map((e) => e.field)), c = s?.form && "compact" !== s.form ? s.form : void 0, f = r.map((e, t) => {
|
|
1761
1761
|
const s = {}, r = a.get(t);
|
|
1762
|
-
return r && (s.axis = r, s.items = it(n, t)),
|
|
1763
|
-
}),
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1766
|
-
fields:
|
|
1762
|
+
return r && (s.axis = r, s.items = it(n, t)), u.has(t) && (s.dataField = !0), c && (s.form = c), e.dates && void 0 !== e.numberFormat && (s.numberFormat = e.numberFormat), s;
|
|
1763
|
+
}), m = i("column");
|
|
1764
|
+
d.length > 1 && m.push(-2);
|
|
1765
|
+
const p = {
|
|
1766
|
+
fields: f,
|
|
1767
1767
|
style: {
|
|
1768
1768
|
name: s?.style ?? "PivotStyleLight16",
|
|
1769
1769
|
showRowHeaders: !0,
|
|
@@ -1772,14 +1772,14 @@ var Y = [
|
|
|
1772
1772
|
showColumnStripes: !1,
|
|
1773
1773
|
showLastColumn: !0
|
|
1774
1774
|
}
|
|
1775
|
-
},
|
|
1776
|
-
|
|
1777
|
-
const
|
|
1778
|
-
return
|
|
1775
|
+
}, h = i("row");
|
|
1776
|
+
h.length > 0 && (p.rowFields = h), m.length > 0 && (p.columnFields = m);
|
|
1777
|
+
const g = i("page");
|
|
1778
|
+
return g.length > 0 && (p.pageFields = g.map((e) => ({ field: e }))), d.length > 0 && (p.dataFields = d), c && (p.form = c), p;
|
|
1779
1779
|
}, ft = (e, t) => t.map((t) => {
|
|
1780
1780
|
const n = t.sort?.scope;
|
|
1781
1781
|
if (!n) return t;
|
|
1782
|
-
const s = ((t.axis ===
|
|
1782
|
+
const s = ((t.axis === h.Axis.Row ? e.columnFields : t.axis === h.Axis.Column ? e.rowFields : void 0) ?? []).filter((e) => -2 !== e);
|
|
1783
1783
|
if (!n.items.every((e, t) => s[t] === e.field)) {
|
|
1784
1784
|
const { sort: e, ...n } = t;
|
|
1785
1785
|
return n;
|
|
@@ -1796,37 +1796,37 @@ var Y = [
|
|
|
1796
1796
|
}
|
|
1797
1797
|
};
|
|
1798
1798
|
}), mt = (n, s, r, o, a) => {
|
|
1799
|
-
const l =
|
|
1799
|
+
const l = h.Axis, i = s.fields?.[r], d = n.fields?.[r]?.axis ?? null;
|
|
1800
1800
|
if (o === l.Values) throw new t(e("error.pivotTable.valuesNotAnAxis"));
|
|
1801
1801
|
if (null === o) {
|
|
1802
1802
|
if (null === d) return n;
|
|
1803
1803
|
} else if (void 0 !== i?.formula || o === l.Page && (i?.calculatedItems?.length ?? 0) > 0) throw new t(e("error.pivotTable.fieldNotPlaceable"));
|
|
1804
|
-
const
|
|
1805
|
-
if (void 0 !== a && (!Number.isInteger(a) || a < 1 || a >
|
|
1806
|
-
const
|
|
1807
|
-
if (o === d && (void 0 === a || N(n, o)[
|
|
1808
|
-
|
|
1809
|
-
const { rowFields:
|
|
1810
|
-
|
|
1811
|
-
let
|
|
1812
|
-
...
|
|
1813
|
-
...
|
|
1804
|
+
const u = o ? N(n, o).filter((e) => e !== r) : [];
|
|
1805
|
+
if (void 0 !== a && (!Number.isInteger(a) || a < 1 || a > u.length + 1)) throw new t(e("error.pivotTable.fieldPosition"));
|
|
1806
|
+
const c = (a ?? u.length + 1) - 1;
|
|
1807
|
+
if (o === d && (void 0 === a || N(n, o)[c] === r)) return n;
|
|
1808
|
+
u.splice(c, 0, r);
|
|
1809
|
+
const { rowFields: f, columnFields: m, pageFields: p, ...g } = n, w = {}, v = (e) => (e ?? []).filter((e) => e !== r), F = o === l.Row ? u : v(n.rowFields), b = o === l.Column ? u : v(n.columnFields), y = o === l.Page ? u.map((e) => n.pageFields?.find((t) => t.field === e) ?? { field: e }) : (n.pageFields ?? []).filter((e) => e.field !== r);
|
|
1810
|
+
F.length > 0 && (w.rowFields = F), b.length > 0 && (w.columnFields = b), y.length > 0 && (w.pageFields = y);
|
|
1811
|
+
let I = {
|
|
1812
|
+
...g,
|
|
1813
|
+
...w
|
|
1814
1814
|
};
|
|
1815
|
-
o === l.Page && d !== l.Page && (
|
|
1816
|
-
const
|
|
1817
|
-
o ?
|
|
1818
|
-
const
|
|
1819
|
-
if (
|
|
1820
|
-
...
|
|
1821
|
-
fields: ft(
|
|
1815
|
+
o === l.Page && d !== l.Page && (I = q(I, r, () => !0));
|
|
1816
|
+
const x = { ...n.fields?.[r] };
|
|
1817
|
+
o ? x.axis = o : delete x.axis, o && !x.items && i && (x.items = B(it(s, r), x.subtotals)), o && void 0 === x.numberFormat && i?.dates && void 0 !== i.numberFormat && (x.numberFormat = i.numberFormat), o === l.Page && x.items?.some((e) => e.hidden) && (x.multipleItemSelection = !0);
|
|
1818
|
+
const A = (n.fields ?? []).map((e, t) => t === r ? x : e);
|
|
1819
|
+
if (I = {
|
|
1820
|
+
...I,
|
|
1821
|
+
fields: ft(I, A)
|
|
1822
1822
|
}, null === o && n.formats?.some((e) => e.area.references?.some((e) => e.field === r))) {
|
|
1823
|
-
const e = n.formats.filter((e) => !e.area.references?.some((e) => e.field === r)), { formats: t, ...s } =
|
|
1824
|
-
|
|
1823
|
+
const e = n.formats.filter((e) => !e.area.references?.some((e) => e.field === r)), { formats: t, ...s } = I;
|
|
1824
|
+
I = e.length > 0 ? {
|
|
1825
1825
|
...s,
|
|
1826
1826
|
formats: e
|
|
1827
1827
|
} : s;
|
|
1828
1828
|
}
|
|
1829
|
-
return
|
|
1829
|
+
return I;
|
|
1830
1830
|
}, pt = -2, ht = /* @__PURE__ */ new Set([
|
|
1831
1831
|
"percentOfTotal",
|
|
1832
1832
|
"percentOfRow",
|
|
@@ -1903,7 +1903,7 @@ var Y = [
|
|
|
1903
1903
|
}];
|
|
1904
1904
|
});
|
|
1905
1905
|
c.length > 0 && (u.filters = c);
|
|
1906
|
-
const f = (e) =>
|
|
1906
|
+
const f = (e) => Xe(e, (e) => e, () => !0, [], n), m = (e.formats ?? []).flatMap((e) => {
|
|
1907
1907
|
const t = f(e.area);
|
|
1908
1908
|
return t ? [{
|
|
1909
1909
|
...e,
|
|
@@ -1955,7 +1955,7 @@ var Y = [
|
|
|
1955
1955
|
l[e] = t;
|
|
1956
1956
|
}), It(n, a.map((e) => o[e]), l);
|
|
1957
1957
|
}, Et = (e, t, n, s) => {
|
|
1958
|
-
const r =
|
|
1958
|
+
const r = x(e, t, n, s);
|
|
1959
1959
|
return (e.dataFields[n].subtotal ?? "sum") === s ? e : bt(e, n, (e) => {
|
|
1960
1960
|
const { subtotal: t, ...n } = e, o = {
|
|
1961
1961
|
...n,
|
|
@@ -1966,23 +1966,23 @@ var Y = [
|
|
|
1966
1966
|
}, St = (n, s, r, o) => {
|
|
1967
1967
|
const a = n.dataFields[r], l = a.showDataAs ?? "normal", i = o?.kind ?? "normal";
|
|
1968
1968
|
if (o && !wt.has(o.kind)) throw new t(e("error.pivotTable.notAShowAs", { name: o.kind }));
|
|
1969
|
-
const { showDataAs:
|
|
1969
|
+
const { showDataAs: d, baseField: u, baseItem: c, ...f } = a, p = { ...f };
|
|
1970
1970
|
"normal" !== i && (p.showDataAs = i);
|
|
1971
1971
|
let h = a.baseField, g = a.baseItem;
|
|
1972
1972
|
if (void 0 !== o?.baseField) {
|
|
1973
|
-
const r = o.baseField, a = (s.fields ?? []).findIndex((e, t) =>
|
|
1973
|
+
const r = o.baseField, a = (s.fields ?? []).findIndex((e, t) => S(M(n, s, t), r));
|
|
1974
1974
|
if (a < 0) throw new t(e("error.pivotTable.notAField", { name: r }));
|
|
1975
1975
|
a !== h && (h = a, g = 0);
|
|
1976
1976
|
}
|
|
1977
1977
|
if (void 0 !== o?.baseItem) {
|
|
1978
1978
|
const r = h ?? 0;
|
|
1979
|
-
if (
|
|
1980
|
-
else if (
|
|
1979
|
+
if (S(o.baseItem, "(previous)")) g = "previous";
|
|
1980
|
+
else if (S(o.baseItem, "(next)")) g = "next";
|
|
1981
1981
|
else {
|
|
1982
1982
|
const a = n.fields?.[r]?.items ? n : { fields: (n.fields ?? []).map((e, t) => t === r ? {
|
|
1983
1983
|
...e,
|
|
1984
1984
|
items: it(s, r)
|
|
1985
|
-
} : e) }, l =
|
|
1985
|
+
} : e) }, l = $(a, s, r).findIndex((e) => null !== e && S(e, o.baseItem));
|
|
1986
1986
|
if (l < 0) throw new t(e("error.pivotTable.notAnItem", { name: o.baseItem }));
|
|
1987
1987
|
g = l;
|
|
1988
1988
|
}
|
|
@@ -1990,14 +1990,14 @@ var Y = [
|
|
|
1990
1990
|
if (void 0 !== h && (p.baseField = h), void 0 !== g && (p.baseItem = g), i === l) return p.baseField === a.baseField && p.baseItem === a.baseItem ? n : bt(n, r, () => p);
|
|
1991
1991
|
const w = ((e, t, n) => {
|
|
1992
1992
|
if (gt.has(n)) return gt.has(t) ? e : void 0;
|
|
1993
|
-
const s = ((e) =>
|
|
1993
|
+
const s = ((e) => m(e).replace(/"[^"]*"|\\./g, "").includes("%"))(e);
|
|
1994
1994
|
return ht.has(n) ? ht.has(t) || s ? e : 10 : ht.has(t) && s ? void 0 : e;
|
|
1995
1995
|
})(a.numberFormat, l, i);
|
|
1996
1996
|
return w === a.numberFormat ? bt(n, r, () => p) : bt(Ft(n, r), r, () => yt(p, w));
|
|
1997
1997
|
}, Pt = (e, t, n) => {
|
|
1998
1998
|
dt(n);
|
|
1999
|
-
const s =
|
|
2000
|
-
if (
|
|
1999
|
+
const s = m(n), r = e.dataFields[t], o = e.formats?.[e.formats.length - 1];
|
|
2000
|
+
if (m(r.numberFormat) === s && o && vt(o.area, t) && o.style.numberFormat === s) return e;
|
|
2001
2001
|
const a = bt(Ft(e, t), t, (e) => yt(e, "General" === s ? void 0 : n));
|
|
2002
2002
|
return {
|
|
2003
2003
|
...a,
|
|
@@ -2014,7 +2014,7 @@ var Y = [
|
|
|
2014
2014
|
};
|
|
2015
2015
|
}, kt = (n, s, r) => {
|
|
2016
2016
|
if (null === s) return At(n);
|
|
2017
|
-
const o =
|
|
2017
|
+
const o = h.Axis;
|
|
2018
2018
|
if (s !== o.Row && s !== o.Column) throw new t(e("error.pivotTable.fieldNotPlaceable"));
|
|
2019
2019
|
const a = n.rowFields?.includes(pt) ? o.Row : n.columnFields?.includes(pt) ? o.Column : null;
|
|
2020
2020
|
if (!a) throw new t(e("error.pivotTable.fieldPosition"));
|
|
@@ -2023,18 +2023,18 @@ var Y = [
|
|
|
2023
2023
|
const i = (r ?? l.length + 1) - 1;
|
|
2024
2024
|
if (s === a && (void 0 === r || N(n, s)[i] === pt)) return n;
|
|
2025
2025
|
l.splice(i, 0, pt);
|
|
2026
|
-
const { rowFields: d, columnFields: u, valuesOnRows: c, ...f } = n, m = N(n, s === o.Row ? o.Column : o.Row).filter((e) => e !== pt), p = { ...f },
|
|
2027
|
-
return
|
|
2026
|
+
const { rowFields: d, columnFields: u, valuesOnRows: c, ...f } = n, m = N(n, s === o.Row ? o.Column : o.Row).filter((e) => e !== pt), p = { ...f }, g = s === o.Row ? l : m, w = s === o.Column ? l : m;
|
|
2027
|
+
return g.length > 0 && (p.rowFields = [...g]), w.length > 0 && (p.columnFields = [...w]), s === o.Row && (p.valuesOnRows = !0), p;
|
|
2028
2028
|
}, Mt = (n, s, r) => {
|
|
2029
2029
|
if (r === (n.valuesCaption ?? "Values")) return n;
|
|
2030
2030
|
const { valuesCaption: o, ...a } = n, l = {
|
|
2031
2031
|
...a,
|
|
2032
2032
|
valuesCaption: "\0"
|
|
2033
2033
|
};
|
|
2034
|
-
if (
|
|
2034
|
+
if (f(l, s, r) !== r) throw new t(e("error.pivotTable.fieldNameExists"));
|
|
2035
2035
|
return "Values" === r ? a : {
|
|
2036
2036
|
...a,
|
|
2037
2037
|
valuesCaption: r
|
|
2038
2038
|
};
|
|
2039
2039
|
};
|
|
2040
|
-
export { xt as addPivotDataField, Ne as anchorPivotPeriods, dt as assertNumberFormat, lt as axisFieldsOf, Re as buildPivotView, Oe as evaluatePivotFilters,
|
|
2040
|
+
export { xt as addPivotDataField, Ne as anchorPivotPeriods, dt as assertNumberFormat, lt as axisFieldsOf, Re as buildPivotView, Oe as evaluatePivotFilters, k as isItemFilter, Ie as layOutPivot, it as listedItemsOf, Ct as movePivotDataField, mt as movePivotField, st as movePivotItem, kt as movePivotValues, ot as newPivotCache, ct as newPivotTable, Le as readPivotSource, je as refreshPivotCache, Qe as remapPivotTable, At as removePivotDataField, nt as renamePivotItem, Mt as renamePivotValues, Ye as reorderPivotItems, Et as setPivotDataFunction, Pt as setPivotDataNumberFormat, St as setPivotDataShowAs, et as sortPivotItemsByLabel, rt as typeOverPivot, at as withListedFields };
|