@sheetxl/studio-vanilla 0.3.4 → 0.3.6
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/3JKPVnbyR3hJBHBj.cjs +6 -0
- package/browser/cjs/B1_gRcAH1cv26X_U.cjs +301 -0
- package/browser/cjs/B2fgcYTdhA0facdy.cjs +6 -0
- package/browser/cjs/B5cmz4f50xr5iF-S.cjs +19 -0
- package/browser/cjs/B7eLEpR9cmunfRfq.cjs +6 -0
- package/browser/cjs/BDUaerzhOJJZeQgS.cjs +6 -0
- package/browser/cjs/BDcLV5_cJTh8yhJI.cjs +7 -0
- package/browser/cjs/{CdVKz1bz20BYztuB.cjs → BOSNEoFPpJAjkRsv.cjs} +1 -1
- package/browser/cjs/{BDmE5OFneHwyeeiD.cjs → BSfmlz8MvlIKFx_N.cjs} +4 -4
- package/browser/cjs/Bdhft6pu1-bwMbfv.cjs +12 -0
- package/browser/cjs/BmbGW13BR2649OAV.cjs +6 -0
- package/browser/cjs/{DzE824T4cXRcKowY.cjs → Bu6q4vuUt_6LDbk_.cjs} +1 -1
- package/browser/cjs/{DD0VHDU8F1FiLKcs.cjs → CXe_6K7OT1AVSgAV.cjs} +1 -1
- package/browser/cjs/ChqJwXboF-6-bjIC.cjs +6 -0
- package/browser/cjs/CyA00uY0ivUSWJ17.cjs +6 -0
- package/browser/cjs/D1jsD18kKrFBRLo8.cjs +12 -0
- package/browser/cjs/{D-I49Eh-SQg7zJYX.cjs → DC0sGYXEVcjL3fEu.cjs} +1 -1
- package/browser/cjs/{BTgA_stiR3dZAHop.cjs → DQJ0sG5gEZSPPLGp.cjs} +2 -2
- package/browser/cjs/{WPXWuf9j-uwazW31.cjs → DUIyD1-nWzOytYDo.cjs} +2 -2
- package/browser/cjs/{yZrSgyFKPqsiym7z.cjs → D_RushRsBoa4Hd6w.cjs} +2 -2
- package/browser/cjs/{46C8cTP5D1fDfsPs.cjs → D_gx4EJ1Z1jqCpC2.cjs} +1 -1
- package/browser/cjs/Dgv9C5kP5-0zdZ_n.cjs +6 -0
- package/browser/cjs/{BB5pxJh1jhHsvVZ1.cjs → Dp_f-iB1lirYu5mz.cjs} +1 -1
- package/browser/cjs/P2nQEqe-ae2Lk91E.cjs +11 -0
- package/browser/cjs/{CpPM7Ir1EZB_8bER.cjs → SvTvsTn26UgPTXmE.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{CuldnUeQxpcu8oJ7.cjs → oIH2DXvUemx8KBZE.cjs} +1 -1
- package/{cdn/assets/RWhi_dOrWDICNt1t.js → browser/esm/BEdBgMB0JXu6qm1p.mjs} +1 -1
- package/browser/esm/{BNq1DlA_v8-hm8PQ.mjs → BUVsXfFhbzBtVoTV.mjs} +71 -70
- package/browser/esm/{DLJ1zBZE-WPdkpt2.mjs → BWoHBg8cjtJL9xBv.mjs} +132 -131
- package/{cdn/assets/DjHCn_TmfObC_aJ1.js → browser/esm/Bc8I4T3hDcq3Tbe7.mjs} +13 -13
- package/{cdn/assets/dQu9CDkkTpS5h580.js → browser/esm/BpIA1_q9rYZhuE_V.mjs} +8 -8
- package/browser/esm/{BjLCBG20KyjNKCpy.mjs → BwpZ-CB67KJ8A2Pd.mjs} +2 -2
- package/browser/esm/{Dq1oxXMudxqdJaKZ.mjs → CAUWxMHzGpG7-P5A.mjs} +11 -10
- package/{cdn/assets/CGUSbWH383tudMFu.js → browser/esm/CFw_ZTxUHsgd5Pf5.mjs} +10 -10
- package/browser/esm/{CTdGamCv2VtpI05C.mjs → CIG-Y2tRBFYerBVK.mjs} +1 -1
- package/browser/esm/{s8U6UEvd4LQsvEnH.mjs → CRLFplTpJUvecqqq.mjs} +1 -1
- package/browser/esm/{CeWIrhJ_bsxOl7mw.mjs → CanwhkFG9e2Ojys-.mjs} +24 -23
- package/browser/esm/CcGOjkDDVya2Ff-b.mjs +50 -0
- package/browser/esm/{BfNo01-WwZl_5N1M.mjs → Ce53t5Ez6mDQoNNS.mjs} +192 -191
- package/browser/esm/{pxRv4ndPNkOMM_s3.mjs → Cmk4lwRc0QJqs2cT.mjs} +13 -13
- package/{cdn/assets/CG-YuIoWsi12_nu9.js → browser/esm/CnI4MLBb2ZtZInkh.mjs} +10 -10
- package/{cdn/assets/CNhPYXS_v3a2ATBg.js → browser/esm/CrZPGKZDaJ-22LSg.mjs} +791 -788
- package/{cdn/assets/Dl02UNFD2tNwtHQ9.js → browser/esm/D-GTj1DQOn_EIw_N.mjs} +1 -1
- package/{cdn/assets/ct9ztJbQB16MJoyP.js → browser/esm/D0YFJdBci18KKVSS.mjs} +7 -7
- package/{cdn/assets/BY5dcSv5nxuvXMsr.js → browser/esm/D7__-CZBbVdVmNms.mjs} +13 -13
- package/{cdn/assets/C-oc6cc0wXRVBFx2.js → browser/esm/DRX3PxyWmwYCO1oC.mjs} +1 -1
- package/browser/esm/DtS8vZkP_9xxg-8G.mjs +24893 -0
- package/browser/esm/{BXMZNx8rs4_V8pQL.mjs → DuOzS4aDJybvfnas.mjs} +2 -2
- package/browser/esm/{C2Ik_RfF43fmFDeS.mjs → ekyugPyyyBIdZgfX.mjs} +1 -1
- package/browser/esm/{BrWhLiIy81LKNSUX.mjs → evOdu9Z-9G0PNrGI.mjs} +1 -1
- package/browser/esm/{qchlbvmOxrybWJep.mjs → goTiQtfGVEDiRLX3.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{FCkxbRy2XiqD3GdL.mjs → ius8cYWSRDNFx-QU.mjs} +12 -12
- package/{browser/esm/BoL2rsWK1YyT1PP7.mjs → cdn/assets/6GT7WcmdWYVxOobM.js} +8 -8
- package/{browser/esm/RWhi_dOrWDICNt1t.mjs → cdn/assets/BEdBgMB0JXu6qm1p.js} +1 -1
- package/cdn/assets/{6tFlyQMvtppXfmuU.js → BH-qA3U2gj7snkKJ.js} +24 -23
- package/{browser/esm/im3UoVISx3VXhEFp.mjs → cdn/assets/BPeDOIBYCZkjaWRD.js} +13 -13
- package/cdn/assets/{mAWImp_J2v8z8hbZ.js → BVIGf25ixd6wvJVI.js} +132 -131
- package/cdn/assets/{BPStm90FUYfOgibU.js → BcGPdpUCizGdDlXm.js} +12 -12
- package/cdn/assets/Be-_CFU80fx1X1E9.js +50 -0
- package/cdn/assets/{CTdGamCv2VtpI05C.js → CIG-Y2tRBFYerBVK.js} +1 -1
- package/cdn/assets/{s8U6UEvd4LQsvEnH.js → CRLFplTpJUvecqqq.js} +1 -1
- package/cdn/assets/{BKDQtGZxRUUzBmnI.js → ChD-x-lrZKLslGbg.js} +2 -2
- package/cdn/assets/{COFTB6OufFls7NP1.js → CkMou3XlV2mmYqmq.js} +11 -10
- package/cdn/assets/{BMb4pCD8O5vK2p1B.js → Cx6czat4u0MrS9wL.js} +2 -2
- package/{browser/esm/Dl02UNFD2tNwtHQ9.mjs → cdn/assets/D-GTj1DQOn_EIw_N.js} +1 -1
- package/{browser/esm/GbTp1_3jFZu0Ex24.mjs → cdn/assets/D0YFJdBci18KKVSS.js} +7 -7
- package/{browser/esm/C-oc6cc0wXRVBFx2.mjs → cdn/assets/DRX3PxyWmwYCO1oC.js} +1 -1
- package/{browser/esm/CZRLp5H9dSrMEgaI.mjs → cdn/assets/DS9Og6WSj_kNksiq.js} +10 -10
- package/cdn/assets/De8HwbKM7sZJMZSq.js +24740 -0
- package/{browser/esm/CKHDKAaHkwZHUkoS.mjs → cdn/assets/DfoJr75R0GrjAv-i.js} +10 -10
- package/cdn/assets/{DYgFWlitgXmKdN_I.js → Dw1Rz_MNeT4QWFeY.js} +192 -191
- package/{browser/esm/Br4TnuxGRULZDhCA.mjs → cdn/assets/FSFNUan5QfhjNqMt.js} +791 -788
- package/cdn/assets/{Be9YovX6b_0gKXs5.js → Ijbe8IzzEjVScejo.js} +71 -70
- package/{browser/esm/Ddm9jggzrr5VJQ68.mjs → cdn/assets/YQRaiV0_mvhQsFVY.js} +13 -13
- package/cdn/assets/{LxoKYdUqZ4Zgxjza.js → _W5FqhFhYviNTP8H.js} +13 -13
- package/cdn/assets/{C2Ik_RfF43fmFDeS.js → ekyugPyyyBIdZgfX.js} +1 -1
- package/cdn/assets/{BrWhLiIy81LKNSUX.js → evOdu9Z-9G0PNrGI.js} +1 -1
- package/cdn/assets/{qchlbvmOxrybWJep.js → goTiQtfGVEDiRLX3.js} +1 -1
- package/cdn/index.js +8 -8
- package/cdn/loader.js +1 -1
- package/package.json +8 -7
- package/browser/cjs/0dkhOl0ItVZXnHg_.cjs +0 -6
- package/browser/cjs/7Xjct_4bBSU-vad1.cjs +0 -6
- package/browser/cjs/B2kFbeodTh3Gk-aQ.cjs +0 -6
- package/browser/cjs/B5UGK4AzAC9SjXJp.cjs +0 -6
- package/browser/cjs/B9kurj8mOePUlJX2.cjs +0 -6
- package/browser/cjs/BDACVe5nzEmYknRm.cjs +0 -19
- package/browser/cjs/BG8OR9VWCkyIRwrw.cjs +0 -6
- package/browser/cjs/BML8p6hKVpqMb-13.cjs +0 -124
- package/browser/cjs/BeGusiaaShhfh7Ch.cjs +0 -7
- package/browser/cjs/BgJ-surJf8jSxqmk.cjs +0 -6
- package/browser/cjs/BgJFVvwpAWB3ssLE.cjs +0 -6
- package/browser/cjs/Bi8tk3LAhLkM7IXm.cjs +0 -6
- package/browser/cjs/BlYpCVX1NOGpcNB6.cjs +0 -7
- package/browser/cjs/BnZdvx8z2BIDZv9J.cjs +0 -355
- package/browser/cjs/BvnUfF0WlIXumm-E.cjs +0 -6
- package/browser/cjs/BwGs6fp9j-iFwDlB.cjs +0 -32
- package/browser/cjs/C4JyilwtB4aWsWnG.cjs +0 -6
- package/browser/cjs/C8PUqW17bEbzJthE.cjs +0 -6
- package/browser/cjs/CBTWDt8vxgXfkDfh.cjs +0 -6
- package/browser/cjs/CJ29qM66PMBNE3G9.cjs +0 -6
- package/browser/cjs/CKtzkomrFnDVY5SY.cjs +0 -11
- package/browser/cjs/CLarA_vLTlgU3TCF.cjs +0 -13
- package/browser/cjs/CN8Y9NZjRCPl8CqY.cjs +0 -6
- package/browser/cjs/CNIPdrSO6Xr2gkt9.cjs +0 -6
- package/browser/cjs/CNkEdWYoHRiw_Uez.cjs +0 -6
- package/browser/cjs/CPFRW8nnIVWYeQYn.cjs +0 -12
- package/browser/cjs/CZih4fqvAIVbCVO4.cjs +0 -6
- package/browser/cjs/Cx3wCYZR6BKbOtgk.cjs +0 -6
- package/browser/cjs/Cx8xafhEESu639Ig.cjs +0 -6
- package/browser/cjs/CzqzVoUeKxH16SDC.cjs +0 -6
- package/browser/cjs/D-GDPxpVRx45cdpQ.cjs +0 -6
- package/browser/cjs/D50Wzp-4UIlO9uVc.cjs +0 -6
- package/browser/cjs/DB9rOzEP0g0ZGfBj.cjs +0 -6
- package/browser/cjs/DIeyUTfGkxwK6bdT.cjs +0 -15
- package/browser/cjs/DX_oDw_K4CB6Ej9i.cjs +0 -6
- package/browser/cjs/DcNRcLtSOkHAK_Mt.cjs +0 -6
- package/browser/cjs/Df8ZAsCgZ69F33-C.cjs +0 -6
- package/browser/cjs/DfCiN8VOEQt4cw-x.cjs +0 -12
- package/browser/cjs/DnkG5azaxDtt-73G.cjs +0 -6
- package/browser/cjs/Dr_HVAdkD1bM9yrW.cjs +0 -6
- package/browser/cjs/KbKjJCMErVEwKqoi.cjs +0 -6
- package/browser/cjs/Px_DbuQFWhjhPilq.cjs +0 -6
- package/browser/cjs/VmYEO_-N9Cn7JpZN.cjs +0 -6
- package/browser/cjs/c4HmqMqg3ugRd4gl.cjs +0 -1501
- package/browser/cjs/jmPMUQMT7KTdf9Sr.cjs +0 -6
- package/browser/cjs/zRbLzzCcfjQpsQ4j.cjs +0 -6
- package/browser/esm/0M23_yfYSvrAB5iY.mjs +0 -472
- package/browser/esm/2sPP8EL_OzSYDsKu.mjs +0 -10
- package/browser/esm/3SiPV9yNzSbQVINg.mjs +0 -10
- package/browser/esm/6CkscKSECxQpy0v6.mjs +0 -10
- package/browser/esm/94SRg1Gxbdr9B75m.mjs +0 -10
- package/browser/esm/B2I1Hudz2EIGw59h.mjs +0 -10
- package/browser/esm/B2fqssq7kMsGIg5g.mjs +0 -10
- package/browser/esm/BBBP9totA24zTbqh.mjs +0 -10
- package/browser/esm/BEYxIKe5B75ADXWP.mjs +0 -5582
- package/browser/esm/BIHHiMjUvXmWQ6w_.mjs +0 -10
- package/browser/esm/BYRVuU6FUEX6XBFW.mjs +0 -10
- package/browser/esm/Bq_HFm6_6_ycs_gE.mjs +0 -48519
- package/browser/esm/Bs6fth_bBoNrYDwE.mjs +0 -21
- package/browser/esm/C-QHwmJCeB3o-mzv.mjs +0 -3934
- package/browser/esm/C0U_bX9Hj97edVC9.mjs +0 -10
- package/browser/esm/CC8aO_pPT-tkJK_H.mjs +0 -10
- package/browser/esm/CGxu5NKxrEXE8QIe.mjs +0 -24
- package/browser/esm/CbTDhJiJfpR6Btxp.mjs +0 -10
- package/browser/esm/CsUNORBKkJ7f3diG.mjs +0 -10
- package/browser/esm/CyYXh2ng_dKgHzbE.mjs +0 -29
- package/browser/esm/DRFsMc27LyLwGu56.mjs +0 -820
- package/browser/esm/DT09m4FGTu5N2LZJ.mjs +0 -10
- package/browser/esm/DUgyehn3re1zGQT5.mjs +0 -10
- package/browser/esm/DWOT4LkGXRN4FrJI.mjs +0 -10
- package/browser/esm/Dx1J8HBJdbrROP0v.mjs +0 -10
- package/browser/esm/Dz8v5MSOgkaH_zTd.mjs +0 -49
- package/browser/esm/F7oUe3nLrtaRYTas.mjs +0 -10
- package/browser/esm/L5HOBW-m9BjZTUuw.mjs +0 -10
- package/browser/esm/XL9-bWRsLjEvW1Y0.mjs +0 -10
- package/browser/esm/ZXuNMFT0sYh8ui7O.mjs +0 -1575
- package/browser/esm/gX1gbnkwbpalR57F.mjs +0 -12
- package/browser/esm/kagl0zcUDaK1IX_X.mjs +0 -10
- package/browser/esm/t7CffsKJY64LMXgS.mjs +0 -10
- package/browser/esm/x9wy-F3t5pNOvOIp.mjs +0 -425
- package/cdn/assets/2sPP8EL_OzSYDsKu.js +0 -10
- package/cdn/assets/3SiPV9yNzSbQVINg.js +0 -10
- package/cdn/assets/6CkscKSECxQpy0v6.js +0 -10
- package/cdn/assets/94SRg1Gxbdr9B75m.js +0 -10
- package/cdn/assets/B2I1Hudz2EIGw59h.js +0 -10
- package/cdn/assets/B2fqssq7kMsGIg5g.js +0 -10
- package/cdn/assets/BBBP9totA24zTbqh.js +0 -10
- package/cdn/assets/BD1S4plUUe1NPAqV.js +0 -425
- package/cdn/assets/BIHHiMjUvXmWQ6w_.js +0 -10
- package/cdn/assets/BYRVuU6FUEX6XBFW.js +0 -10
- package/cdn/assets/Bs6fth_bBoNrYDwE.js +0 -21
- package/cdn/assets/BzlAT8jiYfNV3kGy.js +0 -820
- package/cdn/assets/C0U_bX9Hj97edVC9.js +0 -10
- package/cdn/assets/CC8aO_pPT-tkJK_H.js +0 -10
- package/cdn/assets/CGxu5NKxrEXE8QIe.js +0 -24
- package/cdn/assets/CJOmvmuvywU33q7C.js +0 -3934
- package/cdn/assets/CbTDhJiJfpR6Btxp.js +0 -10
- package/cdn/assets/CsUNORBKkJ7f3diG.js +0 -10
- package/cdn/assets/DBq5E3hmvVO5ss1V.js +0 -5582
- package/cdn/assets/DT09m4FGTu5N2LZJ.js +0 -10
- package/cdn/assets/DUgyehn3re1zGQT5.js +0 -10
- package/cdn/assets/DWOT4LkGXRN4FrJI.js +0 -10
- package/cdn/assets/Det1P4Jrl9aZHFGe.js +0 -472
- package/cdn/assets/Dt3qIbvMvgQhNgeR.js +0 -1575
- package/cdn/assets/Dx1J8HBJdbrROP0v.js +0 -10
- package/cdn/assets/F7oUe3nLrtaRYTas.js +0 -10
- package/cdn/assets/L5HOBW-m9BjZTUuw.js +0 -10
- package/cdn/assets/U_ihCP2tbaRnqD2g.js +0 -48366
- package/cdn/assets/XL9-bWRsLjEvW1Y0.js +0 -10
- package/cdn/assets/Z4Ov3rzhXnezd-gU.js +0 -29
- package/cdn/assets/dR_uwa9znq6_hDmB.js +0 -49
- package/cdn/assets/gX1gbnkwbpalR57F.js +0 -12
- package/cdn/assets/kagl0zcUDaK1IX_X.js +0 -10
- package/cdn/assets/t7CffsKJY64LMXgS.js +0 -10
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/const m=require("react/jsx-runtime"),l=require("react"),r=require("./BnZdvx8z2BIDZv9J.cjs"),Wt=require("react-dom");function Rt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(o,i,t.get?t:{enumerable:!0,get:()=>e[i]})}}return o.default=e,Object.freeze(o)}const de=Rt(l);function Pt(e){return r.generateUtilityClass("MuiCollapse",e)}r.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ft=r.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:i}=e;return[o.root,o[i.orientation],i.state==="entered"&&o.entered,i.state==="exited"&&!i.in&&i.collapsedSize==="0px"&&o.hidden]}})(r.memoTheme(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:o})=>o.state==="exited"&&!o.in&&o.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),At=r.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Nt=r.styled("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Fe=de.forwardRef(function(e,o){const i=r.useDefaultProps({props:e,name:"MuiCollapse"}),{addEndListener:t,children:n,className:a,collapsedSize:s="0px",component:u,easing:c,in:d,onEnter:p,onEntered:f,onEntering:x,onExit:v,onExited:y,onExiting:b,orientation:w="vertical",style:k,timeout:h=r.duration.standard,TransitionComponent:T=r.Transition,...E}=i,A={...i,orientation:w,collapsedSize:s},j=(M=>{const{orientation:W,classes:U}=M,Q={root:["root",`${W}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${W}`],wrapperInner:["wrapperInner",`${W}`]};return r.composeClasses(Q,Pt,U)})(A),q=r.useTheme(),_=r.useTimeout(),P=de.useRef(null),H=de.useRef(),G=typeof s=="number"?`${s}px`:s,Y=w==="horizontal",N=Y?"width":"height",te=de.useRef(null),F=r.useForkRef(o,te),S=M=>W=>{if(M){const U=te.current;W===void 0?M(U):M(U,W)}},L=()=>P.current?P.current[Y?"clientWidth":"clientHeight"]:0,I=S((M,W)=>{P.current&&Y&&(P.current.style.position="absolute"),M.style[N]=G,p&&p(M,W)}),D=S((M,W)=>{const U=L();P.current&&Y&&(P.current.style.position="");const{duration:Q,easing:ae}=r.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const ne=q.transitions.getAutoHeightDuration(U);M.style.transitionDuration=`${ne}ms`,H.current=ne}else M.style.transitionDuration=typeof Q=="string"?Q:`${Q}ms`;M.style[N]=`${U}px`,M.style.transitionTimingFunction=ae,x&&x(M,W)}),$=S((M,W)=>{M.style[N]="auto",f&&f(M,W)}),B=S(M=>{M.style[N]=`${L()}px`,v&&v(M)}),J=S(y),z=S(M=>{const W=L(),{duration:U,easing:Q}=r.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ae=q.transitions.getAutoHeightDuration(W);M.style.transitionDuration=`${ae}ms`,H.current=ae}else M.style.transitionDuration=typeof U=="string"?U:`${U}ms`;M.style[N]=G,M.style.transitionTimingFunction=Q,b&&b(M)});return m.jsx(T,{in:d,onEnter:I,onEntered:$,onEntering:D,onExit:B,onExited:J,onExiting:z,addEndListener:M=>{h==="auto"&&_.start(H.current||0,M),t&&t(te.current,M)},nodeRef:te,timeout:h==="auto"?null:h,...E,children:(M,{ownerState:W,...U})=>m.jsx(Ft,{as:u,className:r.clsx(j.root,a,{entered:j.entered,exited:!d&&G==="0px"&&j.hidden}[M]),style:{[Y?"minWidth":"minHeight"]:G,...k},ref:F,ownerState:{...A,state:M},...U,children:m.jsx(At,{ownerState:{...A,state:M},className:j.wrapper,ref:P,children:m.jsx(Nt,{ownerState:{...A,state:M},className:j.wrapperInner,children:n})})})})});function It(e){return r.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),r.generateUtilityClasses("MuiCard",["root"]);const qt=r.styled(r.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),zt=de.forwardRef(function(e,o){const i=r.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...a}=i,s={...i,raised:n},u=(c=>{const{classes:d}=c;return r.composeClasses({root:["root"]},It,d)})(s);return m.jsx(qt,{className:r.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...a})});function Ht(e){return r.generateUtilityClass("MuiCardActions",e)}r.generateUtilityClasses("MuiCardActions",["root","spacing"]);const Bt=r.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:i}=e;return[o.root,!i.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),_t=de.forwardRef(function(e,o){const i=r.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...a}=i,s={...i,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return r.composeClasses(f,Ht,d)})(s);return m.jsx(Bt,{className:r.clsx(u.root,n),ownerState:s,ref:o,...a})}),Ke=typeof r.globalCss({})=="function",$t=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),Ut=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),et=(e,o=!1)=>{const i={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([a,s])=>{const u=e.getColorSchemeSelector(a);u.startsWith("@")?i[u]={":root":{colorScheme:s.palette?.mode}}:i[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:$t(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Ut(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...i};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Re="mui-ecs",Vt=r.globalCss(Ke?({theme:e,enableColorScheme:o})=>et(e,o):({theme:e})=>(o=>{const i=et(o,!1),t=Array.isArray(i)?i[0]:i;return!o.vars&&t&&(t.html[`:root:has(${Re})`]={colorScheme:o.palette.mode}),o.colorSchemes&&Object.entries(o.colorSchemes).forEach(([n,a])=>{const s=o.getColorSchemeSelector(n);s.startsWith("@")?t[s]={[`:root:not(:has(.${Re}))`]:{colorScheme:a.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Re}))`]:{colorScheme:a.palette?.mode}}}),i})(e));function Kt(e){const o=r.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:i,enableColorScheme:t=!1}=o;return m.jsxs(de.Fragment,{children:[Ke&&m.jsx(Vt,{enableColorScheme:t}),!Ke&&!t&&m.jsx("span",{className:Re,style:{display:"none"}}),i]})}const Gt=r.createSvgIcon(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined"),Zt=l.createContext(null),ze={didCatch:!1,error:null};class Xt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ze}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var i,t,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];(i=(t=this.props).onReset)===null||i===void 0||i.call(t,{args:a,reason:"imperative-api"}),this.setState(ze)}}componentDidCatch(o,i){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,i)}componentDidUpdate(o,i){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var a,s;t&&i.error!==null&&function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return u.length!==c.length||u.some((d,p)=>!Object.is(d,c[p]))}(o.resetKeys,n)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:n,prev:o.resetKeys,reason:"keys"}),this.setState(ze))}render(){const{children:o,fallbackRender:i,FallbackComponent:t,fallback:n}=this.props,{didCatch:a,error:s}=this.state;let u=o;if(a){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof i=="function")u=i(c);else if(t)u=l.createElement(t,c);else{if(n===void 0)throw s;u=n}}return l.createElement(Zt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},u)}}function ft(e){var o,i,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(i=ft(e[o]))&&(t&&(t+=" "),t+=i);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ie(){for(var e,o,i=0,t="";i<arguments.length;)(e=arguments[i++])&&(o=ft(e))&&(t&&(t+=" "),t+=o);return t}let Yt={data:""},Jt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Qt=/\/\*[^]*?\*\/| +/g,tt=/\n+/g,ue=(e,o)=>{let i="",t="",n="";for(let a in e){let s=e[a];a[0]=="@"?a[1]=="i"?i=a+" "+s+";":t+=a[1]=="f"?ue(s,a):a+"{"+ue(s,a[1]=="k"?"":o)+"}":typeof s=="object"?t+=ue(s,o?o.replace(/([^,])+/g,u=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,u):u?u+" "+c:c)):a):s!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=ue.p?ue.p(a,s):a+":"+s+";")}return i+(o&&n?o+"{"+n+"}":n)+t},oe={},ht=e=>{if(typeof e=="object"){let o="";for(let i in e)o+=i+ht(e[i]);return o}return e};function Ge(e){let o=this||{},i=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=ht(s),x=oe[f]||(oe[f]=(h=>{let T=0,E=11;for(;T<h.length;)E=101*E+h.charCodeAt(T++)>>>0;return"go"+E})(f));if(!oe[x]){let h=f!==s?s:(T=>{let E,A,j=[{}];for(;E=Jt.exec(T.replace(Qt,""));)E[4]?j.shift():E[3]?(A=E[3].replace(tt," ").trim(),j.unshift(j[0][A]=j[0][A]||{})):j[0][E[1]]=E[2].replace(tt," ").trim();return j[0]})(s);oe[x]=ue(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let v=c&&oe.g?oe.g:null;return c&&(oe.g=oe[x]),y=oe[x],b=u,w=d,(k=v)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=w?y+b.data:b.data+y),x;var y,b,w,k})(i.unshift?i.raw?(t=i,n=[].slice.call(arguments,1),a=o.p,t.reduce((s,u,c)=>{let d=n[c];if(d&&d.call){let p=d(a),f=p&&p.props&&p.props.className||/^go/.test(p)&&p;d=f?"."+f:p&&typeof p=="object"?p.props?"":ue(p,""):p===!1?"":p}return s+u+(d??"")},"")):i.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):i,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Yt)(o.target),o.g,o.o,o.k);var t,n,a}function gt(e,o,i){return o&&function(t,n){for(var a=0;a<n.length;a++){var s=n[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(e.prototype,o),e}function O(){return O=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},O.apply(this,arguments)}function kt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Ce(e,o){if(e==null)return{};var i,t,n={},a=Object.keys(e);for(t=0;t<a.length;t++)i=a[t],o.indexOf(i)>=0||(n[i]=e[i]);return n}function nt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ge.bind({g:1}),Ge.bind({k:1});var ot=function(){return""},bt=l.createContext({enqueueSnackbar:ot,closeSnackbar:ot}),He="@media (max-width:599.95px)",Pe="@media (min-width:600px)",rt=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xe=function(e){return""+rt(e.vertical)+rt(e.horizontal)},Me=function(e){return!!e||e===0},Le="unmounted",pe="exited",me="entering",xe="entered",it="exiting",Ye=function(e){function o(t){var n;n=e.call(this,t)||this;var a,s=t.appear;return n.appearStatus=null,t.in?s?(a=pe,n.appearStatus=me):a=xe:a=t.unmountOnExit||t.mountOnEnter?Le:pe,n.state={status:a},n.nextCallback=null,n}kt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Le?{status:pe}:null};var i=o.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(t){var n=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==me&&a!==xe&&(n=me):a!==me&&a!==xe||(n=it)}this.updateStatus(!1,n)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var t=this.props.timeout,n=t,a=t;return t!=null&&typeof t!="number"&&typeof t!="string"&&(a=t.exit,n=t.enter),{exit:a,enter:n}},i.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===me?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===pe&&this.setState({status:Le})},i.performEnter=function(t){var n=this,a=this.props.enter,s=t,u=this.getTimeouts();t||a?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:me},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:xe},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:xe},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},i.performExit=function(){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:it},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(a.exit,function(){t.safeSetState({status:pe},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:pe},function(){t.props.onExited&&t.props.onExited(t.node)})},i.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},i.setNextCallback=function(t){var n=this,a=!0;return this.nextCallback=function(){a&&(a=!1,n.nextCallback=null,t())},this.nextCallback.cancel=function(){a=!1},this.nextCallback},i.onTransitionEnd=function(t,n){this.setNextCallback(n);var a=t==null&&!this.props.addEndListener;this.node&&!a?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),t!=null&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var t=this.state.status;if(t===Le)return null;var n=this.props;return(0,n.children)(t,Ce(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},gt(o,[{key:"node",get:function(){var t,n=(t=this.props.nodeRef)===null||t===void 0?void 0:t.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),o}(l.Component);function fe(){}function at(e,o){typeof e=="function"?e(o):e&&(e.current=o)}function Ze(e,o){return l.useMemo(function(){return e==null&&o==null?null:function(i){at(e,i),at(o,i)}},[e,o])}function Ae(e){var o=e.timeout,i=e.style,t=i===void 0?{}:i,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Ye.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fe,onEntering:fe,onEntered:fe,onExit:fe,onExiting:fe,onExited:fe};var xt=function(e){e.scrollTop=e.scrollTop},st=function(e){return Math.round(e)+"ms"};function he(e,o){e===void 0&&(e=["all"]);var i=o||{},t=i.duration,n=t===void 0?300:t,a=i.easing,s=a===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":a,u=i.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:st(n),f=typeof c=="string"?c:st(c);return d+" "+p+" "+s+" "+f}).join(",")}function yt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Te(e,o){if(o){var i=function(t,n){var a,s=n.getBoundingClientRect(),u=yt(n);if(n.fakeTransform)a=n.fakeTransform;else{var c=u.getComputedStyle(n);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}var d=0,p=0;if(a&&a!=="none"&&typeof a=="string"){var f=a.split("(")[1].split(")")[0].split(",");d=parseInt(f[4],10),p=parseInt(f[5],10)}switch(t){case"left":return"translateX("+(u.innerWidth+d-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-d)+"px)";case"up":return"translateY("+(u.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(e,o);i&&(o.style.webkitTransform=i,o.style.transform=i)}}var wt=l.forwardRef(function(e,o){var i=e.children,t=e.direction,n=t===void 0?"down":t,a=e.in,s=e.style,u=e.timeout,c=u===void 0?0:u,d=e.onEnter,p=e.onEntered,f=e.onExit,x=e.onExited,v=Ce(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Ze(i.ref,y),w=Ze(b,o),k=l.useCallback(function(){y.current&&Te(n,y.current)},[n]);return l.useEffect(function(){if(!a&&n!=="down"&&n!=="right"){var h=function(E,A){var j;function q(){for(var _=this,P=arguments.length,H=new Array(P),G=0;G<P;G++)H[G]=arguments[G];clearTimeout(j),j=setTimeout(function(){E.apply(_,H)},A)}return A===void 0&&(A=166),q.clear=function(){clearTimeout(j)},q}(function(){y.current&&Te(n,y.current)}),T=yt(y.current);return T.addEventListener("resize",h),function(){h.clear(),T.removeEventListener("resize",h)}}},[n,a]),l.useEffect(function(){a||k()},[a,k]),l.createElement(Ye,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,T){Te(n,h),xt(h),d&&d(h,T)},onEntered:p,onEntering:function(h){var T=Ae({timeout:c,mode:"enter",style:O({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=he("-webkit-transform",T),h.style.transition=he("transform",T),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var T=Ae({timeout:c,mode:"exit",style:O({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=he("-webkit-transform",T),h.style.transition=he("transform",T),Te(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:a,timeout:c},v),function(h,T){return l.cloneElement(i,O({ref:w,style:O({visibility:h!=="exited"||a?void 0:"hidden"},s,{},i.props.style)},T))})});wt.displayName="Slide";var je=function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ce={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(je,null,l.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
7
|
-
10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},null),warning:l.createElement(function(){return l.createElement(je,null,l.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:l.createElement(function(){return l.createElement(je,null,l.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
|
|
8
|
-
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
9
|
-
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},null),info:l.createElement(function(){return l.createElement(je,null,l.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
10
|
-
0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:wt,transitionDuration:{enter:225,exit:195}};function Se(e){return Object.entries(e).reduce(function(o,i){var t,n=i[0],a=i[1];return O({},o,((t={})[n]=Ge(a),t))},{})}var vt="notistack-CollapseWrapper",en=function(e){return"notistack-MuiContent-"+e},lt=Se({root:{height:0},entered:{height:"auto"}}),Be="0px",Et=l.forwardRef(function(e,o){var i=e.children,t=e.in,n=e.onExited,a=l.useRef(null),s=l.useRef(null),u=Ze(o,s),c=function(){return a.current?a.current.clientHeight:0};return l.createElement(Ye,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=Be},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=Ae({timeout:175,mode:"enter"}),x=f.duration,v=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=v||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){xt(d);var p=Ae({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=Be,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:ie(lt.root,d==="entered"&<.entered),style:O({pointerEvents:"all",overflow:"hidden",minHeight:Be,transition:he("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:a,className:vt,style:{display:"flex",width:"100%"}},i))})});Et.displayName="Collapse";var ct={right:"left",left:"right",bottom:"up",top:"down"},tn=function(e){return"anchorOrigin"+Xe(e)},nn=function(){};function Ee(e,o){return e.reduce(function(i,t){return t==null?i:function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];var u=[].concat(a);o&&u.indexOf(o)===-1&&u.push(o),i.apply(this,u),t.apply(this,u)}},nn)}var on=typeof window<"u"?l.useLayoutEffect:l.useEffect;function ut(e){var o=l.useRef(e);return on(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var _e,Ct=l.forwardRef(function(e,o){var i=e.children,t=e.className,n=e.autoHideDuration,a=e.disableWindowBlurListener,s=a!==void 0&&a,u=e.onClose,c=e.id,d=e.open,p=e.SnackbarProps,f=p===void 0?{}:p,x=l.useRef(),v=ut(function(){u&&u.apply(void 0,arguments)}),y=ut(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){v(null,"timeout",c)},k))});l.useEffect(function(){return d&&y(n),function(){x.current&&clearTimeout(x.current)}},[d,n,y]);var b=function(){x.current&&clearTimeout(x.current)},w=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",w),window.addEventListener("blur",b),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",b)}},[s,w,d]),l.createElement("div",Object.assign({ref:o},f,{className:ie("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),w()}}),i)});Ct.displayName="Snackbar";var rn=Se({root:(_e={display:"flex",flexWrap:"wrap",flexGrow:1},_e[Pe]={flexGrow:"initial",minWidth:"288px"},_e)}),Je=l.forwardRef(function(e,o){var i=e.className,t=Ce(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:ie(rn.root,i)},t))});Je.displayName="SnackbarContent";var ye=Se({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),dt="notistack-snackbar",St=l.forwardRef(function(e,o){var i=e.id,t=e.message,n=e.action,a=e.iconVariant,s=e.variant,u=e.hideIconVariant,c=e.style,d=e.className,p=a[s],f=n;return typeof f=="function"&&(f=f(i)),l.createElement(Je,{ref:o,role:"alert","aria-describedby":dt,style:c,className:ie("notistack-MuiContent",en(s),ye.root,ye[s],d,!u&&p&&ye.lessPadding)},l.createElement("div",{id:dt,className:ye.message},u?null:p,t),f&&l.createElement("div",{className:ye.action},f))});St.displayName="MaterialDesignContent";var we,$e,De,Oe,Ue,an=l.memo(St),sn=Se({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),ln=function(e){var o=l.useRef(),i=l.useState(!0),t=i[0],n=i[1],a=Ee([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(_){return!_})},125)},[]);l.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var u,c=e.snack,d=e.classes,p=e.Component,f=p===void 0?an:p,x=l.useMemo(function(){return function(_){_===void 0&&(_={});var P={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(H){return!P[H]}).reduce(function(H,G){var Y;return O({},H,((Y={})[G]=_[G],Y))},{})}(d)},[d]),v=c.open,y=c.SnackbarProps,b=c.TransitionComponent,w=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,T=c.content,E=Ce(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),A=O({direction:(u=E.anchorOrigin,u.horizontal!=="center"?ct[u.horizontal]:ct[u.vertical]),timeout:k},w),j=T;typeof j=="function"&&(j=j(E.id,E.message));var q=["onEnter","onEntered","onExit","onExited"].reduce(function(_,P){var H;return O({},_,((H={})[P]=Ee([e.snack[P],e[P]],E.id),H))},{});return l.createElement(Et,{in:t,onExited:q.onExited},l.createElement(Ct,{open:v,id:E.id,disableWindowBlurListener:h,autoHideDuration:E.autoHideDuration,className:ie(sn.wrappedRoot,x.root,x[tn(E.anchorOrigin)]),SnackbarProps:y,onClose:a},l.createElement(b,Object.assign({},A,{appear:!0,in:v,onExit:q.onExit,onExited:s,onEnter:q.onEnter,onEntered:Ee([q.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],E.id)}),j||l.createElement(f,Object.assign({},E)))))},ve=20,Ve=6,cn=2,pt="."+vt,We=Se({root:(we={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:he(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},we[pt]={padding:Ve+"px 0px",transition:"padding 300ms ease 0ms"},we.maxWidth="calc(100% - "+2*ve+"px)",we[He]={width:"100%",maxWidth:"calc(100% - 32px)"},we),rootDense:($e={},$e[pt]={padding:cn+"px 0px"},$e),top:{top:ve-Ve+"px",flexDirection:"column"},bottom:{bottom:ve-Ve+"px",flexDirection:"column-reverse"},left:(De={left:ve+"px"},De[Pe]={alignItems:"flex-start"},De[He]={left:"16px"},De),right:(Oe={right:ve+"px"},Oe[Pe]={alignItems:"flex-end"},Oe[He]={right:"16px"},Oe),center:(Ue={left:"50%",transform:"translateX(-50%)"},Ue[Pe]={alignItems:"center"},Ue)}),un=l.memo(function(e){var o=e.classes,i=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,a=e.children,s=ie("notistack-SnackbarContainer",We[t.vertical],We[t.horizontal],We.root,i.containerRoot,i["containerAnchorOrigin"+Xe(t)],n&&We.rootDense);return l.createElement("div",{className:s},a)}),mt=function(e){return!(typeof e=="string"||l.isValidElement(e))},dn=function(e){function o(i){var t;return(t=e.call(this,i)||this).enqueueSnackbar=function(n,a){if(a===void 0&&(a={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=mt(n)?n:a,u=mt(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Ce(s,["key","preventDuplicate"]),f=Me(c),x=f?c:new Date().getTime()+Math.random(),v=function(b,w){return function(k,h){return h===void 0&&(h=!1),h?O({},ce[k],{},w[k],{},b[k]):k==="autoHideDuration"?(j=b.autoHideDuration,q=w.autoHideDuration,(_=function(P){return typeof P=="number"||P===null})(j)?j:_(q)?q:ce.autoHideDuration):k==="transitionDuration"?(T=b.transitionDuration,E=w.transitionDuration,(A=function(P,H){return H.some(function(G){return typeof P===G})})(T,["string","number"])?T:A(T,["object"])?O({},ce.transitionDuration,{},A(E,["object"])&&E,{},T):A(E,["string","number"])?E:A(E,["object"])?O({},ce.transitionDuration,{},E):ce.transitionDuration):b[k]||w[k]||ce[k];var T,E,A,j,q,_}}(p,t.props),y=O({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:v("persist"),action:v("action"),content:v("content"),variant:v("variant"),anchorOrigin:v("anchorOrigin"),disableWindowBlurListener:v("disableWindowBlurListener"),autoHideDuration:v("autoHideDuration"),hideIconVariant:v("hideIconVariant"),TransitionComponent:v("TransitionComponent"),transitionDuration:v("transitionDuration"),TransitionProps:v("TransitionProps",!0),iconVariant:v("iconVariant",!0),style:v("style",!0),SnackbarProps:v("SnackbarProps",!0),className:ie(t.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),t.setState(function(b){if(d===void 0&&t.props.preventDuplicate||d){var w=function(T){return f?T.id===x:T.message===u},k=b.queue.findIndex(w)>-1,h=b.snacks.findIndex(w)>-1;if(k||h)return b}return t.handleDisplaySnack(O({},b,{queue:[].concat(b.queue,[y])}))}),x},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var a=n.queue,s=n.snacks;return a.length>0?O({},n,{snacks:[].concat(s,[a[0]]),queue:a.slice(1,a.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some(function(c){return!c.open||c.requestClose}))return n;var a=!1,s=!1;n.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0)===t.maxSnack&&(s=!0);var u=n.snacks.map(function(c){return a||c.persist&&!s?O({},c):(a=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),O({},c,{open:!1})):O({},c,{requestClose:!0}))});return O({},n,{snacks:u})},t.handleEnteredSnack=function(n,a,s){if(!Me(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState(function(u){return{snacks:u.snacks.map(function(c){return c.id===s?O({},c,{entered:!0}):O({},c)})}})},t.handleCloseSnack=function(n,a,s){t.props.onClose&&t.props.onClose(n,a,s);var u=s===void 0;t.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(f){return u||f.id===s?f.entered?O({},f,{open:!1}):O({},f,{requestClose:!0}):O({},f)}),queue:p.filter(function(f){return f.id!==s})}})},t.closeSnackbar=function(n){var a=t.state.snacks.find(function(s){return s.id===n});Me(n)&&a&&a.onClose&&a.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,a){if(!Me(a))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState(function(s){var u=t.processQueue(O({},s,{snacks:s.snacks.filter(function(c){return c.id!==a})}));return u.queue.length===0?u:t.handleDismissOldest(u)})},t.enqueueSnackbar,t.closeSnackbar,t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar.bind(nt(t)),closeSnackbar:t.closeSnackbar.bind(nt(t))}},t}return kt(o,e),o.prototype.render=function(){var i=this,t=this.state.contextValue,n=this.props,a=n.domRoot,s=n.children,u=n.dense,c=u!==void 0&&u,d=n.Components,p=d===void 0?{}:d,f=n.classes,x=this.state.snacks.reduce(function(y,b){var w,k=Xe(b.anchorOrigin),h=y[k]||[];return O({},y,((w={})[k]=[].concat(h,[b]),w))},{}),v=Object.keys(x).map(function(y){var b=x[y],w=b[0];return l.createElement(un,{key:y,dense:c,anchorOrigin:w.anchorOrigin,classes:f},b.map(function(k){return l.createElement(ln,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:i.handleCloseSnack,onEnter:i.props.onEnter,onExit:i.props.onExit,onExited:Ee([i.handleExitedSnack,i.props.onExited],k.id),onEntered:Ee([i.handleEnteredSnack,i.props.onEntered],k.id)})}))});return l.createElement(bt.Provider,{value:t},s,a?Wt.createPortal(v,a):v)},gt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||ce.maxSnack}}]),o}(l.Component),Mt=function(){return l.useContext(bt)};const re={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Lt=l.forwardRef((e,o)=>{const{id:i,message:t,iconVariant:n,error:a,hideIconVariant:s,...u}=e,{closeSnackbar:c}=Mt(),d=r.Yr(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),v=l.useCallback(()=>{c(i)},[i,c]),y=a?.message||String(t);return m.jsx(Je,{ref:o,className:r.eo(re.root,"error-snackbar"),children:m.jsxs(zt,{className:re.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(_t,{className:re.actionRoot,children:[s?null:n?.error,m.jsx(r.Typography,{variant:"body2",component:"div",className:re.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:re.icons,children:[a?m.jsx(r.IconButton,{"aria-label":"Show more",size:"small",className:r.eo(re.expand,{[re.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(r.Xn,{})}):null,m.jsx(r.IconButton,{size:"small",className:re.expand,style:{color:d.palette.action.active},onClick:v,children:m.jsx(r.vo,{fontSize:"small"})})]})]}),a?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:re.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(r.yh,{error:a,hideLineNumbers:!0})})}):null]})})});Lt.displayName="ToastError";const Tt=l.memo(l.forwardRef((e,o)=>{const{commands:i,commandHook:t,scope:n="workbook",disabled:a=!1,...s}=e,u=r.ye(d=>{const p={variant:r.Kt.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:a},f=m.jsxs(m.Fragment,{children:[m.jsx(r.Pe$1,{...p,command:i.getCommand("newWorkbook"),icon:r.ke(m.jsx(r.GT,{}))}),m.jsx(r.Ft$1,{orientation:"horizontal"}),m.jsx(r.Pe$1,{...p,command:i.getCommand("openWorkbook"),icon:r.ke(m.jsx(r.KT,{}))}),m.jsx(r.zn,{...p,commands:i,quickCommand:"saveWorkbook",icon:r.ke(m.jsx(r.XT,{})),createPopupPanel:x=>{const v={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return r.CM.getWriteFormats().forEach(b=>{if(b.isDefault)return;let w=null;b.key==="CSV"?w=r.ke(m.jsx(r.JT,{})):b.key==="Excel"&&(w=r.ke(m.jsx(r.YT,{})));const k=i.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(r.Pe$1,{...v,key:b.key,command:k,icon:w})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),r.Tn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return r.Tn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[a,i,t,n]),c="File";return m.jsx(r.zn,{commands:i,disabled:a,commandHook:t,scope:n,label:c,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:d=>`calc(1.25rem + ${d.spacing(2)}px)`}},...s,createPopupPanel:u,icon:m.jsx(r.sa,{className:"label",icon:null,label:c})})}));Tt.displayName="StandaloneFileCommandButton";const pn=m.jsx(r.No,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(r.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(r.mM,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),jt=l.memo(l.forwardRef((e,o)=>{const{commands:i,workbook:t,logo:n=pn,mainElement:a,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=r.s0(),[p,{width:f}]=r.f1(),x=f<530,v=s?m.jsx(Tt,{commands:i,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,T){}}}):null,y=u?m.jsx(r.bM,{commands:i,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,T){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),w=l.useRef(null);return m.jsx(r.Box,{ref:r.au([w,p,o]),...c,children:r.aT({commands:i,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(r.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:h=>h.spacing(1),paddingLeft:h=>h.spacing(1),paddingRight:h=>h.spacing(1)},children:[m.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[v,k]})]}),m.jsx(r.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:a}),m.jsx(r.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));jt.displayName="StandaloneWorkbookToolbar";const Dt=l.memo(l.forwardRef((e,o)=>{const{workbook:i,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:a,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeModeOptions:x}=e,v=Mt(),y=v?v.enqueueSnackbar:()=>{},b=v?v.closeSnackbar:()=>{},[w,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k(F=>({...F,isMounted:!0}))},[]),T=l.useCallback(()=>{k(F=>({...F,isMounted:!1}))},[]),E=r.cM(),A=r.dM(),j=r.uM(),q=l.useRef(new Set),_=l.useMemo(()=>{const F=(S,L)=>{if(L?.onceKey){if(q.current.has(L.onceKey))return;const D=new Set(q.current);D.add(L.onceKey),q.current=D}const I={variant:L?.type??r.l0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:L?.preventDuplicate,persist:L?.persist??L?.type===r.l0.Error,action:D=>m.jsx(r.IconButton,{onClick:()=>b(D),children:m.jsx(Gt,{})})};L?.enqueueProps&&Object.assign(I,L.enqueueProps),S||console.log("message is 'null'",L),y(S??"Alert",I)};return{showMessage:F,showBusy:(S,L)=>{let I=null;const D=new Promise($=>{I=$});return k($=>{const B=new Map($.starting);return B.set(D,I),{...$,label:S,starting:B}}),D},showWindow:(S,L,I)=>{const D={...L,onKeyDown:$=>{p?.dispatchToFocusedCommand($),$.isDefaultPrevented()||$.isPropagationStopped()||L?.onKeyDown?.($)}};return E(S,{sort:()=>Promise.resolve().then(()=>require("./KbKjJCMErVEwKqoi.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./CBTWDt8vxgXfkDfh.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./WPXWuf9j-uwazW31.cjs")),comments:()=>Promise.resolve().then(()=>require("./BlYpCVX1NOGpcNB6.cjs")),find:()=>Promise.resolve().then(()=>require("./DcNRcLtSOkHAK_Mt.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./CNkEdWYoHRiw_Uez.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./BTgA_stiR3dZAHop.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./0dkhOl0ItVZXnHg_.cjs"))}[S],D,I)},showOptions:A,showInputOptions:j,showError:S=>{let L,I=r.l0.Error,D="Unknown Error";typeof S=="string"?D=S:S instanceof Error&&(L=S,S.message&&(D=S.message)),S instanceof r.jf&&(I=r.l0.Info),F(D,{type:I,enqueueProps:{error:L}})}}},[]),P=l.useCallback(()=>{},[]),H=(F=>{const{workbook:S,setWorkbook:L,importExportDisabled:I,workbookTitle:D="export",setWorkbookTitle:$,notifier:B,requestWorkbookTitle:J,themeModeOptions:z,undoManager:M,commands:W,onExecute:U}=F,Q=r.ye(z?.onForceModeChange,[z?.onForceModeChange]),ae=r.ye(z?.onForceLightGridChange,[z?.onForceLightGridChange]),ne=r.ye(z?.onForceLightImagesChange,[z?.onForceLightImagesChange]),Ne=r.ye(async(R=null,X=null)=>{const g=[];let C,V=null,ee=null;if(typeof R=="string"?ee=R:V=R,C=V?R:await r.qt$1.openFileDialog(ee??r.CM.getAllReadFormatTypeAsString().join(",")),!C)return null;const se={source:C,constructorOptions:X,onWarning:qe=>{g.push(qe)}},be=await r.CM.read(se,B);return g.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
11
|
-
`+g.join(`
|
|
12
|
-
`))),be},[U,B,S]),ge=r.ye(async(R,X,g)=>{if(!X&&J){const C=await J("Enter Workbook name to "+(g.isDefault?"Save.":`Export as ${g.description}.`));return C!==null&&r.CM.writeFile(C,R,{formatType:g.key})}return r.CM.writeFile(X,R,{formatType:g.key})},[B,S,J]),K=l.useCallback(()=>({contains:R=>!0,focus(){}}),[]),le=l.useMemo(()=>{const R=[];I||(r.CM.getWriteFormats().forEach(g=>{const C=g.isDefault,V={label:C?"Save Workbook":`Save Workbook as ${g.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${g.description}`},tags:g.tags,description:`Save the workbook to the desktop${C?"":` as ${g.description}`}.`};C&&(V.shortcut={key:"S",modifiers:[r.Ae.Ctrl]},R.push(new r.Le("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[r.Ae.Shift,r.Ae.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{ge(S,null,g).catch(se=>{B?.showError?.(se)})})));const ee=C?"saveWorkbook":`saveWorkbookAs${g.key}`;R.push(new r.Le(ee,K,V,se=>{ge(S,se??D,g).catch(be=>{B?.showError?.(be)})}))}),R.push(new r.Le("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[r.Ae.Ctrl]}},async(g=null)=>{const C={date1904:S.isDate1904(),...S.options};try{const V=await Ne(g,C);if(!V)return;const ee=V.title,se=V.workbook,be=se.getSelectedSheet();if(V.formatType.mimeType==="text/csv"){const qe=S.findValidSheetName(ee);await S.doBatch(async()=>{const Qe=be.getUsedRange();Qe?await S.getSheets().add({name:qe,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(Qe):B?.showMessage("The file appears to be blank.")},`Import CSV '${ee}'`)}else S?.close(),$?.(ee),L(se)}catch(V){B?.showError?.(V)}})),R.push(new r.Le("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(g){if(!g){const C=await B?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(C.option!=="Open")return;g=C.input}g&&console.log("openWorkbookFromUrl",g)})));let X=[];return z&&(X=[new r.Le("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new r.Le("defaultThemeMode",K,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new r.Le("forceLightGrid",K,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new r.Le("forceLightImages",K,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...R,...X,new r.Ct("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new r.Ct("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[r.Ae.Ctrl]}},()=>{}),new r.Le("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new r.Le("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new r.Le("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new r.Le("gotoUrlIssue",K,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[S,D,B,I,z,W,M]),Z=l.useMemo(()=>{let R=null;return R=W?W.createChildGroup(K,"standaloneWorkbook",!1):new r.Sa(K,"standaloneWorkbook"),R.addCommands(le,!0),R},[W,le]);r.ZT({manager:M,commands:Z,notifier:B});const{themeMode:ke}=r.SM();l.useEffect(()=>{if(!z||!Z)return;const R=z.forceMode==="dark"||!z.forceMode&&ke==="dark";Z.getCommand("themeMode").update({state:z.forceMode??null,label:R?"Dark Mode":"Light Mode",scopedLabels:{appearance:R?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Q(R?r.xM.Light:r.xM.Dark)}),Z.getCommand("defaultThemeMode").update({state:!z.forceMode}).updateCallback(()=>{Q(null)}),Z.getCommand("forceLightGrid").update({state:z.forceLightGrid}).updateCallback(()=>{ae(!z.forceLightGrid)}),Z.getCommand("forceLightImages").update({state:z.forceLightImages}).updateCallback(()=>{ne(!z.forceLightImages)})},[ke,z,le]);const{showModal:Ie}=r.P2();return l.useEffect(()=>{const R=()=>new Promise((X,g)=>{const C=l.lazy(()=>Promise.resolve().then(()=>require("./BDACVe5nzEmYknRm.cjs"))),V=Ie(C,{title:"Shortcut Keys Reference",commands:Z,onDone:()=>{V.hide()},TransitionProps:{onExited:()=>{X(!0)}}})});Z.getCommand("showKeyboardShortcuts").updateCallback(()=>R()),Z.getCommand("help").updateCallback(()=>R())},[le,Z]),Z})({workbook:i,setWorkbook:t,importExportDisabled:f,workbookTitle:a,setWorkbookTitle:s,commands:p,requestWorkbookTitle:F=>new Promise(S=>{n.current?n.current.requestWorkbookTitle((L,I)=>{S(L)},{selectAll:!0,requestReason:F}):S(u)}),themeModeOptions:x,undoManager:d,notifier:_,onExecute:P});l.useEffect(()=>{w.starting.size<=0||!w.isMounted||k(F=>{const S=new Map(F.running);return F.starting.forEach((L,I)=>{const D=()=>{k($=>{const B=new Map($.running);return B.delete(I),{...$,running:B}})};S.set(I,D),L(D)}),{...F,starting:new Map,running:S}})},[w]);const[G,Y]=l.useState(null);l.useEffect(()=>{w.starting.size!==0||w.running.size!==0?Y(m.jsx(r.Ea,{icon:m.jsx(r.lM,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:w.label,onMount:h,onUnmount:T,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):Y(null)},[w.starting,w.running]);const N=l.useMemo(()=>m.jsx(r.vM,{commands:H,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[H]),te={notifier:_,commands:H};return i&&(te.statusBarProps={childrenEnd:N}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,te):null]})}));Dt.displayName="SnackbarAndCommandsWrapper";const Ot=l.memo(l.forwardRef((e,o)=>{const{className:i,sx:t,style:n,onElementLoad:a,onError:s,undoManager:u,errorPanel:c=r.Yv,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:v,importExportDisabled:y=!1,themeModeOptions:b,autoFocus:w=!1,commands:k,title:h,onTitleChange:T,titleProps:E,...A}=e,j=l.useRef(null),q=r.ye(x,[x]),_=r.ye(T??E?.onTitleChange,[T??E?.onTitleChange]),P=E?.placeHolder??"Untitled",H=b?.forceMode,{themeMode:G,source:Y}=r.SM({mode:H}),N=l.useMemo(()=>({...b,light:r.aM(!1,r.F.deepMerge(b?.theme??{},b?.light??{})),dark:r.aM(!0,r.F.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),te=G===r.xM.Dark,[F,S]=l.useState(null);l.useEffect(()=>{S(u??new r.Vf)},[u]);const[L,I]=l.useState(null),[D,$]=l.useState(null),B=r.Lp();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!r.F.isPromiseLike(p)){const g={theme:B.getDefaultTheme(),...f};$(new r.Zy(g))}else $(p)},[p]),l.useLayoutEffect(()=>{if(D){if(D instanceof r.Zy)return I({workbook:D}),void(p!==D&&q?.(D));(async()=>{try{let g,C=await Promise.resolve(D);C&&C.source&&(C=await r.CM.read(C)),C.workbook?(U(C.title),g=C.workbook):g=C,q?.(g),I({workbook:g})}catch(g){q?.(null),I({error:g})}})()}},[D]);const[J,z]=l.useState(null);l.useEffect(()=>{if(!F||!L)return;F.clear();const g=L?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:C=>{C.getDescription()?F.addUndoOperation({description:C.getDescription(),undo:()=>(g.revert(C.getId()),J.source?.focus(),()=>{g.restore(C.getId()),J.source?.focus()})}):console.warn("commit has no description",C)}}):void 0},[F,L,J]);const M=r.ye(g=>{g?F.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):F.setRepeatableOperation(null)},[F]),[W,U]=l.useState(h??E?.title??"");l.useEffect(()=>{U(h??E?.title??"")},[h??E?.title]),l.useEffect(()=>{_?.(W)},[W]);const[Q,ae]=l.useState(null),ne=l.useMemo(()=>{const g=()=>({contains:C=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new r.Sa(g,"application")},[k]),Ne=r.ye(g=>{ae(g.source.getViewportElement()),z(g),ne.activate("sheet"),a?.(g)},[ne]);l.useEffect(()=>{J&&w&&J.source?.focus(typeof w=="object"?w:void 0)},[J]);const ge=l.useRef(null),K=l.useCallback(g=>{let C=null;return E?.hidden||(C=m.jsx(r.IT,{...E,style:{maxWidth:"100%",...E?.style},workbook:j.current,ref:ge,title:W,placeHolder:P,onTitleChange:V=>{U(V)}})),m.jsx(jt,{...g,logo:v,mainElement:C,showFileMenu:!y,showAppearanceMenu:!!(N?.onForceLightGridChange||N?.onForceLightImagesChange||N?.onForceModeChange)})},[v,W,E,N,y,ne]);l.useEffect(()=>{const g=C=>C.preventDefault();return j.current?.addEventListener("wheel",g,{passive:!1}),()=>{j.current?.removeEventListener("wheel",g)}},[]);const le=l.useMemo(()=>m.jsx(r.Ea,{transparentBackground:!0,sx:t,style:n}),[t,n]),Z=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),ke=l.useMemo(()=>({...t,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:g=>g.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[t]),Ie=r.au([j,o]),R=l.useMemo(()=>{if(!L)return le;if(L.error||!L.workbook)return Z({error:L.error});let g=null,C=null,V=!1;return N&&(g=te?N.dark:N.light,C=te&&!N.forceLightGrid?N.dark:N.light,V=N.forceLightImages),m.jsx(r.RT,{sx:ke,style:n,tabIndex:0,autoFocus:!0,workbook:L.workbook,ref:Ie,renderToolbar:K,onElementLoad:Ne,onRepeatCommandChange:M,onKeyDown:ee=>{d?.(ee)},gridTheme:C,headersTheme:g,forceLightImages:V,className:r.eo(i,"sheetxl-workbook"),onContextMenu:ee=>ee.preventDefault(),...A},"WorkbookElement")},[L,W,F,le,N,A,K,ke]);let X=m.jsx(Xt,{fallbackRender:Z,children:m.jsx(dn,{maxSnack:3,domRoot:Q,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,C,V)=>{j.current?.focus()},Components:{error:Lt},iconVariant:{success:m.jsx(r.SvgIcon,{style:{marginRight:"8px"},children:m.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:m.jsx(r.iM,{style:{marginRight:"8px"}})},children:m.jsx(r.sM,{children:m.jsx(Dt,{workbook:L?.workbook,setWorkbook:$,importExportDisabled:y,titlePlaceHolder:P,titleWorkbook:W,setWorkbookTitle:U,refWorkbookTitle:ge,commands:ne,undoManager:F,themeModeOptions:N,children:R})})})});return N&&(X=m.jsxs(r.OS,{theme:te?N.dark:N.light,children:[N.cssBaseline?m.jsx(Kt,{}):null,X]})),X}));Ot.displayName="EagerStandaloneWorkbook";const mn=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),fn=Object.freeze(Object.defineProperty({__proto__:null,E:mn,c:ie},Symbol.toStringTag,{value:"Module"}));exports.Collapse=Fe,exports.Dig0J4i2Urjl9Z__=fn,exports.fe=ie;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={ABS:{s:"Returns the absolute value of a number, a number without its sign",p:{number:{d:"is the real number for which you want the absolute value"}}},AGGREGATE:{s:"Returns information about the cell.",p:{functionNum:{d:"Is the number 1 to 19 that specifies the summary function for the aggregate."},options:{d:"Is the number 0 to 78 that specified the values to ignore for the aggregate."},array:{d:"Is the array or range of numerical data on which to calculate the aggregate."},K:{d:"indicates the position of the array; it is k-th largest, k-th smallest, k-th percentile, or k-th quartile."}},h:"Unimplemented"},ARABIC:{s:"Converts a Roman numeral to Arabic",p:{text:{d:"is the Roman numeral you want to convert"}}},BASE:{s:"Converts a number into a text representation with the given radix (base)",p:{number:{d:"is the number that you want to convert"},radix:{d:"is the base Radix that you want to convert the number into"},minLength:{d:"is the minimum length of the returned string",v:0}}},CEILING:{s:"Rounds a number up, to the nearest multiple of significance",p:{number:{d:"is the value you want to round"},significance:{d:"is the multiple to which you want to round",v:"undefined"}},c:"Compatible"},"CEILING.MATH":{s:"Rounds a number up, to the nearest integer or to the nearest multiple of significance",p:{number:{d:"is the real number you want to round"},significance:{d:"when given and nonzero this function will round away from zero",v:"undefined"},mode:{v:0}}},"CEILING.PRECISE":{s:"Rounds a number up to the nearest integer or to the nearest multiple of significance",p:{number:{d:"is the real number you want to round"},significance:{d:"is the multiple to which you want to round",v:1}},c:"Compatible"},COMBIN:{s:"Returns the number of combinations for a given number of items",p:{number:{d:"is the total number of items"},numberChosen:{d:"is the number of items in each combination"}}},COMBINA:{s:"Returns the number of combinations with repetitions for a given number of items",p:{number:{d:"is the total number of items"},numberChosen:{d:"is the number of items in each combination"}}},DECIMAL:{s:"Converts a text representation of a number in a given base into a decimal number",p:{number:{d:"is the number that you want to convert"},radix:{d:"is the base Radix of the number you are converting"}}},DEGREES:{s:"Converts radians to degrees",p:{angle:{d:"is the angle in radians that you want to convert"}}},EVEN:{s:"Rounds a positive number up and negative number down to the nearest even integer",p:{number:{d:"is the value to round"}}},EXP:{s:"Returns e raised to the power of a given number",p:{number:{d:"is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm"}}},FACT:{s:"Returns the factorial of a number, equal to 1*2*3*...* Number",p:{number:{d:"is the nonnegative number you want the factorial of"}}},FACTDOUBLE:{s:"Returns the double factorial of a number",p:{number:{d:"is the value for which to return the double factorial"}}},FLOOR:{s:"Rounds a number down to the nearest multiple of significance",p:{number:{d:"is the real number you want to round"},significance:{d:"is the multiple to which you want to round. Number and Significance must either both be positive or both be negative",v:"undefined"}},c:"Compatible"},"FLOOR.MATH":{s:"Rounds a number down, to the nearest integer or to the nearest multiple of significance",p:{number:{d:"is the real number you want to round"},significance:{d:"is the multiple to which you want to round",v:"undefined"},mode:{d:"when given and nonzero this function will round towards zero",v:0}}},"FLOOR.PRECISE":{s:"Rounds a number down to the nearest integer or to the nearest multiple of significance",p:{number:{d:"is the real number you want to round"},significance:{d:"is the multiple to which you want to round",v:1}}},GCD:{s:"Returns the greatest common divisor",p:{number:{d:"number1,number2,... are 1 to 255 values"}}},INT:{s:"Rounds a number down to the nearest integer",p:{number:{d:"is the real number you want to round down to an integer"}}},"ISO.CEILING":{s:"Rounds a number up to the nearest integer",p:{number:{d:"is the real number you want to round up to an integer"},significance:{d:"is the multiple to which you want to round number",v:"undefined"}},c:"Compatible"},LCM:{s:"Returns the least common multiple",p:{number:{d:"number1,number2,... are 1 to 255 values for which you want the least common multiple"}}},LN:{s:"Returns the natural logarithm of a number",p:{number:{d:"is the positive real number for which you want the natural logarithm"}}},LOG:{s:"Returns the logarithm of a number to the base you specify",p:{number:{d:"is the positive real number for which you want the logarithm"},base:{d:"is the base of the logarithm",v:10}}},LOG10:{s:"Returns the base-10 logarithm of a number",p:{number:{d:"is the positive real number for which you want the base-10 logarithm"}}},MDETERM:{s:"Returns the matrix determinant of an array",p:{array:{d:"is a numeric array with an equal number of rows and columns, either a cell range or an array constant"}}},MINVERSE:{s:"Returns the inverse matrix for the matrix stored in an array",p:{array:{d:"is a numeric array with an equal number of rows and columns, either a cell range or an array constant"}}},MMULT:{s:"Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2",p:{array1:{d:"is the first array of numbers to multiply and must have the same number of columns as Array2 has rows"},array2:{d:"is the second array of numbers to multiply and must have the same number of columns as Array1 has rows"}}},MOD:{s:"Returns the remainder after a number is divided by a divisor",p:{number:{d:"is the number for which you want to find the remainder after the division is performed"},divisor:{d:"is the number by which you want to divide Number"}}},MROUND:{s:"Returns a number rounded to the desired multiple",p:{number:{d:"is the value to round"},multiple:{d:"is the multiple to which you want to round number"}}},MULTINOMIAL:{s:"Returns the multinomial of a set of numbers",p:{number:{d:"number1,number2,... are 1 to 255 values for which you want the multinomial"}}},MUNIT:{s:"Returns the unit matrix for the specified dimension",p:{dimension:{d:"is an integer specifying the dimension of the unit matrix that you want to return"}}},ODD:{s:"Rounds a positive number up and negative number down to the nearest odd integer",p:{number:{d:"is the value to round"}}},PI:{s:"Returns the value of Pi, 3.14159265358979, accurate to 15 digits",p:{}},POWER:{s:"Returns the result of a number raised to a power",p:{number:{d:"is the base number, any real number"},power:{d:"is the exponent, to which the base number is raised"}}},PRODUCT:{s:"Multiplies all the numbers given as arguments",p:{number:{d:"number1,number2,... are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply"}}},QUOTIENT:{s:"Returns the integer portion of a division",p:{numerator:{d:"is the dividend"},denominator:{d:"is the divisor"}}},RADIANS:{s:"Converts degrees to radians",p:{angle:{d:"is an angle in degrees that you want to convert"}}},RAND:{s:"Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation)",p:{}},RANDARRAY:{s:"Returns an array of random numbers",p:{rows:{d:"the number of rows in the returned array",v:1},columns:{d:"the number of columns in the returned array",v:1},min:{d:"the minimum number you would like returned",v:0},max:{d:"the maximum number you would like returned",v:1},integer:{d:"return an integer or a decimal value. TRUE for an integer, FALSE for a decimal number",v:!1}}},RANDBETWEEN:{s:"Returns a random number between the numbers you specify",p:{bottom:{d:"is the smallest integer RANDBETWEEN will return"},top:{d:"is the largest integer RANDBETWEEN will return"}}},ROMAN:{s:"Converts an Arabic numeral to Roman, as text",p:{number:{d:"is the Arabic numeral you want to convert"},form:{d:"is the number specifying the type of Roman numeral you want.",v:0}}},ROUND:{s:"Rounds a number to a specified number of digits",p:{number:{d:"is the number you want to round"},numDigits:{d:"is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer"}}},ROUNDDOWN:{s:"Rounds a number down, toward zero",p:{number:{d:"is any real number that you want rounded down"},numDigits:{d:"is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer"}}},ROUNDUP:{s:"Rounds a number up, away from zero",p:{number:{d:"is any real number that you want rounded up"},numDigits:{d:"is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer"}}},SEQUENCE:{s:"Returns a sequence of numbers",p:{rows:{d:"the number of rows to return"},columns:{d:"the number of columns to return",v:1},start:{d:"the first number in the sequence",v:1},step:{d:"the amount to increment each subsequent value in the sequence",v:1}}},SERIESSUM:{s:"Returns the sum of a power series based on the formula",p:{x:{d:"is the input value to the power series"},n:{d:"is the initial power to which you want to raise x"},m:{d:"is the step by which to increase n for each term in the series"},coefficients:{d:"is a set of coefficients by which each successive power of x is multiplied"}}},SIGN:{s:"Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative",p:{number:{d:"is any real number"}}},SQRT:{s:"Returns the square root of a number",p:{number:{d:"is the number for which you want the square root"}}},SQRTPI:{s:"Returns the square root of (number * Pi)",p:{number:{d:"is the number by which p is multiplied"}}},SUBTOTAL:{s:"Returns a subtotal in a list or database",p:{functionNum:{d:"is the number 1 to 11 that specifies the summary function for the subtotal."},ref:{d:"ref1,ref2,... are 1 to 254 ranges or references for which you want the subtotal"}},h:"Unimplemented"},SUM:{s:"Adds all the numbers in a range of cells",p:{number:{d:"number1,number2,... are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments"}}},SUMIF:{s:"Adds the cells specified by a given condition or criteria",p:{range:{d:"is the range of cells you want evaluated"},criteria:{d:"is the condition or criteria in the form of a number, expression, or text that defines which cells will be added"},sumRange:{d:"are the actual cells to sum. If omitted, the cells in range are used"}},h:"Unimplemented"},SUMIFS:{s:"Adds the cells specified by a given set of conditions or criteria",p:{sumRange:{d:"are the actual cells to sum."},criteriaRange:{d:"criteria_range1,criteria_range2,... is the range of cells you want evaluated for the particular condition"},criteria:{d:"criteria1,criteria2,... is the condition or criteria in the form of a number, expression, or text that defines which cells will be added"}},h:"Unimplemented"},SUMPRODUCT:{s:"Returns the sum of the products of corresponding ranges or arrays",p:{array1:{d:"array1,array2,... are 2 to 255 arrays for which you want to multiply and then add components. All arrays must have the same dimensions"},rest:{}}},SUMSQ:{s:"Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers",p:{number:{d:"number1,number2,... are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares"}}},SUMX2MY2:{s:"Sums the differences between the squares of two corresponding ranges or arrays",p:{arrayX:{d:"is the first range or array of numbers and can be a number or name, array, or reference that contains numbers"},arrayY:{d:"is the second range or array of numbers and can be a number or name, array, or reference that contains numbers"}}},SUMX2PY2:{s:"Returns the sum total of the sums of squares of numbers in two corresponding ranges or arrays",p:{arrayX:{d:"is the first range or array of numbers and can be a number or name, array, or reference that contains numbers"},arrayY:{d:"is the second range or array of numbers and can be a number or name, array, or reference that contains numbers"}}},SUMXMY2:{s:"Sums the squares of the differences in two corresponding ranges or arrays",p:{arrayX:{d:"is the first range or array of numbers and can be a number or name, array, or reference that contains numbers"},arrayY:{d:"is the second range or array of numbers and can be a number or name, array, or reference that contains numbers"}}},TRUNC:{s:"Truncates a number to an integer by removing the decimal, or fractional, part of the number",p:{number:{d:"is the number you want to truncate"},numDigits:{d:"is a number specifying the precision of the truncation",v:0}}}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={ENCODEURL:{s:"Returns a URL-encoded string",p:{text:{d:"is a string to be URL encoded"}}},WEBSERVICE:{s:"Retrieves data from a web service.",p:{url:{d:"is the URL of the web service"}}}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={DAVERAGE:{s:"Averages the values in a column in a list or database that match conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DCOUNT:{s:"Counts the cells containing numbers in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DCOUNTA:{s:"Counts nonblank cells in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DGET:{s:"Extracts from a database a single record that matches the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DMAX:{s:"Returns the largest number in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DMIN:{s:"Returns the smallest number in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DPRODUCT:{s:"Multiplies the values in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DSTDEV:{s:"Estimates the standard deviation based on a sample from selected database entries",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DSTDEVP:{s:"Calculates the standard deviation based on the entire population of selected database entries",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DSUM:{s:"Adds the numbers in the field (column) of records in the database that match the conditions you specify",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DVAR:{s:"Estimates variance based on a sample from selected database entries",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"},DVARP:{s:"Calculates variance based on the entire population of selected database entries",p:{database:{d:"is the range of cells that makes up the list or database. A database is a list of related data"},field:{d:"is either the label of the column in double quotation marks or a number that represents the column's position in the list"},criteria:{d:"is the range of cells that contains the conditions you specify. The range includes a column label and one cell below the label for a condition"}},h:"Unimplemented"}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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 y=require("./BnZdvx8z2BIDZv9J.cjs");exports.fromBufferCSV=async(a,d)=>{const{papaParseConfig:i,setValuesOptions:p,constructorOptions:h}=d??{},o=await Promise.resolve().then(()=>require("./DD0VHDU8F1FiLKcs.cjs")).then(n=>n.p),m=new TextDecoder().decode(a);let f=-1;const t=new y.Zy(h),c=t.getSelectedSheet().getEntireRange().startIncrementalUpdates({orientation:y.k.Orientation.Row}),u=d?.onProgress;let e=0;const r={...i,transform:(n,g)=>{i?.transform&&(n=i.transform(n,g));const s=g;s===0&&f++;let l=n??"";return c.pushAt(f,s,l),e++,e%1e5==0&&u?.(e),n}};return o.parse(m,r).data,c.apply({textParser:!0,...p}),t},exports.toBufferCSV=async(a,d)=>{const{trimLeadingBlankRow:i=!0,trimLeadingBlankColumn:p=!0,excludeHidden:h=!1,sheetKey:o=null,papaParseConfig:m={}}=d||{},f=await Promise.resolve().then(()=>require("./DD0VHDU8F1FiLKcs.cjs")).then(s=>s.p);if(!a)throw new Error("workbook must be specified");let t=null;if(o===null?t=a.getSelectedSheet():typeof o=="number"?t=a.getSheets().search()[o]:typeof o=="string"&&(t=a.getSheets().getByName(o)),!t)throw new Error("invalid sheetKey specified");let c=null;const u=[];let e=null,r=t.getUsedRange({excludeHidden:h});if(!r)throw new Error("Nothing to export");if(!i||!p){const s=i?r.getRowStart():0,l=p?r.getColumnStart():0;r=r.getOffsetTo(s,l)}r.forEach((s,l)=>{const w=l.getCoords(),S=l.getCell();c!==w.rowIndex&&(e&&u.push(e),e=[],c=w.rowIndex);const x=S.toTextUnformatted()??"";e.push(x)},{includeEmpty:!0,address:null}),e&&u.push(e);const n={...m},g=f.unparse(u,n);return new TextEncoder().encode(g)};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={DATE:{s:"Returns the number that represents the date in Microsoft Excel date-time code",p:{year:{d:"is a number from 1900 or 1904 (depending on the workbook's date system) to 9999"},month:{d:"is a number from 1 to 12 representing the month of the year"},day:{d:"is a number from 1 to 31 representing the day of the month"}}},DATEDIF:{s:"Returns the number of days between two dates",p:{startDate:{d:"is a serial date number that represents the start date"},endDate:{d:"is a serial date number that represents the end date"},unit:{d:"is a string that specifies the unit of time to use"}},h:"Legacy"},DATESTRING:{s:"Returns NA.",p:{number:{d:"is a number that is ignored"}},h:"Legacy"},DATEVALUE:{s:"Converts a date in the form of text to a number that represents the date in Microsoft Excel date-time code",p:{dateText:{d:"is text that represents a date in a Microsoft Excel date format, between 1/1/1900 or 1/1/1904 (depending on the workbook's date system) and 12/31/9999"}}},DAY:{s:"Returns the day of the month, a number from 1 to 31.",p:{serialOrString:{d:"is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM"}}},DAYS:{s:"Returns the number of days between the two dates.",p:{endDate:{d:"start_date and end_date are the two dates between which you want to know the number of days"},startDate:{d:"start_date and end_date are the two dates between which you want to know the number of days"}}},DAYS360:{s:"Returns the number of days between two dates based on a 360-day year (twelve 30-day months)",p:{startDate:{d:"start_date and end_date are the two dates between which you want to know the number of days"},endDate:{d:"start_date and end_date are the two dates between which you want to know the number of days"},method:{d:"is a logical value specifying the calculation method: U.S. (NASD) = FALSE; European = TRUE.",v:!1}}},EDATE:{s:"Returns the serial number of the date that is the indicated number of months before or after the start date",p:{startDate:{d:"is a serial date number that represents the start date"},months:{d:"is the number of months before or after start_date"}}},EOMONTH:{s:"Returns the serial number of the last day of the month before or after a specified number of months",p:{startDate:{d:"is a serial date number that represents the start date"},months:{d:"is the number of months before or after the start_date"}}},HOUR:{s:"Returns the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.).",p:{serialOrString:{d:"is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM"}}},ISOWEEKNUM:{s:"Returns the ISO week number in the year for a given date",p:{serialOrString:{d:"is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM"}}},MINUTE:{s:"Returns the minute, a number from 0 to 59.",p:{serialOrString:{d:"is a number in the date-time code used by Excel or text in time format, such as 16:48:00 or 4:48:00 PM"}}},MONTH:{s:"Returns the month, a number from 1 (January) to 12 (December).",p:{serialOrString:{d:"is a number in the date-time code used by Excel"}}},NETWORKDAYS:{s:"Returns the number of whole workdays between two dates",p:{startDate:{d:"is a serial date number that represents the start date"},endDate:{d:"is a serial date number that represents the end date"},holidays:{d:"is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays",v:null}}},"NETWORKDAYS.INTL":{s:"Returns the number of whole workdays between two dates with custom weekend parameters",p:{startDate:{d:"is a serial date number that represents the start date"},endDate:{d:"is a serial date number that represents the end date"},weekend:{d:"is a number or string specifying when weekends occur",v:1},holidays:{d:"is an optional set of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays",v:null}}},NOW:{s:"Returns the current date and time formatted as a date and time.",p:{}},SECOND:{s:"Returns the second, a number from 0 to 59.",p:{serialOrString:{d:"is a number in the date-time code used by Excel or text in time format, such as 16:48:23 or 4:48:47 PM"}}},TIME:{s:"Converts hours, minutes, and seconds given as numbers to an Excel serial number, formatted with a time format",p:{hour:{d:"is a number from 0 to 23 representing the hour"},minute:{d:"is a number from 0 to 59 representing the minute"},second:{d:"is a number from 0 to 59 representing the second"}}},TIMEVALUE:{s:"Converts a text time to an Excel serial number for a time, a number from 0 (12:00:00 AM) to 0.999988426 (11:59:59 PM). Format the number with a time format after entering the formula",p:{timeText:{d:"is a text string that gives a time in any one of the Excel time formats (date information in the string is ignored)"}}},TODAY:{s:"Returns the current date formatted as a date.",p:{}},WEEKDAY:{s:"Returns a number from 1 to 7 identifying the day of the week of a date.",p:{serialOrString:{d:"is a number that represents a date"},returnType:{d:"is a number: for Sunday=1 through Saturday=7, use 1; for Monday=1 through Sunday=7, use 2; for Monday=0 through Sunday=6, use 3",v:1}}},WEEKNUM:{s:"Returns the week number in the year",p:{serialOrString:{d:"is the date-time code used by Excel for date and time calculation"},returnType:{d:"is a number (1 or 2) that determines the type of the return value",v:1}}},WORKDAY:{s:"Returns the serial number of the date before or after a specified number of workdays",p:{startDate:{d:"is a serial date number that represents the start date"},days:{d:"is the number of nonweekend and non-holiday days before or after start_date"},holidays:{d:"is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays",v:null}}},"WORKDAY.INTL":{s:"Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters",p:{startDate:{d:"is a serial date number that represents the start date"},days:{d:"is the number of nonweekend and non-holiday days before or after start_date"},weekend:{d:"is a number or string specifying when weekends occur",v:1},holidays:{d:"is an optional array of one or more serial date numbers to exclude from the working calendar, such as state and federal holidays and floating holidays",v:null}}},YEAR:{s:"Returns the year of a date, an integer in the range 1900 - 9999.",p:{serialOrString:{d:"is a number in the date-time code used by Excel"}}},YEARFRAC:{s:"Returns the year fraction representing the number of whole days between start_date and end_date",p:{startDate:{d:"is a serial date number that represents the start date"},endDate:{d:"is a serial date number that represents the end date"},basis:{d:"is the type of day count basis to use",v:0}}}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={ASC:{s:"Converts a string to full-width characters to half-width. Uses the double-byte character set (DBCS).",p:{text:{d:"is a text or a reference to a cell containing text"}},h:"DBCS"},ARRAYTOTEXT:{s:"Returns a text representation of an array",p:{array:{d:"the array to represent as text"},format:{d:"0 for relaxed format, 1 for strict format",v:0}}},CHAR:{s:"Returns the character specified by the code number from the character set for your computer",p:{number:{d:"is a number between 1 and 255 specifying which character you want"}}},CLEAN:{s:"Removes all nonprintable characters from text",p:{text:{d:"is the text you want to clean"}}},CODE:{s:"Returns the Unicode value of the first character in a text string",p:{text:{d:"is the text string whose Unicode value you want"}}},CONCAT:{s:"Concatenates a list or range of text strings",p:{text:{d:"text1,text2,... are 1 to 252 text strings or ranges to be joined"}}},CONCATENATE:{s:"Joins several text strings into one text string",p:{text:{d:"text1, text2,... are 1 to 252 text strings or ranges to be joined"}},c:"Compatibility"},DETECTLANGUAGE:{s:"Detects the language of a given text.",p:{text:{d:"is the text to detect the language of"}},h:"Unimplemented"},DBCS:{s:"Changes half-width characters to full-width characters. Uses the double-byte character set (DBCS).",p:{text:{d:"is a text or a reference to a cell containing text"}},h:"DBCS"},DOLLAR:{s:"Converts a number to text in currency format",p:{number:{d:"is the number to convert"},decimals:{d:"is the number of digits to the right of the decimal point",v:2}}},EXACT:{s:"Checks whether two text strings are exactly the same, and returns TRUE or FALSE. EXACT is case-sensitive",p:{text1:{d:"is the first text string"},text2:{d:"is the second text string"}}},FIND:{s:"Returns the starting position of one text string within another text string. FIND is case-sensitive",p:{findText:{d:"Returns the starting position of one text string within another text string. FIND is case-sensitive"},withinText:{d:"is the text you want to search"},startNum:{d:"specifies the character at which to start the search. The first character in Within_text is character number 1",v:1}}},FINDB:{s:"Finds the starting position of one text string with another text string. FINDB is case-sensitive. Use with double-byte characters.",p:{findText:{d:"is the text you want to find"},withinText:{d:"is the text you want to search"},startNum:{d:"is the position in within_text to start searching",v:1}},h:"DBCS"},FIXED:{s:"Rounds a number to the specified number of decimals and returns the result as text with or without commas",p:{number:{d:"is the number you want to round and convert to text"},decimals:{d:"is the number of digits to the right of the decimal point",v:2},noCommas:{d:"is a logical value: do not display commas in the returned text = TRUE; do display commas in the returned text = FALSE",v:!1}}},LEFT:{s:"Returns the specified number of characters from the start of a text string",p:{text:{d:"is the text string from which you want to extract characters"},numChars:{d:"specifies how many characters you want LEFT to extract",v:1}}},LEFTB:{s:"Returns the leftmost num_bytes characters from text. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},numBytes:{d:"is the number of bytes to extract",v:1}},h:"DBCS"},LEN:{s:"Returns the number of characters in a text string",p:{text:{d:"is the text whose length you want to find. Spaces count as characters"}}},LENB:{s:"Returns the number of bytes in a text string. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"}}},LOWER:{s:"Converts all letters in a text string to lowercase",p:{text:{d:"is the text you want to convert to lowercase. Characters in Text that are not letters are not changed"}}},MID:{s:"Returns the characters from the middle of a text string, given a starting position and length",p:{text:{d:"is the text string from which you want to extract characters"},startNum:{d:"is the position of the first character you want to extract"},numChars:{d:"specifies how many characters to return from Text"}}},MIDB:{s:"Returns characters from the middle of a text string. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},startNum:{d:"is the position of the first character you want to extract"},numBytes:{d:"is the number of bytes to extract"}},h:"DBCS"},NUMBERVALUE:{s:"Converts text to number in a locale-independent manner",p:{text:{d:"is the text string you want to convert"},decimalSeparator:{d:"is the character that separates the integer part from the decimal part of the number",v:"."},groupSeparator:{d:"is the character that separates groups of thousands",v:","}}},PERCENTOF:{s:"Returns the percentage of a subset of a given data set",p:{dataSubset:{d:"is the subset"},dataAll:{d:"is the data set"}},h:"Unimplemented"},PHONETIC:{s:"Returns the phonetic spelling of a text string",p:{reference:{d:"Text string or a reference to a single cell or a range of cells that contain a furigana text string"}},h:"Unimplemented"},PROPER:{s:"Converts the first letter of each word in a text string to uppercase",p:{text:{d:"is the text string you want to convert"}}},REGEXEXTRACT:{s:"Extracts substrings of 'text' based on the provided REGEX 'pattern'",p:{text:{d:"is the text string from which you want to extract characters"},pattern:{d:"The regular expression to be applied"},returnMode:{d:"Specify which matches to return",v:0},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REGEXREPLACE:{s:"Returns 'text', with 'replacement' in place of matches with 'pattern'",p:{text:{d:"is the text string from which you want to extract characters"},pattern:{d:"The regular expression to be applied"},replacement:{d:"The replacement string"},occurrence:{d:"The occurrence of the match to replace",v:0},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REGEXTEST:{s:"Checks whether the input matches the pattern, and returns TRUE or FALSE",p:{text:{d:"is the text string to be checked"},pattern:{d:"is the regular expression to be applied"},caseSensitivity:{d:"Whether the match is case sensitive",v:!1}},h:"Unimplemented"},REPLACE:{s:"Replaces part of a text string with a different text string",p:{oldText:{d:"is the text string to be changed"},startNum:{d:"is the position of the first character you want to replace"},numChars:{d:"is the number of characters to replace"},newText:{d:"is the text string that will replace old_text"}}},REPLACEB:{s:"Replaces part of a text string with a different text string using the number of bytes. Uses the double-byte character set (DBCS).",p:{oldText:{d:"is the text string to be changed"},startNum:{d:"is the position of the first character you want to replace"},numBytes:{d:"is the number of bytes to replace"},newText:{d:"is the text string that will replace old_text"}},h:"DBCS"},REPT:{s:"Repeats text a given number of times",p:{text:{d:"is the text you want to repeat"},numberTimes:{d:"is the number of times you want to repeat text"}}},RIGHT:{s:"Returns the specified number of characters from the end of a text string",p:{text:{d:"is the text string that contains the characters you want to extract"},numChars:{d:"specifies how many characters you want to extract",v:1}}},RIGHTB:{s:"Returns the rightmost num_bytes characters from text. Uses double-byte characters.",p:{text:{d:"is the text string from which you want to extract characters"},numBytes:{d:"is the number of bytes to extract",v:1}}},SEARCH:{s:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)",p:{findText:{d:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)"},withinText:{d:"is the text in which you want to search for Find_text"},startNum:{d:"is the character number in Within_text, counting from the left, at which you want to start searching",v:1}}},SEARCHB:{s:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive). Uses the double-byte character set (DBCS).",p:{findText:{d:"Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive)"},withinText:{d:"is the text in which you want to search for Find_text"},startBytes:{d:"is the character number in Within_text, counting from the left, at which you want to start searching",v:1}},h:"DBCS"},SUBSTITUTE:{s:"Replaces existing text with new text in a text string",p:{text:{d:"is the text or the reference to a cell containing text in which you want to substitute characters"},oldText:{d:"is the existing text you want to replace. If the case of Old_text does not match the case of text, SUBSTITUTE will not replace the text"},newText:{d:"is the text you want to replace Old_text with"},instanceNum:{d:"specifies which occurrence of Old_text you want to replace. If omitted, every instance of Old_text is replaced"}}},T:{s:"Checks whether a value is text, and returns the text if it is, or returns double quotes (empty text) if it is not",p:{value:{d:"is the value to test"}}},TEXT:{s:"Converts a value to text in a specific number format",p:{value:{d:"is a number, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value"},formatText:{d:"is a text string that defines the number format to use"}}},TEXTAFTER:{s:"Returns text that's after delimiting characters.",p:{text:{d:"The text you want to search for the delimiter."},delimiter:{d:"The character or string to use as a delimiter."},instanceNum:{d:"The desired occurrence of delimiter. The default is 1. A negative number searches from the end.",v:1},matchMode:{d:"Searches the text for a delimiter match. By default, a case-sensitive match is done.",v:0},matchEnd:{d:"Whether to match the delimiter against the end of text. By default, they're not matched.",v:0},ifNotFound:{d:"Returned if no match is found. By default, #N/A is returned.",v:"undefined"}}},TEXTJOIN:{s:"Concatenates a list or range of text strings using a delimiter",p:{delimiter:{d:"Character or string to insert between each text item"},ignoreEmpty:{d:"if TRUE(default), ignores empty cells"},text:{d:"text1,text2,... are 1 to 252 text strings or ranges to be joined"}}},TEXTSPLIT:{s:"Splits text into rows or columns using delimiters.",p:{text:{d:"The text to split"},colDelimiter:{d:"The column delimiter(s) - can be string or array of strings"},rowDelimiter:{d:"The row delimiter(s), null/undefined means no row splitting",v:null},ignoreEmpty:{d:"Whether to ignore empty values (defaults to `false`)",v:!1},matchMode:{d:"Whether to use case-sensitive (0) or case-insensitive (1) match (defaults to `0`)",v:0},padWith:{d:"Value to use for padding if matrix is uneven (defaults to `#N/A`)",v:"undefined"}}},TEXTBEFORE:{s:"Returns text that's before delimiting characters.",p:{text:{d:"The text you want to search for the delimiter."},delimiter:{d:"The character or string to use as a delimiter."},instanceNum:{d:"The desired occurrence of delimiter. The default is 1. A negative number searches from the end.",v:1},matchMode:{d:"Whether to use case-sensitive (0) or case-insensitive (1) match (defaults to `0`)",v:0},matchEnd:{d:"Whether to match the delimiter against the end of text. By default, they're not matched.",v:0},ifNotFound:{d:"Returned if no match is found. By default, #N/A is returned.",v:"undefined"}}},TRANSLATE:{s:"Translate a text string from one language to another using the Microsoft Translator service.",p:{text:{d:"The text to translate."},sourceLanguage:{d:"Specifiy the source language your text is currently in. Expressed as a two-letter language code."},targetLanguage:{d:"Specifiy the source language you want your text to be translated to. Expressed as a two-letter language code."}},h:"Unimplemented"},TRIM:{s:"Removes all spaces from text except for single spaces between words.",p:{text:{d:"The text from which you want to remove extra spaces."}}},UNICHAR:{s:"Returns the Unicode character referenced by the given numeric value",p:{number:{d:"is the Unicode number representing a character"}}},UNICODE:{s:"Returns the number (code point) corresponding to the first character of the text",p:{text:{d:"is the character that you want the Unicode value of"}}},UPPER:{s:"Converts a text string to all uppercase letters",p:{text:{d:"is the text you want converted to uppercase, a reference or a text string"}}},VALUE:{s:"Converts a text string that represents a number to a number",p:{text:{d:"is the text enclosed in quotation marks or a reference to a cell containing the text you want to convert"}}},VALUETOTEXT:{s:"Returns a text representation of a value",p:{value:{d:"the value to represent as text"},format:{d:"the format of the text",v:0}}}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});let e=null;exports.initialize=async function(){return e||(e=new Promise(async(s,r)=>{try{const i="0.20.2",a=`https://esm.sh/esbuild-wasm@${i}`,l=`https://esm.sh/esbuild-wasm@${i}/esbuild.wasm`,t=(await import(a)).default;await t.initialize({wasmURL:l,worker:!1}),s(t)}catch(i){console.error("Error initializing esbuild:",i),r(i)}}),e)};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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 yt=require("./BnZdvx8z2BIDZv9J.cjs");var ct,pt={exports:{}},gt=(ct||(ct=1,pt.exports=function Y(){var Q,k=typeof self<"u"?self:typeof window<"u"?window:k!==void 0?k:{},P=!k.document&&!!k.postMessage,B=k.IS_PAPA_WORKER||!1,J={},mt=0,a={};function K(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var i=at(e);i.chunkSize=parseInt(i.chunkSize),e.step||e.chunk||(i.chunkSize=null),this._handle=new ht(i),(this._handle.streamer=this)._config=i}.call(this,t),this.parseChunk=function(e,i){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let l=this._config.newline;l||(r=this._config.quoteChar||'"',l=this._handle.guessLineEndings(e,r)),e=[...e.split(l).slice(n)].join(l)}this.isFirstChunk&&_(this._config.beforeFirstChunk)&&(r=this._config.beforeFirstChunk(e))!==void 0&&(e=r),this.isFirstChunk=!1,this._halted=!1,n=this._partialLine+e;var r=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=r.meta.cursor,this._finished||(this._partialLine=n.substring(e-this._baseIndex),this._baseIndex=e),r&&r.data&&(this._rowCount+=r.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,B)k.postMessage({results:r,workerId:a.WORKER_ID,finished:n});else if(_(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=r=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!n||!_(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):B&&this._config.error&&k.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function it(t){var e;(t=t||{}).chunkSize||(t.chunkSize=a.RemoteChunkSize),K.call(this,t),this._nextChunk=P?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(i){this._input=i,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),P||(e.onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!P),this._config.downloadRequestHeaders){var i,n=this._config.downloadRequestHeaders;for(i in n)e.setRequestHeader(i,n[i])}var r;this._config.chunkSize&&(r=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+r));try{e.send(this._config.downloadRequestBody)}catch(l){this._chunkError(l.message)}P&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){var i;e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=((i=(i=e).getResponseHeader("Content-Range"))!==null?parseInt(i.substring(i.lastIndexOf("/")+1)):-1),this.parseChunk(e.responseText)))},this._chunkError=function(i){i=e.statusText||i,this._sendError(new Error(i))}}function rt(t){(t=t||{}).chunkSize||(t.chunkSize=a.LocalChunkSize),K.call(this,t);var e,i,n=typeof FileReader<"u";this.stream=function(r){this._input=r,i=r.slice||r.webkitSlice||r.mozSlice,n?((e=new FileReader).onload=$(this._chunkLoaded,this),e.onerror=$(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var r=this._input,l=(this._config.chunkSize&&(l=Math.min(this._start+this._config.chunkSize,this._input.size),r=i.call(r,this._start,l)),e.readAsText(r,this._config.encoding));n||this._chunkLoaded({target:{result:l}})},this._chunkLoaded=function(r){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(r.target.result)},this._chunkError=function(){this._sendError(e.error)}}function X(t){var e;K.call(this,t=t||{}),this.stream=function(i){return e=i,this._nextChunk()},this._nextChunk=function(){var i,n;if(!this._finished)return i=this._config.chunkSize,e=i?(n=e.substring(0,i),e.substring(i)):(n=e,""),this._finished=!e,this.parseChunk(n)}}function nt(t){K.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){K.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){K.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(r){this._input=r,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=$(function(r){try{e.push(typeof r=="string"?r:r.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(l){this._streamError(l)}},this),this._streamError=$(function(r){this._streamCleanUp(),this._sendError(r)},this),this._streamEnd=$(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=$(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ht(t){var e,i,n,r,l=Math.pow(2,53),v=-l,M=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,w=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,m=this,T=0,o=0,j=!1,u=!1,p=[],s={data:[],errors:[],meta:{}};function C(h){return t.skipEmptyLines==="greedy"?h.join("").trim()==="":h.length===1&&h[0].length===0}function R(){if(s&&n&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines&&(s.data=s.data.filter(function(f){return!C(f)})),L()){let f=function(O,A){_(t.transformHeader)&&(O=t.transformHeader(O,A)),p.push(O)};if(s)if(Array.isArray(s.data[0])){for(var h=0;L()&&h<s.data.length;h++)s.data[h].forEach(f);s.data.splice(0,1)}else s.data.forEach(f)}function c(f,O){for(var A=t.header?{}:[],b=0;b<f.length;b++){var y=b,g=f[b];g=((U,d)=>{return S=U,t.dynamicTypingFunction&&t.dynamicTyping[S]===void 0&&(t.dynamicTyping[S]=t.dynamicTypingFunction(S)),(t.dynamicTyping[S]||t.dynamicTyping)===!0?d==="true"||d==="TRUE"||d!=="false"&&d!=="FALSE"&&((I=>{if(M.test(I)&&(I=parseFloat(I),v<I&&I<l))return 1})(d)?parseFloat(d):w.test(d)?new Date(d):d===""?null:d):d;var S})(y=t.header?b>=p.length?"__parsed_extra":p[b]:y,g=t.transform?t.transform(g,y):g),y==="__parsed_extra"?(A[y]=A[y]||[],A[y].push(g)):A[y]=g}return t.header&&(b>p.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+b,o+O):b<p.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+b,o+O)),A}var E;s&&(t.header||t.dynamicTyping||t.transform)&&(E=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(c),E=s.data.length):s.data=c(s.data,0),t.header&&s.meta&&(s.meta.fields=p),o+=E)}function L(){return t.header&&p.length===0}function z(h,c,E,f){h={type:h,code:c,message:E},f!==void 0&&(h.row=f),s.errors.push(h)}_(t.step)&&(r=t.step,t.step=function(h){s=h,L()?R():(R(),s.data.length!==0&&(T+=h.data.length,t.preview&&T>t.preview?i.abort():(s.data=s.data[0],r(s,m))))}),this.parse=function(h,c,E){var f=t.quoteChar||'"';return t.newline||(t.newline=this.guessLineEndings(h,f)),n=!1,t.delimiter?_(t.delimiter)&&(t.delimiter=t.delimiter(h),s.meta.delimiter=t.delimiter):((f=((O,A,b,y,g)=>{var U,d,S,I;g=g||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var Z=0;Z<g.length;Z++){for(var W,tt=g[Z],F=0,D=0,x=0,q=(S=void 0,new st({comments:y,delimiter:tt,newline:A,preview:10}).parse(O)),H=0;H<q.data.length;H++)b&&C(q.data[H])?x++:(D+=W=q.data[H].length,S===void 0?S=W:0<W&&(F+=Math.abs(W-S),S=W));0<q.data.length&&(D/=q.data.length-x),(d===void 0||F<=d)&&(I===void 0||I<D)&&1.99<D&&(d=F,U=tt,I=D)}return{successful:!!(t.delimiter=U),bestDelimiter:U}})(h,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=f.bestDelimiter:(n=!0,t.delimiter=a.DefaultDelimiter),s.meta.delimiter=t.delimiter),f=at(t),t.preview&&t.header&&f.preview++,e=h,i=new st(f),s=i.parse(e,c,E),R(),j?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,i.abort(),e=_(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){m.streamer._halted?(j=!1,m.streamer.parseChunk(e,!0)):setTimeout(m.resume,3)},this.aborted=function(){return u},this.abort=function(){u=!0,i.abort(),s.meta.aborted=!0,_(t.complete)&&t.complete(s),e=""},this.guessLineEndings=function(h,c){h=h.substring(0,1048576),c=new RegExp(V(c)+"([^]*?)"+V(c),"gm");var E=(h=h.replace(c,"")).split("\r");if(h=1<(c=h.split(`
|
|
7
|
-
`)).length&&c[0].length<E[0].length,E.length===1||h)return`
|
|
8
|
-
`;for(var f=0,O=0;O<E.length;O++)E[O][0]===`
|
|
9
|
-
`&&f++;return f>=E.length/2?`\r
|
|
10
|
-
`:"\r"}}function V(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(t){var e=(t=t||{}).delimiter,i=t.newline,n=t.comments,r=t.step,l=t.preview,v=t.fastMode,M=null,w=!1,m=t.quoteChar==null?'"':t.quoteChar,T=m;if(t.escapeChar!==void 0&&(T=t.escapeChar),(typeof e!="string"||-1<a.BAD_DELIMITERS.indexOf(e))&&(e=","),n===e)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),i!==`
|
|
11
|
-
`&&i!=="\r"&&i!==`\r
|
|
12
|
-
`&&(i=`
|
|
13
|
-
`);var o=0,j=!1;this.parse=function(u,p,s){if(typeof u!="string")throw new Error("Input must be a string");var C=u.length,R=e.length,L=i.length,z=n.length,h=_(r),c=[],E=[],f=[],O=o=0;if(!u)return F();if(v||v!==!1&&u.indexOf(m)===-1){for(var A=u.split(i),b=0;b<A.length;b++){if(f=A[b],o+=f.length,b!==A.length-1)o+=i.length;else if(s)return F();if(!n||f.substring(0,z)!==n){if(h){if(c=[],I(f.split(e)),D(),j)return F()}else I(f.split(e));if(l&&l<=b)return c=c.slice(0,l),F(!0)}}return F()}for(var y=u.indexOf(e,o),g=u.indexOf(i,o),U=new RegExp(V(T)+V(m),"g"),d=u.indexOf(m,o);;)if(u[o]===m)for(d=o,o++;;){if((d=u.indexOf(m,d+1))===-1)return s||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:o}),W();if(d===C-1)return W(u.substring(o,d).replace(U,m));if(m===T&&u[d+1]===T)d++;else if(m===T||d===0||u[d-1]!==T){y!==-1&&y<d+1&&(y=u.indexOf(e,d+1));var S=Z((g=g!==-1&&g<d+1?u.indexOf(i,d+1):g)===-1?y:Math.min(y,g));if(u.substr(d+1+S,R)===e){f.push(u.substring(o,d).replace(U,m)),u[o=d+1+S+R]!==m&&(d=u.indexOf(m,o)),y=u.indexOf(e,o),g=u.indexOf(i,o);break}if(S=Z(g),u.substring(d+1+S,d+1+S+L)===i){if(f.push(u.substring(o,d).replace(U,m)),tt(d+1+S+L),y=u.indexOf(e,o),d=u.indexOf(m,o),h&&(D(),j))return F();if(l&&c.length>=l)return F(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:o}),d++}}else if(n&&f.length===0&&u.substring(o,o+z)===n){if(g===-1)return F();o=g+L,g=u.indexOf(i,o),y=u.indexOf(e,o)}else if(y!==-1&&(y<g||g===-1))f.push(u.substring(o,y)),o=y+R,y=u.indexOf(e,o);else{if(g===-1)break;if(f.push(u.substring(o,g)),tt(g+L),h&&(D(),j))return F();if(l&&c.length>=l)return F(!0)}return W();function I(x){c.push(x),O=o}function Z(x){return x!==-1&&(x=u.substring(d+1,x))&&x.trim()===""?x.length:0}function W(x){return s||(x===void 0&&(x=u.substring(o)),f.push(x),o=C,I(f),h&&D()),F()}function tt(x){o=x,I(f),f=[],g=u.indexOf(i,o)}function F(x){if(t.header&&!p&&c.length&&!w){var q=c[0],H=Object.create(null),ot=new Set(q);let ft=!1;for(let G=0;G<q.length;G++){let N=q[G];if(H[N=_(t.transformHeader)?t.transformHeader(N,G):N]){let et,lt=H[N];for(;et=N+"_"+lt,lt++,ot.has(et););ot.add(et),q[G]=et,H[N]++,ft=!0,(M=M===null?{}:M)[et]=N}else H[N]=1,q[G]=N;ot.add(N)}ft&&console.warn("Duplicate headers found and renamed."),w=!0}return{data:c,errors:E,meta:{delimiter:e,linebreak:i,aborted:j,truncated:!!x,cursor:O+(p||0),renamedHeaders:M}}}function D(){r(F()),c=[],E=[]}},this.abort=function(){j=!0},this.getCharIndex=function(){return o}}function _t(t){var e=t.data,i=J[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){n=!0,ut(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:dt,resume:dt};if(_(i.userStep)){for(var l=0;l<e.results.data.length&&(i.userStep({data:e.results.data[l],errors:e.results.errors,meta:e.results.meta},r),!n);l++);delete e.results}else _(i.userChunk)&&(i.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!n&&ut(e.workerId,e.results)}function ut(t,e){var i=J[t];_(i.userComplete)&&i.userComplete(e),i.terminate(),delete J[t]}function dt(){throw new Error("Not implemented.")}function at(t){if(typeof t!="object"||t===null)return t;var e,i=Array.isArray(t)?[]:{};for(e in t)i[e]=at(t[e]);return i}function $(t,e){return function(){t.apply(e,arguments)}}function _(t){return typeof t=="function"}return a.parse=function(t,e){var i,n=(e=e||{}).dynamicTyping||!1;if(_(n)&&(e.dynamicTypingFunction=n,n={}),e.dynamicTyping=n,e.transform=!!_(e.transform)&&e.transform,!e.worker||!a.WORKERS_SUPPORTED)return n=null,a.NODE_STREAM_INPUT,typeof t=="string"?(t=(i=t).charCodeAt(0)!==65279?i:i.slice(1),n=new(e.download?it:X)(e)):t.readable===!0&&_(t.read)&&_(t.on)?n=new nt(e):(k.File&&t instanceof File||t instanceof Object)&&(n=new rt(e)),n.stream(t);(n=(()=>{var r,l,v;return!!a.WORKERS_SUPPORTED&&(l=k.URL||k.webkitURL||null,v=Y.toString(),r=a.BLOB_URL||(a.BLOB_URL=l.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",v,")();"],{type:"text/javascript"}))),(r=new k.Worker(r)).onmessage=_t,r.id=mt++,J[r.id]=r)})()).userStep=e.step,n.userChunk=e.chunk,n.userComplete=e.complete,n.userError=e.error,e.step=_(e.step),e.chunk=_(e.chunk),e.complete=_(e.complete),e.error=_(e.error),delete e.worker,n.postMessage({input:t,config:e,workerId:n.id})},a.unparse=function(t,e){var i=!1,n=!0,r=",",l=`\r
|
|
14
|
-
`,v='"',M=v+v,w=!1,m=null,T=!1,o=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||a.BAD_DELIMITERS.filter(function(p){return e.delimiter.indexOf(p)!==-1}).length||(r=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(i=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(w=e.skipEmptyLines),typeof e.newline=="string"&&(l=e.newline),typeof e.quoteChar=="string"&&(v=e.quoteChar),typeof e.header=="boolean"&&(n=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");m=e.columns}e.escapeChar!==void 0&&(M=e.escapeChar+v),e.escapeFormulae instanceof RegExp?T=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(T=/^[=+\-@\t\r].*$/)}})(),new RegExp(V(v),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return j(null,t,w);if(typeof t[0]=="object")return j(m||Object.keys(t[0]),t,w)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||m),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),j(t.fields||[],t.data||[],w);throw new Error("Unable to serialize unrecognized input");function j(p,s,C){var R="",L=(typeof p=="string"&&(p=JSON.parse(p)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(p)&&0<p.length),z=!Array.isArray(s[0]);if(L&&n){for(var h=0;h<p.length;h++)0<h&&(R+=r),R+=u(p[h],h);0<s.length&&(R+=l)}for(var c=0;c<s.length;c++){var E=(L?p:s[c]).length,f=!1,O=L?Object.keys(s[c]).length===0:s[c].length===0;if(C&&!L&&(f=C==="greedy"?s[c].join("").trim()==="":s[c].length===1&&s[c][0].length===0),C==="greedy"&&L){for(var A=[],b=0;b<E;b++){var y=z?p[b]:b;A.push(s[c][y])}f=A.join("").trim()===""}if(!f){for(var g=0;g<E;g++){0<g&&!O&&(R+=r);var U=L&&z?p[g]:g;R+=u(s[c][U],g)}c<s.length-1&&(!C||0<E&&!O)&&(R+=l)}}return R}function u(p,s){var C,R;return p==null?"":p.constructor===Date?JSON.stringify(p).slice(1,25):(R=!1,T&&typeof p=="string"&&T.test(p)&&(p="'"+p,R=!0),C=p.toString().replace(o,M),(R=R||i===!0||typeof i=="function"&&i(p,s)||Array.isArray(i)&&i[s]||((L,z)=>{for(var h=0;h<z.length;h++)if(-1<L.indexOf(z[h]))return!0;return!1})(C,a.BAD_DELIMITERS)||-1<C.indexOf(r)||C.charAt(0)===" "||C.charAt(C.length-1)===" ")?v+C+v:C)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
|
|
15
|
-
`,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!P&&!!k.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=st,a.ParserHandle=ht,a.NetworkStreamer=it,a.FileStreamer=rt,a.StringStreamer=X,a.ReadableStreamStreamer=nt,k.jQuery&&((Q=k.jQuery).fn.parse=function(t){var e=t.config||{},i=[];return this.each(function(l){if(Q(this).prop("tagName").toUpperCase()!=="INPUT"||Q(this).attr("type").toLowerCase()!=="file"||!k.FileReader||!this.files||this.files.length===0)return!0;for(var v=0;v<this.files.length;v++)i.push({file:this.files[v],inputElem:this,instanceConfig:Q.extend({},e)})}),n(),this;function n(){if(i.length===0)_(t.complete)&&t.complete();else{var l,v,M,w=i[0];if(_(t.before)){var m=t.before(w.file,w.inputElem);if(typeof m=="object"){if(m.action==="abort")return l=w.file,v=w.inputElem,M=m.reason,void(_(t.error)&&t.error({name:"AbortError"},l,v,M));if(m.action==="skip")return void r();typeof m.config=="object"&&(w.instanceConfig=Q.extend(w.instanceConfig,m.config))}else if(m==="skip")return void r()}var T=w.instanceConfig.complete;w.instanceConfig.complete=function(o){_(T)&&T(o,w.file,w.inputElem),r()},a.parse(w.file,w.instanceConfig)}}function r(){i.splice(0,1),n()}}),B&&(k.onmessage=function(t){t=t.data,a.WORKER_ID===void 0&&t&&(a.WORKER_ID=t.workerId),typeof t.input=="string"?k.postMessage({workerId:a.WORKER_ID,results:a.parse(t.input,t.config),finished:!0}):(k.File&&t.input instanceof File||t.input instanceof Object)&&(t=a.parse(t.input,t.config))&&k.postMessage({workerId:a.WORKER_ID,results:t,finished:!0})}),(it.prototype=Object.create(K.prototype)).constructor=it,(rt.prototype=Object.create(K.prototype)).constructor=rt,(X.prototype=Object.create(X.prototype)).constructor=X,(nt.prototype=Object.create(K.prototype)).constructor=nt,a}()),pt.exports);const kt=function(Y,Q){for(var k=0;k<Q.length;k++){const P=Q[k];if(typeof P!="string"&&!Array.isArray(P)){for(const B in P)if(B!=="default"&&!(B in Y)){const J=Object.getOwnPropertyDescriptor(P,B);J&&Object.defineProperty(Y,B,J.get?J:{enumerable:!0,get:()=>P[B]})}}}return Object.freeze(Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"}))}({__proto__:null,default:yt.hm(gt)},[gt]);exports.p=kt;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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"});exports.default={ACOS:{s:"Returns the arccosine of a number, in radians in the range 0 to Pi. The arccosine is the angle whose cosine is Number",p:{number:{d:"is the cosine of the angle you want and must be from -1 to 1"}}},ACOSH:{s:"Returns the inverse hyperbolic cosine of a number",p:{number:{d:"is any real number equal to or greater than 1"}}},ACOT:{s:"Returns the arccotangent of a number, in radians in the range 0 to Pi.",p:{number:{d:"is the cotangent of the angle you want"}}},ACOTH:{s:"Returns the inverse hyperbolic cotangent of a number",p:{number:{d:"is the hyperbolic cotangent of the angle that you want"}}},ASIN:{s:"Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2",p:{number:{d:"is the sine of the angle you want and must be from -1 to 1"}}},ASINH:{s:"Returns the inverse hyperbolic sine of a number",p:{number:{d:"is any real number equal to or greater than 1"}}},ATAN:{s:"Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2",p:{number:{d:"is the tangent of the angle you want"}}},ATAN2:{s:"Returns the arctangent of the specified x- and y- coordinates, in radians between -Pi and Pi, excluding -Pi",p:{x:{d:"is the x-coordinate of the point"},y:{d:"is the y-coordinate of the point"}}},ATANH:{s:"Returns the inverse hyperbolic tangent of a number",p:{number:{d:"is any real number between -1 and 1 excluding -1 and 1"}}},COS:{s:"Returns the cosine of an angle",p:{number:{d:"is the angle in radians for which you want the cosine"}}},COSH:{s:"Returns the hyperbolic cosine of a number",p:{number:{d:"is any real number"}}},COT:{s:"Returns the cotangent of an angle",p:{number:{d:"is the angle in radians for which you want the cotangent"}}},COTH:{s:"Returns the hyperbolic cotangent of a number",p:{number:{d:"is the angle in radians for which you want the hyperbolic cotangent"}}},CSC:{s:"Returns the cosecant of an angle",p:{number:{d:"is the angle in radians for which you want the cosecant"}}},CSCH:{s:"Returns the hyperbolic cosecant of an angle",p:{number:{d:"is the angle in radians for which you want the hyperbolic cosecant"}}},SEC:{s:"Returns the secant of an angle",p:{number:{d:"is the angle in radians for which you want the secant"}}},SECH:{s:"Returns the hyperbolic secant of an angle",p:{number:{d:"is the angle in radians for which you want the hyperbolic secant"}}},SIN:{s:"Returns the sine of an angle",p:{number:{d:"is the angle in radians for which you want the sine. Degrees * PI()/180 = radians"}}},SINH:{s:"Returns the hyperbolic sine of a number",p:{number:{d:"is any real number"}}},TAN:{s:"Returns the tangent of an angle",p:{number:{d:"is the angle in radians for which you want the tangent. Degrees * PI()/180 = radians"}}},TANH:{s:"Returns the hyperbolic tangent of a number",p:{number:{d:"is any real number"}}}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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 o=require("react/jsx-runtime"),l=require("react"),n=require("./BnZdvx8z2BIDZv9J.cjs"),H=require("./CPFRW8nnIVWYeQYn.cjs"),Y=n.createSvgIcon(o.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),Z=n.createSvgIcon(o.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),_=n.createSvgIcon(o.jsx("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),ee=n.createSvgIcon(o.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),S=l.memo(O=>{const{label:g,value:p,options:r,onSelect:u,tabIndex:m=0,...k}=O,[R,h]=l.useState(()=>N(p,r));l.useEffect(()=>{h(N(p,r))},[p,r]);const v=n.ye(d=>{h(d.target.value),u?.(r[d.target.value])},[u,r]),a=l.useMemo(()=>Object.keys(r).map(d=>o.jsx(n.MenuItem,{value:d,children:d},d)),[r]);return o.jsxs(n.FormControl,{sx:{minWidth:135},size:"small",children:[o.jsx(n.InputLabel,{children:g}),o.jsx(n.Select,{inputProps:{tabIndex:m},value:R,label:g,onChange:v,sx:{backgroundImage:`linear-gradient(${n.alpha("#fff",n.Rn(5))}, ${n.alpha("#fff",n.Rn(5))})`},...k,children:a})]})}),E={Workbook:"workbook",Sheet:"sheet"},W={enter:140,exit:140},U={Formulas:n.xe.Content.Formulas,Values:n.xe.Content.Values,Notes:n.xe.Content.Notes,Comments:n.xe.Content.Comments},G={...U};delete G.Values;const ne={"By Rows":!0,"By Columns":!1},N=(O,g)=>{const p=Object.keys(g);for(let r=0;r<p.length;r++){const u=p[r];if(g[u]===O)return u}},q=l.memo(O=>{const{replace:g=!1,findText:p,replaceText:r,findOptions:u,replaceOptions:m,title:k,onHide:R,onFindOrReplace:h,...v}=O,a=l.useRef(null),d=l.useRef(null),I=l.useRef(null),F=l.useRef(null),A=l.useRef(null),L=l.useRef(null),M=(e,t)=>{t&&(t.start(e,{center:!1}),setTimeout(()=>t.stop(e),180))},[B,y]=l.useState(!1),[b,J]=l.useState(!1),[f,T]=l.useState(g),[D,w]=l.useState(!1),[P,K]=l.useState(!1),[s,c]=l.useState({findText:null,replaceText:null,replace:g,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:n.k.Orientation.Row,fields:[n.xe.Content.Formulas]},scope:E.Sheet}),j=n.ye(async(e,t,i,C)=>{if(!h)return;const x={...s};x.replaceOptions={...x.replaceOptions},x.findOptions={...x.findOptions},x.replaceOptions.maxCount=i?void 0:1,x.replace=t,t&&s.findOptions.fields?.[0]===n.xe.Content.Values&&(x.findOptions.fields=[n.xe.Content.Formulas]),x.findOptions.reverse=!e;const X=await h({autoFocus:C,...x});w(X===0)},[s,h]);l.useEffect(()=>{w(!1)},[s,b,f]);const V=n.ye((e,t)=>{if(e.keyCode===n.Jt.Enter){if(!s.findText)return;let i=!0,C=!1;e.shiftKey&&(i=!1),t?(e.ctrlKey&&e.altKey&&(C=!0),M(e,C?L.current:A.current)):M(e,i?F.current:I.current),j(i,t,C,!1)}},[s]),$=l.useRef(null);l.useLayoutEffect(()=>{c(e=>{const t={...e};t.findText=p&&p.length>0?p:e.findText??"",y(!0),r!==void 0&&(t.replaceText=r),u&&(t.findOptions={...t.findOptions,...u}),t.replaceText||(t.replaceText=""),t.replaceOptions&&(t.replaceOptions={...t.replaceOptions}),m&&(t.replaceOptions={...t.replaceOptions,...m}),s.findOptions.fields?.[0]||(s.findOptions.fields=[n.xe.Content.Formulas]);const i=!(!m&&r===void 0);return i&&T(i),t}),P||$.current?.focus()},[p,r,u,m]),l.useEffect(()=>{f?(s.findOptions.fields[0],n.xe.Content.Values):y(!0)},[f]),l.useEffect(()=>{if(B&&a.current&&s.findText===a.current.value)return a.current===document.activeElement||a.current.contains(document.activeElement)?(a.current?.select(),void y(!1)):void a.current.addEventListener("focus",()=>{a.current?.select(),y(!1)},{once:!0})},[B,s]);const[Q,{width:z}]=n.f1();return o.jsx(n.zw,{title:k??(f?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",refWindow:$,onHide:R,onFocus:()=>K(!0),onBlur:()=>{K(!1),w(!1)},PaperProps:{elevation:P?3:1},...v,children:o.jsxs(n.DialogContent,{dividers:!0,ref:Q,sx:{display:"flex",flexDirection:"column",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},onKeyDown:e=>{if(e.key==="h"&&e.ctrlKey)T(!0),a.current?.contains(document.activeElement)&&d.current?.focus();else if(e.key==="f"&&e.ctrlKey)a.current?.focus();else if(e.key==="c"&&e.altKey)c(t=>{const i={...t};return i.findOptions.matchCase=!t.findOptions.matchCase,i});else if(e.key==="e"&&e.altKey)c(t=>{const i={...t};return i.findOptions.matchEntireCell=!t.findOptions.matchEntireCell,i});else{if(e.key!=="r"||!e.altKey)return;c(t=>{const i={...t};return i.findOptions.useRegex=!t.findOptions.useRegex,i})}e.preventDefault()},children:[o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[o.jsx(n.uw,{selected:b,onSelectToggle:e=>{J(e)},preventFocus:!0,label:"Toggle Additional Options",icon:n.ke(o.jsx(n.eM,{}))}),o.jsx(n.uw,{selected:f,onSelectToggle:e=>{T(e)},preventFocus:!0,label:"Toggle Replace",icon:n.ke(o.jsx(n.QT,{})),shortcut:{key:f?"F":"H",modifiers:[n.Ae.Ctrl]}})]}),o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[o.jsx(n.TextField,{label:"Find",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),minWidth:z>460?"20em":void 0,backgroundImage:`linear-gradient(${n.alpha("#fff",n.Rn(5))}, ${n.alpha("#fff",n.Rn(5))})`},inputProps:{draggable:!1,ref:a,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}},endAdornment:o.jsx(n.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:o.jsxs(n.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[o.jsx(n.uw,{selected:s.findOptions.matchCase,onSelectToggle:e=>{c(t=>{const i={...t};return i.findOptions.matchCase=e,i})},label:"Match Case",shortcut:{key:"C",modifiers:[n.Ae.Alt]},icon:n.ke(o.jsx(n.tM,{}))}),o.jsx(n.uw,{selected:s.findOptions.matchEntireCell,onSelectToggle:e=>{c(t=>{const i={...t};return i.findOptions.matchEntireCell=e,i})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[n.Ae.Alt]},icon:n.ke(o.jsx(n.nM,{}))}),o.jsx(n.uw,{selected:s.findOptions.useRegex,onSelectToggle:e=>{c(t=>{const i={...t};return i.findOptions.useRegex=e,i})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[n.Ae.Alt]},icon:n.ke(o.jsx(n.rM,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>D?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>D?`${e.palette.error.main} !important`:void 0}},value:s.findText??"",onChange:e=>{c(t=>{const i={...t};return i.findText=e.target.value,i})},onKeyDown:e=>V(e,!1),onContextMenu:e=>{e.stopPropagation()}}),o.jsx(n.uw,{selected:s.findOptions.reverse,onSelectToggle:e=>{j(!1,!1)},touchRippleRef:I,label:"",shortcut:{key:"Enter",modifiers:[n.Ae.Shift]},icon:n.ke(s.findOptions.orientation!==n.k.Orientation.Column?o.jsx(Y,{}):o.jsx(ee,{})),disabled:!s.findText}),o.jsx(n.uw,{selected:!s.findOptions.reverse,onSelectToggle:e=>{j(!0,!1)},touchRippleRef:F,label:"Next Match",shortcut:{key:"Enter"},icon:n.ke(s.findOptions.orientation!==n.k.Orientation.Column?o.jsx(_,{}):o.jsx(Z,{})),disabled:!s.findText})]}),o.jsx(H.Collapse,{in:f,timeout:W,onExit:()=>{a.current?.focus()},children:o.jsxs(n.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[o.jsx(n.TextField,{label:"Replace",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${n.alpha("#fff",n.Rn(5))}, ${n.alpha("#fff",n.Rn(5))})`},inputProps:{ref:d,className:"input",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1)},value:s.replaceText??"",onChange:e=>{c(t=>{const i={...t};return i.replaceText=e.target.value,i})},onKeyDown:e=>V(e,!0),onContextMenu:e=>{e.stopPropagation()}}),o.jsx(n.uw,{onSelectToggle:e=>{j(!0,!0)},touchRippleRef:A,label:"Replace",shortcut:{key:"Enter"},icon:n.ke(o.jsx(n.hv,{})),disabled:!s.findText}),o.jsx(n.uw,{onSelectToggle:e=>{j(!0,!0,!0)},touchRippleRef:L,label:"Replace All",shortcut:{key:"Enter",modifiers:[n.Ae.Ctrl,n.Ae.Alt]},icon:n.ke(o.jsx(n.oM,{})),disabled:!s.findText})]})})]})]}),o.jsx(H.Collapse,{in:b,timeout:W,onExit:()=>{a.current?.focus()},children:o.jsxs(n.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[o.jsx(n.Ft$1,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),o.jsxs(n.Box,{sx:{display:"flex",flexDirection:z>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[o.jsx(S,{label:"Within",value:s.scope,options:E,onSelect:e=>{c(t=>{const i={...t};return i.scope=e,i})}}),o.jsx(S,{label:"Search",value:s.findOptions.orientation!==n.k.Orientation.Column,options:ne,onSelect:e=>{c(t=>{const i={...t};return i.findOptions.orientation=e?n.k.Orientation.Row:n.k.Orientation.Column,i})}}),o.jsx(S,{label:"Look in",value:f&&s.findOptions.fields?.[0]===n.xe.Content.Values?n.xe.Content.Formulas:s.findOptions.fields?.[0],options:f?G:U,onSelect:e=>{c(t=>{const i={...t};return i.findOptions.fields=[e],i})}})]})]})})]})})});exports.FindReplaceWindow=q,exports.ScopeOptions=E,exports.default=q;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.4
|
|
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 p=require("./BnZdvx8z2BIDZv9J.cjs"),g=require("./CKtzkomrFnDVY5SY.cjs");class W{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},X=u=>{const t=parseFloat(u);return isNaN(t)?null:t},K=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)??K}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 W(s)}getFromPath(t,e){return p.qt$1.getFromPath(t,e)}setToPath(t,e,s){return p.qt$1.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 X}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 ${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.qt$1.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 Z{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 H{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://cdn.sheetxl.com/public/logo-color-square-onwhite.png",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.Q.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.Q.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.Td.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.Td.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.Td.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.Td.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.Td.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.Td.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.Lr.CaseSensitiveOptions:p.Lr.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.Vr.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.Vr.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.Q.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.Q.UnderlineStyle.Single}A(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=p.Q.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=p.Q.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.W.Edge.Left),this.processBorderStroke(t,e,i,p.W.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,p.W.Edge.Vertical),this.processBorderStroke(t,e,i,p.W.Edge.Top),this.processBorderStroke(t,e,i,p.W.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,p.W.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.oe.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.K.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=p.K.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.K.Overflow.Wrap:r.overflow=p.K.Overflow.Visible,g.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=p.K.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.K.ReadingDirection.Auto:o==="1"?r.readingDirection=p.K.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=p.K.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 $),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 Z,"chart"),this.registerVisitor("c:plotArea",new H),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;
|