@sheetxl/studio-vanilla 0.4.6 → 0.4.8
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/README.md +3 -3
- package/browser/cjs/{CO2670BoVR60TAIO.cjs → 3nTDo2EiTknjadbt.cjs} +1 -1
- package/browser/cjs/6Wu3sLyx-7NM6CXS.cjs +301 -0
- package/browser/cjs/B11W4AIKbkJQG6ug.cjs +6 -0
- package/browser/cjs/{BDVO5vEdK7Wah9u6.cjs → BCnlTOmUDmizyvVV.cjs} +2 -2
- package/browser/cjs/{hlMzhbyi3yXzEax6.cjs → BIPxYhhi1F-y0gSm.cjs} +3 -3
- package/browser/cjs/{DJ3lRRtgGNfZ_GK7.cjs → BYhOQCFEzewgsKDn.cjs} +2 -2
- package/browser/cjs/{rf4-78JGGhtQMtw3.cjs → BqLDj2GlSzX8ZN3l.cjs} +1 -1
- package/browser/cjs/{ClnAKZeWBp1OEjmi.cjs → C2B3wbeahcHlbOBZ.cjs} +2 -2
- package/browser/cjs/C6nZKAevPqj8zJY-.cjs +6 -0
- package/browser/cjs/{BC1EuCQ2stuFE3uE.cjs → CD_HItzF2RneMAER.cjs} +2 -2
- package/browser/cjs/{Cg56Q7yFUDqoNyPz.cjs → CE5NVYltiso41NzK.cjs} +1 -1
- package/browser/cjs/{BEJCfS2GnnCHB_Mm.cjs → CHSE1pa8SMApg4BM.cjs} +2 -2
- package/browser/cjs/{D_BIUeiHuQDwD6QN.cjs → CTXKzcsm-W1ujL_U.cjs} +6 -6
- package/browser/cjs/{mzGAr1pI91e1sd2y.cjs → CcQjGGiCx6Qz7yJ4.cjs} +1 -1
- package/browser/cjs/{Ckn4M7Qh3E3gxz2w.cjs → Cqymi9AOXO_JYvY4.cjs} +2 -2
- package/browser/cjs/{CcvjqZjjmoPDS0vK.cjs → D6pPBbRPLTNFSXuO.cjs} +1 -1
- package/browser/cjs/DMUSzq5n2k0WNFw6.cjs +12 -0
- package/browser/cjs/DWTMnPR33rKK87Xt.cjs +12 -0
- package/browser/cjs/{VWWxZ8TRgMDlwBgU.cjs → Dds58NEqJ0OalWH3.cjs} +4 -4
- package/browser/cjs/{D52XNI-phrNzLrWS.cjs → Dy4SB47It0LGbh2I.cjs} +1 -1
- package/browser/cjs/{DAoqhWARDCCMxYfu.cjs → VJLb1uMfbKAUW1QF.cjs} +8 -8
- package/browser/cjs/{CRbLTUE75pKqxTAE.cjs → bHWvGntvmuk8t7sX.cjs} +2 -2
- package/browser/cjs/{CyL3JLfSqByl6NJK.cjs → euAV1pPrNOIb6DV4.cjs} +2 -2
- package/browser/cjs/{B0L2HuliuW9aTvJM.cjs → i0D2haODisHW8uGg.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{Ch1N2RfTkexbaLQZ.cjs → oNi7wirDlZ81Lm0Z.cjs} +1 -1
- package/browser/cjs/z1aNSOtWsEE21p2H.cjs +6 -0
- package/browser/esm/{DpJ6rBC_S3qKpTTz.mjs → 2RGq163l1wYJKGsa.mjs} +10887 -10878
- package/{cdn/assets/D7VphVLqKl6argvu.js → browser/esm/4C7Rg83L5RYFoOvl.mjs} +5 -5
- package/browser/esm/{BEb33qzyvFCELL-3.mjs → 6KgR81NK4yzANTBT.mjs} +8 -8
- package/{cdn/assets/BWgkRW6hv3jQZREe.js → browser/esm/B1CYiJmSpyx4TD5r.mjs} +20 -20
- package/{cdn/assets/Mf5PGnpvo2ab2ron.js → browser/esm/B7qUiL1xPnzfOHZw.mjs} +1 -1
- package/{cdn/assets/AWcFdkqHbjuM31T8.js → browser/esm/BEFQcBJ71bA297Zu.mjs} +1 -1
- package/browser/esm/{BcNJxq2cuxPkAW4q.mjs → BEIn7yNWsHNJisB6.mjs} +3 -3
- package/browser/esm/{DfNICWSvz9QDZQhb.mjs → BM74iVi-iQkHbrfo.mjs} +2 -2
- package/browser/esm/{Cj2uX_OMjmaU3fNR.mjs → BP8kNG31HYSkk1VW.mjs} +12 -12
- package/browser/esm/{DmlVS3gIBTC4kUV7.mjs → CA_DRvBOFOlhezCt.mjs} +8 -8
- package/browser/esm/{D0GrOZjFUR2HlnMz.mjs → CDkmbShJijwq4EBo.mjs} +6 -6
- package/browser/esm/{DzTywDe5V3E28PWl.mjs → CPi83FXApMlTaVbs.mjs} +1 -1
- package/browser/esm/{CyTYBSnJvDp00EQS.mjs → C_hRuPoaT857EnC1.mjs} +5 -5
- package/browser/esm/{nPC0QB7Y32vNdKJ6.mjs → CjVsKZEPAncg5mIk.mjs} +1 -1
- package/browser/esm/{Ka_EOSR_2pEe_9bW.mjs → Ckz080o58XOgRhqj.mjs} +2 -2
- package/browser/esm/{BefI9PT_BgRNGb7_.mjs → ClXspoNrNV-A8BaL.mjs} +2 -2
- package/browser/esm/{bnNlX3wyLfzCzkPl.mjs → DQ0Li3WfKbZxSFuB.mjs} +2 -2
- package/browser/esm/{yULhUqAUufR5kUwn.mjs → DXyJaUwHLq39-Jfa.mjs} +5 -5
- package/{cdn/assets/C_kr_6FpZ17pfLXi.js → browser/esm/D_FC0zteMRPriWTD.mjs} +1 -1
- package/browser/esm/{B10LhnZcMt1ayTsN.mjs → DnWiOUNTPvi_llPT.mjs} +1 -1
- package/browser/esm/{DB6PulwZ7VZjKPA8.mjs → DyUvHYGMNA9W2zL6.mjs} +1 -1
- package/browser/esm/{anzhTAYYl_AYExOH.mjs → EUFvcP5R4HFDLn2V.mjs} +5 -5
- package/browser/esm/cSe92c0HnvbRwiVM.mjs +944 -0
- package/{cdn/assets/DtxnQukkOL0CjEuQ.js → browser/esm/eXQ_1uhRMyN-hfDZ.mjs} +1 -1
- package/browser/esm/{Cy4td5Lr__p7Rygx.mjs → h4NbNvV8KCL9Tl1v.mjs} +16 -16
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/xlL3Ai-ka9qMVeua.mjs +84 -0
- package/cdn/assets/{mJrwxSI9ER8tcfM5.js → B2hDWpWSEoChxhVY.js} +11896 -11887
- package/{browser/esm/Mf5PGnpvo2ab2ron.mjs → cdn/assets/B7qUiL1xPnzfOHZw.js} +1 -1
- package/{browser/esm/AWcFdkqHbjuM31T8.mjs → cdn/assets/BEFQcBJ71bA297Zu.js} +1 -1
- package/cdn/assets/{jzOOsUtK1t6fHp7l.js → BXBP2rNGQxrgUPvU.js} +5 -5
- package/cdn/assets/{yNhs_10ijt0MpP-T.js → BgChN-ZVYUOMDX9_.js} +12 -12
- package/cdn/assets/{DYHqPNPZiXqt-4Ux.js → Bvy1txLm7c3LbPL7.js} +6 -6
- package/cdn/assets/{zdC5k0nNqnRyMFF0.js → C1x5-f1q8NeSwRA2.js} +16 -16
- package/{browser/esm/Bhv6QhNtkfdin_7u.mjs → cdn/assets/C5NMOq74C3Sme49x.js} +20 -20
- package/cdn/assets/{D6ibgkGY0zdJZVdP.js → CLA1BGtRbWm0K0U0.js} +2 -2
- package/cdn/assets/{DzTywDe5V3E28PWl.js → CPi83FXApMlTaVbs.js} +1 -1
- package/cdn/assets/{nPC0QB7Y32vNdKJ6.js → CjVsKZEPAncg5mIk.js} +1 -1
- package/cdn/assets/{Bg1gxl7R7pEDQJ_e.js → CpVan9KpuEGXgwIK.js} +2 -2
- package/cdn/assets/{BH2PfED5elf6o2V9.js → CtDntnnwJW1rZ3sM.js} +5 -5
- package/cdn/assets/{A8kiDhrng-S3d7bC.js → CuG5WoZ4OOj9RCsv.js} +3 -3
- package/{browser/esm/ar5lDYhxFfJDlI4q.mjs → cdn/assets/DTvvMKZZfsVRhbow.js} +5 -5
- package/{browser/esm/C_kr_6FpZ17pfLXi.mjs → cdn/assets/D_FC0zteMRPriWTD.js} +1 -1
- package/cdn/assets/{BSywdRZwPRE8kvep.js → Dbd0AFDlzQDW0tOg.js} +5 -5
- package/cdn/assets/{B10LhnZcMt1ayTsN.js → DnWiOUNTPvi_llPT.js} +1 -1
- package/cdn/assets/{DOZC168cRHRH_MNy.js → DppHXtCDGzttFdS4.js} +2 -2
- package/cdn/assets/{BiXCdxCfyppsYKdi.js → DuU1-7vd87A1wfGJ.js} +2 -2
- package/cdn/assets/{DB6PulwZ7VZjKPA8.js → DyUvHYGMNA9W2zL6.js} +1 -1
- package/cdn/assets/{CGRxpUrPJQySyydG.js → O1XID2whLDb1cTWS.js} +8 -8
- package/{browser/esm/DtxnQukkOL0CjEuQ.mjs → cdn/assets/eXQ_1uhRMyN-hfDZ.js} +1 -1
- package/cdn/assets/{DgLqE4amKIfxfXZt.js → g4FhlroGKmJM7Utd.js} +8 -8
- package/cdn/assets/tJI1G_FjDgqWo3rJ.js +944 -0
- package/cdn/assets/xlL3Ai-ka9qMVeua.js +84 -0
- package/cdn/index.js +24 -24
- package/cdn/loader.js +2 -2
- package/package.json +3 -3
- package/types/index.d.ts +8 -8
- package/browser/cjs/C0AMVPCvA-TujT5K.cjs +0 -12
- package/browser/cjs/Cf2_qMNBs2gVwbh1.cjs +0 -12
- package/browser/cjs/CiQE7e1h2nORtvH-.cjs +0 -6
- package/browser/cjs/CndX6WxBX5l14erU.cjs +0 -301
- package/browser/cjs/D4J2MWfhcQh5QfIS.cjs +0 -6
- package/browser/cjs/D8mduMF3arHBud5b.cjs +0 -6
- package/browser/esm/C3Oq5rZbPE2to2eI.mjs +0 -940
- package/browser/esm/pQgC_MfgVvqv6lyK.mjs +0 -84
- package/cdn/assets/YtJ5y2-cVhR5MGYz.js +0 -940
- package/cdn/assets/pQgC_MfgVvqv6lyK.js +0 -84
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./6Wu3sLyx-7NM6CXS.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Zt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Zt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,W=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Jt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Jt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Zt&&i.fail(`xmlns prefix must be bound to ${Zt}.`)}switch(s){case Zt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Zt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
|
|
7
7
|
`,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
|
|
8
|
-
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=
|
|
9
|
-
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===
|
|
10
|
-
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=
|
|
11
|
-
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const W=P(H??m,V);W!==void 0&&(y[m]=W)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./D52XNI-phrNzLrWS.cjs")),T=Promise.resolve().then(()=>require("./BC1EuCQ2stuFE3uE.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./rf4-78JGGhtQMtw3.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,J,Z,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",qe="",We="",_e="",Ue="",ze="",Ge="",Je="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Ze=Wt.length;Ze>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Ze;Mt++)vt=Wt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==We&&(mt=!0,We=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==qe&&(mt=!0,qe=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Je&&(mt=!0,Je=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},Z),Z,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},W),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./B0L2HuliuW9aTvJM.cjs"));globalThis.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,J)=>{_.type===N&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Re.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./D52XNI-phrNzLrWS.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
8
|
+
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=W,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case M:this.doctypeHandler?.(this.text),this.text="",this.state=W,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Is);t!==O&&(this.text+=String.fromCodePoint(t),t===Jt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
|
|
9
|
+
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===W&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=W,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==M?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=W}sCData(){this.captureToChar(Jt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Jt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case M:this.cdataHandler?.(this.text),this.text="",this.state=W;break;case Jt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||U(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||U(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:U(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===M){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=W}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Os);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(U(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(U(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===M?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=W):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case M:this.openTag();break;case 47:this.state=35;break;default:U(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===M?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===M?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:U(t)?this.state=38:t===M?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===M?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):U(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();U(t)?this.state=36:t===M?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Vs);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===M?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===M?this.closeTag():U(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case M:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=W,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Jt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case M:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
|
|
10
|
+
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=W,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
|
|
11
|
+
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const q=P(H??m,V);q!==void 0&&(y[m]=q)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const q=H?.destination;if(q){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&q.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(q.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):q.key?b.source[q.key]=q.source:typeof ht.to=="string"&&(b.source[ht.to]=q.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,createWorkbookOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./Dy4SB47It0LGbh2I.cjs")),T=Promise.resolve().then(()=>require("./CD_HItzF2RneMAER.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./BqLDj2GlSzX8ZN3l.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,q=new Map;q.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const Wt=bt[xt],kt=tt[Wt];et.set(Wt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,J,Z,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,qt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",We="",qe="",_e="",Ue="",ze="",Ge="",Je="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),qt.length>0){qt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Ze=qt.length;Ze>0&&(L=qt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Ze;Mt++)vt=qt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},qt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==qe&&(mt=!0,qe=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==We&&(mt=!0,We=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Je&&(mt=!0,Je=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},Z),Z,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},q),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./i0D2haODisHW8uGg.cjs"));globalThis.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const Wt=fe($,ut);let kt,Re=new Map;if(Wt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;Wt.forEach((_,J)=>{_.type===N&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Re.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Wt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:q,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./Dy4SB47It0LGbh2I.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),t=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),t=require("./6Wu3sLyx-7NM6CXS.cjs"),w=["Ok","Cancel"],k=a.memo(C=>{const{initialHyperlink:l=null,initialDisplay:b=null,onUpdateHyperlink:g,context:s,onOption:x,onValidateOption:p,onDone:u,options:f=w,defaultOption:d=f?.[0],cancelOption:r="Cancel",sx:F,...O}=C,P=a.useMemo(()=>(l??s?.()?.getHyperlink())!==null,[]),m=a.useMemo(()=>{let e=null,o=null;l&&(typeof l=="string"?o=l:e=l);const T=e??s?.()?.getHyperlink();return{address:o??T?.getAddress()??"",textToDisplay:T?.getDisplayText()??""}},[l,s]),[n,D]=a.useState(m.address),[c,$]=a.useState(()=>{const e=s?.().toTextUnformatted()??b;return e===m.address?"":e}),[j,h]=a.useState(!1),v=a.useCallback(e=>{$(e.target.value)},[]),y=a.useCallback(async(e,o)=>null,[]),H=t.fe(async e=>{e!==r&&g?.(n===""?null:{address:n},c),x?.(e,e===r,e===d),u?.()},[n,c,g,u,x,d,r]),I=t.fe(e=>{D(e.target.value),y(e.target.value,null)},[p]),M=t.fe(async e=>{let o=await Promise.resolve(p?.(e));try{o!==!1&&(o=await y(n,e))}catch{}return o??!0},[p]);return i.jsx(t.b4,{title:(P?"Edit":"Insert")+" Link",options:f,onDone:u,onOption:e=>H(e),onValidateOption:M,defaultOption:d,cancelOption:r,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...O,children:i.jsxs(t.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[i.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(t.TextField,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:e=>{j||e.target?.select(),h(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`}}},value:n,onChange:I,onContextMenu:e=>{e.stopPropagation()}})}),i.jsx(t.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(t.TextField,{label:"Display Text",placeholder:n?.startsWith("#")?n.substring(1):n,onFocus:()=>{h(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${t.alpha("#fff",t.$n(5))}, ${t.alpha("#fff",t.$n(5))})`}}},value:c,onChange:v,onContextMenu:e=>{e.stopPropagation()}})})]})})});exports.HyperlinkDialog=k,exports.default=k;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
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 J=require("@sheetxl/sdk");exports.fromBufferJSON=async(w,l)=>{let u=w;(function(t){if(t.byteLength<4)return!1;const i=new Uint8Array(t),r={gzip:[31,139],zip:[80,75,3,4],bz2:[66,90,104],br:[206,178,207,129]},n=Object.keys(r);for(let f=0;f<n.length;f++){const o=n[f],e=r[o];let a=!0;for(let s=0;s<e.length;s++)if(i[s]!==e[s]){a=!1;break}if(a)return o}return!1})(u)&&(u=await async function(t,i="gzip"){let r;typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer?(r=new ArrayBuffer(t.byteLength),new Uint8Array(r).set(new Uint8Array(t))):r=t;const n=new Blob([r]).stream(),f=new DecompressionStream(i),o=n.pipeThrough(f);return(await new Response(o).blob()).arrayBuffer()}(u));let b=new TextDecoder().decode(u);const g=JSON.parse(b),p={...l?.createWorkbookOptions??{},json:g};return new J.Workbook(p)},exports.toBufferJSON=async(w,l)=>{const u=await w.toJSON(),b=l?.whiteSpace??0;let g;l?.beforeWrite?.(w,u),g=b===0?JSON.stringify(u):function(i,r=2){const n=[];function f(o){const e=r*o;return n[e]===void 0&&(n[e]=" ".repeat(e)),n[e]}return function o(e,a,s,m){if(e==null||typeof e!="object")return JSON.stringify(e);const A=f(a),O=f(a+1);if(Array.isArray(e)){const c=e.length;if(c===0)return"[]";if(s!==0)return JSON.stringify(e);let y=`[
|
|
7
|
+
`;for(let h=0;h<c;h++)y+=O+o(e[h],a+1,s+1,!0),h<c-1&&(y+=`,
|
|
8
|
+
`);return y+=`
|
|
9
|
+
`+A+"]",y}const B=Object.keys(e),d=B.length;if(d===0)return"{}";if(!(s<2))return JSON.stringify(e);let S=`{
|
|
10
|
+
`;m||(s=0);for(let c=0;c<d;c++){const y=B[c];S+=O+JSON.stringify(y)+": "+o(e[y],a+1,s,!1),c<d-1&&(S+=`,
|
|
11
|
+
`)}return S+=`
|
|
12
|
+
`+A+"}",S}(i,0,0,!1)}(u,b);let p=new TextEncoder().encode(g).buffer;const t=l?.compress??!0;return t&&(p=await async function(i,r="gzip"){let n;typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer?(n=new ArrayBuffer(i.byteLength),new Uint8Array(n).set(new Uint8Array(i))):n=i;const f=new ReadableStream({start(a){a.enqueue(n),a.close()}}),o=new CompressionStream(r),e=f.pipeThrough(o);return(await new Response(e).blob()).arrayBuffer()}(p,typeof t=="string"?t:void 0)),p};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.8
|
|
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"),i=require("./6Wu3sLyx-7NM6CXS.cjs"),Wt=require("react-dom"),ce=require("@sheetxl/sdk");function Pt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const de=Pt(l);function At(e){return i.generateUtilityClass("MuiCollapse",e)}i.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const It=i.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.orientation],r.state==="entered"&&o.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&o.hidden]}})(i.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"}}]}))),Nt=i.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ft=i.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 r=i.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:E,onExited:y,onExiting:b,orientation:v="vertical",style:k,timeout:h=i.duration.standard,TransitionComponent:j=i.Transition,...C}=r,W={...r,orientation:v,collapsedSize:s},O=(S=>{const{orientation:U,classes:V}=S,X={root:["root",`${U}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${U}`],wrapperInner:["wrapperInner",`${U}`]};return i.composeClasses(X,At,V)})(W),q=i.useTheme(),z=i.useTimeout(),I=de.useRef(null),_=de.useRef(),G=typeof s=="number"?`${s}px`:s,J=v==="horizontal",re=J?"width":"height",N=de.useRef(null),$=i.useForkRef(o,N),w=S=>U=>{if(S){const V=N.current;U===void 0?S(V):S(V,U)}},T=()=>I.current?I.current[J?"clientWidth":"clientHeight"]:0,M=w((S,U)=>{I.current&&J&&(I.current.style.position="absolute"),S.style[re]=G,p&&p(S,U)}),F=w((S,U)=>{const V=T();I.current&&J&&(I.current.style.position="");const{duration:X,easing:ie}=i.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const pe=q.transitions.getAutoHeightDuration(V);S.style.transitionDuration=`${pe}ms`,_.current=pe}else S.style.transitionDuration=typeof X=="string"?X:`${X}ms`;S.style[re]=`${V}px`,S.style.transitionTimingFunction=ie,x&&x(S,U)}),H=w((S,U)=>{S.style[re]="auto",f&&f(S,U)}),B=w(S=>{S.style[re]=`${T()}px`,E&&E(S)}),ae=w(y),P=w(S=>{const U=T(),{duration:V,easing:X}=i.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ie=q.transitions.getAutoHeightDuration(U);S.style.transitionDuration=`${ie}ms`,_.current=ie}else S.style.transitionDuration=typeof V=="string"?V:`${V}ms`;S.style[re]=G,S.style.transitionTimingFunction=X,b&&b(S)});return m.jsx(j,{in:d,onEnter:M,onEntered:H,onEntering:F,onExit:B,onExited:ae,onExiting:P,addEndListener:S=>{h==="auto"&&z.start(_.current||0,S),t&&t(N.current,S)},nodeRef:N,timeout:h==="auto"?null:h,...C,children:(S,{ownerState:U,...V})=>m.jsx(It,{as:u,className:i.clsx(O.root,a,{entered:O.entered,exited:!d&&G==="0px"&&O.hidden}[S]),style:{[J?"minWidth":"minHeight"]:G,...k},ref:$,ownerState:{...W,state:S},...V,children:m.jsx(Nt,{ownerState:{...W,state:S},className:O.wrapper,ref:I,children:m.jsx(Ft,{ownerState:{...W,state:S},className:O.wrapperInner,children:n})})})})});function qt(e){return i.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),i.generateUtilityClasses("MuiCard",["root"]);const Ht=i.styled(i.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),Bt=de.forwardRef(function(e,o){const r=i.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...a}=r,s={...r,raised:n},u=(c=>{const{classes:d}=c;return i.composeClasses({root:["root"]},qt,d)})(s);return m.jsx(Ht,{className:i.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...a})});function zt(e){return i.generateUtilityClass("MuiCardActions",e)}i.generateUtilityClasses("MuiCardActions",["root","spacing"]);const _t=i.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ut=de.forwardRef(function(e,o){const r=i.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...a}=r,s={...r,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return i.composeClasses(f,zt,d)})(s);return m.jsx(_t,{className:i.clsx(u.root,n),ownerState:s,ref:o,...a})}),Ge=typeof i.globalCss({})=="function",Vt=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),$t=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}}),tt=(e,o=!1)=>{const r={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([a,s])=>{const u=e.getColorSchemeSelector(a);u.startsWith("@")?r[u]={":root":{colorScheme:s.palette?.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:Vt(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...$t(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Ie="mui-ecs",Kt=i.globalCss(Ge?({theme:e,enableColorScheme:o})=>tt(e,o):({theme:e})=>(o=>{const r=tt(o,!1),t=Array.isArray(r)?r[0]:r;return!o.vars&&t&&(t.html[`:root:has(${Ie})`]={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(.${Ie}))`]:{colorScheme:a.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Ie}))`]:{colorScheme:a.palette?.mode}}}),r})(e));function Gt(e){const o=i.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:t=!1}=o;return m.jsxs(de.Fragment,{children:[Ge&&m.jsx(Kt,{enableColorScheme:t}),!Ge&&!t&&m.jsx("span",{className:Ie,style:{display:"none"}}),r]})}const Xt=i.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),Be={didCatch:!1,error:null};class Qt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Be}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var r,t,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];(r=(t=this.props).onReset)===null||r===void 0||r.call(t,{args:a,reason:"imperative-api"}),this.setState(Be)}}componentDidCatch(o,r){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,r)}componentDidUpdate(o,r){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var a,s;t&&r.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(Be))}render(){const{children:o,fallbackRender:r,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 r=="function")u=r(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 ht(e){var o,r,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]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function oe(){for(var e,o,r=0,t="";r<arguments.length;)(e=arguments[r++])&&(o=ht(e))&&(t&&(t+=" "),t+=o);return t}let Jt={data:""},Yt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,en=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,ue=(e,o)=>{let r="",t="",n="";for(let a in e){let s=e[a];a[0]=="@"?a[1]=="i"?r=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 r+(o&&n?o+"{"+n+"}":n)+t},te={},gt=e=>{if(typeof e=="object"){let o="";for(let r in e)o+=r+gt(e[r]);return o}return e};function Xe(e){let o=this||{},r=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=gt(s),x=te[f]||(te[f]=(h=>{let j=0,C=11;for(;j<h.length;)C=101*C+h.charCodeAt(j++)>>>0;return"go"+C})(f));if(!te[x]){let h=f!==s?s:(j=>{let C,W,O=[{}];for(;C=Yt.exec(j.replace(en,""));)C[4]?O.shift():C[3]?(W=C[3].replace(nt," ").trim(),O.unshift(O[0][W]=O[0][W]||{})):O[0][C[1]]=C[2].replace(nt," ").trim();return O[0]})(s);te[x]=ue(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let E=c&&te.g?te.g:null;return c&&(te.g=te[x]),y=te[x],b=u,v=d,(k=E)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=v?y+b.data:b.data+y),x;var y,b,v,k})(r.unshift?r.raw?(t=r,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??"")},"")):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):r,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Jt)(o.target),o.g,o.o,o.k);var t,n,a}function kt(e,o,r){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 L(){return L=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},L.apply(this,arguments)}function bt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Se(e,o){if(e==null)return{};var r,t,n={},a=Object.keys(e);for(t=0;t<a.length;t++)r=a[t],o.indexOf(r)>=0||(n[r]=e[r]);return n}function ot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xe.bind({g:1}),Xe.bind({k:1});var rt=function(){return""},xt=l.createContext({enqueueSnackbar:rt,closeSnackbar:rt}),ze="@media (max-width:599.95px)",Ne="@media (min-width:600px)",it=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Qe=function(e){return""+it(e.vertical)+it(e.horizontal)},Me=function(e){return!!e||e===0},Te="unmounted",fe="exited",he="entering",ye="entered",at="exiting",Je=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=fe,n.appearStatus=he):a=ye:a=t.unmountOnExit||t.mountOnEnter?Te:fe,n.state={status:a},n.nextCallback=null,n}bt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Te?{status:fe}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var n=null;if(t!==this.props){var a=this.state.status;this.props.in?a!==he&&a!==ye&&(n=he):a!==he&&a!==ye||(n=at)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.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}},r.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===he?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===fe&&this.setState({status:Te})},r.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:he},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var t=this,n=this.props.exit,a=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:at},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(a.exit,function(){t.safeSetState({status:fe},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:fe},function(){t.props.onExited&&t.props.onExited(t.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},r.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},r.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)},r.render=function(){var t=this.state.status;if(t===Te)return null;var n=this.props;return(0,n.children)(t,Se(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},kt(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 ge(){}function st(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(r){st(e,r),st(o,r)}},[e,o])}function qe(e){var o=e.timeout,r=e.style,t=r===void 0?{}:r,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ge,onEntering:ge,onEntered:ge,onExit:ge,onExiting:ge,onExited:ge};var yt=function(e){e.scrollTop=e.scrollTop},lt=function(e){return Math.round(e)+"ms"};function ke(e,o){e===void 0&&(e=["all"]);var r=o||{},t=r.duration,n=t===void 0?300:t,a=r.easing,s=a===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":a,u=r.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:lt(n),f=typeof c=="string"?c:lt(c);return d+" "+p+" "+s+" "+f}).join(",")}function wt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Re(e,o){if(o){var r=function(t,n){var a,s=n.getBoundingClientRect(),u=wt(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);r&&(o.style.webkitTransform=r,o.style.transform=r)}}var vt=l.forwardRef(function(e,o){var r=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,E=Se(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Ze(r.ref,y),v=Ze(b,o),k=l.useCallback(function(){y.current&&Re(n,y.current)},[n]);return l.useEffect(function(){if(!a&&n!=="down"&&n!=="right"){var h=function(C,W){var O;function q(){for(var z=this,I=arguments.length,_=new Array(I),G=0;G<I;G++)_[G]=arguments[G];clearTimeout(O),O=setTimeout(function(){C.apply(z,_)},W)}return W===void 0&&(W=166),q.clear=function(){clearTimeout(O)},q}(function(){y.current&&Re(n,y.current)}),j=wt(y.current);return j.addEventListener("resize",h),function(){h.clear(),j.removeEventListener("resize",h)}}},[n,a]),l.useEffect(function(){a||k()},[a,k]),l.createElement(Je,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,j){Re(n,h),yt(h),d&&d(h,j)},onEntered:p,onEntering:function(h){var j=qe({timeout:c,mode:"enter",style:L({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=ke("-webkit-transform",j),h.style.transition=ke("transform",j),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var j=qe({timeout:c,mode:"exit",style:L({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=ke("-webkit-transform",j),h.style.transition=ke("transform",j),Re(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:a,timeout:c},E),function(h,j){return l.cloneElement(r,L({ref:v,style:L({visibility:h!=="exited"||a?void 0:"hidden"},s,{},r.props.style)},j))})});vt.displayName="Slide";var Le=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))},le={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(Le,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(Le,null,l.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:l.createElement(function(){return l.createElement(Le,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(Le,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:vt,transitionDuration:{enter:225,exit:195}};function De(e){return Object.entries(e).reduce(function(o,r){var t,n=r[0],a=r[1];return L({},o,((t={})[n]=Xe(a),t))},{})}var Et="notistack-CollapseWrapper",tn=function(e){return"notistack-MuiContent-"+e},ct=De({root:{height:0},entered:{height:"auto"}}),_e="0px",Ct=l.forwardRef(function(e,o){var r=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(Je,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=_e},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=qe({timeout:175,mode:"enter"}),x=f.duration,E=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=E||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){yt(d);var p=qe({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=_e,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:oe(ct.root,d==="entered"&&ct.entered),style:L({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:ke("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:a,className:Et,style:{display:"flex",width:"100%"}},r))})});Ct.displayName="Collapse";var ut={right:"left",left:"right",bottom:"up",top:"down"},nn=function(e){return"anchorOrigin"+Qe(e)},on=function(){};function Ce(e,o){return e.reduce(function(r,t){return t==null?r: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),r.apply(this,u),t.apply(this,u)}},on)}var rn=typeof window<"u"?l.useLayoutEffect:l.useEffect;function dt(e){var o=l.useRef(e);return rn(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var Ue,St=l.forwardRef(function(e,o){var r=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(),E=dt(function(){u&&u.apply(void 0,arguments)}),y=dt(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){E(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)},v=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",v),window.addEventListener("blur",b),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",b)}},[s,v,d]),l.createElement("div",Object.assign({ref:o},f,{className:oe("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),v()}}),r)});St.displayName="Snackbar";var an=De({root:(Ue={display:"flex",flexWrap:"wrap",flexGrow:1},Ue[Ne]={flexGrow:"initial",minWidth:"288px"},Ue)}),Ye=l.forwardRef(function(e,o){var r=e.className,t=Se(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:oe(an.root,r)},t))});Ye.displayName="SnackbarContent";var we=De({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"}}),pt="notistack-snackbar",Dt=l.forwardRef(function(e,o){var r=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(r)),l.createElement(Ye,{ref:o,role:"alert","aria-describedby":pt,style:c,className:oe("notistack-MuiContent",tn(s),we.root,we[s],d,!u&&p&&we.lessPadding)},l.createElement("div",{id:pt,className:we.message},u?null:p,t),f&&l.createElement("div",{className:we.action},f))});Dt.displayName="MaterialDesignContent";var ve,Ve,We,Pe,$e,sn=l.memo(Dt),ln=De({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),cn=function(e){var o=l.useRef(),r=l.useState(!0),t=r[0],n=r[1],a=Ce([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(z){return!z})},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?sn:p,x=l.useMemo(function(){return function(z){z===void 0&&(z={});var I={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(z).filter(function(_){return!I[_]}).reduce(function(_,G){var J;return L({},_,((J={})[G]=z[G],J))},{})}(d)},[d]),E=c.open,y=c.SnackbarProps,b=c.TransitionComponent,v=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,j=c.content,C=Se(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),W=L({direction:(u=C.anchorOrigin,u.horizontal!=="center"?ut[u.horizontal]:ut[u.vertical]),timeout:k},v),O=j;typeof O=="function"&&(O=O(C.id,C.message));var q=["onEnter","onEntered","onExit","onExited"].reduce(function(z,I){var _;return L({},z,((_={})[I]=Ce([e.snack[I],e[I]],C.id),_))},{});return l.createElement(Ct,{in:t,onExited:q.onExited},l.createElement(St,{open:E,id:C.id,disableWindowBlurListener:h,autoHideDuration:C.autoHideDuration,className:oe(ln.wrappedRoot,x.root,x[nn(C.anchorOrigin)]),SnackbarProps:y,onClose:a},l.createElement(b,Object.assign({},W,{appear:!0,in:E,onExit:q.onExit,onExited:s,onEnter:q.onEnter,onEntered:Ce([q.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],C.id)}),O||l.createElement(f,Object.assign({},C)))))},Ee=20,Ke=6,un=2,mt="."+Et,Ae=De({root:(ve={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ke(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ve[mt]={padding:Ke+"px 0px",transition:"padding 300ms ease 0ms"},ve.maxWidth="calc(100% - "+2*Ee+"px)",ve[ze]={width:"100%",maxWidth:"calc(100% - 32px)"},ve),rootDense:(Ve={},Ve[mt]={padding:un+"px 0px"},Ve),top:{top:Ee-Ke+"px",flexDirection:"column"},bottom:{bottom:Ee-Ke+"px",flexDirection:"column-reverse"},left:(We={left:Ee+"px"},We[Ne]={alignItems:"flex-start"},We[ze]={left:"16px"},We),right:(Pe={right:Ee+"px"},Pe[Ne]={alignItems:"flex-end"},Pe[ze]={right:"16px"},Pe),center:($e={left:"50%",transform:"translateX(-50%)"},$e[Ne]={alignItems:"center"},$e)}),dn=l.memo(function(e){var o=e.classes,r=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,a=e.children,s=oe("notistack-SnackbarContainer",Ae[t.vertical],Ae[t.horizontal],Ae.root,r.containerRoot,r["containerAnchorOrigin"+Qe(t)],n&&Ae.rootDense);return l.createElement("div",{className:s},a)}),ft=function(e){return!(typeof e=="string"||l.isValidElement(e))},pn=function(e){function o(r){var t;return(t=e.call(this,r)||this).enqueueSnackbar=function(n,a){if(a===void 0&&(a={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=ft(n)?n:a,u=ft(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Se(s,["key","preventDuplicate"]),f=Me(c),x=f?c:new Date().getTime()+Math.random(),E=function(b,v){return function(k,h){return h===void 0&&(h=!1),h?L({},le[k],{},v[k],{},b[k]):k==="autoHideDuration"?(O=b.autoHideDuration,q=v.autoHideDuration,(z=function(I){return typeof I=="number"||I===null})(O)?O:z(q)?q:le.autoHideDuration):k==="transitionDuration"?(j=b.transitionDuration,C=v.transitionDuration,(W=function(I,_){return _.some(function(G){return typeof I===G})})(j,["string","number"])?j:W(j,["object"])?L({},le.transitionDuration,{},W(C,["object"])&&C,{},j):W(C,["string","number"])?C:W(C,["object"])?L({},le.transitionDuration,{},C):le.transitionDuration):b[k]||v[k]||le[k];var j,C,W,O,q,z}}(p,t.props),y=L({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:E("persist"),action:E("action"),content:E("content"),variant:E("variant"),anchorOrigin:E("anchorOrigin"),disableWindowBlurListener:E("disableWindowBlurListener"),autoHideDuration:E("autoHideDuration"),hideIconVariant:E("hideIconVariant"),TransitionComponent:E("TransitionComponent"),transitionDuration:E("transitionDuration"),TransitionProps:E("TransitionProps",!0),iconVariant:E("iconVariant",!0),style:E("style",!0),SnackbarProps:E("SnackbarProps",!0),className:oe(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 v=function(j){return f?j.id===x:j.message===u},k=b.queue.findIndex(v)>-1,h=b.snacks.findIndex(v)>-1;if(k||h)return b}return t.handleDisplaySnack(L({},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?L({},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?L({},c):(a=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),L({},c,{open:!1})):L({},c,{requestClose:!0}))});return L({},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?L({},c,{entered:!0}):L({},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?L({},f,{open:!1}):L({},f,{requestClose:!0}):L({},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(L({},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(ot(t)),closeSnackbar:t.closeSnackbar.bind(ot(t))}},t}return bt(o,e),o.prototype.render=function(){var r=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 v,k=Qe(b.anchorOrigin),h=y[k]||[];return L({},y,((v={})[k]=[].concat(h,[b]),v))},{}),E=Object.keys(x).map(function(y){var b=x[y],v=b[0];return l.createElement(dn,{key:y,dense:c,anchorOrigin:v.anchorOrigin,classes:f},b.map(function(k){return l.createElement(cn,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:Ce([r.handleExitedSnack,r.props.onExited],k.id),onEntered:Ce([r.handleEnteredSnack,r.props.onEntered],k.id)})}))});return l.createElement(xt.Provider,{value:t},s,a?Wt.createPortal(E,a):E)},kt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||le.maxSnack}}]),o}(l.Component),jt=function(){return l.useContext(xt)};const ne={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Ot=l.forwardRef((e,o)=>{const{id:r,message:t,iconVariant:n,error:a,hideIconVariant:s,...u}=e,{closeSnackbar:c}=jt(),d=i.T0(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),E=l.useCallback(()=>{c(r)},[r,c]);let y=a?.message;return!y&&l.isValidElement(t)&&(y=t),y||typeof t!="string"||(y=t),y||(y=`Unknown Error: ${t}`),m.jsx(Ye,{ref:o,className:i.yo(ne.root,"error-snackbar"),children:m.jsxs(Bt,{className:ne.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(Ut,{className:ne.actionRoot,children:[s?null:n?.error,m.jsx(i.Typography,{variant:"body2",component:"div",className:ne.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:ne.icons,children:[a?m.jsx(i.IconButton,{"aria-label":"Show more",size:"small",className:i.yo(ne.expand,{[ne.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(i.Xn,{})}):null,m.jsx(i.IconButton,{size:"small",className:ne.expand,style:{color:d.palette.action.active},onClick:E,children:m.jsx(i._o,{fontSize:"small"})})]})]}),a?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:ne.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(i.L9,{error:a,hideLineNumbers:!0})})}):null]})})});Ot.displayName="ToastError";const Mt=l.memo(l.forwardRef((e,o)=>{const{commands:r,commandHook:t,scope:n="workbook",disabled:a=!1,...s}=e,u=i.fe(d=>{const p={variant:i.Qt.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:a},f=m.jsxs(m.Fragment,{children:[m.jsx(i.Le,{...p,command:r.getCommand("newWorkbook"),icon:i.ve(m.jsx(i.yR,{}))}),m.jsx(i.$t,{orientation:"horizontal"}),m.jsx(i.Le,{...p,command:r.getCommand("openWorkbook"),icon:i.ve(m.jsx(i.bR,{}))}),m.jsx(i.Kn,{...p,commands:r,quickCommand:"saveWorkbook",icon:i.ve(m.jsx(i.wR,{})),createPopupPanel:x=>{const E={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return i.qR.getWriteFormats().forEach(b=>{if(b.isDefault)return;let v=null;b.key==="CSV"?v=i.ve(m.jsx(i.xR,{})):b.key==="Excel"&&(v=i.ve(m.jsx(i.vR,{})));const k=r.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(i.Le,{...E,key:b.key,command:k,icon:v})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),i.Fn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return i.Fn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[a,r,t,n]),c="File";return m.jsx(i.Kn,{commands:r,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(i.ns,{className:"label",icon:null,label:c})})}));Mt.displayName="StandaloneFileCommandButton";const mn=m.jsx(i.ar,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(i.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(i.VR,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Tt=l.memo(l.forwardRef((e,o)=>{const{commands:r,workbook:t,logo:n=mn,mainElement:a,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=i.N0(),[p,{width:f}]=i.gc(),x=f<530,E=s?m.jsx(Mt,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,j){}}}):null,y=u?m.jsx(i.HR,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,j){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),v=l.useRef(null);return m.jsx(i.Box,{ref:i.h5([v,p,o]),...c,children:i.DM({commands:r,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(i.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(i.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(i.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[E,k]})]}),m.jsx(i.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:a}),m.jsx(i.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));Tt.displayName="StudioToolbar";const Rt=l.memo(l.forwardRef((e,o)=>{const{workbook:r,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:a,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeOptions:x}=e,E=jt(),y=E?E.enqueueSnackbar:()=>{},b=E?E.closeSnackbar:()=>{},[v,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k($=>({...$,isMounted:!0}))},[]),j=l.useCallback(()=>{k($=>({...$,isMounted:!1}))},[]),C=i.OR(),W=i.LR(),O=i.AR(),q=l.useRef(new Set),z=l.useMemo(()=>{const $=(w,T)=>{if(T?.onceKey){if(q.current.has(T.onceKey))return;const F=new Set(q.current);F.add(T.onceKey),q.current=F}const M={variant:T?.type??i.F0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:T?.preventDuplicate,persist:T?.persist??T?.type===i.F0.Error,action:F=>m.jsx(i.IconButton,{onClick:()=>b(F),children:m.jsx(Xt,{})})};T?.enqueueProps&&Object.assign(M,T.enqueueProps),w||console.log("message is 'null'",T),y(w??"Alert",M)};return{showMessage:$,showBusy:(w,T)=>{let M=null;const F=new Promise(H=>{M=H});return k(H=>{const B=new Map(H.starting);return B.set(F,M),{...H,label:w,starting:B}}),F},showWindow:(w,T,M)=>{const F={...T,onKeyDown:H=>{p?.dispatchToFocusedCommand(H),H.isDefaultPrevented()||H.isPropagationStopped()||T?.onKeyDown?.(H)}};return C(w,{sort:()=>Promise.resolve().then(()=>require("./CHSE1pa8SMApg4BM.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./bHWvGntvmuk8t7sX.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./Cqymi9AOXO_JYvY4.cjs")),comments:()=>Promise.resolve().then(()=>require("./BIPxYhhi1F-y0gSm.cjs")),find:()=>Promise.resolve().then(()=>require("./B11W4AIKbkJQG6ug.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./C6nZKAevPqj8zJY-.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./BCnlTOmUDmizyvVV.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./euAV1pPrNOIb6DV4.cjs"))}[w],F,M)},showOptions:W,showInputOptions:O,showError:w=>{let T,M=i.F0.Error,F="Unknown Error";typeof w=="string"?F=w:w instanceof Error&&(T=w,w.message&&(F=w.message)),w instanceof ce.PartialError&&(M=i.F0.Info),$(F,{type:M,enqueueProps:{error:T}})}}},[]),I=l.useCallback(()=>{},[]),_=($=>{const{workbook:w,setWorkbook:T,importExportDisabled:M,workbookTitle:F="export",setWorkbookTitle:H,notifier:B,requestWorkbookTitle:ae,themeOptions:P,undoManager:S,commands:U,onExecute:V}=$,X=i.fe(P?.onModeChange,[P?.onModeChange]),ie=i.fe(P?.onEnabledDarkGridChange,[P?.onEnabledDarkGridChange]),pe=i.fe(P?.onEnabledDarkImagesChange,[P?.onEnabledDarkImagesChange]),me=i.fe(async(A=null,ee=null)=>{const R=[];let g,D=null,Q=null;if(typeof A=="string"?Q=A:D=A,g=D?A:await i.Jt.openFileDialog(Q??i.qR.getAllReadFormatTypeAsString().join(",")),!g)return null;const Y={source:g,createWorkbookOptions:ee,onWarning:He=>{R.push(He)}},xe=await i.qR.read(Y,B);return R.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
11
|
+
`+R.join(`
|
|
12
|
+
`))),xe},[V,B,w]),je=i.fe(async(A,ee,R)=>{if(!ee&&ae){const g=await ae("Enter Workbook name to "+(R.isDefault?"Save.":`Export as ${R.description}.`));return g!==null&&i.qR.writeFile(g,A,{formatType:R.key})}return i.qR.writeFile(ee,A,{formatType:R.key})},[B,w,ae]),K=l.useCallback(()=>({contains:A=>!0,focus(){}}),[]),se=l.useMemo(()=>{const A=[];M||(i.qR.getWriteFormats().forEach(R=>{const g=R.isDefault,D={label:g?"Save Workbook":`Save Workbook as ${R.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${R.description}`},tags:R.tags,description:`Save the workbook to the desktop${g?"":` as ${R.description}`}.`};g&&(D.shortcut={key:"S",modifiers:[i.De.Ctrl]},A.push(new i.Oe("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[i.De.Shift,i.De.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{je(w,null,R).catch(Y=>{B?.showError?.(Y)})})));const Q=g?"saveWorkbook":`saveWorkbookAs${R.key}`;A.push(new i.Oe(Q,K,D,Y=>{je(w,Y??F,R).catch(xe=>{B?.showError?.(xe)})}))}),A.push(new i.Oe("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[i.De.Ctrl]}},async(R=null)=>{const g={date1904:w.isDate1904(),...w.options};try{const D=await me(R,g);if(!D)return;const Q=D.title,Y=D.workbook,xe=Y.getSelectedSheet();if(D.formatType.mimeType==="text/csv"){const He=w.findValidSheetName(Q);await w.doBatch(async()=>{const et=xe.getUsedRange();et?await w.getSheets().add({name:He,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(et):B?.showMessage("The file appears to be blank.")},`Import CSV '${Q}'`)}else w?.close(),H?.(Q),T(Y)}catch(D){B?.showError?.(D)}})),A.push(new i.Oe("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(R){if(!R){const g=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(g.option!=="Open")return;R=g.input}R&&console.log("openWorkbookFromUrl",R)})));let ee=[];return P&&(ee=[new i.Oe("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new i.Oe("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 i.Oe("enableDarkGrid",K,{label:"Enable Dark Grid",description:"Allow the grid to render in dark 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 i.Oe("enableDarkImages",K,{label:"Enable Dark Images",description:"Allow the images to render in dark 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."})]),[...A,...ee,new i.Tt("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new i.Tt("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[i.De.Ctrl]}},()=>{}),new i.Oe("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new i.Oe("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new i.Oe("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new i.Oe("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")})]},[w,F,B,M,P,U,S]),Z=l.useMemo(()=>{let A=null;return A=U?U.createChildGroup(K,"standaloneWorkbook",!1):new i.gs(K,"standaloneWorkbook"),A.addCommands(se,!0),A},[U,se]);i.gR({manager:S,commands:Z,notifier:B});const{themeMode:be}=i.UR();l.useEffect(()=>{if(!P||!Z)return;const A=P.mode==="dark"||!P.mode&&be==="dark";Z.getCommand("themeMode").update({state:P.mode??null,label:A?"Dark Mode":"Light Mode",scopedLabels:{appearance:A?"Dark Mode":"Light Mode"}}).updateCallback(()=>{X(A?i.WR.Light:i.WR.Dark)}),Z.getCommand("defaultThemeMode").update({state:!P.mode}).updateCallback(()=>{X(null)}),Z.getCommand("enableDarkGrid").update({state:P.enableDarkGrid}).updateCallback(()=>{ie(!P.enableDarkGrid)}),Z.getCommand("enableDarkImages").update({state:P.enableDarkImages}).updateCallback(()=>{pe(!P.enableDarkImages)})},[be,P,se]);const{showModal:Oe}=i.Bu();return l.useEffect(()=>{const A=()=>new Promise((ee,R)=>{const g=l.lazy(()=>Promise.resolve().then(()=>require("./VJLb1uMfbKAUW1QF.cjs"))),D=Oe(g,{title:"Shortcut Keys Reference",commands:Z,onDone:()=>{D.hide()},TransitionProps:{onExited:()=>{ee(!0)}}})});Z.getCommand("showKeyboardShortcuts").updateCallback(()=>A()),Z.getCommand("help").updateCallback(()=>A())},[se,Z]),Z})({workbook:r,setWorkbook:t,importExportDisabled:f,workbookTitle:a,setWorkbookTitle:s,commands:p,requestWorkbookTitle:$=>new Promise(w=>{n.current?n.current.requestWorkbookTitle((T,M)=>{w(T)},{selectAll:!0,requestReason:$}):w(u)}),themeOptions:x,undoManager:d,notifier:z,onExecute:I});l.useEffect(()=>{v.starting.size<=0||!v.isMounted||k($=>{const w=new Map($.running);return $.starting.forEach((T,M)=>{const F=()=>{k(H=>{const B=new Map(H.running);return B.delete(M),{...H,running:B}})};w.set(M,F),T(F)}),{...$,starting:new Map,running:w}})},[v]);const[G,J]=l.useState(null);l.useEffect(()=>{v.starting.size!==0||v.running.size!==0?J(m.jsx(i.Vl,{icon:m.jsx(i.RR,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:v.label,onMount:h,onUnmount:j,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):J(null)},[v.starting,v.running]);const re=l.useMemo(()=>m.jsx(i.$R,{commands:_,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[_]),N={notifier:z,commands:_};return r&&(N.statusBarProps={childrenEnd:re}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,N):null]})}));Rt.displayName="SnackbarAndCommandsWrapper";const Lt=l.memo(l.forwardRef((e,o)=>{const{className:r,sx:t,style:n,onElementLoad:a,onError:s,undoManager:u,errorPanel:c=i.xx,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:E,importExportDisabled:y=!1,themeOptions:b,autoFocus:v=!1,commands:k,title:h,onTitleChange:j,titleProps:C,renderLoadingPanel:W,...O}=e,q=l.useRef(null),z=i.fe(x,[x]),I=i.fe(j??C?.onTitleChange,[j??C?.onTitleChange]),_=C?.placeHolder??"Untitled",G=b?.mode,{themeMode:J,source:re}=i.UR({mode:G}),N=l.useMemo(()=>({...b,light:i.DR(!1,ce.CommonUtils.deepMerge(b?.theme??{},b?.light??{})),dark:i.DR(!0,ce.CommonUtils.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),$=J===i.WR.Dark,[w,T]=l.useState(null);l.useEffect(()=>{T(u??new ce.UndoManager)},[u]);const[M,F]=l.useState(null),[H,B]=l.useState(null),ae=i.Xf();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!ce.CommonUtils.isPromiseLike(p)){const g={theme:ae.getDefaultTheme(),...f};B(new ce.Workbook(g))}else B(p)},[p]),l.useLayoutEffect(()=>{if(H){if(H instanceof ce.Workbook)return F({workbook:H}),void(p!==H&&z?.(H));(async()=>{try{let g,D=await Promise.resolve(H);D&&D.source&&(D=await i.qR.read(D)),D.workbook?(X(D.title),g=D.workbook):g=D,z?.(g),F({workbook:g})}catch(g){z?.(null),F({error:g})}})()}},[H]);const[P,S]=l.useState(null);l.useEffect(()=>{if(!w||!M)return;w.clear();const g=M?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:D=>{D.getDescription()?w.addUndoOperation({description:D.getDescription(),undo:()=>(g.revert(D.getId()),P.source?.focus(),()=>{g.restore(D.getId()),P.source?.focus()})}):console.warn("commit has no description",D)}}):void 0},[w,M,P]);const U=i.fe(g=>{g?w.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):w.setRepeatableOperation(null)},[w]),[V,X]=l.useState(h??C?.title??"");l.useEffect(()=>{X(h??C?.title??"")},[h??C?.title]),l.useEffect(()=>{I?.(V)},[V]);const[ie,pe]=l.useState(null),me=l.useMemo(()=>{const g=()=>({contains:D=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new i.gs(g,"application")},[k]),je=i.fe(g=>{pe(g.source.getViewportElement()),S(g),me.activate("sheet"),a?.(g)},[me]);l.useEffect(()=>{P&&v&&P.source?.focus(typeof v=="object"?v:void 0)},[P]);const K=l.useRef(null),se=l.useCallback(g=>{let D=null;return C?.hidden||(D=m.jsx(i.eR,{...C,style:{maxWidth:"100%",...C?.style},workbook:q.current,ref:K,title:V,placeHolder:_,onTitleChange:Q=>{X(Q)}})),m.jsx(Tt,{...g,logo:E,mainElement:D,showFileMenu:!y,showAppearanceMenu:!!(N?.onEnabledDarkGridChange||N?.onEnabledDarkImagesChange||N?.onModeChange)})},[E,V,C,N,y,me]);l.useEffect(()=>{const g=D=>D.preventDefault();return q.current?.addEventListener("wheel",g,{passive:!1}),()=>{q.current?.removeEventListener("wheel",g)}},[]);const Z=l.useMemo(()=>{const g={transparentBackground:!0};return m.jsx(i.Box,{sx:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",...n},children:W?.(g)??m.jsx(i.Vl,{...g})})},[t,n,W]),be=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),Oe=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]),A=i.h5([q,o]),ee=l.useMemo(()=>{if(!M)return Z;if(M.error||!M.workbook)return be({error:M.error});let g=null,D=null,Q=!1;return N&&(g=$?N.dark:N.light,D=$&&N.enableDarkGrid?N.dark:N.light,Q=N.enableDarkImages),m.jsx(i.JM,{sx:Oe,style:n,tabIndex:0,autoFocus:!0,workbook:M.workbook,ref:A,renderToolbar:se,onElementLoad:je,onRepeatCommandChange:U,onKeyDown:Y=>{d?.(Y)},renderLoadingPanel:W,gridTheme:D,headersTheme:g,enableDarkImages:Q,className:i.yo(r,"sheetxl-workbook"),onContextMenu:Y=>Y.preventDefault(),...O},"WorkbookElement")},[M,V,w,Z,W,N,O,se,Oe]);let R=m.jsx(Qt,{fallbackRender:be,children:m.jsx(pn,{maxSnack:3,domRoot:ie,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,D,Q)=>{q.current?.focus()},Components:{error:Ot},iconVariant:{success:m.jsx(i.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(i.MR,{style:{marginRight:"8px"}})},children:m.jsx(i.IR,{children:m.jsx(Rt,{workbook:M?.workbook,setWorkbook:B,importExportDisabled:y,titlePlaceHolder:_,titleWorkbook:V,setWorkbookTitle:X,refWorkbookTitle:K,commands:me,undoManager:w,themeOptions:N,children:ee})})})});return N&&(R=m.jsxs(i.nk,{theme:$?N.dark:N.light,children:[N.cssBaseline?m.jsx(Gt,{}):null,R]})),R}));Lt.displayName="EagerStudio";const fn=Object.freeze(Object.defineProperty({__proto__:null,default:Lt},Symbol.toStringTag,{value:"Module"})),hn=Object.freeze(Object.defineProperty({__proto__:null,E:fn,c:oe},Symbol.toStringTag,{value:"Module"}));exports.ABtrpK9yMoHh6oPr=hn,exports.Collapse=Fe,exports.he=oe;
|