@sheetxl/studio-vanilla 0.4.17 → 0.4.18
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/6gExB5F8n8HOw9zd.cjs +6 -0
- package/browser/cjs/{nBWWMENUR7eJsiwF.cjs → B8dj4dYUEn2CmsHE.cjs} +6 -6
- package/browser/cjs/{DXiLHMmvYKY6hlQ6.cjs → BEldhmijnKlftQMx.cjs} +1 -1
- package/browser/cjs/{C17A-3Ti1pMG4ISj.cjs → BFPe9pI_H_y_2DTe.cjs} +2 -2
- package/browser/cjs/{DhaHMyMcxGSWqI5B.cjs → BIzmN32Y-6x-MudX.cjs} +2 -2
- package/browser/cjs/{W2OA5_9ZJ6xkAXmp.cjs → BRxlJAL1jFIU_82U.cjs} +26 -26
- package/browser/cjs/{Bd7jl4AipYvkmHDC.cjs → BSEVb7s2C2kZ31NF.cjs} +1 -1
- package/browser/cjs/{B9WwP6EQv_Fa_dR-.cjs → BU1t_BFns-0ilWz0.cjs} +2 -2
- package/browser/cjs/BVCyM2Y3R1TGOqFI.cjs +6 -0
- package/browser/cjs/{Dg9lWhdjcYx-McwV.cjs → Bgy1T48FYTWP6pB3.cjs} +1 -1
- package/browser/cjs/{DGK_Hbzv8kikUYBG.cjs → C6D_4VpkhlZJV3ba.cjs} +2 -2
- package/browser/cjs/{BwWfsee6CgDvi0_5.cjs → CAjmrepM9WMhy9vb.cjs} +1 -1
- package/browser/cjs/{c7YGtqgALtf7uv7f.cjs → CG-ZjFwN09yfxNqn.cjs} +3 -3
- package/browser/cjs/{DagLEH_ymYaCmAsb.cjs → CHG-7oiv7Oyejsc-.cjs} +1 -1
- package/browser/cjs/{Db-9mhCwJcHfJrF8.cjs → CSb4CdId4hpVhZmZ.cjs} +3 -3
- package/browser/cjs/{CvP1iU7h-kIPosFU.cjs → CUYYovdbaJR7Yo5f.cjs} +1 -1
- package/browser/cjs/{Cl7Z5kDqJgCOLAc2.cjs → CWAjzncNmFJkU6ox.cjs} +1 -1
- package/browser/cjs/{rSvomYT1qvMeISi-.cjs → CeqOk2b51H08dfzK.cjs} +1 -1
- package/browser/cjs/{Q_kMYzReMM5keFmR.cjs → ChxzT-xf73oQJQWE.cjs} +1 -1
- package/browser/cjs/{B8-LwimO49ed-ERb.cjs → CjehFQr4MirYbbXO.cjs} +2 -2
- package/browser/cjs/{CARZsdpF5OqYWiE4.cjs → Ck1O-aLqdH9fGJj6.cjs} +2 -2
- package/browser/cjs/{CT7nRMk0BDAkl0BF.cjs → ClrYjBK6eSMrsEPL.cjs} +1 -1
- package/browser/cjs/{Cxm2nHmufmVWwYnh.cjs → CvqPgpNEjiXnmdDH.cjs} +3 -3
- package/browser/cjs/{BYFzXSTbEpxkcnd1.cjs → D-2FeaIUEoVRhtnb.cjs} +1 -1
- package/browser/cjs/{CnUzYiLP3w2366r9.cjs → D-whqtgViIoFfoj-.cjs} +1 -1
- package/browser/cjs/D1nw2Zcr0IJgjHBZ.cjs +6 -0
- package/browser/cjs/{CGqzdm1gPPCmrjaI.cjs → D2_nYMMNiehHs6Lh.cjs} +1 -1
- package/browser/cjs/{Csse6ZfSbzMlHnw7.cjs → D38pL5K9nhptFluY.cjs} +1 -1
- package/browser/cjs/{DGBXTq7BHivFoTcl.cjs → DBKA6qbMZ4LLV0-o.cjs} +1 -1
- package/browser/cjs/{DUMBZ_nlhE2mwGc5.cjs → DDDqa1DDQ7X3CA6n.cjs} +4 -4
- package/browser/cjs/{WqrXIil5jYvo3MDk.cjs → DKwV2FvhmpmpJlij.cjs} +1 -1
- package/browser/cjs/{EDsPYwusbxNoHLGU.cjs → DQbBsNlSPHQGMvrY.cjs} +1 -1
- package/browser/cjs/{Ie3aYqZhR4mlRr4e.cjs → DTI1I-IHfEuUdie6.cjs} +2 -2
- package/browser/cjs/{ChRjklFq_BsZf2Iw.cjs → DUHjTovFz3GBcXSO.cjs} +1 -1
- package/browser/cjs/{BqNrgNvJPVpk8J7j.cjs → DaQBOI7sKpjXDUrX.cjs} +2 -2
- package/browser/cjs/{BHEatQMJJePGzkan.cjs → DiqPuZ_Mn9TXhleF.cjs} +1 -1
- package/browser/cjs/{6biAKvO0L5uuCIZG.cjs → DpkWlLgh-GGb_HeA.cjs} +2 -2
- package/browser/cjs/ErnqKHol6IQv1dtF.cjs +371 -0
- package/browser/cjs/{Cxq8seCgWHi5cMgM.cjs → JQAJkeCr5jp6ohmU.cjs} +4 -4
- package/browser/cjs/{CFpxo2YzoLcGlyjL.cjs → K5Kc8nXGRIs_k_-e.cjs} +1 -1
- package/browser/cjs/{B0eMj3QF5QrwuQV9.cjs → TCfEstnikYSYqpkI.cjs} +1 -1
- package/browser/cjs/{KmmFDFEsREYYg23O.cjs → Vi7ZeweVndSYLv6A.cjs} +2 -2
- package/browser/cjs/{BxREDzh95uVYfibX.cjs → WuyjTEDRx8JcD_eO.cjs} +1 -1
- package/browser/cjs/{CMPauVL3M8tDeh0T.cjs → ZJsyHeUPH-RN2J2b.cjs} +1 -1
- package/browser/cjs/{8cpAb8zuCRvgrhSi.cjs → Zb2yay61EwkNdWVz.cjs} +1 -1
- package/browser/cjs/ce_zz1bKKPMD6IGz.cjs +6 -0
- package/browser/cjs/{CT_0Nd7KbMe-Y6m5.cjs → d-rbUkE3GFBhB9gf.cjs} +4 -4
- package/browser/cjs/{qWZ-F4TgryDZVy6z.cjs → eU_5etYAThqB7tOO.cjs} +1 -1
- package/browser/cjs/{Dy9SnYaFa09xyxw5.cjs → eW4g4XHTBwX5axv2.cjs} +8 -8
- package/browser/cjs/{BqNZs_XIfzwqlDlN.cjs → gnTB9BLNpWr-RgLN.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{COB62qOQPls-ORlE.cjs → k3NkNfvdJNyz5KyG.cjs} +1 -1
- package/browser/cjs/{By2ZGZJMoExtMfZl.cjs → nhLubDKTkbv0p8hy.cjs} +1 -1
- package/browser/cjs/{9ZyrDXd_aJTOxZaN.cjs → qwC83dKcsT6PjuRJ.cjs} +1 -1
- package/browser/cjs/{BgAiDVJjk1i_ZFOH.cjs → r1w8QLSAF1fPdRXo.cjs} +2 -2
- package/browser/cjs/{rqhkC0NWqih9Egon.cjs → uq7sOPSacEqtBla5.cjs} +1 -1
- package/browser/cjs/{mwprtkpfm815yW02.cjs → vxVmH4UhUxamhkAL.cjs} +1 -1
- package/browser/cjs/{DgxOqZ8rzK23p-di.cjs → z3t9NKq_Rru9rdRY.cjs} +1 -1
- package/{cdn/assets/CDhPfM0k-XhvF3vL.js → browser/esm/0rtpW3jsWy09WVgL.mjs} +1 -1
- package/browser/esm/{DgFLc3B4NzW9gA8C.mjs → 83YhGRf4sr1nIGUF.mjs} +3 -3
- package/{cdn/assets/CQiFaCEUk0QjmZWK.js → browser/esm/9GPlJgQk7sO4IoM0.mjs} +1 -1
- package/browser/esm/{CCcZRLXoZkTb7wNc.mjs → B498JhtOmMAo_jgX.mjs} +2 -2
- package/browser/esm/{DpzIeb_IueXMbSrg.mjs → BI7lEitafHBed-By.mjs} +2 -2
- package/{cdn/assets/DZKgySEhRSd_acs_.js → browser/esm/BMBbzBmQDD3qfrC_.mjs} +1 -1
- package/browser/esm/{Crw41yabEq-swm47.mjs → BNyNoLgd3hytW2dX.mjs} +1 -1
- package/browser/esm/{CPy6dd5idg0K5KeH.mjs → BOZkutOGOJG1wK-V.mjs} +2 -2
- package/{cdn/assets/BfVOxqqljfUOpqSh.js → browser/esm/BTqkZMCBSrMnTAqH.mjs} +1 -1
- package/browser/esm/{DABEpoNSmkCOVa7X.mjs → Ba1zoBcKRW4R-TUZ.mjs} +1 -1
- package/{cdn/assets/CYTAZuWT3QJpoX75.js → browser/esm/BdiazbVW7y4wMZzl.mjs} +1 -1
- package/{cdn/assets/exgvG80FM-7NUReB.js → browser/esm/Bf3PbpdXr2YBd80R.mjs} +1 -1
- package/browser/esm/{DBvsKienZ_WmcTGd.mjs → BhbkPgJwl4jaDSzR.mjs} +1 -1
- package/browser/esm/{BBK3aWidGgBdiXPM.mjs → Bq29KUVBFIIDVmqP.mjs} +14 -14
- package/{cdn/assets/CQtZib0FjKvQbiDG.js → browser/esm/Bu1DrN7ddrdJf4-t.mjs} +1 -1
- package/browser/esm/{yziS52QohW3BU1Sh.mjs → BuYNBBrMCkCpZt-i.mjs} +13 -13
- package/browser/esm/{DzfLSNBzDB-r7FLU.mjs → By8iBijliP04589G.mjs} +4 -4
- package/browser/esm/C1hWERJvtXpo5peB.mjs +20 -0
- package/browser/esm/{b2KWP-FaZWiaod4k.mjs → C1oaT9KdUodgWK3x.mjs} +1 -1
- package/browser/esm/{CKWV0eStHBpV6av-.mjs → CDZyUGGXefQIk9bm.mjs} +1 -1
- package/browser/esm/{iwN2flm94BM1XXBG.mjs → CIQgIA45dKgsFr8g.mjs} +156 -156
- package/browser/esm/{DQreQ06iRjaxCupi.mjs → CKehwqv6k-x69W-N.mjs} +4 -4
- package/browser/esm/{OeqsE__gB5RRTktW.mjs → CMOm6Fr6Oxj9RoGx.mjs} +1 -1
- package/browser/esm/{B4b7vbAWqfaIiQ1P.mjs → CQzt9hGSNwdEfKQx.mjs} +2 -2
- package/browser/esm/{DxAMqQQ_xqs8chgY.mjs → CRmhBJbCBt-usGV_.mjs} +2 -2
- package/browser/esm/{_m_kaz1LWJPmPRI7.mjs → Cf_CToPzxoA-aDXC.mjs} +1 -1
- package/browser/esm/{4V-QDCR_jsVY0LLV.mjs → ComZ9YL9UbNrdtgb.mjs} +18 -18
- package/{cdn/assets/NZdHbcc4A8aR8z_P.js → browser/esm/Cr99yWq8so0mdyPz.mjs} +1 -1
- package/browser/esm/Cz7DMRonhK92bvMj.mjs +51566 -0
- package/{cdn/assets/CV0xwwpXwrx7cunJ.js → browser/esm/D4VxZs0rJs1pmmty.mjs} +1 -1
- package/{cdn/assets/BbCFZ7BuAewUhSlf.js → browser/esm/D4lCVoEMnY4LDOe_.mjs} +1 -1
- package/browser/esm/{C3UQaCsEA-es0str.mjs → D7ADaPSEp7UbVGW9.mjs} +26 -26
- package/{cdn/assets/D4aBI8Q1QKmtd08h.js → browser/esm/D8yWaZgP_m305Xdw.mjs} +1 -1
- package/browser/esm/{CcV9Pi58K6qlwYUt.mjs → DFKQ52nEW3z5hE49.mjs} +2 -2
- package/{cdn/assets/BcmOaJDGlkKqxG2K.js → browser/esm/DQVplFpK9A1EIvdK.mjs} +1 -1
- package/browser/esm/{BadAuKyzCBKeSYzj.mjs → DUufyYsjhjDk8XiB.mjs} +8 -8
- package/browser/esm/{DRhZRc-tuAIETA4d.mjs → DcfWMQ6ci0An3wbK.mjs} +6 -6
- package/browser/esm/{DGZlQ3Ii1PAQ2lZ8.mjs → DeqIw6g0upvFnFJ7.mjs} +13 -13
- package/{cdn/assets/BcLNeDh-zvjwiAPK.js → browser/esm/DfPZoMGjJLY5lNfx.mjs} +1 -1
- package/browser/esm/{R-nW2tm5BNGGDzxE.mjs → Djq2hwsjwZ3gwvCX.mjs} +2 -2
- package/browser/esm/{itUp9Fcd7garj6Ei.mjs → Dr0c_TBv01wBTYct.mjs} +1 -1
- package/{cdn/assets/CiVx0tO0V_4ToonT.js → browser/esm/DrUhjclyQ_wtu3-o.mjs} +1 -1
- package/browser/esm/{C48-m1iFvg6_12Uj.mjs → DsqPwYh5PBMY_OEg.mjs} +1 -1
- package/browser/esm/{CHmIf1kJ-17F8RFn.mjs → G6hbORyGPtwXe9ND.mjs} +1 -1
- package/browser/esm/NUhzrAAxY7WlR0vL.mjs +39 -0
- package/{cdn/assets/Brn_BpM71L-VcKY7.js → browser/esm/WYfqEzPe6bT2pWJJ.mjs} +1 -1
- package/browser/esm/{BgOrmx5pwzxPjUy8.mjs → XmDs7FfcmSIwQCos.mjs} +13 -13
- package/{cdn/assets/Cl6UhQ-Fa_tk1hMT.js → browser/esm/a4tx9NSvCvDgs_PL.mjs} +1 -1
- package/browser/esm/{hSuzTdYFfLJRtWwH.mjs → c-1voGEg_SKA-kqj.mjs} +12 -12
- package/{cdn/assets/DB7KGUAeBmMUb77y.js → browser/esm/ceMU_E2f1UyoBi26.mjs} +1 -1
- package/browser/esm/{EGRuGzY71Uc8-VbG.mjs → dULO1WC1iVnuJQQl.mjs} +14 -14
- package/browser/esm/{CUxbeQfR9_P_knx7.mjs → eO7qOlRPdt3GDVSZ.mjs} +1 -1
- package/browser/esm/{DviZK2hYv7CCV-Lx.mjs → fX1sl5Pyq6NiBpGm.mjs} +1 -1
- package/browser/esm/{CNHLfE1ku29awT-p.mjs → hc-7dPh1zYIOTWeA.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{Rv9ZXwwH6sDb3k1U.mjs → k8gIUTsjB46T_-0A.mjs} +2 -2
- package/browser/esm/{Ctz5ddsRjB0hnLdi.mjs → uXLogtnMh4dC8M6y.mjs} +1 -1
- package/browser/esm/{DFvnp6cQLTr61-R4.mjs → uyob4I3lZHZmcM_z.mjs} +1 -1
- package/{browser/esm/CDhPfM0k-XhvF3vL.mjs → cdn/assets/0rtpW3jsWy09WVgL.js} +1 -1
- package/cdn/assets/{oHD9nG-D3gooE_Xd.js → 2iAyR3lqPTrC8fqX.js} +2 -2
- package/{browser/esm/CQiFaCEUk0QjmZWK.mjs → cdn/assets/9GPlJgQk7sO4IoM0.js} +1 -1
- package/cdn/assets/{c9gFvMeZ30QDtEkh.js → B-zR0P7K9TTIqb3N.js} +2 -2
- package/cdn/assets/{D4xY65nrl6MJiaVd.js → B0AMD95YmqvJGzKy.js} +8 -8
- package/cdn/assets/{Ckl7hY7Un_-I-ccO.js → BApDCIl0nEcPxdcI.js} +1 -1
- package/cdn/assets/{U1xkKOphPZ8ViWfI.js → BCmdSl8UKJV-mbUP.js} +2 -2
- package/cdn/assets/{oluj6lXacLog_eD5.js → BK-yXbGlmTLkEgUb.js} +2 -2
- package/{browser/esm/DZKgySEhRSd_acs_.mjs → cdn/assets/BMBbzBmQDD3qfrC_.js} +1 -1
- package/cdn/assets/{Crw41yabEq-swm47.js → BNyNoLgd3hytW2dX.js} +1 -1
- package/cdn/assets/{BD4-oTjkO64sq4kk.js → BT6biBu5cqLq8Ejv.js} +3 -3
- package/{browser/esm/BfVOxqqljfUOpqSh.mjs → cdn/assets/BTqkZMCBSrMnTAqH.js} +1 -1
- package/cdn/assets/{BS7Sy3gLMf1fncWO.js → BVuYSELkcKtUtWWL.js} +2 -2
- package/cdn/assets/{DABEpoNSmkCOVa7X.js → Ba1zoBcKRW4R-TUZ.js} +1 -1
- package/cdn/assets/{Djo6bf7iEUkSd5Xz.js → BaS8k1_FncCD99tU.js} +2 -2
- package/{browser/esm/CYTAZuWT3QJpoX75.mjs → cdn/assets/BdiazbVW7y4wMZzl.js} +1 -1
- package/{browser/esm/exgvG80FM-7NUReB.mjs → cdn/assets/Bf3PbpdXr2YBd80R.js} +1 -1
- package/cdn/assets/{H30wDkYjBtrT0ZgL.js → Bfa4DKsgwj4QcoRG.js} +14 -14
- package/cdn/assets/{DkthCZzdpdE7Juh3.js → BgCSJCG8QtVsdHU2.js} +73 -73
- package/cdn/assets/{DBvsKienZ_WmcTGd.js → BhbkPgJwl4jaDSzR.js} +1 -1
- package/cdn/assets/{BOtNnqa4VB1RNIe6.js → BjxqTRb2Ea-4O_Cu.js} +5 -5
- package/cdn/assets/{D0Tbz1ciIX0rTyO0.js → Bl04bUHLpvVGX5_G.js} +2 -2
- package/cdn/assets/{Dinizrgo6WzR-giU.js → Bo_VRKrnQCatQ2DP.js} +4 -4
- package/cdn/assets/{ovzl4gqfazeLyLYr.js → BreZJXfyH5me-yuL.js} +4 -4
- package/{browser/esm/CQtZib0FjKvQbiDG.mjs → cdn/assets/Bu1DrN7ddrdJf4-t.js} +1 -1
- package/cdn/assets/{CWKMmCJHUVs8cZel.js → BymCn9svILK2L_Q7.js} +6 -6
- package/cdn/assets/{CKWV0eStHBpV6av-.js → CDZyUGGXefQIk9bm.js} +1 -1
- package/cdn/assets/{Cn9K_ZpeVGyZT2dc.js → CEYK9DvYOF2aliP4.js} +3 -3
- package/cdn/assets/{OeqsE__gB5RRTktW.js → CMOm6Fr6Oxj9RoGx.js} +1 -1
- package/cdn/assets/{tlLggOt3PbLk58j0.js → C_o-jOpG9vWGkURh.js} +4 -4
- package/cdn/assets/{_m_kaz1LWJPmPRI7.js → Cf_CToPzxoA-aDXC.js} +1 -1
- package/cdn/assets/{CUMtWe1gZL3FdBOP.js → CohhK26gvXnWe0vC.js} +13 -13
- package/{browser/esm/NZdHbcc4A8aR8z_P.mjs → cdn/assets/Cr99yWq8so0mdyPz.js} +1 -1
- package/cdn/assets/D3HLd70Mn49YtP9N.js +46 -0
- package/{browser/esm/CV0xwwpXwrx7cunJ.mjs → cdn/assets/D4VxZs0rJs1pmmty.js} +1 -1
- package/{browser/esm/BbCFZ7BuAewUhSlf.mjs → cdn/assets/D4lCVoEMnY4LDOe_.js} +1 -1
- package/cdn/assets/{BU_ZNBDdEe3h15pO.js → D5IYfLRDzKD0nNhv.js} +1 -1
- package/{browser/esm/D4aBI8Q1QKmtd08h.mjs → cdn/assets/D8yWaZgP_m305Xdw.js} +1 -1
- package/cdn/assets/{C7nVUBzSXM4b2lzJ.js → DKwtBx9sOuW7Idh0.js} +29066 -27379
- package/{browser/esm/BcmOaJDGlkKqxG2K.mjs → cdn/assets/DQVplFpK9A1EIvdK.js} +1 -1
- package/cdn/assets/{CxkEVmCPEVwHoHVF.js → DZQqkY1-Hu87L5rY.js} +14 -14
- package/cdn/assets/{58CC3MhIh4X10O2i.js → DZX_Xi4lPAJT9N7v.js} +8 -8
- package/{browser/esm/BcLNeDh-zvjwiAPK.mjs → cdn/assets/DfPZoMGjJLY5lNfx.js} +1 -1
- package/cdn/assets/{itUp9Fcd7garj6Ei.js → Dr0c_TBv01wBTYct.js} +1 -1
- package/{browser/esm/CiVx0tO0V_4ToonT.mjs → cdn/assets/DrUhjclyQ_wtu3-o.js} +1 -1
- package/cdn/assets/{C48-m1iFvg6_12Uj.js → DsqPwYh5PBMY_OEg.js} +1 -1
- package/cdn/assets/{C73uvrpgIvKNzNu2.js → EaD0stepDrgc5Mud.js} +2 -2
- package/cdn/assets/{CHmIf1kJ-17F8RFn.js → G6hbORyGPtwXe9ND.js} +1 -1
- package/cdn/assets/R0N6x5jomzsuYzgy.js +49 -0
- package/{browser/esm/Brn_BpM71L-VcKY7.mjs → cdn/assets/WYfqEzPe6bT2pWJJ.js} +1 -1
- package/{browser/esm/Cl6UhQ-Fa_tk1hMT.mjs → cdn/assets/a4tx9NSvCvDgs_PL.js} +1 -1
- package/{browser/esm/DB7KGUAeBmMUb77y.mjs → cdn/assets/ceMU_E2f1UyoBi26.js} +1 -1
- package/cdn/assets/{CUxbeQfR9_P_knx7.js → eO7qOlRPdt3GDVSZ.js} +1 -1
- package/cdn/assets/{DviZK2hYv7CCV-Lx.js → fX1sl5Pyq6NiBpGm.js} +1 -1
- package/cdn/assets/{CNHLfE1ku29awT-p.js → hc-7dPh1zYIOTWeA.js} +1 -1
- package/cdn/assets/{Ctz5ddsRjB0hnLdi.js → uXLogtnMh4dC8M6y.js} +1 -1
- package/cdn/assets/{DFvnp6cQLTr61-R4.js → uyob4I3lZHZmcM_z.js} +1 -1
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
- package/browser/cjs/C93vm3rYb2neksBv.cjs +0 -364
- package/browser/cjs/CBDGjzOcgp6V_pE3.cjs +0 -6
- package/browser/cjs/CfPOTxKsNqeLdQq2.cjs +0 -6
- package/browser/cjs/DV1QGi3oLVrpYy1b.cjs +0 -6
- package/browser/cjs/Ukc3hXVw3jmh1v1o.cjs +0 -6
- package/browser/esm/BUQfPI2iDmXlbLwv.mjs +0 -39
- package/browser/esm/BWSCF1flfPXCBkXM.mjs +0 -49879
- package/browser/esm/DzjvCYfzsqrMiRuY.mjs +0 -20
- package/cdn/assets/B22VKc9MeGgoPERI.js +0 -46
- package/cdn/assets/CvL1mCgI9qA63YoA.js +0 -49
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./C93vm3rYb2neksBv.cjs");function gi(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function Ro(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function Ii(e){var t=e;if(t===void 0){if(typeof navigator>"u"||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function $r(e,t){try{return new RegExp(e,"g").exec(t)}catch{return null}}function Kr(e){return e.replace(/_/g,".")}function Hn(e,t){var n=null,i="-1";return gi(e,function(r){var o,a,s,c=$r("("+r.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!c||r.brand||(n=r,i=c[3]||"-1",r.versionAlias?i=r.versionAlias:r.versionTest&&(o=r.versionTest.toLowerCase(),a=t,s=$r("("+o+")((?:\\/|\\s|:)([0-9|\\.|_]+))",a),i=(s?s[3]:"")||i),i=Kr(i),0))}),{preset:n,version:i}}function fr(e,t){var n={brand:"",version:"-1"};return gi(e,function(i){var r=Fo(t,i);return!!r&&(n.brand=i.id,n.version=i.versionAlias||r.version,n.version!=="-1")}),n}function Fo(e,t){return Ro(e,function(n){var i=n.brand;return $r(""+t.test,i.toLowerCase())})}var Ni=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Yi=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],zr=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Bo=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Wi=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Xi(e){return!!Hn(Bo,e).preset}function Na(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map(function(i){return i.split(" ").map(function(r){return r?""+e+r:""}).join(" ")}).join(" ")}function un(e,t){return function(n){n&&(e[t]=n)}}function Go(e,t,n){return function(i){i&&(e[t][n]=i)}}var vi="undefined",ko=typeof window!==vi,Ya=typeof document!==vi&&document,Wa=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],ee=1e-7,pr={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function Hi(e,t,n,i){return(e*i+t*n)/(n+i)}function mi(e){return typeof e===vi}function qe(e){return e&&typeof e=="object"}function ye(e){return Array.isArray(e)}function On(e){return typeof e=="string"}function Sr(e){return typeof e=="number"}function zo(e){return typeof e=="function"}function Ao(e,t,n,i,r){return Jr(e,t,n)?n:function(o,a,s,c,u){for(var f,p=function(h){var g=a[h].trim();if(g===o.close&&!Jr(o,a,h))return{value:h};var v=h,m=Be(u,function(y){return y.open===g});if(m&&(v=Ao(m,a,h,c,u)),v===-1)return f=h,"break";f=h=v},l=s;l<c;++l){var d=p(l);if(l=f,typeof d=="object")return d.value;if(d==="break")break}return-1}(e,t,n+1,i,r)}function Jr(e,t,n){if(!e.ignore)return null;var i=t.slice(Math.max(n-3,0),n+3).join("");return new RegExp(e.ignore).exec(i)}function bi(e,t){var n=On(t)?{separator:t}:t,i=n.separator,r=i===void 0?",":i,o=n.isSeparateFirst,a=n.isSeparateOnlyOpenClose,s=n.isSeparateOpenClose,c=s===void 0?a:s,u=n.openCloseCharacters,f=u===void 0?Wa:u,p=f.map(function(b){var S=b.open,R=b.close;return S===R?S:S+"|"+R}).join("|"),l=new RegExp("(\\s*"+r+"\\s*|"+p+"|\\s+)","g"),d=e.split(l).filter(function(b){return b&&b!=="undefined"}),h=d.length,g=[],v=[];function m(){return!!v.length&&(g.push(v.join("")),v=[],!0)}for(var y,x=function(b){var S,R,G=d[b].trim(),P=b,D=Be(f,function(F){return F.open===G}),_=Be(f,function(F){return F.close===G});if(D){if((P=Ao(D,d,b,h,f))!==-1&&c)return m()&&o?(y=b,"break"):(g.push(d.slice(b,P+1).join("")),b=P,o?(y=b,"break"):(y=b,"continue"))}else{if(_&&!Jr(_,d,b)){var T=function(){for(var F=0,B=0,O=arguments.length;B<O;B++)F+=arguments[B].length;var I=Array(F),A=0;for(B=0;B<O;B++)for(var W=arguments[B],j=0,N=W.length;j<N;j++,A++)I[A]=W[j];return I}(f);return T.splice(f.indexOf(_),1),{value:bi(e,{separator:r,isSeparateFirst:o,isSeparateOnlyOpenClose:a,isSeparateOpenClose:c,openCloseCharacters:T})}}if(S=G,!(((R=r)!==""&&R!=" "||S!==""&&S!=" ")&&S!==R||a))return m(),o?(y=b,"break"):(y=b,"continue")}P===-1&&(P=h-1),v.push(d.slice(b,P+1).join("")),y=b=P},E=0;E<h;++E){var M=x(E);if(E=y,typeof M=="object")return M.value;if(M==="break")break}return v.length&&g.push(v.join("")),g}function Qn(e){return bi(e,"")}function jn(e){return bi(e,",")}function Rr(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:"",unit:"",value:NaN};var n=t[1],i=t[2];return{prefix:n,unit:t[3],value:parseFloat(i)}}function Mr(){return Date.now?Date.now():new Date().getTime()}function wn(e,t,n){n===void 0&&(n=-1);for(var i=e.length,r=0;r<i;++r)if(t(e[r],r,e))return r;return n}function Be(e,t,n){var i=wn(e,t);return i>-1?e[i]:n}var ji,Li,qi,Io=(ji=Mr(),(Li=ko&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame))?Li.bind(window):function(e){var t=Mr();return setTimeout(function(){e(t-ji)},1e3/60)}),Xa=(qi=ko&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame))?qi.bind(window):function(e){clearTimeout(e)};function tr(e){return Object.keys(e)}function Se(e,t){var n=Rr(e),i=n.value,r=n.unit;if(qe(t)){var o=t[r];if(o){if(zo(o))return o(i);if(pr[r])return pr[r](i,o)}}else if(r==="%")return i*t/100;return pr[r]?pr[r](i):i}function Qr(e,t,n){return Math.max(t,Math.min(e,n))}function Vi(e,t,n,i){return i===void 0&&(i=e[0]/e[1]),[[kt(t[0],ee),kt(t[0]/i,ee)],[kt(t[1]*i,ee),kt(t[1],ee)]].filter(function(r){return r.every(function(o,a){var s=t[a],c=kt(s,ee);return n?o<=s||o<=c:o>=s||o>=c})})[0]||e}function ti(e){for(var t=e.length,n=0,i=t-1;i>=0;--i)n+=e[i];return t?n/t:0}function Fe(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=Math.atan2(i,n);return r>=0?r:r+2*Math.PI}function Ui(e){var t,n=(t=e,[0,1].map(function(o){return ti(t.map(function(a){return a[o]}))})),i=Fe(n,e[0]),r=Fe(n,e[1]);return i<r&&r-i<Math.PI||i>r&&r-i<-Math.PI?1:-1}function Ln(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function kt(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}function Zi(e,t){return e.forEach(function(n,i){e[i]=kt(e[i],t)}),e}function We(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function No(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Yo(e,t){if(e.classList)e.classList.remove(t);else{var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function ge(e,t,n,i){e.addEventListener(t,n,i)}function fe(e,t,n,i){e.removeEventListener(t,n,i)}function xi(e){return e?.ownerDocument||Ya}function yi(e){return xi(e).documentElement}function en(e){return xi(e).body}function Qe(e){var t;return((t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView)||window}function Wo(e){return e&&"postMessage"in e&&"blur"in e&&"self"in e}function Ei(e){return qe(e)&&e.nodeName&&e.nodeType&&"ownerDocument"in e}function Ha(e,t,n,i,r,o){for(var a=0;a<r;++a){var s=n+a*r,c=i+a*r;e[s]+=e[c]*o,t[s]+=t[c]*o}}function ja(e,t,n,i,r){for(var o=0;o<r;++o){var a=n+o*r,s=i+o*r,c=e[a],u=t[a];e[a]=e[s],e[s]=c,t[a]=t[s],t[s]=u}}function La(e,t,n,i,r){for(var o=0;o<i;++o){var a=n+o*i;e[a]/=r,t[a]/=r}}function cn(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=e.slice(),i=Wt(t),r=0;r<t;++r){var o=t*r+r;if(!kt(n[o],ee)){for(var a=r+1;a<t;++a)if(n[t*r+a]){ja(n,i,r,a,t);break}}if(!kt(n[o],ee))return[];for(La(n,i,r,t,n[o]),a=0;a<t;++a){var s=a,c=n[a+r*t];kt(c,ee)&&r!==a&&Ha(n,i,s,r,t,-c)}}return i}function or(e,t){for(var n=e.slice(),i=e.length;i<t-1;++i)n[i]=0;return n[t-1]=1,n}function ln(e,t,n){if(t===void 0&&(t=Math.sqrt(e.length)),t===n)return e;for(var i=Wt(n),r=Math.min(t,n),o=0;o<r-1;++o){for(var a=0;a<r-1;++a)i[o*n+a]=e[o*t+a];i[(o+1)*n-1]=e[(o+1)*t-1],i[(n-1)*n+o]=e[(t-1)*t+o]}return i[n*n-1]=e[t*t-1],i}function wr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Wt(e);return t.forEach(function(r){i=ie(i,r,e)}),i}function ie(e,t,n){n===void 0&&(n=Math.sqrt(e.length));var i=[],r=e.length/n,o=t.length/r;if(!r)return t;if(!o)return e;for(var a=0;a<n;++a)for(var s=0;s<o;++s){i[s*n+a]=0;for(var c=0;c<r;++c)i[s*n+a]+=e[c*n+a]*t[s*r+c]}return i}function Ut(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]+t[r];return i}function ct(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]-t[r];return i}function qa(e,t){return t===void 0&&(t=e.length===6),t?[e[0],e[1],0,e[2],e[3],0,e[4],e[5],1]:e}function Xo(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function ze(e,t,n){n===void 0&&(n=t.length);var i=ie(e,t,n),r=i[n-1];return i.map(function(o){return o/r})}function Va(e,t){return ie(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function Ua(e,t){return ie(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function Za(e,t){return ie(e,Fr(t,4))}function dr(e,t){var n=t[0],i=n===void 0?1:n,r=t[1],o=r===void 0?1:r,a=t[2];return ie(e,[i,0,0,0,0,o,0,0,0,0,a===void 0?1:a,0,0,0,0,1],4)}function Ar(e,t){var n=t[0],i=n===void 0?0:n,r=t[1],o=r===void 0?0:r,a=t[2];return ie(e,[1,0,0,0,0,1,0,0,0,0,1,0,i,o,a===void 0?0:a,1],4)}function $i(e,t){return ie(e,t,4)}function Fr(e,t){var n=Math.cos(e),i=Math.sin(e),r=Wt(t);return r[0]=n,r[1]=i,r[t]=-i,r[t+1]=n,r}function Wt(e){for(var t=e*e,n=[],i=0;i<t;++i)n[i]=i%(e+1)?0:1;return n}function Ho(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[(t+1)*r]=e[r];return n}function fn(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[t*(t-1)+r]=e[r];return n}function jo(e,t,n,i,r,o,a,s){var c=e[0],u=e[1],f=t[0],p=t[1],l=n[0],d=n[1],h=i[0],g=i[1],v=r[0],m=r[1],y=o[0],x=o[1],E=a[0],M=a[1],b=s[0],S=s[1],R=cn([c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,0,0,c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,-v*c,-m*c,-y*f,-x*f,-E*l,-M*l,-b*h,-S*h,-v*u,-m*u,-y*p,-x*p,-E*d,-M*d,-b*g,-S*g],8);if(!R.length)return[];var G=ie(R,[v,m,y,x,E,M,b,S],8);return G[8]=1,ln(function(P,D){D===void 0&&(D=Math.sqrt(P.length));for(var _=[],T=0;T<D;++T)for(var F=0;F<D;++F)_[F*D+T]=P[D*T+F];return _}(G),3,4)}var qn=function(){return qn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},qn.apply(this,arguments)};function Si(e,t){return t===void 0&&(t=0),gn(Cn(e,t))}function gn(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(n){var i=n.matrixFunction,r=n.functionValue;i&&(t=i(t,r))}),t}function Cn(e,t){return t===void 0&&(t=0),(ye(e)?e:Qn(e)).map(function(n){var i,r=!(i=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n))||i.length<4?{}:{prefix:i[1],value:i[2],suffix:i[3]},o=r.prefix,a=r.value,s=null,c=o,u="";if(o==="translate"||o==="translateX"||o==="translate3d"){var f=qe(t)?qn(qn({},t),{"o%":t["%"]}):{"%":t,"o%":t},p=jn(a).map(function(G,P){return f["%"]=P===0&&"x%"in f?t["x%"]:P===1&&"y%"in f?t["y%"]:t["o%"],Se(G,f)}),l=p[0],d=p[1],h=d===void 0?0:d,g=p[2];s=Ar,u=[l,h,g===void 0?0:g]}else if(o==="translateY")s=Ar,u=[0,h=Se(a,qe(t)?qn({"%":t["y%"]},t):{"%":t}),0];else if(o==="translateZ")s=Ar,u=[0,0,parseFloat(a)];else if(o==="scale"||o==="scale3d"){var v=jn(a).map(function(G){return parseFloat(G)}),m=v[0],y=v[1],x=y===void 0?m:y,E=v[2];s=dr,u=[m,x,E===void 0?1:E]}else if(o==="scaleX")s=dr,u=[m=parseFloat(a),1,1];else if(o==="scaleY")s=dr,u=[1,x=parseFloat(a),1];else if(o==="scaleZ")s=dr,u=[1,1,parseFloat(a)];else if(o==="rotate"||o==="rotateZ"||o==="rotateX"||o==="rotateY"){var M=Rr(a),b=M.unit,S=M.value;o==="rotate"||o==="rotateZ"?(c="rotateZ",s=Za):o==="rotateX"?s=Va:o==="rotateY"&&(s=Ua),u=b==="rad"?S:S*Math.PI/180}else if(o==="matrix3d")s=$i,u=jn(a).map(function(G){return parseFloat(G)});else if(o==="matrix"){var R=jn(a).map(function(G){return parseFloat(G)});s=$i,u=[R[0],R[1],0,0,R[2],R[3],0,0,0,0,1,0,R[4],R[5],0,1]}else c="";return{name:o,functionName:c,value:a,matrixFunction:s,functionValue:u}})}var $a=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(n){return this.values[this.keys.indexOf(n)]},t.set=function(n,i){var r=this.keys,o=this.values,a=r.indexOf(n),s=a===-1?r.length:a;r[s]=n,o[s]=i},e}(),Ka=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(n){return this.object[n]},t.set=function(n,i){this.object[n]=i},e}(),Ja=typeof Map=="function",Qa=function(){function e(){}var t=e.prototype;return t.connect=function(n,i){this.prev=n,this.next=i,n&&(n.next=this),i&&(i.prev=this)},t.disconnect=function(){var n=this.prev,i=this.next;n&&(n.next=i),i&&(i.prev=n)},t.getIndex=function(){for(var n=this,i=-1;n;)n=n.prev,++i;return i},e}(),ts=function(){function e(n,i,r,o,a,s,c,u){this.prevList=n,this.list=i,this.added=r,this.removed=o,this.changed=a,this.maintained=s,this.changedBeforeAdded=c,this.fixed=u}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var n,i,r,o,a=(n=this.changedBeforeAdded,i=this.fixed,r=[],o=[],n.forEach(function(u){var f=u[0],p=u[1],l=new Qa;r[f]=l,o[p]=l}),r.forEach(function(u,f){u.connect(r[f-1])}),n.filter(function(u,f){return!i[f]}).map(function(u,f){var p=u[0],l=u[1];if(p===l)return[0,0];var d=r[p],h=o[l-1],g=d.getIndex();return d.disconnect(),h?d.connect(h,h.next):d.connect(void 0,r[0]),[g,d.getIndex()]})),s=this.changed,c=[];this.cacheOrdered=a.filter(function(u,f){var p=u[0],l=u[1],d=s[f],h=d[0],g=d[1];if(p!==l)return c.push([h,g]),!0}),this.cachePureChanged=c},e}();function Lo(e,t,n){var i=Ja?Map:n?Ka:$a,r=n||function(y){return y},o=[],a=[],s=[],c=e.map(r),u=t.map(r),f=new i,p=new i,l=[],d=[],h={},g=[],v=0,m=0;return c.forEach(function(y,x){f.set(y,x)}),u.forEach(function(y,x){p.set(y,x)}),c.forEach(function(y,x){var E=p.get(y);E===void 0?(++m,a.push(x)):h[E]=m}),u.forEach(function(y,x){var E=f.get(y);E===void 0?(o.push(x),++v):(s.push([E,x]),m=h[x]||0,l.push([E-m,x-v]),d.push(x===E),E!==x&&g.push([E,x]))}),a.reverse(),new ts(e,t,o,a,g,s,l,d)}var Ki,es=function(){function e(t,n){t===void 0&&(t=[]),this.findKeyCallback=n,this.list=[].slice.call(t)}return e.prototype.update=function(t){var n=[].slice.call(t),i=Lo(this.list,n,this.findKeyCallback);return this.list=n,i},e}(),qo=function(e,t){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},ns=typeof Map=="function"?void 0:(Ki=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++Ki)}),Vo=function(e){function t(n){return n===void 0&&(n=[]),e.call(this,n,ns)||this}return function(n,i){function r(){this.constructor=n}qo(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t}(es),ei=function(){return ei=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ei.apply(this,arguments)},Uo=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(n,i){if(qe(n))for(var r in n)this.on(r,n[r]);else this._addEvent(n,i,{});return this},t.off=function(n,i){if(n)if(qe(n))for(var r in n)this.off(r);else if(i){var o=this._events[n];if(o){var a=wn(o,function(s){return s.listener===i});a>-1&&o.splice(a,1)}}else this._events[n]=[];else this._events={};return this},t.once=function(n,i){var r=this;return i&&this._addEvent(n,i,{once:!0}),new Promise(function(o){r._addEvent(n,o,{once:!0})})},t.emit=function(n,i){var r=this;i===void 0&&(i={});var o=this._events[n];if(!n||!o)return!0;var a=!1;return i.eventType=n,i.stop=function(){a=!0},i.currentTarget=this,function(){for(var s=0,c=0,u=arguments.length;c<u;c++)s+=arguments[c].length;var f=Array(s),p=0;for(c=0;c<u;c++)for(var l=arguments[c],d=0,h=l.length;d<h;d++,p++)f[p]=l[d];return f}(o).forEach(function(s){s.listener(i),s.once&&r.off(n,s.listener)}),!a},t.trigger=function(n,i){return i===void 0&&(i={}),this.emit(n,i)},t._addEvent=function(n,i,r){var o=this._events;o[n]=o[n]||[],o[n].push(ei({listener:i},r))},e}();function Ee(e){return kt(e,ee)}function Ji(e){return e.length<3?0:Math.abs(function(t){for(var n=0,i=t.length-1;i>=0;--i)n+=t[i];return n}(e.map(function(t,n){var i=e[n+1]||e[0];return t[0]*i[1]-i[0]*t[1]})))/2}function Qi(e,t){var n=t.width,i=t.height,r=t.left,o=t.top,a=yn(e),s=a.minX,c=a.minY,u=a.maxX,f=a.maxY,p=n/(u-s),l=i/(f-c);return e.map(function(d){return[r+(d[0]-s)*p,o+(d[1]-c)*l]})}function yn(e){var t=e.map(function(i){return i[0]}),n=e.map(function(i){return i[1]});return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,n),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,n)}}function Ir(e,t,n){var i=e[0],r=e[1],o=yn(t),a=o.minX,s=o.maxX,c=[[a,r],[s,r]],u=Cr(c[0],c[1]),f=ni(t),p=[];if(f.forEach(function(h){var g,v=Cr(h[0],h[1]),m=h[0];g=v,u.every(function(y,x){return Ee(y-g[x])===0})?p.push({pos:e,line:h,type:"line"}):Zo(Di(u,v),[c,h]).forEach(function(y){h.some(function(x){return M=y,!Ee((E=x)[0]-M[0])&&!Ee(E[1]-M[1]);var E,M})?p.push({pos:y,line:h,type:"point"}):Ee(m[1]-r)!==0&&p.push({pos:y,line:h,type:"intersection"})})}),Be(p,function(h){return h[0]===i}))return!0;var l=0,d={};return p.forEach(function(h){var g=h.pos,v=h.type,m=h.line;if(!(g[0]>i))if(v==="intersection")++l;else{if(v==="line")return;if(v==="point"){var y=Be(m,function(M){return M[1]!==r}),x=d[g[0]],E=y[1]>r?1:-1;x?x!==E&&++l:d[g[0]]=E}}}),l%2==1}function Cr(e,t){var n=e[0],i=e[1],r=t[0]-n,o=t[1]-i;Math.abs(r)<ee&&(r=0),Math.abs(o)<ee&&(o=0);var a=0,s=0,c=0;return r?o?(s=1,c=-(a=-o/r)*n-i):(s=1,c=-i):o&&(a=-1,c=n),[a,s,c]}function Di(e,t){var n=e[0],i=e[1],r=e[2],o=t[0],a=t[1],s=t[2],c=n===0&&o===0,u=i===0&&a===0,f=[];if(c&&u)return[];if(c){var p=-r/i;return p!==-s/a?[]:[[-1/0,p],[1/0,p]]}if(u){var l=-r/n;return l!==-s/o?[]:[[l,-1/0],[l,1/0]]}if(n===0)f=[[d=-(a*(h=-r/i)+s)/o,h]];else if(o===0)f=[[d=-(i*(h=-s/a)+r)/n,h]];else if(i===0)f=[[d=-r/n,h=-(o*d+s)/a]];else if(a===0)f=[[d=-s/o,h=-(n*d+r)/i]];else{var d,h;f=[[d=(i*s-a*r)/(a*n-i*o),h=-(n*d+r)/i]]}return f.map(function(g){return[g[0],g[1]]})}function Zo(e,t){var n=t.map(function(p){return[0,1].map(function(l){return[Math.min(p[0][l],p[1][l]),Math.max(p[0][l],p[1][l])]})}),i=[];if(e.length===2){var r=e[0],o=r[0],a=r[1];if(Ee(o-e[1][0])){if(!Ee(a-e[1][1])){var s=Math.max.apply(Math,n.map(function(p){return p[0][0]})),c=Math.min.apply(Math,n.map(function(p){return p[0][1]}));if(Ee(s-c)>0)return[];i=[[s,a],[c,a]]}}else{var u=Math.max.apply(Math,n.map(function(p){return p[1][0]})),f=Math.min.apply(Math,n.map(function(p){return p[1][1]}));if(Ee(u-f)>0)return[];i=[[o,u],[o,f]]}}return i.length||(i=e.filter(function(p){var l=p[0],d=p[1];return n.every(function(h){return 0<=Ee(l-h[0][0])&&0<=Ee(h[0][1]-l)&&0<=Ee(d-h[1][0])&&0<=Ee(h[1][1]-d)})})),i.map(function(p){return[Ee(p[0]),Ee(p[1])]})}function ni(e){return function(){for(var t=0,n=0,i=arguments.length;n<i;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<i;n++)for(var a=arguments[n],s=0,c=a.length;s<c;s++,o++)r[o]=a[s];return r}(e.slice(1),[e[0]]).map(function(t,n){return[e[n],t]})}var $o=function(e,t){return($o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},te=function(){return te=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},te.apply(this,arguments)};function Nr(e){return 180*(t=[e[0].clientX,e[0].clientY],i=(n=[e[1].clientX,e[1].clientY])[0]-t[0],r=n[1]-t[1],((o=Math.atan2(r,i))>=0?o:o+2*Math.PI)/Math.PI);var t,n,i,r,o}function hr(e){return e?e.touches?function(t){for(var n=Math.min(t.length,2),i=[],r=0;r<n;++r)i.push(eo(t[r]));return i}(e.touches):[eo(e)]:[]}function to(e,t,n){var i=n.length,r=Vn(e,i),o=r.clientX,a=r.clientY,s=r.originalClientX,c=r.originalClientY,u=Vn(t,i),f=u.clientX,p=u.clientY,l=Vn(n,i);return{clientX:s,clientY:c,deltaX:o-f,deltaY:a-p,distX:o-l.clientX,distY:a-l.clientY}}function Yr(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function eo(e){return{clientX:e.clientX,clientY:e.clientY}}function Vn(e,t){t===void 0&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},i=Math.min(e.length,t),r=0;r<i;++r){var o=e[r];n.originalClientX+="originalClientX"in o?o.originalClientX:o.clientX,n.originalClientY+="originalClientY"in o?o.originalClientY:o.clientY,n.clientX+=o.clientX,n.clientY+=o.clientY}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var Wr=function(){function e(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return e.prototype.getAngle=function(t){return t===void 0&&(t=this.prevClients),Nr(t)},e.prototype.getRotation=function(t){return t===void 0&&(t=this.prevClients),Nr(t)-Nr(this.startClients)},e.prototype.getPosition=function(t,n){t===void 0&&(t=this.prevClients);var i=to(t||this.prevClients,this.prevClients,this.startClients),r=i.deltaX,o=i.deltaY;return this.movement+=Math.sqrt(r*r+o*o),this.prevClients=t,i},e.prototype.getPositions=function(t){t===void 0&&(t=this.prevClients);for(var n=this.prevClients,i=this.startClients,r=Math.min(this.length,n.length),o=[],a=0;a<r;++a)o[a]=to([t[a]],[n[a]],[i[a]]);return o},e.prototype.getMovement=function(t){var n=this.movement;if(!t)return n;var i=Vn(t,this.length),r=Vn(this.prevClients,this.length),o=i.clientX-r.clientX,a=i.clientY-r.clientY;return Math.sqrt(o*o+a*a)+n},e.prototype.getDistance=function(t){return t===void 0&&(t=this.prevClients),Yr(t)},e.prototype.getScale=function(t){return t===void 0&&(t=this.prevClients),Yr(t)/Yr(this.startClients)},e.prototype.move=function(t,n){this.startClients.forEach(function(i){i.clientX-=t,i.clientY-=n}),this.prevClients.forEach(function(i){i.clientX-=t,i.clientY-=n})},e}(),no=["textarea","input"],rs=function(e){function t(n,i){i===void 0&&(i={});var r=e.call(this)||this;r.options={},r.flag=!1,r.pinchFlag=!1,r.data={},r.isDrag=!1,r.isPinch=!1,r.clientStores=[],r.targets=[],r.prevTime=0,r.doubleFlag=!1,r._useMouse=!1,r._useTouch=!1,r._useDrag=!1,r._dragFlag=!1,r._isTrusted=!1,r._isMouseEvent=!1,r._isSecondaryButton=!1,r._preventMouseEvent=!1,r._prevInputEvent=null,r._isDragAPI=!1,r._isIdle=!0,r._preventMouseEventId=0,r._window=window,r.onDragStart=function(l,d){if(d===void 0&&(d=!0),r.flag||l.cancelable!==!1){var h=l.type.indexOf("drag")>=-1;if(!r.flag||!h){r._isDragAPI=!0;var g=r.options,v=g.container,m=g.pinchOutside,y=g.preventWheelClick,x=g.preventRightClick,E=g.preventDefault,M=g.checkInput,b=g.dragFocusedInput,S=g.preventClickEventOnDragStart,R=g.preventClickEventOnDrag,G=g.preventClickEventByCondition,P=r._useTouch,D=!r.flag;if(r._isSecondaryButton=l.which===3||l.button===2,y&&(l.which===2||l.button===1)||x&&(l.which===3||l.button===2))return r.stop(),!1;if(D){var _=r._window.document.activeElement,T=l.target;if(T){var F=T.tagName.toLowerCase(),B=no.indexOf(F)>-1,O=T.isContentEditable;if(B||O){if(M||!b&&_===T)return!1;if(_&&(_===T||O&&_.isContentEditable&&_.contains(T))){if(!b)return!1;T.blur()}}else if((E||l.type==="touchstart")&&_){var I=_.tagName.toLowerCase();(_.isContentEditable||no.indexOf(I)>-1)&&_.blur()}(S||R||G)&&ge(r._window,"click",r._onClick,!0)}r.clientStores=[new Wr(hr(l))],r._isIdle=!1,r.flag=!0,r.isDrag=!1,r._isTrusted=d,r._dragFlag=!0,r._prevInputEvent=l,r.data={},r.doubleFlag=Mr()-r.prevTime<200,r._isMouseEvent=(j=l)&&(j.type.indexOf("mouse")>-1||"button"in j),!r._isMouseEvent&&r._preventMouseEvent&&r._allowMouseEvent(),(r._preventMouseEvent||r.emit("dragStart",te(te({data:r.data,datas:r.data,inputEvent:l,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,isTrusted:d,isDouble:r.doubleFlag},r.getCurrentStore().getPosition()),{preventDefault:function(){l.preventDefault()},preventDrag:function(){r._dragFlag=!1}})))===!1&&r.stop(),r._isMouseEvent&&r.flag&&E&&l.preventDefault()}if(!r.flag)return!1;var A=0;if(D?(r._attchDragEvent(),P&&m&&(A=setTimeout(function(){ge(v,"touchstart",r.onDragStart,{passive:!1})}))):P&&m&&fe(v,"touchstart",r.onDragStart),r.flag&&(W=l).touches&&W.touches.length>=2){if(clearTimeout(A),D&&l.touches.length!==l.changedTouches.length)return;r.pinchFlag||r.onPinchStart(l)}}}var W,j},r.onDrag=function(l,d){if(r.flag){var h=r.options.preventDefault;!r._isMouseEvent&&h&&l.preventDefault(),r._prevInputEvent=l;var g=hr(l),v=r.moveClients(g,l,!1);if(r._dragFlag){if((r.pinchFlag||v.deltaX||v.deltaY)&&(r._preventMouseEvent||r.emit("drag",te(te({},v),{isScroll:!!d,inputEvent:l})))===!1)return void r.stop();r.pinchFlag&&r.onPinch(l,g)}r.getCurrentStore().getPosition(g,!0)}},r.onDragEnd=function(l){if(r.flag){var d=r.options,h=d.pinchOutside,g=d.container,v=d.preventClickEventOnDrag,m=d.preventClickEventOnDragStart,y=d.preventClickEventByCondition,x=r.isDrag;(v||m||y)&&requestAnimationFrame(function(){r._allowClickEvent()}),y||m||!v||x||r._allowClickEvent(),r._useTouch&&h&&fe(g,"touchstart",r.onDragStart),r.pinchFlag&&r.onPinchEnd(l);var E=l?.touches?hr(l):[];E.length!==0&&r.options.keepDragging?r._addStore(new Wr(E)):r.flag=!1;var M=r._getPosition(),b=Mr(),S=!x&&r.doubleFlag;r._prevInputEvent=null,r.prevTime=x||S?0:b,r.flag||(r._dettachDragEvent(),r._preventMouseEvent||r.emit("dragEnd",te({data:r.data,datas:r.data,isDouble:S,isDrag:x,isClick:!x,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,inputEvent:l,isTrusted:r._isTrusted},M)),r.clientStores=[],r._isMouseEvent||(r._preventMouseEvent=!0,clearTimeout(r._preventMouseEventId),r._preventMouseEventId=setTimeout(function(){r._preventMouseEvent=!1},200)),r._isIdle=!0)}},r.onBlur=function(){r.onDragEnd()},r._allowClickEvent=function(){fe(r._window,"click",r._onClick,!0)},r._onClick=function(l){r._allowClickEvent(),r._allowMouseEvent();var d=r.options.preventClickEventByCondition;d?.(l)||(l.stopPropagation(),l.preventDefault())},r._onContextMenu=function(l){r.options.preventRightClick?r.onDragEnd(l):l.preventDefault()},r._passCallback=function(){};var o=[].concat(n),a=o[0];r._window=Wo(a)?a:Qe(a),r.options=te({checkInput:!1,container:a&&!("document"in a)?Qe(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},i);var s=r.options,c=s.container,u=s.events,f=s.checkWindowBlur;if(r._useDrag=u.indexOf("drag")>-1,r._useTouch=u.indexOf("touch")>-1,r._useMouse=u.indexOf("mouse")>-1,r.targets=o,r._useDrag&&o.forEach(function(l){ge(l,"dragstart",r.onDragStart)}),r._useMouse&&(o.forEach(function(l){ge(l,"mousedown",r.onDragStart),ge(l,"mousemove",r._passCallback)}),ge(c,"contextmenu",r._onContextMenu)),f&&ge(Qe(),"blur",r.onBlur),r._useTouch){var p={passive:!1};o.forEach(function(l){ge(l,"touchstart",r.onDragStart,p),ge(l,"touchmove",r._passCallback,p)})}return r}return function(n,i){function r(){this.constructor=n}$o(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},t.prototype.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(i,r){return i+r.movement},0)},t.prototype.isDragging=function(){return this.isDrag},t.prototype.isIdle=function(){return this._isIdle},t.prototype.isFlag=function(){return this.flag},t.prototype.isPinchFlag=function(){return this.pinchFlag},t.prototype.isDoubleFlag=function(){return this.doubleFlag},t.prototype.isPinching=function(){return this.isPinch},t.prototype.scrollBy=function(n,i,r,o){o===void 0&&(o=!0),this.flag&&(this.clientStores[0].move(n,i),o&&this.onDrag(r,!0))},t.prototype.move=function(n,i){var r=n[0],o=n[1],a=this.getCurrentStore().prevClients;return this.moveClients(a.map(function(s){var c=s.clientX,u=s.clientY;return{clientX:c+r,clientY:u+o,originalClientX:c,originalClientY:u}}),i,!0)},t.prototype.triggerDragStart=function(n){this.onDragStart(n,!1)},t.prototype.setEventData=function(n){var i=this.data;for(var r in n)i[r]=n[r];return this},t.prototype.setEventDatas=function(n){return this.setEventData(n)},t.prototype.getCurrentEvent=function(n){return n===void 0&&(n=this._prevInputEvent),te(te({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},t.prototype.getEventData=function(){return this.data},t.prototype.getEventDatas=function(){return this.data},t.prototype.unset=function(){var n=this,i=this.targets,r=this.options.container;this.off(),fe(this._window,"blur",this.onBlur),this._useDrag&&i.forEach(function(o){fe(o,"dragstart",n.onDragStart)}),this._useMouse&&(i.forEach(function(o){fe(o,"mousedown",n.onDragStart)}),fe(r,"contextmenu",this._onContextMenu)),this._useTouch&&(i.forEach(function(o){fe(o,"touchstart",n.onDragStart)}),fe(r,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},t.prototype.onPinchStart=function(n){var i=this,r=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>r)){var o=new Wr(hr(n));this.pinchFlag=!0,this._addStore(o),this.emit("pinchStart",te(te({data:this.data,datas:this.data,angle:o.getAngle(),touches:this.getCurrentStore().getPositions()},o.getPosition()),{inputEvent:n,isTrusted:this._isTrusted,preventDefault:function(){n.preventDefault()},preventDrag:function(){i._dragFlag=!1}}))===!1&&(this.pinchFlag=!1)}},t.prototype.onPinch=function(n,i){if(this.flag&&this.pinchFlag&&!(i.length<2)){var r=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",te(te({data:this.data,datas:this.data,movement:this.getMovement(i),angle:r.getAngle(i),rotation:r.getRotation(i),touches:r.getPositions(i),scale:r.getScale(i),distance:r.getDistance(i)},r.getPosition(i)),{inputEvent:n,isTrusted:this._isTrusted}))}},t.prototype.onPinchEnd=function(n){if(this.pinchFlag){var i=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var r=this.getCurrentStore();this.emit("pinchEnd",te(te({data:this.data,datas:this.data,isPinch:i,touches:r.getPositions()},r.getPosition()),{inputEvent:n}))}},t.prototype.getCurrentStore=function(){return this.clientStores[0]},t.prototype.moveClients=function(n,i,r){var o=this._getPosition(n,r),a=this.isDrag;(o.deltaX||o.deltaY)&&(this.isDrag=!0);var s=!1;return!a&&this.isDrag&&(s=!0),te(te({data:this.data,datas:this.data},o),{movement:this.getMovement(n),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:i,isTrusted:this._isTrusted,isFirstDrag:s})},t.prototype._addStore=function(n){this.clientStores.splice(0,0,n)},t.prototype._getPosition=function(n,i){var r=this.getCurrentStore().getPosition(n,i),o=this.clientStores.slice(1).reduce(function(c,u){var f=u.getPosition();return c.distX+=f.distX,c.distY+=f.distY,c},r),a=o.distX,s=o.distY;return te(te({},r),{distX:a,distY:s})},t.prototype._attchDragEvent=function(){var n=this._window,i=this.options.container,r={passive:!1};this._isDragAPI&&(ge(i,"dragover",this.onDrag,r),ge(n,"dragend",this.onDragEnd)),this._useMouse&&(ge(i,"mousemove",this.onDrag),ge(n,"mouseup",this.onDragEnd)),this._useTouch&&(ge(i,"touchmove",this.onDrag,r),ge(n,"touchend",this.onDragEnd,r),ge(n,"touchcancel",this.onDragEnd,r))},t.prototype._dettachDragEvent=function(){var n=this._window,i=this.options.container;this._isDragAPI&&(fe(i,"dragover",this.onDrag),fe(n,"dragend",this.onDragEnd)),this._useMouse&&(fe(i,"mousemove",this.onDrag),fe(n,"mouseup",this.onDragEnd)),this._useTouch&&(fe(i,"touchstart",this.onDragStart),fe(i,"touchmove",this.onDrag),fe(n,"touchend",this.onDragEnd),fe(n,"touchcancel",this.onDragEnd))},t.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},t}(Uo),ri=function(){return ri=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ri.apply(this,arguments)};function Ko(e,t){var n=function(r){var o="rCS"+function(a){for(var s=5381,c=a.length;c;)s=33*s^a.charCodeAt(--c);return s>>>0}(r).toString(36);return{className:o,inject:function(a,s){s===void 0&&(s={});var c,u,f,p,l,d,h,g,v=function(x){if(x&&x.getRootNode){var E=x.getRootNode();if(E.nodeType===11)return E}}(a),m=(v||a.ownerDocument||document).querySelector('style[data-styled-id="'.concat(o,'"]'));if(m){var y=parseFloat(m.getAttribute("data-styled-count"))||0;m.setAttribute("data-styled-count","".concat(y+1))}else c=o,u=r,f=s,p=v,(g=(h=xi(a)).createElement("style")).setAttribute("type","text/css"),g.setAttribute("data-styled-id",c),g.setAttribute("data-styled-count","1"),f.nonce&&g.setAttribute("nonce",f.nonce),g.innerHTML=(l=c,d=u,f.original?d:d.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(x,E){var M=E.trim();return(M?jn(M):[""]).map(function(b){var S=b.trim();return S.indexOf("@")===0?S:S.indexOf(":global")>-1?S.replace(/\:global/g,""):S.indexOf(":host")>-1?"".concat(S.replace(/\:host/g,".".concat(l))):S?".".concat(l," ").concat(S):".".concat(l)}).join(", ")+" {"})),(p||h.head||h.body).appendChild(g),m=g;return{destroy:function(){var x,E=parseFloat(m.getAttribute("data-styled-count"))||0;E<=1?(m.remove?m.remove():(x=m.parentNode)===null||x===void 0||x.removeChild(m),m=null):m.setAttribute("data-styled-count","".concat(E-1))}}}}}(t),i=n.className;return xe.reactExports.forwardRef(function(r,o){var a=r.className,s=a===void 0?"":a;r.cspNonce;var c=function(f,p){var l={};for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&p.indexOf(d)<0&&(l[d]=f[d]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(d=Object.getOwnPropertySymbols(f);h<d.length;h++)p.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(f,d[h])&&(l[d[h]]=f[d[h]])}return l}(r,["className","cspNonce"]),u=xe.reactExports.useRef();return xe.reactExports.useImperativeHandle(o,function(){return u.current},[]),xe.reactExports.useEffect(function(){var f=n.inject(u.current,{nonce:r.cspNonce});return function(){f.destroy()}},[]),xe.reactExports.createElement(e,ri({ref:u,"data-styled-id":i,className:"".concat(s," ").concat(i)},c))})}var Jo=function(e,t){return(Jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])})(e,t)};function ar(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Jo(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var w=function(){return w=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},w.apply(this,arguments)};function C(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function L(e,t,n){if(arguments.length===2)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function er(e,t){return w({events:[],props:[],name:e},t)}var ro,io,is=["n","w","s","e"],Mi=["n","w","s","e","nw","ne","sw","se"],Pn=function(){if(typeof navigator>"u"||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(){var e=navigator.userAgentData,t=(e.uaList||e.brands).slice(),n=e.mobile||!1,i=t[0],r=(e.platform||navigator.platform).toLowerCase(),o={name:i.brand,version:i.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!fr(Bo,t).brand||Xi(Ii())},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&gi(zr,function(p){return Fo(t,p)});var s=fr(Yi,t);if(o.chromium=!!s.brand,o.chromiumVersion=s.version||"-1",!o.chromium){var c=fr(zr,t);o.webkit=!!c.brand,o.webkitVersion=c.version||"-1"}var u=Ro(Wi,function(p){return new RegExp(""+p.test,"g").exec(r)});a.name=u?u.id:"";var f=fr(Ni,t);return o.name=f.brand||o.name,o.version=(f.brand,f.version),o.webkit&&(a.name=n?"ios":"mac"),a.name==="ios"&&o.webview&&(o.version="-1"),a.version=Kr(a.version),o.version=Kr(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:n,isHints:!0}}():function(){var e=Ii(void 0),t=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:Xi(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=Hn(Ni,e),o=r.preset,a=r.version,s=Hn(Wi,e),c=s.preset,u=s.version,f=Hn(Yi,e);if(n.chromium=!!f.preset,n.chromiumVersion=f.version,!n.chromium){var p=Hn(zr,e);n.webkit=!!p.preset,n.webkitVersion=p.version}return c&&(i.name=c.id,i.version=u,i.majorVersion=parseInt(u,10)),o&&(n.name=o.id,n.version=a,n.webview&&i.name==="ios"&&n.name!=="safari"&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:t,isHints:!1}}(),Qo=Pn.browser.webkit,ta=Qo&&(ro=typeof window>"u"?{userAgent:""}:window.navigator,!!(io=/applewebkit\/([^\s]+)/g.exec(ro.userAgent.toLowerCase()))&&parseFloat(io[1])<605),ea=Pn.browser.name,na=parseInt(Pn.browser.version,10),os=ea==="chrome",as=Pn.browser.chromium,ss=parseInt(Pn.browser.chromiumVersion,10)||0,us=os&&na>=109||as&&ss>=109,cs=ea==="firefox",ls=parseInt(Pn.browser.webkitVersion,10)>=612||na>=15,wi="moveable-",fs=Mi.map(function(e){var t="",n="",i="center",r="center",o="calc(var(--moveable-control-padding, 20) * -1px)";return e.indexOf("n")>-1&&(t="top: ".concat(o,";"),r="bottom"),e.indexOf("s")>-1&&(t="top: 0px;",r="top"),e.indexOf("w")>-1&&(n="left: ".concat(o,";"),i="right"),e.indexOf("e")>-1&&(n="left: 0px;",i="left"),'.around-control[data-direction*="'.concat(e,`"] {
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./ErnqKHol6IQv1dtF.cjs");function gi(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function Ro(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function Ii(e){var t=e;if(t===void 0){if(typeof navigator>"u"||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function $r(e,t){try{return new RegExp(e,"g").exec(t)}catch{return null}}function Kr(e){return e.replace(/_/g,".")}function Hn(e,t){var n=null,i="-1";return gi(e,function(r){var o,a,s,c=$r("("+r.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!c||r.brand||(n=r,i=c[3]||"-1",r.versionAlias?i=r.versionAlias:r.versionTest&&(o=r.versionTest.toLowerCase(),a=t,s=$r("("+o+")((?:\\/|\\s|:)([0-9|\\.|_]+))",a),i=(s?s[3]:"")||i),i=Kr(i),0))}),{preset:n,version:i}}function fr(e,t){var n={brand:"",version:"-1"};return gi(e,function(i){var r=Fo(t,i);return!!r&&(n.brand=i.id,n.version=i.versionAlias||r.version,n.version!=="-1")}),n}function Fo(e,t){return Ro(e,function(n){var i=n.brand;return $r(""+t.test,i.toLowerCase())})}var Ni=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Yi=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],zr=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Bo=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Wi=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Xi(e){return!!Hn(Bo,e).preset}function Na(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map(function(i){return i.split(" ").map(function(r){return r?""+e+r:""}).join(" ")}).join(" ")}function un(e,t){return function(n){n&&(e[t]=n)}}function Go(e,t,n){return function(i){i&&(e[t][n]=i)}}var vi="undefined",ko=typeof window!==vi,Ya=typeof document!==vi&&document,Wa=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],ee=1e-7,pr={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function Hi(e,t,n,i){return(e*i+t*n)/(n+i)}function mi(e){return typeof e===vi}function qe(e){return e&&typeof e=="object"}function ye(e){return Array.isArray(e)}function On(e){return typeof e=="string"}function Sr(e){return typeof e=="number"}function zo(e){return typeof e=="function"}function Ao(e,t,n,i,r){return Jr(e,t,n)?n:function(o,a,s,c,u){for(var f,p=function(h){var g=a[h].trim();if(g===o.close&&!Jr(o,a,h))return{value:h};var v=h,m=Be(u,function(y){return y.open===g});if(m&&(v=Ao(m,a,h,c,u)),v===-1)return f=h,"break";f=h=v},l=s;l<c;++l){var d=p(l);if(l=f,typeof d=="object")return d.value;if(d==="break")break}return-1}(e,t,n+1,i,r)}function Jr(e,t,n){if(!e.ignore)return null;var i=t.slice(Math.max(n-3,0),n+3).join("");return new RegExp(e.ignore).exec(i)}function bi(e,t){var n=On(t)?{separator:t}:t,i=n.separator,r=i===void 0?",":i,o=n.isSeparateFirst,a=n.isSeparateOnlyOpenClose,s=n.isSeparateOpenClose,c=s===void 0?a:s,u=n.openCloseCharacters,f=u===void 0?Wa:u,p=f.map(function(b){var S=b.open,R=b.close;return S===R?S:S+"|"+R}).join("|"),l=new RegExp("(\\s*"+r+"\\s*|"+p+"|\\s+)","g"),d=e.split(l).filter(function(b){return b&&b!=="undefined"}),h=d.length,g=[],v=[];function m(){return!!v.length&&(g.push(v.join("")),v=[],!0)}for(var y,x=function(b){var S,R,G=d[b].trim(),P=b,D=Be(f,function(F){return F.open===G}),_=Be(f,function(F){return F.close===G});if(D){if((P=Ao(D,d,b,h,f))!==-1&&c)return m()&&o?(y=b,"break"):(g.push(d.slice(b,P+1).join("")),b=P,o?(y=b,"break"):(y=b,"continue"))}else{if(_&&!Jr(_,d,b)){var T=function(){for(var F=0,B=0,O=arguments.length;B<O;B++)F+=arguments[B].length;var I=Array(F),A=0;for(B=0;B<O;B++)for(var W=arguments[B],j=0,N=W.length;j<N;j++,A++)I[A]=W[j];return I}(f);return T.splice(f.indexOf(_),1),{value:bi(e,{separator:r,isSeparateFirst:o,isSeparateOnlyOpenClose:a,isSeparateOpenClose:c,openCloseCharacters:T})}}if(S=G,!(((R=r)!==""&&R!=" "||S!==""&&S!=" ")&&S!==R||a))return m(),o?(y=b,"break"):(y=b,"continue")}P===-1&&(P=h-1),v.push(d.slice(b,P+1).join("")),y=b=P},E=0;E<h;++E){var M=x(E);if(E=y,typeof M=="object")return M.value;if(M==="break")break}return v.length&&g.push(v.join("")),g}function Qn(e){return bi(e,"")}function jn(e){return bi(e,",")}function Rr(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:"",unit:"",value:NaN};var n=t[1],i=t[2];return{prefix:n,unit:t[3],value:parseFloat(i)}}function Mr(){return Date.now?Date.now():new Date().getTime()}function wn(e,t,n){n===void 0&&(n=-1);for(var i=e.length,r=0;r<i;++r)if(t(e[r],r,e))return r;return n}function Be(e,t,n){var i=wn(e,t);return i>-1?e[i]:n}var ji,Li,qi,Io=(ji=Mr(),(Li=ko&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame))?Li.bind(window):function(e){var t=Mr();return setTimeout(function(){e(t-ji)},1e3/60)}),Xa=(qi=ko&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame))?qi.bind(window):function(e){clearTimeout(e)};function tr(e){return Object.keys(e)}function Se(e,t){var n=Rr(e),i=n.value,r=n.unit;if(qe(t)){var o=t[r];if(o){if(zo(o))return o(i);if(pr[r])return pr[r](i,o)}}else if(r==="%")return i*t/100;return pr[r]?pr[r](i):i}function Qr(e,t,n){return Math.max(t,Math.min(e,n))}function Vi(e,t,n,i){return i===void 0&&(i=e[0]/e[1]),[[kt(t[0],ee),kt(t[0]/i,ee)],[kt(t[1]*i,ee),kt(t[1],ee)]].filter(function(r){return r.every(function(o,a){var s=t[a],c=kt(s,ee);return n?o<=s||o<=c:o>=s||o>=c})})[0]||e}function ti(e){for(var t=e.length,n=0,i=t-1;i>=0;--i)n+=e[i];return t?n/t:0}function Fe(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=Math.atan2(i,n);return r>=0?r:r+2*Math.PI}function Ui(e){var t,n=(t=e,[0,1].map(function(o){return ti(t.map(function(a){return a[o]}))})),i=Fe(n,e[0]),r=Fe(n,e[1]);return i<r&&r-i<Math.PI||i>r&&r-i<-Math.PI?1:-1}function Ln(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function kt(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}function Zi(e,t){return e.forEach(function(n,i){e[i]=kt(e[i],t)}),e}function We(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function No(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Yo(e,t){if(e.classList)e.classList.remove(t);else{var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function ge(e,t,n,i){e.addEventListener(t,n,i)}function fe(e,t,n,i){e.removeEventListener(t,n,i)}function xi(e){return e?.ownerDocument||Ya}function yi(e){return xi(e).documentElement}function en(e){return xi(e).body}function Qe(e){var t;return((t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView)||window}function Wo(e){return e&&"postMessage"in e&&"blur"in e&&"self"in e}function Ei(e){return qe(e)&&e.nodeName&&e.nodeType&&"ownerDocument"in e}function Ha(e,t,n,i,r,o){for(var a=0;a<r;++a){var s=n+a*r,c=i+a*r;e[s]+=e[c]*o,t[s]+=t[c]*o}}function ja(e,t,n,i,r){for(var o=0;o<r;++o){var a=n+o*r,s=i+o*r,c=e[a],u=t[a];e[a]=e[s],e[s]=c,t[a]=t[s],t[s]=u}}function La(e,t,n,i,r){for(var o=0;o<i;++o){var a=n+o*i;e[a]/=r,t[a]/=r}}function cn(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=e.slice(),i=Wt(t),r=0;r<t;++r){var o=t*r+r;if(!kt(n[o],ee)){for(var a=r+1;a<t;++a)if(n[t*r+a]){ja(n,i,r,a,t);break}}if(!kt(n[o],ee))return[];for(La(n,i,r,t,n[o]),a=0;a<t;++a){var s=a,c=n[a+r*t];kt(c,ee)&&r!==a&&Ha(n,i,s,r,t,-c)}}return i}function or(e,t){for(var n=e.slice(),i=e.length;i<t-1;++i)n[i]=0;return n[t-1]=1,n}function ln(e,t,n){if(t===void 0&&(t=Math.sqrt(e.length)),t===n)return e;for(var i=Wt(n),r=Math.min(t,n),o=0;o<r-1;++o){for(var a=0;a<r-1;++a)i[o*n+a]=e[o*t+a];i[(o+1)*n-1]=e[(o+1)*t-1],i[(n-1)*n+o]=e[(t-1)*t+o]}return i[n*n-1]=e[t*t-1],i}function wr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Wt(e);return t.forEach(function(r){i=ie(i,r,e)}),i}function ie(e,t,n){n===void 0&&(n=Math.sqrt(e.length));var i=[],r=e.length/n,o=t.length/r;if(!r)return t;if(!o)return e;for(var a=0;a<n;++a)for(var s=0;s<o;++s){i[s*n+a]=0;for(var c=0;c<r;++c)i[s*n+a]+=e[c*n+a]*t[s*r+c]}return i}function Ut(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]+t[r];return i}function ct(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]-t[r];return i}function qa(e,t){return t===void 0&&(t=e.length===6),t?[e[0],e[1],0,e[2],e[3],0,e[4],e[5],1]:e}function Xo(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function ze(e,t,n){n===void 0&&(n=t.length);var i=ie(e,t,n),r=i[n-1];return i.map(function(o){return o/r})}function Va(e,t){return ie(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function Ua(e,t){return ie(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function Za(e,t){return ie(e,Fr(t,4))}function dr(e,t){var n=t[0],i=n===void 0?1:n,r=t[1],o=r===void 0?1:r,a=t[2];return ie(e,[i,0,0,0,0,o,0,0,0,0,a===void 0?1:a,0,0,0,0,1],4)}function Ar(e,t){var n=t[0],i=n===void 0?0:n,r=t[1],o=r===void 0?0:r,a=t[2];return ie(e,[1,0,0,0,0,1,0,0,0,0,1,0,i,o,a===void 0?0:a,1],4)}function $i(e,t){return ie(e,t,4)}function Fr(e,t){var n=Math.cos(e),i=Math.sin(e),r=Wt(t);return r[0]=n,r[1]=i,r[t]=-i,r[t+1]=n,r}function Wt(e){for(var t=e*e,n=[],i=0;i<t;++i)n[i]=i%(e+1)?0:1;return n}function Ho(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[(t+1)*r]=e[r];return n}function fn(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[t*(t-1)+r]=e[r];return n}function jo(e,t,n,i,r,o,a,s){var c=e[0],u=e[1],f=t[0],p=t[1],l=n[0],d=n[1],h=i[0],g=i[1],v=r[0],m=r[1],y=o[0],x=o[1],E=a[0],M=a[1],b=s[0],S=s[1],R=cn([c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,0,0,c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,-v*c,-m*c,-y*f,-x*f,-E*l,-M*l,-b*h,-S*h,-v*u,-m*u,-y*p,-x*p,-E*d,-M*d,-b*g,-S*g],8);if(!R.length)return[];var G=ie(R,[v,m,y,x,E,M,b,S],8);return G[8]=1,ln(function(P,D){D===void 0&&(D=Math.sqrt(P.length));for(var _=[],T=0;T<D;++T)for(var F=0;F<D;++F)_[F*D+T]=P[D*T+F];return _}(G),3,4)}var qn=function(){return qn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},qn.apply(this,arguments)};function Si(e,t){return t===void 0&&(t=0),gn(Cn(e,t))}function gn(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(n){var i=n.matrixFunction,r=n.functionValue;i&&(t=i(t,r))}),t}function Cn(e,t){return t===void 0&&(t=0),(ye(e)?e:Qn(e)).map(function(n){var i,r=!(i=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n))||i.length<4?{}:{prefix:i[1],value:i[2],suffix:i[3]},o=r.prefix,a=r.value,s=null,c=o,u="";if(o==="translate"||o==="translateX"||o==="translate3d"){var f=qe(t)?qn(qn({},t),{"o%":t["%"]}):{"%":t,"o%":t},p=jn(a).map(function(G,P){return f["%"]=P===0&&"x%"in f?t["x%"]:P===1&&"y%"in f?t["y%"]:t["o%"],Se(G,f)}),l=p[0],d=p[1],h=d===void 0?0:d,g=p[2];s=Ar,u=[l,h,g===void 0?0:g]}else if(o==="translateY")s=Ar,u=[0,h=Se(a,qe(t)?qn({"%":t["y%"]},t):{"%":t}),0];else if(o==="translateZ")s=Ar,u=[0,0,parseFloat(a)];else if(o==="scale"||o==="scale3d"){var v=jn(a).map(function(G){return parseFloat(G)}),m=v[0],y=v[1],x=y===void 0?m:y,E=v[2];s=dr,u=[m,x,E===void 0?1:E]}else if(o==="scaleX")s=dr,u=[m=parseFloat(a),1,1];else if(o==="scaleY")s=dr,u=[1,x=parseFloat(a),1];else if(o==="scaleZ")s=dr,u=[1,1,parseFloat(a)];else if(o==="rotate"||o==="rotateZ"||o==="rotateX"||o==="rotateY"){var M=Rr(a),b=M.unit,S=M.value;o==="rotate"||o==="rotateZ"?(c="rotateZ",s=Za):o==="rotateX"?s=Va:o==="rotateY"&&(s=Ua),u=b==="rad"?S:S*Math.PI/180}else if(o==="matrix3d")s=$i,u=jn(a).map(function(G){return parseFloat(G)});else if(o==="matrix"){var R=jn(a).map(function(G){return parseFloat(G)});s=$i,u=[R[0],R[1],0,0,R[2],R[3],0,0,0,0,1,0,R[4],R[5],0,1]}else c="";return{name:o,functionName:c,value:a,matrixFunction:s,functionValue:u}})}var $a=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(n){return this.values[this.keys.indexOf(n)]},t.set=function(n,i){var r=this.keys,o=this.values,a=r.indexOf(n),s=a===-1?r.length:a;r[s]=n,o[s]=i},e}(),Ka=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(n){return this.object[n]},t.set=function(n,i){this.object[n]=i},e}(),Ja=typeof Map=="function",Qa=function(){function e(){}var t=e.prototype;return t.connect=function(n,i){this.prev=n,this.next=i,n&&(n.next=this),i&&(i.prev=this)},t.disconnect=function(){var n=this.prev,i=this.next;n&&(n.next=i),i&&(i.prev=n)},t.getIndex=function(){for(var n=this,i=-1;n;)n=n.prev,++i;return i},e}(),ts=function(){function e(n,i,r,o,a,s,c,u){this.prevList=n,this.list=i,this.added=r,this.removed=o,this.changed=a,this.maintained=s,this.changedBeforeAdded=c,this.fixed=u}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var n,i,r,o,a=(n=this.changedBeforeAdded,i=this.fixed,r=[],o=[],n.forEach(function(u){var f=u[0],p=u[1],l=new Qa;r[f]=l,o[p]=l}),r.forEach(function(u,f){u.connect(r[f-1])}),n.filter(function(u,f){return!i[f]}).map(function(u,f){var p=u[0],l=u[1];if(p===l)return[0,0];var d=r[p],h=o[l-1],g=d.getIndex();return d.disconnect(),h?d.connect(h,h.next):d.connect(void 0,r[0]),[g,d.getIndex()]})),s=this.changed,c=[];this.cacheOrdered=a.filter(function(u,f){var p=u[0],l=u[1],d=s[f],h=d[0],g=d[1];if(p!==l)return c.push([h,g]),!0}),this.cachePureChanged=c},e}();function Lo(e,t,n){var i=Ja?Map:n?Ka:$a,r=n||function(y){return y},o=[],a=[],s=[],c=e.map(r),u=t.map(r),f=new i,p=new i,l=[],d=[],h={},g=[],v=0,m=0;return c.forEach(function(y,x){f.set(y,x)}),u.forEach(function(y,x){p.set(y,x)}),c.forEach(function(y,x){var E=p.get(y);E===void 0?(++m,a.push(x)):h[E]=m}),u.forEach(function(y,x){var E=f.get(y);E===void 0?(o.push(x),++v):(s.push([E,x]),m=h[x]||0,l.push([E-m,x-v]),d.push(x===E),E!==x&&g.push([E,x]))}),a.reverse(),new ts(e,t,o,a,g,s,l,d)}var Ki,es=function(){function e(t,n){t===void 0&&(t=[]),this.findKeyCallback=n,this.list=[].slice.call(t)}return e.prototype.update=function(t){var n=[].slice.call(t),i=Lo(this.list,n,this.findKeyCallback);return this.list=n,i},e}(),qo=function(e,t){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},ns=typeof Map=="function"?void 0:(Ki=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++Ki)}),Vo=function(e){function t(n){return n===void 0&&(n=[]),e.call(this,n,ns)||this}return function(n,i){function r(){this.constructor=n}qo(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t}(es),ei=function(){return ei=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ei.apply(this,arguments)},Uo=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(n,i){if(qe(n))for(var r in n)this.on(r,n[r]);else this._addEvent(n,i,{});return this},t.off=function(n,i){if(n)if(qe(n))for(var r in n)this.off(r);else if(i){var o=this._events[n];if(o){var a=wn(o,function(s){return s.listener===i});a>-1&&o.splice(a,1)}}else this._events[n]=[];else this._events={};return this},t.once=function(n,i){var r=this;return i&&this._addEvent(n,i,{once:!0}),new Promise(function(o){r._addEvent(n,o,{once:!0})})},t.emit=function(n,i){var r=this;i===void 0&&(i={});var o=this._events[n];if(!n||!o)return!0;var a=!1;return i.eventType=n,i.stop=function(){a=!0},i.currentTarget=this,function(){for(var s=0,c=0,u=arguments.length;c<u;c++)s+=arguments[c].length;var f=Array(s),p=0;for(c=0;c<u;c++)for(var l=arguments[c],d=0,h=l.length;d<h;d++,p++)f[p]=l[d];return f}(o).forEach(function(s){s.listener(i),s.once&&r.off(n,s.listener)}),!a},t.trigger=function(n,i){return i===void 0&&(i={}),this.emit(n,i)},t._addEvent=function(n,i,r){var o=this._events;o[n]=o[n]||[],o[n].push(ei({listener:i},r))},e}();function Ee(e){return kt(e,ee)}function Ji(e){return e.length<3?0:Math.abs(function(t){for(var n=0,i=t.length-1;i>=0;--i)n+=t[i];return n}(e.map(function(t,n){var i=e[n+1]||e[0];return t[0]*i[1]-i[0]*t[1]})))/2}function Qi(e,t){var n=t.width,i=t.height,r=t.left,o=t.top,a=yn(e),s=a.minX,c=a.minY,u=a.maxX,f=a.maxY,p=n/(u-s),l=i/(f-c);return e.map(function(d){return[r+(d[0]-s)*p,o+(d[1]-c)*l]})}function yn(e){var t=e.map(function(i){return i[0]}),n=e.map(function(i){return i[1]});return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,n),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,n)}}function Ir(e,t,n){var i=e[0],r=e[1],o=yn(t),a=o.minX,s=o.maxX,c=[[a,r],[s,r]],u=Cr(c[0],c[1]),f=ni(t),p=[];if(f.forEach(function(h){var g,v=Cr(h[0],h[1]),m=h[0];g=v,u.every(function(y,x){return Ee(y-g[x])===0})?p.push({pos:e,line:h,type:"line"}):Zo(Di(u,v),[c,h]).forEach(function(y){h.some(function(x){return M=y,!Ee((E=x)[0]-M[0])&&!Ee(E[1]-M[1]);var E,M})?p.push({pos:y,line:h,type:"point"}):Ee(m[1]-r)!==0&&p.push({pos:y,line:h,type:"intersection"})})}),Be(p,function(h){return h[0]===i}))return!0;var l=0,d={};return p.forEach(function(h){var g=h.pos,v=h.type,m=h.line;if(!(g[0]>i))if(v==="intersection")++l;else{if(v==="line")return;if(v==="point"){var y=Be(m,function(M){return M[1]!==r}),x=d[g[0]],E=y[1]>r?1:-1;x?x!==E&&++l:d[g[0]]=E}}}),l%2==1}function Cr(e,t){var n=e[0],i=e[1],r=t[0]-n,o=t[1]-i;Math.abs(r)<ee&&(r=0),Math.abs(o)<ee&&(o=0);var a=0,s=0,c=0;return r?o?(s=1,c=-(a=-o/r)*n-i):(s=1,c=-i):o&&(a=-1,c=n),[a,s,c]}function Di(e,t){var n=e[0],i=e[1],r=e[2],o=t[0],a=t[1],s=t[2],c=n===0&&o===0,u=i===0&&a===0,f=[];if(c&&u)return[];if(c){var p=-r/i;return p!==-s/a?[]:[[-1/0,p],[1/0,p]]}if(u){var l=-r/n;return l!==-s/o?[]:[[l,-1/0],[l,1/0]]}if(n===0)f=[[d=-(a*(h=-r/i)+s)/o,h]];else if(o===0)f=[[d=-(i*(h=-s/a)+r)/n,h]];else if(i===0)f=[[d=-r/n,h=-(o*d+s)/a]];else if(a===0)f=[[d=-s/o,h=-(n*d+r)/i]];else{var d,h;f=[[d=(i*s-a*r)/(a*n-i*o),h=-(n*d+r)/i]]}return f.map(function(g){return[g[0],g[1]]})}function Zo(e,t){var n=t.map(function(p){return[0,1].map(function(l){return[Math.min(p[0][l],p[1][l]),Math.max(p[0][l],p[1][l])]})}),i=[];if(e.length===2){var r=e[0],o=r[0],a=r[1];if(Ee(o-e[1][0])){if(!Ee(a-e[1][1])){var s=Math.max.apply(Math,n.map(function(p){return p[0][0]})),c=Math.min.apply(Math,n.map(function(p){return p[0][1]}));if(Ee(s-c)>0)return[];i=[[s,a],[c,a]]}}else{var u=Math.max.apply(Math,n.map(function(p){return p[1][0]})),f=Math.min.apply(Math,n.map(function(p){return p[1][1]}));if(Ee(u-f)>0)return[];i=[[o,u],[o,f]]}}return i.length||(i=e.filter(function(p){var l=p[0],d=p[1];return n.every(function(h){return 0<=Ee(l-h[0][0])&&0<=Ee(h[0][1]-l)&&0<=Ee(d-h[1][0])&&0<=Ee(h[1][1]-d)})})),i.map(function(p){return[Ee(p[0]),Ee(p[1])]})}function ni(e){return function(){for(var t=0,n=0,i=arguments.length;n<i;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<i;n++)for(var a=arguments[n],s=0,c=a.length;s<c;s++,o++)r[o]=a[s];return r}(e.slice(1),[e[0]]).map(function(t,n){return[e[n],t]})}var $o=function(e,t){return($o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},te=function(){return te=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},te.apply(this,arguments)};function Nr(e){return 180*(t=[e[0].clientX,e[0].clientY],i=(n=[e[1].clientX,e[1].clientY])[0]-t[0],r=n[1]-t[1],((o=Math.atan2(r,i))>=0?o:o+2*Math.PI)/Math.PI);var t,n,i,r,o}function hr(e){return e?e.touches?function(t){for(var n=Math.min(t.length,2),i=[],r=0;r<n;++r)i.push(eo(t[r]));return i}(e.touches):[eo(e)]:[]}function to(e,t,n){var i=n.length,r=Vn(e,i),o=r.clientX,a=r.clientY,s=r.originalClientX,c=r.originalClientY,u=Vn(t,i),f=u.clientX,p=u.clientY,l=Vn(n,i);return{clientX:s,clientY:c,deltaX:o-f,deltaY:a-p,distX:o-l.clientX,distY:a-l.clientY}}function Yr(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function eo(e){return{clientX:e.clientX,clientY:e.clientY}}function Vn(e,t){t===void 0&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},i=Math.min(e.length,t),r=0;r<i;++r){var o=e[r];n.originalClientX+="originalClientX"in o?o.originalClientX:o.clientX,n.originalClientY+="originalClientY"in o?o.originalClientY:o.clientY,n.clientX+=o.clientX,n.clientY+=o.clientY}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var Wr=function(){function e(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return e.prototype.getAngle=function(t){return t===void 0&&(t=this.prevClients),Nr(t)},e.prototype.getRotation=function(t){return t===void 0&&(t=this.prevClients),Nr(t)-Nr(this.startClients)},e.prototype.getPosition=function(t,n){t===void 0&&(t=this.prevClients);var i=to(t||this.prevClients,this.prevClients,this.startClients),r=i.deltaX,o=i.deltaY;return this.movement+=Math.sqrt(r*r+o*o),this.prevClients=t,i},e.prototype.getPositions=function(t){t===void 0&&(t=this.prevClients);for(var n=this.prevClients,i=this.startClients,r=Math.min(this.length,n.length),o=[],a=0;a<r;++a)o[a]=to([t[a]],[n[a]],[i[a]]);return o},e.prototype.getMovement=function(t){var n=this.movement;if(!t)return n;var i=Vn(t,this.length),r=Vn(this.prevClients,this.length),o=i.clientX-r.clientX,a=i.clientY-r.clientY;return Math.sqrt(o*o+a*a)+n},e.prototype.getDistance=function(t){return t===void 0&&(t=this.prevClients),Yr(t)},e.prototype.getScale=function(t){return t===void 0&&(t=this.prevClients),Yr(t)/Yr(this.startClients)},e.prototype.move=function(t,n){this.startClients.forEach(function(i){i.clientX-=t,i.clientY-=n}),this.prevClients.forEach(function(i){i.clientX-=t,i.clientY-=n})},e}(),no=["textarea","input"],rs=function(e){function t(n,i){i===void 0&&(i={});var r=e.call(this)||this;r.options={},r.flag=!1,r.pinchFlag=!1,r.data={},r.isDrag=!1,r.isPinch=!1,r.clientStores=[],r.targets=[],r.prevTime=0,r.doubleFlag=!1,r._useMouse=!1,r._useTouch=!1,r._useDrag=!1,r._dragFlag=!1,r._isTrusted=!1,r._isMouseEvent=!1,r._isSecondaryButton=!1,r._preventMouseEvent=!1,r._prevInputEvent=null,r._isDragAPI=!1,r._isIdle=!0,r._preventMouseEventId=0,r._window=window,r.onDragStart=function(l,d){if(d===void 0&&(d=!0),r.flag||l.cancelable!==!1){var h=l.type.indexOf("drag")>=-1;if(!r.flag||!h){r._isDragAPI=!0;var g=r.options,v=g.container,m=g.pinchOutside,y=g.preventWheelClick,x=g.preventRightClick,E=g.preventDefault,M=g.checkInput,b=g.dragFocusedInput,S=g.preventClickEventOnDragStart,R=g.preventClickEventOnDrag,G=g.preventClickEventByCondition,P=r._useTouch,D=!r.flag;if(r._isSecondaryButton=l.which===3||l.button===2,y&&(l.which===2||l.button===1)||x&&(l.which===3||l.button===2))return r.stop(),!1;if(D){var _=r._window.document.activeElement,T=l.target;if(T){var F=T.tagName.toLowerCase(),B=no.indexOf(F)>-1,O=T.isContentEditable;if(B||O){if(M||!b&&_===T)return!1;if(_&&(_===T||O&&_.isContentEditable&&_.contains(T))){if(!b)return!1;T.blur()}}else if((E||l.type==="touchstart")&&_){var I=_.tagName.toLowerCase();(_.isContentEditable||no.indexOf(I)>-1)&&_.blur()}(S||R||G)&&ge(r._window,"click",r._onClick,!0)}r.clientStores=[new Wr(hr(l))],r._isIdle=!1,r.flag=!0,r.isDrag=!1,r._isTrusted=d,r._dragFlag=!0,r._prevInputEvent=l,r.data={},r.doubleFlag=Mr()-r.prevTime<200,r._isMouseEvent=(j=l)&&(j.type.indexOf("mouse")>-1||"button"in j),!r._isMouseEvent&&r._preventMouseEvent&&r._allowMouseEvent(),(r._preventMouseEvent||r.emit("dragStart",te(te({data:r.data,datas:r.data,inputEvent:l,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,isTrusted:d,isDouble:r.doubleFlag},r.getCurrentStore().getPosition()),{preventDefault:function(){l.preventDefault()},preventDrag:function(){r._dragFlag=!1}})))===!1&&r.stop(),r._isMouseEvent&&r.flag&&E&&l.preventDefault()}if(!r.flag)return!1;var A=0;if(D?(r._attchDragEvent(),P&&m&&(A=setTimeout(function(){ge(v,"touchstart",r.onDragStart,{passive:!1})}))):P&&m&&fe(v,"touchstart",r.onDragStart),r.flag&&(W=l).touches&&W.touches.length>=2){if(clearTimeout(A),D&&l.touches.length!==l.changedTouches.length)return;r.pinchFlag||r.onPinchStart(l)}}}var W,j},r.onDrag=function(l,d){if(r.flag){var h=r.options.preventDefault;!r._isMouseEvent&&h&&l.preventDefault(),r._prevInputEvent=l;var g=hr(l),v=r.moveClients(g,l,!1);if(r._dragFlag){if((r.pinchFlag||v.deltaX||v.deltaY)&&(r._preventMouseEvent||r.emit("drag",te(te({},v),{isScroll:!!d,inputEvent:l})))===!1)return void r.stop();r.pinchFlag&&r.onPinch(l,g)}r.getCurrentStore().getPosition(g,!0)}},r.onDragEnd=function(l){if(r.flag){var d=r.options,h=d.pinchOutside,g=d.container,v=d.preventClickEventOnDrag,m=d.preventClickEventOnDragStart,y=d.preventClickEventByCondition,x=r.isDrag;(v||m||y)&&requestAnimationFrame(function(){r._allowClickEvent()}),y||m||!v||x||r._allowClickEvent(),r._useTouch&&h&&fe(g,"touchstart",r.onDragStart),r.pinchFlag&&r.onPinchEnd(l);var E=l?.touches?hr(l):[];E.length!==0&&r.options.keepDragging?r._addStore(new Wr(E)):r.flag=!1;var M=r._getPosition(),b=Mr(),S=!x&&r.doubleFlag;r._prevInputEvent=null,r.prevTime=x||S?0:b,r.flag||(r._dettachDragEvent(),r._preventMouseEvent||r.emit("dragEnd",te({data:r.data,datas:r.data,isDouble:S,isDrag:x,isClick:!x,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,inputEvent:l,isTrusted:r._isTrusted},M)),r.clientStores=[],r._isMouseEvent||(r._preventMouseEvent=!0,clearTimeout(r._preventMouseEventId),r._preventMouseEventId=setTimeout(function(){r._preventMouseEvent=!1},200)),r._isIdle=!0)}},r.onBlur=function(){r.onDragEnd()},r._allowClickEvent=function(){fe(r._window,"click",r._onClick,!0)},r._onClick=function(l){r._allowClickEvent(),r._allowMouseEvent();var d=r.options.preventClickEventByCondition;d?.(l)||(l.stopPropagation(),l.preventDefault())},r._onContextMenu=function(l){r.options.preventRightClick?r.onDragEnd(l):l.preventDefault()},r._passCallback=function(){};var o=[].concat(n),a=o[0];r._window=Wo(a)?a:Qe(a),r.options=te({checkInput:!1,container:a&&!("document"in a)?Qe(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},i);var s=r.options,c=s.container,u=s.events,f=s.checkWindowBlur;if(r._useDrag=u.indexOf("drag")>-1,r._useTouch=u.indexOf("touch")>-1,r._useMouse=u.indexOf("mouse")>-1,r.targets=o,r._useDrag&&o.forEach(function(l){ge(l,"dragstart",r.onDragStart)}),r._useMouse&&(o.forEach(function(l){ge(l,"mousedown",r.onDragStart),ge(l,"mousemove",r._passCallback)}),ge(c,"contextmenu",r._onContextMenu)),f&&ge(Qe(),"blur",r.onBlur),r._useTouch){var p={passive:!1};o.forEach(function(l){ge(l,"touchstart",r.onDragStart,p),ge(l,"touchmove",r._passCallback,p)})}return r}return function(n,i){function r(){this.constructor=n}$o(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},t.prototype.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(i,r){return i+r.movement},0)},t.prototype.isDragging=function(){return this.isDrag},t.prototype.isIdle=function(){return this._isIdle},t.prototype.isFlag=function(){return this.flag},t.prototype.isPinchFlag=function(){return this.pinchFlag},t.prototype.isDoubleFlag=function(){return this.doubleFlag},t.prototype.isPinching=function(){return this.isPinch},t.prototype.scrollBy=function(n,i,r,o){o===void 0&&(o=!0),this.flag&&(this.clientStores[0].move(n,i),o&&this.onDrag(r,!0))},t.prototype.move=function(n,i){var r=n[0],o=n[1],a=this.getCurrentStore().prevClients;return this.moveClients(a.map(function(s){var c=s.clientX,u=s.clientY;return{clientX:c+r,clientY:u+o,originalClientX:c,originalClientY:u}}),i,!0)},t.prototype.triggerDragStart=function(n){this.onDragStart(n,!1)},t.prototype.setEventData=function(n){var i=this.data;for(var r in n)i[r]=n[r];return this},t.prototype.setEventDatas=function(n){return this.setEventData(n)},t.prototype.getCurrentEvent=function(n){return n===void 0&&(n=this._prevInputEvent),te(te({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},t.prototype.getEventData=function(){return this.data},t.prototype.getEventDatas=function(){return this.data},t.prototype.unset=function(){var n=this,i=this.targets,r=this.options.container;this.off(),fe(this._window,"blur",this.onBlur),this._useDrag&&i.forEach(function(o){fe(o,"dragstart",n.onDragStart)}),this._useMouse&&(i.forEach(function(o){fe(o,"mousedown",n.onDragStart)}),fe(r,"contextmenu",this._onContextMenu)),this._useTouch&&(i.forEach(function(o){fe(o,"touchstart",n.onDragStart)}),fe(r,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},t.prototype.onPinchStart=function(n){var i=this,r=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>r)){var o=new Wr(hr(n));this.pinchFlag=!0,this._addStore(o),this.emit("pinchStart",te(te({data:this.data,datas:this.data,angle:o.getAngle(),touches:this.getCurrentStore().getPositions()},o.getPosition()),{inputEvent:n,isTrusted:this._isTrusted,preventDefault:function(){n.preventDefault()},preventDrag:function(){i._dragFlag=!1}}))===!1&&(this.pinchFlag=!1)}},t.prototype.onPinch=function(n,i){if(this.flag&&this.pinchFlag&&!(i.length<2)){var r=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",te(te({data:this.data,datas:this.data,movement:this.getMovement(i),angle:r.getAngle(i),rotation:r.getRotation(i),touches:r.getPositions(i),scale:r.getScale(i),distance:r.getDistance(i)},r.getPosition(i)),{inputEvent:n,isTrusted:this._isTrusted}))}},t.prototype.onPinchEnd=function(n){if(this.pinchFlag){var i=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var r=this.getCurrentStore();this.emit("pinchEnd",te(te({data:this.data,datas:this.data,isPinch:i,touches:r.getPositions()},r.getPosition()),{inputEvent:n}))}},t.prototype.getCurrentStore=function(){return this.clientStores[0]},t.prototype.moveClients=function(n,i,r){var o=this._getPosition(n,r),a=this.isDrag;(o.deltaX||o.deltaY)&&(this.isDrag=!0);var s=!1;return!a&&this.isDrag&&(s=!0),te(te({data:this.data,datas:this.data},o),{movement:this.getMovement(n),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:i,isTrusted:this._isTrusted,isFirstDrag:s})},t.prototype._addStore=function(n){this.clientStores.splice(0,0,n)},t.prototype._getPosition=function(n,i){var r=this.getCurrentStore().getPosition(n,i),o=this.clientStores.slice(1).reduce(function(c,u){var f=u.getPosition();return c.distX+=f.distX,c.distY+=f.distY,c},r),a=o.distX,s=o.distY;return te(te({},r),{distX:a,distY:s})},t.prototype._attchDragEvent=function(){var n=this._window,i=this.options.container,r={passive:!1};this._isDragAPI&&(ge(i,"dragover",this.onDrag,r),ge(n,"dragend",this.onDragEnd)),this._useMouse&&(ge(i,"mousemove",this.onDrag),ge(n,"mouseup",this.onDragEnd)),this._useTouch&&(ge(i,"touchmove",this.onDrag,r),ge(n,"touchend",this.onDragEnd,r),ge(n,"touchcancel",this.onDragEnd,r))},t.prototype._dettachDragEvent=function(){var n=this._window,i=this.options.container;this._isDragAPI&&(fe(i,"dragover",this.onDrag),fe(n,"dragend",this.onDragEnd)),this._useMouse&&(fe(i,"mousemove",this.onDrag),fe(n,"mouseup",this.onDragEnd)),this._useTouch&&(fe(i,"touchstart",this.onDragStart),fe(i,"touchmove",this.onDrag),fe(n,"touchend",this.onDragEnd),fe(n,"touchcancel",this.onDragEnd))},t.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},t}(Uo),ri=function(){return ri=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ri.apply(this,arguments)};function Ko(e,t){var n=function(r){var o="rCS"+function(a){for(var s=5381,c=a.length;c;)s=33*s^a.charCodeAt(--c);return s>>>0}(r).toString(36);return{className:o,inject:function(a,s){s===void 0&&(s={});var c,u,f,p,l,d,h,g,v=function(x){if(x&&x.getRootNode){var E=x.getRootNode();if(E.nodeType===11)return E}}(a),m=(v||a.ownerDocument||document).querySelector('style[data-styled-id="'.concat(o,'"]'));if(m){var y=parseFloat(m.getAttribute("data-styled-count"))||0;m.setAttribute("data-styled-count","".concat(y+1))}else c=o,u=r,f=s,p=v,(g=(h=xi(a)).createElement("style")).setAttribute("type","text/css"),g.setAttribute("data-styled-id",c),g.setAttribute("data-styled-count","1"),f.nonce&&g.setAttribute("nonce",f.nonce),g.innerHTML=(l=c,d=u,f.original?d:d.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(x,E){var M=E.trim();return(M?jn(M):[""]).map(function(b){var S=b.trim();return S.indexOf("@")===0?S:S.indexOf(":global")>-1?S.replace(/\:global/g,""):S.indexOf(":host")>-1?"".concat(S.replace(/\:host/g,".".concat(l))):S?".".concat(l," ").concat(S):".".concat(l)}).join(", ")+" {"})),(p||h.head||h.body).appendChild(g),m=g;return{destroy:function(){var x,E=parseFloat(m.getAttribute("data-styled-count"))||0;E<=1?(m.remove?m.remove():(x=m.parentNode)===null||x===void 0||x.removeChild(m),m=null):m.setAttribute("data-styled-count","".concat(E-1))}}}}}(t),i=n.className;return xe.reactExports.forwardRef(function(r,o){var a=r.className,s=a===void 0?"":a;r.cspNonce;var c=function(f,p){var l={};for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&p.indexOf(d)<0&&(l[d]=f[d]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(d=Object.getOwnPropertySymbols(f);h<d.length;h++)p.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(f,d[h])&&(l[d[h]]=f[d[h]])}return l}(r,["className","cspNonce"]),u=xe.reactExports.useRef();return xe.reactExports.useImperativeHandle(o,function(){return u.current},[]),xe.reactExports.useEffect(function(){var f=n.inject(u.current,{nonce:r.cspNonce});return function(){f.destroy()}},[]),xe.reactExports.createElement(e,ri({ref:u,"data-styled-id":i,className:"".concat(s," ").concat(i)},c))})}var Jo=function(e,t){return(Jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])})(e,t)};function ar(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Jo(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var w=function(){return w=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},w.apply(this,arguments)};function C(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function L(e,t,n){if(arguments.length===2)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function er(e,t){return w({events:[],props:[],name:e},t)}var ro,io,is=["n","w","s","e"],Mi=["n","w","s","e","nw","ne","sw","se"],Pn=function(){if(typeof navigator>"u"||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(){var e=navigator.userAgentData,t=(e.uaList||e.brands).slice(),n=e.mobile||!1,i=t[0],r=(e.platform||navigator.platform).toLowerCase(),o={name:i.brand,version:i.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!fr(Bo,t).brand||Xi(Ii())},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&gi(zr,function(p){return Fo(t,p)});var s=fr(Yi,t);if(o.chromium=!!s.brand,o.chromiumVersion=s.version||"-1",!o.chromium){var c=fr(zr,t);o.webkit=!!c.brand,o.webkitVersion=c.version||"-1"}var u=Ro(Wi,function(p){return new RegExp(""+p.test,"g").exec(r)});a.name=u?u.id:"";var f=fr(Ni,t);return o.name=f.brand||o.name,o.version=(f.brand,f.version),o.webkit&&(a.name=n?"ios":"mac"),a.name==="ios"&&o.webview&&(o.version="-1"),a.version=Kr(a.version),o.version=Kr(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:n,isHints:!0}}():function(){var e=Ii(void 0),t=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:Xi(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=Hn(Ni,e),o=r.preset,a=r.version,s=Hn(Wi,e),c=s.preset,u=s.version,f=Hn(Yi,e);if(n.chromium=!!f.preset,n.chromiumVersion=f.version,!n.chromium){var p=Hn(zr,e);n.webkit=!!p.preset,n.webkitVersion=p.version}return c&&(i.name=c.id,i.version=u,i.majorVersion=parseInt(u,10)),o&&(n.name=o.id,n.version=a,n.webview&&i.name==="ios"&&n.name!=="safari"&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:t,isHints:!1}}(),Qo=Pn.browser.webkit,ta=Qo&&(ro=typeof window>"u"?{userAgent:""}:window.navigator,!!(io=/applewebkit\/([^\s]+)/g.exec(ro.userAgent.toLowerCase()))&&parseFloat(io[1])<605),ea=Pn.browser.name,na=parseInt(Pn.browser.version,10),os=ea==="chrome",as=Pn.browser.chromium,ss=parseInt(Pn.browser.chromiumVersion,10)||0,us=os&&na>=109||as&&ss>=109,cs=ea==="firefox",ls=parseInt(Pn.browser.webkitVersion,10)>=612||na>=15,wi="moveable-",fs=Mi.map(function(e){var t="",n="",i="center",r="center",o="calc(var(--moveable-control-padding, 20) * -1px)";return e.indexOf("n")>-1&&(t="top: ".concat(o,";"),r="bottom"),e.indexOf("s")>-1&&(t="top: 0px;",r="top"),e.indexOf("w")>-1&&(n="left: ".concat(o,";"),i="right"),e.indexOf("e")>-1&&(n="left: 0px;",i="left"),'.around-control[data-direction*="'.concat(e,`"] {
|
|
7
7
|
`).concat(n).concat(t,`
|
|
8
8
|
transform-origin: `).concat(i," ").concat(r,`;
|
|
9
9
|
}`)}).join(`
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
|
+
*
|
|
4
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ErnqKHol6IQv1dtF.cjs"),H=["Ok","Cancel"],y=t.reactExports.memo(E=>{const{initialHyperlink:a=null,initialDisplay:T=null,onUpdateHyperlink:c,context:s,onOption:d,onValidateOption:l,onDone:i,options:x=H,defaultOption:p=x?.[0],cancelOption:r="Cancel",sx:k,...C}=E,j=t.reactExports.useMemo(()=>(a??s?.()?.getHyperlink())!==null,[]),g=t.reactExports.useMemo(()=>{let e=null,o=null;a&&(typeof a=="string"?o=a:e=a);const h=e??s?.()?.getHyperlink();return{address:o??h?.getAddress()??"",textToDisplay:h?.getDisplayText()??""}},[a,s]),[n,b]=t.reactExports.useState(g.address),[u,F]=t.reactExports.useState(()=>{const e=s?.().toTextUnformatted()??T;return e===g.address?"":e}),[O,m]=t.reactExports.useState(!1),P=t.reactExports.useCallback(e=>{F(e.target.value)},[]),f=t.reactExports.useCallback(async(e,o)=>null,[]),D=t.st(async e=>{e!==r&&c?.(n===""?null:{address:n},u),d?.(e,e===r,e===p),i?.()},[n,u,c,i,d,p,r]),v=t.st(e=>{b(e.target.value),f(e.target.value,null)},[l]),w=t.st(async e=>{let o=await Promise.resolve(l?.(e));try{o!==!1&&(o=await f(n,e))}catch{}return o??!0},[l]);return t.jsxRuntimeExports.jsx(t.wp,{title:(j?"Edit":"Insert")+" Link",options:x,onDone:i,onOption:e=>D(e),onValidateOption:w,defaultOption:p,cancelOption:r,autoFocusSel:".autoFocus",sx:{width:"480px",...k},...C,children:t.jsxRuntimeExports.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[t.jsxRuntimeExports.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t.jsxRuntimeExports.jsx(t.TextField,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:e=>{O||e.target?.select(),m(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.Un(5))}, ${t.alpha("#fff",t.Un(5))})`}}},value:n,onChange:v,onContextMenu:e=>{e.stopPropagation()}})}),t.jsxRuntimeExports.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t.jsxRuntimeExports.jsx(t.TextField,{label:"Display Text",placeholder:n?.startsWith("#")?n.substring(1):n,onFocus:()=>{m(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.Un(5))}, ${t.alpha("#fff",t.Un(5))})`}}},value:u,onChange:P,onContextMenu:e=>{e.stopPropagation()}})})]})})});exports.HyperlinkDialog=y,exports.default=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./C93vm3rYb2neksBv.cjs"),g=require("./nBWWMENUR7eJsiwF.cjs");class G{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const X=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,z=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},$=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??$}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new G(s)}getFromPath(t,e){return p.Yt.getFromPath(t,e)}setToPath(t,e,s){return p.Yt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return X}get INT_COPY(){return z}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Yt.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Q{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const M=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Z{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){M(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),M(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class k{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.ne.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.ne.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.Yd.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.Yd.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.Yd.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.Yd.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.Yd.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.Yd.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.Qr.CaseSensitiveOptions:p.Qr.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.F.Orientation.Column);const i=p.oo.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.oo.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.ne.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.ne.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.ne.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.ne.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Q.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Q.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Q.BuiltInSheetPattern.Solid:p.Q.BuiltInSheetPattern.None);if(o===p.Q.BuiltInSheetPattern.None)return{none:!0};s.type=p.Q.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Q.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.G.Edge.Left),this.processBorderStroke(t,e,i,p.G.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.G.Edge.Vertical),this.processBorderStroke(t,e,i,p.G.Edge.Top),this.processBorderStroke(t,e,i,p.G.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.G.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends U{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Q.Type.None},r.fills[1]={type:p.Q.Type.Pattern,patternType:p.Q.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.ce.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.X.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.X.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.X.Overflow.Wrap:r.overflow=p.X.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.X.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.X.ReadingDirection.Auto:o==="1"?r.readingDirection=p.X.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.X.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class x{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.Y.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Q),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Z),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new k),this.registerVisitor("c:valAx",new k),this.registerVisitor("c:dateAx",new k),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new x),this.registerVisitor("oneCellAnchor",new x),this.registerVisitor("absoluteAnchor",new x),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ErnqKHol6IQv1dtF.cjs"),g=require("./B8dj4dYUEn2CmsHE.cjs");class X{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const z=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,G=u=>{const t=parseInt(u);return isNaN(t)?null:t},W=u=>{const t=parseFloat(u);return isNaN(t)?null:t},$=new Map;class V{constructor(t,e,s,r,o,i=null,n){const l=(c,h,d)=>n?.getRef?.(c,h,d,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??$}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const d=a.childNodes[h];d.localName!==i&&i!=="*"||n.push(d)}}s=n}return s.length===1?s[0]:s.length===0?null:new X(s)}getFromPath(t,e){return p.Ir.getFromPath(t,e)}setToPath(t,e,s){return p.Ir.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return z}get INT_COPY(){return G}get FLOAT_COPY(){return W}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class S{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class K{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const Y=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=p.Ir.roundAccurately(g.p(e),2);s!==-1e3&&(t.rotation=s)},A=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},f=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class Z{visit(t,e,s){return f(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const d={};s.series=d;for(let m=0;m<h.length;m++)d[m+""]=h[m];d.length=h.length}}class H{visit(t,e,s){return f(t,e,s,"plotVisOnly","plotVisOnly"),A(t,e,s,"dispBlanksAs","dispBlanksAs"),f(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),f(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class D{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=g.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let d=0;d<c.length;d++){const m=c.item(d);h+=g.a(m.getAttribute("d"))+","+g.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=g.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=g.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=g.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),d={offset:g.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(d)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=g.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=g.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=g.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=g.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+g.a(e.getAttribute("r"))+","+g.a(e.getAttribute("g"))+","+g.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+g.p(e.getAttribute("hue"))+","+g.a(e.getAttribute("sat"))+","+g.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends D{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){Y(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=g.c(a.getAttribute("x"))??0,l.y=g.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=g.c(c.getAttribute("cx"))??0,l.height=g.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(A(t,e,r,"grouping","grouping"),f(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),f(t,e,r,"showNegBubbles","showNegativeBubbleValues"),f(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),A(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class J extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(f(t,e,r,"showBubbleSize","showBubbleSize"),f(t,e,r,"showCatName","showCatName"),f(t,e,r,"showLeaderLines","showLeaderLines"),f(t,e,r,"showPercent","showPercentage"),f(t,e,r,"showSerName","showSerName"),f(t,e,r,"showVal","showVal"),f(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),A(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const M=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class Q{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),f(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){M(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class tt{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),f(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),M(t,e,i),i}}class et{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class k{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),f(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),A(t,e,r,"majorTickMark","majorTickMarks"),A(t,e,r,"minorTickMark","minorTickMarks"),A(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),A(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),A(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),A(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let d=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),d?h.text=d.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&Y(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[p.oe.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class st{visit(t,e,s){const r={};return f(t,e,r,"overlay","overlay"),A(t,e,r,"legendPos","position"),s.legend=r,r}}class ot extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class _ extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};f(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class it{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),A(t,r,o,"xMode","xMode"),A(t,r,o,"yMode","yMode"),A(t,r,o,"wMode","wMode"),A(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class nt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class lt extends D{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class at{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[p.oe.getPanoseFallback(i)]),s}}class ct{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ut{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:p.Xd.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:p.Xd.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:p.Xd.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:p.Xd.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:p.Xd.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:p.Xd.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=g.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=g.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class ht{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=g.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?p.Zr.CaseSensitiveOptions:p.Zr.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&g.b(e.getAttribute("columnSort"))&&(r.orientation=p.k.Orientation.Column);const i=p.so.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=p.so.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=g.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=g.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=p.oe.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||p.oe.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.oe.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.oe.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),A(t,e,s,"name","family"),A(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return A(t,e,s,"scheme","scheme"),f(t,e,s,"shadow","shadow",!0),f(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),A(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:p.Z.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=p.Z.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const d=t.evaluate("color",a);this.processDataBarColor(t,d,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?p.Z.BuiltInSheetPattern.Solid:p.Z.BuiltInSheetPattern.None);if(o===p.Z.BuiltInSheetPattern.None)return{none:!0};s.type=p.Z.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===p.Z.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const d=n;n=l,l=d}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,p.U.Edge.Left),this.processBorderStroke(t,e,i,p.U.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.U.Edge.Vertical),this.processBorderStroke(t,e,i,p.U.Edge.Top),this.processBorderStroke(t,e,i,p.U.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.U.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class pt extends U{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:p.Z.Type.None},r.fills[1]={type:p.Z.Type.Pattern,patternType:p.Z.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==p.de.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||g.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let d;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(d=b.get(h)),s.numberFormat=d??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=g.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=p.X.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.X.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,g.b(e?.getAttribute("wrapText"))?r.overflow=p.X.Overflow.Wrap:r.overflow=p.X.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.X.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=g.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=p.X.ReadingDirection.Auto:o==="1"?r.readingDirection=p.X.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.X.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!g.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&g.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=g.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=g.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),d=c.getAttribute("dxfId");let m=r?.[d];m||(console.warn("invalid dfx id",d),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const d=a.item(h);d.nodeType===1&&d.localName==="tableStyle"&&this.processTableStyle(t,d,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=g.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class gt extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class dt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class mt{visit(t,e,s){return s}}class x{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=g.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=g.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class I{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class bt extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class B extends I{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends I{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class yt extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const j="richTypes";class vt{visit(t,e,s){let r=t.getVisitorParamsState().get(j);r||(r=[],t.getVisitorParamsState().set(j,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const R="richData";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(R);o||(o=[],t.getVisitorParamsState().set(R,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const d=this.mapType(t,h);o.push(d)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=p.Q.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],d=c[1];let m=a.textContent;d==="i"&&(m=Number(m)),s[h]=m}}}}class Ct{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class wt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Pt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Nt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",g.r),t.copyFromAttribute(e,"personId",r,"personId",g.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",g.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=g.b(e.getAttribute("done"))),s.push(r),r}}class Ot{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",g.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",g.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const Tt={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class E{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new K),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new Z),this.registerVisitor("c:chartSpace",new H,"chart"),this.registerVisitor("c:plotArea",new q),this.registerVisitor("c:barChart",new J),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new Q),this.registerVisitor("c:dPt",new tt),this.registerVisitor("c:marker",new et),this.registerVisitor("c:catAx",new k),this.registerVisitor("c:valAx",new k),this.registerVisitor("c:dateAx",new k),this.registerVisitor("c:majorGridlines",new S("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new S("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new st),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new rt),this.registerVisitor("c:ser",new ot,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new _),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new it),this.registerVisitor("c:dispUnits",new S("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new _("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new nt),this.registerVisitor("a:theme",new lt,"themeElements/clrScheme"),this.registerVisitor("a:theme",new at,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ut),this.registerVisitor("sortState",new ht),this.registerVisitor("s:workbook",new gt),this.registerVisitor("styleSheet",new pt),this.registerVisitor("table",new dt),this.registerVisitor("hlinkClick",new ct),this.registerVisitor("wsDr",new mt),this.registerVisitor("twoCellAnchor",new x),this.registerVisitor("oneCellAnchor",new x),this.registerVisitor("absoluteAnchor",new x),this.registerVisitor("graphicFrame",new bt),this.registerVisitor("sp",new B),this.registerVisitor("grpSp",new At),this.registerVisitor("cxnSp",new yt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new vt),this.registerVisitor("rvData",new Ft),this.registerVisitor("comments",new Ct),this.registerVisitor("commentList",new wt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Pt),this.registerVisitor("threadedComment",new Nt),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Ot)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=Tt){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new V(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(d){console.warn(`Error in afterVisit: ${h.context.getPath()}`,d)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const d=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)d(m.item(b))}else d(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const d=c.item(h);if(d.nodeType===1){const m=d,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new V(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=E,exports.default=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.18
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|