@cj-tech-master/excelts 9.6.0 → 9.6.1
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/dist/browser/modules/archive/io/random-access.d.ts +1 -1
- package/dist/browser/modules/excel/workbook.browser.d.ts +1 -1
- package/dist/browser/modules/excel/xlsx/xform/comment/comment-xform.d.ts +3 -0
- package/dist/browser/modules/excel/xlsx/xform/comment/comment-xform.js +30 -7
- package/dist/browser/modules/pdf/excel-bridge.d.ts +32 -0
- package/dist/browser/modules/pdf/excel-bridge.js +67 -1
- package/dist/browser/modules/pdf/word-bridge.d.ts +20 -15
- package/dist/browser/modules/pdf/word-bridge.js +49 -34
- package/dist/browser/modules/stream/common/consumers.d.ts +2 -1
- package/dist/browser/modules/word/advanced/diff.js +125 -13
- package/dist/browser/modules/word/advanced/drawing-shapes.js +3 -0
- package/dist/browser/modules/word/bridge/excel-bridge.js +21 -1
- package/dist/browser/modules/word/builder/document-handle.d.ts +2 -0
- package/dist/browser/modules/word/builder/document-handle.js +14 -2
- package/dist/browser/modules/word/builder/paragraph-builders.js +10 -1
- package/dist/browser/modules/word/builder/run-builders.d.ts +19 -2
- package/dist/browser/modules/word/builder/run-builders.js +2 -6
- package/dist/browser/modules/word/convert/odt/odt.js +6 -1
- package/dist/browser/modules/word/layout/layout-full.d.ts +12 -0
- package/dist/browser/modules/word/layout/layout-full.js +74 -9
- package/dist/browser/modules/word/layout/layout-model.d.ts +12 -0
- package/dist/browser/modules/word/query/merge.js +26 -10
- package/dist/browser/modules/word/query/split.js +68 -2
- package/dist/browser/modules/word/reader/docx-reader.js +23 -0
- package/dist/browser/modules/word/security/cfb-reader.d.ts +14 -3
- package/dist/browser/modules/word/security/cfb-reader.js +271 -153
- package/dist/browser/modules/word/security/document-protection.js +10 -4
- package/dist/browser/modules/word/security/encryption.js +194 -32
- package/dist/browser/modules/word/types.d.ts +17 -0
- package/dist/browser/modules/word/units.d.ts +10 -4
- package/dist/browser/modules/word/units.js +10 -4
- package/dist/browser/modules/word/writer/document-writer.js +28 -4
- package/dist/browser/modules/word/writer/docx-packager.js +45 -5
- package/dist/browser/modules/word/writer/image-writer.d.ts +1 -1
- package/dist/browser/modules/word/writer/image-writer.js +2 -2
- package/dist/browser/modules/word/writer/render-context.d.ts +15 -0
- package/dist/browser/modules/word/writer/run-writer.js +8 -4
- package/dist/browser/modules/word/writer/section-writer.js +46 -35
- package/dist/browser/modules/word/writer/streaming-writer.js +4 -0
- package/dist/browser/modules/word/writer/styles-writer.js +11 -0
- package/dist/browser/modules/word/writer/table-writer.js +6 -0
- package/dist/cjs/modules/excel/xlsx/xform/comment/comment-xform.js +30 -7
- package/dist/cjs/modules/pdf/excel-bridge.js +67 -0
- package/dist/cjs/modules/pdf/word-bridge.js +49 -34
- package/dist/cjs/modules/word/advanced/diff.js +125 -13
- package/dist/cjs/modules/word/advanced/drawing-shapes.js +3 -0
- package/dist/cjs/modules/word/bridge/excel-bridge.js +21 -1
- package/dist/cjs/modules/word/builder/document-handle.js +14 -2
- package/dist/cjs/modules/word/builder/paragraph-builders.js +10 -1
- package/dist/cjs/modules/word/builder/run-builders.js +2 -6
- package/dist/cjs/modules/word/convert/odt/odt.js +6 -1
- package/dist/cjs/modules/word/layout/layout-full.js +74 -9
- package/dist/cjs/modules/word/query/merge.js +26 -10
- package/dist/cjs/modules/word/query/split.js +68 -2
- package/dist/cjs/modules/word/reader/docx-reader.js +23 -0
- package/dist/cjs/modules/word/security/cfb-reader.js +271 -153
- package/dist/cjs/modules/word/security/document-protection.js +10 -4
- package/dist/cjs/modules/word/security/encryption.js +193 -31
- package/dist/cjs/modules/word/units.js +10 -4
- package/dist/cjs/modules/word/writer/document-writer.js +28 -4
- package/dist/cjs/modules/word/writer/docx-packager.js +45 -5
- package/dist/cjs/modules/word/writer/image-writer.js +2 -2
- package/dist/cjs/modules/word/writer/run-writer.js +8 -4
- package/dist/cjs/modules/word/writer/section-writer.js +46 -35
- package/dist/cjs/modules/word/writer/streaming-writer.js +4 -0
- package/dist/cjs/modules/word/writer/styles-writer.js +11 -0
- package/dist/cjs/modules/word/writer/table-writer.js +6 -0
- package/dist/esm/modules/excel/xlsx/xform/comment/comment-xform.js +30 -7
- package/dist/esm/modules/pdf/excel-bridge.js +67 -1
- package/dist/esm/modules/pdf/word-bridge.js +49 -34
- package/dist/esm/modules/word/advanced/diff.js +125 -13
- package/dist/esm/modules/word/advanced/drawing-shapes.js +3 -0
- package/dist/esm/modules/word/bridge/excel-bridge.js +21 -1
- package/dist/esm/modules/word/builder/document-handle.js +14 -2
- package/dist/esm/modules/word/builder/paragraph-builders.js +10 -1
- package/dist/esm/modules/word/builder/run-builders.js +2 -6
- package/dist/esm/modules/word/convert/odt/odt.js +6 -1
- package/dist/esm/modules/word/layout/layout-full.js +74 -9
- package/dist/esm/modules/word/query/merge.js +26 -10
- package/dist/esm/modules/word/query/split.js +68 -2
- package/dist/esm/modules/word/reader/docx-reader.js +23 -0
- package/dist/esm/modules/word/security/cfb-reader.js +271 -153
- package/dist/esm/modules/word/security/document-protection.js +10 -4
- package/dist/esm/modules/word/security/encryption.js +194 -32
- package/dist/esm/modules/word/units.js +10 -4
- package/dist/esm/modules/word/writer/document-writer.js +28 -4
- package/dist/esm/modules/word/writer/docx-packager.js +45 -5
- package/dist/esm/modules/word/writer/image-writer.js +2 -2
- package/dist/esm/modules/word/writer/run-writer.js +8 -4
- package/dist/esm/modules/word/writer/section-writer.js +46 -35
- package/dist/esm/modules/word/writer/streaming-writer.js +4 -0
- package/dist/esm/modules/word/writer/styles-writer.js +11 -0
- package/dist/esm/modules/word/writer/table-writer.js +6 -0
- package/dist/iife/excelts.iife.js +20 -8
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +2 -2
- package/dist/types/modules/archive/io/random-access.d.ts +1 -1
- package/dist/types/modules/excel/workbook.browser.d.ts +1 -1
- package/dist/types/modules/excel/xlsx/xform/comment/comment-xform.d.ts +3 -0
- package/dist/types/modules/pdf/excel-bridge.d.ts +32 -0
- package/dist/types/modules/pdf/word-bridge.d.ts +20 -15
- package/dist/types/modules/stream/common/consumers.d.ts +2 -1
- package/dist/types/modules/word/builder/document-handle.d.ts +2 -0
- package/dist/types/modules/word/builder/run-builders.d.ts +19 -2
- package/dist/types/modules/word/layout/layout-full.d.ts +12 -0
- package/dist/types/modules/word/layout/layout-model.d.ts +12 -0
- package/dist/types/modules/word/security/cfb-reader.d.ts +14 -3
- package/dist/types/modules/word/types.d.ts +17 -0
- package/dist/types/modules/word/units.d.ts +10 -4
- package/dist/types/modules/word/writer/image-writer.d.ts +1 -1
- package/dist/types/modules/word/writer/render-context.d.ts +15 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @cj-tech-master/excelts v9.6.
|
|
2
|
+
* @cj-tech-master/excelts v9.6.1
|
|
3
3
|
* Zero-dependency TypeScript toolkit — Excel (XLSX), PDF, CSV, Markdown, XML, ZIP/TAR, and streaming.
|
|
4
4
|
* (c) 2026 cjnoname
|
|
5
5
|
* Released under the MIT License
|
|
@@ -401,7 +401,7 @@ self.onmessage = async function(event) {
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
|
-
`}function $_(){if(tv===null){let e=Q_(),t=new Blob([e],{type:`text/javascript`});tv=URL.createObjectURL(t)}return nv++,tv}function ev(){if(tv!==null&&--nv<=0){try{URL.revokeObjectURL(tv)}catch{}tv=null,nv=0}}var tv,nv,rv=t((()=>{tv=null,nv=0}));function iv(e){return e.byteOffset===0&&e.byteLength===e.buffer.byteLength}function av(e){return iv(e)?e:e.slice()}function ov(e){return(!fv||fv.isTerminated())&&(fv=new dv(e)),fv}async function sv(e,t){return(await ov().execute(`inflate`,e,t)).data}var cv,lv,uv,dv,fv,pv=t((()=>{Z_(),rv(),cv=new Uint8Array,lv=8,uv={onData:e=>{},onEnd:()=>{},onError:e=>{}},dv=class{_taskQueueSize(){return this._taskQueue.length-this._taskQueueHead}_compactTaskQueueIfNeeded(){this._taskQueueHead>32&&this._taskQueueHead*2>=this._taskQueue.length&&(this._taskQueue.splice(0,this._taskQueueHead),this._taskQueueHead=0)}_dequeueTask(){if(this._taskQueueHead>=this._taskQueue.length)return;let e=this._taskQueue[this._taskQueueHead++];return this._compactTaskQueueIfNeeded(),e}_compactPendingStreamRequestsIfNeeded(){this._pendingStreamRequestHead>32&&this._pendingStreamRequestHead*2>=this._pendingStreamRequests.length&&(this._pendingStreamRequests.splice(0,this._pendingStreamRequestHead),this._pendingStreamRequestHead=0)}_dequeuePendingStreamRequest(){if(this._pendingStreamRequestHead>=this._pendingStreamRequests.length)return;let e=this._pendingStreamRequests[this._pendingStreamRequestHead++];return this._compactPendingStreamRequestsIfNeeded(),e}_waitForStreamSlot(e){return e.slotWaitPromise||=new Promise(t=>{e.resolveSlotWait=()=>{e.slotWaitPromise=null,e.resolveSlotWait=null,t()}}),e.slotWaitPromise}_waitForStreamDrain(e){return e.drainWaitPromise||=new Promise(t=>{e.resolveDrainWait=()=>{e.drainWaitPromise=null,e.resolveDrainWait=null,t()}}),e.drainWaitPromise}_resolveSlotWaiter(e){e.resolveSlotWait?.()}_resolveDrainWaiter(e){e.resolveDrainWait?.()}constructor(e){this._workers=new Map,this._taskQueue=[],this._taskQueueHead=0,this._pendingTasks=new Map,this._nextTaskId=1,this._nextWorkerId=1,this._terminated=!1,this._completedTasks=0,this._failedTasks=0,this._pendingStreamRequests=[],this._pendingStreamRequestHead=0,this._options=K_(e),this._options.workerUrl?(this._workerUrl=this._options.workerUrl,this._useCustomUrl=!0):(this._workerUrl=$_(),this._useCustomUrl=!1);for(let e=0;e<this._options.minWorkers;e++)this._createWorker()}async execute(e,t,r){if(this._terminated)throw Error(`Worker pool has been terminated`);if(!J_())throw Error(`Web Workers are not supported in this environment`);if(r?.signal?.aborted)throw n();let i=this._nextTaskId++,a=r?.priority??`normal`,o=q_(a);return new Promise((n,s)=>{let c={taskId:i,taskType:e,data:t,level:r?.level,priority:a,priorityValue:o,resolve:n,reject:s,signal:r?.signal,allowTransfer:r?.allowTransfer,startTime:performance.now()};r?.signal&&(c.abortHandler=()=>{this._cancelTask(i)},r.signal.addEventListener(`abort`,c.abortHandler,{once:!0})),this._pendingTasks.set(i,c),this._enqueueTask(c),this._processQueue()})}getStats(){let e=this._workers.size,t=0;for(let e of this._workers.values())e.busy&&t++;return{totalWorkers:e,activeWorkers:t,idleWorkers:e-t,pendingTasks:this._taskQueueSize(),completedTasks:this._completedTasks,failedTasks:this._failedTasks}}terminate(){if(this._terminated)return;this._terminated=!0;for(let e of this._workers.values())this._terminateWorker(e);this._workers.clear();let e=Error(`Worker pool terminated`);for(let t of this._pendingTasks.values())this._cleanupTask(t),t.reject(e);this._pendingTasks.clear(),this._taskQueue.length=0,this._taskQueueHead=0,this._pendingStreamRequests.length=0,this._pendingStreamRequestHead=0,this._useCustomUrl||ev()}isTerminated(){return this._terminated}_createWorker(){if(this._terminated||this._workers.size>=this._options.maxWorkers)return null;let e=this._nextWorkerId++,t=new Worker(this._workerUrl),n={id:e,worker:t,busy:!1,currentTaskId:null,idleTimer:null,streamSession:null};return t.onmessage=e=>{this._handleWorkerMessage(n,e.data)},t.onerror=e=>{this._handleWorkerError(n,e)},this._workers.set(e,n),n}_terminateWorker(e){this._clearIdleTimer(e);try{e.worker.postMessage({type:`terminate`})}catch{}try{e.worker.terminate()}catch{}this._workers.delete(e.id)}_clearIdleTimer(e){e.idleTimer!==null&&(clearTimeout(e.idleTimer),e.idleTimer=null)}_findIdleWorker(){for(let e of this._workers.values())if(!e.busy)return e}_enqueueTask(e){let t=this._taskQueue,n=e.priorityValue;this._compactTaskQueueIfNeeded();let r=this._taskQueueHead,i=t.length;for(;r<i;){let e=r+i>>>1;t[e].priorityValue>=n?r=e+1:i=e}t.splice(r,0,e)}_processQueue(){for(;!this._terminated&&this._taskQueueSize()>0;){let e=this._findIdleWorker()??this._createWorker()??void 0;if(!e)return;for(;;){let t=this._dequeueTask();if(!t)return;if(t.signal?.aborted){this._pendingTasks.delete(t.taskId),this._cleanupTask(t),t.reject(n());continue}this._assignTask(e,t);break}}}_assignTask(e,t){this._clearIdleTimer(e),e.busy=!0,e.currentTaskId=t.taskId;let n=this._options.useTransferables&&t.allowTransfer===!0,r=n?av(t.data):t.data,i={type:`task`,taskId:t.taskId,taskType:t.taskType,data:r,level:t.level};n?e.worker.postMessage(i,[r.buffer]):e.worker.postMessage(i)}_handleWorkerMessage(e,t){if(t.type!==`ready`){if(e.streamSession){let n=e.streamSession;switch(t.type){case`started`:if(t.taskId!==n.taskId)return;n.startReady=!0,n.resolveStart?.(),n.resolveStart=null,n.rejectStart=null;return;case`out`:if(t.taskId!==n.taskId)return;n.onData(t.data);return;case`ack`:if(t.taskId!==n.taskId)return;n.inflightChunkCount>0&&n.inflightChunkCount--,this._resolveSlotWaiter(n),n.inflightChunkCount===0&&n.resolveDrainWait&&this._resolveDrainWaiter(n);return;case`done`:if(t.taskId!==n.taskId)return;n.ended=!0,n.inflightChunkCount=0,n.startReady=!0,n.resolveStart?.(),n.resolveStart=null,n.rejectStart=null,this._resolveSlotWaiter(n),this._resolveDrainWaiter(n),this._completedTasks++,t.duration??performance.now()-n.startTime,n.onEnd(),e.streamSession=null,this._workerBecameIdle(e);return;case`error`:{if(t.taskId!==n.taskId)return;let r=Error(t.error??`Unknown worker error`);n.ended=!0,n.inflightChunkCount=0,n.startReady=!0,n.rejectStart?.(r),n.resolveStart=null,n.rejectStart=null,this._resolveSlotWaiter(n),this._resolveDrainWaiter(n),this._failedTasks++,n.onError(r),e.streamSession=null,this._workerBecameIdle(e);return}default:break}}switch(t.type){case`result`:case`error`:{let n=t.taskId;if(typeof n!=`number`)return;let r=this._pendingTasks.get(n);if(!r){this._workerBecameIdle(e);return}if(this._pendingTasks.delete(n),this._cleanupTask(r),t.type===`result`){this._completedTasks++;let e=t.duration??performance.now()-r.startTime;r.resolve({data:t.data,duration:e})}else this._failedTasks++,r.reject(Error(t.error??`Unknown worker error`));this._workerBecameIdle(e);return}default:return}}}_handleWorkerError(e,t){let n=e.currentTaskId,r=e.streamSession;if(this._terminateWorker(e),n!==null){let e=this._pendingTasks.get(n);e&&(this._pendingTasks.delete(n),this._cleanupTask(e),this._failedTasks++,e.reject(Error(t.message||`Worker error`)))}if(r){let n=Error(t.message||`Worker terminated unexpectedly`);r.ended=!0,r.rejectStart?.(n),r.rejectStart=null,r.resolveStart=null,this._resolveSlotWaiter(r),this._resolveDrainWaiter(r);try{r.onError(n)}catch{}e.streamSession=null}this._processQueue()}_workerBecameIdle(e){if(e.busy=!1,e.currentTaskId=null,this._pendingStreamRequestHead<this._pendingStreamRequests.length){let t=this._dequeuePendingStreamRequest();if(t){t(e);return}}this._taskQueueSize()>0?this._processQueue():this._workers.size>this._options.minWorkers&&this._options.idleTimeout>0&&(e.idleTimer=setTimeout(()=>{!e.busy&&this._workers.size>this._options.minWorkers&&!this._terminated&&this._terminateWorker(e)},this._options.idleTimeout))}openStream(e,t=uv){if(this._terminated)throw Error(`Worker pool has been terminated`);if(!J_())throw Error(`Web Workers are not supported in this environment`);let n=this._nextTaskId++,r=t.allowTransfer===!0,i=this._options.useTransferables&&r,a=i?av:e=>e,o=i?(e,t,n)=>{e.postMessage(t,[n.buffer])}:(e,t,n)=>{e.postMessage(t)},s=null,c=null,l=async()=>{if(s)return s;if(c)return c;c=(async()=>{let r=this._findIdleWorker()??this._createWorker()??void 0;return r?(s=r,this._bindStreamSession(s,n,e,t.level,t),this._startStreamSession(s),s):(s=await new Promise(e=>{this._pendingStreamRequests.push(e)}),this._bindStreamSession(s,n,e,t.level,t),this._startStreamSession(s),s)})();try{return await c}finally{c=null}};l();let u=(e,t,n)=>{let r=a(n),i=t.chunkMessage;i.data=r,o(e.worker,i,r)},d=(e,t,n)=>{if(t.inflightChunkCount>=lv)return this._waitForStreamSlot(t).then(()=>{t.ended||(t.inflightChunkCount++,u(e,t,n))});t.inflightChunkCount++,u(e,t,n)};return{write:async e=>{if(e.byteLength===0)return;let t=s??await l(),n=t.streamSession;if(!n||n.ended)throw Error(`Streaming session is not active`);n.writeChain=n.writeChain.then(()=>{if(!n.ended)return n.startReady?d(t,n,e):n.startPromise.then(()=>{if(!n.ended)return d(t,n,e)})}),await n.writeChain},end:async()=>{let e=await l(),t=e.streamSession;!t||t.ended||(t.startReady||await t.startPromise,await t.writeChain,t.inflightChunkCount>0&&await this._waitForStreamDrain(t),t.ended=!0,e.worker.postMessage(t.endMessage))},abort:e=>{l().then(t=>{let n=t.streamSession;if(!n)return;let r=n.abortMessage;r.error=e,t.worker.postMessage(r)})}}}_bindStreamSession(e,t,n,r,i){this._clearIdleTimer(e),e.busy=!0,e.currentTaskId=t;let a=null,o=null,s=new Promise((e,t)=>{a=e,o=t}),c=setTimeout(()=>{o?.(Error(`Worker stream start timeout`))},5e3);s.finally(()=>clearTimeout(c)),e.streamSession={taskId:t,taskType:n,startTime:performance.now(),started:!1,startReady:!1,startPromise:s,resolveStart:a,rejectStart:o,level:r,writeChain:Promise.resolve(),inflightChunkCount:0,slotWaitPromise:null,resolveSlotWait:null,drainWaitPromise:null,resolveDrainWait:null,chunkMessage:{type:`chunk`,taskId:t,data:cv},startMessage:{type:`start`,taskId:t,taskType:n,level:r},endMessage:{type:`end`,taskId:t},abortMessage:{type:`abort`,taskId:t,error:void 0},ended:!1,onData:i.onData,onEnd:i.onEnd,onError:i.onError}}_startStreamSession(e){let t=e.streamSession;!t||t.started||(t.started=!0,e.worker.postMessage(t.startMessage))}_cancelTask(e){let t=this._pendingTasks.get(e);if(!t)return;this._pendingTasks.delete(e),this._cleanupTask(t);let r=-1;for(let t=this._taskQueueHead;t<this._taskQueue.length;t++)if(this._taskQueue[t].taskId===e){r=t;break}r>=0&&this._taskQueue.splice(r,1),t.reject(n())}_cleanupTask(e){e.abortHandler&&e.signal&&e.signal.removeEventListener(`abort`,e.abortHandler)}async executeBatch(e){let t=Array(e.length);for(let n=0;n<e.length;n++){let r=e[n];t[n]=this.execute(r.taskType,r.data,r.options)}return Promise.all(t)}},fv=null})),mv=t((()=>{pv()})),hv=t((()=>{}));function gv(e,t){let n=J_();if(t.useWorker===!0)return n;if(t.useWorker===!1)return!1;let r=t.autoWorkerThreshold??1048576;return n&&e.length>=r}function _v(e,t){if(t?.aborted||r(e))throw n(t?.reason??e)}async function vv(e,t,n){let r=e.hasNative(),i=J_(),a=n.useWorker;if(a===!0&&i)try{return await e.worker(t,{level:n.level,signal:n.signal,allowTransfer:n.allowTransfer})}catch(e){_v(e,n.signal)}return r?e.native(t):a!==!0&&gv(t,n)?e.worker(t,{level:n.level,signal:n.signal,allowTransfer:n.allowTransfer}):e.jsFallback(t,n.level)}async function yv(e,t={}){return vv(Cv,e,t)}function bv(e){return vo(e)}function xv(e,t,n){return Zn([co(n),e,lo(oo(t))])}function Sv(e,t={}){let n=t.level??6;return xv(n===0?yo(e):So(e,n),e,n)}var Cv,wv=t((()=>{go(),qo(),mv(),hv(),es(),lr(),Cv={hasNative:to,native:ao,worker:sv,jsFallback:vo},new Uint8Array([31,139,8,0,0,0,0,0,0,255])})),Tv=t((()=>{es()}));function Ev(e,t,n){let r=i(t);n?n(r):e.emit(`error`,r)}function Dv(e,t){let n=t?new CompressionStream(e):new DecompressionStream(e),r=n.writable.getWriter(),a=n.readable.getReader(),o=new Nv,s=null,c=(async()=>{try{for(;;){let{value:e,done:t}=await a.read();if(t)break;e&&o.emit(`data`,e)}o.emit(`end`)}catch(e){let t=i(e);s=t,o.emit(`error`,t)}})();return o.setBackend({write:e=>r.write(e),close:async()=>{if(await r.close(),await c,s)throw i(s)},abort:e=>{a.cancel(e).catch(()=>{}),r.abort(e).catch(()=>{})}}),o}function Ov(e,t,n,r){let i=t??ov(),a=null,o=null,s=new Promise((e,t)=>{a=e,o=t}),c=new Nv,l=i.openStream(e,{level:n,allowTransfer:r,onData:e=>c.emit(`data`,e),onEnd:()=>{c.emit(`end`),a?.()},onError:e=>{c.emit(`error`,e),o?.(e)}});return c.setBackend({write:e=>l.write(e),close:async()=>{await l.end(),await s},abort:e=>{a?.(),l.abort(e?.message)}}),c}function kv(e,t){let n=e===`deflate`?t.level??6:void 0;return t.useWorker&&J_()?Ov(e,t.workerPool,n,t.allowTransfer):(e===`deflate`?eo():no())?Dv(`deflate-raw`,e===`deflate`):new Pv(e===`deflate`?e=>So(e,n):vo)}function Av(e={}){return kv(`deflate`,e)}function jv(){return eo()}var Mv,Nv,Pv,Fv=t((()=>{go(),wv(),qo(),mv(),hv(),lr(),Sr(),Tv(),Ya(),Mv=`write after end`,Nv=class e extends xr{constructor(...e){super(...e),this.ended=!1,this.destroyed=!1,this.writeChain=Promise.resolve(),this._backend=null,this._pendingWrites=0,this._needsDrain=!1}static{this.HIGH_WATER_MARK=16}setBackend(e){this._backend=e}write(t,n){if(this.ended)return Ev(this,Error(Mv),n),!1;if(t.byteLength===0)return n&&queueMicrotask(n),!0;let r=this._backend;if(!r)throw Error(`Backend not initialized`);this._pendingWrites++;let i=this.writeChain.then(()=>r.write(t));return this.writeChain=i,i.then(()=>{this.destroyed||n?.()}).catch(e=>{this.destroyed||Ev(this,e,n)}).finally(()=>{this._pendingWrites--,this._needsDrain&&this._pendingWrites<e.HIGH_WATER_MARK&&!this.destroyed&&(this._needsDrain=!1,this.emit(`drain`))}),this._pendingWrites>=e.HIGH_WATER_MARK?(this._needsDrain=!0,!1):!0}end(e){if(this.ended){e?.();return}this.ended=!0;let t=this._backend;if(!t)throw Error(`Backend not initialized`);this.writeChain.then(()=>t.close()).then(()=>e?.()).catch(t=>Ev(this,t,e))}destroy(e){this.ended=!0,this.destroyed=!0,this._backend?.abort(e),e&&this.emit(`error`,e)}},Pv=class extends xr{constructor(e){super(),this.process=e,this.chunks=[],this.ended=!1}write(e,t){return this.ended?(Ev(this,Error(Mv),t),!1):e.byteLength===0?(t&&queueMicrotask(t),!0):(this.chunks.push(e),t&&queueMicrotask(t),!0)}end(e){if(this.ended){e?.();return}this.ended=!0;let t=this.chunks.length,n=t===0?Ja:t===1?this.chunks[0]:Zn(this.chunks);this.chunks.length=0;try{let t=this.process(n);this.emit(`data`,t),this.emit(`end`),e?.()}catch(t){Ev(this,t,e)}}destroy(e){this.ended=!0,this.chunks.length=0,e&&this.emit(`error`,e)}}}));function Iv(e){let t={key0:305419896,key1:591751049,key2:878082192},n=typeof e==`string`?Yn(e):e;for(let e=0;e<n.length;e++)Lv(t,n[e]);return t}function Lv(e,t){e.key0=as(e.key0,t),e.key1=e.key1+(e.key0&255)>>>0,e.key1=(Math.imul(e.key1,134775813)>>>0)+1>>>0,e.key2=as(e.key2,e.key1>>>24&255)}function Rv(e){let t=(e.key2|2)>>>0;return Math.imul(t,t^1)>>>8&255}function zv(e,t){let n=(t^Rv(e))&255;return Lv(e,n),n}function Bv(e,t){let n=(t^Rv(e))&255;return Lv(e,t),n}function Vv(e,t,n,r){if(t.length!==12)return!1;let i=new Uint8Array(12);for(let n=0;n<12;n++)i[n]=zv(e,t[n]);let a=i[11];return a===(n>>>24&255)||r!==void 0&&a===(r>>>8&255)}function Hv(e,t,n){let r=new Uint8Array(12),i=n(11);for(let t=0;t<11;t++)r[t]=Bv(e,i[t]);return r[11]=Bv(e,t>>>24&255),r}function Uv(e,t,n,r){if(e.length<12)return null;let i=Iv(t);if(!Vv(i,e.subarray(0,12),n,r))return null;let a=e.length-12,o=new Uint8Array(a);for(let t=0;t<a;t++)o[t]=zv(i,e[12+t]);return o}var Wv=t((()=>{ss(),lr()}));function Gv(e){return e in qv}function Kv(e){return qv[e]}var qv,Jv=t((()=>{qv={"aes-128":128,"aes-192":192,"aes-256":256}})),Yv=t((()=>{Wv(),Sc(),ic(),Jv()}));function Xv(e){return e.replace(/\\/g,`/`)}function Zv(e){return e.replace(/^\/+/,``)}function Qv(e){return e.replace(/^[a-zA-Z]:\/?/,``)}function $v(e){let t=e.split(`/`),n=[];for(let e of t)if(!(!e||e===`.`)){if(e===`..`){n.length>0?n.pop():n.push(`..`);continue}n.push(e)}return n.join(`/`)}function ey(e){return e.startsWith(`/`)}function ty(e){return/^[a-zA-Z]:/.test(e)}function ny(e,t={}){let n=t.mode??`legacy`,r=e;r=Xv(r);let i=ty(r);if(n===`legacy`)return r=Zv(r),t.prependSlash?`/`+r:r;let a=t.stripDrive??!0;if(n===`safe`&&i&&!a)throw Error(`Unsafe ZIP path (drive): ${e}`);a&&(r=Qv(r));let o=ey(r);if(r=Zv(r),r=$v(r),n===`safe`){if(o)throw Error(`Unsafe ZIP path (absolute): ${e}`);if(r===`..`||r.startsWith(`../`))throw Error(`Unsafe ZIP path (traversal): ${e}`)}return t.prependSlash?`/`+r:r}var ry=t((()=>{}));function iy(e){return Math.log(e)/Math.LN2}function ay(e,t){let n=0;for(let r=0;r<256;r++){let i=e[r];if(i===0)continue;let a=i/t;n-=a*iy(a)}return n}function oy(e,t){let n=new Uint32Array(256),r=0,i=0;if(Array.isArray(e))for(let a=0;a<e.length&&!(r>=t);a++){let o=e[a],s=Math.min(o.length,t-r);for(let e=0;e<s;e++){let t=o[e];n[t]===0&&(i+=1),n[t]+=1}r+=s}else for(let a of e){if(r>=t)break;let e=Math.min(a.length,t-r);for(let t=0;t<e;t++){let e=a[t];n[e]===0&&(i+=1),n[e]+=1}r+=e}return{total:r,unique:i,counts:n}}function sy(e,t={}){let n=t.sampleBytes??cy,r=t.minDecisionBytes??ly,{total:i,unique:a,counts:o}=oy(e,n);return i<r||a<200?!1:ay(o,i)>=7.95}var cy,ly,uy=t((()=>{cy=64*1024,ly=16*1024}));function dy(e,t=20){return(e&255)<<8|t&255}function fy(e){switch(e){case`directory`:return rl;case`symlink`:return nl;default:return il}}function py(e){return e>>>0&65535}function my(e,t){let n=e.endsWith(`/`)||e.endsWith(`\\`);return t!==void 0&&Fc(t)?`symlink`:n?`directory`:`file`}function hy(e){let t=e.kind,n=t===`directory`?16:32,r=(e.msDosAttributes??n)&255,i=e.mode;i!==void 0&&(i&61440||(i=i&4095|fy(t)),i=py(i));let a=((i??0)&65535)<<16|r,o=dy(i!==void 0||t===`symlink`?3:0);return{externalAttributes:a>>>0,versionMadeBy:o}}function gy(e){if(e.externalAttributes!==void 0)return{externalAttributes:e.externalAttributes,versionMadeBy:e.versionMadeBy};let t=hy({kind:my(e.name,e.mode),mode:e.mode,msDosAttributes:e.msDosAttributes});return{externalAttributes:t.externalAttributes,versionMadeBy:e.versionMadeBy??t.versionMadeBy}}var _y=t((()=>{sl()}));function vy(e){return e?8:0}function yy(e,t=!0){let n=0;return t&&(n|=el),e&&(n|=8),n}function by(e){let t=ds(e.codec),n=t.encode(e.name),r=fs(e.comment,t),{dosTime:i,dosDate:a}=Bs(e.modTime),o=e.atime||e.ctime||e.birthTime?{atime:e.atime,ctime:e.ctime,birthTime:e.birthTime}:void 0,s=zs(e.modTime,e.timestamps,o);return!t.useUtf8Flag&&t.useUnicodeExtraFields&&(e.name&&(s=Gc(s,wc(n,e.name))),e.comment&&(s=Gc(s,Tc(r,e.comment)))),{nameBytes:n,commentBytes:r,dosTime:i,dosDate:a,extraField:s,compressionMethod:vy(e.deflate),flags:yy(e.useDataDescriptor,t.useUtf8Flag)}}var xy=t((()=>{ws(),Hs(),Nc(),sl()}));function Sy(e,t,n,r,i){if(!i)return 0;let a=0;return(e||t>4294967295)&&(a+=8),(e||n>4294967295)&&(a+=8),(e||r>4294967295)&&(a+=8),a>0?4+a:0}function Cy(e){let t=e[0];return t?.fileName===void 0?t?.compressedData===void 0?`central`:`processed`:`input`}function wy(e,t){let n=t.zip64Mode===!0,r=t.zip64Mode===!1,i=Cy(e),a=0;for(let t=0;t<e.length;t++){let r=e[t],o=i===`input`?r.fileName:r.name,s=r.extraField,c=r.comment,l=i===`processed`?r.compressedData.length:r.compressedSize,u=r.uncompressedSize,d=i===`input`?r.localHeaderOffset:r.offset,f=i===`processed`?void 0:r.zip64,p=n||f===!0||d>4294967295||l>4294967295||u>4294967295;a+=46+o.length+s.length+Sy(n,u,l,d,p)+(c?.length??0)}let o=e.length>65535||t.centralDirOffset>4294967295,s=n||o||a>4294967295;if(r&&s)throw Error(`ZIP64 is required but zip64=false`);let c=s?98+t.zipComment.length:22+t.zipComment.length;return{centralDirSize:a,trailerSize:c,totalSize:a+c,usedZip64:s}}function Ty(e,t){let n=t.zip64Mode===!0,r=wy(e,{zipComment:t.zipComment,zip64Mode:t.zip64Mode,centralDirOffset:t.centralDirOffset}),i=Cy(e),a=t.offset,o=new DataView(t.out.buffer,t.out.byteOffset,t.out.byteLength);for(let r=0;r<e.length;r++){let s=e[r],c=i===`input`?s.fileName:s.name,l=s.extraField,u=s.comment,d=s.flags,f=i===`input`?s.crc32:s.crc,p=i===`processed`?s.compressedData.length:s.compressedSize,m=s.uncompressedSize,h=s.compressionMethod,g=i===`processed`?s.modTime:s.dosTime,_=i===`processed`?s.modDate:s.dosDate,v=i===`input`?s.localHeaderOffset:s.offset,y=i===`processed`?void 0:s.zip64,b=s.externalAttributes,x=s.versionMadeBy,S=n||y===!0||v>4294967295||p>4294967295||m>4294967295,ee=S?Wc({uncompressedSize:n||m>4294967295?m:void 0,compressedSize:n||p>4294967295?p:void 0,localHeaderOffset:n||v>4294967295?v:void 0}):Ja,te=S&&ee.length>0?Gc(l,ee):l;a+=zc(t.out,o,a,{fileName:c,extraField:te,comment:u??Ja,flags:d,compressionMethod:h,dosTime:g,dosDate:_,crc32:f,compressedSize:S?ol:p,uncompressedSize:S?ol:m,localHeaderOffset:S?ol:v,versionMadeBy:x??20,versionNeeded:S?45:20,externalAttributes:b})}if(r.usedZip64){let n=t.centralDirOffset+r.centralDirSize;a+=Kc(t.out,o,a,{entryCountOnDisk:e.length,entryCountTotal:e.length,centralDirSize:r.centralDirSize,centralDirOffset:t.centralDirOffset}),a+=qc(t.out,o,a,{zip64EndOfCentralDirectoryOffset:n,totalDisks:1}),Bc(t.out,o,a,{entryCount:al,centralDirSize:ol,centralDirOffset:ol,comment:t.zipComment})}else Bc(t.out,o,a,{entryCount:e.length,centralDirSize:r.centralDirSize,centralDirOffset:t.centralDirOffset,comment:t.zipComment});return{centralDirSize:r.centralDirSize,trailerSize:r.trailerSize,totalWritten:r.totalSize,usedZip64:r.usedZip64}}var Ey=t((()=>{Ya(),sl()})),Dy,Oy,ky,Ay,jy=t((()=>{cs(),Fv(),Yv(),Ya(),hv(),es(),ws(),ry(),sl(),uy(),_y(),xy(),Ey(),Dy=16*1024,Oy=65536,ky=class{constructor(e,t){this._deflate=null,this._crc=4294967295,this._uncompressedSize=0,this._compressedSize=0,this._finalized=!1,this._headerEmitted=!1,this._ondata=null,this._onerror=null,this._centralDirEntryInfo=null,this._pendingEnd=!1,this._emittedDataDescriptor=!1,this._localHeader=null,this._zip64Mode=`auto`,this._zip64=!1,this._deflateWanted=null,this._pendingChunks=[],this._sampleLen=0,this._completeResolve=null,this._completeReject=null,this._completePromise=null,this._completeError=null,this._encryptionMethod=`none`,this._zipCryptoState=null,this._aesBuffer=[],this._aesBufferSize=0,this._originalCompressionMethod=0,this._aesExtraField=null,this._dataQueue=[],this._finalQueued=!1,this._pushChain=Promise.resolve(),this._inputBuf=null,this._inputPos=0,this._syncDeflater=null,this._syncZlibReady=!1;let n=t?.path?ny(e,t.path):e;this.name=n;let r=t?.modTime??new Date;if(this._modTime=r,this.level=t?.level??6,this._smartStore=t?.smartStore??!0,this._zip64Mode=t?.zip64??`auto`,this._zip64=this._zip64Mode===!0,this._encryptionMethod=t?.encryptionMethod??`none`,this._password=t?.password,this._encryptionMethod!==`none`&&!this._password)throw Error(`Password is required for encryption`);Gv(this._encryptionMethod)&&(this._aesKeyStrength=Kv(this._encryptionMethod)),this._stringCodec=ds(t?.encoding);let i=by({name:n,comment:t?.comment,modTime:r,atime:t?.atime,ctime:t?.ctime,birthTime:t?.birthTime,timestamps:t?.timestamps??`dos`,useDataDescriptor:!0,deflate:!1,codec:this._stringCodec});this.nameBytes=i.nameBytes,this.commentBytes=i.commentBytes,this.dosTime=i.dosTime,this.dosDate=i.dosDate,this.extraField=i.extraField,this._flags=i.flags,this._compressionMethod=i.compressionMethod;let a=gy({name:n,mode:t?.mode,msDosAttributes:t?.msDosAttributes,externalAttributes:t?.externalAttributes,versionMadeBy:t?.versionMadeBy});if(this._externalAttributes=a.externalAttributes,this._versionMadeBy=a.versionMadeBy,this._encryptionMethod!==`none`&&(this._flags|=1),!this._smartStore){let e=this.level>0;this._deflateWanted=e,this._compressionMethod=this._buildCompressionMethod(e),e&&this._initDeflateStream();return}this.level===0&&(this._deflateWanted=!1,this._compressionMethod=this._buildCompressionMethod(!1))}_buildCompressionMethod(e){return vy(e)}_getAesExtraField(){return this._aesKeyStrength?(this._aesExtraField||=uc(2,this._aesKeyStrength,this._originalCompressionMethod),this._aesExtraField):Ja}_initZipCryptoEncryption(){if(this._zipCryptoState||this._encryptionMethod!==`zipcrypto`)return;this._zipCryptoState=Iv(this._password);let e=this.dosTime<<16|this.dosDate,t=Hv(this._zipCryptoState,e,Zs);this._compressedSize+=t.length,this._enqueueData(t,!1)}_zipCryptoEncryptChunk(e){if(!this._zipCryptoState)return e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Bv(this._zipCryptoState,e[n]);return t}_initDeflateStream(){this._deflate||(this._deflate=Av({level:this.level}),this._deflate.on(`error`,e=>{this._rejectComplete(e)}),this._deflate.on(`data`,e=>{if(this._aesKeyStrength){this._aesBuffer.push(e),this._aesBufferSize+=e.length;return}if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);this._compressedSize+=t.length,this._enqueueData(t,!1);return}this._compressedSize+=e.length,this._enqueueData(e,!1)}),this._deflate.on(`end`,()=>{this._pendingEnd&&!this._emittedDataDescriptor&&(this._emittedDataDescriptor=!0,this._finalizeEncryptionAndEmitDescriptor())}))}_finalizeEncryptionAndEmitDescriptor(){if(this._aesKeyStrength&&this._aesBuffer.length>0){this._finalizeAesEncryption().then(()=>this._emitDataDescriptor()).catch(e=>this._rejectComplete(e));return}this._emitDataDescriptor()}async _finalizeAesEncryption(){if(!this._aesKeyStrength||this._aesBufferSize===0)return;let e;if(this._aesBuffer.length===1)e=this._aesBuffer[0];else{e=new Uint8Array(this._aesBufferSize);let t=0;for(let n=0;n<this._aesBuffer.length;n++){let r=this._aesBuffer[n];e.set(r,t),t+=r.length}}this._aesBuffer.length=0,this._aesBufferSize=0;let t=await hc(e,this._password,this._aesKeyStrength);this._compressedSize=t.length,this._enqueueData(t,!1)}_buildLocalHeader(){let e=this.extraField,t=this._compressionMethod;return this._aesKeyStrength&&(this._originalCompressionMethod=this._compressionMethod,t=99,e=Gc(this.extraField,this._getAesExtraField())),Rc({fileName:this.nameBytes,extraField:e,flags:this._flags,compressionMethod:t,dosTime:this.dosTime,dosDate:this.dosDate,crc32:0,compressedSize:0,uncompressedSize:0,versionNeeded:this._zip64?45:20})}_accumulateSampleLen(e){if(this._deflateWanted!==null||e.length===0||this._sampleLen>=Dy)return;let t=Math.min(Dy-this._sampleLen,e.length);t<=0||(this._sampleLen+=t)}_shouldDecide(e){return this._deflateWanted===null?e||this._sampleLen>=Dy:!1}_decideCompressionIfNeeded(e,t,n=!1){if(this._deflateWanted!==null)return;if(e&&this._sampleLen===0){this._deflateWanted=!1,this._sampleLen=0,this._compressionMethod=this._buildCompressionMethod(!1),this._localHeader=null;return}let r=sy((function*(e,t){for(let t of e)t.length&&(yield t);t.length&&(yield t)})(this._pendingChunks,t),{sampleBytes:Dy,minDecisionBytes:Dy});this._deflateWanted=!r,this._sampleLen=0,this._compressionMethod=this._buildCompressionMethod(this._deflateWanted),this._localHeader=null,this._deflateWanted&&(n||this._initDeflateStream())}_emitHeaderIfNeeded(){this._headerEmitted||=(this._emitHeader(),!0)}async _flushPendingChunks(){if(this._pendingChunks.length!==0){for(let e of this._pendingChunks)await this._writeData(e);this._pendingChunks.length=0}}_enqueueData(e,t){this._ondata?this._ondata(e,t):(this._dataQueue.push(e),t&&(this._finalQueued=!0))}_flushQueue(){if(!this._ondata)return;let e=this._dataQueue.length,t=this._finalQueued?e-1:-1;for(let n=0;n<e;n++)this._ondata(this._dataQueue[n],n===t);this._dataQueue.length=0,this._finalQueued=!1}get ondata(){return this._ondata}set ondata(e){this._ondata=e,this._flushQueue()}get onerror(){return this._onerror}set onerror(e){this._onerror=e,this._completeError&&e(this._completeError)}_resolveComplete(){this._completeResolve&&this._completeResolve()}_rejectComplete(e){this._completeError||(this._completeError=e,this._onerror&&this._onerror(e),this._completeReject&&this._completeReject(e))}_ensureCompletePromise(){return this._completeError?Promise.reject(this._completeError):this._emittedDataDescriptor?Promise.resolve():(this._completePromise||=new Promise((e,t)=>{this._completeResolve=e,this._completeReject=t}),this._completePromise)}_tapCallback(e,t){t&&e.then(()=>t()).catch(e=>t(e))}_writeDataSync(e,t){if(!(e.length===0&&!t)){if(e.length>0&&(this._crc=ns(this._crc,e),this._uncompressedSize+=e.length),this._deflateWanted){if(this._syncDeflater||=new Ko(this.level),e.length>0){let t=this._syncDeflater.write(e);t.length>0&&(this._compressedSize+=t.length,this._enqueueData(t,!1))}if(t){let e=this._syncDeflater.finish();e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1)),this._syncDeflater=null}return}if(this._aesKeyStrength){this._aesBuffer.push(e),this._aesBufferSize+=e.length;return}if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);this._compressedSize+=t.length,this._enqueueData(t,!1);return}e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1))}}_writeData(e){if(e.length===0)return Promise.resolve();if(this._crc=ns(this._crc,e),this._uncompressedSize+=e.length,this._deflate)return new Promise((t,n)=>{this._deflate.write(e,e=>{e?n(e):t()})});if(this._aesKeyStrength)return this._aesBuffer.push(e),this._aesBufferSize+=e.length,Promise.resolve();if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);return this._compressedSize+=t.length,this._enqueueData(t,!1),Promise.resolve()}return this._compressedSize+=e.length,this._enqueueData(e,!1),Promise.resolve()}_endDeflateAndWait(){return new Promise((e,t)=>{let n=this._deflate,r=e=>{a(),t(e)},i=()=>{a(),e()},a=()=>{n.off(`error`,r),n.off(`end`,i)};n.once(`error`,r),n.once(`end`,i),n.end()})}_finalizeAfterWrite(e){this._finalized=!0,this._pendingEnd=!0;let t=this._ensureCompletePromise();return this._deflate?e.then(()=>this._endDeflateAndWait()).then(()=>t):this._aesKeyStrength&&this._aesBufferSize>0?(this._emittedDataDescriptor=!0,this._finalizeAesEncryption().then(()=>this._emitDataDescriptor()).catch(e=>this._rejectComplete(e)),t):(this._emittedDataDescriptor=!0,this._emitDataDescriptor(),t)}_pushUnchained(e,t,n){if(this._finalized){let e=Promise.reject(Error(`Cannot push to finalized ZipDeflateFile`));return this._tapCallback(e,n),e}if(this._completeError){let e=Promise.reject(this._completeError);return this._tapCallback(e,n),e}if(this._deflateWanted===null){if(this._accumulateSampleLen(e),!this._shouldDecide(t)){e.length>0&&this._pendingChunks.push(e);let t=Promise.resolve();return this._tapCallback(t,n),t}this._decideCompressionIfNeeded(t,e),this._emitHeaderIfNeeded();let r=this._pendingChunks.length>0,i=this._flushPendingChunks(),a=i;e.length>0&&(a=r?i.then(()=>this._writeData(e)):this._writeData(e));let o=t?this._finalizeAfterWrite(a):a;return this._tapCallback(o,n),o}this._emitHeaderIfNeeded();let r=this._writeData(e),i=t?this._finalizeAfterWrite(r):r;return this._tapCallback(i,n),i}push(e,t=!1,n){if(!this._deflate&&this._encryptionMethod===`none`&&!jv()){try{this._pushSyncPath(e,t),n?.()}catch(e){return n?.(e instanceof Error?e:Error(String(e))),Promise.reject(e)}return Promise.resolve()}if(!t&&e.length>0&&e.length<Oy){if(this._inputBuf||(this._inputBuf=new Uint8Array(Oy),this._inputPos=0),this._inputPos+e.length<=Oy)return this._inputBuf.set(e,this._inputPos),this._inputPos+=e.length,n?.(),Promise.resolve();let t=new Uint8Array(this._inputPos+e.length);return t.set(this._inputBuf.subarray(0,this._inputPos)),t.set(e,this._inputPos),this._inputPos=0,this._pushAsync(t,!1,n)}if(this._inputPos>0){let r=this._inputBuf.slice(0,this._inputPos);this._inputPos=0;let i=this._pushAsync(r,!1),a=this._pushChain=i.then(()=>this._pushUnchained(e,t,n),()=>this._pushUnchained(e,t,n));return a.catch(()=>{}),a}return this._pushAsync(e,t,n)}_pushAsync(e,t,n){let r=this._pushChain=this._pushChain.then(()=>this._pushUnchained(e,t,n),()=>this._pushUnchained(e,t,n));return r.catch(()=>{}),r}_pushSyncPath(e,t=!1){if(this._finalized)throw Error(`Cannot push to finalized ZipDeflateFile`);if(this._syncZlibReady||=!0,this._deflateWanted===null){if(this._accumulateSampleLen(e),!this._shouldDecide(t)){e.length>0&&this._pendingChunks.push(e);return}this._decideCompressionIfNeeded(t,e,!0),this._emitHeaderIfNeeded();for(let e of this._pendingChunks)this._writeDataSync(e,!1);this._pendingChunks.length=0,e.length>0&&this._writeDataSync(e,t),t&&this._finalizeSyncAfterWrite();return}this._emitHeaderIfNeeded(),this._writeDataSync(e,t),t&&this._finalizeSyncAfterWrite()}_finalizeSyncAfterWrite(){if(this._finalized=!0,this._pendingEnd=!1,this._emittedDataDescriptor=!0,this._aesKeyStrength&&this._aesBufferSize>0)throw Error(`AES encryption is not supported with synchronous push`);if(this._syncDeflater){let e=this._syncDeflater.finish();e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1)),this._syncDeflater=null}if(this._emitDataDescriptor(),this._completeError)throw this._completeError}_emitHeader(){this._localHeader||=this._buildLocalHeader(),this._enqueueData(this._localHeader,!1)}_emitDataDescriptor(){let e=rs(this._crc),t=this._compressedSize>4294967295||this._uncompressedSize>4294967295;if(this._zip64Mode===!1&&t){this._rejectComplete(Error(`ZIP64 is required but zip64=false`));return}(this._zip64Mode===!0||t&&!this._zip64)&&(this._zip64=!0);let n=this._zip64?Uc(e,this._compressedSize,this._uncompressedSize):Vc(e,this._compressedSize,this._uncompressedSize),r=this._compressionMethod,i=this.extraField;this._aesKeyStrength&&(r=99,i=Gc(this.extraField,this._getAesExtraField())),this._centralDirEntryInfo={name:this.nameBytes,extraField:i,comment:this.commentBytes,flags:this._flags,crc:e,compressedSize:this._compressedSize,uncompressedSize:this._uncompressedSize,compressionMethod:r,dosTime:this.dosTime,dosDate:this.dosDate,offset:-1,zip64:this._zip64,externalAttributes:this._externalAttributes,versionMadeBy:this._versionMadeBy},this._enqueueData(n,!0),this._resolveComplete()}complete(){return this._ensureCompletePromise()}getEntryInfo(){if(!this._centralDirEntryInfo)return null;let e=this.name,t=e.endsWith(`/`)||e.endsWith(`\\`),n=this._centralDirEntryInfo.externalAttributes,r=Pc(n);return{path:e,type:Fc(r)?`symlink`:t?`directory`:`file`,compressedSize:this._centralDirEntryInfo.compressedSize,uncompressedSize:this._centralDirEntryInfo.uncompressedSize,compressionMethod:this._centralDirEntryInfo.compressionMethod,crc32:this._centralDirEntryInfo.crc,lastModified:this._modTime,localHeaderOffset:this._centralDirEntryInfo.offset,comment:this._stringCodec.decode(this._centralDirEntryInfo.comment),externalAttributes:n,mode:r,versionMadeBy:this._centralDirEntryInfo.versionMadeBy,extraField:this._centralDirEntryInfo.extraField,isEncrypted:this._encryptionMethod!==`none`,encryptionMethod:this._aesKeyStrength?`aes`:this._encryptionMethod===`zipcrypto`?`zipcrypto`:void 0,aesKeyStrength:this._aesKeyStrength,originalCompressionMethod:this._aesKeyStrength?this._originalCompressionMethod:void 0}}getCentralDirectoryEntryInfo(){return this._centralDirEntryInfo}isComplete(){return this._emittedDataDescriptor&&this._centralDirEntryInfo!==null}abort(e){if(this._completeError)return;let t=n(e);this._finalized=!0,this._pendingEnd=!0,this._rejectComplete(t);try{let e=this._deflate;e&&typeof e.destroy==`function`&&e.destroy(t)}catch{}}},Ay=class{constructor(e,t){this.entries=[],this.currentOffset=0,this.ended=!1,this.endPending=!1,this.addedEntryCount=0,this.fileQueue=[],this.fileQueueIndex=0,this.activeFile=null,this.callback=e,this._stringCodec=t?.codec??ds(t?.encoding),this.zipComment=fs(t?.comment,this._stringCodec),this.zip64Mode=t?.zip64??`auto`}add(e){if(this.ended)throw Error(`Cannot add files after calling end() `);if(this.zip64Mode===!1&&this.addedEntryCount>=65535)throw Error(`ZIP64 is required but zip64=false`);this.addedEntryCount++,this.fileQueue.push(e),this.activeFile||this._processNextFile()}_processNextFile(){if(this.fileQueueIndex>=this.fileQueue.length){this.activeFile=null,this.fileQueue=[],this.fileQueueIndex=0,this.endPending&&this._finalize();return}let e=this.fileQueue[this.fileQueueIndex++];this.activeFile=e;let t=this.currentOffset;if(e.onerror=e=>{this.ended||(this.ended=!0,this.callback(e,Ja,!0))},e.ondata=(n,r)=>{if(!this.ended&&(this.currentOffset+=n.length,this.callback(null,n,!1),r)){let n=e.getCentralDirectoryEntryInfo();n&&(n.offset=t,this.entries.push(n)),this._processNextFile()}},typeof e.start==`function`)try{e.start().catch(t=>{let n=i(t);try{e.onerror?.(n)}catch{}})}catch(t){let n=i(t);try{e.onerror?.(n)}catch{}}}_finalize(){if(this.ended)return;this.ended=!0;let e=this.currentOffset,t;try{let n=wy(this.entries,{zipComment:this.zipComment,zip64Mode:this.zip64Mode,centralDirOffset:e});t=new Uint8Array(n.totalSize),Ty(this.entries,{zipComment:this.zipComment,zip64Mode:this.zip64Mode,centralDirOffset:e,out:t,offset:0})}catch(e){let t=i(e);this.callback(t,Ja,!0);return}this.callback(null,t,!0)}end(){this.endPending||this.ended||(this.endPending=!0,this.activeFile||this._finalize())}abort(e){if(this.ended)return;let t=n(e);this.ended=!0,this.endPending=!0;try{this.activeFile?.abort(t)}catch{}this.callback(t,Ja,!0)}}}));function My(e){return typeof e==`object`&&`nativeCol`in e&&`nativeRow`in e&&`nativeColOff`in e&&`nativeRowOff`in e}function Ny(e){return typeof e==`object`&&`col`in e&&`row`in e}var Py,Fy=t((()=>{da(),Py=class e{constructor(e,t,n=0){if(this.worksheet=e,!t)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof t==`string`){let e=E.decodeAddress(t);this.nativeCol=e.col+n,this.nativeColOff=0,this.nativeRow=e.row+n,this.nativeRowOff=0}else My(t)?(this.nativeCol=t.nativeCol??0,this.nativeColOff=t.nativeColOff??0,this.nativeRow=t.nativeRow??0,this.nativeRowOff=t.nativeRowOff??0):Ny(t)?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0)}static asInstance(t){return t==null?null:t instanceof e?t:new e(void 0,t)}get col(){return this.nativeColOff===0?this.nativeCol:this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(e){this.nativeCol=Math.floor(e);let t=e-this.nativeCol;this.nativeColOff=t===0?0:Math.floor(t*this.colWidth)}get row(){return this.nativeRowOff===0?this.nativeRow:this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(e){this.nativeRow=Math.floor(e);let t=e-this.nativeRow;this.nativeRowOff=t===0?0:Math.floor(t*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(this.worksheet.getColumn(this.nativeCol+1).width*1e4):64e4}get rowHeight(){let e=this.worksheet?.getRow(this.nativeRow+1)?.height;return e?Math.floor(e*1e4):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(e){this.nativeCol=e.nativeCol,this.nativeColOff=e.nativeColOff,this.nativeRow=e.nativeRow,this.nativeRowOff=e.nativeRowOff}clone(t){return new e(t??this.worksheet,this.model)}}})),Iy,Ly=t((()=>{da(),Iy=class{constructor(e){this.model=e||{}}add(e,t){return this.model[e]=t}find(e){let t=this.model[e];if(t!==void 0)return t;let n;for(let t of Object.keys(this.model)){if(!t.startsWith(`range:`))continue;n||=E.decodeAddress(e);let r=t.slice(6),i=E.decodeEx(r);if(!(`dimensions`in i))continue;let{tl:a,br:o}=i,s=typeof a==`string`?E.decodeAddress(a):a,c=typeof o==`string`?E.decodeAddress(o):o;if(n.row>=s.row&&n.row<=c.row&&n.col>=s.col&&n.col<=c.col)return this.model[t]}}remove(e){this.model[e]=void 0}}})),Ry,zy=t((()=>{j(),Hf(),Ry=class extends A{get tag(){return`t`}render(e,t){e.openNode(`t`),/^\s|\n|\s$/.test(t)&&e.addAttribute(`xml:space`,`preserve`),e.writeText(pf(t)),e.closeNode()}parseOpen(e){return e.name===`t`?(this.model=``,!0):!1}parseText(e){this.model=this.model?this.model+e:e}parseClose(){let e=this.model;return e.includes(`_x`)&&(this.model=ff(e)),!1}}})),By,Vy=t((()=>{j(),zy(),w_(),By=class e extends A{constructor(e){super(),this.model=e}get tag(){return`r`}get textXform(){return this._textXform||=new Ry}get fontXform(){return this._fontXform||=new C_(e.FONT_OPTIONS)}render(e,t){let n=t||this.model;e.openNode(`r`),n.font&&this.fontXform.render(e,n.font),this.textXform.render(e,n.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`r`:return this.model={},!0;case`t`:return this.parser=this.textXform,this.parser.parseOpen(e),!0;case`rPr`:return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case`r`:return!1;case`t`:return this.model.text=this.parser.model,this.parser=void 0,!0;case`rPr`:return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}static{this.FONT_OPTIONS={tagName:`rPr`,fontNameTag:`rFont`}}}})),Hy,Uy=t((()=>{j(),Vy(),Hy=class extends A{constructor(e){super(),this.model=e||{type:`note`,note:{texts:[]},ref:``}}get tag(){return`r`}get richTextXform(){return this._richTextXform||=new By,this._richTextXform}render(e,t){let n=t||this.model;e.openNode(`comment`,{ref:n.ref,authorId:n.authorId??0}),e.openNode(`text`),n&&n.note&&n.note.texts&&n.note.texts.forEach(t=>{this.richTextXform.render(e,t)}),e.closeNode(),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`comment`:return this.model={type:`note`,note:{texts:[]},ref:e.attributes.ref,authorId:e.attributes.authorId==null?void 0:Number(e.attributes.authorId)},!0;case`r`:return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case`comment`:return!1;case`r`:return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}}})),Wy,Gy=t((()=>{j(),Wy=class extends A{constructor(e){super(),this._model=e||{},this.model={}}get tag(){return this._model?.tag??``}render(e,t,n){(n&&t===n[2]||n&&this.tag===`x:SizeWithCells`&&t===n[1])&&e.leafNode(this.tag)}parseOpen(e){switch(e.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}})),Ky,qy=t((()=>{j(),Ky=class extends A{constructor(e){super(),this._model=e||{},this.text=``}get tag(){return this._model?.tag??``}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(e){switch(e.name){case this.tag:return this.text=``,!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}})),Jy,Yy=t((()=>{j(),Jy=class extends A{constructor(){super(),this.text=``}get tag(){return`x:Anchor`}getAnchorRect(e){let t=Math.floor(e.left),n=Math.floor((e.left-t)*68),r=Math.floor(e.top),i=Math.floor((e.top-r)*18),a=Math.floor(e.right),o=Math.floor((e.right-a)*68),s=Math.floor(e.bottom);return[t,n,r,i,a,o,s,Math.floor((e.bottom-s)*18)]}getDefaultRect(e){let t=e.col,n=Math.max(e.row-2,0);return[t,6,n,14,t+2,2,n+4,16]}render(e,t){let n=t.anchor?this.getAnchorRect(t.anchor):this.getDefaultRect(t.refAddress);e.leafNode(`x:Anchor`,null,n.join(`, `))}parseOpen(e){switch(e.name){case this.tag:return this.text=``,!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}})),Xy,Zy,Qy=t((()=>{j(),Gy(),qy(),Yy(),Xy=[`twoCells`,`oneCells`,`absolute`],Zy=class extends A{constructor(){super(),this._leafText=``,this.map={"x:Anchor":new Jy,"x:Locked":new Ky({tag:`x:Locked`}),"x:LockText":new Ky({tag:`x:LockText`}),"x:SizeWithCells":new Wy({tag:`x:SizeWithCells`}),"x:MoveWithCells":new Wy({tag:`x:MoveWithCells`})},this.model={anchor:[],protection:{},editAs:``}}get tag(){return`x:ClientData`}render(e,t){let{protection:n,editAs:r}=t.note;e.openNode(this.tag,{ObjectType:`Note`}),this.map[`x:MoveWithCells`].render(e,r,Xy),this.map[`x:SizeWithCells`].render(e,r,Xy),this.map[`x:Anchor`].render(e,t),this.map[`x:Locked`].render(e,n.locked),e.leafNode(`x:AutoFill`,null,`False`),this.map[`x:LockText`].render(e,n.lockText),e.leafNode(`x:Row`,null,t.refAddress.row-1),e.leafNode(`x:Column`,null,t.refAddress.col-1),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:``};break;case`x:Row`:case`x:Column`:this._leafName=e.name,this._leafText=``;break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this._leafName?this._leafText+=e:this.parser&&this.parser.parseText(e)}parseClose(e){if(this._leafName){if(e===this._leafName){let t=parseInt(this._leafText,10);e===`x:Row`?this.model.row=t+1:e===`x:Column`&&(this.model.col=t+1),this._leafName=void 0,this._leafText=``}return!0}if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){let e=Object.assign({},this.map[`x:MoveWithCells`].model,this.map[`x:SizeWithCells`].model),t=Object.keys(e).length;this.model.editAs=Xy[t],this.model.anchor=this.map[`x:Anchor`].text,this.model.protection.locked=this.map[`x:Locked`].text,this.model.protection.lockText=this.map[`x:LockText`].text}}})),$y,eb=t((()=>{j(),$y=class extends A{constructor(){super(),this.model={}}get tag(){return`v:textbox`}conversionUnit(e,t,n){return`${(parseFloat(e.toString())*t).toFixed(2)}${n}`}reverseConversionUnit(e){return(e??``).split(`,`).map(e=>Number(parseFloat(this.conversionUnit(parseFloat(e),.1,``)).toFixed(2)))}render(e,t){let n={style:`mso-direction-alt:auto`};if(t&&t.note){let{inset:e}=t.note&&t.note.margins||{};Array.isArray(e)&&(e=e.map(e=>this.conversionUnit(e,10,`mm`)).join(`,`)),e&&(n.inset=e)}e.openNode(`v:textbox`,n),e.leafNode(`div`,{style:`text-align:left`}),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:return this.model={inset:this.reverseConversionUnit(e.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}})),tb,nb=t((()=>{j(),Qy(),eb(),tb=class e extends A{constructor(){super(),this.map={"v:textbox":new $y,"x:ClientData":new Zy}}get tag(){return`v:shape`}render(t,n,r){t.openNode(`v:shape`,e.V_SHAPE_ATTRIBUTES(n,r??0)),t.leafNode(`v:fill`,{color2:`infoBackground [80]`}),t.leafNode(`v:shadow`,{color:`none [81]`,obscured:`t`}),t.leafNode(`v:path`,{"o:connecttype":`none`}),this.map[`v:textbox`].render(t,n),this.map[`x:ClientData`].render(t,n),t.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={margins:{insetmode:e.attributes[`o:insetmode`]},anchor:``,editAs:``,protection:{}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.margins.inset=this.map[`v:textbox`].model&&this.map[`v:textbox`].model.inset,this.model.protection=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.protection,this.model.anchor=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.anchor,this.model.editAs=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.editAs,this.map[`x:ClientData`].model&&(this.model.row=this.map[`x:ClientData`].model.row,this.model.col=this.map[`x:ClientData`].model.col),!1;default:return!0}}static{this.V_SHAPE_ATTRIBUTES=(e,t)=>({id:`_x0000_s${1025+t}`,type:`#_x0000_t202`,style:`position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden`,fillcolor:`infoBackground [80]`,strokecolor:`none [81]`,"o:insetmode":e.note.margins&&e.note.margins.insetmode})}}})),rb,ib=t((()=>{da(),ng(),mu(),Uy(),nb(),ag(),rb=class{constructor(e,t,n){this.id=n.id,this.count=0,this._worksheet=e,this._workbook=n.workbook,this._sheetRelsWriter=t}get commentsStream(){return this._commentsStream||=this._workbook._openStream(Cm(this.id)),this._commentsStream}get vmlStream(){return this._vmlStream||=this._workbook._openStream(Tm(this.id)),this._vmlStream}_addRelationships(){let e={Type:D.Comments,Target:Um(this.id)};this._sheetRelsWriter.addRelationship(e);let t={Type:D.VmlDrawing,Target:Wm(this.id)};this.vmlRelId=this._sheetRelsWriter.addRelationship(t)}_addCommentRefs(){this._workbook.commentRefs.push({commentName:`comments${this.id}`,vmlDrawing:`vmlDrawing${this.id}`})}_writeOpen(){this.commentsStream.write(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>`),this.vmlStream.write(`<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>`)}_writeComment(e,t){let n=new Hy,r=new ig;n.render(r,e),this.commentsStream.write(r.xml);let i=new tb,a=new ig;i.render(a,e,t),this.vmlStream.write(a.xml)}_writeClose(){this.commentsStream.write(`</commentList></comments>`),this.vmlStream.write(`</xml>`)}addComments(e){e&&e.length&&(this.startedData||=(this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),!0),e.forEach(e=>{e.refAddress=E.decodeAddress(e.ref)}),e.forEach(e=>{this._writeComment(e,this.count),this.count+=1}))}commit(){this.count&&(this._writeClose(),this.commentsStream.end(),this.vmlStream.end())}}}));function ab(e){return e.startsWith(`#`)}var ob,sb=t((()=>{j(),ob=class extends A{get tag(){return`hyperlink`}render(e,t){t.target&&ab(t.target)?e.leafNode(`hyperlink`,{ref:t.address,tooltip:t.tooltip,location:t.target.slice(1)}):e.leafNode(`hyperlink`,{ref:t.address,"r:id":t.rId,tooltip:t.tooltip})}parseOpen(e){if(e.name===`hyperlink`){if(this.model={address:e.attributes.ref,rId:e.attributes[`r:id`],tooltip:e.attributes.tooltip},e.attributes.location){let t=e.attributes.location;this.model.target=t.startsWith(`#`)?t:`#${t}`}return!0}return!1}parseText(){}parseClose(){return!1}}})),cb,lb,ub=t((()=>{ng(),mu(),sb(),sf(),cb=class{constructor(e){this.writer=e}push(e){this.writer.addHyperlink(e)}},lb=class{constructor(e){this.id=e.id,this.count=0,this._hyperlinks=[],this._workbook=e.workbook}get stream(){return this._stream||=this._workbook._openStream(xm(this.id)),this._stream}get length(){return this._hyperlinks.length}each(e){return this._hyperlinks.forEach(e)}get hyperlinksProxy(){return this._hyperlinksProxy||=new cb(this)}addHyperlink(e){if(ab(e.target)){this._hyperlinks.push({address:e.address,target:e.target});return}let t={Target:e.target,Type:D.Hyperlink,TargetMode:`External`},n=this._writeRelationship(t);this._hyperlinks.push({rId:n,address:e.address})}addMedia(e){return this._writeRelationship(e)}addRelationship(e){return this._writeRelationship(e)}commit(){this.count&&(this._writeClose(),this.stream.end())}_writeOpen(){this.stream.write(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
404
|
+
`}function $_(){if(tv===null){let e=Q_(),t=new Blob([e],{type:`text/javascript`});tv=URL.createObjectURL(t)}return nv++,tv}function ev(){if(tv!==null&&--nv<=0){try{URL.revokeObjectURL(tv)}catch{}tv=null,nv=0}}var tv,nv,rv=t((()=>{tv=null,nv=0}));function iv(e){return e.byteOffset===0&&e.byteLength===e.buffer.byteLength}function av(e){return iv(e)?e:e.slice()}function ov(e){return(!fv||fv.isTerminated())&&(fv=new dv(e)),fv}async function sv(e,t){return(await ov().execute(`inflate`,e,t)).data}var cv,lv,uv,dv,fv,pv=t((()=>{Z_(),rv(),cv=new Uint8Array,lv=8,uv={onData:e=>{},onEnd:()=>{},onError:e=>{}},dv=class{_taskQueueSize(){return this._taskQueue.length-this._taskQueueHead}_compactTaskQueueIfNeeded(){this._taskQueueHead>32&&this._taskQueueHead*2>=this._taskQueue.length&&(this._taskQueue.splice(0,this._taskQueueHead),this._taskQueueHead=0)}_dequeueTask(){if(this._taskQueueHead>=this._taskQueue.length)return;let e=this._taskQueue[this._taskQueueHead++];return this._compactTaskQueueIfNeeded(),e}_compactPendingStreamRequestsIfNeeded(){this._pendingStreamRequestHead>32&&this._pendingStreamRequestHead*2>=this._pendingStreamRequests.length&&(this._pendingStreamRequests.splice(0,this._pendingStreamRequestHead),this._pendingStreamRequestHead=0)}_dequeuePendingStreamRequest(){if(this._pendingStreamRequestHead>=this._pendingStreamRequests.length)return;let e=this._pendingStreamRequests[this._pendingStreamRequestHead++];return this._compactPendingStreamRequestsIfNeeded(),e}_waitForStreamSlot(e){return e.slotWaitPromise||=new Promise(t=>{e.resolveSlotWait=()=>{e.slotWaitPromise=null,e.resolveSlotWait=null,t()}}),e.slotWaitPromise}_waitForStreamDrain(e){return e.drainWaitPromise||=new Promise(t=>{e.resolveDrainWait=()=>{e.drainWaitPromise=null,e.resolveDrainWait=null,t()}}),e.drainWaitPromise}_resolveSlotWaiter(e){e.resolveSlotWait?.()}_resolveDrainWaiter(e){e.resolveDrainWait?.()}constructor(e){this._workers=new Map,this._taskQueue=[],this._taskQueueHead=0,this._pendingTasks=new Map,this._nextTaskId=1,this._nextWorkerId=1,this._terminated=!1,this._completedTasks=0,this._failedTasks=0,this._pendingStreamRequests=[],this._pendingStreamRequestHead=0,this._options=K_(e),this._options.workerUrl?(this._workerUrl=this._options.workerUrl,this._useCustomUrl=!0):(this._workerUrl=$_(),this._useCustomUrl=!1);for(let e=0;e<this._options.minWorkers;e++)this._createWorker()}async execute(e,t,r){if(this._terminated)throw Error(`Worker pool has been terminated`);if(!J_())throw Error(`Web Workers are not supported in this environment`);if(r?.signal?.aborted)throw n();let i=this._nextTaskId++,a=r?.priority??`normal`,o=q_(a);return new Promise((n,s)=>{let c={taskId:i,taskType:e,data:t,level:r?.level,priority:a,priorityValue:o,resolve:n,reject:s,signal:r?.signal,allowTransfer:r?.allowTransfer,startTime:performance.now()};r?.signal&&(c.abortHandler=()=>{this._cancelTask(i)},r.signal.addEventListener(`abort`,c.abortHandler,{once:!0})),this._pendingTasks.set(i,c),this._enqueueTask(c),this._processQueue()})}getStats(){let e=this._workers.size,t=0;for(let e of this._workers.values())e.busy&&t++;return{totalWorkers:e,activeWorkers:t,idleWorkers:e-t,pendingTasks:this._taskQueueSize(),completedTasks:this._completedTasks,failedTasks:this._failedTasks}}terminate(){if(this._terminated)return;this._terminated=!0;for(let e of this._workers.values())this._terminateWorker(e);this._workers.clear();let e=Error(`Worker pool terminated`);for(let t of this._pendingTasks.values())this._cleanupTask(t),t.reject(e);this._pendingTasks.clear(),this._taskQueue.length=0,this._taskQueueHead=0,this._pendingStreamRequests.length=0,this._pendingStreamRequestHead=0,this._useCustomUrl||ev()}isTerminated(){return this._terminated}_createWorker(){if(this._terminated||this._workers.size>=this._options.maxWorkers)return null;let e=this._nextWorkerId++,t=new Worker(this._workerUrl),n={id:e,worker:t,busy:!1,currentTaskId:null,idleTimer:null,streamSession:null};return t.onmessage=e=>{this._handleWorkerMessage(n,e.data)},t.onerror=e=>{this._handleWorkerError(n,e)},this._workers.set(e,n),n}_terminateWorker(e){this._clearIdleTimer(e);try{e.worker.postMessage({type:`terminate`})}catch{}try{e.worker.terminate()}catch{}this._workers.delete(e.id)}_clearIdleTimer(e){e.idleTimer!==null&&(clearTimeout(e.idleTimer),e.idleTimer=null)}_findIdleWorker(){for(let e of this._workers.values())if(!e.busy)return e}_enqueueTask(e){let t=this._taskQueue,n=e.priorityValue;this._compactTaskQueueIfNeeded();let r=this._taskQueueHead,i=t.length;for(;r<i;){let e=r+i>>>1;t[e].priorityValue>=n?r=e+1:i=e}t.splice(r,0,e)}_processQueue(){for(;!this._terminated&&this._taskQueueSize()>0;){let e=this._findIdleWorker()??this._createWorker()??void 0;if(!e)return;for(;;){let t=this._dequeueTask();if(!t)return;if(t.signal?.aborted){this._pendingTasks.delete(t.taskId),this._cleanupTask(t),t.reject(n());continue}this._assignTask(e,t);break}}}_assignTask(e,t){this._clearIdleTimer(e),e.busy=!0,e.currentTaskId=t.taskId;let n=this._options.useTransferables&&t.allowTransfer===!0,r=n?av(t.data):t.data,i={type:`task`,taskId:t.taskId,taskType:t.taskType,data:r,level:t.level};n?e.worker.postMessage(i,[r.buffer]):e.worker.postMessage(i)}_handleWorkerMessage(e,t){if(t.type!==`ready`){if(e.streamSession){let n=e.streamSession;switch(t.type){case`started`:if(t.taskId!==n.taskId)return;n.startReady=!0,n.resolveStart?.(),n.resolveStart=null,n.rejectStart=null;return;case`out`:if(t.taskId!==n.taskId)return;n.onData(t.data);return;case`ack`:if(t.taskId!==n.taskId)return;n.inflightChunkCount>0&&n.inflightChunkCount--,this._resolveSlotWaiter(n),n.inflightChunkCount===0&&n.resolveDrainWait&&this._resolveDrainWaiter(n);return;case`done`:if(t.taskId!==n.taskId)return;n.ended=!0,n.inflightChunkCount=0,n.startReady=!0,n.resolveStart?.(),n.resolveStart=null,n.rejectStart=null,this._resolveSlotWaiter(n),this._resolveDrainWaiter(n),this._completedTasks++,t.duration??performance.now()-n.startTime,n.onEnd(),e.streamSession=null,this._workerBecameIdle(e);return;case`error`:{if(t.taskId!==n.taskId)return;let r=Error(t.error??`Unknown worker error`);n.ended=!0,n.inflightChunkCount=0,n.startReady=!0,n.rejectStart?.(r),n.resolveStart=null,n.rejectStart=null,this._resolveSlotWaiter(n),this._resolveDrainWaiter(n),this._failedTasks++,n.onError(r),e.streamSession=null,this._workerBecameIdle(e);return}default:break}}switch(t.type){case`result`:case`error`:{let n=t.taskId;if(typeof n!=`number`)return;let r=this._pendingTasks.get(n);if(!r){this._workerBecameIdle(e);return}if(this._pendingTasks.delete(n),this._cleanupTask(r),t.type===`result`){this._completedTasks++;let e=t.duration??performance.now()-r.startTime;r.resolve({data:t.data,duration:e})}else this._failedTasks++,r.reject(Error(t.error??`Unknown worker error`));this._workerBecameIdle(e);return}default:return}}}_handleWorkerError(e,t){let n=e.currentTaskId,r=e.streamSession;if(this._terminateWorker(e),n!==null){let e=this._pendingTasks.get(n);e&&(this._pendingTasks.delete(n),this._cleanupTask(e),this._failedTasks++,e.reject(Error(t.message||`Worker error`)))}if(r){let n=Error(t.message||`Worker terminated unexpectedly`);r.ended=!0,r.rejectStart?.(n),r.rejectStart=null,r.resolveStart=null,this._resolveSlotWaiter(r),this._resolveDrainWaiter(r);try{r.onError(n)}catch{}e.streamSession=null}this._processQueue()}_workerBecameIdle(e){if(e.busy=!1,e.currentTaskId=null,this._pendingStreamRequestHead<this._pendingStreamRequests.length){let t=this._dequeuePendingStreamRequest();if(t){t(e);return}}this._taskQueueSize()>0?this._processQueue():this._workers.size>this._options.minWorkers&&this._options.idleTimeout>0&&(e.idleTimer=setTimeout(()=>{!e.busy&&this._workers.size>this._options.minWorkers&&!this._terminated&&this._terminateWorker(e)},this._options.idleTimeout))}openStream(e,t=uv){if(this._terminated)throw Error(`Worker pool has been terminated`);if(!J_())throw Error(`Web Workers are not supported in this environment`);let n=this._nextTaskId++,r=t.allowTransfer===!0,i=this._options.useTransferables&&r,a=i?av:e=>e,o=i?(e,t,n)=>{e.postMessage(t,[n.buffer])}:(e,t,n)=>{e.postMessage(t)},s=null,c=null,l=async()=>{if(s)return s;if(c)return c;c=(async()=>{let r=this._findIdleWorker()??this._createWorker()??void 0;return r?(s=r,this._bindStreamSession(s,n,e,t.level,t),this._startStreamSession(s),s):(s=await new Promise(e=>{this._pendingStreamRequests.push(e)}),this._bindStreamSession(s,n,e,t.level,t),this._startStreamSession(s),s)})();try{return await c}finally{c=null}};l();let u=(e,t,n)=>{let r=a(n),i=t.chunkMessage;i.data=r,o(e.worker,i,r)},d=(e,t,n)=>{if(t.inflightChunkCount>=lv)return this._waitForStreamSlot(t).then(()=>{t.ended||(t.inflightChunkCount++,u(e,t,n))});t.inflightChunkCount++,u(e,t,n)};return{write:async e=>{if(e.byteLength===0)return;let t=s??await l(),n=t.streamSession;if(!n||n.ended)throw Error(`Streaming session is not active`);n.writeChain=n.writeChain.then(()=>{if(!n.ended)return n.startReady?d(t,n,e):n.startPromise.then(()=>{if(!n.ended)return d(t,n,e)})}),await n.writeChain},end:async()=>{let e=await l(),t=e.streamSession;!t||t.ended||(t.startReady||await t.startPromise,await t.writeChain,t.inflightChunkCount>0&&await this._waitForStreamDrain(t),t.ended=!0,e.worker.postMessage(t.endMessage))},abort:e=>{l().then(t=>{let n=t.streamSession;if(!n)return;let r=n.abortMessage;r.error=e,t.worker.postMessage(r)})}}}_bindStreamSession(e,t,n,r,i){this._clearIdleTimer(e),e.busy=!0,e.currentTaskId=t;let a=null,o=null,s=new Promise((e,t)=>{a=e,o=t}),c=setTimeout(()=>{o?.(Error(`Worker stream start timeout`))},5e3);s.finally(()=>clearTimeout(c)),e.streamSession={taskId:t,taskType:n,startTime:performance.now(),started:!1,startReady:!1,startPromise:s,resolveStart:a,rejectStart:o,level:r,writeChain:Promise.resolve(),inflightChunkCount:0,slotWaitPromise:null,resolveSlotWait:null,drainWaitPromise:null,resolveDrainWait:null,chunkMessage:{type:`chunk`,taskId:t,data:cv},startMessage:{type:`start`,taskId:t,taskType:n,level:r},endMessage:{type:`end`,taskId:t},abortMessage:{type:`abort`,taskId:t,error:void 0},ended:!1,onData:i.onData,onEnd:i.onEnd,onError:i.onError}}_startStreamSession(e){let t=e.streamSession;!t||t.started||(t.started=!0,e.worker.postMessage(t.startMessage))}_cancelTask(e){let t=this._pendingTasks.get(e);if(!t)return;this._pendingTasks.delete(e),this._cleanupTask(t);let r=-1;for(let t=this._taskQueueHead;t<this._taskQueue.length;t++)if(this._taskQueue[t].taskId===e){r=t;break}r>=0&&this._taskQueue.splice(r,1),t.reject(n())}_cleanupTask(e){e.abortHandler&&e.signal&&e.signal.removeEventListener(`abort`,e.abortHandler)}async executeBatch(e){let t=Array(e.length);for(let n=0;n<e.length;n++){let r=e[n];t[n]=this.execute(r.taskType,r.data,r.options)}return Promise.all(t)}},fv=null})),mv=t((()=>{pv()})),hv=t((()=>{}));function gv(e,t){let n=J_();if(t.useWorker===!0)return n;if(t.useWorker===!1)return!1;let r=t.autoWorkerThreshold??1048576;return n&&e.length>=r}function _v(e,t){if(t?.aborted||r(e))throw n(t?.reason??e)}async function vv(e,t,n){let r=e.hasNative(),i=J_(),a=n.useWorker;if(a===!0&&i)try{return await e.worker(t,{level:n.level,signal:n.signal,allowTransfer:n.allowTransfer})}catch(e){_v(e,n.signal)}return r?e.native(t):a!==!0&&gv(t,n)?e.worker(t,{level:n.level,signal:n.signal,allowTransfer:n.allowTransfer}):e.jsFallback(t,n.level)}async function yv(e,t={}){return vv(Cv,e,t)}function bv(e){return vo(e)}function xv(e,t,n){return Zn([co(n),e,lo(oo(t))])}function Sv(e,t={}){let n=t.level??6;return xv(n===0?yo(e):So(e,n),e,n)}var Cv,wv=t((()=>{go(),qo(),mv(),hv(),es(),lr(),Cv={hasNative:to,native:ao,worker:sv,jsFallback:vo},new Uint8Array([31,139,8,0,0,0,0,0,0,255])})),Tv=t((()=>{es()}));function Ev(e,t,n){let r=i(t);n?n(r):e.emit(`error`,r)}function Dv(e,t){let n=t?new CompressionStream(e):new DecompressionStream(e),r=n.writable.getWriter(),a=n.readable.getReader(),o=new Nv,s=null,c=(async()=>{try{for(;;){let{value:e,done:t}=await a.read();if(t)break;e&&o.emit(`data`,e)}o.emit(`end`)}catch(e){let t=i(e);s=t,o.emit(`error`,t)}})();return o.setBackend({write:e=>r.write(e),close:async()=>{if(await r.close(),await c,s)throw i(s)},abort:e=>{a.cancel(e).catch(()=>{}),r.abort(e).catch(()=>{})}}),o}function Ov(e,t,n,r){let i=t??ov(),a=null,o=null,s=new Promise((e,t)=>{a=e,o=t}),c=new Nv,l=i.openStream(e,{level:n,allowTransfer:r,onData:e=>c.emit(`data`,e),onEnd:()=>{c.emit(`end`),a?.()},onError:e=>{c.emit(`error`,e),o?.(e)}});return c.setBackend({write:e=>l.write(e),close:async()=>{await l.end(),await s},abort:e=>{a?.(),l.abort(e?.message)}}),c}function kv(e,t){let n=e===`deflate`?t.level??6:void 0;return t.useWorker&&J_()?Ov(e,t.workerPool,n,t.allowTransfer):(e===`deflate`?eo():no())?Dv(`deflate-raw`,e===`deflate`):new Pv(e===`deflate`?e=>So(e,n):vo)}function Av(e={}){return kv(`deflate`,e)}function jv(){return eo()}var Mv,Nv,Pv,Fv=t((()=>{go(),qo(),mv(),hv(),lr(),Sr(),Tv(),Ya(),Mv=`write after end`,Nv=class e extends xr{constructor(...e){super(...e),this.ended=!1,this.destroyed=!1,this.writeChain=Promise.resolve(),this._backend=null,this._pendingWrites=0,this._needsDrain=!1}static{this.HIGH_WATER_MARK=16}setBackend(e){this._backend=e}write(t,n){if(this.ended)return Ev(this,Error(Mv),n),!1;if(t.byteLength===0)return n&&queueMicrotask(n),!0;let r=this._backend;if(!r)throw Error(`Backend not initialized`);this._pendingWrites++;let i=this.writeChain.then(()=>r.write(t));return this.writeChain=i,i.then(()=>{this.destroyed||n?.()}).catch(e=>{this.destroyed||Ev(this,e,n)}).finally(()=>{this._pendingWrites--,this._needsDrain&&this._pendingWrites<e.HIGH_WATER_MARK&&!this.destroyed&&(this._needsDrain=!1,this.emit(`drain`))}),this._pendingWrites>=e.HIGH_WATER_MARK?(this._needsDrain=!0,!1):!0}end(e){if(this.ended){e?.();return}this.ended=!0;let t=this._backend;if(!t)throw Error(`Backend not initialized`);this.writeChain.then(()=>t.close()).then(()=>e?.()).catch(t=>Ev(this,t,e))}destroy(e){this.ended=!0,this.destroyed=!0,this._backend?.abort(e),e&&this.emit(`error`,e)}},Pv=class extends xr{constructor(e){super(),this.process=e,this.chunks=[],this.ended=!1}write(e,t){return this.ended?(Ev(this,Error(Mv),t),!1):e.byteLength===0?(t&&queueMicrotask(t),!0):(this.chunks.push(e),t&&queueMicrotask(t),!0)}end(e){if(this.ended){e?.();return}this.ended=!0;let t=this.chunks.length,n=t===0?Ja:t===1?this.chunks[0]:Zn(this.chunks);this.chunks.length=0;try{let t=this.process(n);this.emit(`data`,t),this.emit(`end`),e?.()}catch(t){Ev(this,t,e)}}destroy(e){this.ended=!0,this.chunks.length=0,e&&this.emit(`error`,e)}}}));function Iv(e){let t={key0:305419896,key1:591751049,key2:878082192},n=typeof e==`string`?Yn(e):e;for(let e=0;e<n.length;e++)Lv(t,n[e]);return t}function Lv(e,t){e.key0=as(e.key0,t),e.key1=e.key1+(e.key0&255)>>>0,e.key1=(Math.imul(e.key1,134775813)>>>0)+1>>>0,e.key2=as(e.key2,e.key1>>>24&255)}function Rv(e){let t=(e.key2|2)>>>0;return Math.imul(t,t^1)>>>8&255}function zv(e,t){let n=(t^Rv(e))&255;return Lv(e,n),n}function Bv(e,t){let n=(t^Rv(e))&255;return Lv(e,t),n}function Vv(e,t,n,r){if(t.length!==12)return!1;let i=new Uint8Array(12);for(let n=0;n<12;n++)i[n]=zv(e,t[n]);let a=i[11];return a===(n>>>24&255)||r!==void 0&&a===(r>>>8&255)}function Hv(e,t,n){let r=new Uint8Array(12),i=n(11);for(let t=0;t<11;t++)r[t]=Bv(e,i[t]);return r[11]=Bv(e,t>>>24&255),r}function Uv(e,t,n,r){if(e.length<12)return null;let i=Iv(t);if(!Vv(i,e.subarray(0,12),n,r))return null;let a=e.length-12,o=new Uint8Array(a);for(let t=0;t<a;t++)o[t]=zv(i,e[12+t]);return o}var Wv=t((()=>{ss(),lr()}));function Gv(e){return e in qv}function Kv(e){return qv[e]}var qv,Jv=t((()=>{qv={"aes-128":128,"aes-192":192,"aes-256":256}})),Yv=t((()=>{Wv(),Sc(),ic(),Jv()}));function Xv(e){return e.replace(/\\/g,`/`)}function Zv(e){return e.replace(/^\/+/,``)}function Qv(e){return e.replace(/^[a-zA-Z]:\/?/,``)}function $v(e){let t=e.split(`/`),n=[];for(let e of t)if(!(!e||e===`.`)){if(e===`..`){n.length>0?n.pop():n.push(`..`);continue}n.push(e)}return n.join(`/`)}function ey(e){return e.startsWith(`/`)}function ty(e){return/^[a-zA-Z]:/.test(e)}function ny(e,t={}){let n=t.mode??`legacy`,r=e;r=Xv(r);let i=ty(r);if(n===`legacy`)return r=Zv(r),t.prependSlash?`/`+r:r;let a=t.stripDrive??!0;if(n===`safe`&&i&&!a)throw Error(`Unsafe ZIP path (drive): ${e}`);a&&(r=Qv(r));let o=ey(r);if(r=Zv(r),r=$v(r),n===`safe`){if(o)throw Error(`Unsafe ZIP path (absolute): ${e}`);if(r===`..`||r.startsWith(`../`))throw Error(`Unsafe ZIP path (traversal): ${e}`)}return t.prependSlash?`/`+r:r}var ry=t((()=>{}));function iy(e){return Math.log(e)/Math.LN2}function ay(e,t){let n=0;for(let r=0;r<256;r++){let i=e[r];if(i===0)continue;let a=i/t;n-=a*iy(a)}return n}function oy(e,t){let n=new Uint32Array(256),r=0,i=0;if(Array.isArray(e))for(let a=0;a<e.length&&!(r>=t);a++){let o=e[a],s=Math.min(o.length,t-r);for(let e=0;e<s;e++){let t=o[e];n[t]===0&&(i+=1),n[t]+=1}r+=s}else for(let a of e){if(r>=t)break;let e=Math.min(a.length,t-r);for(let t=0;t<e;t++){let e=a[t];n[e]===0&&(i+=1),n[e]+=1}r+=e}return{total:r,unique:i,counts:n}}function sy(e,t={}){let n=t.sampleBytes??cy,r=t.minDecisionBytes??ly,{total:i,unique:a,counts:o}=oy(e,n);return i<r||a<200?!1:ay(o,i)>=7.95}var cy,ly,uy=t((()=>{cy=64*1024,ly=16*1024}));function dy(e,t=20){return(e&255)<<8|t&255}function fy(e){switch(e){case`directory`:return rl;case`symlink`:return nl;default:return il}}function py(e){return e>>>0&65535}function my(e,t){let n=e.endsWith(`/`)||e.endsWith(`\\`);return t!==void 0&&Fc(t)?`symlink`:n?`directory`:`file`}function hy(e){let t=e.kind,n=t===`directory`?16:32,r=(e.msDosAttributes??n)&255,i=e.mode;i!==void 0&&(i&61440||(i=i&4095|fy(t)),i=py(i));let a=((i??0)&65535)<<16|r,o=dy(i!==void 0||t===`symlink`?3:0);return{externalAttributes:a>>>0,versionMadeBy:o}}function gy(e){if(e.externalAttributes!==void 0)return{externalAttributes:e.externalAttributes,versionMadeBy:e.versionMadeBy};let t=hy({kind:my(e.name,e.mode),mode:e.mode,msDosAttributes:e.msDosAttributes});return{externalAttributes:t.externalAttributes,versionMadeBy:e.versionMadeBy??t.versionMadeBy}}var _y=t((()=>{sl()}));function vy(e){return e?8:0}function yy(e,t=!0){let n=0;return t&&(n|=el),e&&(n|=8),n}function by(e){let t=ds(e.codec),n=t.encode(e.name),r=fs(e.comment,t),{dosTime:i,dosDate:a}=Bs(e.modTime),o=e.atime||e.ctime||e.birthTime?{atime:e.atime,ctime:e.ctime,birthTime:e.birthTime}:void 0,s=zs(e.modTime,e.timestamps,o);return!t.useUtf8Flag&&t.useUnicodeExtraFields&&(e.name&&(s=Gc(s,wc(n,e.name))),e.comment&&(s=Gc(s,Tc(r,e.comment)))),{nameBytes:n,commentBytes:r,dosTime:i,dosDate:a,extraField:s,compressionMethod:vy(e.deflate),flags:yy(e.useDataDescriptor,t.useUtf8Flag)}}var xy=t((()=>{ws(),Hs(),Nc(),sl()}));function Sy(e,t,n,r,i){if(!i)return 0;let a=0;return(e||t>4294967295)&&(a+=8),(e||n>4294967295)&&(a+=8),(e||r>4294967295)&&(a+=8),a>0?4+a:0}function Cy(e){let t=e[0];return t?.fileName===void 0?t?.compressedData===void 0?`central`:`processed`:`input`}function wy(e,t){let n=t.zip64Mode===!0,r=t.zip64Mode===!1,i=Cy(e),a=0;for(let t=0;t<e.length;t++){let r=e[t],o=i===`input`?r.fileName:r.name,s=r.extraField,c=r.comment,l=i===`processed`?r.compressedData.length:r.compressedSize,u=r.uncompressedSize,d=i===`input`?r.localHeaderOffset:r.offset,f=i===`processed`?void 0:r.zip64,p=n||f===!0||d>4294967295||l>4294967295||u>4294967295;a+=46+o.length+s.length+Sy(n,u,l,d,p)+(c?.length??0)}let o=e.length>65535||t.centralDirOffset>4294967295,s=n||o||a>4294967295;if(r&&s)throw Error(`ZIP64 is required but zip64=false`);let c=s?98+t.zipComment.length:22+t.zipComment.length;return{centralDirSize:a,trailerSize:c,totalSize:a+c,usedZip64:s}}function Ty(e,t){let n=t.zip64Mode===!0,r=wy(e,{zipComment:t.zipComment,zip64Mode:t.zip64Mode,centralDirOffset:t.centralDirOffset}),i=Cy(e),a=t.offset,o=new DataView(t.out.buffer,t.out.byteOffset,t.out.byteLength);for(let r=0;r<e.length;r++){let s=e[r],c=i===`input`?s.fileName:s.name,l=s.extraField,u=s.comment,d=s.flags,f=i===`input`?s.crc32:s.crc,p=i===`processed`?s.compressedData.length:s.compressedSize,m=s.uncompressedSize,h=s.compressionMethod,g=i===`processed`?s.modTime:s.dosTime,_=i===`processed`?s.modDate:s.dosDate,v=i===`input`?s.localHeaderOffset:s.offset,y=i===`processed`?void 0:s.zip64,b=s.externalAttributes,x=s.versionMadeBy,S=n||y===!0||v>4294967295||p>4294967295||m>4294967295,ee=S?Wc({uncompressedSize:n||m>4294967295?m:void 0,compressedSize:n||p>4294967295?p:void 0,localHeaderOffset:n||v>4294967295?v:void 0}):Ja,te=S&&ee.length>0?Gc(l,ee):l;a+=zc(t.out,o,a,{fileName:c,extraField:te,comment:u??Ja,flags:d,compressionMethod:h,dosTime:g,dosDate:_,crc32:f,compressedSize:S?ol:p,uncompressedSize:S?ol:m,localHeaderOffset:S?ol:v,versionMadeBy:x??20,versionNeeded:S?45:20,externalAttributes:b})}if(r.usedZip64){let n=t.centralDirOffset+r.centralDirSize;a+=Kc(t.out,o,a,{entryCountOnDisk:e.length,entryCountTotal:e.length,centralDirSize:r.centralDirSize,centralDirOffset:t.centralDirOffset}),a+=qc(t.out,o,a,{zip64EndOfCentralDirectoryOffset:n,totalDisks:1}),Bc(t.out,o,a,{entryCount:al,centralDirSize:ol,centralDirOffset:ol,comment:t.zipComment})}else Bc(t.out,o,a,{entryCount:e.length,centralDirSize:r.centralDirSize,centralDirOffset:t.centralDirOffset,comment:t.zipComment});return{centralDirSize:r.centralDirSize,trailerSize:r.trailerSize,totalWritten:r.totalSize,usedZip64:r.usedZip64}}var Ey=t((()=>{Ya(),sl()})),Dy,Oy,ky,Ay,jy=t((()=>{cs(),Fv(),Yv(),Ya(),hv(),es(),ws(),ry(),sl(),uy(),_y(),xy(),Ey(),Dy=16*1024,Oy=65536,ky=class{constructor(e,t){this._deflate=null,this._crc=4294967295,this._uncompressedSize=0,this._compressedSize=0,this._finalized=!1,this._headerEmitted=!1,this._ondata=null,this._onerror=null,this._centralDirEntryInfo=null,this._pendingEnd=!1,this._emittedDataDescriptor=!1,this._localHeader=null,this._zip64Mode=`auto`,this._zip64=!1,this._deflateWanted=null,this._pendingChunks=[],this._sampleLen=0,this._completeResolve=null,this._completeReject=null,this._completePromise=null,this._completeError=null,this._encryptionMethod=`none`,this._zipCryptoState=null,this._aesBuffer=[],this._aesBufferSize=0,this._originalCompressionMethod=0,this._aesExtraField=null,this._dataQueue=[],this._finalQueued=!1,this._pushChain=Promise.resolve(),this._inputBuf=null,this._inputPos=0,this._syncDeflater=null,this._syncZlibReady=!1;let n=t?.path?ny(e,t.path):e;this.name=n;let r=t?.modTime??new Date;if(this._modTime=r,this.level=t?.level??6,this._smartStore=t?.smartStore??!0,this._zip64Mode=t?.zip64??`auto`,this._zip64=this._zip64Mode===!0,this._encryptionMethod=t?.encryptionMethod??`none`,this._password=t?.password,this._encryptionMethod!==`none`&&!this._password)throw Error(`Password is required for encryption`);Gv(this._encryptionMethod)&&(this._aesKeyStrength=Kv(this._encryptionMethod)),this._stringCodec=ds(t?.encoding);let i=by({name:n,comment:t?.comment,modTime:r,atime:t?.atime,ctime:t?.ctime,birthTime:t?.birthTime,timestamps:t?.timestamps??`dos`,useDataDescriptor:!0,deflate:!1,codec:this._stringCodec});this.nameBytes=i.nameBytes,this.commentBytes=i.commentBytes,this.dosTime=i.dosTime,this.dosDate=i.dosDate,this.extraField=i.extraField,this._flags=i.flags,this._compressionMethod=i.compressionMethod;let a=gy({name:n,mode:t?.mode,msDosAttributes:t?.msDosAttributes,externalAttributes:t?.externalAttributes,versionMadeBy:t?.versionMadeBy});if(this._externalAttributes=a.externalAttributes,this._versionMadeBy=a.versionMadeBy,this._encryptionMethod!==`none`&&(this._flags|=1),!this._smartStore){let e=this.level>0;this._deflateWanted=e,this._compressionMethod=this._buildCompressionMethod(e),e&&this._initDeflateStream();return}this.level===0&&(this._deflateWanted=!1,this._compressionMethod=this._buildCompressionMethod(!1))}_buildCompressionMethod(e){return vy(e)}_getAesExtraField(){return this._aesKeyStrength?(this._aesExtraField||=uc(2,this._aesKeyStrength,this._originalCompressionMethod),this._aesExtraField):Ja}_initZipCryptoEncryption(){if(this._zipCryptoState||this._encryptionMethod!==`zipcrypto`)return;this._zipCryptoState=Iv(this._password);let e=this.dosTime<<16|this.dosDate,t=Hv(this._zipCryptoState,e,Zs);this._compressedSize+=t.length,this._enqueueData(t,!1)}_zipCryptoEncryptChunk(e){if(!this._zipCryptoState)return e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=Bv(this._zipCryptoState,e[n]);return t}_initDeflateStream(){this._deflate||(this._deflate=Av({level:this.level}),this._deflate.on(`error`,e=>{this._rejectComplete(e)}),this._deflate.on(`data`,e=>{if(this._aesKeyStrength){this._aesBuffer.push(e),this._aesBufferSize+=e.length;return}if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);this._compressedSize+=t.length,this._enqueueData(t,!1);return}this._compressedSize+=e.length,this._enqueueData(e,!1)}),this._deflate.on(`end`,()=>{this._pendingEnd&&!this._emittedDataDescriptor&&(this._emittedDataDescriptor=!0,this._finalizeEncryptionAndEmitDescriptor())}))}_finalizeEncryptionAndEmitDescriptor(){if(this._aesKeyStrength&&this._aesBuffer.length>0){this._finalizeAesEncryption().then(()=>this._emitDataDescriptor()).catch(e=>this._rejectComplete(e));return}this._emitDataDescriptor()}async _finalizeAesEncryption(){if(!this._aesKeyStrength||this._aesBufferSize===0)return;let e;if(this._aesBuffer.length===1)e=this._aesBuffer[0];else{e=new Uint8Array(this._aesBufferSize);let t=0;for(let n=0;n<this._aesBuffer.length;n++){let r=this._aesBuffer[n];e.set(r,t),t+=r.length}}this._aesBuffer.length=0,this._aesBufferSize=0;let t=await hc(e,this._password,this._aesKeyStrength);this._compressedSize=t.length,this._enqueueData(t,!1)}_buildLocalHeader(){let e=this.extraField,t=this._compressionMethod;return this._aesKeyStrength&&(this._originalCompressionMethod=this._compressionMethod,t=99,e=Gc(this.extraField,this._getAesExtraField())),Rc({fileName:this.nameBytes,extraField:e,flags:this._flags,compressionMethod:t,dosTime:this.dosTime,dosDate:this.dosDate,crc32:0,compressedSize:0,uncompressedSize:0,versionNeeded:this._zip64?45:20})}_accumulateSampleLen(e){if(this._deflateWanted!==null||e.length===0||this._sampleLen>=Dy)return;let t=Math.min(Dy-this._sampleLen,e.length);t<=0||(this._sampleLen+=t)}_shouldDecide(e){return this._deflateWanted===null?e||this._sampleLen>=Dy:!1}_decideCompressionIfNeeded(e,t,n=!1){if(this._deflateWanted!==null)return;if(e&&this._sampleLen===0){this._deflateWanted=!1,this._sampleLen=0,this._compressionMethod=this._buildCompressionMethod(!1),this._localHeader=null;return}let r=sy((function*(e,t){for(let t of e)t.length&&(yield t);t.length&&(yield t)})(this._pendingChunks,t),{sampleBytes:Dy,minDecisionBytes:Dy});this._deflateWanted=!r,this._sampleLen=0,this._compressionMethod=this._buildCompressionMethod(this._deflateWanted),this._localHeader=null,this._deflateWanted&&(n||this._initDeflateStream())}_emitHeaderIfNeeded(){this._headerEmitted||=(this._emitHeader(),!0)}async _flushPendingChunks(){if(this._pendingChunks.length!==0){for(let e of this._pendingChunks)await this._writeData(e);this._pendingChunks.length=0}}_enqueueData(e,t){this._ondata?this._ondata(e,t):(this._dataQueue.push(e),t&&(this._finalQueued=!0))}_flushQueue(){if(!this._ondata)return;let e=this._dataQueue.length,t=this._finalQueued?e-1:-1;for(let n=0;n<e;n++)this._ondata(this._dataQueue[n],n===t);this._dataQueue.length=0,this._finalQueued=!1}get ondata(){return this._ondata}set ondata(e){this._ondata=e,this._flushQueue()}get onerror(){return this._onerror}set onerror(e){this._onerror=e,this._completeError&&e(this._completeError)}_resolveComplete(){this._completeResolve&&this._completeResolve()}_rejectComplete(e){this._completeError||(this._completeError=e,this._onerror&&this._onerror(e),this._completeReject&&this._completeReject(e))}_ensureCompletePromise(){return this._completeError?Promise.reject(this._completeError):this._emittedDataDescriptor?Promise.resolve():(this._completePromise||=new Promise((e,t)=>{this._completeResolve=e,this._completeReject=t}),this._completePromise)}_tapCallback(e,t){t&&e.then(()=>t()).catch(e=>t(e))}_writeDataSync(e,t){if(!(e.length===0&&!t)){if(e.length>0&&(this._crc=ns(this._crc,e),this._uncompressedSize+=e.length),this._deflateWanted){if(this._syncDeflater||=new Ko(this.level),e.length>0){let t=this._syncDeflater.write(e);t.length>0&&(this._compressedSize+=t.length,this._enqueueData(t,!1))}if(t){let e=this._syncDeflater.finish();e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1)),this._syncDeflater=null}return}if(this._aesKeyStrength){this._aesBuffer.push(e),this._aesBufferSize+=e.length;return}if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);this._compressedSize+=t.length,this._enqueueData(t,!1);return}e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1))}}_writeData(e){if(e.length===0)return Promise.resolve();if(this._crc=ns(this._crc,e),this._uncompressedSize+=e.length,this._deflate)return new Promise((t,n)=>{this._deflate.write(e,e=>{e?n(e):t()})});if(this._aesKeyStrength)return this._aesBuffer.push(e),this._aesBufferSize+=e.length,Promise.resolve();if(this._encryptionMethod===`zipcrypto`){this._initZipCryptoEncryption();let t=this._zipCryptoEncryptChunk(e);return this._compressedSize+=t.length,this._enqueueData(t,!1),Promise.resolve()}return this._compressedSize+=e.length,this._enqueueData(e,!1),Promise.resolve()}_endDeflateAndWait(){return new Promise((e,t)=>{let n=this._deflate,r=e=>{a(),t(e)},i=()=>{a(),e()},a=()=>{n.off(`error`,r),n.off(`end`,i)};n.once(`error`,r),n.once(`end`,i),n.end()})}_finalizeAfterWrite(e){this._finalized=!0,this._pendingEnd=!0;let t=this._ensureCompletePromise();return this._deflate?e.then(()=>this._endDeflateAndWait()).then(()=>t):this._aesKeyStrength&&this._aesBufferSize>0?(this._emittedDataDescriptor=!0,this._finalizeAesEncryption().then(()=>this._emitDataDescriptor()).catch(e=>this._rejectComplete(e)),t):(this._emittedDataDescriptor=!0,this._emitDataDescriptor(),t)}_pushUnchained(e,t,n){if(this._finalized){let e=Promise.reject(Error(`Cannot push to finalized ZipDeflateFile`));return this._tapCallback(e,n),e}if(this._completeError){let e=Promise.reject(this._completeError);return this._tapCallback(e,n),e}if(this._deflateWanted===null){if(this._accumulateSampleLen(e),!this._shouldDecide(t)){e.length>0&&this._pendingChunks.push(e);let t=Promise.resolve();return this._tapCallback(t,n),t}this._decideCompressionIfNeeded(t,e),this._emitHeaderIfNeeded();let r=this._pendingChunks.length>0,i=this._flushPendingChunks(),a=i;e.length>0&&(a=r?i.then(()=>this._writeData(e)):this._writeData(e));let o=t?this._finalizeAfterWrite(a):a;return this._tapCallback(o,n),o}this._emitHeaderIfNeeded();let r=this._writeData(e),i=t?this._finalizeAfterWrite(r):r;return this._tapCallback(i,n),i}push(e,t=!1,n){if(!this._deflate&&this._encryptionMethod===`none`&&!jv()){try{this._pushSyncPath(e,t),n?.()}catch(e){return n?.(e instanceof Error?e:Error(String(e))),Promise.reject(e)}return Promise.resolve()}if(!t&&e.length>0&&e.length<Oy){if(this._inputBuf||(this._inputBuf=new Uint8Array(Oy),this._inputPos=0),this._inputPos+e.length<=Oy)return this._inputBuf.set(e,this._inputPos),this._inputPos+=e.length,n?.(),Promise.resolve();let t=new Uint8Array(this._inputPos+e.length);return t.set(this._inputBuf.subarray(0,this._inputPos)),t.set(e,this._inputPos),this._inputPos=0,this._pushAsync(t,!1,n)}if(this._inputPos>0){let r=this._inputBuf.slice(0,this._inputPos);this._inputPos=0;let i=this._pushAsync(r,!1),a=this._pushChain=i.then(()=>this._pushUnchained(e,t,n),()=>this._pushUnchained(e,t,n));return a.catch(()=>{}),a}return this._pushAsync(e,t,n)}_pushAsync(e,t,n){let r=this._pushChain=this._pushChain.then(()=>this._pushUnchained(e,t,n),()=>this._pushUnchained(e,t,n));return r.catch(()=>{}),r}_pushSyncPath(e,t=!1){if(this._finalized)throw Error(`Cannot push to finalized ZipDeflateFile`);if(this._syncZlibReady||=!0,this._deflateWanted===null){if(this._accumulateSampleLen(e),!this._shouldDecide(t)){e.length>0&&this._pendingChunks.push(e);return}this._decideCompressionIfNeeded(t,e,!0),this._emitHeaderIfNeeded();for(let e of this._pendingChunks)this._writeDataSync(e,!1);this._pendingChunks.length=0,e.length>0&&this._writeDataSync(e,t),t&&this._finalizeSyncAfterWrite();return}this._emitHeaderIfNeeded(),this._writeDataSync(e,t),t&&this._finalizeSyncAfterWrite()}_finalizeSyncAfterWrite(){if(this._finalized=!0,this._pendingEnd=!1,this._emittedDataDescriptor=!0,this._aesKeyStrength&&this._aesBufferSize>0)throw Error(`AES encryption is not supported with synchronous push`);if(this._syncDeflater){let e=this._syncDeflater.finish();e.length>0&&(this._compressedSize+=e.length,this._enqueueData(e,!1)),this._syncDeflater=null}if(this._emitDataDescriptor(),this._completeError)throw this._completeError}_emitHeader(){this._localHeader||=this._buildLocalHeader(),this._enqueueData(this._localHeader,!1)}_emitDataDescriptor(){let e=rs(this._crc),t=this._compressedSize>4294967295||this._uncompressedSize>4294967295;if(this._zip64Mode===!1&&t){this._rejectComplete(Error(`ZIP64 is required but zip64=false`));return}(this._zip64Mode===!0||t&&!this._zip64)&&(this._zip64=!0);let n=this._zip64?Uc(e,this._compressedSize,this._uncompressedSize):Vc(e,this._compressedSize,this._uncompressedSize),r=this._compressionMethod,i=this.extraField;this._aesKeyStrength&&(r=99,i=Gc(this.extraField,this._getAesExtraField())),this._centralDirEntryInfo={name:this.nameBytes,extraField:i,comment:this.commentBytes,flags:this._flags,crc:e,compressedSize:this._compressedSize,uncompressedSize:this._uncompressedSize,compressionMethod:r,dosTime:this.dosTime,dosDate:this.dosDate,offset:-1,zip64:this._zip64,externalAttributes:this._externalAttributes,versionMadeBy:this._versionMadeBy},this._enqueueData(n,!0),this._resolveComplete()}complete(){return this._ensureCompletePromise()}getEntryInfo(){if(!this._centralDirEntryInfo)return null;let e=this.name,t=e.endsWith(`/`)||e.endsWith(`\\`),n=this._centralDirEntryInfo.externalAttributes,r=Pc(n);return{path:e,type:Fc(r)?`symlink`:t?`directory`:`file`,compressedSize:this._centralDirEntryInfo.compressedSize,uncompressedSize:this._centralDirEntryInfo.uncompressedSize,compressionMethod:this._centralDirEntryInfo.compressionMethod,crc32:this._centralDirEntryInfo.crc,lastModified:this._modTime,localHeaderOffset:this._centralDirEntryInfo.offset,comment:this._stringCodec.decode(this._centralDirEntryInfo.comment),externalAttributes:n,mode:r,versionMadeBy:this._centralDirEntryInfo.versionMadeBy,extraField:this._centralDirEntryInfo.extraField,isEncrypted:this._encryptionMethod!==`none`,encryptionMethod:this._aesKeyStrength?`aes`:this._encryptionMethod===`zipcrypto`?`zipcrypto`:void 0,aesKeyStrength:this._aesKeyStrength,originalCompressionMethod:this._aesKeyStrength?this._originalCompressionMethod:void 0}}getCentralDirectoryEntryInfo(){return this._centralDirEntryInfo}isComplete(){return this._emittedDataDescriptor&&this._centralDirEntryInfo!==null}abort(e){if(this._completeError)return;let t=n(e);this._finalized=!0,this._pendingEnd=!0,this._rejectComplete(t);try{let e=this._deflate;e&&typeof e.destroy==`function`&&e.destroy(t)}catch{}}},Ay=class{constructor(e,t){this.entries=[],this.currentOffset=0,this.ended=!1,this.endPending=!1,this.addedEntryCount=0,this.fileQueue=[],this.fileQueueIndex=0,this.activeFile=null,this.callback=e,this._stringCodec=t?.codec??ds(t?.encoding),this.zipComment=fs(t?.comment,this._stringCodec),this.zip64Mode=t?.zip64??`auto`}add(e){if(this.ended)throw Error(`Cannot add files after calling end() `);if(this.zip64Mode===!1&&this.addedEntryCount>=65535)throw Error(`ZIP64 is required but zip64=false`);this.addedEntryCount++,this.fileQueue.push(e),this.activeFile||this._processNextFile()}_processNextFile(){if(this.fileQueueIndex>=this.fileQueue.length){this.activeFile=null,this.fileQueue=[],this.fileQueueIndex=0,this.endPending&&this._finalize();return}let e=this.fileQueue[this.fileQueueIndex++];this.activeFile=e;let t=this.currentOffset;if(e.onerror=e=>{this.ended||(this.ended=!0,this.callback(e,Ja,!0))},e.ondata=(n,r)=>{if(!this.ended&&(this.currentOffset+=n.length,this.callback(null,n,!1),r)){let n=e.getCentralDirectoryEntryInfo();n&&(n.offset=t,this.entries.push(n)),this._processNextFile()}},typeof e.start==`function`)try{e.start().catch(t=>{let n=i(t);try{e.onerror?.(n)}catch{}})}catch(t){let n=i(t);try{e.onerror?.(n)}catch{}}}_finalize(){if(this.ended)return;this.ended=!0;let e=this.currentOffset,t;try{let n=wy(this.entries,{zipComment:this.zipComment,zip64Mode:this.zip64Mode,centralDirOffset:e});t=new Uint8Array(n.totalSize),Ty(this.entries,{zipComment:this.zipComment,zip64Mode:this.zip64Mode,centralDirOffset:e,out:t,offset:0})}catch(e){let t=i(e);this.callback(t,Ja,!0);return}this.callback(null,t,!0)}end(){this.endPending||this.ended||(this.endPending=!0,this.activeFile||this._finalize())}abort(e){if(this.ended)return;let t=n(e);this.ended=!0,this.endPending=!0;try{this.activeFile?.abort(t)}catch{}this.callback(t,Ja,!0)}}}));function My(e){return typeof e==`object`&&`nativeCol`in e&&`nativeRow`in e&&`nativeColOff`in e&&`nativeRowOff`in e}function Ny(e){return typeof e==`object`&&`col`in e&&`row`in e}var Py,Fy=t((()=>{da(),Py=class e{constructor(e,t,n=0){if(this.worksheet=e,!t)this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;else if(typeof t==`string`){let e=E.decodeAddress(t);this.nativeCol=e.col+n,this.nativeColOff=0,this.nativeRow=e.row+n,this.nativeRowOff=0}else My(t)?(this.nativeCol=t.nativeCol??0,this.nativeColOff=t.nativeColOff??0,this.nativeRow=t.nativeRow??0,this.nativeRowOff=t.nativeRowOff??0):Ny(t)?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0)}static asInstance(t){return t==null?null:t instanceof e?t:new e(void 0,t)}get col(){return this.nativeColOff===0?this.nativeCol:this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(e){this.nativeCol=Math.floor(e);let t=e-this.nativeCol;this.nativeColOff=t===0?0:Math.floor(t*this.colWidth)}get row(){return this.nativeRowOff===0?this.nativeRow:this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(e){this.nativeRow=Math.floor(e);let t=e-this.nativeRow;this.nativeRowOff=t===0?0:Math.floor(t*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(this.worksheet.getColumn(this.nativeCol+1).width*1e4):64e4}get rowHeight(){let e=this.worksheet?.getRow(this.nativeRow+1)?.height;return e?Math.floor(e*1e4):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(e){this.nativeCol=e.nativeCol,this.nativeColOff=e.nativeColOff,this.nativeRow=e.nativeRow,this.nativeRowOff=e.nativeRowOff}clone(t){return new e(t??this.worksheet,this.model)}}})),Iy,Ly=t((()=>{da(),Iy=class{constructor(e){this.model=e||{}}add(e,t){return this.model[e]=t}find(e){let t=this.model[e];if(t!==void 0)return t;let n;for(let t of Object.keys(this.model)){if(!t.startsWith(`range:`))continue;n||=E.decodeAddress(e);let r=t.slice(6),i=E.decodeEx(r);if(!(`dimensions`in i))continue;let{tl:a,br:o}=i,s=typeof a==`string`?E.decodeAddress(a):a,c=typeof o==`string`?E.decodeAddress(o):o;if(n.row>=s.row&&n.row<=c.row&&n.col>=s.col&&n.col<=c.col)return this.model[t]}}remove(e){this.model[e]=void 0}}})),Ry,zy=t((()=>{j(),Hf(),Ry=class extends A{get tag(){return`t`}render(e,t){e.openNode(`t`),/^\s|\n|\s$/.test(t)&&e.addAttribute(`xml:space`,`preserve`),e.writeText(pf(t)),e.closeNode()}parseOpen(e){return e.name===`t`?(this.model=``,!0):!1}parseText(e){this.model=this.model?this.model+e:e}parseClose(){let e=this.model;return e.includes(`_x`)&&(this.model=ff(e)),!1}}})),By,Vy=t((()=>{j(),zy(),w_(),By=class e extends A{constructor(e){super(),this.model=e}get tag(){return`r`}get textXform(){return this._textXform||=new Ry}get fontXform(){return this._fontXform||=new C_(e.FONT_OPTIONS)}render(e,t){let n=t||this.model;e.openNode(`r`),n.font&&this.fontXform.render(e,n.font),this.textXform.render(e,n.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`r`:return this.model={},!0;case`t`:return this.parser=this.textXform,this.parser.parseOpen(e),!0;case`rPr`:return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case`r`:return!1;case`t`:return this.model.text=this.parser.model,this.parser=void 0,!0;case`rPr`:return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}static{this.FONT_OPTIONS={tagName:`rPr`,fontNameTag:`rFont`}}}})),Hy,Uy=t((()=>{j(),Vy(),zy(),Hy=class extends A{constructor(e){super(),this.model=e||{type:`note`,note:{texts:[]},ref:``}}get tag(){return`r`}get richTextXform(){return this._richTextXform||=new By,this._richTextXform}get textXform(){return this._textXform||=new Ry,this._textXform}render(e,t){let n=t||this.model;e.openNode(`comment`,{ref:n.ref,authorId:n.authorId??0}),e.openNode(`text`),n&&n.note&&n.note.texts&&n.note.texts.forEach(t=>{this.richTextXform.render(e,t)}),e.closeNode(),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`comment`:return this.model={type:`note`,note:{texts:[]},ref:e.attributes.ref,authorId:e.attributes.authorId==null?void 0:Number(e.attributes.authorId)},!0;case`r`:return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;case`t`:return this.parser=this.textXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser===this._richTextXform?this.model.note.texts.push(this.parser.model):this.model.note.texts.push({text:this.parser.model}),this.parser=void 0),!0;switch(e){case`comment`:return!1;default:return!0}}}})),Wy,Gy=t((()=>{j(),Wy=class extends A{constructor(e){super(),this._model=e||{},this.model={}}get tag(){return this._model?.tag??``}render(e,t,n){(n&&t===n[2]||n&&this.tag===`x:SizeWithCells`&&t===n[1])&&e.leafNode(this.tag)}parseOpen(e){switch(e.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}})),Ky,qy=t((()=>{j(),Ky=class extends A{constructor(e){super(),this._model=e||{},this.text=``}get tag(){return this._model?.tag??``}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(e){switch(e.name){case this.tag:return this.text=``,!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}})),Jy,Yy=t((()=>{j(),Jy=class extends A{constructor(){super(),this.text=``}get tag(){return`x:Anchor`}getAnchorRect(e){let t=Math.floor(e.left),n=Math.floor((e.left-t)*68),r=Math.floor(e.top),i=Math.floor((e.top-r)*18),a=Math.floor(e.right),o=Math.floor((e.right-a)*68),s=Math.floor(e.bottom);return[t,n,r,i,a,o,s,Math.floor((e.bottom-s)*18)]}getDefaultRect(e){let t=e.col,n=Math.max(e.row-2,0);return[t,6,n,14,t+2,2,n+4,16]}render(e,t){let n=t.anchor?this.getAnchorRect(t.anchor):this.getDefaultRect(t.refAddress);e.leafNode(`x:Anchor`,null,n.join(`, `))}parseOpen(e){switch(e.name){case this.tag:return this.text=``,!0;default:return!1}}parseText(e){this.text=e}parseClose(){return!1}}})),Xy,Zy,Qy=t((()=>{j(),Gy(),qy(),Yy(),Xy=[`twoCells`,`oneCells`,`absolute`],Zy=class extends A{constructor(){super(),this._leafText=``,this.map={"x:Anchor":new Jy,"x:Locked":new Ky({tag:`x:Locked`}),"x:LockText":new Ky({tag:`x:LockText`}),"x:SizeWithCells":new Wy({tag:`x:SizeWithCells`}),"x:MoveWithCells":new Wy({tag:`x:MoveWithCells`})},this.model={anchor:[],protection:{},editAs:``}}get tag(){return`x:ClientData`}render(e,t){let{protection:n,editAs:r}=t.note;e.openNode(this.tag,{ObjectType:`Note`}),this.map[`x:MoveWithCells`].render(e,r,Xy),this.map[`x:SizeWithCells`].render(e,r,Xy),this.map[`x:Anchor`].render(e,t),this.map[`x:Locked`].render(e,n.locked),e.leafNode(`x:AutoFill`,null,`False`),this.map[`x:LockText`].render(e,n.lockText),e.leafNode(`x:Row`,null,t.refAddress.row-1),e.leafNode(`x:Column`,null,t.refAddress.col-1),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:``};break;case`x:Row`:case`x:Column`:this._leafName=e.name,this._leafText=``;break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this._leafName?this._leafText+=e:this.parser&&this.parser.parseText(e)}parseClose(e){if(this._leafName){if(e===this._leafName){let t=parseInt(this._leafText,10);e===`x:Row`?this.model.row=t+1:e===`x:Column`&&(this.model.col=t+1),this._leafName=void 0,this._leafText=``}return!0}if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){let e=Object.assign({},this.map[`x:MoveWithCells`].model,this.map[`x:SizeWithCells`].model),t=Object.keys(e).length;this.model.editAs=Xy[t],this.model.anchor=this.map[`x:Anchor`].text,this.model.protection.locked=this.map[`x:Locked`].text,this.model.protection.lockText=this.map[`x:LockText`].text}}})),$y,eb=t((()=>{j(),$y=class extends A{constructor(){super(),this.model={}}get tag(){return`v:textbox`}conversionUnit(e,t,n){return`${(parseFloat(e.toString())*t).toFixed(2)}${n}`}reverseConversionUnit(e){return(e??``).split(`,`).map(e=>Number(parseFloat(this.conversionUnit(parseFloat(e),.1,``)).toFixed(2)))}render(e,t){let n={style:`mso-direction-alt:auto`};if(t&&t.note){let{inset:e}=t.note&&t.note.margins||{};Array.isArray(e)&&(e=e.map(e=>this.conversionUnit(e,10,`mm`)).join(`,`)),e&&(n.inset=e)}e.openNode(`v:textbox`,n),e.leafNode(`div`,{style:`text-align:left`}),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:return this.model={inset:this.reverseConversionUnit(e.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}})),tb,nb=t((()=>{j(),Qy(),eb(),tb=class e extends A{constructor(){super(),this.map={"v:textbox":new $y,"x:ClientData":new Zy}}get tag(){return`v:shape`}render(t,n,r){t.openNode(`v:shape`,e.V_SHAPE_ATTRIBUTES(n,r??0)),t.leafNode(`v:fill`,{color2:`infoBackground [80]`}),t.leafNode(`v:shadow`,{color:`none [81]`,obscured:`t`}),t.leafNode(`v:path`,{"o:connecttype":`none`}),this.map[`v:textbox`].render(t,n),this.map[`x:ClientData`].render(t,n),t.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={margins:{insetmode:e.attributes[`o:insetmode`]},anchor:``,editAs:``,protection:{}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.margins.inset=this.map[`v:textbox`].model&&this.map[`v:textbox`].model.inset,this.model.protection=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.protection,this.model.anchor=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.anchor,this.model.editAs=this.map[`x:ClientData`].model&&this.map[`x:ClientData`].model.editAs,this.map[`x:ClientData`].model&&(this.model.row=this.map[`x:ClientData`].model.row,this.model.col=this.map[`x:ClientData`].model.col),!1;default:return!0}}static{this.V_SHAPE_ATTRIBUTES=(e,t)=>({id:`_x0000_s${1025+t}`,type:`#_x0000_t202`,style:`position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden`,fillcolor:`infoBackground [80]`,strokecolor:`none [81]`,"o:insetmode":e.note.margins&&e.note.margins.insetmode})}}})),rb,ib=t((()=>{da(),ng(),mu(),Uy(),nb(),ag(),rb=class{constructor(e,t,n){this.id=n.id,this.count=0,this._worksheet=e,this._workbook=n.workbook,this._sheetRelsWriter=t}get commentsStream(){return this._commentsStream||=this._workbook._openStream(Cm(this.id)),this._commentsStream}get vmlStream(){return this._vmlStream||=this._workbook._openStream(Tm(this.id)),this._vmlStream}_addRelationships(){let e={Type:D.Comments,Target:Um(this.id)};this._sheetRelsWriter.addRelationship(e);let t={Type:D.VmlDrawing,Target:Wm(this.id)};this.vmlRelId=this._sheetRelsWriter.addRelationship(t)}_addCommentRefs(){this._workbook.commentRefs.push({commentName:`comments${this.id}`,vmlDrawing:`vmlDrawing${this.id}`})}_writeOpen(){this.commentsStream.write(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><authors><author>Author</author></authors><commentList>`),this.vmlStream.write(`<?xml version="1.0" encoding="UTF-8"?><xml xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" /></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter" /><v:path gradientshapeok="t" o:connecttype="rect" /></v:shapetype>`)}_writeComment(e,t){let n=new Hy,r=new ig;n.render(r,e),this.commentsStream.write(r.xml);let i=new tb,a=new ig;i.render(a,e,t),this.vmlStream.write(a.xml)}_writeClose(){this.commentsStream.write(`</commentList></comments>`),this.vmlStream.write(`</xml>`)}addComments(e){e&&e.length&&(this.startedData||=(this._worksheet.comments=[],this._writeOpen(),this._addRelationships(),this._addCommentRefs(),!0),e.forEach(e=>{e.refAddress=E.decodeAddress(e.ref)}),e.forEach(e=>{this._writeComment(e,this.count),this.count+=1}))}commit(){this.count&&(this._writeClose(),this.commentsStream.end(),this.vmlStream.end())}}}));function ab(e){return e.startsWith(`#`)}var ob,sb=t((()=>{j(),ob=class extends A{get tag(){return`hyperlink`}render(e,t){t.target&&ab(t.target)?e.leafNode(`hyperlink`,{ref:t.address,tooltip:t.tooltip,location:t.target.slice(1)}):e.leafNode(`hyperlink`,{ref:t.address,"r:id":t.rId,tooltip:t.tooltip})}parseOpen(e){if(e.name===`hyperlink`){if(this.model={address:e.attributes.ref,rId:e.attributes[`r:id`],tooltip:e.attributes.tooltip},e.attributes.location){let t=e.attributes.location;this.model.target=t.startsWith(`#`)?t:`#${t}`}return!0}return!1}parseText(){}parseClose(){return!1}}})),cb,lb,ub=t((()=>{ng(),mu(),sb(),sf(),cb=class{constructor(e){this.writer=e}push(e){this.writer.addHyperlink(e)}},lb=class{constructor(e){this.id=e.id,this.count=0,this._hyperlinks=[],this._workbook=e.workbook}get stream(){return this._stream||=this._workbook._openStream(xm(this.id)),this._stream}get length(){return this._hyperlinks.length}each(e){return this._hyperlinks.forEach(e)}get hyperlinksProxy(){return this._hyperlinksProxy||=new cb(this)}addHyperlink(e){if(ab(e.target)){this._hyperlinks.push({address:e.address,target:e.target});return}let t={Target:e.target,Type:D.Hyperlink,TargetMode:`External`},n=this._writeRelationship(t);this._hyperlinks.push({rId:n,address:e.address})}addMedia(e){return this._writeRelationship(e)}addRelationship(e){return this._writeRelationship(e)}commit(){this.count&&(this._writeClose(),this.stream.end())}_writeOpen(){this.stream.write(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
405
405
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">`)}_writeRelationship(e){this.count||this._writeOpen();let t=`rId${++this.count}`;return e.TargetMode?this.stream.write(`<Relationship Id="${t}" Type="${qd(e.Type)}" Target="${qd(e.Target)}" TargetMode="${qd(e.TargetMode)}"/>`):this.stream.write(`<Relationship Id="${t}" Type="${qd(e.Type)}" Target="${qd(e.Target)}"/>`),t}_writeClose(){this.stream.write(`</Relationships>`)}}}));function db(e){return Ym(e.name&&e.extension&&e.name.endsWith(`.${e.extension}`)?e.name:`${e.name}.${e.extension}`)}function fb(e){return!!e.link&&e.buffer==null&&e.base64==null&&e.filename==null}function pb(e){let t=/\.([a-zA-Z0-9]{2,5})(?:[?#].*)?$/.exec(e);switch(t?t[1].toLowerCase():``){case`jpg`:case`jpeg`:return`jpeg`;case`gif`:return`gif`;default:return`png`}}function mb(e,t){return fb(t)?{Id:e,Type:D.Image,Target:t.link,TargetMode:`External`}:{Id:e,Type:D.Image,Target:db(t)}}function hb(e,t,n){let r=[],i=[...t],a={};for(let t of e){let e=String(t.imageId),o=n.getBookImage(t.imageId);if(!o)continue;let s=fb(o),c=a[e];c||(c=n.nextRId(i),a[e]=c,i.push(mb(c,o)));let l={picture:{rId:c,...s?{external:!0}:{}},range:t.range};if(t.opacity!==void 0){let e=Math.max(0,Math.min(1,t.opacity));l.picture.alphaModFix=Math.round(e*1e5)}if(t.hyperlinks&&t.hyperlinks.hyperlink){let e=n.nextRId(i);l.picture.hyperlinks={tooltip:t.hyperlinks.tooltip,rId:e},i.push({Id:e,Type:D.Hyperlink,Target:t.hyperlinks.hyperlink,TargetMode:`External`})}r.push(l)}return{anchors:r,rels:i}}function gb(e){return e.filter(e=>e==null?!1:e.range?.pos===void 0?e.range?.br&&e.shape?!0:!(!e.range?.br&&!e.picture&&!e.graphicFrame||e.range?.br&&!e.picture&&!e.shape&&!e.graphicFrame):!!e.picture||!!e.graphicFrame||!!e.shape)}var _b=t((()=>{ng(),mu()}));function vb(e,t,n,r,i){let a=i(e,t)?.style?.border,o=r-t+1,s=n-e+1,c=Array(o),l=Array(o),u=Array(s),d=Array(s),f=!1;for(let o=t;o<=r;o++){let r=o-t,s=i(e,o)?.style?.border;c[r]=s?.top||a?.top,n===e?l[r]=s?.bottom||a?.bottom:l[r]=i(n,o)?.style?.border?.bottom||a?.bottom,(c[r]||l[r])&&(f=!0)}for(let o=e;o<=n;o++){let n=o-e,s=i(o,t)?.style?.border;u[n]=s?.left||a?.left,r===t?d[n]=s?.right||a?.right:d[n]=i(o,r)?.style?.border?.right||a?.right,(u[n]||d[n])&&(f=!0)}let p=a?.diagonal,m=a?.color;if(!(!f&&!p))return{topEdges:c,bottomEdges:l,leftEdges:u,rightEdges:d,diagonal:p,color:m}}function yb(e,t,n,r,i,a){let{topEdges:o,bottomEdges:s,leftEdges:c,rightEdges:l,diagonal:u,color:d}=i,f=a(e,t).style;for(let i=e;i<=n;i++)for(let p=t;p<=r;p++){let m=a(i,p),h=kd(f)||{},g={},_=!1;i===e&&o[p-t]&&(g.top=o[p-t],_=!0),i===n&&s[p-t]&&(g.bottom=s[p-t],_=!0),p===t&&c[i-e]&&(g.left=c[i-e],_=!0),p===r&&l[i-e]&&(g.right=l[i-e],_=!0),u&&(g.diagonal=u,_=!0),_?(d&&(g.color=d),h.border=g):delete h.border,m.style=h}}var bb=t((()=>{Ad()}));function xb(e){let t=new Uint8Array(4);return t[0]=e&255,t[1]=e>>8&255,t[2]=e>>16&255,t[3]=e>>24&255,t}var Sb,Cb=t((()=>{lr(),ic(),If(),Sb={async hash(e,...t){return Qs(e,Zn(t))},async convertPasswordToHash(e,t,n,r){let i=Tf(e),a=cf(n),o=await this.hash(t,a,i);for(let e=0;e<r;e++)o=await this.hash(t,o,xb(e));return wf(o)},randomBytes(e){return Zs(e)}}}));async function wb(e,t){let n={sheet:!0};return t&&`spinCount`in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(n.algorithmName=`SHA-512`,n.saltValue=wf(Sb.randomBytes(16)),n.spinCount=t&&`spinCount`in t?t.spinCount:1e5,n.hashValue=await Sb.convertPasswordToHash(e,`SHA-512`,n.saltValue,n.spinCount)),t&&(Object.assign(n,t),!e&&`spinCount`in t&&delete n.spinCount),n}var Tb=t((()=>{Cb(),Hf()})),Eb,Db,Ob=t((()=>{Eb=new TextEncoder,Db=class{constructor(e){this._buf=new Uint8Array(e&&e.size||16384),this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||=this._buf.slice(0,this._inPos),this._buffer}reset(e){e??=0,this._buffer=void 0,this._inPos=e}_grow(e){let t=this._buf.length*2;for(;t<e;)t*=2;let n=new Uint8Array(t);n.set(this._buf),this._buf=n}addText(e){this._buffer=void 0;let t=this._inPos+e.length;t>this._buf.length-4&&this._grow(t);let n=this._buf.subarray(this._inPos),r=Eb.encodeInto(e,n);if(r.read<e.length){let t=e.length-r.read;this._grow(this._inPos+r.written+t*3);let n=Eb.encodeInto(e.substring(r.read),this._buf.subarray(this._inPos+r.written));this._inPos+=r.written+n.written}else this._inPos+=r.written}addStringBuf(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),this._buf.set(e._buf.subarray(0,e.length),this._inPos),this._inPos+=e.length)}}})),kb=t((()=>{Ob()})),Ab,jb=t((()=>{da(),j(),Ab=class extends A{get tag(){return`autoFilter`}render(e,t){if(t)if(typeof t==`string`)e.leafNode(`autoFilter`,{ref:t});else{let n=function(e){return typeof e==`string`?e:E.getAddress(e.row,e.col).address},r=n(t.from),i=n(t.to);r&&i&&e.leafNode(`autoFilter`,{ref:`${r}:${i}`})}}parseOpen(e){e.name===`autoFilter`&&(this.model=e.attributes.ref)}}})),Mb,Nb=t((()=>{j(),Mb=class extends A{createNewModel(e){return{}}parseOpen(e){return this.parser=this.parser||this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.model=this.createNewModel(e),!0):!1}parseText(e){this.parser&&this.parser.parseText(e)}onParserClose(e,t){this.model[e]=t.model}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.onParserClose(e,this.parser),this.parser=void 0),!0):e!==this.tag}get tag(){return``}}})),Pb,Fb=t((()=>{j(),Pb=class extends A{get tag(){return`cfvo`}render(e,t){e.leafNode(this.tag,{type:t.type,val:t.value})}parseOpen(e){this.model={type:e.attributes.type,value:A.toFloatValue(e.attributes.val)}}parseClose(e){return e!==this.tag}}})),Ib,Lb=t((()=>{Nb(),Fb(),t_(),Ib=class extends Mb{constructor(){super(),this.map={cfvo:this.cfvoXform=new Pb,color:this.colorXform=new e_}}get tag(){return`colorScale`}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.color.forEach(t=>{this.colorXform.render(e,t)}),e.closeNode()}createNewModel(e){return{cfvo:[],color:[]}}onParserClose(e,t){this.model[e].push(t.model)}}})),Rb,zb=t((()=>{Nb(),Fb(),t_(),Rb=class extends Mb{constructor(){super(),this.map={cfvo:this.cfvoXform=new Pb,color:this.colorXform=new e_}}get tag(){return`dataBar`}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.colorXform.render(e,t.color),e.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(e,t){switch(e){case`cfvo`:this.model.cfvo.push(t.model);break;case`color`:this.model.color=t.model;break}}}})),Bb,Vb,Hb,Ub=t((()=>{j(),Nb(),Bb=class extends A{get tag(){return`x14:id`}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=``}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}},Vb=class extends Mb{constructor(){super(),this.map={"x14:id":this.idXform=new Bb}}get tag(){return`ext`}render(e,t){e.openNode(this.tag,{uri:`{B025F937-C7B1-47D3-B67F-A62EFF666E3E}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),this.idXform.render(e,t.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model.x14Id=t.model}},Hb=class extends Mb{constructor(){super(),this.map={ext:new Vb}}get tag(){return`extLst`}render(e,t){t.x14Id&&(e.openNode(this.tag),this.map.ext.render(e,t),e.closeNode())}createNewModel(){return{}}onParserClose(e,t){Object.assign(this.model,t.model)}}})),Wb,Gb=t((()=>{j(),Wb=class extends A{get tag(){return`formula`}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=``}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}})),Kb,qb=t((()=>{j(),Nb(),Fb(),Kb=class extends Mb{constructor(){super(),this.map={cfvo:this.cfvoXform=new Pb}}get tag(){return`iconSet`}render(e,t){e.openNode(this.tag,{iconSet:A.toStringAttribute(t.iconSet,`3TrafficLights`),reverse:A.toBoolAttribute(t.reverse,!1),showValue:A.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),e.closeNode()}createNewModel({attributes:e}){return{iconSet:A.toStringValue(e.iconSet,`3TrafficLights`),reverse:A.toBoolValue(e.reverse),showValue:A.toBoolValue(e.showValue),cfvo:[]}}onParserClose(e,t){this.model[e].push(t.model)}}})),Jb,Yb,Xb,Zb,Qb,$b=t((()=>{pa(),j(),Nb(),Lb(),zb(),Ub(),Gb(),qb(),Jb={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},Yb=e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];let{tl:t}=new fa(e.ref);switch(e.operator){case`containsText`:return`NOT(ISERROR(SEARCH("${e.text}",${t})))`;case`containsBlanks`:return`LEN(TRIM(${t}))=0`;case`notContainsBlanks`:return`LEN(TRIM(${t}))>0`;case`containsErrors`:return`ISERROR(${t})`;case`notContainsErrors`:return`NOT(ISERROR(${t}))`;default:return}},Xb=e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];let{tl:t}=new fa(e.ref);switch(e.timePeriod){case`thisWeek`:return`AND(TODAY()-ROUNDDOWN(${t},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${t},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case`lastWeek`:return`AND(TODAY()-ROUNDDOWN(${t},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${t},0)<(WEEKDAY(TODAY())+7))`;case`nextWeek`:return`AND(ROUNDDOWN(${t},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${t},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case`yesterday`:return`FLOOR(${t},1)=TODAY()-1`;case`today`:return`FLOOR(${t},1)=TODAY()`;case`tomorrow`:return`FLOOR(${t},1)=TODAY()+1`;case`last7Days`:return`AND(TODAY()-FLOOR(${t},1)<=6,FLOOR(${t},1)<=TODAY())`;case`lastMonth`:return`AND(MONTH(${t})=MONTH(EDATE(TODAY(),0-1)),YEAR(${t})=YEAR(EDATE(TODAY(),0-1)))`;case`thisMonth`:return`AND(MONTH(${t})=MONTH(TODAY()),YEAR(${t})=YEAR(TODAY()))`;case`nextMonth`:return`AND(MONTH(${t})=MONTH(EDATE(TODAY(),0+1)),YEAR(${t})=YEAR(EDATE(TODAY(),0+1)))`;default:return}},Zb=e=>{let{type:t,operator:n}=e;switch(t){case`containsText`:case`containsBlanks`:case`notContainsBlanks`:case`containsErrors`:case`notContainsErrors`:return{type:`containsText`,operator:t};default:return{type:t,operator:n}}},Qb=class e extends Mb{constructor(){super(),this.map={dataBar:this.databarXform=new Rb,extLst:this.extLstRefXform=new Hb,formula:this.formulaXform=new Wb,colorScale:this.colorScaleXform=new Ib,iconSet:this.iconSetXform=new Kb}}get tag(){return`cfRule`}static isPrimitive(e){return!(e.type===`iconSet`&&(e.custom||Jb[e.iconSet]))}render(e,t){switch(t.type){case`expression`:this.renderExpression(e,t);break;case`cellIs`:this.renderCellIs(e,t);break;case`top10`:this.renderTop10(e,t);break;case`aboveAverage`:this.renderAboveAverage(e,t);break;case`dataBar`:this.renderDataBar(e,t);break;case`colorScale`:this.renderColorScale(e,t);break;case`iconSet`:this.renderIconSet(e,t);break;case`containsText`:this.renderText(e,t);break;case`timePeriod`:this.renderTimePeriod(e,t);break}}renderExpression(e,t){e.openNode(this.tag,{type:`expression`,dxfId:t.dxfId,priority:t.priority}),this.formulaXform.render(e,t.formulae[0]),e.closeNode()}renderCellIs(e,t){e.openNode(this.tag,{type:`cellIs`,dxfId:t.dxfId,priority:t.priority,operator:t.operator}),t.formulae.forEach(t=>{this.formulaXform.render(e,t)}),e.closeNode()}renderTop10(e,t){e.leafNode(this.tag,{type:`top10`,dxfId:t.dxfId,priority:t.priority,percent:A.toBoolAttribute(t.percent,!1),bottom:A.toBoolAttribute(t.bottom,!1),rank:A.toIntValue(t.rank,10)})}renderAboveAverage(e,t){e.leafNode(this.tag,{type:`aboveAverage`,dxfId:t.dxfId,priority:t.priority,aboveAverage:A.toBoolAttribute(t.aboveAverage,!0)})}renderDataBar(e,t){e.openNode(this.tag,{type:`dataBar`,priority:t.priority}),this.databarXform.render(e,t),this.extLstRefXform.render(e,t),e.closeNode()}renderColorScale(e,t){e.openNode(this.tag,{type:`colorScale`,priority:t.priority}),this.colorScaleXform.render(e,t),e.closeNode()}renderIconSet(t,n){e.isPrimitive(n)&&(t.openNode(this.tag,{type:`iconSet`,priority:n.priority}),this.iconSetXform.render(t,n),t.closeNode())}renderText(e,t){e.openNode(this.tag,{type:t.operator,dxfId:t.dxfId,priority:t.priority,operator:A.toStringAttribute(t.operator,`containsText`)});let n=Yb(t);n&&this.formulaXform.render(e,n),e.closeNode()}renderTimePeriod(e,t){e.openNode(this.tag,{type:`timePeriod`,dxfId:t.dxfId,priority:t.priority,timePeriod:t.timePeriod});let n=Xb(t);n&&this.formulaXform.render(e,n),e.closeNode()}createNewModel({attributes:e}){return{...Zb(e),dxfId:A.toIntValue(e.dxfId),priority:A.toIntValue(e.priority),timePeriod:e.timePeriod,percent:A.toBoolValue(e.percent),bottom:A.toBoolValue(e.bottom),rank:A.toIntValue(e.rank),aboveAverage:A.toBoolValue(e.aboveAverage)}}onParserClose(e,t){switch(e){case`dataBar`:case`extLst`:case`colorScale`:case`iconSet`:Object.assign(this.model,t.model);break;case`formula`:this.model.formulae=this.model.formulae??[],this.model.formulae.push(t.model);break}}}})),ex,tx=t((()=>{Nb(),$b(),ex=class extends Mb{constructor(){super(),this.map={cfRule:new Qb}}get tag(){return`conditionalFormatting`}render(e,t){t.rules.some(Qb.isPrimitive)&&(e.openNode(this.tag,{sqref:t.ref}),t.rules.forEach(n=>{Qb.isPrimitive(n)&&(n.ref=t.ref,this.map.cfRule.render(e,n))}),e.closeNode())}createNewModel({attributes:e}){return{ref:e.sqref,rules:[]}}onParserClose(e,t){this.model.rules.push(t.model)}}})),nx,rx=t((()=>{j(),tx(),nx=class extends A{constructor(){super(),this.cfXform=new ex}get tag(){return`conditionalFormatting`}reset(){this.model=[]}prepare(e,t){let n=e.reduce((e,t)=>Math.max(e,...t.rules.map(e=>e.priority??0)),1);e.forEach(e=>{e.rules.forEach(e=>{e.priority||=n++,e.style&&(e.dxfId=t.styles.addDxfStyle(e.style)),e.type===`dataBar`&&((!e.cfvo||e.cfvo.length<2)&&(e.cfvo=[{type:`min`},{type:`max`}]),e.color||={argb:`FF638EC6`})})})}render(e,t){t.forEach(t=>{this.cfXform.render(e,t)})}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`conditionalFormatting`:return this.parser=this.cfXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?this.parser.parseClose(e)?!0:(this.model.push(this.parser.model),this.parser=void 0,!1):!1}reconcile(e,t){e.forEach(e=>{e.rules.forEach(e=>{e.dxfId!==void 0&&(e.style=t.styles.getDxfStyle(e.dxfId),delete e.dxfId)})})}}})),ix,ax=t((()=>{j(),ix=class extends A{get tag(){return`brk`}render(e,t){e.leafNode(`brk`,t)}parseOpen(e){if(e.name===`brk`){let{id:t,max:n,man:r,min:i}=e.attributes;return this.model={id:+t,max:+n,man:+r},i!==void 0&&(this.model.min=+i),!0}return!1}parseText(){}parseClose(){return!1}}})),ox,sx=t((()=>{jg(),ax(),ox=class extends Ag{constructor(){super({tag:`colBreaks`,count:!0,childXform:new ix})}render(e,t){if(t&&t.length){e.openNode(this.tag,this.$),e.addAttribute(this.$count,t.length),e.addAttribute(`manualBreakCount`,t.length);let{childXform:n}=this;for(let r of t)n.render(e,r);e.closeNode()}}}})),cx,lx=t((()=>{j(),Hf(),cx=class extends A{get tag(){return`col`}prepare(e,t){let n=t.styles.addStyleModel(e.style||{});n&&(e.styleId=n)}render(e,t){e.openNode(`col`),e.addAttribute(`min`,t.min),e.addAttribute(`max`,t.max),t.width&&e.addAttribute(`width`,t.width),t.styleId&&e.addAttribute(`style`,t.styleId),t.hidden&&e.addAttribute(`hidden`,`1`),t.bestFit&&e.addAttribute(`bestFit`,`1`),t.outlineLevel&&e.addAttribute(`outlineLevel`,t.outlineLevel),t.collapsed&&e.addAttribute(`collapsed`,`1`),e.addAttribute(`customWidth`,`1`),e.closeNode()}parseOpen(e){if(e.name===`col`){let t=this.model={min:parseInt(e.attributes.min??`0`,10),max:parseInt(e.attributes.max??`0`,10),width:e.attributes.width===void 0?void 0:parseFloat(e.attributes.width??`0`)};return e.attributes.style&&(t.styleId=parseInt(e.attributes.style,10)),vf(e.attributes.hidden)&&(t.hidden=!0),vf(e.attributes.bestFit)&&(t.bestFit=!0),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),vf(e.attributes.collapsed)&&(t.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(e,t){e.styleId!==void 0&&(e.style=t.styles.getStyleModel(e.styleId))}}}));function ux(e,t,n,r){let i=t[n];i===void 0?r!==void 0&&(e[n]=r):e[n]=i}function dx(e,t,n,r){let i=t[n];i===void 0?r!==void 0&&(e[n]=r):e[n]=vf(i)}function fx(e){if(!e)return[];let t=[],n={};for(let[r,i]of Object.entries(e))if(i!=null)if(r.startsWith(`range:`)){let e=r.slice(6),{sqref:n,...a}=i;t.push({...a,sqref:e})}else n[r]=i;if(Object.keys(n).length===0)return t;let r=Object.entries(n).map(([e,t])=>({address:e,dataValidation:t,marked:!1})).sort((e,t)=>E.compareAddress(e.address,t.address)),i=Object.fromEntries(r.map(e=>[e.address,e])),a=(e,t,r)=>{for(let i=0;i<t;i++){let t=E.encodeAddress(e.row+i,r);if(!n[t]||!jd(n[e.address],n[t]))return!1}return!0},o=r.map(e=>{if(!e.marked){let t=E.decodeEx(e.address);if(t.dimensions)return i[t.dimensions].marked=!0,{...e.dataValidation,sqref:e.address};let r=1,o=E.encodeAddress(t.row+r,t.col);for(;n[o]&&jd(e.dataValidation,n[o]);)r++,o=E.encodeAddress(t.row+r,t.col);let s=1;for(;a(t,r,t.col+s);)s++;for(let e=0;e<r;e++)for(let n=0;n<s;n++)o=E.encodeAddress(t.row+e,t.col+n),i[o].marked=!0;if(r>1||s>1){let n=t.row+(r-1),i=t.col+(s-1);return{...e.dataValidation,sqref:`${e.address}:${E.encodeAddress(n,i)}`}}return{...e.dataValidation,sqref:e.address}}return null}).filter(Boolean);return[...t,...o]}var px,mx=t((()=>{da(),Ld(),j(),Hf(),px=class extends A{get tag(){return`dataValidations`}render(e,t){let n=fx(t);n.length&&(e.openNode(`dataValidations`,{count:n.length}),n.forEach(t=>{e.openNode(`dataValidation`),t.type!==`any`&&(e.addAttribute(`type`,t.type),t.operator&&t.type!==`list`&&t.operator!==`between`&&e.addAttribute(`operator`,t.operator),t.allowBlank&&e.addAttribute(`allowBlank`,`1`)),t.showInputMessage&&e.addAttribute(`showInputMessage`,`1`),t.promptTitle&&e.addAttribute(`promptTitle`,t.promptTitle),t.prompt&&e.addAttribute(`prompt`,t.prompt),t.showErrorMessage&&e.addAttribute(`showErrorMessage`,`1`),t.errorStyle&&e.addAttribute(`errorStyle`,t.errorStyle),t.errorTitle&&e.addAttribute(`errorTitle`,t.errorTitle),t.error&&e.addAttribute(`error`,t.error),e.addAttribute(`sqref`,t.sqref),(t.formulae??[]).forEach((n,r)=>{e.openNode(`formula${r+1}`),t.type===`date`?e.writeText(lf(new Date(n))):e.writeText(n),e.closeNode()}),e.closeNode()}),e.closeNode())}parseOpen(e){switch(e.name){case`dataValidations`:return this.model={},!0;case`dataValidation`:{this._address=e.attributes.sqref;let t={type:e.attributes.type??`any`,formulae:[]};switch(e.attributes.type&&dx(t,e.attributes,`allowBlank`),dx(t,e.attributes,`showInputMessage`),dx(t,e.attributes,`showErrorMessage`),t.type){case`any`:case`list`:case`custom`:break;default:ux(t,e.attributes,`operator`,`between`);break}return ux(t,e.attributes,`promptTitle`),ux(t,e.attributes,`prompt`),ux(t,e.attributes,`errorStyle`),ux(t,e.attributes,`errorTitle`),ux(t,e.attributes,`error`),this._dataValidation=t,!0}case`formula1`:case`formula2`:return this._formula=[],!0;default:return!1}}parseText(e){this._formula&&this._formula.push(e)}parseClose(e){switch(e){case`dataValidations`:return!1;case`dataValidation`:return(!this._dataValidation.formulae||!this._dataValidation.formulae.length)&&(delete this._dataValidation.formulae,delete this._dataValidation.operator),this._address.split(/\s+/g).forEach(e=>{e.includes(`:`)?this.model[`range:${e}`]=this._dataValidation:this.model[e]=this._dataValidation}),!0;case`formula1`:case`formula2`:{let e=this._formula.join(``);switch(this._dataValidation.type){case`whole`:case`textLength`:e=parseInt(e,10);break;case`decimal`:e=parseFloat(e);break;case`date`:e=uf(parseFloat(e));break;default:break}return this._dataValidation.formulae.push(e),this._formula=void 0,!0}default:return!0}}}})),hx,gx=t((()=>{j(),hx=class extends A{get tag(){return`drawing`}render(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[`r:id`]},!0;default:return!1}}parseText(){}parseClose(){return!1}}}));function _x(e){let t={type:e.type,sparklines:e.sparklines};return e.lineWeight!==void 0&&(t.lineWeight=e.lineWeight),e.markers!==void 0&&(t.markers=e.markers),e.high!==void 0&&(t.high=e.high),e.low!==void 0&&(t.low=e.low),e.first!==void 0&&(t.first=e.first),e.last!==void 0&&(t.last=e.last),e.negative!==void 0&&(t.negative=e.negative),e.lineColor&&(t.colorSeries=vx(e.lineColor)),e.negativeColor&&(t.colorNegative=vx(e.negativeColor)),e.axisColor&&(t.colorAxis=vx(e.axisColor)),e.markerColor&&(t.colorMarkers=vx(e.markerColor)),e.highColor&&(t.colorHigh=vx(e.highColor)),e.lowColor&&(t.colorLow=vx(e.lowColor)),e.firstColor&&(t.colorFirst=vx(e.firstColor)),e.lastColor&&(t.colorLast=vx(e.lastColor)),e.minAxisType&&(t.minAxisType=e.minAxisType),e.maxAxisType&&(t.maxAxisType=e.maxAxisType),e.manualMin!==void 0&&(t.manualMin=e.manualMin),e.manualMax!==void 0&&(t.manualMax=e.manualMax),e.displayXAxis!==void 0&&(t.displayXAxis=e.displayXAxis),e.rightToLeft!==void 0&&(t.rightToLeft=e.rightToLeft),e.displayEmptyCellsAs&&(t.displayEmptyCellsAs=e.displayEmptyCellsAs),e.dateAxis&&(t.dateAxis=e.dateAxis),t}function vx(e){return{rgb:e.replace(/^#/,``).toUpperCase()}}function yx(e){if(!e||e.length===0)return``;let t=[];t.push(`<x14:sparklineGroups xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">`);for(let n of e)t.push(bx(n));return t.push(`</x14:sparklineGroups>`),t.join(``)}function bx(e){let t=[];e.type!==void 0&&e.type!==`line`&&t.push(`type="${e.type}"`),e.lineWeight!==void 0&&t.push(`lineWeight="${e.lineWeight}"`),e.displayEmptyCellsAs&&t.push(`displayEmptyCellsAs="${e.displayEmptyCellsAs}"`),e.markers&&t.push(`markers="1"`),e.high&&t.push(`high="1"`),e.low&&t.push(`low="1"`),e.first&&t.push(`first="1"`),e.last&&t.push(`last="1"`),e.negative&&t.push(`negative="1"`),e.displayXAxis&&t.push(`displayXAxis="1"`),e.displayHidden&&t.push(`displayHidden="1"`),e.minAxisType&&e.minAxisType!==`individual`&&t.push(`minAxisType="${e.minAxisType}"`),e.maxAxisType&&e.maxAxisType!==`individual`&&t.push(`maxAxisType="${e.maxAxisType}"`),e.manualMin!==void 0&&t.push(`manualMin="${e.manualMin}"`),e.manualMax!==void 0&&t.push(`manualMax="${e.manualMax}"`),e.rightToLeft&&t.push(`rightToLeft="1"`);let n=[];n.push(`<x14:sparklineGroup${t.length>0?` ${t.join(` `)}`:``}>`),e.colorSeries&&n.push(`<x14:colorSeries ${xx(e.colorSeries)}/>`),e.colorNegative&&n.push(`<x14:colorNegative ${xx(e.colorNegative)}/>`),e.colorAxis&&n.push(`<x14:colorAxis ${xx(e.colorAxis)}/>`),e.colorMarkers&&n.push(`<x14:colorMarkers ${xx(e.colorMarkers)}/>`),e.colorFirst&&n.push(`<x14:colorFirst ${xx(e.colorFirst)}/>`),e.colorLast&&n.push(`<x14:colorLast ${xx(e.colorLast)}/>`),e.colorHigh&&n.push(`<x14:colorHigh ${xx(e.colorHigh)}/>`),e.colorLow&&n.push(`<x14:colorLow ${xx(e.colorLow)}/>`),e.dateAxis&&n.push(`<xm:f>${Sx(e.dateAxis)}</xm:f>`),n.push(`<x14:sparklines>`);for(let t of e.sparklines)n.push(`<x14:sparkline>`),n.push(`<xm:f>${Sx(t.dataRef)}</xm:f>`),n.push(`<xm:sqref>${Sx(t.cellRef)}</xm:sqref>`),n.push(`</x14:sparkline>`);return n.push(`</x14:sparklines>`),n.push(`</x14:sparklineGroup>`),n.join(``)}function xx(e){let t=[];return e.rgb&&t.push(`rgb="${e.rgb}"`),e.theme!==void 0&&t.push(`theme="${e.theme}"`),e.tint!==void 0&&t.push(`tint="${e.tint}"`),e.auto&&t.push(`auto="1"`),t.join(` `)}function Sx(e){return qd(e)}function Cx(e){let t=[],n=/<x14:sparklineGroup\b([^>]*?)(?:\/>|>([\s\S]*?)<\/x14:sparklineGroup>)/g,r;for(;(r=n.exec(e))!==null;){let e=wx(r[1]??``,r[2]??``);t.push(e)}return t}function wx(e,t){let n={sparklines:[]},r=/(\w+)="([^"]*)"/g,i;for(;(i=r.exec(e))!==null;){let[,e,t]=i;switch(e){case`type`:n.type=t;break;case`lineWeight`:n.lineWeight=parseFloat(t);break;case`displayEmptyCellsAs`:n.displayEmptyCellsAs=t;break;case`markers`:n.markers=t===`1`;break;case`high`:n.high=t===`1`;break;case`low`:n.low=t===`1`;break;case`first`:n.first=t===`1`;break;case`last`:n.last=t===`1`;break;case`negative`:n.negative=t===`1`;break;case`displayXAxis`:n.displayXAxis=t===`1`;break;case`displayHidden`:n.displayHidden=t===`1`;break;case`minAxisType`:n.minAxisType=t;break;case`maxAxisType`:n.maxAxisType=t;break;case`manualMin`:n.manualMin=parseFloat(t);break;case`manualMax`:n.manualMax=parseFloat(t);break;case`rightToLeft`:n.rightToLeft=t===`1`;break}}for(let e of[`colorSeries`,`colorNegative`,`colorAxis`,`colorMarkers`,`colorFirst`,`colorLast`,`colorHigh`,`colorLow`]){let r=Dx.get(e).exec(t);r&&(n[e]=Tx(r[1]))}let a=/<x14:sparkline>\s*<xm:f>([\s\S]*?)<\/xm:f>\s*<xm:sqref>([\s\S]*?)<\/xm:sqref>\s*<\/x14:sparkline>/g,o;for(;(o=a.exec(t))!==null;)n.sparklines.push({dataRef:Ex(o[1]),cellRef:Ex(o[2])});return n}function Tx(e){let t={},n=/(\w+)="([^"]*)"/g,r;for(;(r=n.exec(e))!==null;){let[,e,n]=r;switch(e){case`rgb`:t.rgb=n;break;case`theme`:t.theme=parseInt(n,10);break;case`tint`:t.tint=parseFloat(n);break;case`auto`:t.auto=n===`1`;break}}return t}function Ex(e){return e.replace(/&(?:amp|lt|gt|quot|apos);/g,e=>{switch(e){case`&`:return`&`;case`<`:return`<`;case`>`:return`>`;case`"`:return`"`;case`'`:return`'`;default:return e}})}var Dx,Ox=t((()=>{sf(),Dx=new Map([[`colorSeries`,/<x14:colorSeries\b([^/]*)\/>/],[`colorNegative`,/<x14:colorNegative\b([^/]*)\/>/],[`colorAxis`,/<x14:colorAxis\b([^/]*)\/>/],[`colorMarkers`,/<x14:colorMarkers\b([^/]*)\/>/],[`colorFirst`,/<x14:colorFirst\b([^/]*)\/>/],[`colorLast`,/<x14:colorLast\b([^/]*)\/>/],[`colorHigh`,/<x14:colorHigh\b([^/]*)\/>/],[`colorLow`,/<x14:colorLow\b([^/]*)\/>/]])})),kx=t((()=>{Ox()})),Ax,jx=t((()=>{j(),Ax=class extends A{get tag(){return`xm:f`}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=``}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}})),Mx,Nx=t((()=>{Nb(),jx(),Mx=class extends Mb{constructor(){super(),this.map={"xm:f":this.fExtXform=new Ax}}get tag(){return`x14:cfvo`}render(e,t){e.openNode(this.tag,{type:t.type}),t.value!==void 0&&this.fExtXform.render(e,t.value),e.closeNode()}createNewModel(e){return{type:e.attributes.type}}onParserClose(e,t){switch(e){case`xm:f`:this.model.value=t.model?parseFloat(t.model):0;break}}}})),Px,Fx=t((()=>{j(),Nb(),Nx(),t_(),Px=class extends Mb{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new Mx,"x14:borderColor":this.borderColorXform=new e_(`x14:borderColor`),"x14:negativeBorderColor":this.negativeBorderColorXform=new e_(`x14:negativeBorderColor`),"x14:negativeFillColor":this.negativeFillColorXform=new e_(`x14:negativeFillColor`),"x14:axisColor":this.axisColorXform=new e_(`x14:axisColor`)}}static isExt(e){return!0}get tag(){return`x14:dataBar`}render(e,t){e.openNode(this.tag,{minLength:A.toIntAttribute(t.minLength,0,!0),maxLength:A.toIntAttribute(t.maxLength,100,!0),border:A.toBoolAttribute(t.border,!1),gradient:A.toBoolAttribute(t.gradient,!0),negativeBarColorSameAsPositive:A.toBoolAttribute(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:A.toBoolAttribute(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:A.toAttribute(t.axisPosition,`auto`),direction:A.toAttribute(t.direction,`leftToRight`)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.borderColorXform.render(e,t.borderColor),this.negativeBorderColorXform.render(e,t.negativeBorderColor),this.negativeFillColorXform.render(e,t.negativeFillColor),this.axisColorXform.render(e,t.axisColor),e.closeNode()}createNewModel({attributes:e}){return{cfvo:[],minLength:A.toIntValue(e.minLength,0),maxLength:A.toIntValue(e.maxLength,100),border:A.toBoolValue(e.border,!1),gradient:A.toBoolValue(e.gradient,!0),negativeBarColorSameAsPositive:A.toBoolValue(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:A.toBoolValue(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:A.toStringValue(e.axisPosition,`auto`),direction:A.toStringValue(e.direction,`leftToRight`)}}onParserClose(e,t){let[,n]=e.split(`:`);switch(n){case`cfvo`:this.model.cfvo.push(t.model);break;default:this.model[n]=t.model;break}}}})),Ix,Lx=t((()=>{j(),Ix=class extends A{get tag(){return`x14:cfIcon`}render(e,t){e.leafNode(this.tag,{iconSet:t.iconSet,iconId:t.iconId})}parseOpen({attributes:e}){this.model={iconSet:e.iconSet,iconId:A.toIntValue(e.iconId)}}parseClose(e){return e!==this.tag}}})),Rx,zx=t((()=>{j(),Nb(),Lx(),Nx(),Rx=class extends Mb{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new Mx,"x14:cfIcon":this.cfIconXform=new Ix}}get tag(){return`x14:iconSet`}render(e,t){e.openNode(this.tag,{iconSet:A.toStringAttribute(t.iconSet),reverse:A.toBoolAttribute(t.reverse,!1),showValue:A.toBoolAttribute(t.showValue,!0),custom:A.toBoolAttribute(t.icons,!1)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.icons&&t.icons.forEach((t,n)=>{t.iconId=n,this.cfIconXform.render(e,t)}),e.closeNode()}createNewModel({attributes:e}){return{cfvo:[],iconSet:A.toStringValue(e.iconSet,`3TrafficLights`),reverse:A.toBoolValue(e.reverse,!1),showValue:A.toBoolValue(e.showValue,!0)}}onParserClose(e,t){let[,n]=e.split(`:`);switch(n){case`cfvo`:this.model.cfvo.push(t.model);break;case`cfIcon`:this.model.icons||(this.model.icons=[]),this.model.icons.push(t.model);break;default:this.model[n]=t.model;break}}}}));function Bx(e){return e.toString(16).padStart(2,`0`)}function Vx(e){e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=e;return Bx(t[0])+Bx(t[1])+Bx(t[2])+Bx(t[3])+`-`+Bx(t[4])+Bx(t[5])+`-`+Bx(t[6])+Bx(t[7])+`-`+Bx(t[8])+Bx(t[9])+`-`+Bx(t[10])+Bx(t[11])+Bx(t[12])+Bx(t[13])+Bx(t[14])+Bx(t[15])}function Hx(){let e=globalThis.crypto;if(e?.randomUUID)return e.randomUUID();let t=new Uint8Array(16);if(e?.getRandomValues)return e.getRandomValues(t),Vx(t);for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return Vx(t)}var Ux=t((()=>{})),Wx,Gx,Kx=t((()=>{j(),Nb(),Fx(),zx(),Ux(),Wx={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},Gx=class e extends Mb{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new Px,"x14:iconSet":this.iconSetXform=new Rx}}get tag(){return`x14:cfRule`}static isExt(e){return e.type===`dataBar`?Px.isExt(e):!!(e.type===`iconSet`&&(e.custom||Wx[e.iconSet]))}static prepareRule(t){e.isExt(t)&&!t.x14Id&&(t.x14Id=`{${Hx()}}`.toUpperCase())}prepare(t){e.prepareRule(t)}render(t,n){if(e.isExt(n))switch(n.type){case`dataBar`:this.renderDataBar(t,n);break;case`iconSet`:this.renderIconSet(t,n);break}}renderDataBar(e,t){e.openNode(this.tag,{type:`dataBar`,id:t.x14Id}),this.databarXform.render(e,t),e.closeNode()}renderIconSet(e,t){e.openNode(this.tag,{type:`iconSet`,priority:t.priority,id:t.x14Id??`{${Hx()}}`}),this.iconSetXform.render(e,t),e.closeNode()}createNewModel({attributes:e}){return{type:e.type,x14Id:e.id,priority:A.toIntValue(e.priority)}}onParserClose(e,t){Object.assign(this.model,t.model)}}})),qx,Jx=t((()=>{j(),qx=class extends A{get tag(){return`xm:sqref`}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=``}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}})),Yx,Xx=t((()=>{Nb(),Kx(),Jx(),Yx=class extends Mb{constructor(){super(),this.map={"xm:sqref":this.sqRef=new qx,"x14:cfRule":this.cfRule=new Gx}}get tag(){return`x14:conditionalFormatting`}prepare(e){e.rules.forEach(e=>{this.cfRule.prepare(e)})}render(e,t){t.rules.some(Gx.isExt)&&(e.openNode(this.tag,{"xmlns:xm":`http://schemas.microsoft.com/office/excel/2006/main`}),t.rules.filter(Gx.isExt).forEach(t=>this.cfRule.render(e,t)),this.sqRef.render(e,t.ref),e.closeNode())}createNewModel(){return{rules:[]}}onParserClose(e,t){switch(e){case`xm:sqref`:this.model.ref=t.model;break;case`x14:cfRule`:this.model.rules.push(t.model);break}}}})),Zx,Qx=t((()=>{Nb(),Kx(),Xx(),Zx=class extends Mb{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new Yx}}get tag(){return`x14:conditionalFormattings`}hasContent(e){return e.hasExtContent===void 0&&(e.hasExtContent=e.some(e=>e.rules.some(Gx.isExt))),e.hasExtContent}prepare(e){e.forEach(e=>{this.cfXform.prepare(e)})}render(e,t){this.hasContent(t)&&(e.openNode(this.tag),t.forEach(t=>this.cfXform.render(e,t)),e.closeNode())}createNewModel(){return[]}onParserClose(e,t){this.model.push(t.model)}}})),$x,eS,tS,nS=t((()=>{kx(),Nb(),Qx(),$x=class extends Mb{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new Zx}}get tag(){return`ext`}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e){this.conditionalFormattings.prepare(e.conditionalFormattings)}render(e,t){e.openNode(`ext`,{uri:`{78C0D931-6437-407d-A8EE-F0AAD7539E65}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),this.conditionalFormattings.render(e,t.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model[e]=t.model}},eS=class{constructor(){this._parsedModel=null}get tag(){return`ext`}hasContent(e){return Array.isArray(e)&&e.length>0}render(e,t){this.hasContent(t)&&(e.openNode(`ext`,{uri:`{05C60535-1F16-4fd2-B633-F4F36F0B64E0}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),e.writeRaw(yx(t)),e.closeNode())}parse(e){return Cx(e)}},tS=class extends Mb{constructor(){super(),this.sparklineExt=new eS,this.map={ext:this.ext=new $x}}get tag(){return`extLst`}prepare(e,t){this.ext.prepare(e)}hasContent(e){return this.ext.hasContent(e)||this.sparklineExt.hasContent(e?.sparklineGroups)}render(e,t){this.hasContent(t)&&(e.openNode(`extLst`),this.ext.hasContent(t)&&this.ext.render(e,t),this.sparklineExt.hasContent(t?.sparklineGroups)&&this.sparklineExt.render(e,t.sparklineGroups),e.closeNode())}createNewModel(){return{}}onParserClose(e,t){this.model[e]=t.model}}})),rS,iS=t((()=>{j(),rS=class extends A{get tag(){return`headerFooter`}render(e,t){if(!t)return;let n={},r=[];if(t.differentFirst&&(n.differentFirst=`1`),t.differentOddEven&&(n.differentOddEven=`1`),t.oddHeader&&typeof t.oddHeader==`string`&&r.push({name:`oddHeader`,text:t.oddHeader}),t.oddFooter&&typeof t.oddFooter==`string`&&r.push({name:`oddFooter`,text:t.oddFooter}),t.evenHeader&&typeof t.evenHeader==`string`&&r.push({name:`evenHeader`,text:t.evenHeader}),t.evenFooter&&typeof t.evenFooter==`string`&&r.push({name:`evenFooter`,text:t.evenFooter}),t.firstHeader&&typeof t.firstHeader==`string`&&r.push({name:`firstHeader`,text:t.firstHeader}),t.firstFooter&&typeof t.firstFooter==`string`&&r.push({name:`firstFooter`,text:t.firstFooter}),Object.keys(n).length>0||r.length>0){e.openNode(`headerFooter`,n);for(let t of r)e.leafNode(t.name,null,t.text);e.closeNode()}}parseOpen(e){switch(e.name){case`headerFooter`:return this.model={},e.attributes.differentFirst&&(this.model.differentFirst=parseInt(e.attributes.differentFirst,0)===1),e.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(e.attributes.differentOddEven,0)===1),!0;case`oddHeader`:return this.currentNode=`oddHeader`,!0;case`oddFooter`:return this.currentNode=`oddFooter`,!0;case`evenHeader`:return this.currentNode=`evenHeader`,!0;case`evenFooter`:return this.currentNode=`evenFooter`,!0;case`firstHeader`:return this.currentNode=`firstHeader`,!0;case`firstFooter`:return this.currentNode=`firstFooter`,!0;default:return!1}}parseText(e){switch(this.currentNode){case`oddHeader`:this.model.oddHeader=(this.model.oddHeader??``)+e;break;case`oddFooter`:this.model.oddFooter=(this.model.oddFooter??``)+e;break;case`evenHeader`:this.model.evenHeader=(this.model.evenHeader??``)+e;break;case`evenFooter`:this.model.evenFooter=(this.model.evenFooter??``)+e;break;case`firstHeader`:this.model.firstHeader=(this.model.firstHeader??``)+e;break;case`firstFooter`:this.model.firstFooter=(this.model.firstFooter??``)+e;break;default:break}}parseClose(){switch(this.currentNode){case`oddHeader`:case`oddFooter`:case`evenHeader`:case`evenFooter`:case`firstHeader`:case`firstFooter`:return this.currentNode=void 0,!0;default:return!1}}}})),aS,oS,sS=t((()=>{j(),aS=[`numberStoredAsText`,`formula`,`formulaRange`,`unlockedFormula`,`emptyCellReference`,`listDataValidation`,`calculatedColumn`,`evalError`,`twoDigitTextYear`],oS=class extends A{get tag(){return`ignoredErrors`}render(e,t){if(!(!t||t.length===0)){e.openNode(`ignoredErrors`);for(let n of t){let t={sqref:n.ref};for(let e of aS)n[e]&&(t[e]=1);e.leafNode(`ignoredError`,t)}e.closeNode()}}parseOpen(e){switch(e.name){case`ignoredErrors`:return this.model=[],!0;case`ignoredError`:{let t={ref:e.attributes.sqref??``};for(let n of aS)(e.attributes[n]===`1`||e.attributes[n]===`true`)&&(t[n]=!0);return this.model.push(t),!0}default:return!0}}parseText(){}parseClose(e){switch(e){case`ignoredErrors`:return!1;default:return!0}}}})),cS,lS=t((()=>{j(),cS=class extends A{get tag(){return`pageMargins`}render(e,t){if(t){let n={left:t.left,right:t.right,top:t.top,bottom:t.bottom,header:t.header,footer:t.footer};Object.values(n).some(e=>e!==void 0)&&e.leafNode(this.tag,n)}}parseOpen(e){switch(e.name){case this.tag:return this.model={left:parseFloat(e.attributes.left||.7),right:parseFloat(e.attributes.right||.7),top:parseFloat(e.attributes.top||.75),bottom:parseFloat(e.attributes.bottom||.75),header:parseFloat(e.attributes.header||.3),footer:parseFloat(e.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}}));function uS(e){return e?`1`:void 0}function dS(e){switch(e){case`overThenDown`:return e;default:return}}function fS(e){switch(e){case`atEnd`:case`asDisplyed`:return e;default:return}}function pS(e){switch(e){case`dash`:case`blank`:case`NA`:return e;default:return}}function mS(e){return e===void 0?void 0:parseInt(e,10)}var hS,gS=t((()=>{j(),hS=class extends A{get tag(){return`pageSetup`}_dpiToXml(e){if(e!==void 0&&Number.isFinite(e)&&e!==4294967295)return e}render(e,t){if(t){let n={paperSize:t.paperSize,orientation:t.orientation,horizontalDpi:this._dpiToXml(t.horizontalDpi),verticalDpi:this._dpiToXml(t.verticalDpi),pageOrder:dS(t.pageOrder),blackAndWhite:uS(t.blackAndWhite),draft:uS(t.draft),cellComments:fS(t.cellComments),errors:pS(t.errors),scale:t.scale===100?void 0:t.scale,fitToWidth:t.fitToWidth===1?void 0:t.fitToWidth,fitToHeight:t.fitToHeight===1?void 0:t.fitToHeight,firstPageNumber:t.firstPageNumber,useFirstPageNumber:uS(!!t.firstPageNumber),usePrinterDefaults:uS(t.usePrinterDefaults),copies:t.copies};Object.values(n).some(e=>e!==void 0)&&e.leafNode(this.tag,n)}}parseOpen(e){switch(e.name){case this.tag:return this.model={paperSize:mS(e.attributes.paperSize),orientation:e.attributes.orientation??`portrait`,horizontalDpi:parseInt(e.attributes.horizontalDpi??`4294967295`,10),verticalDpi:parseInt(e.attributes.verticalDpi??`4294967295`,10),pageOrder:e.attributes.pageOrder??`downThenOver`,blackAndWhite:e.attributes.blackAndWhite===`1`,draft:e.attributes.draft===`1`,cellComments:e.attributes.cellComments??`None`,errors:e.attributes.errors??`displayed`,scale:parseInt(e.attributes.scale??`100`,10),fitToWidth:parseInt(e.attributes.fitToWidth??`1`,10),fitToHeight:parseInt(e.attributes.fitToHeight??`1`,10),firstPageNumber:parseInt(e.attributes.firstPageNumber??`1`,10),useFirstPageNumber:e.attributes.useFirstPageNumber===`1`,usePrinterDefaults:e.attributes.usePrinterDefaults===`1`,copies:parseInt(e.attributes.copies??`1`,10)},!0;default:return!1}}parseText(){}parseClose(){return!1}}})),_S,vS=t((()=>{j(),_S=class extends A{get tag(){return`picture`}render(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}parseOpen(e){switch(e.name){case this.tag:return this.model={rId:e.attributes[`r:id`]},!0;default:return!1}}parseText(){}parseClose(){return!1}}})),yS,bS=t((()=>{jg(),ax(),yS=class extends Ag{constructor(){super({tag:`rowBreaks`,count:!0,childXform:new ix})}render(e,t){if(t&&t.length){e.openNode(this.tag,this.$),e.addAttribute(this.$count,t.length),e.addAttribute(`manualBreakCount`,t.length);let{childXform:n}=this;for(let r of t)n.render(e,r);e.closeNode()}}}}));function xS(e){if(e==null)return 0;if(e instanceof String||typeof e==`string`)return 3;if(typeof e==`number`)return 2;if(typeof e==`boolean`)return 9;if(e instanceof Date)return 4;if(e.text&&e.hyperlink)return 5;if(e.formula)return 6;if(e.error)return 10;throw new Qi(typeof e,`Could not understand type of value`)}function SS(e){switch(e.type){case 6:return xS(e.result);default:return e.type}}function CS(e){if(e==null)return{text:``};if(typeof e==`string`)return{text:e};if(typeof e==`number`||typeof e==`boolean`)return{text:String(e)};if(typeof e==`object`){let t=e;if(Array.isArray(t.richText)){if(t.richText.length===0)return{text:``};let e=t.richText.map(e=>{let t=e,n={text:typeof t?.text==`string`?t.text:``};return t?.font!==null&&typeof t?.font==`object`&&(n.font=t.font),n});return{text:e.map(e=>e.text).join(``),richText:e}}if(typeof t.error==`string`)return{text:t.error}}return{text:String(e)}}var wS,TS=t((()=>{pu(),la(),pa(),j(),Vy(),Hf(),wS=class extends A{constructor(){super(),this.richTextXform=new By}get tag(){return`c`}prepare(e,t){let n=t.styles.addStyleModel(e.style||{},SS(e));switch(n&&(e.styleId=n),e.comment&&t.comments.push({...e.comment,ref:e.address}),e.type){case 3:case 8:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.value));break;case 4:t.date1904&&(e.date1904=!0);break;case 5:t.sharedStrings&&(Array.isArray(e.richText)&&e.richText.length>0?e.ssId=t.sharedStrings.add({richText:e.richText}):e.text!==void 0&&e.text!==null&&(e.ssId=t.sharedStrings.add(e.text))),t.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip});break;case 1:t.merges.add(e);break;case 6:if(t.date1904&&(e.date1904=!0),e.isDynamicArray&&(e.cm=1),e.hyperlink&&t.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip}),e.shareType===`shared`&&(e.si=t.siFormulae++),e.formula)t.formulae[e.address]=e;else if(e.sharedFormula){let n=t.formulae[e.sharedFormula];if(!n)throw new Ki(`Shared Formula master must exist above and or left of clone for cell ${e.address}`);n.si===void 0?(n.shareType=`shared`,n.si=t.siFormulae++,n.range=new fa(n.address,e.address)):n.range&&n.range.expandToAddress(e.address),e.si=n.si}break;default:break}}renderFormula(e,t){let n=null;switch(t.shareType){case`shared`:n={t:`shared`,ref:t.ref||t.range.range,si:t.si};break;case`array`:n={t:`array`,ref:t.ref};break;default:t.si!==void 0&&(n={t:`shared`,si:t.si});break}switch(xS(t.result)){case 0:e.leafNode(`f`,n,t.formula);break;case 3:e.addAttribute(`t`,`str`),e.leafNode(`f`,n,t.formula),e.leafNode(`v`,null,t.result);break;case 2:e.leafNode(`f`,n,t.formula),e.leafNode(`v`,null,t.result);break;case 9:e.addAttribute(`t`,`b`),e.leafNode(`f`,n,t.formula),e.leafNode(`v`,null,+!!t.result);break;case 10:e.addAttribute(`t`,`e`),e.leafNode(`f`,n,t.formula),e.leafNode(`v`,null,t.result.error);break;case 4:e.leafNode(`f`,n,t.formula),e.leafNode(`v`,null,lf(t.result,t.date1904));break;default:throw new Qi(String(xS(t.result)),`Could not understand type of value`)}}render(e,t){if(!(t.type===0&&!t.styleId)){switch(e.openNode(`c`),e.addAttribute(`r`,t.address),t.styleId&&e.addAttribute(`s`,t.styleId),t.cm&&e.addAttribute(`cm`,t.cm),t.type){case 0:break;case 2:e.leafNode(`v`,null,t.value);break;case 9:e.addAttribute(`t`,`b`),e.leafNode(`v`,null,t.value?`1`:`0`);break;case 12:e.addAttribute(`t`,`b`),e.leafNode(`v`,null,t.value?`1`:`0`);break;case 10:e.addAttribute(`t`,`e`),e.leafNode(`v`,null,t.value.error);break;case 3:case 8:t.ssId===void 0?t.value&&t.value.richText?(e.addAttribute(`t`,`inlineStr`),e.openNode(`is`),t.value.richText.forEach(t=>{this.richTextXform.render(e,t)}),e.closeNode(`is`)):(e.addAttribute(`t`,`str`),e.leafNode(`v`,null,t.value)):(e.addAttribute(`t`,`s`),e.leafNode(`v`,null,t.ssId));break;case 4:e.leafNode(`v`,null,lf(t.value,t.date1904));break;case 5:t.formula||t.sharedFormula?this.renderFormula(e,t):t.ssId===void 0?Array.isArray(t.richText)&&t.richText.length>0?(e.addAttribute(`t`,`inlineStr`),e.openNode(`is`),t.richText.forEach(t=>{this.richTextXform.render(e,t)}),e.closeNode(`is`)):(e.addAttribute(`t`,`str`),e.leafNode(`v`,null,t.text)):(e.addAttribute(`t`,`s`),e.leafNode(`v`,null,t.ssId));break;case 6:this.renderFormula(e,t);break;case 1:break;default:break}e.closeNode()}}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`c`:return this.model={address:e.attributes.r},this.t=e.attributes.t,e.attributes.s&&(this.model.styleId=parseInt(e.attributes.s,10)),e.attributes.cm&&(this.model.cm=parseInt(e.attributes.cm,10)),!0;case`f`:return this.currentNode=`f`,this.model.si=e.attributes.si,this.model.shareType=e.attributes.t,this.model.ref=e.attributes.ref,!0;case`v`:return this.currentNode=`v`,!0;case`t`:return this.currentNode=`t`,!0;case`r`:return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){if(this.parser){this.parser.parseText(e);return}switch(this.currentNode){case`f`:this.model.formula=this.model.formula?this.model.formula+e:e;break;case`v`:case`t`:this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+e:e:this.model.value=this.model.value?this.model.value+e:e;break;default:break}}parseClose(e){switch(e){case`c`:{let{model:e}=this;if(e.formula||e.shareType)e.type=6,e.value&&=(this.t===`str`?e.result=e.value:this.t===`b`?e.result=parseInt(e.value,10)!==0:this.t===`e`?e.result={error:e.value}:e.result=parseFloat(e.value),void 0);else if(e.value!==void 0)switch(this.t){case`s`:e.type=3,e.value=parseInt(e.value,10);break;case`str`:e.type=3;break;case`inlineStr`:e.type=3,typeof e.value==`string`&&e.value.includes(`_x`)&&(e.value=ff(e.value));break;case`b`:e.type=9,e.value=parseInt(e.value,10)!==0;break;case`e`:e.type=10,e.value={error:e.value};break;case`d`:e.type=4,e.value=new Date(e.value);break;default:e.type=2,e.value=parseFloat(e.value);break}else e.styleId?e.type=0:e.type=1;return!1}case`f`:case`v`:case`is`:return this.currentNode=void 0,!0;case`t`:return this.parser?(this.parser.parseClose(e),!0):(this.currentNode=void 0,!0);case`r`:return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText??[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return this.parser?(this.parser.parseClose(e),!0):!1}}reconcile(e,t){let n=e.styleId!==void 0&&t.styles&&t.styles.getStyleModel(e.styleId);switch(n&&(e.style=n),e.styleId!==void 0&&(e.styleId=void 0),e.type){case 3:if(typeof e.value==`number`&&t.sharedStrings){let n=e.value;if(e.value=t.sharedStrings.getString(n),e.value===void 0)throw new Ki(`Invalid shared string index ${n} in cell ${e.address}: the xlsx file appears to be corrupted`)}e.value&&e.value.richText&&(e.type=8);break;case 2:n&&_f(n.numFmt)&&(e.type=4,e.value=uf(e.value,t.date1904));break;case 6:e.result!==void 0&&typeof e.result==`number`&&n&&_f(n.numFmt)&&(e.result=uf(e.result,t.date1904)),e.shareType===`shared`&&(e.ref?t.formulae[e.si]=e.address:(e.sharedFormula=t.formulae[e.si],delete e.shareType),delete e.si),e.cm&&(t.dynamicArrayCmIndices?t.dynamicArrayCmIndices.has(e.cm)&&(e.isDynamicArray=!0):t.hasDynamicArrayMetadata&&(e.isDynamicArray=!0)),delete e.cm;break;default:break}let r=t.hyperlinkMap[e.address];if(r){let t;e.type===6?t=e.result:(t=e.value,e.value=void 0);let n=CS(t);e.text=n.text,n.richText?e.richText=n.richText:delete e.richText,e.type=5,e.hyperlink=r}let i=t.commentsMap&&t.commentsMap[e.address];i&&(e.comment=i)}}})),ES,DS=t((()=>{la(),da(),j(),TS(),Hf(),ES=class extends A{constructor(e){super(),this.maxItems=e&&e.maxItems,this.map={c:new wS}}get tag(){return`row`}reset(){super.reset(),this.numRowsSeen=0,this.lastCellCol=0}prepare(e,t){let n=t.styles.addStyleModel(e.style);n&&(e.styleId=n);let r=this.map.c;e.cells.forEach(e=>{r.prepare(e,t)})}render(e,t,n){if(!t)return;e.openNode(`row`),e.addAttribute(`r`,t.number),t.height!=null&&t.height>0?(e.addAttribute(`ht`,t.height),t.customHeight!==!1&&e.addAttribute(`customHeight`,`1`)):t.height===0&&e.addAttribute(`ht`,1),t.hidden&&e.addAttribute(`hidden`,`1`),t.min>0&&t.max>0&&t.min<=t.max&&e.addAttribute(`spans`,`${t.min}:${t.max}`),t.styleId&&(e.addAttribute(`s`,t.styleId),e.addAttribute(`customFormat`,`1`)),t.dyDescent!==void 0&&e.addAttribute(`x14ac:dyDescent`,t.dyDescent),t.outlineLevel&&e.addAttribute(`outlineLevel`,t.outlineLevel),t.collapsed&&e.addAttribute(`collapsed`,`1`);let r=this.map.c;t.cells.forEach(t=>{r.render(e,t,n)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===`row`){this.numRowsSeen+=1,this.lastCellCol=0;let t=e.attributes.spans,n,r;if(t){let e=t.indexOf(`:`);n=parseInt(t,10),r=e>-1?parseInt(t.substring(e+1),10):void 0}let i=e.attributes.r?parseInt(e.attributes.r,10):this.numRowsSeen,a=this.model={number:i,min:n,max:r,cells:[]};return e.attributes.s&&(a.styleId=parseInt(e.attributes.s,10)),vf(e.attributes.hidden)&&(a.hidden=!0),vf(e.attributes.bestFit)&&(a.bestFit=!0),e.attributes.ht&&(a.height=parseFloat(e.attributes.ht)),vf(e.attributes.customHeight)&&(a.customHeight=!0),e.attributes.outlineLevel&&(a.outlineLevel=parseInt(e.attributes.outlineLevel,10)),vf(e.attributes.collapsed)&&(a.collapsed=!0),e.attributes[`x14ac:dyDescent`]!==void 0&&(a.dyDescent=parseFloat(e.attributes[`x14ac:dyDescent`])),!0}return this.parser=this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):!1}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){let e=this.parser.model;if(e.address?this.lastCellCol=E.decodeCol(e.address):(this.lastCellCol+=1,e.address=E.encodeAddress(this.model.number,this.lastCellCol)),this.model.cells.push(e),this.maxItems&&this.model.cells.length>this.maxItems)throw new ca(`column`,this.maxItems);this.parser=void 0}return!0}return!1}reconcile(e,t){e.style=e.styleId===void 0?{}:t.styles.getStyleModel(e.styleId),e.styleId!==void 0&&(e.styleId=void 0);let n=this.map.c;e.cells.forEach(e=>{n.reconcile(e,t)})}}})),OS,kS=t((()=>{j(),OS=class extends A{get tag(){return`sheetFormatPr`}render(e,t){if(t){let n={defaultRowHeight:t.defaultRowHeight,outlineLevelRow:t.outlineLevelRow||void 0,outlineLevelCol:t.outlineLevelCol||void 0,"x14ac:dyDescent":t.dyDescent!==void 0&&t.dyDescent!==0?t.dyDescent:void 0};t.defaultColWidth&&(n.defaultColWidth=t.defaultColWidth),t.customHeight&&(n.customHeight=`1`),Object.values(n).some(e=>e!==void 0)&&e.leafNode(`sheetFormatPr`,n)}}parseOpen(e){return e.name===`sheetFormatPr`?(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight??`0`),dyDescent:e.attributes[`x14ac:dyDescent`]===void 0?void 0:parseFloat(e.attributes[`x14ac:dyDescent`]),outlineLevelRow:parseInt(e.attributes.outlineLevelRow??`0`,10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol??`0`,10)},e.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(e.attributes.defaultColWidth)),e.attributes.customHeight===`1`&&(this.model.customHeight=!0),!0):!1}parseText(){}parseClose(){return!1}}})),AS,jS,MS=t((()=>{j(),AS=e=>e!==void 0,jS=class extends A{get tag(){return`outlinePr`}render(e,t){return t&&(AS(t.summaryBelow)||AS(t.summaryRight))?(e.leafNode(this.tag,{summaryBelow:AS(t.summaryBelow)?Number(t.summaryBelow):void 0,summaryRight:AS(t.summaryRight)?Number(t.summaryRight):void 0}),!0):!1}parseOpen(e){return e.name===this.tag?(this.model={summaryBelow:AS(e.attributes.summaryBelow)?!!Number(e.attributes.summaryBelow):void 0,summaryRight:AS(e.attributes.summaryRight)?!!Number(e.attributes.summaryRight):void 0},!0):!1}parseText(){}parseClose(){return!1}}})),NS,PS=t((()=>{j(),NS=class extends A{get tag(){return`pageSetUpPr`}render(e,t){return t&&t.fitToPage?(e.leafNode(this.tag,{fitToPage:t.fitToPage?`1`:void 0}),!0):!1}parseOpen(e){return e.name===this.tag?(this.model={fitToPage:e.attributes.fitToPage===`1`},!0):!1}parseText(){}parseClose(){return!1}}})),FS,IS=t((()=>{j(),MS(),PS(),t_(),FS=class extends A{constructor(){super(),this.map={tabColor:new e_(`tabColor`),pageSetUpPr:new NS,outlinePr:new jS}}get tag(){return`sheetPr`}render(e,t){if(!t)return;let n=!!t.tabColor,r=!!(t.pageSetup&&t.pageSetup.fitToPage),i=t.outlineProperties!==void 0&&t.outlineProperties!==null&&(t.outlineProperties.summaryBelow!==void 0||t.outlineProperties.summaryRight!==void 0);(n||r||i)&&(e.openNode(`sheetPr`),this.map.tabColor.render(e,t.tabColor),this.map.pageSetUpPr.render(e,t.pageSetup),this.map.outlinePr.render(e,t.outlineProperties),e.closeNode())}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):this.map[e.name]?(this.parser=this.map[e.name],this.parser.parseOpen(e),!0):!1}parseText(e){return this.parser?(this.parser.parseText(e),!0):!1}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}}));function LS(e,t){return e?t:void 0}function RS(e,t){return e===t?!0:void 0}var zS,BS=t((()=>{j(),zS=class extends A{get tag(){return`sheetProtection`}render(e,t){if(t){let n={sheet:LS(t.sheet,`1`),selectLockedCells:t.selectLockedCells===!1?`1`:void 0,selectUnlockedCells:t.selectUnlockedCells===!1?`1`:void 0,formatCells:LS(t.formatCells,`0`),formatColumns:LS(t.formatColumns,`0`),formatRows:LS(t.formatRows,`0`),insertColumns:LS(t.insertColumns,`0`),insertRows:LS(t.insertRows,`0`),insertHyperlinks:LS(t.insertHyperlinks,`0`),deleteColumns:LS(t.deleteColumns,`0`),deleteRows:LS(t.deleteRows,`0`),sort:LS(t.sort,`0`),autoFilter:LS(t.autoFilter,`0`),pivotTables:LS(t.pivotTables,`0`)};t.sheet&&(n.algorithmName=t.algorithmName,n.hashValue=t.hashValue,n.saltValue=t.saltValue,n.spinCount=t.spinCount,n.objects=LS(t.objects===!1,`1`),n.scenarios=LS(t.scenarios===!1,`1`)),Object.values(n).some(e=>e!==void 0)&&e.leafNode(this.tag,n)}}parseOpen(e){switch(e.name){case this.tag:return this.model={sheet:RS(e.attributes.sheet,`1`),objects:e.attributes.objects===`1`?!1:void 0,scenarios:e.attributes.scenarios===`1`?!1:void 0,selectLockedCells:e.attributes.selectLockedCells===`1`?!1:void 0,selectUnlockedCells:e.attributes.selectUnlockedCells===`1`?!1:void 0,formatCells:RS(e.attributes.formatCells,`0`),formatColumns:RS(e.attributes.formatColumns,`0`),formatRows:RS(e.attributes.formatRows,`0`),insertColumns:RS(e.attributes.insertColumns,`0`),insertRows:RS(e.attributes.insertRows,`0`),insertHyperlinks:RS(e.attributes.insertHyperlinks,`0`),deleteColumns:RS(e.attributes.deleteColumns,`0`),deleteRows:RS(e.attributes.deleteRows,`0`),sort:RS(e.attributes.sort,`0`),autoFilter:RS(e.attributes.autoFilter,`0`),pivotTables:RS(e.attributes.pivotTables,`0`)},e.attributes.algorithmName&&(this.model.algorithmName=e.attributes.algorithmName,this.model.hashValue=e.attributes.hashValue,this.model.saltValue=e.attributes.saltValue,this.model.spinCount=parseInt(e.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}})),VS,HS,US=t((()=>{da(),j(),VS={frozen:`frozen`,frozenSplit:`frozen`,split:`split`},HS=class extends A{get tag(){return`sheetView`}prepare(e){switch(e.state){case`frozen`:case`split`:break;default:e.state=`normal`;break}}render(e,t){let n={};t.tabSelected&&(n.tabSelected=`1`),n.workbookViewId=t.workbookViewId??0,e.openNode(`sheetView`,n);let r=function(t,n,r){r&&e.addAttribute(t,n)};r(`rightToLeft`,`1`,t.rightToLeft===!0),r(`showRuler`,`0`,t.showRuler===!1),r(`showRowColHeaders`,`0`,t.showRowColHeaders===!1),r(`showGridLines`,`0`,t.showGridLines===!1),r(`zoomScale`,t.zoomScale,t.zoomScale!==void 0&&t.zoomScale!==100),r(`zoomScaleNormal`,t.zoomScaleNormal,t.zoomScaleNormal!==void 0&&t.zoomScaleNormal!==100),r(`view`,t.style,t.style);let i,a,o,s;switch(t.state){case`frozen`:a=t.xSplit??0,o=t.ySplit??0,i=t.topLeftCell||E.getAddress(o+1,a+1).address,s=t.xSplit&&t.ySplit&&`bottomRight`||t.xSplit&&`topRight`||`bottomLeft`,e.leafNode(`pane`,{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:i,activePane:s,state:`frozen`}),e.leafNode(`selection`,{pane:s,activeCell:t.activeCell,sqref:t.activeCell});break;case`split`:t.activePane===`topLeft`&&(t.activePane=void 0),e.leafNode(`pane`,{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),e.leafNode(`selection`,{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case`normal`:t.activeCell&&e.leafNode(`selection`,{activeCell:t.activeCell,sqref:t.activeCell});break;default:break}e.closeNode()}parseOpen(e){switch(e.name){case`sheetView`:return this.sheetView={workbookViewId:parseInt(e.attributes.workbookViewId,10),rightToLeft:e.attributes.rightToLeft===`1`,tabSelected:e.attributes.tabSelected===`1`,showRuler:e.attributes.showRuler!==`0`,showRowColHeaders:e.attributes.showRowColHeaders!==`0`,showGridLines:e.attributes.showGridLines!==`0`,zoomScale:parseInt(e.attributes.zoomScale??`100`,10),zoomScaleNormal:parseInt(e.attributes.zoomScaleNormal??`100`,10),style:e.attributes.view},this.pane=void 0,this.selections={},!0;case`pane`:return this.pane={xSplit:parseInt(e.attributes.xSplit??`0`,10),ySplit:parseInt(e.attributes.ySplit??`0`,10),topLeftCell:e.attributes.topLeftCell,activePane:e.attributes.activePane??`topLeft`,state:e.attributes.state},!0;case`selection`:{let t=e.attributes.pane??`topLeft`;return this.selections[t]={pane:t,activeCell:e.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(e){let t,n;switch(e){case`sheetView`:return this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,tabSelected:this.sheetView.tabSelected,state:VS[this.pane.state]??`split`,xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state===`split`&&(t.activePane=this.pane.activePane),n=this.selections[this.pane.activePane],n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,tabSelected:this.sheetView.tabSelected,state:`normal`,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},n=this.selections.topLeft,n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}})),WS,GS,KS,qS=t((()=>{Fy(),Bd(),Ly(),la(),pa(),Wp(),ib(),ub(),da(),_b(),bb(),ng(),Tb(),kb(),mu(),jg(),jb(),rx(),sx(),lx(),mx(),gx(),nS(),iS(),sb(),sS(),lS(),gS(),vS(),bS(),DS(),kS(),IS(),BS(),US(),WS=new Db,GS={dataValidations:new px,sheetProperties:new FS,sheetFormatProperties:new OS,columns:new Ag({tag:`cols`,count:!1,childXform:new cx}),row:new ES,hyperlinks:new Ag({tag:`hyperlinks`,count:!1,childXform:new ob}),sheetViews:new Ag({tag:`sheetViews`,count:!1,childXform:new HS}),sheetProtection:new zS,pageMargins:new cS,pageSeteup:new hS,autoFilter:new Ab,picture:new _S,drawing:new hx,conditionalFormattings:new nx,extLst:new tS,ignoredErrors:new oS,headerFooter:new rS,rowBreaks:new yS,colBreaks:new ox},KS=class{constructor(e){this.id=e.id,this.name=e.name||`Sheet${this.id}`,this.state=e.state??`visible`,this._rows=[],this._columns=[],this._keys={},this._merges=[],this._merges.add=function(){},this._sheetRelsWriter=new lb(e),this._sheetCommentsWriter=new rb(this,this._sheetRelsWriter,e),this._dimensions=new fa,this._rowZero=1,this._rowOffset=0,this.committed=!1,this.dataValidations=new Iy,this._formulae={},this._siFormulae=0,this.conditionalFormatting=[],this.ignoredErrors=[],this.rowBreaks=[],this.colBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,outlineLevelCol:0,outlineLevelRow:0},e.properties),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},e.headerFooter),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:`portrait`,horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!!(e.pageSetup&&(e.pageSetup.fitToWidth||e.pageSetup.fitToHeight)&&!e.pageSetup.scale),pageOrder:`downThenOver`,blackAndWhite:!1,draft:!1,cellComments:`None`,errors:`displayed`,scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},e.pageSetup),this.useSharedStrings=e.useSharedStrings??!1,this._workbook=e.workbook,this.hasComments=!1,this._views=e.views??[],this.autoFilter=e.autoFilter??null,this._media=[],this._watermark=null,this.sheetProtection=null,this._writeOpenWorksheet(),this.startedData=!1}get workbook(){return this._workbook}get stream(){return this._stream||=this._workbook._openStream(bm(this.id)),this._stream}destroy(){throw new na(`destroy`,`Invalid operation for a streaming writer`)}commit(){if(!this.committed){for(let e=this._rowOffset;e<this._rows.length;e++){let t=this._rows[e];t&&this._writeRow(t)}this._rows=null,this.startedData||this._writeOpenSheetData(),this._writeCloseSheetData(),this._writeSheetProtection(),this._writeAutoFilter(),this._writeMergeCells(),this._writeHyperlinks(),this._writeConditionalFormatting(),this._writeDataValidations(),this._writePageMargins(),this._writePageSetup(),this._writeHeaderFooter(),this._writeRowBreaks(),this._writeColBreaks(),this._writeDrawing(),this._writeBackground(),this._writeLegacyData(),this._writeIgnoredErrors(),this._writeExtLst(),this._writeCloseWorksheet(),this.stream.end(),this._sheetCommentsWriter.commit(),this._sheetRelsWriter.commit(),this.committed=!0}}get dimensions(){return this._dimensions}get views(){return this._views}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce((e,t)=>{let n=t.header&&1||t.headers&&t.headers.length||0;return Math.max(e,n)},0);let t=1,n=this._columns=[];e.forEach(e=>{let r=new zd(this,t++,!1);n.push(r),r.defn=e})}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){Object.keys(this._keys).forEach(t=>e(this._keys[t],t))}getColumn(e){if(typeof e==`string`){let t=this._keys[e];if(t)return t;e=E.l2n(e)}if(e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new zd(this,t++))}return this._columns[e-1]}get _nextRow(){return this._rowZero+(this._rows.length-this._rowOffset)}eachRow(e,t){let n,r;if(typeof e==`function`?(n=e,r=void 0):(n=t,r=e),r&&r.includeEmpty){let e=this._nextRow;for(let t=this._rowZero;t<e;t++)n(this.getRow(t),t)}else this._rows.forEach(e=>{e&&e.hasValues&&n(e,e.number)})}_commitRow(e){let t=!1,n=this._rows;for(;this._rowOffset<n.length&&!t;){let r=n[this._rowOffset];n[this._rowOffset]=void 0,this._rowOffset++,this._rowZero++,r&&(this._writeRow(r),t=r.number===e.number,this._rowZero=r.number+1),this._rowOffset>1024&&this._rowOffset>n.length>>1&&(n.splice(0,this._rowOffset),this._rowOffset=0)}}get lastRow(){let e=this._rows;for(let t=e.length-1;t>=this._rowOffset;t--){let n=e[t];if(n)return n}}findRow(e){let t=e-this._rowZero+this._rowOffset;return this._rows[t]}getRow(e){let t=e-this._rowZero+this._rowOffset;if(t<this._rowOffset)throw new Xi(e,`this row has been committed`);let n=this._rows[t];return n||(this._rows[t]=n=new Up(this,e)),n}addRow(e){let t=new Up(this,this._nextRow);return this._rows[t.number-this._rowZero+this._rowOffset]=t,t.values=e,t}addRows(e){return e.map(e=>this.addRow(e))}findCell(e,t){let n=E.getAddress(e,t),r=this.findRow(n.row);return r?r.findCell(n.col):void 0}getCell(e,t){let n=E.getAddress(e,t);return this.getRow(n.row).getCellEx(n)}mergeCells(...e){let t=new fa(e);this._merges.forEach(e=>{if(e.intersects(t))throw new Zi});let{top:n,left:r,bottom:i,right:a}=t,o=vb(n,r,i,a,(e,t)=>this.findCell(e,t)),s=this.getCell(n,r);for(let e=n;e<=i;e++)for(let t=r;t<=a;t++)(e>n||t>r)&&this.getCell(e,t).merge(s);o&&yb(n,r,i,a,o,(e,t)=>this.getCell(e,t)),this._merges.push(t)}addConditionalFormatting(e){this.conditionalFormatting.push(e)}removeConditionalFormatting(e){typeof e==`number`?this.conditionalFormatting.splice(e,1):typeof e==`function`?this.conditionalFormatting=this.conditionalFormatting.filter(t=>!e(t)):this.conditionalFormatting=[]}addBackgroundImage(e){let t=this._workbook.getImage(Number(e));if(t&&fb(t))throw new sa(`Background images cannot be external (linked) images. Use an embedded image (buffer/base64/filename). External images are only supported for cell pictures and overlay watermarks.`);this._background={imageId:Number(e)}}getBackgroundImageId(){return this._background&&this._background.imageId}addImage(e,t){let n=this._parseImageRange(String(e),t);this._media.push(n)}getImages(){return this._media}addWatermark(e){let t=e.mode??`overlay`;if(t===`header`){let t=this._workbook.getImage(Number(e.imageId));if(t&&fb(t))throw new sa(`Header watermark images cannot be external (linked) images. Use an embedded image (buffer/base64/filename), or use overlay mode for linked images.`)}this._media=this._media.filter(e=>e._watermarkTag!==!0);let n=e.opacity===void 0?.15:Math.max(0,Math.min(1,e.opacity));if(this._watermark={imageId:String(e.imageId),mode:t,opacity:n,headerWidth:e.headerWidth,headerHeight:e.headerHeight,applyTo:e.applyTo},this._watermark.mode===`overlay`){let t={type:`image`,imageId:String(e.imageId),range:{tl:{nativeCol:0,nativeColOff:0,nativeRow:0,nativeRowOff:0},br:{nativeCol:100,nativeColOff:0,nativeRow:200,nativeRowOff:0},editAs:`absolute`},_watermarkTag:!0,opacity:n};this._media.push(t)}}getWatermark(){return this._watermark}removeWatermark(){this._watermark=null,this._media=this._media.filter(e=>e._watermarkTag!==!0)}_parseImageRange(e,t){if(typeof t==`string`){let n=E.decode(t);if(`top`in n)return{type:`image`,imageId:e,range:{tl:new Py(this,{col:n.left,row:n.top},-1).model,br:new Py(this,{col:n.right,row:n.bottom},0).model,editAs:`oneCell`}};throw Error(`Invalid image range: "${t}". Expected a range like "A1:C3".`)}if(`pos`in t&&t.pos)return{type:`image`,imageId:e,range:{tl:{nativeCol:0,nativeColOff:0,nativeRow:0,nativeRowOff:0},ext:t.ext,pos:t.pos},hyperlinks:t.hyperlinks};let n=t;return{type:`image`,imageId:e,range:{tl:new Py(this,n.tl,0).model,br:n.br?new Py(this,n.br,0).model:void 0,ext:n.ext,editAs:n.editAs},hyperlinks:n.hyperlinks}}async protect(e,t){this.sheetProtection={sheet:!0},this.sheetProtection=await wb(e,t)}unprotect(){this.sheetProtection=null}_write(e){WS.reset(),WS.addText(e),this.stream.write(WS)}_writeSheetProperties(e,t,n){let r={outlineProperties:t&&t.outlineProperties,tabColor:t&&t.tabColor,pageSetup:n&&n.fitToPage?{fitToPage:n.fitToPage}:void 0};e.addText(GS.sheetProperties.toXml(r))}_writeSheetFormatProperties(e,t){let n=t?{defaultRowHeight:t.defaultRowHeight,dyDescent:t.dyDescent,outlineLevelCol:t.outlineLevelCol,outlineLevelRow:t.outlineLevelRow}:void 0;t&&t.defaultColWidth&&(n.defaultColWidth=t.defaultColWidth),e.addText(GS.sheetFormatProperties.toXml(n))}_writeOpenWorksheet(){WS.reset(),WS.addText(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),WS.addText(`<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">`),this._writeSheetProperties(WS,this.properties,this.pageSetup),WS.addText(GS.sheetViews.toXml(this.views)),this._writeSheetFormatProperties(WS,this.properties),this.stream.write(WS)}_writeColumns(){let e=zd.toModel(this.columns);e&&(GS.columns.prepare(e,{styles:this._workbook.styles}),this.stream.write(GS.columns.toXml(e)))}_writeOpenSheetData(){this._write(`<sheetData>`)}_writeRow(e){if(this.startedData||=(this._writeColumns(),this._writeOpenSheetData(),!0),e.hasValues||e.height!=null){let{model:t}=e;if(!t)return;let n={styles:this._workbook.styles,sharedStrings:this.useSharedStrings?this._workbook.sharedStrings:void 0,hyperlinks:this._sheetRelsWriter.hyperlinksProxy,merges:this._merges,formulae:this._formulae,siFormulae:this._siFormulae,comments:[]};if(GS.row.prepare(t,n),this.stream.write(GS.row.toXml(t)),t.cells)for(let e of t.cells)e&&e.isDynamicArray&&this._workbook.dynamicArrayCount++;n.comments.length&&(this.hasComments=!0,this._sheetCommentsWriter.addComments(n.comments))}}_writeCloseSheetData(){this._write(`</sheetData>`)}_writeMergeCells(){this._merges.length&&(WS.reset(),WS.addText(`<mergeCells count="${this._merges.length}">`),this._merges.forEach(e=>{WS.addText(`<mergeCell ref="${e}"/>`)}),WS.addText(`</mergeCells>`),this.stream.write(WS))}_writeHyperlinks(){this.stream.write(GS.hyperlinks.toXml(this._sheetRelsWriter._hyperlinks))}_writeConditionalFormatting(){let e={styles:this._workbook.styles};GS.conditionalFormattings.prepare(this.conditionalFormatting,e);let t={conditionalFormattings:this.conditionalFormatting};GS.extLst.prepare(t),this.stream.write(GS.conditionalFormattings.toXml(this.conditionalFormatting))}_writeExtLst(){let e={conditionalFormattings:this.conditionalFormatting};this.stream.write(GS.extLst.toXml(e))}_writeIgnoredErrors(){this.ignoredErrors.length>0&&this.stream.write(GS.ignoredErrors.toXml(this.ignoredErrors))}_writeRowBreaks(){this.stream.write(GS.rowBreaks.toXml(this.rowBreaks))}_writeColBreaks(){this.stream.write(GS.colBreaks.toXml(this.colBreaks))}_writeDataValidations(){this.stream.write(GS.dataValidations.toXml(this.dataValidations.model))}_writeSheetProtection(){this.stream.write(GS.sheetProtection.toXml(this.sheetProtection))}_writePageMargins(){this.stream.write(GS.pageMargins.toXml(this.pageSetup.margins))}_writePageSetup(){this.stream.write(GS.pageSeteup.toXml(this.pageSetup))}_writeHeaderFooter(){this.stream.write(GS.headerFooter.toXml(this.headerFooter))}_writeAutoFilter(){this.stream.write(GS.autoFilter.toXml(this.autoFilter))}_writeDrawing(){if(this._media.length===0)return;for(let e of this._media)if(e._watermarkTag){let t=this._dimensions.model,n=t?Math.max(t.right??100,100):100,r=t?Math.max(t.bottom??200,200):200;e.range.br={nativeCol:n,nativeColOff:0,nativeRow:r,nativeRowOff:0}}let e=`drawing${this.id}`,t=this._sheetRelsWriter.addRelationship({Type:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing`,Target:Km(e)}),{anchors:n,rels:r}=hb(this._media,[],{getBookImage:e=>this._workbook.getImage(Number(e)),nextRId:e=>`rId${e.length+1}`});this._drawing={rId:t,name:e,anchors:n,rels:r},this.stream.write(GS.drawing.toXml({rId:t}))}get drawing(){return this._drawing}_writeBackground(){if(this._background){if(this._background.imageId!==void 0){let e=this._workbook.getImage(this._background.imageId);if(!e)return;let t=this._sheetRelsWriter.addMedia({Target:Ym(e.name),Type:D.Image});this._background={...this._background,rId:t}}this.stream.write(GS.picture.toXml({rId:this._background.rId}))}}_writeLegacyData(){this.hasComments&&(WS.reset(),WS.addText(`<legacyDrawing r:id="${this._sheetCommentsWriter.vmlRelId}"/>`),this.stream.write(WS))}_writeDimensions(){}_writeCloseWorksheet(){this._write(`</worksheet>`)}}}));function JS(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(JS).join(`,`)}]`;let t=Object.keys(e).sort(),n=e;return`{${t.map(e=>`${JSON.stringify(e)}:${JS(n[e])}`).join(`,`)}}`}var YS,XS=t((()=>{YS=class{constructor(){this._values=[],this._totalRefs=0,this._hash=Object.create(null)}get count(){return this._values.length}get values(){return this._values}get totalRefs(){return this._totalRefs}getString(e){return this._values[e]}add(e){let t=typeof e==`string`?`s:${e}`:`r:${JS(e.richText)}`,n=this._hash[t];return n===void 0&&(n=this._hash[t]=this._values.length,this._values.push(e)),this._totalRefs++,n}}}));function ZS(e){if(e.length===0)return new Uint8Array;if(e.length===1)return e[0];let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}var QS,$S,eC,tC,nC,rC,iC,aC=t((()=>{la(),kb(),lr(),Sr(),QS=new TextEncoder,$S=class{constructor(e){this._data=e}get length(){return this.toBuffer().length}copy(e,t,n,r){let i=this.toBuffer(),a=Math.min(r,i.length-n);return e.set(i.subarray(n,n+a),t),a}toBuffer(){return this._buffer||=QS.encode(this._data),this._buffer}},eC=class{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,n,r){let i=this.toBuffer(),a=Math.min(r,i.length-n);return e.set(i.subarray(n,n+a),t),a}toBuffer(){return this._data.toBuffer()}},tC=class{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,n,r){let i=Math.min(r,this._data.length-n);return e.set(this._data.subarray(n,n+i),t),i}toBuffer(){return this._data}},nC=class{constructor(e){this.size=e,this.buffer=new Uint8Array(e),this.iRead=0,this.iWrite=0}toBuffer(){return this.iRead===0&&this.iWrite===this.size?this.buffer:this.buffer.subarray(this.iRead,this.iWrite)}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(e){if(e===0)return null;if(e===void 0||e>=this.length){let e=this.toBuffer();return this.iRead=this.iWrite,e}let t=this.buffer.subarray(this.iRead,this.iRead+e);return this.iRead+=e,t}write(e,t,n){let r=Math.min(n,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,r),this.iWrite+=r,r}},rC=()=>{},iC=class extends xr{constructor(e){super(),this._writableStreamWriter=null,this._asyncWriteQueue=Promise.resolve(),this.bufSize=e?.bufSize||1024*1024,this.buffers=[],this.batch=e?.batch??!1,this.corked=!1,this.paused=!1,this.encoding=null,this.pipes=[],this._ended=!1}get writable(){return!this._ended}toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:{let e=this.buffers.reduce((e,t)=>e+t.length,0),t=new Uint8Array(e),n=0;for(let e of this.buffers){let r=e.toBuffer();t.set(r,n),n+=r.length}return t}}}_getWritableBuffer(){if(this.buffers.length){let e=this.buffers[this.buffers.length-1];if(!e.full)return e}let e=new nC(this.bufSize);return this.buffers.push(e),e}async _pipeChunk(e){let t=this.pipes.map(t=>new Promise(n=>{t.write(e.toBuffer(),()=>n())}));await Promise.all(t)}_writeToBuffers(e){let t=0,n=e.length;for(;t<n;){let r=this._getWritableBuffer();t+=r.write(e,t,n-t)}}async write(e,t,n){typeof t==`function`&&(n=t),n||=rC;let r;if(e instanceof Db||e&&e.constructor?.name===`StringBuf`)r=new eC(e);else if(e instanceof Uint8Array)r=new tC(e);else if(ArrayBuffer.isView(e))r=new tC(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));else if(e instanceof ArrayBuffer)r=new tC(new Uint8Array(e));else if(typeof e==`string`)r=new $S(e);else throw new Qi(typeof e,`Chunk must be one of type String, Uint8Array, ArrayBuffer or StringBuf.`);if(this.pipes.length)if(this.batch)for(this._writeToBuffers(r);!this.corked&&this.buffers.length>1;){let e=this.buffers.shift();await this._pipeChunk(new tC(e.toBuffer()))}else this.corked?(this._writeToBuffers(r),queueMicrotask(()=>n())):(await this._pipeChunk(r),n());else{let e=r.toBuffer(),t=!1;!this.paused&&this.listenerCount(`data`)>0&&(this.emit(`data`,e),t=!0),this._writableStreamWriter&&(this._asyncWriteQueue=this._asyncWriteQueue.then(()=>this._writableStreamWriter.write(e)),t=!0),t||(this._writeToBuffers(r),this.emit(`readable`)),n()}return!0}cork(){this.corked=!0}_flush(){this.pipes.length&&(async()=>{for(;this.buffers.length;){let e=this.buffers.shift();await this._pipeChunk(new tC(e.toBuffer()))}})().catch(e=>this.emit(`error`,e))}uncork(){this.corked=!1,this._flush()}end(e,t,n){let r=e=>{if(e){n?.(e);return}this._ended=!0,this._flush(),this.pipes.forEach(e=>{typeof e.end==`function`&&e.end()}),this._writableStreamWriter?this._asyncWriteQueue.then(()=>this._writableStreamWriter.close()).then(()=>{this.emit(`finish`),this.emit(`close`)}).catch(e=>{this.emit(`error`,e)}):(this.emit(`finish`),this.emit(`close`))};e?this.write(e,t,r):r()}read(e){if(e){let t=[],n=e;for(;n&&this.buffers.length&&!this.buffers[0].eod;){let e=this.buffers[0],r=e.read(n);r&&(n-=r.length,t.push(r)),e.eod&&e.full&&this.buffers.shift()}return $n(ZS(t))}let t=this.buffers.map(e=>e.toBuffer()).filter(Boolean);return this.buffers=[],$n(ZS(t))}readString(e){let t=e??this.encoding??`utf-8`,n=this.read();return Hn(t).decode(n)}setEncoding(e){this.encoding=e}pause(){this.paused=!0}resume(){this.paused=!1}isPaused(){return this.paused}pipe(e){return this.pipes.push(e),!this.paused&&this.buffers.length&&this.end(),e}pipeTo(e){this._writableStreamWriter=e.getWriter()}unpipe(e){this.pipes=this.pipes.filter(t=>t!==e)}unshift(){throw new ea(`unshift`,`Not implemented`)}wrap(){throw new ea(`wrap`,`Not implemented`)}push(e){return e!==null&&this.write(e),!0}}}));async function oC(e,t){let n={lockStructure:t?.lockStructure??!0,lockWindows:t?.lockWindows,lockRevision:t?.lockRevision};return e&&(n.algorithmName=`SHA-512`,n.saltValue=wf(Sb.randomBytes(16)),n.spinCount=t?.spinCount!=null&&Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5,n.hashValue=await Sb.convertPasswordToHash(e,`SHA-512`,n.saltValue,n.spinCount)),n}var sC=t((()=>{Cb(),Hf()})),cC,lC=t((()=>{j(),cC=class extends A{render(e,t){e.openNode(`HeadingPairs`),e.openNode(`vt:vector`,{size:2,baseType:`variant`}),e.openNode(`vt:variant`),e.leafNode(`vt:lpstr`,void 0,`Worksheets`),e.closeNode(),e.openNode(`vt:variant`),e.leafNode(`vt:i4`,void 0,t.length),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){return e.name===`HeadingPairs`}parseText(){}parseClose(e){return e!==`HeadingPairs`}}})),uC,dC=t((()=>{j(),uC=class extends A{render(e,t){e.openNode(`TitlesOfParts`),e.openNode(`vt:vector`,{size:t.length,baseType:`lpstr`}),t.forEach(t=>{e.leafNode(`vt:lpstr`,void 0,t.name)}),e.closeNode(),e.closeNode()}parseOpen(e){return e.name===`TitlesOfParts`}parseText(){}parseClose(e){return e!==`TitlesOfParts`}}})),fC,pC=t((()=>{j(),lC(),dC(),b_(),ag(),fC=class e extends A{constructor(){super(),this.map={Company:new y_({tag:`Company`}),Manager:new y_({tag:`Manager`}),HeadingPairs:new cC,TitlesOfParts:new uC}}render(t,n){t.openXml(of),t.openNode(`Properties`,e.PROPERTY_ATTRIBUTES),t.leafNode(`Application`,void 0,`Microsoft Excel`),t.leafNode(`DocSecurity`,void 0,`0`),t.leafNode(`ScaleCrop`,void 0,`false`),this.map.HeadingPairs.render(t,n.worksheets),this.map.TitlesOfParts.render(t,n.worksheets),this.map.Company.render(t,n.company??``),this.map.Manager.render(t,n.manager),t.leafNode(`LinksUpToDate`,void 0,`false`),t.leafNode(`SharedDoc`,void 0,`false`),t.leafNode(`HyperlinksChanged`,void 0,`false`),t.leafNode(`AppVersion`,void 0,`16.0300`),t.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`Properties`:return!0;default:return this.parser=this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case`Properties`:return this.model={worksheets:this.map.TitlesOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}static{this.DateFormat=function(e){return e.toISOString().replace(/[.]\d{3,6}/,``)}}static{this.DateAttrs={"xsi:type":`dcterms:W3CDTF`}}static{this.PROPERTY_ATTRIBUTES={xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/extended-properties`,"xmlns:vt":`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`}}}})),mC,hC=t((()=>{_b(),ng(),j(),ag(),mC=class e extends A{render(t,n){t.openXml(of),t.openNode(`Types`,e.PROPERTY_ATTRIBUTES);let r={};if((n.media??[]).forEach(e=>{if(e.type===`image`){if(fb(e))return;let n=e.extension;r[n]||(r[n]=!0,t.leafNode(`Default`,{Extension:n,ContentType:`image/${n}`}))}}),t.leafNode(`Default`,{Extension:`rels`,ContentType:`application/vnd.openxmlformats-package.relationships+xml`}),t.leafNode(`Default`,{Extension:`xml`,ContentType:`application/xml`}),t.leafNode(`Override`,{PartName:_m(k.xlWorkbook),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml`}),n.worksheets.forEach(e=>{t.leafNode(`Override`,{PartName:_m(bm(e.fileIndex)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml`})}),n.chartsheets&&n.chartsheets.forEach(e=>{t.leafNode(`Override`,{PartName:_m(Th(e.sheetNo)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml`})}),(n.pivotTables??[]).length){let e=new Set;(n.pivotTables??[]).forEach(n=>{let r=n.tableNumber,i=n.cacheId;e.has(i)||(e.add(i),t.leafNode(`Override`,{PartName:_m(jm(r)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml`}),(!n.isLoaded||n.cacheRecords)&&t.leafNode(`Override`,{PartName:_m(Nm(r)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml`})),t.leafNode(`Override`,{PartName:_m(Fm(r)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml`})})}if(t.leafNode(`Override`,{PartName:_m(k.xlTheme1),ContentType:`application/vnd.openxmlformats-officedocument.theme+xml`}),t.leafNode(`Override`,{PartName:_m(k.xlStyles),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml`}),n.externalLinks&&n.externalLinks.length>0)for(let e of n.externalLinks)t.leafNode(`Override`,{PartName:_m(Rm(e.index)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml`});if(n.hasCheckboxes&&t.leafNode(`Override`,{PartName:_m(k.xlFeaturePropertyBag),ContentType:`application/vnd.ms-excel.featurepropertybag+xml`}),n.hasDynamicArrayFormulas&&t.leafNode(`Override`,{PartName:_m(k.xlMetadata),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml`}),n.sharedStrings&&n.sharedStrings.count&&t.leafNode(`Override`,{PartName:_m(k.xlSharedStrings),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml`}),n.tables&&n.tables.forEach(e=>{t.leafNode(`Override`,{PartName:_m(Om(e.target)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml`})}),n.drawings&&n.drawings.forEach(e=>{t.leafNode(`Override`,{PartName:_m(km(e.name)),ContentType:`application/vnd.openxmlformats-officedocument.drawing+xml`})}),n.chartEntries)for(let[e,r]of Object.entries(n.chartEntries))t.leafNode(`Override`,{PartName:_m(rh(e)),ContentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`}),r?.userShapesXml&&t.leafNode(`Override`,{PartName:_m(uh(e)),ContentType:`application/vnd.openxmlformats-officedocument.drawing+xml`});let i=new Set;if(n.chartExEntries)for(let e of Object.keys(n.chartExEntries)){let n=_m(vh(e));i.has(n)||(i.add(n),t.leafNode(`Override`,{PartName:n,ContentType:`application/vnd.ms-office.chartex+xml`}))}if(n.chartExStructuredEntries)for(let e of Object.keys(n.chartExStructuredEntries)){let n=_m(vh(e));i.has(n)||(i.add(n),t.leafNode(`Override`,{PartName:n,ContentType:`application/vnd.ms-office.chartex+xml`}))}if(n.chartStyles)for(let e of Object.keys(n.chartStyles))t.leafNode(`Override`,{PartName:_m(ah(e)),ContentType:`application/vnd.ms-office.chartstyle+xml`});if(n.chartColors)for(let e of Object.keys(n.chartColors))t.leafNode(`Override`,{PartName:_m(oh(e)),ContentType:`application/vnd.ms-office.chartcolorstyle+xml`});if(n.chartExStyles)for(let e of Object.keys(n.chartExStyles))t.leafNode(`Override`,{PartName:_m(sh(e)),ContentType:`application/vnd.ms-office.chartstyle+xml`});if(n.chartExColors)for(let e of Object.keys(n.chartExColors))t.leafNode(`Override`,{PartName:_m(ch(e)),ContentType:`application/vnd.ms-office.chartcolorstyle+xml`});let a=n.commentRefs&&n.commentRefs.length>0,o=n.formControlRefs&&n.formControlRefs.length>0,s=n.hasHeaderWatermark===!0,c=n.hasChartsheetVml===!0;if((a||o||s||c)&&t.leafNode(`Default`,{Extension:`vml`,ContentType:`application/vnd.openxmlformats-officedocument.vmlDrawing`}),a&&n.commentRefs.forEach(({commentName:e})=>{t.leafNode(`Override`,{PartName:_m(wm(e)),ContentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml`})}),o)for(let e of n.formControlRefs)t.leafNode(`Override`,{PartName:_m(Xm(e)),ContentType:`application/vnd.ms-excel.controlproperties+xml`});let l=n.threadedCommentSheetIds??[];for(let e of l)t.leafNode(`Override`,{PartName:_m(`xl/threadedComments/threadedComment${e}.xml`),ContentType:`application/vnd.ms-excel.threadedcomments+xml`});n.hasPersons&&t.leafNode(`Override`,{PartName:_m(`xl/persons/person.xml`),ContentType:`application/vnd.ms-excel.person+xml`});for(let e of n.slicerPartPaths??[])t.leafNode(`Override`,{PartName:_m(e),ContentType:`application/vnd.ms-excel.slicer+xml`});for(let e of n.slicerCachePartPaths??[])t.leafNode(`Override`,{PartName:_m(e),ContentType:`application/vnd.ms-excel.slicerCache+xml`});for(let e of n.timelinePartPaths??[])t.leafNode(`Override`,{PartName:_m(e),ContentType:`application/vnd.ms-excel.timeline+xml`});for(let e of n.timelineCachePartPaths??[])t.leafNode(`Override`,{PartName:_m(e),ContentType:`application/vnd.ms-excel.timelineCache+xml`});t.leafNode(`Override`,{PartName:_m(k.docPropsCore),ContentType:`application/vnd.openxmlformats-package.core-properties+xml`}),t.leafNode(`Override`,{PartName:_m(k.docPropsApp),ContentType:`application/vnd.openxmlformats-officedocument.extended-properties+xml`}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}static{this.PROPERTY_ATTRIBUTES={xmlns:`http://schemas.openxmlformats.org/package/2006/content-types`}}}})),gC,_C=t((()=>{j(),gC=class extends A{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this.text=[],this._format=e.format||function(e){try{return Number.isNaN(e.getTime())?``:e.toISOString()}catch{return``}},this._parse=e.parse||function(e){return new Date(e)}}render(e,t){t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(t)):e.writeText(this._format(t)),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=this._parse(e.attributes[this.attr]):this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(``))),!1}}})),vC,yC,bC=t((()=>{j(),_C(),v_(),b_(),ag(),vC={creator:`dc:creator`,title:`dc:title`,subject:`dc:subject`,description:`dc:description`,identifier:`dc:identifier`,language:`dc:language`,keywords:`cp:keywords`,category:`cp:category`,lastModifiedBy:`cp:lastModifiedBy`,lastPrinted:`cp:lastPrinted`,revision:`cp:revision`,version:`cp:version`,contentStatus:`cp:contentStatus`,contentType:`cp:contentType`,created:`dcterms:created`,modified:`dcterms:modified`},yC=class e extends A{constructor(){super(),this.map={creator:new y_({tag:vC.creator}),title:new y_({tag:vC.title}),subject:new y_({tag:vC.subject}),description:new y_({tag:vC.description}),identifier:new y_({tag:vC.identifier}),language:new y_({tag:vC.language}),keywords:new y_({tag:vC.keywords}),category:new y_({tag:vC.category}),lastModifiedBy:new y_({tag:vC.lastModifiedBy}),lastPrinted:new gC({tag:vC.lastPrinted,format:e.DateFormat}),revision:new __({tag:vC.revision}),version:new y_({tag:vC.version}),contentStatus:new y_({tag:vC.contentStatus}),contentType:new y_({tag:vC.contentType}),created:new gC({tag:vC.created,attrs:e.DateAttrs,format:e.DateFormat}),modified:new gC({tag:vC.modified,attrs:e.DateAttrs,format:e.DateFormat})}}render(t,n){t.openXml(of),t.openNode(`cp:coreProperties`,e.CORE_PROPERTY_ATTRIBUTES);for(let e of Object.keys(vC))this.map[e].render(t,n[e]);t.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name!==`coreProperties`&&(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if(e===`coreProperties`){this.model={};for(let e of Object.keys(vC)){let t=this.map[e].model;t!==void 0&&t!==``&&(this.model[e]=t)}return!1}return!0}static{this.DateFormat=function(e){return e.toISOString().replace(/[.]\d{3}/,``)}}static{this.DateAttrs={"xsi:type":`dcterms:W3CDTF`}}static{this.CORE_PROPERTY_ATTRIBUTES={"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`}}}})),xC,SC=t((()=>{j(),xC=class extends A{render(e){e.openXml({version:`1.0`,encoding:`UTF-8`,standalone:`yes`}),e.openNode(`FeaturePropertyBags`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybag`}),e.leafNode(`bag`,{type:`Checkbox`}),e.openNode(`bag`,{type:`XFControls`}),e.leafNode(`bagId`,{k:`CellControl`},`0`),e.closeNode(),e.openNode(`bag`,{type:`XFComplement`}),e.leafNode(`bagId`,{k:`XFControls`},`1`),e.closeNode(),e.openNode(`bag`,{type:`XFComplements`,extRef:`XFComplementsMapperExtRef`}),e.openNode(`a`,{k:`MappedFeaturePropertyBags`}),e.leafNode(`bagId`,{},`2`),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}})),CC,wC=t((()=>{_b(),j(),CC=class extends A{parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={range:{editAs:e.attributes.editAs}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this.parser&&this.parser.parseText(e)}reconcilePicture(e,t){if(e&&e.rId){let n=t.rels[e.rId];if(!n)return;if(n.TargetMode===`External`||e.external)return this.reconcileExternalPicture(n.Target,t);let r=n.Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){let n=r[1],i=t.mediaIndex[n],a=t.media[i];return a&&e.alphaModFix!==void 0?{...a,alphaModFix:e.alphaModFix}:a}}}reconcileExternalPicture(e,t){if(!e)return;let n=`external:${e}`,r=t.mediaIndex[n];if(r===void 0){r=t.media.length;let i={type:`image`,extension:pb(e),link:e,index:r};t.media.push(i),t.mediaIndex[n]=r}return t.media[r]}}})),TC,EC,DC=t((()=>{j(),TC=9525,EC=class extends A{constructor(e){super(),this.tag=e.tag,this.map={},this.model={width:0,height:0}}render(e,t){e.openNode(this.tag);let n=Math.floor(t.width*TC),r=Math.floor(t.height*TC);e.addAttribute(`cx`,n),e.addAttribute(`cy`,r),e.closeNode()}parseOpen(e){return e.name===this.tag?(this.model={width:parseInt(e.attributes.cx??`0`,10)/TC,height:parseInt(e.attributes.cy??`0`,10)/TC},!0):!1}parseText(e){}parseClose(e){return!1}}})),OC,kC,AC,jC,MC=t((()=>{j(),Ux(),OC=`http://schemas.openxmlformats.org/drawingml/2006/chart`,kC=`http://schemas.microsoft.com/office/drawing/2014/chartex`,AC=`{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}`,jC=class extends A{constructor(...e){super(...e),this._inNvPr=!1,this._inGraphicData=!1,this._extLstCapture=null}get tag(){return`xdr:graphicFrame`}prepare(e,t){e.index===void 0&&(e.index=t.index+1)}render(e,t){e.openNode(this.tag,{macro:``}),e.openNode(`xdr:nvGraphicFramePr`);let n=t.index??2,r=t.name??`Chart ${n}`;t.cNvPrExtLst?(e.openNode(`xdr:cNvPr`,{id:n,name:r}),e.writeRaw(t.cNvPrExtLst),e.closeNode()):t.isChartEx?(e.openNode(`xdr:cNvPr`,{id:n,name:r}),e.openNode(`a:extLst`),e.openNode(`a:ext`,{uri:AC}),e.leafNode(`a16:creationId`,{"xmlns:a16":`http://schemas.microsoft.com/office/drawing/2014/main`,id:`{${Hx().toUpperCase()}}`}),e.closeNode(),e.closeNode(),e.closeNode()):e.leafNode(`xdr:cNvPr`,{id:n,name:r}),e.leafNode(`xdr:cNvGraphicFramePr`),e.closeNode(),e.openNode(`xdr:xfrm`),e.leafNode(`a:off`,{x:0,y:0}),e.leafNode(`a:ext`,{cx:0,cy:0}),e.closeNode(),e.openNode(`a:graphic`),t.isChartEx?(e.openNode(`a:graphicData`,{uri:kC}),e.leafNode(`cx:chart`,{"xmlns:cx":kC,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"r:id":t.rId})):(e.openNode(`a:graphicData`,{uri:t.graphicDataUri??OC}),e.leafNode(`c:chart`,{"xmlns:c":`http://schemas.openxmlformats.org/drawingml/2006/chart`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"r:id":t.rId})),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){if(this._extLstCapture){let t=Object.entries(e.attributes||{}).map(([e,t])=>` ${e}="${t}"`).join(``);return e.isSelfClosing?(this._extLstCapture.parts.push(`<${e.name}${t}/>`),this._extLstCapture.skipNextClose=!0):(this._extLstCapture.parts.push(`<${e.name}${t}>`),this._extLstCapture.depth++),!0}switch(e.name){case this.tag:this.reset(),this.model={},this._extLstCapture=null;break;case`xdr:cNvPr`:this._inNvPr=!0,this.model.index=parseInt(e.attributes.id,10)||void 0,this.model.name=e.attributes.name;break;case`a:extLst`:if(this._inNvPr){let t=Object.entries(e.attributes||{}).map(([e,t])=>` ${e}="${t}"`).join(``);return this._extLstCapture={depth:1,parts:[`<a:extLst${t}>`],skipNextClose:!1},!0}break;case`a:graphicData`:this._inGraphicData=!0,this.model.graphicDataUri=e.attributes.uri;break;case`c:chart`:this._inGraphicData&&(this.model.rId=e.attributes[`r:id`]);break;case`cx:chart`:this._inGraphicData&&(this.model.rId=e.attributes[`r:id`],this.model.isChartEx=!0);break;default:break}return!0}parseText(e){this._extLstCapture&&e&&this._extLstCapture.parts.push(e)}parseClose(e){if(this._extLstCapture)return this._extLstCapture.skipNextClose?(this._extLstCapture.skipNextClose=!1,!0):(this._extLstCapture.parts.push(`</${e}>`),this._extLstCapture.depth--,this._extLstCapture.depth===0&&(this.model.cNvPrExtLst=this._extLstCapture.parts.join(``),this._extLstCapture=null),!0);switch(e){case this.tag:return!1;case`xdr:cNvPr`:return this._inNvPr=!1,!0;case`a:graphicData`:return this._inGraphicData=!1,!0;default:return!0}}}})),NC,PC=t((()=>{j(),NC=class extends A{constructor(){super(),this.model={rId:``}}get tag(){return`a:blip`}render(e,t){let n=t.external?`r:link`:`r:embed`;t.alphaModFix!==void 0&&t.alphaModFix<1e5?(e.openNode(this.tag,{"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,[n]:t.rId,cstate:`print`}),e.leafNode(`a:alphaModFix`,{amt:String(t.alphaModFix)}),e.closeNode()):e.leafNode(this.tag,{"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,[n]:t.rId,cstate:`print`})}parseOpen(e){switch(e.name){case this.tag:{let t=e.attributes[`r:link`];return t===void 0?this.model={rId:e.attributes[`r:embed`]}:this.model={rId:t,external:!0},!0}case`a:alphaModFix`:return e.attributes.amt&&(this.model.alphaModFix=parseInt(e.attributes.amt,10)),!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}})),FC,IC=t((()=>{j(),PC(),FC=class extends A{constructor(){super(),this.map={"a:blip":new NC}}get tag(){return`xdr:blipFill`}render(e,t){e.openNode(this.tag),this.map[`a:blip`].render(e,t),e.openNode(`a:stretch`),e.leafNode(`a:fillRect`),e.closeNode(),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[`a:blip`].model,!1;default:return!0}}}})),LC,RC=t((()=>{j(),LC=class extends A{get tag(){return`xdr:cNvPicPr`}render(e){e.openNode(this.tag),e.leafNode(`a:picLocks`,{noChangeAspect:`1`}),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:return!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}})),zC,BC=t((()=>{j(),zC=class extends A{get tag(){return`a:extLst`}render(e){e.openNode(this.tag),e.openNode(`a:ext`,{uri:`{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}`}),e.leafNode(`a16:creationId`,{"xmlns:a16":`http://schemas.microsoft.com/office/drawing/2014/main`,id:`{00000000-0008-0000-0000-000002000000}`}),e.closeNode(),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:return!0;default:return!0}}parseText(){}parseClose(e){switch(e){case this.tag:return!1;default:return!0}}}})),VC,HC=t((()=>{j(),VC=class extends A{constructor(){super(),this.model={}}get tag(){return`a:hlinkClick`}render(e,t){t.hyperlinks&&t.hyperlinks.rId&&e.leafNode(this.tag,{"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"r:id":t.hyperlinks.rId,tooltip:t.hyperlinks.tooltip})}parseOpen(e){switch(e.name){case this.tag:return this.model={hyperlinks:{rId:e.attributes[`r:id`],tooltip:e.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}})),UC,WC=t((()=>{j(),BC(),HC(),UC=class extends A{constructor(){super(),this.map={"a:hlinkClick":new VC,"a:extLst":new zC}}get tag(){return`xdr:cNvPr`}render(e,t){e.openNode(this.tag,{id:t.index,name:`Picture ${t.index}`}),this.map[`a:hlinkClick`].render(e,t),this.map[`a:extLst`].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[`a:hlinkClick`].model,!1;default:return!0}}}})),GC,KC=t((()=>{j(),RC(),WC(),GC=class extends A{constructor(){super(),this.map={"xdr:cNvPr":new UC,"xdr:cNvPicPr":new LC}}get tag(){return`xdr:nvPicPr`}render(e,t){e.openNode(this.tag),this.map[`xdr:cNvPr`].render(e,t),this.map[`xdr:cNvPicPr`].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model=this.map[`xdr:cNvPr`].model,!1;default:return!0}}}})),qC,JC=t((()=>{qC={tag:`xdr:spPr`,c:[{tag:`a:xfrm`,c:[{tag:`a:off`,$:{x:`0`,y:`0`}},{tag:`a:ext`,$:{cx:`0`,cy:`0`}}]},{tag:`a:prstGeom`,$:{prst:`rect`},c:[{tag:`a:avLst`}]}]}})),YC,XC=t((()=>{j(),IC(),KC(),JC(),Pg(),YC=class extends A{constructor(){super(),this.map={"xdr:nvPicPr":new GC,"xdr:blipFill":new FC,"xdr:spPr":new Ng(qC)}}get tag(){return`xdr:pic`}prepare(e,t){e.index=t.index+1}render(e,t){e.openNode(this.tag),this.map[`xdr:nvPicPr`].render(e,t),this.map[`xdr:blipFill`].render(e,{rId:t.rId,alphaModFix:t.alphaModFix,external:t.external}),this.map[`xdr:spPr`].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}}})),ZC,QC,$C,ew=t((()=>{j(),wC(),DC(),MC(),XC(),Pg(),ZC=9525,QC=class extends A{constructor(){super(),this.map={},this.model={x:0,y:0}}get tag(){return`xdr:pos`}render(e,t){e.leafNode(this.tag,{x:Math.floor(t.x*ZC),y:Math.floor(t.y*ZC)})}parseOpen(e){return e.name===this.tag?(this.model={x:parseInt(e.attributes.x??`0`,10)/ZC,y:parseInt(e.attributes.y??`0`,10)/ZC},!0):!1}parseText(){}parseClose(){return!1}},$C=class extends CC{constructor(){super(),this.map={"xdr:pos":new QC,"xdr:ext":new EC({tag:`xdr:ext`}),"xdr:pic":new YC,"xdr:graphicFrame":new jC,"xdr:clientData":new Ng({tag:`xdr:clientData`})}}get tag(){return`xdr:absoluteAnchor`}prepare(e,t){e.picture?this.map[`xdr:pic`].prepare(e.picture,t):e.graphicFrame&&this.map[`xdr:graphicFrame`].prepare(e.graphicFrame,t)}render(e,t){e.openNode(this.tag),this.map[`xdr:pos`].render(e,t.range.pos??{x:0,y:0}),this.map[`xdr:ext`].render(e,t.range.ext),t.picture?this.map[`xdr:pic`].render(e,t.picture):t.graphicFrame&&this.map[`xdr:graphicFrame`].render(e,t.graphicFrame),this.map[`xdr:clientData`].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.pos=this.map[`xdr:pos`].model,this.model.range.ext=this.map[`xdr:ext`].model,this.model.picture=this.map[`xdr:pic`].model,this.model.graphicFrame=this.map[`xdr:graphicFrame`].model,!1;default:return!0}}reconcile(e,t){e.picture&&(e.medium=this.reconcilePicture(e.picture,t))}}})),tw,nw=t((()=>{j(),v_(),tw=class extends A{constructor(e){super(),this.tag=e.tag,this.map={"xdr:col":new __({tag:`xdr:col`,zero:!0}),"xdr:colOff":new __({tag:`xdr:colOff`,zero:!0}),"xdr:row":new __({tag:`xdr:row`,zero:!0}),"xdr:rowOff":new __({tag:`xdr:rowOff`,zero:!0})},this.model={nativeCol:0,nativeColOff:0,nativeRow:0,nativeRowOff:0}}render(e,t){e.openNode(this.tag),this.map[`xdr:col`].render(e,t.nativeCol),this.map[`xdr:colOff`].render(e,t.nativeColOff),this.map[`xdr:row`].render(e,t.nativeRow),this.map[`xdr:rowOff`].render(e,t.nativeRowOff),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model={nativeCol:this.map[`xdr:col`].model,nativeColOff:this.map[`xdr:colOff`].model,nativeRow:this.map[`xdr:row`].model,nativeRowOff:this.map[`xdr:rowOff`].model},!1;default:return!0}}}})),rw,iw=t((()=>{wC(),nw(),DC(),MC(),XC(),Pg(),rw=class extends CC{constructor(){super(),this.map={"xdr:from":new tw({tag:`xdr:from`}),"xdr:ext":new EC({tag:`xdr:ext`}),"xdr:pic":new YC,"xdr:graphicFrame":new jC,"xdr:clientData":new Ng({tag:`xdr:clientData`})}}get tag(){return`xdr:oneCellAnchor`}prepare(e,t){e.picture?this.map[`xdr:pic`].prepare(e.picture,t):e.graphicFrame&&this.map[`xdr:graphicFrame`].prepare(e.graphicFrame,t)}render(e,t){e.openNode(this.tag,{editAs:t.range.editAs??`oneCell`}),this.map[`xdr:from`].render(e,t.range.tl),this.map[`xdr:ext`].render(e,t.range.ext),t.picture?this.map[`xdr:pic`].render(e,t.picture):t.graphicFrame&&this.map[`xdr:graphicFrame`].render(e,t.graphicFrame),this.map[`xdr:clientData`].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map[`xdr:from`].model,this.model.range.ext=this.map[`xdr:ext`].model,this.model.picture=this.map[`xdr:pic`].model,this.model.graphicFrame=this.map[`xdr:graphicFrame`].model,!1;default:return!0}}reconcile(e,t){e.picture&&(e.medium=this.reconcilePicture(e.picture,t))}}})),aw,ow=t((()=>{j(),aw=class extends A{get tag(){return`xdr:sp`}render(e,t){t&&(e.openNode(this.tag,{macro:``,textlink:``}),e.openNode(`xdr:nvSpPr`),e.openNode(`xdr:cNvPr`,{id:t.cNvPrId,name:t.name,hidden:t.hidden?`1`:void 0}),e.openNode(`a:extLst`),e.openNode(`a:ext`,{uri:`{63B3BB69-23CF-44E3-9099-C40C66FF867C}`}),e.leafNode(`a14:compatExt`,{spid:t.spid,"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`},void 0),e.closeNode(),e.closeNode(),e.closeNode(),e.leafNode(`xdr:cNvSpPr`),e.closeNode(),e.openNode(`xdr:spPr`,{bwMode:`auto`}),e.openNode(`a:xfrm`),e.leafNode(`a:off`,{x:0,y:0}),e.leafNode(`a:ext`,{cx:0,cy:0}),e.closeNode(),e.openNode(`a:prstGeom`,{prst:`rect`}),e.leafNode(`a:avLst`),e.closeNode(),e.leafNode(`a:noFill`),e.openNode(`a:ln`),e.leafNode(`a:noFill`),e.closeNode(),e.openNode(`a:extLst`),e.openNode(`a:ext`,{uri:`{909E8E84-426E-40DD-AFC4-6F175D3DCCD1}`}),e.openNode(`a14:hiddenFill`,{"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`}),e.openNode(`a:solidFill`),e.leafNode(`a:srgbClr`,{val:`F0F0F0`}),e.closeNode(),e.closeNode(),e.closeNode(),e.openNode(`a:ext`,{uri:`{91240B29-F687-4F45-9708-019B960494DF}`}),e.openNode(`a14:hiddenLine`,{w:9525,"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`}),e.openNode(`a:solidFill`),e.leafNode(`a:srgbClr`,{val:`000000`}),e.closeNode(),e.leafNode(`a:miter`,{lim:8e5}),e.leafNode(`a:headEnd`),e.leafNode(`a:tailEnd`),e.closeNode(),e.closeNode(),e.closeNode(),e.closeNode(),e.openNode(`xdr:txBody`),e.leafNode(`a:bodyPr`,{vertOverflow:`clip`,wrap:`square`,lIns:18288,tIns:18288,rIns:0,bIns:18288,anchor:`ctr`,upright:1}),e.leafNode(`a:lstStyle`),e.openNode(`a:p`),e.openNode(`a:pPr`,{algn:`l`,rtl:0}),e.leafNode(`a:defRPr`,{sz:1e3}),e.closeNode(),e.openNode(`a:r`),e.openNode(`a:rPr`,{lang:`en-US`,sz:800,b:0,i:0,u:`none`,strike:`noStrike`,baseline:0}),e.openNode(`a:solidFill`),e.leafNode(`a:srgbClr`,{val:`000000`}),e.closeNode(),e.leafNode(`a:latin`,{typeface:`Tahoma`,pitchFamily:2,charset:0}),e.leafNode(`a:ea`,{typeface:`Tahoma`,pitchFamily:2,charset:0}),e.leafNode(`a:cs`,{typeface:`Tahoma`,pitchFamily:2,charset:0}),e.closeNode(),e.openNode(`a:t`),e.writeText(t.text??``),e.closeNode(),e.closeNode(),e.closeNode(),e.closeNode(),e.closeNode())}}})),sw,cw=t((()=>{wC(),nw(),MC(),XC(),ow(),Pg(),sw=class extends CC{constructor(){super(),this._acDepth=0,this._inFallback=!1,this._fallbackDepth=0,this._choiceRequires=void 0,this.map={"xdr:from":new tw({tag:`xdr:from`}),"xdr:to":new tw({tag:`xdr:to`}),"xdr:pic":new YC,"xdr:sp":new aw,"xdr:graphicFrame":new jC,"xdr:clientData":new Ng({tag:`xdr:clientData`})}}get tag(){return`xdr:twoCellAnchor`}prepare(e,t){e.picture?this.map[`xdr:pic`].prepare(e.picture,t):e.graphicFrame&&this.map[`xdr:graphicFrame`].prepare(e.graphicFrame,t)}render(e,t){let n=t.alternateContent?.requires,r=n===`cx1`||n===`cx`,i=!!n&&!r;i&&(e.openNode(`mc:AlternateContent`,{"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`}),e.openNode(`mc:Choice`,{Requires:n,...n===`a14`?{"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`}:{}}));let a=t.range.editAs??(t.graphicFrame?void 0:`oneCell`),o=a&&a!==`twoCell`?{editAs:a}:{};e.openNode(this.tag,o),this.map[`xdr:from`].render(e,t.range.tl),this.map[`xdr:to`].render(e,t.range.br),r?this.renderChartExAlternateContent(e,t):t.picture?this.map[`xdr:pic`].render(e,t.picture):t.graphicFrame?this.map[`xdr:graphicFrame`].render(e,t.graphicFrame):t.shape&&this.map[`xdr:sp`].render(e,t.shape),this.map[`xdr:clientData`].render(e,{}),e.closeNode(),i&&(e.closeNode(),e.leafNode(`mc:Fallback`),e.closeNode())}renderChartExAlternateContent(e,t){e.openNode(`mc:AlternateContent`,{"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`}),e.openNode(`mc:Choice`,{"xmlns:cx1":`http://schemas.microsoft.com/office/drawing/2015/9/8/chartex`,Requires:`cx1`}),t.graphicFrame&&this.map[`xdr:graphicFrame`].render(e,t.graphicFrame),e.closeNode(),e.openNode(`mc:Fallback`),this.renderChartExFallbackShape(e,t),e.closeNode(),e.closeNode()}renderChartExFallbackShape(e,t){e.openNode(`xdr:sp`,{macro:``,textlink:``}),e.openNode(`xdr:nvSpPr`),e.leafNode(`xdr:cNvPr`,{id:0,name:``}),e.openNode(`xdr:cNvSpPr`),e.leafNode(`a:spLocks`,{noTextEdit:1}),e.closeNode(),e.closeNode(),e.openNode(`xdr:spPr`),e.openNode(`a:xfrm`),e.leafNode(`a:off`,{x:3917950,y:698500}),e.leafNode(`a:ext`,{cx:5486400,cy:3657600}),e.closeNode(),e.openNode(`a:prstGeom`,{prst:`rect`}),e.leafNode(`a:avLst`),e.closeNode(),e.openNode(`a:solidFill`),e.leafNode(`a:prstClr`,{val:`white`}),e.closeNode(),e.openNode(`a:ln`,{w:1}),e.openNode(`a:solidFill`),e.leafNode(`a:prstClr`,{val:`black`}),e.closeNode(),e.closeNode(),e.closeNode(),e.openNode(`xdr:txBody`),e.leafNode(`a:bodyPr`,{vertOverflow:`clip`,horzOverflow:`clip`}),e.leafNode(`a:lstStyle`),e.openNode(`a:p`),e.openNode(`a:r`),e.leafNode(`a:rPr`,{lang:`en-US`,sz:1100}),e.openNode(`a:t`),e.writeText(`This chart isn't available in your version of Excel.
|
|
406
406
|
|
|
407
407
|
Editing this shape or saving this workbook into a different file format will permanently break the chart.`),e.closeNode(),e.closeNode(),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){if(this._inFallback)return this._fallbackDepth++,!0;switch(e.name){case`mc:AlternateContent`:return this._acDepth++,!0;case`mc:Choice`:return this._acDepth>0&&(this._choiceRequires=e.attributes?.Requires),!0;case`mc:Fallback`:return this._acDepth>0&&(this._inFallback=!0,this._fallbackDepth=1),!0;default:break}if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={range:{editAs:e.attributes.editAs}},this._acDepth=0,this._inFallback=!1,this._fallbackDepth=0,this._choiceRequires=void 0;break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this._inFallback||this.parser&&this.parser.parseText(e)}parseClose(e){if(this._inFallback)return this._fallbackDepth--,this._fallbackDepth===0&&(this._inFallback=!1),!0;switch(e){case`mc:AlternateContent`:return this._acDepth--,this._acDepth<=0&&(this._acDepth=0,this._choiceRequires&&(this.model.alternateContent={requires:this._choiceRequires}),this._choiceRequires=void 0),!0;case`mc:Choice`:case`mc:Fallback`:return!0;default:break}if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map[`xdr:from`].model,this.model.range.br=this.map[`xdr:to`].model,this.model.picture=this.map[`xdr:pic`].model,this.model.graphicFrame=this.map[`xdr:graphicFrame`].model,!1;default:return!0}}reconcile(e,t){e.picture&&(e.medium=this.reconcilePicture(e.picture,t))}}}));function lw(e){let t=typeof e.range==`string`?E.decode(e.range):e.range;return t.pos===void 0?t.br?`xdr:twoCellAnchor`:`xdr:oneCellAnchor`:`xdr:absoluteAnchor`}var uw,dw=t((()=>{da(),j(),ew(),iw(),cw(),ag(),uw=class e extends A{constructor(){super(),this._inAlternateContent=!1,this._acDepth=0,this._inChoice=!1,this._inFallback=!1,this._fallbackDepth=0,this._choiceRequires=void 0,this._anchorCountBeforeAC=0,this.map={"xdr:twoCellAnchor":new sw,"xdr:oneCellAnchor":new rw,"xdr:absoluteAnchor":new $C},this.model={anchors:[]}}prepare(e){e.anchors.forEach((e,t)=>{e.anchorType=lw(e),this.map[e.anchorType].prepare(e,{index:t})})}get tag(){return`xdr:wsDr`}render(t,n){let r=n||this.model;t.openXml(of);let i=r.anchors.some(e=>!!e?.alternateContent)?e.DRAWING_ATTRIBUTES_WITH_MC:e.DRAWING_ATTRIBUTES;t.openNode(this.tag,i),r.anchors.forEach(e=>{this.map[e.anchorType].render(t,e)}),t.closeNode()}parseOpen(e){if(this._inFallback)return this._fallbackDepth++,!0;if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={anchors:[]};break;case`mc:AlternateContent`:this._acDepth=(this._acDepth??0)+1,this._acDepth===1&&(this._inAlternateContent=!0,this._anchorCountBeforeAC=this.model.anchors.length);break;case`mc:Choice`:this._inAlternateContent&&(this._inChoice=!0,this._choiceRequires=e.attributes?.Requires);break;case`mc:Fallback`:this._inAlternateContent&&(this._inFallback=!0,this._fallbackDepth=1);break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);break}return!0}parseText(e){this._inFallback||this.parser&&this.parser.parseText(e)}parseClose(e){if(this._inFallback)return this._fallbackDepth--,this._fallbackDepth===0&&(this._inFallback=!1),!0;if(this.parser)return this.parser.parseClose(e)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;case`mc:AlternateContent`:if(this._acDepth=(this._acDepth??0)-1,this._acDepth<=0){if(this._inAlternateContent&&this._choiceRequires){let e=this.model.anchors;for(let t=this._anchorCountBeforeAC;t<e.length;t++)e[t].alternateContent={requires:this._choiceRequires}}this._inAlternateContent=!1,this._inChoice=!1,this._choiceRequires=void 0,this._acDepth=0}return!0;case`mc:Choice`:return this._inChoice=!1,!0;default:return!0}}reconcile(e,t){e.anchors.forEach(e=>{e.range?.pos===void 0?e.br?this.map[`xdr:twoCellAnchor`].reconcile(e,t):this.map[`xdr:oneCellAnchor`].reconcile(e,t):this.map[`xdr:absoluteAnchor`].reconcile(e,t)})}static{this.DRAWING_ATTRIBUTES={"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`}}static{this.DRAWING_ATTRIBUTES_WITH_MC={"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:c":`http://schemas.openxmlformats.org/drawingml/2006/chart`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"xmlns:cx":`http://schemas.microsoft.com/office/drawing/2014/chartex`}}}})),fw,pw=t((()=>{j(),Vy(),zy(),fw=class extends A{constructor(){super(),this.map={r:new By,t:new Ry}}get tag(){return`rPh`}render(e,t){if(e.openNode(this.tag,{sb:t.sb??0,eb:t.eb??0}),t&&Object.prototype.hasOwnProperty.call(t,`richText`)&&t.richText){let{r:n}=this.map;t.richText.forEach(t=>{n.render(e,t)})}else t&&this.map.t.render(e,t.text);e.closeNode()}parseOpen(e){let{name:t}=e;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[t],this.parser?(this.parser.parseOpen(e),!0):!1)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case`r`:{let e=this.model.richText;e||=this.model.richText=[],e.push(this.parser.model);break}case`t`:this.model.text=this.parser.model;break;default:break}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}})),mw,hw=t((()=>{j(),pw(),Vy(),zy(),mw=class extends A{constructor(e){super(),this.model=e,this.map={r:new By,t:new Ry,rPh:new fw}}get tag(){return`si`}render(e,t){e.openNode(this.tag),t&&typeof t==`object`&&Object.prototype.hasOwnProperty.call(t,`richText`)&&t.richText?t.richText.length?t.richText.forEach(t=>{this.map.r.render(e,t)}):this.map.t.render(e,``):t!=null&&this.map.t.render(e,t),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.model={},!0):(this.parser=this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):!1)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case`r`:{let e=this.model.richText;e||=this.model.richText=[],e.push(this.parser.model);break}case`t`:this.model=this.parser.model;break;default:break}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}})),gw,_w=t((()=>{la(),j(),hw(),ag(),gw=class extends A{constructor(e){super(),this.model=e||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||=new mw}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(e){return this.model.values[e]}add(e){return e.richText?this.addRichText(e):this.addText(e)}addText(e){let t=this.hash[e];return t===void 0&&(t=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,t}addRichText(e){let t=this.sharedStringXform.toXml(e),n=this.rich[t];return n===void 0&&(n=this.rich[t]=this.model.values.length,this.model.values.push(e)),this.model.count++,n}render(e,t){let n=t||this._values;e.openXml(of),e.openNode(`sst`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,count:n.count,uniqueCount:n.values.length});let r=this.sharedStringXform;n.values.forEach(t=>{r.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case`sst`:return!0;case`si`:return this.parser=this.sharedStringXform,this.parser.parseOpen(e),!0;default:throw new $i(`sharedStrings`,`Unexpected xml node in parseOpen: ${JSON.stringify(e)}`)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(e){case`sst`:return!1;default:throw new $i(`sharedStrings`,`Unexpected xml node in parseClose: ${e}`)}}}})),vw,yw=t((()=>{vw=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@@ -55,7 +55,7 @@ export interface HttpRangeReaderOptions {
|
|
|
55
55
|
* Whether to use credentials (cookies) for cross-origin requests.
|
|
56
56
|
* @default "same-origin"
|
|
57
57
|
*/
|
|
58
|
-
credentials?:
|
|
58
|
+
credentials?: NonNullable<RequestInit["credentials"]>;
|
|
59
59
|
/**
|
|
60
60
|
* Optional: Pre-known file size to skip HEAD request.
|
|
61
61
|
* If not provided, a HEAD request will be made to determine size.
|
|
@@ -241,7 +241,7 @@ interface CsvOptionsExtras {
|
|
|
241
241
|
map?(value: CellValue, index: number): CellValue;
|
|
242
242
|
includeEmptyRows?: boolean;
|
|
243
243
|
requestHeaders?: Record<string, string>;
|
|
244
|
-
requestBody?:
|
|
244
|
+
requestBody?: NonNullable<RequestInit["body"]>;
|
|
245
245
|
withCredentials?: boolean;
|
|
246
246
|
signal?: AbortSignal;
|
|
247
247
|
encoding?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseXform } from "../base-xform.js";
|
|
2
2
|
import { RichTextXform } from "../strings/rich-text-xform.js";
|
|
3
|
+
import { TextXform } from "../strings/text-xform.js";
|
|
3
4
|
interface NoteText {
|
|
4
5
|
font?: any;
|
|
5
6
|
text: string;
|
|
@@ -16,9 +17,11 @@ interface CommentModel {
|
|
|
16
17
|
declare class CommentXform extends BaseXform<CommentModel> {
|
|
17
18
|
parser: any;
|
|
18
19
|
private _richTextXform?;
|
|
20
|
+
private _textXform?;
|
|
19
21
|
constructor(model?: CommentModel);
|
|
20
22
|
get tag(): string;
|
|
21
23
|
get richTextXform(): RichTextXform;
|
|
24
|
+
get textXform(): TextXform;
|
|
22
25
|
render(xmlStream: any, model?: CommentModel): void;
|
|
23
26
|
parseOpen(node: any): boolean;
|
|
24
27
|
parseText(text: string): void;
|