@sheetxl/io-xlsx 0.8.0-beta.5 → 0.8.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{DtBN3UOzNJjYBwJ6.cjs → 17tMBnuyu4YIxixh.cjs} +1 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +1 -0
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +2 -0
- package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +5 -0
- package/browser/cjs/{DULsYP_GcPGLVYSE.cjs → MqKQ_B5qRARrRbO4.cjs} +16 -3
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/{DOTve1YXP86VW8ln.cjs → qb-YQ8mGwpogSP08.cjs} +1 -1
- package/browser/esm/{B9qJ5NSreEcSeTPX.mjs → 96C1ntelYWh7kQtW.mjs} +1 -1
- package/browser/esm/{B1yJJD4hEJtoWKFg.mjs → B0E-_6m23g4BDnX6.mjs} +2 -2
- package/browser/esm/{BcWQ-WWSh4k_BbiQ.mjs → B3cYXnqV2Zjaw6Jp.mjs} +4 -4
- package/browser/esm/{BIfJ7hj1nXfdThAg.mjs → BLEHoDT0SLbo8OO2.mjs} +1236 -1150
- package/browser/esm/{DZcQYS8AC3Q4KMNZ.mjs → BYENv_UE3Hv5ghGD.mjs} +599 -597
- package/browser/esm/{EvN99eSJ3aoJPumL.mjs → CGgjL7wM5WHZA6Dt.mjs} +2 -2
- package/browser/esm/{Cka8nUQmzdu2avsT.mjs → D01fs7vrCLlmdHoW.mjs} +899 -795
- package/browser/esm/{DJsvdO0gLkETZXLX.mjs → DdTgGiFy8nAZTQ0d.mjs} +2 -2
- package/browser/esm/{VMf5ikEX-Pl2qTh8.mjs → FwrsLfi1iEAQGIjj.mjs} +246 -154
- package/browser/esm/{CEbxib7xV2WuS-D3.mjs → gicSNvWtBLkvLsIw.mjs} +3 -3
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CCD-nLdFzaQd6BuH.mjs → k-aEFzUZ8aU9FPf4.mjs} +1 -1
- package/node/esm/{CT9_4oNvQhBAW0fh.mjs → B-g20MoPHbZFapp8.mjs} +1652 -1545
- package/node/esm/{BJHtwV9ss8ol7zme.mjs → Bu9QkKpBW4G2ULAg.mjs} +177 -83
- package/node/esm/{CwK9xIdlW4XaFkip.mjs → CHl-WFsto0oTmBtB.mjs} +380 -288
- package/node/esm/{DqkQZkjIOnAGH7ah.mjs → Co5_sjvEk9d-x9gx.mjs} +576 -574
- package/node/esm/{DmlGXhQHqcwqLA05.mjs → D-l0hqYTXUIEFoTg.mjs} +2 -2
- package/node/esm/{CRjza0eYeRMSvbQf.mjs → DWF_5NYPdrlTVvHi.mjs} +1 -1
- package/node/esm/{CsrSCSuGVvpk7uBv.mjs → ZWSOYqmTKEmEOz2u.mjs} +2 -2
- package/node/esm/{C0lFi5Rstdk8y5VR.mjs → am47EU_k1uSVm7yW.mjs} +2 -2
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +4 -0
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
- package/types/src/utils/VmlNoteShapes.d.ts +82 -22
- package/types/src/writer/emitters/CommentsEmitter.d.ts +9 -3
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
- package/browser/cjs/CUhvQ38mNlw3YIEp.cjs +0 -5
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
require("./qb-YQ8mGwpogSP08.cjs");const e=require("./MqKQ_B5qRARrRbO4.cjs");let t=require("@sheetxl/sdk");var n=`resourcesById`,r=class{constructor(e){this._kind=e.kind,this._contentType=e.contentType,this._relTypeUri=e.relTypeUri,this._path=e.path}getKind(){return this._kind}getContentType(e){return this._contentType}getRelTypeUri(e){return this._relTypeUri}getPath(e){return typeof this._path==`function`?this._path(e):this._path}},i=class t{constructor(e,t,n){this.zipWriter=e,this.outputKind=t,this.outWritable=n}static createUint8Array(n){let r=new e.W(new e.X,n);return new t(r,`uint8array`)}static createBlob(n){let r=new e.W(new e.q(`application/zip`),n);return new t(r,`blob`)}static createWritableStream(n,r){let i=new e.W(n,r);return new t(i,`writable`,n)}async add(t,n,r){let i=function(e){let t=e.replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}(t),a={level:r?.level,password:r?.password,encryptionStrength:r?.encryptionStrength,zipCrypto:r?.zipCrypto,lastModDate:r?.lastModDate,keepOrder:r?.keepOrder,uncompressedSize:r?.uncompressedSize,dataDescriptor:r?.dataDescriptor,passThrough:r?.passThrough,compressionMethod:r?.compressionMethod,signature:r?.signature};if(typeof n==`string`)return void await this.zipWriter.add(i,new e.J(n),a);if(n instanceof Uint8Array||ArrayBuffer.isView(n)||n&&typeof n.byteLength==`number`&&typeof n.byteOffset==`number`){try{await this.zipWriter.add(i,new e.Y(n),a)}catch(e){throw console.log(`Error adding Uint8Array source to zip:`,i,a),e}return}let o=(s=n)&&typeof s.getReader==`function`?n:function(e){let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){let{value:n,done:r}=await t.next();r?e.close():e.enqueue(n)},async cancel(e){if(typeof t.return==`function`)try{await t.return(e)}catch{}}})}(n);var s;await this.zipWriter.add(i,o,a)}async close(e){let t=e?.comment,n=await this.zipWriter.close(t,{});return this.outputKind===`writable`?this.outWritable??n:n}};function a(e){let t=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),n=e=>t(e).replace(/"/g,`"`),r=e=>{if(!e)return``;let t=``;for(let[r,i]of Object.entries(e))i!==void 0&&!1!==i&&(t+=!0===i?` ${r}="1"`:` ${r}="${n(String(i))}"`);return t},i=new TextEncoder,a=``,o=()=>{a&&=(e.write(i.encode(a)),``)},s=e=>{a+=e,a.length>65536&&o()},c=[],l=null,u=[],d=!0;return{decl(){s(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`)},pushDefaultNamespace(e){c.push(e),l=e},getDefaultNamespace:()=>c.length>0?c[c.length-1]:null,popDefaultNamespace(){c.length>0&&(c.pop(),l=c.length>0?c[c.length-1]:null)},start(e,t){d&&u.push({tag:e,attrs:t,bufferPos:a.length});let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}>`)},empty(e,t){let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}/>`)},text(e){s(t(String(e)))},raw(e){s(e)},end(e){let t;if(d){if(u.length===0)throw Error(`XML Writer: Unexpected end tag </${e}> - no matching start tag`);if(t=u[u.length-1],t.tag!==e)throw Error(`XML Writer: End tag </${e}> does not match start tag <${t.tag}>`)}let n=e;if(l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),d){let e=a.length,i=`<${n}${r(t.attrs)}>`.length;e===t.bufferPos+i?(a=a.slice(0,t.bufferPos),s(`<${n}${r(t.attrs)}/>`)):s(`</${n}>`),u.pop()}else s(`</${n}>`)},close(){o()},setValidationDisabled(e){d=!e}}}function o(e){switch(e.kind){case`bytes`:return e.bytes;case`text`:return e.text;case`stream`:return e.stream;case`xmlStream`:{let t=[],n=a({write:e=>t.push(e)});return e.writeXml(n),n.close(),function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(t)}case`xmlStreamed`:return e.write()}}function s(e){let t=c(e);if(!t)return`_rels/.rels`;let n=t.lastIndexOf(`/`),r=n>=0?t.slice(0,n):``;return`${r?`${r}/_rels`:`_rels`}/${n>=0?t.slice(n+1):t}.rels`}function c(e){let t=(e??``).replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}function l(e){let t=(e??``).replace(/\\/g,`/`).trim();return t.startsWith(`/`)||(t=`/`+t),t}function u(e){let t=/^rId(\d+)$/.exec(e);return t?parseInt(t[1],10):2**53-1}function d(e){return String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`).replace(/>/g,`>`)}function f(e,t,n,r=!1){let i=t;if(t.startsWith(`/`))i=t.slice(1);else{if(!e)throw Error(`Relative path "${t}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);i=(e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)+1):``)+t}if(i=p(i),!i.includes(`{n}`)){if(!r&&n.has(i))throw Error(`Path already existing path: ${i}`);return i}let a,o=1;do if(a=i.replace(/{n}/g,String(o)),o++,o>1e4)throw Error(`Failed to resolve path template "${t}" after 10000 attempts. This likely indicates a bug or an impossible constraint.`);while(n.has(a));return a}function p(e){let t=e.split(`/`),n=[];for(let r of t)if(r!==``&&r!==`.`)if(r===`..`){if(n.length===0)throw Error(`Invalid path: too many ".." segments in "${e}"`);n.pop()}else n.push(r);return n.join(`/`)}function m(e,t){if(!e)return t;let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,r=n?n.split(`/`):[],i=t.split(`/`),a=0,o=Math.min(r.length,i.length-1);for(let e=0;e<o&&r[e]===i[e];e++)a++;let s=r.length-a;return`../`.repeat(s)+i.slice(a).join(`/`)}function h(e){return new TextEncoder().encode(e)}function g(e,t){return function(e,t=` `){let n=``,r=0,i=e.split(/(<[^>]+>)/g).filter(Boolean);for(let e=0;e<i.length;e++){let a=i[e];if(a.trim())if(a.startsWith(`<?`))n+=a+`
|
|
2
|
+
`;else if(a.startsWith(`</`))r--,r<0&&console.warn(`XML formatting warning: negative indentation depth: ${a}`),n+=t.repeat(Math.max(r,0))+a+`
|
|
3
|
+
`;else if(a.startsWith(`<`)){let e=a.endsWith(`/>`);n+=t.repeat(r)+a+`
|
|
4
|
+
`,e||r++}else n+=t.repeat(r)+a.trim()+`
|
|
5
|
+
`}return n}(function(e){return new TextDecoder(`utf-8`).decode(e)}(e),t)}var _=class{constructor(e){this.rels=[],this.usedIds=new Set,this.reservedIds=new Set,this.nextId=1,this.sourcePart=c(e)}add(e,t,n){let r=n?.idHint&&!this.usedIds.has(n.idHint)?n.idHint:void 0;if(!r)do r=`rId`+this.nextId++;while(this.usedIds.has(r)||this.reservedIds.has(r));let i=/^rId(\d+)$/.exec(r);return i&&(this.nextId=Math.max(this.nextId,parseInt(i[1],10)+1)),this.usedIds.add(r),this.rels.push({id:r,type:e,target:t,targetMode:n?.external?`External`:void 0}),r}reserve(e){for(let t of e){if(!t)continue;this.reservedIds.add(t);let e=/^rId(\d+)$/.exec(t);e&&(this.nextId=Math.max(this.nextId,parseInt(e[1],10)+1))}}list(){return this.rels}toXmlBytes(){let e=[...this.rels].sort((e,t)=>u(t.id)-u(e.id)||e.id.localeCompare(t.id)),t=[];t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),t.push(`<Relationships xmlns="${v}">`);for(let n of e){let e=[`Id="${d(n.id)}"`,`Type="${d(n.type)}"`,`Target="${d(n.target)}"`];n.targetMode===`External`&&e.push(`TargetMode="External"`),t.push(`<Relationship ${e.join(` `)}/>`)}return t.push(`</Relationships>`),h(t.join(``))}},v=`http://schemas.openxmlformats.org/package/2006/relationships`,y=class{constructor(){this._defaultsSet=new Set,this._overridesSet=new Set,this._defaults=[],this._overrides=[]}addDefault(e,t){let n=function(e){let t=(e??``).trim().toLowerCase();return t.startsWith(`.`)&&(t=t.slice(1)),t}(e);this._defaultsSet.has(n)||(this._defaultsSet.add(n),this._defaults.push({key:n,content:t}))}addOverride(e,t){let n=l(e);this._overridesSet.has(n)||(this._overridesSet.add(n),this._overrides.push({key:n,content:t}))}replaceOverride(e,t){let n=l(e);if(!this._overridesSet.has(n))return;let r=this._overrides.find(e=>e.key===n);r&&(r.content=t)}toXmlBytes(){let e=[];e.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),e.push(`<Types xmlns="${b}">`);let t=this._defaults.reverse();this.addDefault(`rels`,`application/vnd.openxmlformats-package.relationships+xml`),this.addDefault(`xml`,`application/xml`);for(let{key:n,content:r}of t)e.push(`<Default Extension="${d(n)}" ContentType="${d(r)}"/>`);let n=this._overrides;for(let{key:t,content:r}of n)e.push(`<Override PartName="${d(t)}" ContentType="${d(r)}"/>`);return e.push(`</Types>`),h(e.join(``))}},b=`http://schemas.openxmlformats.org/package/2006/content-types`,x=class{constructor(e){this.parts=[],this.relsRoot=new _(``),this.relsByPart=new Map,this.contentTypes=new y,this.zip=e}addContentType(e,t){let n=c(e);this.contentTypes.addOverride(`/`+n,t)}addDefaultType(e,t){this.contentTypes.addDefault(e,t)}replaceContentType(e,t){this.contentTypes.replaceOverride(`/`+c(e),t)}addPart(e,t,n,r){let i=c(e);this.parts.push({path:i,body:t,optionsZip:r}),n&&this.contentTypes.addOverride(`/`+i,n)}rels(e){let t=c(e||``);if(!t)return this.relsRoot;let n=this.relsByPart.get(t);return n||(n=new _(t),this.relsByPart.set(t,n)),n}async emit(){let e=[...this.parts].sort((e,t)=>e.path.localeCompare(t.path));for(let t of e){let e=o(t.body);await this.zip.add(t.path,e,t.optionsZip)}let t=this.relsRoot.toXmlBytes();await this.zip.add(`_rels/.rels`,t,{});let n=[...this.relsByPart.values()].sort((e,t)=>e.sourcePart.localeCompare(t.sourcePart));for(let e of n){let t=s(e.sourcePart),n=e.toXmlBytes();await this.zip.add(t,n,{})}let r=this.contentTypes.toXmlBytes();await this.zip.add(`[Content_Types].xml`,r,{})}async build(e){return await this.emit(),await this.zip.close(e)}},S=new Set([`xl/calcChain.xml`]),C=[/^xl\/slicers\//i,/^xl\/slicerCaches\//i];function w(e){return e===`[Content_Types].xml`||T.test(e)}var T=/^(?:(.*)\/)?_rels\/(.*)\.rels$/;function E(e){if(e===`_rels/.rels`)return``;let t=T.exec(e);if(!t)return null;let n=t[1]??``,r=t[2];return n?`${n}/${r}`:r}function D(e){return e.startsWith(`#`)}function O(e,t){if(t.startsWith(`/`))return p(t);let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;return p((n?n+`/`:``)+t)}var k=class{constructor(e,t,n){this._queue=[],this._scheduledByNodeKey=new Map,this._nodesByPath=new Map,this._writtenPaths=new Set,this._explicitRelTargets=new Set,this._partWriter=new x(e),this._registry=t,this._options=n??{},this._mapState=this._options.mapState??new Map,this._sourcePackage=this._options.sourcePackage??null,this._macroEnabled=this._options.macroEnabled??!1,this._reserveSourceRelIds(``)}_isSourcePartCarried(e){let t=this._sourcePackage;return!(!t||!t.has(e))&&!S.has(e)&&!t.isAbsorbed(e)&&!(!this._macroEnabled&&e===`xl/vbaProject.bin`)&&!w(e)&&(!t.hasStructuralChange()||!function(e){return C.some(t=>t.test(e))}(e))}_reserveSourceRelIds(t){let n=this._sourcePackage?.getPart(s(t));n&&this._partWriter.rels(t).reserve(e.U(n.data).map(e=>e.id))}async waitEmit(){let e=this._queue;for(;e.length;){let t=e.shift();await this._processPart(t)}}async build(e){return await this.waitEmit(),this._passthroughSourceParts(),this._applyWorkbookContentTypeVariant(),await this._partWriter.build(e??{})}_passthroughSourceParts(){let t=this._sourcePackage;if(!t)return;let n=new Set(this._writtenPaths),r=[];for(let e of t.getNames())n.has(e)||this._isSourcePartCarried(e)&&r.push(e);let i=new Set(n);for(let e of r)i.add(e);let a=t.getPart(`[Content_Types].xml`),o=a?e.H(a.data):null;if(o)for(let{ext:e,contentType:t}of o.defaults)this._partWriter.addDefaultType(e,t);for(let e of r){let n=t.getPart(e),r=o?.overrides.get(`/`+e);n.raw?this._partWriter.addPart(e,{kind:`bytes`,bytes:n.raw.compressedData},r,{passThrough:!0,compressionMethod:n.raw.compressionMethod,signature:n.raw.signature,uncompressedSize:n.uncompressedSize}):this._partWriter.addPart(e,{kind:`bytes`,bytes:n.data},r),this._writtenPaths.add(e)}for(let e of t.getNames()){if(e===`[Content_Types].xml`||!w(e))continue;let r=E(e);r!==null&&(r===``||i.has(r))&&(t.isAbsorbed(r)||this._mergeSourceRelsInto(r,t.getPart(e).data,n,i))}}_applyWorkbookContentTypeVariant(){this._macroEnabled&&this._partWriter.replaceContentType(`xl/workbook.xml`,`application/vnd.ms-excel.sheet.macroEnabled.main+xml`)}_mergeSourceRelsInto(t,n,r,i){let a=this._partWriter.rels(t),o=t===``||r.has(t);for(let s of e.U(n)){if(s.external||D(s.target)){a.add(s.type,s.target,{external:s.external,idHint:s.id});continue}let e=O(t,s.target);o&&(r.has(e)||this._explicitRelTargets.has(`${t}::${e}`))||(i.has(e)?a.add(s.type,s.target,{idHint:s.id}):this._registry.ownsRelType(s.type)||S.has(e)||this._sourcePackage?.isAbsorbed(e)||console.warn(`Dropping preserved relationship to missing part '${e}'`,t||`(root)`))}}addPart(e,t,n,r){return this._addPartInternal(``,e,t,n,r)}_addPartInternal(e,t,n,r,i){let a=this._registry.get(t);if(!a)throw Error(`No emitter registered for kind '${t}'.`);let o=a.getContentType(n),s=a.getRelTypeUri(n),c=r??a.getPath?.(n);if(!c)throw Error(`No path provided in either argument or emitter.`);let l=this._writtenPaths,u=f(e,c,l),d=`${t}:${u}`,p=this._scheduledByNodeKey.get(d);if(!p){let e;this._reserveSourceRelIds(u),p={kind:t,key:d,payload:n,path:u,contentType:o,promise:new Promise(t=>{e=t}),resolve:e},this._scheduledByNodeKey.set(d,p),this._queue.push(p)}let h=this._nodesByPath.get(e);h||(h=new Set,this._nodesByPath.set(e,h)),h.add(d),!o||s||e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,u);let g=null;if(s){let t=m(e,p.path);g=this._partWriter.rels(e).add(s,t,{idHint:i})}return l.add(u),{path:u,contentTypeUri:o,relId:g}}addBinary(e,t,n,r,i=!1,a){return this._addBinaryInternal(``,e,t,n,r,i,a)}_addBinaryInternal(e,t,n,r,i,a=!1,o){if(!i)throw Error(`No path provided for binary.`);if(!n)throw Error(`No content type provided for binary.`);let s=this._writtenPaths,c=f(e,i,s,a),l=null;if(r){let t=m(e,c);l=this._partWriter.rels(e).add(r,t,{idHint:o})}if(e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,c),!s.has(c)){let e=c.split(`.`).pop()||``;e&&this._partWriter.addDefaultType(e,n),this._partWriter.addPart(c,{kind:`bytes`,bytes:t},void 0,{level:0,uncompressedSize:t.byteLength,dataDescriptor:!1}),s.add(c)}return{path:c,contentTypeUri:n,relId:l}}async _waitForDescendants(e){let t=this._nodesByPath.get(e);if(!t||t.size===0)return;let n=[];for(let e of t){let t=this._scheduledByNodeKey.get(e);if(t){let e=this._processPart(t);n.push(e)}}await Promise.all(n)}async _processPart(e){if(e.processed)return e.promise;e.processed=!0;let t=this._registry.get(e.kind),n=e.path;this._partWriter.addContentType(e.path,e.contentType);try{let r=[],i={write:e=>{r.push(e)}},o;await t.emit(e.payload,{getXMLWriter:()=>o||(o=a(i),o),addPart:(e,t,r,i)=>this._addPartInternal(n,e,t,r,i),addBinary:(e,t,r,i,a=!1,o)=>this._addBinaryInternal(n,e,t,r,i,a,o),addExternal:(e,t,r)=>({path:t,contentTypeUri:null,relId:this._partWriter.rels(n).add(e,t,{external:!0,idHint:r})}),addRelationship:(e,t,r)=>{if(!this._writtenPaths.has(t)&&!this._isSourcePartCarried(t))return null;let i=m(n,t),a=this._partWriter.rels(n).add(e,i,{idHint:r});return this._explicitRelTargets.add(`${n}::${t}`),a},waitEmit:()=>this._waitForDescendants(e.path),getPath:()=>e.path,getSharedStates:()=>this._mapState,warn:(t,n,r)=>{let i=n??e.path,a=this._options.onWarning;a?a(t,i,r):console.warn(t,i)},log:(t,n)=>{console.warn(t,n??e.path)}});let s=function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(r),c=this._options.onPartEmitted;c&&await c(e.kind,e.path,s),ee&&(console.log(`\n=== ${e.path} ===`),console.log(g(s))),this._partWriter.addPart(e.path,{kind:`bytes`,bytes:s},e.contentType)}catch(t){throw this._options.onPartError?.(e.kind,e.path,t),t}finally{this._nodesByPath.delete(e.path),this._scheduledByNodeKey.delete(e.key),e.resolve()}}},ee=!1,A=class{constructor(){this.map=new Map}register(e){let t=e.getKind();if(this.map.has(t))throw Error(`Duplicate part kind: ${t}`);this.map.set(t,e)}get(e){let t=this.map.get(e);if(!t)throw Error(`Unknown part kind: ${e}`);return t}has(e){return this.map.has(e)}ownsRelType(e){for(let t of this.map.values())if(t.getRelTypeUri()===e)return!0;return!1}};function j(e,t,n){e&&(e.algorithm&&(t[n?`${n}AlgorithmName`:`algorithmName`]=e.algorithm),e.hash&&(t[n?`${n}HashValue`:`hashValue`]=e.hash),e.salt&&(t[n?`${n}SaltValue`:`saltValue`]=e.salt),e.spinCount!==void 0&&(t[n?`${n}SpinCount`:`spinCount`]=e.spinCount))}var te=`hiddenFormulaXfs`,M=class{constructor(e,t){this._variants=new Map,this._sources=[],this._json=e,this._styles=t,this._directCount=Math.max(1,e?.direct?.length??0)}getHiddenXf(e){let t=this._variants.get(e);return t!==void 0||(this._isShown(e)?t=e:(t=this._directCount+this._sources.length,this._sources.push(e)),this._variants.set(e,t)),t}getSources(){return this._sources}_isShown(e){let n=this._json?.direct?.[e],r=n?.protection?.showFormulas;if(r!==void 0)return r;let i=(e===0?void 0:n?.named)??t.IStyle.BuiltInName.Normal;return this._styles.getNamedStyles().getByName(i)?.toJSON().style?.protection?.showFormulas??!1}},N=class{constructor(){this._daprFMBks=[],this._daprFMBkMap=new Map,this._rvFMBks=[],this._rvFMBkMap=new Map,this._valueMeta=[]}registerArrayCell(e){let t=+!!e,n=`1,${t}`,r=this._daprFMBkMap.get(n);return r===void 0&&(r=this._daprFMBks.length,this._daprFMBks.push({fDynamic:1,fCollapsed:t}),this._daprFMBkMap.set(n,r)),r+1}registerRichValueCell(e){let t=this._rvFMBkMap.get(e);t===void 0&&(t=this._rvFMBks.length,this._rvFMBks.push(e),this._rvFMBkMap.set(e,t));let n=this._valueMeta.length;return this._valueMeta.push(t),n+1}hasCellMeta(){return this._daprFMBks.length>0}hasValueMeta(){return this._valueMeta.length>0}hasAny(){return this.hasCellMeta()||this.hasValueMeta()}getDAPRFutureMetadataBlocks(){return this._daprFMBks}getRVFutureMetadataBlocks(){return this._rvFMBks}getValueMeta(){return this._valueMeta}},ne=class{constructor(e,t=console.warn){this._entries=[],this._keyMap=new Map,this._metaCollector=e,this._onWarn=t}add(e){if(e==null)return this._onWarn?.(`RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!`),this._registerFallback();if(t.FormulaError.isError(e)){let t=e.getCode(),n=this._register(`_error:${t}`,{errorType:``+(t-1)},P);return this._metaCollector.registerRichValueCell(n)}return e.isIRichData&&e.getType(),this._onWarn?.(`RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!`,e),this._registerFallback()}_registerFallback(){let e=this._register(`_error:fallback`,{errorType:t.FormulaError.Code.Unknown-1},P);return this._metaCollector.registerRichValueCell(e)}_register(e,t,n){let r=this._keyMap.get(e);return r===void 0&&(r=this._entries.length,this._entries.push({handler:n,rawValue:t}),this._keyMap.set(e,r)),r}getCount(){return this._entries.length}hasAny(){return this._entries.length>0}getEntries(){return this._entries}uniqueHandlers(){let e=new Set,t=[];for(let n of this._entries)e.has(n.handler)||(e.add(n.handler),t.push(n.handler));return t}handlerStructureIndex(e){let t=0,n=new Set;for(let r of this._entries)if(!n.has(r.handler)){if(r.handler===e)return t;n.add(r.handler),t++}return-1}},P=new class{constructor(e,t){this.type=e,this.props=t}getValues(e){return this.props.map(([t,,n=``])=>{let r=e?.[t];return r==null?n:``+r})}}(`_error`,[[`errorType`,`i`,``],[`subType`,`i`,`0`]]),F=`application/xml`,I=async(e,t)=>{let n=e.parts,r=n?n.length:0;for(let i=0;i<r;i++){let r=n[i];try{await L(r,t)}catch(n){t.log(`Unable to write the part '${r.name??r.id}' referenced by '${e.name??e.id}'`,n)}}},L=async(e,t,r)=>{let i=e.resId===void 0?void 0:t.getSharedStates().get(n)?.get(e.resId);if(!i)return e.resId===void 0?t.addPart(`embeddedPart`,e,r,e.id):(t.log(`The part '${e.name??e.id}' cites resource ${e.resId}, which is not in the workbook.`),null);let a=await i.getExternalURI();if(a){let n=t.addExternal(e.type,a,e.id);return n.relId!==e.id&&t.log(`The external reference '${e.id}' was written as '${n.relId}'; the markup will not find it.`),n}let o=await i.toBuffer();return t.addBinary(new Uint8Array(o),e.contentType||F,e.type,r??`./${re(e.name)}`,!1,e.id)},re=e=>{let t=e&&/^[\w.\-~%]+$/.test(e)?e:`part.xml`,n=t.lastIndexOf(`.`),r=n>0?t.slice(0,n):t,i=n>0?t.slice(n):``;return`${r.replace(/\d+$/,``)}{n}${i}`},ie=`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml`,ae=(e,t)=>e.getSharedStates().get(`pivotCachePaths`)?.get(t)??null,oe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,se=`fileVersion`,ce=`sheetParts`,le=`externalLinkParts`;function ue(e){if(!e||e.indexOf(`[`)===-1)return[];let t=[],n=e.replace(/"(?:[^"]|"")*"/g,``);for(let e of n.matchAll(/\[(\d+)\]/g)){let n=Number(e[1]);n>0&&!t.includes(n)&&t.push(n)}return t}var de={auto:`auto`,automaticExceptTables:`autoNoTable`,manual:`manual`};function R(e,n,r,i){if(!r)return;let a=typeof r==`string`?n.parseColor(r):r;i&&e.start(i);let o=a.getType(),s=a.getVal(),c=a.getAdjustments(),l=c&&c.length>0;switch(o){case`scheme`:l?(e.start(`schemeClr`,{val:s}),z(e,c),e.end(`schemeClr`)):e.empty(`schemeClr`,{val:s});break;case`named`:if(t.Color.isSystem(s)){let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:s,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:s,lastClr:t})}else l?(e.start(`prstClr`,{val:s}),z(e,c),e.end(`prstClr`)):e.empty(`prstClr`,{val:s});break;case`auto`:{let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:`windowText`,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:`windowText`,lastClr:t});break}case`index`:l?(e.start(`srgbClr`,{val:s}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:s});break;case`hsl`:let n=a.toHex().toString();l?(e.start(`srgbClr`,{val:n}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:n});break;case`rgb`:case`lrgb`:let r=a.toHex().toString();l?(e.start(`srgbClr`,{val:r}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:r});break;case`hex`:let i=s.replace(`#`,``).toUpperCase();l?(e.start(`srgbClr`,{val:i}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:i});break;default:let o=s.replace(`#`,``).toUpperCase();e.empty(`srgbClr`,{val:o})}i&&e.end(i)}function z(e,t){if(t&&t.length!==0)for(let n of t)for(let[t,r]of Object.entries(n)){if(r==null)continue;let n=t;if(n)if(typeof r==`boolean`)e.empty(n);else{let i;if(t===`alpha`||t===`alphaOff`||t===`alphaMod`)i=Math.round(1e5*r);else{if(t===`eTint`){if(r<0){e.empty(`shade`,{val:Math.round(1e5*(1+r)).toString()});continue}e.empty(`tint`,{val:Math.round(1e5*r).toString()});continue}i=Math.round(1e3*r)}e.empty(n,{val:i.toString()})}}}function B(e,n,r,i,a=!1,o=!1){if(!r)return;let s=typeof r==`string`?n.parseColor(r):r,c=()=>{e.empty(i,{rgb:ve(s.toHex().toString(!0))})},l=s.getAdjustments(),u=l&&l.length>0,d=s.getType();if(d!==t.IColor.Type.Auto){if(d===t.IColor.Type.Scheme){let n=s.getVal(),r=fe[n]??n,a=he.get(r);if(a===void 0&&r!==`phClr`)return console.warn(`Color scheme not in theme. schemeVal=${n} themeKey=${r}`),c();let o={};if(o.theme=a,u){if(!function(e){for(let n of e)switch(Object.keys(n)[0]){case t.IColor.AdjustmentType.Tint:case t.IColor.AdjustmentType.ETint:case t.IColor.AdjustmentType.Shade:case t.IColor.AdjustmentType.Lum:case t.IColor.AdjustmentType.LumOff:case t.IColor.AdjustmentType.LumMod:case t.IColor.AdjustmentType.Alpha:case t.IColor.AdjustmentType.AlphaOff:case t.IColor.AdjustmentType.AlphaMod:continue;default:return!1}return!0}(l))return c();let e=l.length===1?l[0][t.IColor.AdjustmentType.ETint]:void 0,n;if(e!==void 0)n=ge(e);else{let e=s.getBaseColor().toHex().toString(!0),t=s.toHex().toString(!0);n=ge(function(e,t){let n=V(e,0,255),r=V(t,0,255);return Math.abs(r-n)<1e-9?0:r<n?n<=1e-9?-1:V(r/n-1,-1,0):255-n<=1e-9?0:V((r-n)/(255-n),0,1)}(_e(e),_e(t)))}n!==0&&(o.tint=n)}e.empty(i,o);return}if(d===t.IColor.Type.Index){let t=s.getVal(),n=t.substring(5,t.length);e.empty(i,{indexed:Number(n)});return}return c()}e.empty(i,{auto:1})}var fe={bg1:`lt1`,tx1:`dk1`,bg2:`lt2`,tx2:`dk2`,accent1:`accent1`,accent2:`accent2`,accent3:`accent3`,accent4:`accent4`,accent5:`accent5`,accent6:`accent6`,hlink:`hlink`,folHlink:`folHlink`},pe=Object.freeze([`lt1`,`dk1`,`lt2`,`dk2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),me=Object.freeze([`dk1`,`lt1`,`dk2`,`lt2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),he=new Map(pe.map((e,t)=>[e,t]));function V(e,t,n){return Math.max(t,Math.min(n,e))}function ge(e){let t=V(e,-1,1);return Math.abs(t)<1e-12?0:t}function _e(e){let t=function(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t.slice(2);if(t.length===6)return t;throw Error(`Invalid hex: ${e}`)}(e),n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255;return(Math.max(n,r,i)+Math.min(n,r,i))/2*255}function ve(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t;if(t.length===6)return`FF`+t;throw Error(`Invalid hex: ${e}`)}function ye(e,t=!1){let n=e;return n.length===8&&(n=n.substring(2,8)),n.length===6&&(n=(t?`00`:`FF`)+n),n.toUpperCase()}function be(e){let t=`[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n ${e.getContent()}`,n=e.getReplies();for(let e=0;e<n.length;e++)t+=`\nReply:\n ${n[e].getContent()}`;return t}function xe(e,t,n){if(typeof t==`string`)return void we(e,t);let r=t.runs;for(let t=0;t<r.length;t++){let i=r[t];e.start(`r`),i.font&&Ce(e,i.font,n),we(e,i.text??``),e.end(`r`)}}var Se={serif:1,"sans-serif":2,monospace:3,cursive:4,fantasy:5};function Ce(e,n,r){e.start(`rPr`);let i=(t,n)=>{n!==void 0&&e.empty(t,n?void 0:{val:0})};if(i(`b`,n.weight===void 0?void 0:n.weight>=700),i(`i`,n.style===void 0?void 0:n.style!==t.IFont.Style.Normal),i(`strike`,n.strike),i(`extend`,n.extend),i(`outline`,n.outline),i(`shadow`,n.shadow),n.underline&&e.empty(`u`,n.underline===t.IFont.UnderlineStyle.Single?void 0:{val:n.underline}),n.verticalAlign){let r=n.verticalAlign===t.IFont.VerticalAlignment.Super?`superscript`:n.verticalAlign===t.IFont.VerticalAlignment.Sub?`subscript`:n.verticalAlign;e.empty(`vertAlign`,{val:r})}n.size!==void 0&&e.empty(`sz`,{val:n.size}),n.color&&function(e,t,n){let r=/^index(\d+)$/.exec(t);if(r)return void e.empty(`color`,{indexed:Number(r[1])});B(e,n,t,`color`)}(e,n.color,r),n.family&&e.empty(`rFont`,{val:n.family});let a=n.fallbacks;if(a)for(let t=0;t<a.length;t++){let n=Se[a[t]];if(n!==void 0){e.empty(`family`,{val:n});break}}n.charset!==void 0&&e.empty(`charset`,{val:n.charset}),n.scheme&&n.scheme!==t.IFont.Scheme.None&&e.empty(`scheme`,{val:n.scheme}),e.end(`rPr`)}function we(t,n){t.start(`t`,e.C.test(n)||/[\n\r]/.test(n)?e.S:void 0),t.text(n),t.end(`t`)}function Te(e){let n=e.getRanges();if(n.isInvalid())return null;let r=n.getCoords()[0];return r?{ref:t.AddressUtils.cellToString({rowIndex:r.rowStart,colIndex:r.colStart}),row:r.rowStart,col:r.colStart}:null}function H(e,n,r,i,a=!1,o=!1){let s=i.getTheme();if(a&&n.start(`fill`),typeof r==`string`&&(r={type:t.IFill.Type.Solid,color:r}),r.type===t.IFill.Type.None)a?n.empty(`patternFill`,{patternType:`none`}):n.empty(`noFill`);else if(r.type===t.IFill.Type.Solid){let e=r;a?n.start(`patternFill`,{patternType:`solid`}):n.start(`solidFill`),e.color&&(a?B(n,s,e.color,`fgColor`):R(n,s,e.color)),a?n.end(`patternFill`):n.end(`solidFill`)}else if(r.type===t.IFill.Type.Pattern){let e=r,t=e.patternType||`solid`;n.start(`patternFill`,{patternType:t}),e.foreground&&(a?B(n,s,o?e.background:e.foreground,`fgColor`):R(n,s,o?e.background:e.foreground)),e.background&&(a?B(n,s,o?e.foreground:e.background,`bgColor`):R(n,s,o?e.foreground:e.background)),n.end(`patternFill`)}else if(r.type===t.IFill.Type.Gradient&&a){let e=r,i={},a=e.gradientType;if(a!==t.IFill.GradientType.Path&&a!==t.IFill.GradientType.Linear||(i.type=a),e.angle!==void 0){let t=(e.angle-90)%360;t!==0&&(i.degree=String(t))}let o=e.focus;o&&(o.left&&(i.left=String(o.left)),o.right&&(i.right=String(o.right)),o.top&&(i.top=String(o.top)),o.bottom&&(i.bottom=String(o.bottom))),n.start(`gradientFill`,i);let c=e.stops;if(c&&c.length>0)for(let e of c){let t,r=0;if(typeof e==`string`||typeof e==`object`&&!(`offset`in e))t=e,r=0;else{let n=e;r=n.offset||0,t=n.color}n.start(`stop`,{position:String(r)}),t&&B(n,s,t,`color`),n.end(`stop`)}n.end(`gradientFill`)}else if(r.type===t.IFill.Type.Gradient){let e=r,i={};e.isRotatedWithShape!==void 0&&(i.rotWithShape=e.isRotatedWithShape?`1`:`0`),n.start(`gradFill`,i),n.start(`gsLst`);let a=e.stops;if(a&&a.length>0)for(let e of a){let r,i=0;if(typeof e==`string`||typeof e==`object`&&!(`offset`in e))r=e;else{let t=e;i=t.offset||0,r=t.color}n.start(`gs`,{pos:String(t.CommonUtils.roundAccurately(1e3*i,0))}),r&&R(n,s,r),n.end(`gs`)}n.end(`gsLst`);let o=e.gradientType;if(o&&o!==t.IFill.GradientType.Linear){let r=o===`radial`?`circle`:o;n.start(`path`,{path:r});let i=e.focus;if(i){let e={};i.t!==void 0&&(e.t=String(t.CommonUtils.roundAccurately(1e3*i.t,0))),i.l!==void 0&&(e.l=String(t.CommonUtils.roundAccurately(1e3*i.l,0))),i.b!==void 0&&(e.b=String(t.CommonUtils.roundAccurately(1e3*i.b,0))),i.r!==void 0&&(e.r=String(t.CommonUtils.roundAccurately(1e3*i.r,0))),n.empty(`fillToRect`,e)}n.end(`path`)}else{let r={};e.angle!==void 0&&(r.ang=String(t.CommonUtils.roundAccurately(6e4*e.angle,0)));let i=e.scaled;i!==void 0&&(r.scaled=i?`1`:`0`),n.empty(`lin`,r)}n.end(`gradFill`)}else a?n.empty(`patternFill`,{patternType:`none`}):n.empty(`noFill`);a&&n.end(`fill`)}var Ee=(e,n,r,i)=>{if(!r)return n.start(`ln`),n.empty(`noFill`),void n.end(`ln`);typeof r==`string`&&(r={fill:r});let a=r,o={};if(a.width!==void 0&&(o.w=String(G(a.width))),a.lineCap!==void 0&&(o.cap=De(a.lineCap)),a.compound!==void 0&&(o.cmpd=a.compound),a.align!==void 0&&(o.algn=a.align),n.start(`ln`,o),H(0,n,a.fill??je,i),Array.isArray(a.dash)){n.start(`custDash`);for(let e=0;e<a.dash.length;e+=2)n.empty(`ds`,{d:String(t.CommonUtils.roundAccurately(1e3*a.dash[e],0)),sp:String(t.CommonUtils.roundAccurately(1e3*(a.dash[e+1]??0),0))});n.end(`custDash`)}else typeof a.dash==`string`&&n.empty(`prstDash`,{val:a.dash});if(a.lineJoin===t.IStroke.LineJoin.Round)n.empty(`round`);else if(a.lineJoin===t.IStroke.LineJoin.Bevel)n.empty(`bevel`);else if(a.lineJoin===t.IStroke.LineJoin.Miter){let e={};a.miterLimit!==void 0&&(e.lim=String(t.CommonUtils.roundAccurately(1e5*a.miterLimit,0))),n.empty(`miter`,e)}n.end(`ln`)},De=e=>e===`round`?`rnd`:e===`butt`?`flat`:e===`square`?`sq`:e,Oe=(e,t,n,r=void 0,i=!1)=>{if(!n||!(n.fill||n.stroke||n.effects?.length||i))return;let a=e.getXMLWriter();r&&a.start(r),a.pushDefaultNamespace(`a`),n.fill&&H(0,a,n.fill,t),n.stroke&&Ee(0,a,n.stroke,t),n.effects?.length?ke(e,a,t.getTheme(),n.effects):i&&a.empty(`effectLst`),a.popDefaultNamespace(),r&&a.end(r)},ke=(e,t,n,r)=>{t.start(`effectLst`);for(let e of r)Ae(t,n,e);t.end(`effectLst`)},Ae=(e,n,r)=>{switch(r.type){case t.IEffect.Type.OuterShadow:{let i=r,a={};i.blur!==void 0&&(a.blurRad=String(G(i.blur))),i.distance!==void 0&&(a.dist=String(G(i.distance))),i.angle!==void 0&&(a.dir=String(q(i.angle))),i.alignment!==void 0&&(a.algn=i.alignment),i.isRotatedWithShape!==void 0&&(a.rotWithShape=i.isRotatedWithShape?`1`:`0`),i.scaleX!==void 0&&(a.sx=String(t.CommonUtils.roundAccurately(1e3*i.scaleX,0))),i.scaleY!==void 0&&(a.sy=String(t.CommonUtils.roundAccurately(1e3*i.scaleY,0))),i.skewX!==void 0&&(a.kx=String(q(i.skewX))),i.skewY!==void 0&&(a.ky=String(q(i.skewY))),e.start(`outerShdw`,a),R(e,n,i.color),e.end(`outerShdw`);break}case t.IEffect.Type.InnerShadow:{let t=r,i={};t.blur!==void 0&&(i.blurRad=String(G(t.blur))),t.distance!==void 0&&(i.dist=String(G(t.distance))),t.angle!==void 0&&(i.dir=String(q(t.angle))),e.start(`innerShdw`,i),R(e,n,t.color),e.end(`innerShdw`);break}case t.IEffect.Type.PresetShadow:{let t=r,i={prst:t.preset};t.distance!==void 0&&(i.dist=String(G(t.distance))),t.angle!==void 0&&(i.dir=String(q(t.angle))),e.start(`prstShdw`,i),R(e,n,t.color),e.end(`prstShdw`);break}case t.IEffect.Type.Glow:{let t=r,i={};t.radius!==void 0&&(i.rad=String(G(t.radius))),e.start(`glow`,i),R(e,n,t.color),e.end(`glow`);break}case t.IEffect.Type.SoftEdge:{let t=r,n={};t.radius!==void 0&&(n.rad=String(G(t.radius))),e.empty(`softEdge`,n);break}case t.IEffect.Type.Reflection:{let n=r,i={};n.blur!==void 0&&(i.blurRad=String(G(n.blur))),n.distance!==void 0&&(i.dist=String(G(n.distance))),n.angle!==void 0&&(i.dir=String(q(n.angle))),n.fadeAngle!==void 0&&(i.fadeDir=String(q(n.fadeAngle))),n.startAlpha!==void 0&&(i.stA=String(t.CommonUtils.roundAccurately(1e3*n.startAlpha,0))),n.startPosition!==void 0&&(i.stPos=String(t.CommonUtils.roundAccurately(1e3*n.startPosition,0))),n.endAlpha!==void 0&&(i.endA=String(t.CommonUtils.roundAccurately(1e3*n.endAlpha,0))),n.endPosition!==void 0&&(i.endPos=String(t.CommonUtils.roundAccurately(1e3*n.endPosition,0))),n.scaleX!==void 0&&(i.sx=String(t.CommonUtils.roundAccurately(1e3*n.scaleX,0))),n.scaleY!==void 0&&(i.sy=String(t.CommonUtils.roundAccurately(1e3*n.scaleY,0))),n.skewX!==void 0&&(i.kx=String(q(n.skewX))),n.skewY!==void 0&&(i.ky=String(q(n.skewY))),n.alignment!==void 0&&(i.algn=n.alignment),n.isRotatedWithShape!==void 0&&(i.rotWithShape=n.isRotatedWithShape?`1`:`0`),e.empty(`reflection`,i);break}}},je={type:`none`},U=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,W=`imagesWritten`,Me={mime:`image/png`,ext:`png`},G=(e=0)=>t.CommonUtils.roundAccurately(12700*e,0),K=(e=0)=>t.CommonUtils.roundAccurately(9525*e,0),q=e=>6e4*e,Ne=(e=0)=>t.CommonUtils.roundAccurately(100*e,2),Pe=class{constructor(){this._dxfs=[],this._byKey=new Map}add(e){let t=JSON.stringify(e),n=this._byKey.get(t);return n===void 0&&(n=this._dxfs.length,this._dxfs.push(e),this._byKey.set(t,n)),n}getDxfs(){return this._dxfs}getCount(){return this._dxfs.length}},Fe=`cfDxfs`,Ie=[`font`,`fill`,`borders`,`numberFormat`,`alignment`];function Le(e,n,r){if(n){if(n.named){let i=n.named,a=i.toLowerCase(),o=r.namedStyleMap;if(!o.has(a)){o.set(a,``+o.size);let n=e.getNamedStyles().getByName(i).toJSON();Le(e,n.style??t.CommonUtils.EmptyObject,r),r.namedStyles.push(n)}}n.font&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.fontMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.fonts.push(n)}}(0,n.font,r),n.fill&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.fillMap;if(!a.has(i)&&typeof n==`object`&&n.type){let e=a.size;a.set(i,``+e),r.fills.push(n)}}(0,n.fill,r),n.borders&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.borderMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.borders.push(n)}}(0,n.borders,r),n.numberFormat!==void 0&&function(e,n,r){if(!n)return;let i=t.NumberFormat.toBuiltInID(n),a=r.numFmtMap;if(!a.has(i)){let e=0;typeof i==`number`?e=i:(e=r.numFmtsCustom.length+We,r.numFmtsCustom.push(i)),a.set(n,``+e)}}(0,n.numberFormat,r)}}function Re(e,t,n){if(!t)return;let r=t.name.toLowerCase();n.namedStyleMap.has(r)||(n.namedStyleMap.set(r,``+n.namedStyleMap.size),n.namedStyles.push(t),Le(e,t.style,n))}function ze(e,t,n,r,i=!1){let a=r.getDefaultFontSize(),o=r.getTheme().getFontScheme().getMinorFont()??`Calibri`,s=r.getNormal().getFont().getColor();t.start(`font`),n.weight&&n.weight>=700&&t.empty(`b`),n.style&&n.style!==`normal`&&t.empty(`i`),n.strike&&t.empty(`strike`),n.underline&&t.empty(`u`,{val:n.underline}),n.outline&&t.empty(`outline`),n.shadow&&t.empty(`shadow`),n.extend&&t.empty(`extend`);let c=n.verticalAlign;c&&(c===`super`&&(c=`superscript`),c===`sub`&&(c=`subscript`),t.empty(`vertAlign`,{val:c})),i?n.size!==void 0&&t.empty(`sz`,{val:String(n.size)}):t.empty(`sz`,{val:String(n.size??a)}),B(t,r.getTheme(),n.color??s,`color`,!i);let l=!i||n.family&&n.family!==o;if(l&&(t.empty(`name`,{val:n.family??o}),n.fallbacks&&n.fallbacks.length>0)){let e=n.fallbacks;e.includes(`serif`)?t.empty(`family`,{val:1}):e.includes(`sans-serif`)?t.empty(`family`,{val:2}):e.includes(`monospace`)?t.empty(`family`,{val:3}):e.includes(`cursive`)?t.empty(`family`,{val:4}):e.includes(`fantasy`)&&t.empty(`family`,{val:5})}n.charset!==void 0&&n.charset!==null&&t.empty(`charset`,{val:String(n.charset)});let u=n.scheme??(n.family===void 0?`minor`:void 0);l&&u!==void 0&&u!==`none`&&t.empty(`scheme`,{val:u}),t.end(`font`)}function J(e,t,n,r,i,a=!1){if(!i||i.style===`none`||!i.style)return void(a&&!i||t.empty(r));t.start(r,{style:i.style});let o=i.color;o&&B(t,n,o,`color`,!a,a),t.end(r)}function Be(e,t,n,r,i=!1){let a={};i?(a.diagonalUp=`0`,a.diagonalDown=`0`):(n.diagonalUp&&(a.diagonalUp=`1`),n.diagonalDown&&(a.diagonalDown=`1`)),t.start(`border`,a),J(0,t,r,`left`,n.left,i),J(0,t,r,`right`,n.right,i),J(0,t,r,`top`,n.top,i),J(0,t,r,`bottom`,n.bottom,i),i?(J(0,t,r,`vertical`,n.vertical,i),J(0,t,r,`horizontal`,n.horizontal,i)):J(0,t,r,`diagonal`,n.diagonalUp??n.diagonalDown,i),t.end(`border`)}function Ve(e,n,r,i=!1){let a={};r.horizontal&&r.horizontal!==t.ITextFrame.HorizontalAlignment.General&&(a.horizontal=r.horizontal),r.vertical&&r.vertical!==t.ITextFrame.VerticalAlignment.Bottom&&(a.vertical=r.vertical);let o=r.rotation;r.stacked&&(a.textRotation=`255`,o=0),o&&(o>=270&&o<360?o=360-o:o>0&&o<=90&&(o+=90),a.textRotation=String(o));let s=r.overflow;switch(s===t.ITextFrame.Overflow.Wrap&&(a.wrapText=`1`),r.indent&&(a.indent=``+r.indent),r.relativeIndent&&(a.relativeIndent=``+r.relativeIndent),r.justifyLastLine&&(a.justifyLastLine=`1`),s===t.ITextFrame.Overflow.Shrink&&(a.shrinkToFit=`1`),r.readingDirection){case t.ITextFrame.ReadingDirection.Auto:break;case t.ITextFrame.ReadingDirection.LeftToRight:a.readingOrder=`1`;break;case t.ITextFrame.ReadingDirection.RightToLeft:a.readingOrder=`2`}return Object.keys(a).length>0?a:null}function He(e,n,r,i,a,o,s=!1){let c={},l=null,u=i.named;u&&(l=r.getNamedStyles().getByName(u).toJSON().style);let d=i.font??l?.font,f=d?a.fontMap.get(t.BufferUtils.JSONStableStringify(d))??0:0,p=i.fill??l?.fill,m=p?a.fillMap.get(t.BufferUtils.JSONStableStringify(p))??0:0,h=i.borders??l?.borders,g=h?a.borderMap.get(t.BufferUtils.JSONStableStringify(h))??0:0,_=i.numberFormat??l?.numberFormat;if(c.numFmtId=(_===void 0?void 0:a.numFmtMap.get(_))??`0`,c.fontId=String(f),c.fillId=String(m),c.borderId=String(g),o){let e=i.named??t.IStyle.BuiltInName.Normal;c.xfId=a.namedStyleMap.get(e.toLowerCase())}let v=null,y=i.alignment??l?.alignment;y&&(v=Ve(0,0,y)),i.font&&(c.applyFont=`1`),i.fill&&(c.applyFill=`1`),i.numberFormat&&(c.applyNumberFormat=`1`),i.borders&&(c.applyBorder=`1`),v&&(c.applyAlignment=`1`);let b=null,x=i.protection?.alwaysUnlocked??l?.protection?.alwaysUnlocked??!1;(x||s)&&(b={},x&&(b.locked=`0`),s&&(b.hidden=`1`),c.applyProtection=`1`),i.quotePrefix&&(c.quotePrefix=`1`),v||b?(n.start(`xf`,c),v&&n.empty(`alignment`,v),b&&n.empty(`protection`,b),n.end(`xf`)):n.empty(`xf`,c)}function Ue(e,n,r,i,a,o=`dxf`,s=We){if(n.start(o),r.font&&ze(0,n,r.font,i,!0),r.numberFormat!==void 0&&r.numberFormat!==null){let e=t.NumberFormat.toBuiltInID(r.numberFormat),i=typeof e==`number`,a=i?t.NumberFormat.builtInFormat(e):String(e);a&&n.empty(`numFmt`,{numFmtId:String(i?e:s++),formatCode:a})}if(r.fill&&H(0,n,r.fill,i,!0,!0),r.alignment){let e=Ve(0,0,r.alignment,!0);e&&n.empty(`alignment`,e)}return r.borders&&Be(0,n,r.borders,a,!0),n.end(o),s}var We=164,Ge=Object.freeze([`wholeTable`,`headerRow`,`totalRow`,`firstColumn`,`lastColumn`,`firstRowStripe`,`secondRowStripe`,`firstColumnStripe`,`secondColumnStripe`,`firstHeaderCell`,`lastHeaderCell`,`firstTotalCell`,`lastTotalCell`]),Ke=t.ICondition.BuiltInOperatorNames,qe=(e,t,n,r,i,a)=>{let o=r.sorts,s=o?o.length:0;if(s===0)return;let c={};if(s>0){let e=o[0].criteria?.collatorOptions;e&&(c.caseSensitive=typeof e!=`object`||Array.isArray(e)||e.sensitivity!==`case`&&e.sensitivity!==`variant`?`0`:`1`)}c.ref=n.getRange().toString(),c[`xmlns:xlrd2`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,t.start(`sortState`,c);for(let e=0;e<s;e++){let n=o[e],r=n.criteria??{},s=n.index+a.colStart,c={};r.reverse&&(c.descending=`1`),c.ref=i.getIntersect({colStart:s,rowStart:a.rowStart,colEnd:s,rowEnd:a.rowEnd}).toString(),r.sortOn&&(c.sortBy=r.sortOn),r.dxfId!==void 0&&(c.dxfId=r.dxfId),r.iconSet!==void 0&&(c.iconSet=r.iconSet),r.customList!==void 0&&(c.customList=r.customList),t.empty(`sortCondition`,c)}t.end(`sortState`)},Je=(e,t,n,r,i=!1)=>{let a=n.getRange();n.isShowTotals()&&(a=a.getResizeBy(-1,0));let o=a.getCoords(),s=r.sort,c=r.filter,l=c?c.conditions:void 0,u=l?l.length:0,d=r.hiddenButtons,f={};f.ref=a.toString();let p,m=[];for(let e=0;e<u;e++){let t=l[e];m[t.index]={...t}}if(Array.isArray(d)&&d.length>0){let e=d.length;p=Array(d[e-1]);for(let t=0;t<e;t++)p[d[t]]=!0}if(m||d||p||i){let c=0;r.columns?c=r.columns.length:i&&(c=a.getColumnCount()),t.start(`autoFilter`,f);for(let n=0;n<c;n++){let r=!0===d||!0===p?.[n],i=m[n];(i||r)&&Ye(e,t,n,i,r)}s&&i&&qe(0,t,n,s,a,o),t.end(`autoFilter`)}else t.empty(`autoFilter`,f);s&&!i&&qe(0,t,n,s,a,o)},Y=(t,n,r)=>{let i=e.p(r,e=>t.warn(e,r));if(!i)return;let a={operator:i.operator};i.val!==void 0&&(a.val=i.val),n.empty(`customFilter`,a)},Ye=(n,r,i,a,o)=>{let s={};s.colId=``+i,o&&(s.hiddenButton=`1`),a?(r.start(`filterColumn`,s),((n,r,i)=>{let a=i.operator;if(a!==t.ICondition.BuiltInOperatorNames.Expression)if(a!==t.ICondition.BuiltInOperatorNames.Unique){if(a===t.ICondition.BuiltInOperatorNames.Color){let e=i.param,t={};e.cellColor!==void 0&&(t.cellColor=e.cellColor?`1`:`0`),e.styleId!==void 0&&(t.dxfId=e.styleId),r.empty(`colorFilter`,t)}if(Xe(a))if(a===`between`){let e=i.param;r.start(`customFilters`,{and:`1`}),Y(n,r,{operator:Ke.GreaterThanEqualTo,param:e.from}),Y(n,r,{operator:Ke.LessThanEqualTo,param:e.to}),r.end(`customFilters`)}else if(a===t.ICondition.BuiltInOperatorNames.Not){let t=i.param;e.m(t?.operator)?(r.start(`customFilters`),Y(n,r,i),r.end(`customFilters`)):n.warn(`Not rule with non-comparison criteria not supported in OOXML`,t)}else if(a===t.ICondition.BuiltInOperatorNames.And||a===t.ICondition.BuiltInOperatorNames.Or){let o=i.param,s=o.length;if(s>0){let i={};a===t.ICondition.BuiltInOperatorNames.And&&s>1&&(i.and=`1`),r.start(`customFilters`,i);for(let t=0;t<s;t++){let i=o[t],a=i.operator===Ke.Not&&e.m(i.param?.operator);e.m(i.operator)||a?Y(n,r,i):n.warn(`Only Comparison criteria supported in Union conditions for Table AutoFilters`,i)}r.end(`customFilters`)}}else e.m(a)&&(r.start(`customFilters`),Y(n,r,i),r.end(`customFilters`));if(a===t.ICondition.BuiltInOperatorNames.TimePeriod){let e=i.param,t={};e.type&&(t.type=e.type),e.anchorDate!==void 0&&(t.val=``+e.anchorDate),e.maxVal!==void 0&&(t.maxVal=``+e.maxVal),r.empty(`dynamicFilter`,t)}if(a===t.ICondition.BuiltInOperatorNames.Average){let e=i.param,n={},a=e.type;a&&(a===t.ICondition.AverageType.Above?n.type=`aboveAverage`:a===t.ICondition.AverageType.Below&&(n.type=`belowAverage`)),e.stdDevs!==void 0&&(n.val=``+e.stdDevs),r.empty(`dynamicFilter`,n)}if(a===t.ICondition.BuiltInOperatorNames.InSet){let e=i.param;if(e.dateGroups){let t=e.dateGroups,n=t.length;r.start(`dateGroupItem`);for(let e=0;e<n;e++){let n=t[e],i={};n.day!==void 0&&(i.day=``+n.day),n.hour!==void 0&&(i.hour=``+n.hour),n.minute!==void 0&&(i.minute=``+n.minute),n.second!==void 0&&(i.second=``+n.second),n.year!==void 0&&(i.year=``+n.year),n.month!==void 0&&(i.month=``+n.month),i.dateTimeGrouping=n.group,r.empty(`dateGroupItem`,i)}r.end(`dateGroupItem`)}if(e.items){let t=e.items,n=t.length;r.start(`filters`);for(let e=0;e<n;e++){let n=t[e];r.empty(`filter`,{val:``+n})}r.end(`filters`)}}if(a===t.ICondition.BuiltInOperatorNames.Icon){let e=i.param,t={};e.iconSet!==void 0&&(t.iconSet=e.iconSet),e.iconId!==void 0&&(t.iconId=``+e.iconId),r.empty(`iconFilter`,t)}if(a===t.ICondition.BuiltInOperatorNames.TopN){let e=i.param,t={};e.percent&&(t.percent=`1`),e.top!==void 0&&(t.top=e.top?`1`:`0`),e.limit!==void 0&&(t.val=``+e.limit),e.filterVal!==void 0&&(t.filterVal=``+e.filterVal),r.empty(`top10`,t)}}else n.warn(`Unique conditions not supported in Table AutoFilters`,i);else n.warn(`Expression conditions not supported in Table AutoFilters`,i)})(n,r,a),r.end(`filterColumn`)):r.empty(`filterColumn`,s)},Xe=e=>e===t.ICondition.BuiltInOperatorNames.GreaterThan||e===t.ICondition.BuiltInOperatorNames.GreaterThanEqualTo||e===t.ICondition.BuiltInOperatorNames.LessThan||e===t.ICondition.BuiltInOperatorNames.LessThanEqualTo||e===t.ICondition.BuiltInOperatorNames.EqualTo||e===t.ICondition.BuiltInOperatorNames.And||e===t.ICondition.BuiltInOperatorNames.Or||e===t.ICondition.BuiltInOperatorNames.Not||e===`between`,Ze={names:new Set,perFormula:[],affects:()=>!1},Qe=1048576,$e=(e,t,n)=>{if(!n)return[];let r=0;for(let i=0;i<n.length;i++){let a=n[i][0],o=t.getRange(a).getCoords();if(r+=(o.rowEnd-o.rowStart+1)*(o.colEnd-o.colStart+1),r>Qe)return e.warn(`Direct styles cover more than ${Qe} cells; not writing the styles from '${a}' on. A range that size belongs in a column or row style.`),n.slice(0,i)}return n};function et(e,n){let r=n.type;r===t.IConditionalFormat.ColorStopType.AutoMin?r=t.IConditionalFormat.ColorStopType.Min:r===t.IConditionalFormat.ColorStopType.AutoMax&&(r=t.IConditionalFormat.ColorStopType.Max),e.empty(`cfvo`,{type:r,val:n.value,gte:n.exclusive?`0`:void 0})}function tt(e,t){let n={type:t.type,gte:t.exclusive?`0`:void 0};t.value===void 0?e.empty(`x14:cfvo`,n):(e.start(`x14:cfvo`,n),e.start(`xm:f`),e.text(t.value),e.end(`xm:f`),e.end(`x14:cfvo`))}var nt=new Set([t.IStyle.IconSet.Arrows3,t.IStyle.IconSet.ArrowsGray3,t.IStyle.IconSet.Flags3,t.IStyle.IconSet.Signs3,t.IStyle.IconSet.Symbols3,t.IStyle.IconSet.Symbols3_2,t.IStyle.IconSet.TrafficLights3,t.IStyle.IconSet.TrafficLights3_2,t.IStyle.IconSet.Arrows4,t.IStyle.IconSet.ArrowsGray4,t.IStyle.IconSet.Rating4,t.IStyle.IconSet.RedToBlack4,t.IStyle.IconSet.TrafficLights4,t.IStyle.IconSet.Arrows5,t.IStyle.IconSet.ArrowsGray5,t.IStyle.IconSet.Quarters5,t.IStyle.IconSet.Rating5]);function rt(e){return(e.icon?.length??0)>0||e.iconSet!==void 0&&!nt.has(e.iconSet)}function it(n,r,i,a,o,s,c,l,u){let d=a.scale;a.ext&&n.warn(`Conditional format extension payload is not written to xlsx; it will be lost.`);let f={type:o.type,dxfId:a.style&&Object.keys(a.style).length>0?l.add(a.style):void 0,priority:c,stopIfTrue:X(a.stopIfTrue),aboveAverage:X(o.aboveAverage),equalAverage:X(o.equalAverage),stdDev:o.stdDev,bottom:X(o.bottom),percent:X(o.percent),rank:o.rank,operator:o.operator,text:o.text,timePeriod:o.timePeriod},p;d?.type===t.IConditionalFormat.ScaleType.DataBar&&function(e){if(e.gradient||e.borderColor||e.negativeFillColor||e.negativeBorderColor||e.axisColor||e.axisPosition||e.direction)return!0;let n=e.stops,r=n?n.length:0;for(let e=0;e<r;e++){let r=n[e].type;if(r===t.IConditionalFormat.ColorStopType.AutoMin||r===t.IConditionalFormat.ColorStopType.AutoMax)return!0}return!1}(d)&&(p=e.st(t.CommonUtils.uuidV4),u.push({guid:p,sqref:s,priority:c,scale:d}));let m=o.formulas,h=m?m.length:0;if(h!==0||d){r.start(`cfRule`,f);for(let e=0;e<h;e++)r.start(`formula`),r.text(m[e]),r.end(`formula`);if(d?.type===t.IConditionalFormat.ScaleType.ColorScale){let e=d.stops??[];r.start(`colorScale`);for(let t=0;t<e.length;t++)et(r,e[t]);for(let t=0;t<e.length;t++)B(r,i,e[t].color,`color`);r.end(`colorScale`)}else if(d?.type===t.IConditionalFormat.ScaleType.DataBar){let e=d.stops??[];r.start(`dataBar`,{minLength:d.minLength,maxLength:d.maxLength,showValue:X(d.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);d.color&&B(r,i,d.color,`color`),r.end(`dataBar`)}else if(d?.type===t.IConditionalFormat.ScaleType.IconSet){let e=d.stops??[];r.start(`iconSet`,{iconSet:d.iconSet,reverse:X(d.reverse),showValue:X(d.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);r.end(`iconSet`)}p&&(r.start(`extLst`),r.start(`ext`,{uri:e.Z,"xmlns:x14":e.rt}),r.start(`x14:id`),r.text(p),r.end(`x14:id`),r.end(`ext`),r.end(`extLst`)),r.end(`cfRule`)}else r.empty(`cfRule`,f)}function at(e){let n=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=t.AddressUtils.fastStringToRange(i[e]);a.rowStart<n&&(n=a.rowStart),a.colStart<r&&(r=a.colStart)}return t.AddressUtils.cellToString({rowIndex:n,colIndex:r})}function ot(e){if(typeof e==`string`)return e.split(`,`).join(` `);if(Array.isArray(e)){let n=[];for(let r=0;r<e.length;r++){let i=t.AddressUtils.rangeToString(e[r]);i&&n.push(i)}return n.length>0?n.join(` `):null}return t.AddressUtils.rangeToString(e)}function X(e){if(e!==void 0)return e?`1`:`0`}function st(e){if(typeof e!=`string`)return!1;let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`"`)t=!t;else if(r===`!`&&!t)return!0}return!1}function ct(e){let t=e.formulas,n=t?t.length:0;for(let e=0;e<n;e++)if(st(t[e]))return!0;return!1}function lt(e){let n=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=t.AddressUtils.fastStringToRange(i[e]);a.rowStart<n&&(n=a.rowStart),a.colStart<r&&(r=a.colStart)}return n===2**53-1?null:{rowIndex:n,colIndex:r}}function ut(e,n,r){if(typeof e!=`string`||!e||!n||!r)return e;try{let i=r.parse(e,n);return i&&t.FormulaText.image(r.spell(i,!0),{at:n})||e}catch{return e}}function dt(e,t,n){let r=e?.stops;if(!r||!n)return e;let i;for(let e=0;e<r.length;e++){let a=r[e]?.value;if(typeof a!=`string`)continue;let o=ut(a,t,n);o!==a&&(i||=[...r],i[e]={...r[e],value:o})}return i?{...e,stops:i}:e}function ft(e,t,n,r){if(!r?.xml)return;let i=e.addPart(`legacyDrawing`,r);t.empty(n,{"r:id":i.relId})}var pt=(e,t,n,r)=>{let i=(t,n)=>{let r=e.getRangeAtBounds({x:t,y:n,width:0,height:0}),i=r.getCoords(),a=r.getBounds();return[i.colStart,t-a.x,i.rowStart,n-a.y]},a=t.getMovable()?.getBounds()??null,o=a?t.toJSON()?.box?.anchor:void 0;if(a&&o?.tl&&o.br){let t=e.getEntireRange().getCoords(),i=e=>[Math.min(t.colEnd,Math.max(0,r+(e.c??0))),e.x??0,Math.min(t.rowEnd,Math.max(0,n+(e.r??0))),e.y??0];return{bounds:a,anchor:[...i(o.tl),...i(o.br)]}}if(!a){let t=e.getRange({rowStart:n,colStart:r,rowEnd:n,colEnd:r}).getBounds();a={x:t.x+t.width+15,y:Math.max(2,t.y-10),width:144,height:79}}return{bounds:a,anchor:[...i(a.x,a.y),...i(a.x+a.width,a.y+a.height)]}},mt=(t,n)=>{if(!n)return t;let r=t?.xml??null,i=e.a(r??``),a=[],o=n.comments;for(let t=0;t<o.length;t++){let{comment:r,row:s,col:c}=o[t],l=r.isNote()?r.toJSON():null,{bounds:u,anchor:d}=pt(n.sheet,r,s,c);a.push(e.c(l?.box?.xml,{shapeId:++i,zIndex:t+1,row:s,col:c,anchor:d,bounds:u,visible:!!l?.shown,alt:l?.description}))}let s=e.i(r,a,i);return s?s===r?t:t?{...t,xml:s}:{xml:s}:t},ht=e=>e.content?.type!==`control`,gt=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp`,_t=(e,t)=>{if(!e?.xml)return e;let n=t.movables;if(!n)return e;let r=new Map,i=n.length;for(let e=0;e<i;e++){let t=n[e];if(ht(t))continue;let i=t.content?.json?.shapeId;typeof i==`number`&&r.set(i,t)}if(r.size===0)return e;let a=e.xml.replace(/<v:shape\b[\s\S]*?<\/v:shape>/g,e=>{let t=/\bo:spid="_x0000_s(\d+)"/.exec(e)??/\bid="_x0000_s(\d+)"/.exec(e),n=t?r.get(parseInt(t[1],10)):void 0;if(!n)return e;let i=n.anchor,a=[i.tl.c,i.tl.r,i.br.c,i.br.r];return e.replace(/(<x:Anchor>)([\s\d,-]*)(<\/x:Anchor>)/,(e,t,n,r)=>{let i=n.split(`,`).map(e=>e.trim());if(i.length!==8)return e;let o=i.slice();for(let e=0;e<4;e++)o[2*e]=String(a[e]??0);return o.join(`,`)===i.join(`,`)?e:`${t}${o.join(`, `)}${r}`})});return a===e.xml?e:{...e,xml:a}},vt=(e,t,n)=>{e.start(t),e.start(`xdr:col`),e.text(n.c??0),e.end(`xdr:col`),e.start(`xdr:colOff`),e.text(K(n.x)),e.end(`xdr:colOff`),e.start(`xdr:row`),e.text(n.r??0),e.end(`xdr:row`),e.start(`xdr:rowOff`),e.text(K(n.y)),e.end(`xdr:rowOff`),e.end(t)},yt={r:void 0,s:void 0,t:void 0,cm:void 0,vm:void 0},bt={r:void 0,s:void 0,customFormat:void 0,hidden:void 0,ht:void 0,customHeight:void 0,"x14ac:dyDescent":`0.25`,outlineLevel:void 0,collapsed:void 0},xt={t:void 0,aca:void 0,ref:void 0,ca:void 0,si:void 0},St={t:`shared`,aca:void 0,ref:void 0,ca:void 0,si:void 0},Ct={t:`array`,aca:void 0,ref:void 0,ca:void 0,si:void 0};function wt(e,t,n,r){n&&(t.start(r),t.empty(`latin`,{typeface:n}),t.empty(`ea`,{typeface:``}),t.empty(`cs`,{typeface:``}),t.end(r))}var Tt=e=>e.toISOString().split(`.`)[0]+`Z`,Et=(e,t,n)=>{switch(t){case`creator`:e.start(`dc:creator`),e.text(n),e.end(`dc:creator`);break;case`lastModifiedBy`:e.start(`cp:lastModifiedBy`),e.text(n),e.end(`cp:lastModifiedBy`);break;case`created`:e.start(`dcterms:created`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:created`);break;case`modified`:e.start(`dcterms:modified`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:modified`)}},Z=(e,t,n,r)=>{t.start(n),t.text(r),t.end(n)},Dt=(e,n,r)=>{let i=r.getSheets().getItems({visibility:t.ISheet.Visibility.Hidden}).map(e=>e.getName()),a=r.getNames().getItems({type:`formula`}).filter(e=>!!e.getRanges?.()).map(e=>e.getName());n.start(`HeadingPairs`),n.start(`vt:vector`,{size:a.length>0?`4`:`2`,baseType:`variant`}),n.start(`vt:variant`),n.start(`vt:lpstr`),n.text(`Worksheets`),n.end(`vt:lpstr`),n.end(`vt:variant`),n.start(`vt:variant`),n.start(`vt:i4`),n.text(``+i.length),n.end(`vt:i4`),n.end(`vt:variant`),a.length>0&&(n.start(`vt:variant`),n.start(`vt:lpstr`),n.text(`Named Ranges`),n.end(`vt:lpstr`),n.end(`vt:variant`),n.start(`vt:variant`),n.start(`vt:i4`),n.text(``+a.length),n.end(`vt:i4`),n.end(`vt:variant`)),n.end(`vt:vector`),n.end(`HeadingPairs`),n.start(`TitlesOfParts`),n.start(`vt:vector`,{size:``+(i.length+a.length),baseType:`lpstr`});for(let e of i)n.start(`vt:lpstr`),n.text(e),n.end(`vt:lpstr`);for(let e of a)n.start(`vt:lpstr`),n.text(e),n.end(`vt:lpstr`);n.end(`vt:vector`),n.end(`TitlesOfParts`)},Ot={minSupportedVersion:`120000`,copy:`1`,pasteAll:`1`,pasteValues:`1`,merge:`1`,splitFirst:`1`,rowColShift:`1`,clearFormats:`1`,clearComments:`1`,assign:`1`,coerce:`1`},kt=(e,n,r=t.CommonUtils.EmptyArray)=>{if(!n)return{...r};let{text:i,runs:a,color:o,size:s,kern:c,weight:l,style:u,b:d,i:f,spc:p,baseline:m,...h}=n,g={...r,...h};return s!==void 0&&(g.sz=``+Ne(s)),d!==void 0&&(g.b=d?`1`:`0`),l!==void 0&&(g.b=l>500?`1`:`0`),f!==void 0&&(g.i=f?`1`:`0`),u!==void 0&&(g.i=u===`italic`?`1`:`0`),c!==void 0&&(g.kern=``+Ne(c)),p!==void 0&&(g.spc=``+Ne(p)),m!==void 0&&(g.baseline=``+Ne(m)),g},At=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.start(`txBody`),r.pushDefaultNamespace(`a`),Mt(e,t,{vertOverflow:`clip`,horzOverflow:`clip`,rtlCol:`0`,anchor:`ctr`}),r.empty(`lstStyle`),((e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.pushDefaultNamespace(`a`),typeof n==`string`&&(n={runs:[{text:n}]}),r.start(`p`),r.empty(`pPr`,{algn:`ctr`});let i=kt(0,n,{...Nt,size:t.getDefaultFontSize()}),a=n?.runs,o=a?a.length:0;if(o>0)for(let e=0;e<o;e++){let n=a[e];r.start(`r`,{});let i=kt(0,n,Nt),o=n.color;o?(r.start(`rPr`,i),H(0,r,o,t),r.end(`rPr`)):r.empty(`rPr`,i),r.start(`t`),r.text(n?.text??``),r.end(`t`),r.end(`r`)}else r.empty(`endParaRPr`,i);r.end(`p`),r.popDefaultNamespace()})(e,t,n),r.popDefaultNamespace(),r.end(`txBody`)},jt=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),i=kt(0,n);r.empty(`defRPr`,i)},Mt=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),{spAutoFit:i,...a}=n;i?(r.start(`bodyPr`,a),r.empty(`spAutoFit`),r.end(`bodyPr`)):r.empty(`bodyPr`,a)},Nt=Object.freeze({lang:`en-US`}),Pt=(e,t)=>{if(t.length!==0){e.start(`a:extLst`);for(let n of t){let t={},r=n[0];r&&(t.uri=r),e.start(`a:ext`,t),e.empty(n[1],n[2]),e.end(`a:ext`)}e.end(`a:extLst`)}},Ft=async(e,t,n,r,i)=>{let a=e.getSharedStates(),o=r.getContent().getResource(),s=await o.getExternalURI(),c;if(s)c=e.addExternal(U,s);else if(c=n.get(o),!c){let t=a.get(W);t||(t=new Map,a.set(W,t));let r=t.get(o);if(!r){let e=await o.toBuffer();r={bytes:new Uint8Array(e),type:await o.getType()??Me,index:t.size+1},t.set(o,r)}c=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0),n.set(o,c)}let l={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};s?l[`r:link`]=c.relId:l[`r:embed`]=c.relId;let u=[];s||u.push([`{28A0092B-C50C-407E-A947-70E740481C1C}`,`a14:useLocalDpi`,{"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`,val:`0`}]);let d=e.getXMLWriter();d.start(`pic`),d.start(`nvPicPr`),Ut(e,d,r,i,t),Gt(e,d,r,i),d.end(`nvPicPr`),d.start(`blipFill`),d.start(`a:blip`,l),Pt(d,u),d.end(`a:blip`),d.start(`a:stretch`),d.empty(`a:fillRect`),d.end(`a:stretch`),d.end(`blipFill`),Vt(e,t,n,r,i),d.end(`pic`)},It=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml,c=o?.part;if(!s||!c)return Q(e,t,n,r,i);let l=await L(c,e,`../charts/chart{n}.xml`);if(!l?.relId)return Q(e,t,n,r,i);let u=l.relId===c.id?s:s.replace(`r:id="${c.id}"`,`r:id="${l.relId}"`);a!==void 0&&typeof i.content?.json?.sourceId==`number`&&(u=u.replace(`cNvPr id="${i.content.json.sourceId}"`,`cNvPr id="${a}"`)),e.getXMLWriter().raw(u)},Lt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Rt=async(e,t,n,r,i)=>Q(e,t,n,r,i),zt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Bt=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml;if(!s)return Q(e,t,n,r,i);let c=a!==void 0&&typeof o?.sourceId==`number`?s.replace(`cNvPr id="${o.sourceId}"`,`cNvPr id="${a}"`):s;e.getXMLWriter().raw(c)},Q=async(e,t,n,r,i)=>{(async(e,t,n,r,i)=>{let a=e.getXMLWriter(),o={},s=i.content?.json,c=s?.type??`sp`,l=t.getStyles();c===`cxnSp`?(o.macro=``,a.start(`cxnSp`,o),a.start(`nvCxnSpPr`),Ut(e,a,r,i,t),Wt(e,a,r,i,t),a.start(`cNvCxnSpPr`),a.empty(`a:stCnx`,{id:`0`,idx:`0`}),a.end(`cNvCxnSpPr`),a.end(`nvCxnSpPr`),Vt(e,t,n,r,i),Ht(e,t,n,r,i),At(e,l,s?.text),a.end(`cxnSp`)):c===`grpSp`||(o.macro=``,o.textlink=``,a.start(`sp`,o),a.start(`nvSpPr`),Ut(e,a,r,i,t),Wt(e,a,r,i,t),a.end(`nvSpPr`),Vt(e,t,n,r,i),Ht(e,t,n,r,i),At(e,l,s?.text),a.end(`sp`))})(e,t,n,r,{...i,content:{type:`shape`,name:i.content?.name,description:i.content?.description,json:{fill:`bg1`,stroke:{width:2,fill:`red`},text:{runs:[{text:`Unsupported Type: `+(i.content?.type??`unknown`),color:`tx1`}]}}}})},Vt=(e,t,n,r,i)=>{let a=e.getXMLWriter(),o=i.content?.json,s=o?.geometry??`rect`,c=t.getStyles();a.start(`spPr`),a.pushDefaultNamespace(`a`),Kt(a,r,i),a.start(`prstGeom`,{prst:s}),a.empty(`avLst`),a.end(`prstGeom`),Oe(e,c,o),a.popDefaultNamespace(),a.end(`spPr`)},Ht=(e,t,n,r,i)=>{let a=e.getXMLWriter();a.start(`style`),a.pushDefaultNamespace(`a`),a.start(`lnRef`,{idx:`1`}),a.start(`schemeClr`,{val:`accent1`}),a.empty(`shade`,{val:`15000`}),a.end(`schemeClr`),a.end(`lnRef`),a.start(`fillRef`,{idx:`1`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`fillRef`),a.start(`effectRef`,{idx:`0`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`effectRef`),a.start(`fontRef`,{idx:`minor`}),a.empty(`schemeClr`,{val:`lt1`}),a.end(`fontRef`),a.popDefaultNamespace(),a.end(`style`)},Ut=(e,n,r,i,a)=>{let o=e.getSharedStates(),s=o.get(`uniqueIdCounter`);s||(s=new Map,o.set(`uniqueIdCounter`,s));let c=s.get(a)??1;c++,s.set(a,c);let l={id:``+c,name:i.content?.name};i.content?.description&&(l.descr=i.content.description),i.hidden&&(l.hidden=`1`);let u=[];u.push([`{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}`,`a16:creationId`,{"xmlns:a16":`http://schemas.microsoft.com/office/drawing/2014/main`,id:`{${t.CommonUtils.uuidV4().toUpperCase()}}`}]),n.start(`cNvPr`,l),Pt(n,u),n.end(`cNvPr`)},Wt=(e,t,n,r,i)=>{t.empty(`cNvSpPr`)},Gt=(e,t,n,r)=>{let i={};if(r.lockAspect&&(i.noChangeAspect=`1`),r.locks)for(let e of Object.keys(r.locks))!0===r.locks[e]&&(i[e]=`1`);t.start(`cNvPicPr`,{}),t.empty(`a:picLocks`,i),t.end(`cNvPicPr`)},Kt=(e,t,n)=>{let r=t.getBounds(),i={},a=n.rotation;a!==void 0&&a!==0&&(i.rot=``+q(a)),e.start(`xfrm`,i),e.start(`off`,{x:K(r.x),y:K(r.y)}),e.end(`off`),e.start(`ext`,{cx:K(r.width),cy:K(r.height)}),e.end(`ext`),e.end(`xfrm`)},qt=(e,t,n)=>{e.start(t),e.start(`col`),e.text(n.c??0),e.end(`col`),e.start(`colOff`),e.text(K(n.x)),e.end(`colOff`),e.start(`row`),e.text(n.r??0),e.end(`row`),e.start(`rowOff`),e.text(K(n.y)),e.end(`rowOff`),e.end(t)},Jt=async(e,t,n)=>{let r=await n.getExternalURI();if(r)return void e.addExternal(U,r);let i=e.getSharedStates(),a=i.get(W);a||(a=new Map,i.set(W,a));let o=a.get(n);if(!o){let e=await n.toBuffer();o={bytes:new Uint8Array(e),type:await n.getType()??Me,index:a.size+1},a.set(n,o)}let s=e.addBinary(o.bytes,o.type.mime,U,`../media/image${o.index}.${o.type.ext}`,!0,t);s.relId!==t&&e.log(`Legacy drawing image '${t}' was written as '${s.relId}'; the markup will not find it.`)};function Yt(e){return e.toISOString().substring(0,22)}function Xt(t,n,r,i,a,o,s,c,l){let u={ref:n,dT:Yt(a??new Date),personId:i?$(i):void 0,id:$(r),parentId:s?$(s):void 0,done:c?`1`:void 0};if(t.start(`threadedComment`,u),t.start(`text`,e.C.test(o)||/[\n\r]/.test(o)?e.S:void 0),t.text(o),t.end(`text`),l&&l.length>0){t.start(`mentions`);for(let e=0;e<l.length;e++){let n=l[e];t.empty(`mention`,{mentionpersonId:$(n.personId),mentionId:$(n.id),startIndex:n.startIndex??0,length:n.length??0})}t.end(`mentions`)}t.end(`threadedComment`)}function $(e){return`{${e.replace(/^\{|\}$/g,``).toUpperCase()}}`}var Zt=0,Qt=(e,t,n,r)=>{let i=r.columns,a=i?i.length:0;if(a!==0){t.start(`tableColumns`,{count:a});for(let o=0;o<a;o++){let a=i[o];typeof a==`string`&&(a={name:a});let s={};s.id=o+1,s.name=a.name??`Column${o+1}`;let c=null,l=a.totalsRowFormula;if(typeof l==`number`){let e=tn.get(l);e?s.totalsRowFunction=e:c=`SUBTOTAL(${l},${r.name?.trim()}[${s.name}])`}else l&&(c=$t(e,n,o,l.startsWith(`=`)?l.substring(1):l));c&&(s.totalsRowFunction=`custom`),a.totalsRowLabel&&(s.totalsRowLabel=a.totalsRowLabel);let u=a.calculatedColumnFormula?$t(e,n,o,a.calculatedColumnFormula):null;(c||u)&&(t.start(`tableColumn`,s),u&&(t.start(`calculatedColumnFormula`),t.text(u),t.end(`calculatedColumnFormula`))),c&&(t.start(`totalsRowFormula`),t.text(c),t.end(`totalsRowFormula`)),c||u?t.end(`tableColumn`):t.empty(`tableColumn`,s)}t.end(`tableColumns`)}},$t=(n,r,i,a)=>{let o=n.getSharedStates().get(e.I);if(!o)return a;try{let e=r.getDataRange().getCoords(),n={rowIndex:e.rowStart,colIndex:e.colStart+i},s=o.parse(a,n);return s&&t.FormulaText.image(o.spell(s,!1,r.getName()),{at:n})||a}catch{return a}},en=(e,t,n,r)=>{let i={name:n.getStyle().getName(),showFirstColumn:n.isShowHighlightFirstColumn()?`1`:`0`,showLastColumn:n.isShowHighlightLastColumn()?`1`:`0`,showRowStripes:n.isShowBandedRows()?`1`:`0`,showColumnStripes:n.isShowBandedColumns()?`1`:`0`};t.empty(`tableStyleInfo`,i)},tn=new Map([[101,`average`],[102,`countNums`],[103,`count`],[104,`max`],[105,`min`],[107,`stdDev`],[109,`sum`],[110,`var`]]),nn={rowIndex:0,colIndex:0};function rn(e,n,r,i){if(i==null)return;nn.rowIndex=n,nn.colIndex=r;let a=t.AddressUtils.cellToString(nn),o,s;switch(typeof i){case`number`:s=``+i;break;case`boolean`:o=`b`,s=i?`1`:`0`;break;case`string`:o=`str`,s=i;break;default:{let e=i;if(e.t!==`e`)return;o=`e`,s=t.FormulaError.getBuiltInByCode(e.v)?.getLabel()??t.FormulaError.BuiltIn.Value.getLabel()}}e.start(`cell`,o?{r:a,t:o}:{r:a}),e.start(`v`),e.text(s),e.end(`v`),e.end(`cell`)}var an=(e,t,n,r)=>{t.start(`mc:AlternateContent`,{"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`}),t.start(`mc:Choice`,{Requires:`c14`,"xmlns:c14":`http://schemas.microsoft.com/office/drawing/2007/8/2/chart`}),t.empty(`c14:style`,{val:`102`}),t.end(`mc:Choice`),t.start(`mc:Fallback`),t.empty(`c:style`,{val:`2`}),t.end(`mc:Fallback`),t.end(`mc:AlternateContent`)},on=(e,t,n,r,i)=>{t.start(`chart`),((e,t,n,r,i)=>{t.start(`title`),t.empty(`overlay`,{val:`0`}),Oe(e,n,i,`spPr`,!0),t.end(`title`),t.empty(`autoTitleDeleted`,{val:`0`})})(e,t,n,0,i),((e,t,n,r,i)=>{t.start(`plotArea`),t.empty(`layout`),Oe(e,n,i,`spPr`,!0),t.end(`plotArea`)})(e,t,n,0,i),t.empty(`plotVisOnly`,{val:`1`}),t.empty(`dispBlanksAs`,{val:`gap`}),t.empty(`showDLblsOverMax`,{val:`0`}),t.end(`chart`)},sn=(e,t,n,r)=>{t.start(`printSettings`),t.empty(`headerFooter`),t.empty(`pageMargins`,{b:`0.75`,l:`0.7`,r:`0.7`,t:`0.75`,header:`0.3`,footer:`0.3`}),t.empty(`pageSetup`),t.end(`printSettings`)},cn=(e,t,n,r,i,a=`0`)=>{let o=i?.color,s={idx:i?.idx??a};o===void 0?t.empty(r,s):(t.start(r,s),o===`auto`?t.empty(`styleClr`,{val:`auto`}):(t.pushDefaultNamespace(`a`),R(t,n.getTheme(),o),t.popDefaultNamespace()),t.end(r))},ln=(e,t,n,r)=>{let i=n.length;for(let a=0;a<i;a++){let i=n[a];i.empty?t.empty(i.type,i.mods):(t.start(i.type,i.mods),cn(0,t,r,`lnRef`,i.lineRef,`0`),cn(0,t,r,`fillRef`,i.fillRef,`0`),cn(0,t,r,`effectRef`,i.effectRef,`0`),cn(0,t,r,`fontRef`,i.fontRef,`minor`),Oe(e,r,i,`spPr`),jt(e,0,i.defRPr),Mt(e,r,i.bodyPr),t.end(i.type))}},un=Object.freeze([{type:`axisTitle`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:10,kern:12}},{type:`categoryAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`chartArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`},fill:{type:`solid`,color:`bg1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:10,kern:12}},{type:`dataLabel`,fontRef:{color:`tx1 lumMod 75 lumOff 25`},defRPr:{size:9,kern:12}},{type:`dataLabelCallout`,fontRef:{color:`dk1 lumMod 65 lumOff 35`},fill:{type:`solid`,color:`lt1`},stroke:{fill:`dk1 lumMod 25 lumOff 75`},defRPr:{size:9,kern:12},bodyPr:{rot:`0`,spcFirstLastPara:`1`,vertOverflow:`clip`,horzOverflow:`clip`,vert:`horz`,wrap:`square`,lIns:`36576`,tIns:`18288`,rIns:`36576`,bIns:`18288`,anchor:`ctr`,anchorCtr:`1`,spAutoFit:`true`}},{type:`dataPoint`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPoint3D`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPointLine`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:2.25,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataPointMarker`,lineRef:{color:`auto`},fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`},stroke:{width:.75,fill:`phClr`}},{type:`dataPointMarkerLayout`,mods:{symbol:`circle`,size:`5`},empty:!0},{type:`dataPointWireframe`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:.75,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataTable`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},fill:{type:`none`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`downBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`dk1 lumMod 75 lumOff 25`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`dropLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`errorBar`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`floor`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}},{type:`gridlineMajor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`}},{type:`gridlineMinor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 5 lumOff 95`}},{type:`hiLoLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 50 lumOff 50`}},{type:`leaderLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`legend`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`plotArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`plotArea3D`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`seriesAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`seriesLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`title`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:14,b:!1,kern:12,spc:0,baseline:0}},{type:`trendline`,lineRef:{color:`auto`},fontRef:{color:`tx1`},stroke:{width:1.5,cap:`rnd`,fill:`phClr`,prstDash:`sysDot`}},{type:`trendlineLabel`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`upBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`lt1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`valueAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`wall`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}}]),dn=(e,t,n)=>{let r=n.length;for(let e=0;e<r;e++){let r=n[e],i={},a=r[0],o=r[1];a||o?(t.start(`variation`,i),a&&t.empty(`a:lumMod`,{val:a}),o&&t.empty(`a:lumOff`,{val:o}),t.end(`variation`)):t.empty(`variation`,i)}},fn=Object.freeze([[0,0],[6e4,0],[8e4,2e4],[8e4,0],[6e4,4e4],[5e4,0],[7e4,3e4],[7e4,0],[5e4,5e4]]),pn=[new class extends r{constructor(){super({kind:`workbook`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,path:`/xl/workbook.xml`})}async emit(r,i){let a=i.getXMLWriter();a.decl(),a.start(`workbook`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x15 xr xr6 xr10 xr2`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr6":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision6`,"xmlns:xr10":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision10`,"xmlns:xr2":`http://schemas.microsoft.com/office/spreadsheetml/2015/revision2`});let o=i.getSharedStates().get(n),s=await r.toJSON({ignoreData:!0,resources:(e,t)=>(o?.set(t,e),null),includeHeaderStyles:!0,splitDirectBorders:!0});i.getSharedStates().set(e.I,e.L(s.names,function(e){let t=[],n=e.sheets??[];for(let e=0;e<n.length;e++){let r=n[e]?.sheet?.tables;if(r)for(let e=0;e<r.length;e++){let n=r[e],i=Array.isArray(n)?n[1]?.name:n?.v?.name;i&&t.push(String(i))}}return t}(s))),function(e,t){let n=e.getSharedStates().get(se);n&&t.empty(`fileVersion`,n)}(i,a),function(e,t,n,r){let i={},a=n.getCodeName();a&&(i.codeName=a),n.getRuntime().isDate1904()&&(i.date1904=`1`),r.updateLinks&&(i.updateLinks=r.updateLinks),t.empty(`workbookPr`,i)}(0,a,r,s),function(t,n,r,i){let a=i.protection;if(!a||a.workbook)return;let o={};j(a.password??{},o,`workbook`),j(a.revisionsPassword??{},o,`revisions`);for(let t of e.y){let n=e.x(t,a[t.key]);n!==null&&(o[t.attribute]=n)}n.empty(`workbookProtection`,o)}(0,a,0,s),function(e,t,n){t.start(`bookViews`);let r=n.getView(),i={};r.isShowHorizontalScrollbar()||(i.showHorizontalScroll=`0`),r.isShowVerticalScrollbar()||(i.showVerticalScroll=`0`),r.isShowTabs()||(i.showSheetTabs=`0`);let a=r.getTabRatio();a!==600&&(i.tabRatio=a);let o=n.getSelectedSheet().getIndex();o!==0&&(i.activeTab=``+o),t.empty(`workbookView`,i),t.end(`bookViews`)}(0,a,r,s.view);let c=await(async(e,t)=>{let n=[],r=t?t.length:0;if(r===0)return n;let i=new Map;e.getSharedStates().set(`pivotCachePaths`,i);for(let a=0;a<r;a++){let r=t[a],o=r.cacheId,s=r.part;if(s?.xml&&!i.has(o))try{let t=await L({...s,type:s.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,contentType:s.contentType||`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml`},e,`/xl/pivotCache/pivotCacheDefinition{n}.xml`);if(!t?.relId)continue;i.set(o,t.path),n.push({cacheId:o,relId:t.relId})}catch(t){e.log(`Unable to write the pivot cache ${o}; the pivot tables on it will be dropped.`,t)}}return n})(i,s.pivotCaches);(function(e,t){t.getComments().some(e=>!e.isNote())&&e.addPart(`persons`,t.getPeople())})(i,r),a.start(`sheets`);let l=i.getSharedStates(),u=r.getStrings().beginPersist();l.set(`persistStrings`,u);let d=new N;l.set(`metaCollector`,d);let f=new ne(d,i.log.bind(i));l.set(`persistRichTypes`,f),l.set(te,new M(s.styles,r.getStyles()));try{let e=r.getSheets().getItems({visibility:t.ISheet.Visibility.VeryHidden}),n=s.sheets,o=r.getSelectedSheet(),c=e.length,d=((e,t)=>{let n=Array(t),r=new Set,i=1;for(let a=0;a<t;a++){let t=e?.[a]?.sheetId;t===void 0||!Number.isInteger(t)||t<1||r.has(t)||(r.add(t),n[a]=t,t>=i&&(i=t+1))}for(let e=0;e<t;e++)if(n[e]===void 0){for(;r.has(i);)i++;r.add(i),n[e]=i++}return n})(n,c),f=((e,t,n)=>{let r=t.length,i=Array(r),a=new Set(n?.values()??[]),o=new Set;for(let a=0;a<r;a++){let r=e?.[a]?.sheetId;if(r===void 0||t[a]!==r)continue;let s=n?.get(r);s&&!o.has(s)&&(o.add(s),i[a]=s)}let s=1;for(let e=0;e<r;e++){if(i[e])continue;let t;do t=`xl/worksheets/sheet${s++}.xml`;while(a.has(t)||o.has(t));o.add(t),i[e]=t}return i})(n,d,l.get(ce));for(let t=0;t<c;t++){let r=e[t],s=``+d[t],c={name:r.getName(),sheetId:s},l=r.getVisibility();l===`hidden`?c.state=`hidden`:l===`veryHidden`&&(c.state=`veryHidden`);let p=n[t].sheet;c[`r:id`]=i.addPart(`worksheet`,{model:r,isSelected:o===r,json:p,persistStrings:u},`/`+f[t]).relId,a.empty(`sheet`,c)}await i.waitEmit();let p=r.getTheme();i.addPart(`theme`,{model:p,json:s.theme}),await i.waitEmit(),i.addPart(`styles`,{styles:r.getStyles(),theme:r.getTheme(),json:s.styles}),await i.waitEmit();let m=await u.toJSONAsync();m&&m.length>0&&(i.addPart(`sharedStrings`,{model:m,json:m}),await i.waitEmit());let h=l.get(`persistRichTypes`);h?.hasAny()&&(i.addPart(`richValue`,h),i.addPart(`richValueStructure`,h),i.addPart(`richValueTypes`,null),await i.waitEmit());let g=l.get(`metaCollector`);g?.hasAny()&&(i.addPart(`metadata`,g),await i.waitEmit()),l.delete(`persistRichTypes`),l.delete(`metaCollector`),l.delete(`persistStrings`)}catch(e){throw e}finally{u.endPersist()}a.end(`sheets`),function(e,t,n){let r=n.externalBooks,i=r?r.length:0;if(i===0)return;let a=e.getSharedStates().get(le),o=new Set;if(a)for(let e=0;e<i;e++)!r[e]&&a[e]&&o.add(a[e]);let s=[],c=1;for(let t=0;t<i;t++){let n=r[t];if(n){let t;do t=`xl/externalLinks/externalLink${c++}.xml`;while(o.has(t));s.push(e.addPart(`externalLink`,n,`/`+t).relId);continue}let i=a?.[t],l=i?e.addRelationship(oe,i):null;l?s.push(l):e.log(`External link [${t+1}] cannot be written and is being dropped; later links will renumber.`)}if(s.length!==0){t.start(`externalReferences`);for(let e=0;e<s.length;e++)t.empty(`externalReference`,{"r:id":s[e]});t.end(`externalReferences`)}}(i,a,s),function(n,r,i,a){let o=n.getSharedStates().get(e.I),s=a.names,c=s?s.length:0;if(c===0)return;let l=a.externalBooks?.length??0,u=new Map,d=i.getSheets().getItems({visibility:t.ISheet.Visibility.VeryHidden});for(let e=0;e<d.length;e++)u.set(d[e].getName().toLowerCase(),e);r.start(`definedNames`);for(let e=0;e<c;e++){let t=s[e],i={name:t.name};if(t.comment&&(i.comment=t.comment),t.scope){let e=u.get(t.scope.toLowerCase());e===void 0?n.log(`Defined name '${t.name}' is scoped to unknown sheet '${t.scope}'; writing it as global.`):i.localSheetId=``+e}t.hidden&&(i.hidden=`1`);let a=o.writeName(t.ref);for(let e of ue(a))e>l&&n.log(`Defined name '${t.name}' cites external book [${e}], but only ${l} ${l===1?`is`:`are`} written; Excel will report the file as needing repair.`);r.start(`definedName`,i),r.text(a),r.end(`definedName`)}r.end(`definedNames`)}(i,a,r,s),function(e,t,n){let r=n.getCalculation().toJSON(),i={calcId:e.getSharedStates().get(`calcId`)??`191029`},a=(e,t)=>{let n=r[e];typeof n==`boolean`&&(i[t]=n?`1`:`0`)};if(r.calcMode){let e=de[r.calcMode];e&&e!==`auto`&&(i.calcMode=e)}a(`fullCalcOnLoad`,`fullCalcOnLoad`),a(`calcOnSave`,`calcOnSave`),a(`calcCompleted`,`calcCompleted`),a(`fullPrecision`,`fullPrecision`),a(`forceFullCalc`,`forceFullCalc`),a(`concurrentCalc`,`concurrentCalc`),r.refMode&&(i.refMode=r.refMode),r.iterate&&(i.iterate=`1`),r.maxIteration!==void 0&&(i.iterateCount=String(r.maxIteration)),r.maxIterateChange!==void 0&&(i.iterateDelta=String(r.maxIterateChange)),t.empty(`calcPr`,i)}(i,a,r),function(e,t){if(t.length!==0){e.start(`pivotCaches`);for(let n=0;n<t.length;n++)e.empty(`pivotCache`,{cacheId:t[n].cacheId,"r:id":t[n].relId});e.end(`pivotCaches`)}}(a,c),function(e,t){let n=e.getSharedStates().get(`calcFeatures`)??`<ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext>`;t.start(`extLst`),t.raw(n),t.end(`extLst`)}(i,a),a.end(`workbook`),a.close()}},new class extends r{constructor(){super({kind:`worksheet`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`,path:()=>`/xl/worksheets/sheet{n}.xml`})}async emit(n,r){let i=r.getXMLWriter(),a=n.model,o=n.json;i.decl(),i.start(`worksheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`}),function(e,t,n){let r=n.getTabColor(),i=n.getCodeName(),a={};i&&(a.codeName=i),n.isConditionalFormatCalculationEnabled()||(a.enableFormatConditionsCalculation=`0`);let o=n.getOutlineSettings(),s={};o.summaryBelow||(s.summaryBelow=`0`),o.summaryRight||(s.summaryRight=`0`),o.showOutlineSymbols||(s.showOutlineSymbols=`0`),o.applyStyles&&(s.applyStyles=`1`);let c=Object.keys(s).length>0,l=!!r||c;if(!(!l&&Object.keys(a).length===0)){if(!l)return void t.empty(`sheetPr`,a);t.start(`sheetPr`,a),r&&B(t,n.getStyles().getTheme(),r,`tabColor`,!1),c&&t.empty(`outlinePr`,s),t.end(`sheetPr`)}}(0,i,a),function(n,r,i,a){let o=i.getUsedRange({features:[]}),s=o?o.getCoords():null,c=e.n,l=e.t,u=a.directStyles,d=u?u.length:0;for(let e=0;e<d;e++){let n=i.getRange(u[e][0]).getCoords();if(n.colEnd===l){let e=s?.colStart??0;n={...n,colStart:e,colEnd:e}}if(n.rowEnd===c){let e=s?.rowStart??0;n={...n,rowStart:e,rowEnd:e}}s=t.CoordUtils.unionRanges(s,n)}let f=a.merges,p=f?f.length:0;for(let e=0;e<p;e++){let n=i.getRange(f[e]).getCoords();n.colEnd===l&&(n={...s},n.colStart=s?.colStart??0,n.colEnd=n.colStart),n.rowEnd===c&&(n={...n},n.rowStart=s?.rowStart??0,n.rowEnd=n.rowStart),s=t.CoordUtils.unionRanges(s,n)}let m=`A1`;s&&(o=i.getRange(s),m=s.colStart===s.colEnd&&s.rowStart===s.rowEnd?o.getAddress():`${o.getIntersect({colStart:s.colStart,rowStart:s.rowStart,colEnd:s.colStart,rowEnd:s.rowStart}).getAddress()}:${o.getIntersect({colStart:s.colEnd,rowStart:s.rowEnd,colEnd:s.colEnd,rowEnd:s.rowEnd}).getAddress()}`),r.empty(`dimension`,{ref:m})}(0,i,a,o),function(e,n,r,i,a){let o=r.getView(),s=o.getTopLeft(),c=r.getRowHeaders().getIndex(s.top),l=r.getColumnHeaders().getIndex(s.left),u=t.AddressUtils.cellToString({colIndex:l,rowIndex:c});n.start(`sheetViews`);let d={};o.isShowFormulas()&&(d.showFormulas=`1`),o.isShowColumnGridlines()||o.isShowRowGridlines()||(d.showGridLines=`0`),o.isShowColumnHeaders()||o.isShowRowHeaders()||(d.showRowColHeaders=`0`),o.isShowZeros()||(d.showZeros=`0`),o.isRightToLeft()&&(d.rightToLeft=`1`),a&&(d.tabSelected=`1`),u!==`A1`&&(d.topLeftCell=u);let f=o.getZoomScale();f!==100&&(d.zoomScale=f,d.zoomScaleNormal=f);let p=o.getGridLineColor();if(p){d.defaultGridColor=`0`;let e=p.toRGBA(),t=e.red,n=e.green,i=e.blue,a=r.getStyles().getIndexedColors(),o=a.length,s=0,c=Number.MAX_VALUE;for(let e=0;e<o;e++){let r=a[e].toRGBA(),o=(t-r.red)**2+(n-r.green)**2+(i-r.blue)**2;o<c&&(c=o,s=e)}d.colorId=``+s}d.workbookViewId=`0`;let m=r.getSelection().getCoords(),h=t.AddressUtils.cellToString(m.cell),g={},_=o.getFreezePanes(),v=_.coords??{},y=v.colIndex??0,b=v.rowIndex??0;if(y>0||b>0){let e=_.topLeft??{},i=e.top??0,a=e.left??0,o=r.getRowHeaders().getIndex(i),c=r.getColumnHeaders().getIndex(a),l=y-c,u=b-o,f=Math.max(y,r.getColumnHeaders().getIndex(s.left+r.getColumnHeaders().getOffset(y)-a)),p=Math.max(b,r.getRowHeaders().getIndex(s.top+r.getRowHeaders().getOffset(b)-i)),m=t.AddressUtils.cellToString({colIndex:c,rowIndex:o});m===`A1`?delete d.topLeftCell:d.topLeftCell=m,n.start(`sheetView`,d);let h={};if(l>0&&(h.xSplit=l),u>0&&(h.ySplit=u),h.topLeftCell=t.AddressUtils.cellToString({colIndex:f,rowIndex:p}),h.state=`frozen`,y===0){h.activePane=`bottomLeft`,n.empty(`pane`,h);let e=t.AddressUtils.cellToString({colIndex:f,rowIndex:o});e!==`A1`&&n.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`bottomLeft`}else if(b===0){h.activePane=`topRight`,n.empty(`pane`,h);let e=t.AddressUtils.cellToString({colIndex:c,rowIndex:p});e!==`A1`&&n.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`topRight`}else{h.activePane=`bottomRight`,n.empty(`pane`,h),m!==`A1`&&n.empty(`selection`,{activeCell:m,sqref:m});let e=t.AddressUtils.cellToString({colIndex:f,rowIndex:o});n.empty(`selection`,{pane:`topRight`,activeCell:e,sqref:e});let r=t.AddressUtils.cellToString({colIndex:c,rowIndex:p});n.empty(`selection`,{pane:`bottomLeft`,activeCell:r,sqref:r}),g.pane=`bottomRight`}}else n.start(`sheetView`,d);g.activeCell=h;let x=m.ranges,S=x?x.length:0;if(S>0){let e=``;for(let n=0;n<S;n++){let r=x[n];n>0&&(e+=` `),e+=t.AddressUtils.rangeToString(r)}g.sqref=e,(m.rangeIndex??0)>0&&(g.activeCellId=``+m.rangeIndex)}else h===`A1`?g=null:g.sqref=h;g&&n.empty(`selection`,g),n.end(`sheetView`),n.end(`sheetViews`)}(0,i,a,0,n.isSelected),function(e,t,n,r){let i=r.defaultColSize,a=r.defaultRowSize,o={};i!==void 0&&(o.defaultColWidth=i),o.defaultRowHeight=a??.75*n.getRowHeaders().getDefaultSize(),a!==void 0&&(o.customHeight=`1`),o[`x14ac:dyDescent`]=`0.25`,t.empty(`sheetFormatPr`,o)}(0,i,a,o);let s=!1===o.protection?.showFormulas?r.getSharedStates().get(`hiddenFormulaXfs`)??null:null;(function(n,r,i,a,o){let s=a.cols?t.AddressUtils.refsToRuns(a.cols,!0):null,c=s?s.length:0;i.getEntireRange().getColumnEnd();let l=i.getColumnHeaders().getDefaultSizeNative(),u=o?o.getHiddenXf(0):0,d=1,f=e=>{u!==0&&e>=d&&r.empty(`col`,{min:d,max:e,width:l,style:u})};if(c>0||u!==0){r.start(`cols`);for(let t=0;t<c;t++){let n=s[t],i=n.min+1,a=e.t+1;if(i>a)continue;let c=Math.min(n.max+1,a);f(i-1),d=c+1;let u={min:i,max:c},p=n.value,m=p.sz;m===void 0?u.width=l:m!==0&&(u.width=Math.round(256*m)/256);let h=o?o.getHiddenXf(p.s??0):p.s;h&&(u.style=h),p.h!==void 0&&(u.hidden=1),p.csz&&(u.customWidth=1),p.l!==void 0&&(u.outlineLevel=p.l),p.cl!==void 0&&(u.collapsed=1),r.empty(`col`,u)}f(e.t+1),r.end(`cols`)}})(0,i,a,o,s),function(n,r,i,a,o,s){let c=n.getSharedStates(),l=c.get(`persistStrings`),u=c.get(`metaCollector`),d=c.get(`persistRichTypes`),f=0,p=0,m=i.getUsedRange(),h=0,g=a.rows?t.AddressUtils.refsToRuns(a.rows,!1):null,_=g?g.length:0,v=g?.[_-1]?.max??-1,y=a.cols?t.AddressUtils.refsToRuns(a.cols,!0):null,b=y?y.length:0,x=y?.[b-1]?.max??-1;if(m||_>0){let c=.75,m=a.defaultRowSize??i.getRowHeaders().getDefaultSize()*c,_=i.getStyles().getNormal().getBestFit().height*c,b=(e,t)=>{let n=bt;if(n.r=``+(e+1),n.s=void 0,n.customFormat=void 0,n.hidden=void 0,n.ht=void 0,n.customHeight=void 0,n.outlineLevel=void 0,n.collapsed=void 0,!t)return n;let r=t.value;r.s!==void 0&&(n.s=``+(s?s.getHiddenXf(r.s):r.s),n.customFormat=`1`),r.h&&(n.hidden=`1`);let i=r.csz??!1,a=r.sz??m;return(a!==_||i)&&(n.ht=``+a),i&&(n.customHeight=`1`),r.l!==void 0&&(n.outlineLevel=``+r.l),r.cl!==void 0&&(n.collapsed=``+r.cl),n},S=0,C=g?.[S]??null,w=C?.min??2**53-1,T=C?.max??2**53-1,E=C?.value?.s,D=-1,O=0,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s,te=(e,t=!1)=>{if(D!==e){for(D!==-1&&(r.end(`row`),O!==0&&(O=0,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s));D+1<=e;){D++,C&&D>T&&(C=g[++S]??null,C?(w=C.min,T=C.max,E=C.value?.s):(w=2**53-1,T=2**53-1,E=void 0)),D<w&&D<e&&(D=C?Math.min(w,e):e);let n=D<e||t&&D===e,i=b(D,C&&D>=w&&D<=T?C:null);n?r.empty(`row`,i):r.start(`row`,i)}if(e<D){let t=b(e,null);r.start(`row`,t)}}};r.setValidationDisabled(!0),r.start(`sheetData`);let M=[];M.push($e(n,i,a.directStyles));let N=a.formulas,ne=N?N.length:0;if(ne>0){let r=new Map;if(o.names.size>0&&a.formulaArray)for(let e of a.formulaArray)try{let t=i.getRange(e[0]).getCoords();r.set(`${t.rowStart},${t.colStart}`,t)}catch{}let s=[];if(a.formulaArray)for(let e of a.formulaArray)try{s.push(i.getRange(e[0]).getCoords())}catch{}let c=e=>{for(let t=0;t<s.length;t++){let n=s[t];if(n.rowStart<=e.rowEnd&&n.rowEnd>=e.rowStart&&n.colStart<=e.colEnd&&n.colEnd>=e.colStart)return!0}return!1},l=n.getSharedStates().get(`xlsxFormulaDialect`)??e.L(i.getCalculation().getNamedFormulas().toJSON(),i.getTables().getItems().map(e=>e.getName())),u=i.getEntireRange().getCoords(),d=[];for(let e of i.getTables().getItems())d.push([e.getRange().getCoords(),e.getName()]);let f=(e,t)=>{for(let n=0;n<d.length;n++){let r=d[n][0];if(e>=r.rowStart&&e<=r.rowEnd&&t>=r.colStart&&t<=r.colEnd)return d[n][1]}return null},p=new Set;for(let e=0;e<s.length;e++)p.add(`${s[e].rowStart},${s[e].colStart}`);let m=[];for(let a=0;a<ne;a++){let s=N[a];try{let n=s[0],d=i.getRange(n),g=d.getCoords(),_=s[1],v=null,y={rowIndex:g.rowStart,colIndex:g.colStart},b=l.parse(_,y),x=b?l.annotate(b):void 0,S=b?l.spell(b,p.has(`${g.rowStart},${g.colStart}`),f(g.rowStart,g.colStart)):null,C=S?t.FormulaText.imager(S,{entireCoords:u}):null;C&&(_=C(y));let w=!0===x?.cm,T=!0===x?.ca;if(o.affects(a)){v=null,w=!1;let n=(e,n,r)=>{let i={rowStart:e,colStart:n,rowEnd:e,colEnd:n};m.push([i,{coords:i,formula:r,sharedId:null,ref:t.AddressUtils.rangeToString(i),isDynamicRange:!1,isWrapped:!0}])},a=r.get(`${g.rowStart},${g.colStart}`),o=a!==void 0&&(a.rowEnd>a.rowStart||a.colEnd>a.colStart),s=!1;if(o){let r=e.k(_,d.getCell().getValue());if(r!==null)for(let o=a.rowStart;o<=a.rowEnd;o++)for(let c=a.colStart;c<=a.colEnd;c++){if(o===a.rowStart&&c===a.colStart){n(o,c,r),s=!0;continue}let l=e.A(i.getRange(t.AddressUtils.rangeToString({rowStart:o,colStart:c,rowEnd:o,colEnd:c})).getCell().getValue());l!==null&&n(o,c,l)}}else d.forEach((t,r)=>{let i=r.getCoords(),a=e.k(C?.(i)??_,r.getCell().getValue());a!==null&&(n(i.rowIndex,i.colIndex,a),s=!0)},{includeEmpty:!0});if(s)continue}let E=_.indexOf(`!`)!==-1||_.indexOf(`[`)!==-1;w||d.isSingleCell()||E||c(g)||(v=``+h++);let D=v!==null||d.isSingleCell()?null:C,O=[g,{coords:g,formula:_,sharedId:v,ref:n,isDynamicRange:w,isExcelVolatile:T,memberImage:D}];m.push(O)}catch(e){n.log(`Could not write the formula '${s[1]}' over '${s[0]}'; those cells are written as values only. ${e}`);continue}}M.push(m)}else M.push([]);let P=a.volatile,F=P?P.length:0;if(F>0){let e=Array(F);for(let t=0;t<F;t++){let n=P[t];try{e[t]=[i.getRange(n).getCoords(),!0]}catch(e){console.warn(`Failed to parse volatile: ${n}`,e);continue}}M.push(e)}else M.push([]);let I=a.formulaArray,L=I?I.length:0;if(L>0){let e=Array(L);for(let t=0;t<L;t++){let n=I[t];try{let r=n[0];e[t]=[i.getRange(r).getCoords(),{ref:r,kind:n[1]??`dynamic`}]}catch(e){console.warn(`Failed to parse formula array: ${n}`,e);continue}}M.push(e)}else M.push([]);i.getEntireRange().forEach((i,a)=>{let o=a.getCoords(),c=o.rowIndex,m=o.colIndex;D!==c&&te(c);let h=a.getInjectedReference(0);if(h===void 0&&E!==void 0&&c>=w&&c<=T&&(h=E),h===void 0){for(;m<=x&&m>A;)O++,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s;j!==void 0&&m>=ee&&m<=A&&(h=j)}let g=a.getType(),_=null;ne>0&&(_=a.getInjectedReference(1)??null);let v=!1;F>0&&(v=a.getInjectedReference(2)??!1);let b=null;L>0&&(b=a.getInjectedReference(3)??null);let S=b?.kind===`error`,C=b?.kind===`fixed`,M=yt;M.r=a.getAddress(),M.s=void 0,M.t=void 0,M.cm=void 0,M.vm=void 0,s&&(h=s.getHiddenXf(h??0)),h!==void 0&&h!==0&&(M.s=``+h);let N=null,P=null;switch(g){case t.ScalarType.Boolean:N=i?`1`:`0`,P=`b`;break;case t.ScalarType.Error:let e=i.getCode();if(P=`e`,e>7)N=t.FormulaError.BuiltIn.Value.getLabel(),M.vm=``+d.add(i);else if(e<1){let e;P=`s`,_?(e=`=`+_.formula,_=null):e=``+i.getLabel(),N=``+l.add(e),f++}else N=``+i.getLabel();break;case t.ScalarType.Number:N=``+i,P=null;break;case t.ScalarType.String:N=i,_?(P=`str`,N=i):(P=`s`,N=``+l.add(N),f++);break;case t.ScalarType.RichData:P=`e`,N=t.FormulaError.BuiltIn.Value.getLabel(),M.vm=``+d.add(i)}P&&(M.t=P);let I=!_?.isWrapped&&(b!==null||(_?.isDynamicRange??!1));if(_!==null||N!==null){if(I&&_!==null&&!C&&(M.cm=``+u.registerArrayCell(S)),r.start(`c`,M),_){let e=c===_.coords.rowStart&&m===_.coords.colStart,t=_.formula;_.memberImage&&!e&&(t=_.memberImage({rowIndex:c,colIndex:m}));let n,i=null,a=_.sharedId;if(a){n=St;let e=_.coords;e.colStart===m&&e.rowStart===c?(n.ref=_.ref,n.si=a,i=_.formula):(n.ref=void 0,n.si=a)}else I?(n=Ct,n.aca=S?`1`:void 0,n.ref=S?M.r:b?.ref??M.r,i=t):(n=xt,i=t);n.ca=v||S||_.isExcelVolatile?`1`:void 0,i?(r.start(`f`,n),r.text(i),r.end(`f`)):r.empty(`f`,n)}N!==null&&(P===`str`&&N?(r.start(`v`,e.C.test(N)?e.S:void 0),r.text(e.T(N))):(r.start(`v`),N&&r.text(N)),r.end(`v`)),r.end(`c`)}else p++<Qe?r.empty(`c`,M):p===1048577&&n.warn(`Reached ${Qe} style-only cells at '${M.r}'; not writing the rest.`)},{injectReferences:M,features:[]}),D!==-1&&D>=v?r.end(`row`):te(v,!0),r.end(`sheetData`),r.setValidationDisabled(!1)}else r.empty(`sheetData`);if(f>0){let e=c.get(`stringsCount`)??0;c.set(`stringsCount`,e+f)}}(r,i,a,o,await(async(n,r)=>{let i=r?r.length:0;if(i===0)return Ze;let a=new Set,o=Array(i);for(let e=0;e<i;e++){o[e]=null;try{let n=t.FormulaText.parse(r[e][1]);if(!n)continue;let i=null,s=e=>{let t=null;e.type===`function`?t=String(e.value):e.type===`call`&&e.inputs?.[0]?.type===`named`&&(t=String(e.inputs[0].value?.name??``)),t&&(t=t.toUpperCase(),a.add(t),(i??=new Set).add(t));let n=e.inputs;if(n)for(let e=0;e<n.length;e++)n[e]&&s(n[e])};s(n),o[e]=i}catch{}}let s=n.getWorkbook();if(!s)return Ze;let c=await e.O(s,a);return c.size===0?Ze:{names:c,perFormula:o,affects:e=>{let t=o[e];if(!t)return!1;for(let e of t)if(c.has(e))return!0;return!1}}})(a,o.formulas),s),function(t,n,r,i){let a=i.protection;if(!a)return;let o={};a.sheet||j(a.password??{},o);for(let t of e.v){let n=e.x(t,a[t.key]);n!==null&&(o[t.attribute]=n)}n.empty(`sheetProtection`,o)}(0,i,0,o),function(e,t,n,r){let i=r.protectedRanges,a=i?i.length:0;if(a===0)return;let o=[];for(let t=0;t<a;t++){let n=i[t],r,a;Array.isArray(n)?(r=n[0],a=n[1]):(r=n.r,a=n.v);let s=ot(r);if(!s||!a){e.log(`Skipping protectedRange with no range.`);continue}if(!a.name){e.log(`Skipping protectedRange with no name.`);continue}let c={};j(a.password??{},c),c.sqref=s,c.name=a.name,a.securityDescriptor&&(c.securityDescriptor=a.securityDescriptor),o.push(c)}if(o.length!==0){t.start(`protectedRanges`);for(let e=0;e<o.length;e++)t.empty(`protectedRange`,o[e]);t.end(`protectedRanges`)}}(r,i,0,o);let c=o.autoTable;if(c){let e,t=c;e=Array.isArray(t)?t[1]:t.v,Je(r,i,a.getAutoTable(),e,!0)}(function(e,n,r,i){let a=i.merges?i.merges.length:0;if(a>0){n.start(`mergeCells`,{count:a});for(let e=0;e<a;e++){let r=i.merges[e],a=typeof r==`string`?r:t.AddressUtils.rangeToString(r);n.empty(`mergeCell`,{ref:a})}n.end(`mergeCells`)}})(0,i,0,o);let l=function(n,r,i,a){let o=[],s=a.conditionals,c=s?s.length:0;if(c===0)return o;let l=n.getSharedStates(),u=l.get(Fe);u||(u=new Pe,l.set(Fe,u));let d=i.getStyles().getTheme(),f=l.get(e.I),p=null,m=0;for(let i=0;i<c;i++){let a=s[i],c,l;Array.isArray(a)?(c=a[0],l=a[1]):(c=a.r,l=a.v);let h=ot(c);if(!h||!l){n.log(`Skipping conditionalFormatting with no range.`);continue}let g=lt(h),_=dt(l.scale,g,f);_!==l.scale&&(l={...l,scale:_});let v=_?{type:_.type}:e.g(l.condition,at(h),(e,t)=>n.warn(e,void 0,t));v?(v.formulas&&=v.formulas.map(e=>ut(e,g,f)),_?.type===t.IConditionalFormat.ScaleType.IconSet&&rt(_)?(m++,o.push({guid:e.st(t.CommonUtils.uuidV4),sqref:h,priority:m,scale:_})):_||!ct(v)?(h!==p&&(p!==null&&r.end(`conditionalFormatting`),r.start(`conditionalFormatting`,{sqref:h,pivot:l.pivot?`1`:void 0}),p=h),m++,it(n,r,d,l,v,h,m,u,o)):(m++,o.push({guid:e.st(t.CommonUtils.uuidV4),sqref:h,priority:m,rule:v,style:l.style,stopIfTrue:l.stopIfTrue}))):l.condition||n.log(`Skipping conditional format with neither a condition nor a scale.`)}return p!==null&&r.end(`conditionalFormatting`),o}(r,i,a,o),u=function(t,n,r,i){let a=[],o=t.getSharedStates().get(e.I),s=i.validations,c=s?s.length:0;if(c===0)return a;let l=[];for(let n=0;n<c;n++){let r=s[n],i,c;Array.isArray(r)?(i=r[0],c=r[1]):(i=r.r,c=r.v);let u=ot(i);if(!u||!c){t.log(`Skipping dataValidation with no range.`);continue}c.ext&&t.warn(`DataValidation extension payload is not written to xlsx; it will be lost.`);let d=(e,n)=>t.warn(e,void 0,n),f=e.d(c.condition,d),{type:p,operator:m}=f??{},h=lt(u),g=ut(f?.formula1,h,o),_=ut(f?.formula2,h,o),v={type:p,operator:m,allowBlank:X(c.condition?.includeBlanks??!1),showDropDown:c.hideDropdown?`1`:void 0,showInputMessage:X(c.showPromptMessage),showErrorMessage:X(c.showAlertMessage),errorStyle:c.alertStyle??`stop`,errorTitle:e.l(c.alertTitle,`errorTitle`,d),error:e.l(c.alert,`error`,d),promptTitle:e.l(c.promptTitle,`promptTitle`,d),prompt:e.l(c.prompt,`prompt`,d),imeMode:c.imeMode};st(g)||st(_)?a.push({attrs:v,formula1:g,formula2:_,sqref:u}):(v.sqref=u,l.push({attrs:v,formula1:g,formula2:_}))}if(l.length===0)return a;n.start(`dataValidations`,{count:l.length});for(let e=0;e<l.length;e++){let{attrs:t,formula1:r,formula2:i}=l[e];r!==void 0||i!==void 0?(n.start(`dataValidation`,t),r!==void 0&&(n.start(`formula1`),n.text(r),n.end(`formula1`)),i!==void 0&&(n.start(`formula2`),n.text(i),n.end(`formula2`)),n.end(`dataValidation`)):n.empty(`dataValidation`,t)}return n.end(`dataValidations`),a}(r,i,0,o);(function(e,t,n,r){let i=r.hyperlinks,a=i?i.length:0;if(a!==0){t.start(`hyperlinks`);for(let n=0;n<a;n++){let r,a,o=i[n];Array.isArray(o)?(a=o[0],r=o[1]):(a=o.r,r=o.v),typeof r==`string`&&(r={address:r});let s=r.address??``,c=s.indexOf(`#`),l=c===-1?s:s.substring(0,c),u=c===-1?``:s.substring(c+1),d={};d.ref=a,l&&(d[`r:id`]=e.addExternal(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,l).relId),u&&(d.location=u),r.screenTip&&(d.tooltip=r.screenTip),t.empty(`hyperlink`,d)}t.end(`hyperlinks`)}})(r,i,0,o),function(e,t,n,r){let i=r.pageMargins;t.empty(`pageMargins`,{left:i?.left??.7,right:i?.right??.7,top:i?.top??.75,bottom:i?.bottom??.75,header:i?.header??.3,footer:i?.footer??.3})}(0,i,0,o),function(e,t,n,r){let i=r.movables?.filter(ht);if((i?i.length:0)===0||!i.some(e=>{let t=e.content?.type;if(t===`picture`||t===`chart`)return!0;if(t===`shape`){let t=e.content?.json?.type;return t===`sp`||t===`cxnSp`}return!1}))return;let a=n.getMovables().getItems().filter(e=>e.getContent().getType()!==`note`).filter((e,t)=>ht(r.movables[t])),o=e.addPart(`drawing`,{sheet:n,movables:a,jsonMovables:i,resources:n.getResources()});t.empty(`drawing`,{"r:id":o.relId})}(r,i,a,o);let d=function(e){let t=e.getComments().toArray();if(t.length===0)return null;let n=[];for(let e=0;e<t.length;e++){let r=t[e],i=Te(r);i&&n.push({comment:r,...i})}return n.length===0?null:(n.sort((e,t)=>e.row-t.row||e.col-t.col),{sheet:e,comments:n})}(a);ft(r,i,`legacyDrawing`,mt(_t(o.legacyDrawing??null,o),d)),ft(r,i,`legacyDrawingHF`,o.legacyDrawingHF??null),await async function(e,t,n){let r=n.getPicture();if(!r)return;let i=r.getResource(),a=await i.getExternalURI(),o;if(a)o=e.addExternal(U,a);else{let t=e.getSharedStates(),n=t.get(W);n||(n=new Map,t.set(W,n));let r=n.get(i);if(!r){let e=await i.toBuffer();r={bytes:new Uint8Array(e),type:await i.getType()??Me,index:n.size+1},n.set(i,r)}o=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0)}t.empty(`picture`,{"r:id":o.relId})}(r,i,a),await async function(t,n,r){let i=r.movables;if(!i||i.every(ht))return;let a=[],o=i.length;for(let e=0;e<o;e++){let n=i[e];if(ht(n))continue;let r=n.content?.json??{},o=r.part,s;if(o)try{s=(await L(o.type?o:{...o,type:gt},t,`../ctrlProps/ctrlProp{n}.xml`))?.relId??void 0}catch(e){t.log(`Unable to write the properties of the control '${n.content?.name}'`,e)}s?a.push({jsonMovable:n,jsonControl:r,relId:s}):t.log(`The control '${n.content?.name}' has no properties to write and was dropped.`)}if(a.length===0)return;n.start(`mc:AlternateContent`,{"xmlns:x14":e.rt,"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`}),n.start(`mc:Choice`,{Requires:`x14`}),n.start(`controls`);let s=a.length;for(let e=0;e<s;e++){let{jsonMovable:t,jsonControl:r,relId:i}=a[e];n.start(`mc:AlternateContent`),n.start(`mc:Choice`,{Requires:`x14`}),n.start(`control`,{shapeId:r.shapeId,"r:id":i,name:t.content?.name??void 0});let o=t.anchorType??`twoCell`;n.start(`controlPr`,r.props),n.start(`anchor`,{moveWithCells:o===`absolute`?void 0:`1`,sizeWithCells:o===`twoCell`?`1`:void 0}),vt(n,`from`,t.anchor.tl),vt(n,`to`,t.anchor.br),n.end(`anchor`),r.xml&&n.raw(r.xml),n.end(`controlPr`),n.end(`control`),n.end(`mc:Choice`),n.end(`mc:AlternateContent`)}n.end(`controls`),n.end(`mc:Choice`),n.end(`mc:AlternateContent`)}(r,i,o),function(e,t,n,r){let i=r.tables,a=i?i.length:0;if(a===0)return;let o=n.getTables().getItems();t.start(`tableParts`,{count:a});for(let n=0;n<a;n++){let r,a,s=i[n];Array.isArray(s)?(a=s[0],r=s[1]):(a=s.r,r=s.v);let c=e.addPart(`table`,{json:r,model:o[n],ref:a}),l={};l[`r:id`]=c.relId,t.empty(`tablePart`,l)}t.end(`tableParts`)}(r,i,a,o),function(n,r,i,a,o){if(a.length===0&&o.length===0)return;let s=i.getStyles(),c=s.getTheme();if(r.start(`extLst`),a.length>0){r.start(`ext`,{uri:e.Q,"xmlns:x14":e.rt}),r.start(`x14:conditionalFormattings`);for(let n=0;n<a.length;n++){let{guid:i,sqref:o,priority:l,scale:u,rule:d,style:f,stopIfTrue:p}=a[n];if(r.start(`x14:conditionalFormatting`,{"xmlns:xm":e.it}),u)if(u.type===t.IConditionalFormat.ScaleType.DataBar){r.start(`x14:cfRule`,{type:`dataBar`,id:i}),r.start(`x14:dataBar`,{minLength:u.minLength,maxLength:u.maxLength,gradient:u.gradient?void 0:`0`,border:u.borderColor?`1`:void 0,direction:u.direction,negativeBarColorSameAsPositive:u.negativeFillColor?`0`:`1`,negativeBarBorderColorSameAsPositive:u.negativeBorderColor?`0`:void 0,axisPosition:u.axisPosition});let e=u.stops??[];if(e.length===0)tt(r,{type:t.IConditionalFormat.ColorStopType.AutoMin}),tt(r,{type:t.IConditionalFormat.ColorStopType.AutoMax});else for(let t=0;t<e.length;t++)tt(r,e[t]);u.borderColor&&B(r,c,u.borderColor,`x14:borderColor`),u.negativeFillColor&&B(r,c,u.negativeFillColor,`x14:negativeFillColor`),u.negativeBorderColor&&B(r,c,u.negativeBorderColor,`x14:negativeBorderColor`),u.axisColor&&B(r,c,u.axisColor,`x14:axisColor`),r.end(`x14:dataBar`),r.end(`x14:cfRule`)}else{r.start(`x14:cfRule`,{type:`iconSet`,priority:l,id:i}),r.start(`x14:iconSet`,{iconSet:u.iconSet,reverse:X(u.reverse),showValue:X(u.showValue),custom:(u.icon?.length??0)>0?`1`:void 0});let e=u.stops??[];for(let t=0;t<e.length;t++)tt(r,e[t]);let t=u.icon??[];for(let e=0;e<t.length;e++)r.empty(`x14:cfIcon`,{iconSet:t[e].set,iconId:t[e].id});r.end(`x14:iconSet`),r.end(`x14:cfRule`)}else{r.start(`x14:cfRule`,{type:d.type,priority:l,stopIfTrue:X(p),aboveAverage:X(d.aboveAverage),equalAverage:X(d.equalAverage),stdDev:d.stdDev,bottom:X(d.bottom),percent:X(d.percent),rank:d.rank,operator:d.operator,text:d.text,timePeriod:d.timePeriod,id:i});let e=d.formulas??[];for(let t=0;t<e.length;t++)r.start(`xm:f`),r.text(e[t]),r.end(`xm:f`);f&&Object.keys(f).length>0&&Ue(0,r,f,s,c,`x14:dxf`),r.end(`x14:cfRule`)}r.start(`xm:sqref`),r.text(o),r.end(`xm:sqref`),r.end(`x14:conditionalFormatting`)}r.end(`x14:conditionalFormattings`),r.end(`ext`)}if(o.length>0){r.start(`ext`,{uri:e.et,"xmlns:x14":e.rt}),r.start(`x14:dataValidations`,{"xmlns:xm":e.it,count:o.length});for(let e=0;e<o.length;e++){let{attrs:t,formula1:n,formula2:i,sqref:a}=o[e];r.start(`x14:dataValidation`,t),n!==void 0&&(r.start(`x14:formula1`),r.start(`xm:f`),r.text(n),r.end(`xm:f`),r.end(`x14:formula1`)),i!==void 0&&(r.start(`x14:formula2`),r.start(`xm:f`),r.text(i),r.end(`xm:f`),r.end(`x14:formula2`)),r.start(`xm:sqref`),r.text(a),r.end(`xm:sqref`),r.end(`x14:dataValidation`)}r.end(`x14:dataValidations`),r.end(`ext`)}r.end(`extLst`)}(0,i,a,l,u),function(e,t){let n=t.pivotTables,r=n?n.length:0;for(let t=0;t<r;t++){let r=n[t],i=r.part;i?.xml&&(ae(e,r.cacheId)?e.addPart(`pivotTable`,r):e.log(`The pivot table '${i.name??``}' has no cache with id ${r.cacheId} and was dropped.`))}}(r,o),function(e,t){t&&(e.addPart(`comments`,t),t.comments.some(e=>!e.comment.isNote())&&e.addPart(`threadedComments`,t))}(r,d),i.end(`worksheet`),i.close()}},new class extends r{constructor(){super({kind:`sharedStrings`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings`,path:`/xl/sharedStrings.xml`})}async emit(t,n){let r=n.getXMLWriter(),i=t.json,a=i?i.length:0,o=n.getSharedStates().get(`stringsCount`)??0;r.decl(),r.start(`sst`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,count:o,uniqueCount:a});for(let t=0;t<a;t++){let n=i[t];r.start(`si`);let a=e.C.test(n)?e.S:void 0;r.start(`t`,a),r.text(e.T(n)),r.end(`t`),r.end(`si`)}r.end(`sst`),r.close()}},new class extends r{constructor(){super({kind:`theme`,contentType:`application/vnd.openxmlformats-officedocument.theme+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,path:`/xl/theme/theme{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.model,i=e.json;n.decl(),n.pushDefaultNamespace(`a`),n.start(`theme`,{"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,name:r.getName()||`Office Theme`}),n.start(`themeElements`),function(e,t,n,r){let i=n?.getColorScheme();if(i){t.start(r,{name:i.getName()||`Office`});for(let e of me)t.start(e),R(t,n,i[`get`+e.charAt(0).toUpperCase()+e.slice(1)]()),t.end(e);t.end(r)}}(0,n,r,`clrScheme`),function(e,t,n,r){n&&(t.start(r,{name:n.getName()||`Office`}),wt(e,t,n.getMajorFont()||`Calibri Light`,`majorFont`),wt(e,t,n.getMinorFont()||`Calibri`,`minorFont`),t.end(r))}(t,n,r.getFontScheme(),`fontScheme`),function(e,t,n,r,i){if(i?.fillStyleLst&&i?.lnStyleLst&&i?.effectStyleLst&&i?.bgFillStyleLst)return void function(e,t,n,r,i){let a={getTheme:()=>r};t.start(n,{name:`Office`}),t.start(`fillStyleLst`);for(let e of i.fillStyleLst)H(0,t,e,a);t.end(`fillStyleLst`),t.start(`lnStyleLst`);for(let e of i.lnStyleLst)Ee(0,t,e,a);t.end(`lnStyleLst`),t.start(`effectStyleLst`);for(let n of i.effectStyleLst)t.start(`effectStyle`),n.length>0?ke(e,t,r,n):t.empty(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`),t.start(`bgFillStyleLst`);for(let e of i.bgFillStyleLst)H(0,t,e,a);t.end(`bgFillStyleLst`),t.end(n)}(e,t,n,r,i);if(i?.formatSchemeXml)return void t.raw(i.formatSchemeXml);t.start(n,{name:`Office`}),function(e,t){t.start(`fillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`50000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`35000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`37000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`15000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`1`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`51000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`80000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`93000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`94000`}),t.empty(`satMod`,{val:`135000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`0`}),t.end(`gradFill`),t.end(`fillStyleLst`)}(0,t),function(e,t){t.start(`lnStyleLst`);let n=[9525,25400,38100];for(let e=0;e<3;e++)t.start(`ln`,{w:n[e].toString(),cap:`flat`,cmpd:`sng`,algn:`ctr`}),t.start(`solidFill`),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`95000`}),t.empty(`satMod`,{val:`105000`}),t.end(`schemeClr`),t.end(`solidFill`),t.empty(`prstDash`,{val:`solid`}),t.end(`ln`);t.end(`lnStyleLst`)}(0,t),function(e,t){t.start(`effectStyleLst`);for(let e=0;e<3;e++)t.start(`effectStyle`),t.start(`effectLst`),e===2&&(t.start(`outerShdw`,{blurRad:`40000`,dist:`20000`,dir:`5400000`,rotWithShape:`0`}),t.start(`srgbClr`,{val:`000000`}),t.empty(`alpha`,{val:`38000`}),t.end(`srgbClr`),t.end(`outerShdw`)),t.end(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`)}(0,t),function(e,t){t.start(`bgFillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`40000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`40000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`45000`}),t.empty(`shade`,{val:`99000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`20000`}),t.empty(`satMod`,{val:`255000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`-80000`,r:`50000`,b:`180000`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`80000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`30000`}),t.empty(`satMod`,{val:`200000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`50000`,r:`50000`,b:`50000`}),t.end(`gradFill`),t.end(`bgFillStyleLst`)}(0,t),t.end(n)}(t,n,`fmtScheme`,r,i),n.end(`themeElements`),n.start(`objectDefaults`),n.end(`objectDefaults`),n.start(`extraClrSchemeLst`),n.end(`extraClrSchemeLst`),n.end(`theme`),n.close()}},new class extends r{constructor(){super({kind:`styles`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles`,path:`/xl/styles.xml`})}async emit(e,n){let r=n.getXMLWriter(),i=e.json,a=(e.theme,e.styles);r.decl(),r.start(`styleSheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac x16r2 xr`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`,"xmlns:x16r2":`http://schemas.microsoft.com/office/spreadsheetml/2015/02/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let o=function(e,n){let r=n?.direct;r&&r.length!==0||(r=[{}]);let i=r.length,a=Array(i);for(let n=0;n<i;n++){let i=n===0?{...r[n],named:t.IStyle.BuiltInName.Normal}:r[n],o=e.resolve(i),s={};i.named!==void 0&&(s.named=i.named),i.quotePrefix!==void 0&&(s.quotePrefix=i.quotePrefix),i.protection!==void 0&&(s.protection=i.protection);for(let e=0;e<Ie.length;e++){let t=Ie[e];if(i[t]===void 0&&t!==`alignment`)continue;let n=o?.[t]??i[t];n!==void 0&&(s[t]=n)}a[n]=s}return a}(a,i),s=function(e,n,r){let i={fontMap:new Map,fonts:[],fillMap:new Map,fills:[],borderMap:new Map,borders:[],numFmtMap:new Map,numFmtsCustom:[],namedStyleMap:new Map,namedStyles:[]};(function(e,n){let r=(e.getNamedStyles().getByName(t.IStyle.BuiltInName.Normal).toJSON().style??{}).font??{};n.fontMap.set(t.BufferUtils.JSONStableStringify(r),`0`),n.fonts.push(r)})(e,i),function(e){let n={type:`none`};e.fillMap.set(t.BufferUtils.JSONStableStringify(n),`0`),e.fills.push(n);let r={type:`pattern`,patternType:`gray125`};e.fillMap.set(t.BufferUtils.JSONStableStringify(r),`1`),e.fills.push(r)}(i),function(e){let n={bottom:{style:`none`},left:{style:`none`},right:{style:`none`},top:{style:`none`}};e.borderMap.set(t.BufferUtils.JSONStableStringify(n),`0`),e.borders.push(n)}(i),function(e,n){Re(e,e.getNamedStyles().getByName(t.IStyle.BuiltInName.Normal).toJSON(),n)}(e,i);let a=n?.named??t.CommonUtils.EmptyArray;for(let t of a)Re(e,t,i);for(let t of r)Le(e,t,i);return i}(a,i,o),c=n.getSharedStates().get(Fe),l=function(e,t=0){let n=e?.tables;if(!n)return null;let r=n.styles;if(!r)return null;let i=[],a=new Map,o=Object.keys(r),s=[...Ge].reverse();for(let e of o){let n=r[e];for(let r of s){let o=n[r];if(!o)continue;let s={};if(o.font&&(s.font=o.font),o.fill&&(s.fill=o.fill),o.borders&&(s.borders=o.borders),o.numberFormat!==void 0&&(s.numberFormat=o.numberFormat),Object.keys(s).length===0)continue;let c=t+i.length;i.push(s);let l=`${e}:${r}`;a.set(l,c)}}return{dxfs:i,dxfIndexMap:a}}(i,c?.getCount()??0);(function(e,t,n){let r=n.numFmtsCustom,i=r.length;if(i!==0){t.start(`numFmts`,{count:String(i)});for(let e=0;e<i;e++){let n=r[e];t.empty(`numFmt`,{numFmtId:String(e+We),formatCode:n})}t.end(`numFmts`)}})(0,r,s),function(e,t,n,r){let i=r.fonts,a=i.length;t.start(`fonts`,{count:String(a),"x14ac:knownFonts":`1`});for(let r of i)ze(e,t,r,n);t.end(`fonts`)}(n,r,a,s),function(e,t,n,r){let i=r.fills,a=i.length;t.start(`fills`,{count:String(a)});for(let e of i)H(0,t,e,n,!0);t.end(`fills`)}(0,r,a,s),function(e,t,n,r){let i=r.borders,a=i.length;t.start(`borders`,{count:String(a)});let o=n.getTheme();for(let n of i)Be(e,t,n,o,!1);t.end(`borders`)}(n,r,a,s),function(e,n,r,i,a){let o=a.namedStyles,s=o.length;n.start(`cellStyleXfs`,{count:String(s)});for(let i of o)He(e,n,r,i.style??t.CommonUtils.EmptyObject,a,!1);n.end(`cellStyleXfs`)}(n,r,a,0,s),function(e,t,n,r,i,a){let o=r.length,s=a?.getSources()??[];t.start(`cellXfs`,{count:String(o+s.length)});for(let a=0;a<o;a++)He(e,t,n,r[a],i,!0);for(let a=0;a<s.length;a++)He(e,t,n,r[s[a]],i,!0,!0);t.end(`cellXfs`)}(n,r,a,o,s,n.getSharedStates().get(te)),function(e,n,r,i,a){let o=a.namedStyles,s=o.length;n.start(`cellStyles`,{count:String(s)});let c=a.namedStyleMap;for(let e=0;e<s;e++){let i=o[e],a=i.name,s=a.toLowerCase(),l={name:a,xfId:c.get(s)};i.hidden&&(l.hidden=`1`),i.iLevel&&(l.iLevel=String(i.iLevel));let u=null;u=s===t.IStyle.BuiltInName.Normal.toLowerCase()?0:r.getNamedStyles().getByName(a).getBuiltInID(),u!==null&&(l.builtinId=String(u),l.customBuiltin=`1`),n.empty(`cellStyle`,l)}n.end(`cellStyles`)}(0,r,a,0,s),function(e,t,n,r,i){let a=[...i?.getDxfs()??[],...r?.dxfs??[]];if(a.length===0)return void t.empty(`dxfs`,{count:`0`});let o=n.getTheme();t.start(`dxfs`,{count:String(a.length)});let s=We;for(let r of a)s=Ue(e,t,r,n,o,`dxf`,s);t.end(`dxfs`)}(n,r,a,l,c),function(e,t,n,r,i){let a=r?.tables,o=a?.styles??null,s=o?Object.keys(o):null,c=s?s.length:0,l={count:String(c),defaultTableStyle:a?.defaultTableStyle??`TableStyleMedium2`,defaultPivotStyle:a?.defaultPivotStyle??`PivotStyleLight16`};if(c===0)return void t.empty(`tableStyles`,l);t.start(`tableStyles`,l);for(let e of s){let n=o[e],r=[];for(let e of Ge){let t=n[e];t&&r.push([e,t])}let a={name:e,pivot:n.pivot?`1`:`0`,count:String(r.length)};t.start(`tableStyle`,a);for(let[n,a]of r){let r=`${e}:${n}`,o=i?.dxfIndexMap.get(r)??`0`,s={};s.type=n,a.size!==void 0&&(s.size=String(a.size)),s.dxfId=String(o),t.empty(`tableStyleElement`,s)}t.end(`tableStyle`)}t.end(`tableStyles`)}(0,r,0,i,l),function(e,t,n,r){let i=r?.indexedColors&&r.indexedColors.length>0,a=r?.mruColors&&r.mruColors.length>0;if(!(!i&&!a)){if(t.start(`colors`),i){t.start(`indexedColors`);for(let e of r.indexedColors){let n=ye(e,!0);t.empty(`rgbColor`,{rgb:n})}t.end(`indexedColors`)}if(a){t.start(`mruColors`);for(let e of r.mruColors){let n=ye(e);t.empty(`color`,{rgb:n})}t.end(`mruColors`)}t.end(`colors`)}}(0,r,0,i),function(e,t){t.start(`extLst`),t.start(`ext`,{uri:`{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),t.empty(`x14:slicerStyles`,{defaultSlicerStyle:`SlicerStyleLight1`}),t.end(`ext`),t.start(`ext`,{uri:`{9260A510-F301-46a8-8635-F512D64BE5F5}`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`}),t.empty(`x15:timelineStyles`,{defaultTimelineStyle:`TimeSlicerStyleLight1`}),t.end(`ext`),t.end(`extLst`)}(0,r),r.end(`styleSheet`),r.close()}},new class extends r{constructor(){super({kind:`propsCore`,contentType:`application/vnd.openxmlformats-package.core-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties`,path:`/docProps/core.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`cp:coreProperties`,{"xmlns:cp":`http://schemas.openxmlformats.org/package/2006/metadata/core-properties`,"xmlns:dc":`http://purl.org/dc/elements/1.1/`,"xmlns:dcterms":`http://purl.org/dc/terms/`,"xmlns:dcmitype":`http://purl.org/dc/dcmitype/`,"xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`});let r=new Date,i=[[`creator`,`SheetXL`],[`lastModifiedBy`,`SheetXL`],[`created`,Tt(r)],[`modified`,Tt(r)]];for(let e of i)Et(n,e[0],e[1]);n.end(`cp:coreProperties`),n.close()}},new class extends r{constructor(){super({kind:`propsApp`,contentType:`application/vnd.openxmlformats-officedocument.extended-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties`,path:`/docProps/app.xml`})}async emit(n,r){let i=r.getXMLWriter(),a=n.model,o=await t.LicenseManager.getDetails(),s=e.r(o.getBuildVersion()),c=o.getLicensee()||``;i.setValidationDisabled(!0),i.decl(),i.start(`Properties`,{xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/extended-properties`,"xmlns:vt":`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`}),Z(r,i,`Application`,`SheetXL`),Z(r,i,`DocSecurity`,`0`),Z(r,i,`ScaleCrop`,`false`),Dt(r,i,a),Z(r,i,`Company`,c),Z(r,i,`LinksUpToDate`,`false`),Z(r,i,`SharedDoc`,`false`),Z(r,i,`HyperlinksChanged`,`false`),Z(r,i,`AppVersion`,s),i.end(`Properties`),i.close()}},new class extends r{constructor(){super({kind:`metadata`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata`,path:`/xl/metadata.xml`})}emit(e,t){let n=t.getXMLWriter(),r=e.hasCellMeta(),i=e.hasValueMeta(),a=e.getDAPRFutureMetadataBlocks(),o=e.getRVFutureMetadataBlocks(),s=e.getValueMeta(),c=0,l=0,u=0;r&&(c=++u),i&&(l=++u);let d={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};if(r&&(d[`xmlns:xda`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray`),i&&(d[`xmlns:xlrd`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`),n.decl(),n.start(`metadata`,d),n.start(`metadataTypes`,{count:u}),r&&n.empty(`metadataType`,{name:`XLDAPR`,...Ot,cellMeta:`1`}),i&&n.empty(`metadataType`,{name:`XLRICHVALUE`,...Ot}),n.end(`metadataTypes`),r){n.start(`futureMetadata`,{name:`XLDAPR`,count:a.length});for(let e of a)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}`}),n.empty(`xda:dynamicArrayProperties`,{fDynamic:e.fDynamic,fCollapsed:e.fCollapsed}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(i){n.start(`futureMetadata`,{name:`XLRICHVALUE`,count:o.length});for(let e of o)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}`}),n.empty(`xlrd:rvb`,{i:e}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(r){n.start(`cellMetadata`,{count:a.length});for(let e=0;e<a.length;e++)n.start(`bk`),n.empty(`rc`,{t:c,v:e}),n.end(`bk`);n.end(`cellMetadata`)}if(i){n.start(`valueMetadata`,{count:s.length});for(let e of s)n.start(`bk`),n.empty(`rc`,{t:l,v:e}),n.end(`bk`);n.end(`valueMetadata`)}n.end(`metadata`),n.close()}},new class extends r{constructor(){super({kind:`richValue`,contentType:`application/vnd.ms-excel.rdrichvalue+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue`,path:`./richData/rdrichvalue.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.getEntries(),i=r.length;n.decl(),n.start(`rvData`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let t of r){let r=e.handlerStructureIndex(t.handler);n.start(`rv`,{s:r});let i=t.handler.getValues(t.rawValue);for(let e of i)n.start(`v`),n.text(e),n.end(`v`);n.end(`rv`)}n.end(`rvData`),n.close()}},new class extends r{constructor(){super({kind:`richValueStructure`,contentType:`application/vnd.ms-excel.rdrichvaluestructure+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure`,path:`./richData/rdrichvaluestructure.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.uniqueHandlers(),i=r.length;n.decl(),n.start(`rvStructures`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let e of r){n.start(`s`,{t:e.type});for(let[t,r]of e.props)n.empty(`k`,{n:t,t:r});n.end(`s`)}n.end(`rvStructures`),n.close()}},new class extends r{constructor(){super({kind:`richValueTypes`,contentType:`application/vnd.ms-excel.rdrichvaluetypes+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes`,path:`./richData/rdRichValueTypes.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`rvTypesInfo`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=[[`_self`,[`ExcludeFromFile`,`ExcludeFromCalcComparison`]],[`_DisplayString`,[`ExcludeFromCalcComparison`]],[`_Flags`,[`ExcludeFromCalcComparison`]],[`_Format`,[`ExcludeFromCalcComparison`]],[`_SubLabel`,[`ExcludeFromCalcComparison`]],[`_Attribution`,[`ExcludeFromCalcComparison`]],[`_Icons`,[`ExcludeFromCalcComparison`]],[`_Display`,[`ExcludeFromCalcComparison`]],[`_CanonicalPropertyNames`,[`ExcludeFromCalcComparison`]],[`_ClassificationId`,[`ExcludeFromCalcComparison`]]];n.start(`global`),n.start(`keyFlags`);for(let[e,t]of r){n.start(`key`,{name:e});for(let e of t)n.empty(`flag`,{name:e,value:`1`});n.end(`key`)}n.end(`keyFlags`),n.end(`global`),n.end(`rvTypesInfo`),n.close()}},new class extends r{constructor(){super({kind:`drawing`,contentType:`application/vnd.openxmlformats-officedocument.drawing+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing`,path:`../drawings/drawing{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`xdr`),n.start(`wsDr`,{"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`});let r=new Map,i=e.sheet,a=e.movables,o=e.jsonMovables,s=o?o.length:0,c=0;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;typeof t==`number`&&t>c&&(c=t)}let l=new Map,u;if(c>0){let e=t.getSharedStates();u=e.get(`uniqueIdCounter`),u||(u=new Map,e.set(`uniqueIdCounter`,u)),u.set(i,Math.max(u.get(i)??1,c));let n=new Set;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;if(typeof t==`number`)if(n.has(t)){let t=u.get(i)+1;u.set(i,t),l.set(o[e],t)}else n.add(t)}}for(let e=0;e<s;e++){let s=o[e],c=a[e],u=s.content?.type;switch(n.start(`twoCellAnchor`,{editAs:s.anchorType||`twoCell`}),qt(n,`from`,s.anchor.tl),qt(n,`to`,s.anchor.br),u){case`picture`:await Ft(t,i,r,c,s);break;case`chart`:await It(t,i,r,c,s,l.get(s));break;case`shape`:await Bt(t,i,r,c,s,l.get(s));break;case`smartArt`:await Lt(t,i,r,c,s);break;case`slicer`:await Rt(t,i,r,c,s);break;case`graphicFrame`:await zt(t,i,r,c,s);break;default:await Q(t,i,r,c,s)}n.empty(`clientData`),n.end(`twoCellAnchor`)}n.end(`wsDr`),n.close()}},new class extends r{constructor(){super({kind:`legacyDrawing`,contentType:`application/vnd.openxmlformats-officedocument.vmlDrawing`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing`,path:`../drawings/vmlDrawing{n}.vml`})}async emit(e,t){let r=e.images,i=r?r.length:0;if(i>0){let e=t.getSharedStates().get(n);for(let n=0;n<i;n++){let i=r[n],a=e?.get(i.resId);if(a)try{await Jt(t,i.id,a)}catch(e){t.log(`Unable to write legacy drawing image '${i.id}'`,e)}else t.log(`Legacy drawing image '${i.id}' has no resource ${i.resId} and was not written.`)}}let a=t.getXMLWriter();a.setValidationDisabled(!0),a.raw(e.xml),a.close()}},new class extends r{constructor(){super({kind:`embeddedPart`,contentType:F,relTypeUri:``})}getContentType(e){return e?.contentType||F}getRelTypeUri(e){return e?.type??``}getPath(e){return`./${re(e.name)}`}async emit(e,t){await I(e,t);let n=t.getXMLWriter();n.setValidationDisabled(!0),n.raw(e.xml??``),n.close()}},new class extends r{constructor(){super({kind:`pivotTable`,contentType:ie,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`,path:`../pivotTables/pivotTable{n}.xml`})}getContentType(e){return e?.part?.contentType||ie}async emit(e,t){let n=e.part;await I(n,t);let r=ae(t,e.cacheId);if(!r||!t.addRelationship(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,r))throw Error(`Pivot table '${n.name??``}' has no cache with id ${e.cacheId}.`);let i=t.getXMLWriter();i.setValidationDisabled(!0),i.raw(n.xml??``),i.close()}},new class extends r{constructor(){super({kind:`comments`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`,path:`../comments{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`comments`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let r=[],i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.length,r.push(e),i.set(e,t)),t},o=e.comments,s=[];for(let e=0;e<o.length;e++){let{comment:t,ref:n}=o[e];t.isNote()?s.push({ref:n,authorId:a(t.getAuthor()?.getDisplayName()??``),content:t.getRichContent()??t.getContent()}):s.push({ref:n,authorId:a(`tc={${t.getId().toUpperCase()}}`),content:be(t)})}n.start(`authors`);for(let e=0;e<r.length;e++)n.start(`author`),n.text(r[e]),n.end(`author`);n.end(`authors`);let c=e.sheet.getStyles().getTheme();n.start(`commentList`);for(let e=0;e<s.length;e++){let t=s[e];n.start(`comment`,{ref:t.ref,authorId:t.authorId,shapeId:0}),n.start(`text`),xe(n,t.content,c),n.end(`text`),n.end(`comment`)}n.end(`commentList`),n.end(`comments`),n.close()}},new class extends r{constructor(){super({kind:`threadedComments`,contentType:`application/vnd.ms-excel.threadedcomments+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`,path:`../threadedComments/threadedComment{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`ThreadedComments`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.comments;for(let e=0;e<r.length;e++){let{comment:t,ref:i}=r[e];if(t.isNote())continue;Xt(n,i,t.getId(),t.getAuthor()?.getId(),t.getCreationDate(),t.getContent(),null,t.isResolved(),t.toJSON()?.mentions);let a=t.getReplies();for(let e=0;e<a.length;e++){let r=a[e];Xt(n,i,r.getId(),r.getAuthor()?.getId(),r.getCreationDate(),r.getContent(),t.getId(),!1,r.toJSON().mentions)}}n.end(`ThreadedComments`),n.close()}},new class extends r{constructor(){super({kind:`persons`,contentType:`application/vnd.ms-excel.person+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/person`,path:`persons/person.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`personList`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.toArray();for(let e=0;e<r.length;e++){let t=r[e];n.empty(`person`,{displayName:t.getDisplayName(),id:$(t.getId()),userId:t.getUserId()??t.getDisplayName(),providerId:t.getProviderId()??`None`})}n.end(`personList`),n.close()}},new class extends r{constructor(){super({kind:`table`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/table`,path:`../tables/table{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl();let r={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr xr3`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr3":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision3`},i=e.json,a=e.model;a.isShowHeaders(),r.id=++Zt,r.name=i.name?.trim(),r.displayName=i.description??i.name,r.ref=e.ref,i.headerRowCount!==1&&(r.headerRowCount=i.headerRowCount),i.totalsRowCount!==0&&(r.totalsRowCount=i.totalsRowCount),i.totalsRowShown||a.isShowTotals()||(r.totalsRowShown=`0`),n.start(`table`,r),a.isShowHeaders()&&Je(t,n,a,i),Qt(t,n,a,i),en(t,n,a,i),n.end(`table`),n.close()}},new class extends r{constructor(){super({kind:`externalLink`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,path:`../externalLinks/externalLink{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.sources??[],i=r.findIndex(e=>e.role===`book`);i<0&&r.length>0&&(i=0);let a=null,o=null;for(let e=0;e<r.length;e++){let n=r[e],s=t.addExternal(n.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath`,n.target).relId;e===i?a=s:n.role===`absoluteUrl`&&(o=s)}a||t.log(`External book has no path relationship; Excel cannot locate its source.`,e.sheetNames),n.decl();let s={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};(e.mceIgnorable||o)&&(s[`xmlns:mc`]=`http://schemas.openxmlformats.org/markup-compatibility/2006`,s[`mc:Ignorable`]=`x14 xxl21`,s[`xmlns:x14`]=`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`,s[`xmlns:xxl21`]=`http://schemas.microsoft.com/office/spreadsheetml/2021/extlinks2021`),n.start(`externalLink`,s);let c={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};a&&(c[`r:id`]=a),n.start(`externalBook`,c),o&&(n.start(`xxl21:alternateUrls`),n.empty(`xxl21:absoluteUrl`,{"r:id":o}),n.end(`xxl21:alternateUrls`)),function(e,t){let n=t.sheetNames,r=n?n.length:0;if(r!==0){e.start(`sheetNames`);for(let t=0;t<r;t++)e.empty(`sheetName`,{val:n[t]});e.end(`sheetNames`)}}(n,e),function(e,t){let n=t.definedNames,r=n?n.length:0;if(r!==0){e.start(`definedNames`);for(let t=0;t<r;t++){let r=n[t],i={name:r.name,refersTo:r.refersTo};r.sheetIndex!==void 0&&(i.sheetId=``+r.sheetIndex),e.empty(`definedName`,i)}e.end(`definedNames`)}}(n,e),function(e,t){let n=t.sheetDataSet,r=n?n.length:0;if(r!==0){e.start(`sheetDataSet`);for(let t=0;t<r;t++){let r=n[t],i={sheetId:``+r.sheetIndex};r.refreshError&&(i.refreshError=`1`);let a=r.data,o=a?a.length:0;if(o!==0){e.start(`sheetData`,i);for(let t=0;t<o;t++){let[n,r]=a[t];e.start(`row`,{r:``+(n+1)});let i=r.length;for(let t=0;t<i;t++){let[i,a]=r[t],o=a.length;for(let t=0;t<o;t++)rn(e,n,i+t,a.at(t))}e.end(`row`)}e.end(`sheetData`)}else e.empty(`sheetData`,i)}e.end(`sheetDataSet`)}}(n,e),n.end(`externalBook`),n.end(`externalLink`),n.close()}},new class extends r{constructor(){super({kind:`chart`,contentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart`,path:`../charts/chart{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`c`),n.start(`chartSpace`,{"xmlns:c":`http://schemas.openxmlformats.org/drawingml/2006/chart`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:c16r2":`http://schemas.microsoft.com/office/drawing/2015/06/chart`}),n.empty(`date1904`,{val:`0`}),n.empty(`lang`,{val:`en-US`}),n.empty(`roundedCorners`,{val:`0`}),an(t,n,e.model,e.json),on(t,n,e.styles,e.model,e.json),sn(t,n,e.model,e.json),n.end(`chartSpace`),n.popDefaultNamespace(),n.close(),t.addPart(`chartStyle`,{styles:e.styles}),t.addPart(`chartColors`,{styles:e.styles})}},new class extends r{constructor(){super({kind:`chartStyle`,contentType:`application/vnd.ms-office.chartstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartStyle`,path:`./style{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`chartStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,id:`297`}),ln(t,n,un,e.styles),n.end(`chartStyle`),n.close()}},new class extends r{constructor(){super({kind:`chartColors`,contentType:`application/vnd.ms-office.chartcolorstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartColorStyle`,path:`./colors{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`cs:colorStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,meth:`cycle`,id:`10`}),n.empty(`a:schemeClr`,{val:`accent1`}),n.empty(`a:schemeClr`,{val:`accent2`}),n.empty(`a:schemeClr`,{val:`accent3`}),n.empty(`a:schemeClr`,{val:`accent4`}),n.empty(`a:schemeClr`,{val:`accent5`}),n.empty(`a:schemeClr`,{val:`accent6`}),dn(t,n,fn),n.end(`cs:colorStyle`),n.close()}}],mn=t=>{let n=t.getPart(`xl/_rels/workbook.xml.rels`);if(!n)return null;let r=new Map;for(let t of e.U(n.data)){if(!t.id)continue;let e=t.external?t.target:p(t.target.startsWith(`/`)?t.target:`xl/`+t.target);r.set(t.id,{type:t.type,target:e,external:t.external})}return r},hn=e=>{let t=e.getPart(`xl/workbook.xml`);return t?new TextDecoder(`utf-8`).decode(t.data):null},gn=e=>{let t=_n.get(e);if(t!==void 0)return t;let n=e.getPart(`xl/workbook.xml`),r=n?new TextDecoder(`utf-8`).decode(n.data):null;return _n.set(e,r),r},_n=new WeakMap,vn=1;exports.writeXLSX=async(t,r)=>{let a=new A;for(let e of pn)a.register(e);let o=vn,s=i.createUint8Array({lastModDate:new Date(1899,11,29,19,0,0),level:o}),c=r?.format===`Excel`||r?.format===`ExcelMacro`?e.N(t):null,l=new Map,u=c?(e=>{let t=e.getPart(`xl/workbook.xml`);if(!t)return null;let n=new TextDecoder(`utf-8`).decode(t.data.subarray(0,4096)).match(/<fileVersion\b([^>]*)\/?>/);if(!n)return null;let r={};for(let e of n[1].matchAll(/([\w:]+)="([^"]*)"/g))r[e[1]]=e[2];return Object.keys(r).length>0?r:null})(c):null;u&&(r?.macroEnabled||delete u.codeName,l.set(se,u));let d=c?(e=>{let t=gn(e)?.match(/<calcPr\b[^>]*?\bcalcId="([^"]*)"/);return t?t[1]:null})(c):null;d!==null&&l.set(`calcId`,d);let f=c?(e=>{let t=gn(e)?.match(/<ext\b[^>]*>\s*<xcalcf:calcFeatures\b[\s\S]*?<\/xcalcf:calcFeatures>\s*<\/ext>/);return t?t[0]:null})(c):null;f!==null&&l.set(`calcFeatures`,f);let p=c?(e=>{let t=hn(e);if(!t)return null;let n=/<externalReferences\b[^>]*>([\s\S]*?)<\/externalReferences>/.exec(t);if(!n)return null;let r=[...n[1].matchAll(/<externalReference\b[^>]*\sr:id="([^"]*)"/g)].map(e=>e[1]);if(r.length===0)return null;let i=mn(e);return i?r.map(e=>{let t=i.get(e);return t&&!t.external?t.target:null}):null})(c):null;p&&l.set(le,p);let m=c?(e=>{let t=hn(e),n=t?mn(e):null;if(!t||!n)return null;let r=new Map;for(let e of t.matchAll(/<sheet\b([^>]*)\/?>/g)){let t=/\bsheetId="(\d+)"/.exec(e[1])?.[1],i=/\br:id="([^"]*)"/.exec(e[1])?.[1];if(!t||!i)continue;let a=n.get(i);a&&!a.external&&a.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`&&r.set(parseInt(t,10),a.target)}return r.size>0?r:null})(c):null;m&&l.set(ce,m),l.set(n,new Map);let h=[],g=new k(s,a,{strictDuplicateChildren:!0,onPartEmitted:r?.onPartEmitted,onWarning:(e,t,n)=>{h.push([e,t,n])},mapState:l,sourcePackage:c,macroEnabled:r?.macroEnabled??!1});g.addPart(`workbook`,t,`/xl/workbook.xml`),await g.waitEmit(),g.addPart(`propsCore`,{}),g.addPart(`propsApp`,{model:t});let _=await g.build(),v=r?.progress?.onWarning;if(h.length&&v){let e=new Set;for(let[t,n,i]of h){let a=i??t;e.has(a)||(e.add(a),v.call(r.progress,t,n))}}return _.byteOffset===0&&_.byteLength===_.buffer.byteLength?_.buffer:_.slice().buffer};
|